/* Parent Portal - Global CSS */
/* New design system with sidebar navigation */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --sidebar-width: 240px;
    --header-height: 60px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --primary-color: #4a90e2;
    --secondary-color: #7b68ee;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --color-info: #1a73a8;
    --color-success: #3d7a0a;
    --text-dark: #1a1a1a;
    --text-body: #333333;
    --text-muted: #666666;
    --bg-white: #ffffff;
    --bg-light: #F7F7F7;
    --border-color: #c0c0c0;
    --header-bg: #222222;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #ebebeb;
    --sidebar-active: #ea7066;
    --sidebar-border: #e8e8e8;
    --sidebar-text: #111111;
    --sidebar-text-hover: #000000;
    --sidebar-icon-opacity: 1;
    --sidebar-scrollbar-thumb: #ccc;
    --sidebar-scrollbar-hover: #bbb;
}

html {
    scroll-padding-top: calc(var(--header-height) + 20px);
}

/* Dark Theme */
[data-theme="dark"] {
    --text-dark: #e8e8e8;
    --text-body: #c0c0c0;
    --text-muted: #888888;
    --bg-white: #1e1e1e;
    --bg-light: #141414;
    --border-color: #333333;
    --header-bg: #1a1a1a;
    --sidebar-bg: #1a1a1a;
    --sidebar-hover: #2a2a2a;
    --sidebar-border: #333333;
    --sidebar-text: rgba(255, 255, 255, 0.85);
    --sidebar-text-hover: #ffffff;
    --sidebar-icon-opacity: 1;
    --sidebar-scrollbar-thumb: #444;
    --sidebar-scrollbar-hover: #555;
    --color-info: #84bed6;
    --color-success: #b5d56a;
}

[data-theme="dark"] body {
    background-color: var(--bg-light);
}

[data-theme="dark"] p {
    color: var(--text-body);
}

[data-theme="dark"] .header {
    background: #1a1a1a;
}

[data-theme="dark"] .nav-card:hover {
    background: #2a2a2a;
}

[data-theme="dark"] .alert-item {
    background: #1e1e1e;
}

/* Spectrum colour picker dark mode */
[data-theme="dark"] .sp-replacer {
    background: var(--bg-white, #1e1e1e);
    border-color: var(--border-color, #333);
    color: var(--text-dark, #e8e8e8);
}
[data-theme="dark"] .sp-replacer:hover,
[data-theme="dark"] .sp-replacer.sp-active {
    border-color: #555;
}
[data-theme="dark"] .sp-dd {
    color: var(--text-muted, #888);
}
[data-theme="dark"] .sp-container {
    background: #2a2a2a;
    border-color: #444;
}
[data-theme="dark"] .sp-palette-container,
[data-theme="dark"] .sp-picker-container {
    border-color: #444;
}
[data-theme="dark"] .sp-palette .sp-thumb-el {
    border-color: #444;
}
[data-theme="dark"] .sp-palette .sp-thumb-el:hover {
    border-color: #999;
}
[data-theme="dark"] .sp-palette .sp-thumb-el.sp-thumb-active {
    border-color: #fff;
}
[data-theme="dark"] .sp-input {
    background: #1e1e1e;
    border-color: #444;
    color: #e8e8e8;
}
[data-theme="dark"] .sp-initial-disabled .sp-initial {
    background: #1e1e1e;
}
[data-theme="dark"] .sp-button-container .sp-cancel,
[data-theme="dark"] .sp-button-container .sp-choose {
    color: #e8e8e8;
    background: #333;
    border-color: #555;
}

[data-theme="dark"] .alert-item.alert-critical {
    background: #2d1515;
    border-color: #5c2020;
}

[data-theme="dark"] .alert-item.alert-critical .alert-item-title { color: #f87171; }
[data-theme="dark"] .alert-item.alert-critical .alert-item-subtitle { color: #ef9a9a; }
[data-theme="dark"] .alert-item.alert-critical .alert-item-icon { background: #3d1c1c; }
[data-theme="dark"] .alert-item.alert-critical:hover { background: #3a1a1a; border-color: #7f2d2d; }

[data-theme="dark"] .alert-item.alert-urgent {
    background: #2d2010;
    border-color: #5c4020;
}

[data-theme="dark"] .alert-item.alert-urgent .alert-item-title { color: #fb923c; }
[data-theme="dark"] .alert-item.alert-urgent .alert-item-subtitle { color: #fdba74; }
[data-theme="dark"] .alert-item.alert-urgent .alert-item-icon { background: #3d2a14; }
[data-theme="dark"] .alert-item.alert-urgent:hover { background: #3a2815; border-color: #7f5020; }

[data-theme="dark"] .alert-item.alert-info {
    background: #152030;
    border-color: #203d5c;
}

[data-theme="dark"] .alert-item.alert-info .alert-item-title { color: #60a5fa; }
[data-theme="dark"] .alert-item.alert-info .alert-item-subtitle { color: #93c5fd; }
[data-theme="dark"] .alert-item.alert-info .alert-item-icon { background: #1c2d3d; }
[data-theme="dark"] .alert-item.alert-info:hover { background: #1a2838; border-color: #2d5080; }

/* Bootstrap alert overrides */
.alert-info    { border-color: #5a9ab8; color: var(--color-info); }
.alert-success { border-color: #8fb84c; }
.alert-danger  { border-color: #c45850; }

/* Bootstrap alert dark mode */
[data-theme="dark"] .alert-info { background-color: #152030; border-color: #203d5c; color: #93c5fd; }
[data-theme="dark"] .alert-success { background-color: #14261a; border-color: #1e4d2b; color: #86efac; }
[data-theme="dark"] .alert-danger { background-color: #2d1519; border-color: #5c2028; color: #fca5a5; }
[data-theme="dark"] .alert-warning { background-color: #2d2414; border-color: #5c4a1e; color: #fde68a; }

[data-theme="dark"] .alert-item-arrow {
    filter: invert(1);
}

[data-theme="dark"] .nav-card-arrow {
    filter: invert(1);
}

[data-theme="dark"] .role-selector-arrow {
    filter: invert(1);
}

/* Dark mode: Form cards & inputs */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-white) !important;
}

[data-theme="dark"] .card-body.border {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .dragOut {
    background-color: var(--bg-white);
}

/* Checkboxes & toggles (standalone - no Bootstrap dependency) */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: auto;
    padding-left: 0;
    margin-bottom: 0;
}

.form-check .form-check-input,
.form-check-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    float: none;
    margin-left: 0;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    background-color: var(--bg-white, #fff);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.form-check-input:checked {
    background-color: #ea7066;
    border-color: #ea7066;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(234, 112, 102, 0.25);
    border-color: #ea7066;
    outline: none;
}

.form-check-label {
    cursor: pointer;
    color: var(--text-dark, inherit);
    font-size: 14px;
    user-select: none;
}

/* Toggle switch */
.form-check-input.form-check-switch {
    width: 36px;
    height: 20px;
    border-radius: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23adb5bd'/%3e%3c/svg%3e");
    background-size: auto;
    background-position: left center;
    transition: background-position 0.15s ease-in-out, background-color 0.15s, border-color 0.15s;
}

.form-check-input.form-check-switch:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Dark mode: Checkboxes & radio buttons */
[data-theme="dark"] .form-check-input {
    background-color: var(--bg-light);
    border-color: #555;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: #ea7066;
    border-color: #ea7066;
}

[data-theme="dark"] .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(234, 112, 102, 0.25);
    border-color: #ea7066;
}

[data-theme="dark"] .form-check-label {
    color: var(--text-dark);
}

/* Memory cards - constrain width after dashboard migration */
.memory_container {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Memory card dark mode */
[data-theme="dark"] .status {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .memory-info {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .memory-title-details {
    color: var(--text-muted);
}

[data-theme="dark"] .memory_container {
    box-shadow: rgba(0, 0, 0, 0.5) 0px 5px 5px;
}

[data-theme="dark"] .comment-textarea {
    background-color: #282828;
    border-color: var(--border-color);
    color: var(--text-body);
}

[data-theme="dark"] .comment-container {
    border-left-color: #84BED6;
}

[data-theme="dark"] .comment_counter {
    color: var(--text-muted);
}

[data-theme="dark"] .comment-text {
    color: var(--text-muted);
}

[data-theme="dark"] .status-create,
[data-theme="dark"] .status-create-no-round {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .options-ellipsis {
    color: var(--text-muted);
}

[data-theme="dark"] .options-ellipsis:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-body);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-add-media-container:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

/* Podcast dark mode */
[data-theme="dark"] .category-card {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .category-thumbnails {
    background: var(--bg-light);
}

[data-theme="dark"] .category-count {
    color: var(--text-muted);
}

[data-theme="dark"] .podcast-card {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-description {
    color: var(--text-muted);
}

[data-theme="dark"] #hero-section {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

[data-theme="dark"] #hero-description {
    color: var(--text-muted);
}

[data-theme="dark"] .filter-chip {
    background: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .category-icon {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

[data-theme="dark"] .tpp-page-item {
    color: var(--text-muted);
}

[data-theme="dark"] .tpp-page-item-active {
    color: #ea7066;
}

.tpp-form-text:focus,
.tpp-form-textarea:focus,
.tpp-form-select:focus {
    border: 1px solid #2195f2;
    box-shadow: 0 0 5px #719ece;
}

[data-theme="dark"] .tpp-form-text,
[data-theme="dark"] .tpp-form-textarea,
[data-theme="dark"] .tpp-form-select {
    background-color: #282828;
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-form-text:disabled,
[data-theme="dark"] .tpp-form-textarea:disabled,
[data-theme="dark"] .tpp-form-select:disabled {
    background-color: #1e1e1e;
    color: var(--text-muted);
    opacity: 0.7;
}

[data-theme="dark"] .tpp-form-label {
    color: var(--text-muted);
}

[data-theme="dark"] .page-navigation-middle {
    color: var(--text-muted);
}

[data-theme="dark"] .tpp-shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tpp-container,
[data-theme="dark"] .tpp-container-no-flex {
    background-color: var(--bg-white);
    border-top-color: var(--border-color);
    border-right-color: var(--border-color);
    border-bottom-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-container:not(.left-red):not(.left-blue):not(.left-gray):not(.left-green) {
    border-left-color: var(--border-color);
}

[data-theme="dark"] .tpp-container-title {
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-container-sub-title,
[data-theme="dark"] .tpp-container-sub-title-light {
    color: var(--text-muted);
}

a.tpp-container {
    transition: background-color 0.2s ease;
}

a.tpp-container:hover {
    background-color: var(--bg-light, #f5f5f5);
    text-decoration: none;
    color: inherit;
}

[data-theme="dark"] a.tpp-container:hover {
    background-color: #2a2a2a;
}

.tpp-container-icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    margin-right: 10px;
}

[data-theme="dark"] .tpp-container-icon {
    filter: invert(1);
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-white);
    color: var(--text-dark);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-body {
    background-color: var(--bg-white);
}

/* Modal: fit on screen + close button */
.modal-dialog {
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    display: flex;
    flex-direction: column;
}

.modal-content {
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-header .close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    padding: 0;
    margin: 0;
}

.modal-header .close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

[data-theme="dark"] .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ========================================
   Header / Topbar
   ======================================== */
.header {
    background: var(--header-bg);
    color: #ffffff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    height: var(--header-height);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
}

.topbar-logo img {
    height: 32px;
    margin-right: 8px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-notifications {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s ease;
}

.topbar-notifications:hover {
    color: #ffffff;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--sidebar-active);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
}

.topbar-theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s ease;
}

.topbar-theme-toggle:hover {
    color: #ffffff;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sidebar-active);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

.topbar-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   Dashboard Layout
   ======================================== */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 200px);
    background: var(--bg-light);
}

/* ========================================
   Left Sidebar
   ======================================== */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid var(--sidebar-border);
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: var(--sidebar-scrollbar-thumb);
    border-radius: 3px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-scrollbar-hover);
}

.tpp-form-textarea::-webkit-scrollbar {
    width: 6px;
}

.tpp-form-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.tpp-form-textarea::-webkit-scrollbar-thumb {
    background: var(--sidebar-scrollbar-thumb);
    border-radius: 3px;
}

.tpp-form-textarea::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-scrollbar-hover);
}

/* Global scrollbar styling */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--sidebar-scrollbar-thumb);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-scrollbar-hover);
}

.sidebar-menu {
    padding: 0 0 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border-radius: 0;
    font-weight: 500;
}

.menu-item .menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: var(--sidebar-icon-opacity);
    flex-shrink: 0;
}

.menu-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    color: var(--sidebar-text);
}

.menu-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.menu-item:hover i {
    color: var(--sidebar-text-hover);
}

.menu-item:hover .menu-icon {
    opacity: 0.9;
}

.menu-item.active {
    background: rgba(234, 112, 102, 0.15);
    color: var(--sidebar-active);
    border-left-color: var(--sidebar-active);
    font-weight: 600;
    box-shadow: inset 4px 0 0 0 var(--sidebar-active);
}

.menu-item.active i {
    color: var(--sidebar-active);
}

.menu-item.active .menu-icon {
    opacity: 1;
}

.menu-badge {
    margin-left: auto;
    background: var(--sidebar-active);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: normal;
}

/* Mobile Menu Toggle (Desktop: Hidden) */
.mobile-menu-toggle {
    display: none;
    width: 100%;
    padding: 16px 24px;
    background: var(--sidebar-bg);
    border: none;
    border-bottom: 1px solid var(--sidebar-border);
    color: var(--sidebar-text-hover);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    align-items: center;
    gap: 12px;
}

.mobile-menu-toggle:hover {
    background: var(--sidebar-hover);
}

.mobile-menu-toggle i {
    font-size: 18px;
    color: var(--sidebar-active);
}

/* ========================================
   Main Content Area
   ======================================== */
.dashboard-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
}

.dashboard-header {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dashboard-header .dashboard-back-link {
    width: 100%;
}

.dashboard-header .btn,
.dashboard-header > a:not(.dashboard-back-link) {
    margin-left: auto;
}

.dashboard-header > a:not(.dashboard-back-link) ~ a,
.dashboard-header > a:not(.dashboard-back-link) ~ .btn,
.dashboard-header .btn ~ .btn {
    margin-left: 5px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.dashboard-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 8px;
}

.dashboard-back-link:hover {
    color: var(--sidebar-active);
}

/* Section headings (replaces old .page-navigation-middle) */
.dashboard-content h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 30px 0 12px;
}

.dashboard-content h2:first-child {
    margin-top: 0;
}

/* Button containers */
.tpp-btn-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    margin-top: 15px;
}

.tpp-btn-left {
    margin-right: auto;
}

.tpp-btn-right {
    flex-grow: 1;
    text-align: right;
}

/* Fix for footer overlap */
footer {
    margin-left: var(--sidebar-width);
    width: auto;
}

footer.footer-full {
    margin-left: 0;
    width: 100%;
}

/* ========================================
   Navigation Cards (List Group Style)
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding-bottom: 0;
    margin-bottom: 40px;
}

.nav-card {
    background: transparent;
    border-radius: 0;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: none;
    text-decoration: none;
    transition: background 0.2s ease;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.nav-card:last-child {
    border-bottom: none;
}

.nav-card:hover {
    background: #eef0f2;
    transform: none;
    box-shadow: none;
}

.nav-card:hover .nav-card-arrow {
    opacity: 0.8;
}

.nav-card.nav-card-static {
    cursor: default;
}

.nav-card.nav-card-static:hover {
    background: transparent;
    border-color: var(--border-color);
}

.nav-card-icon-container {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-card-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-card-content {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.nav-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.nav-card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

.nav-card-arrow {
    width: 24px;
    height: 24px;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

/* ========================================
   Sortable / Drag-and-Drop
   ======================================== */
.sortable-list .drag-handle {
    cursor: grab;
    color: var(--text-muted);
    opacity: 0.3;
    font-size: 14px;
    padding: 4px;
    transition: opacity 0.2s ease;
}

.sortable-list .drag-handle:hover {
    opacity: 0.7;
}

.sortable-list .nav-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.sortable-list .ui-sortable-placeholder {
    visibility: visible !important;
    background: rgba(132, 190, 214, 0.1);
    border: 2px dashed #84bed6;
    border-radius: 8px;
    margin-bottom: 0;
    min-height: 50px;
}

.sortable-list .ui-sortable-helper {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--bg-card, #fff);
    border-radius: 8px;
}

/* ========================================
   Alert Items (Notification List)
   ======================================== */
.dashboard-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 30px;
    isolation: isolate;
}

.alert-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
}

.alert-item:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.alert-item:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    margin-bottom: 0;
}

.alert-item:hover {
    z-index: 2;
}

.alert-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.alert-item-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.alert-item-content {
    flex: 1;
}

.alert-item-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 1px;
}

.alert-item-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.alert-item-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    margin-left: 12px;
}

/* Alert: Critical (Red) */
.alert-item.alert-critical {
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

.alert-item.alert-critical .alert-item-title { color: #991B1B; }
.alert-item.alert-critical .alert-item-subtitle { color: #B91C1C; }
.alert-item.alert-critical .alert-item-icon { background: #FEE2E2; }
.alert-item.alert-critical:hover { background: #fee2e2; border-color: #F87171; }

/* Alert: Urgent (Orange/Amber) */
.alert-item.alert-urgent {
    background: #FFF7ED;
    border: 1px solid #FED7AA;
}

.alert-item.alert-urgent .alert-item-title { color: #9A3412; }
.alert-item.alert-urgent .alert-item-subtitle { color: #C2410C; }
.alert-item.alert-urgent .alert-item-icon { background: #FFEDD5; }
.alert-item.alert-urgent:hover { background: #ffedd5; border-color: #FB923C; }

/* Alert: Info (Blue) */
.alert-item.alert-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
}

.alert-item.alert-info .alert-item-title { color: #1E40AF; }
.alert-item.alert-info .alert-item-subtitle { color: #1D4ED8; }
.alert-item.alert-info .alert-item-icon { background: #DBEAFE; }
.alert-item.alert-info:hover { background: #dbeafe; border-color: #60A5FA; }

/* ========================================
   Section Heading
   ======================================== */
.dashboard-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 30px 0 6px;
    padding-bottom: 0;
    border-bottom: none;
}

.dashboard-heading:first-child {
    margin-top: 0;
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--bg-white);
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.green { background: linear-gradient(135deg, #52c41a 0%, #237804 100%); }
.stat-icon.yellow { background: linear-gradient(135deg, #faad14 0%, #d48806 100%); }
.stat-icon.red { background: linear-gradient(135deg, #f5222d 0%, #cf1322 100%); }

.stat-content { flex: 1; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========================================
   Section Cards
   ======================================== */
.dashboard-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.section-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-card.full-width {
    grid-column: 1 / -1;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes softPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

/* Utility */
.hidden {
    display: none !important;
}

/* ========================================
   Pagination
   ======================================== */
.tpp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
}

.tpp-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: color 0.2s;
}

.tpp-pagination-link:hover {
    color: #ea7066;
    text-decoration: none;
}

.tpp-pagination-link.active {
    background-color: #ea7066;
    color: #fff;
    border-radius: 6px;
    padding: 12px 26px;
}

.tpp-pagination-link.active:hover {
    background-color: #e85045;
    color: #fff;
}

.tpp-pagination-nav {
    background-color: #ea7066;
    color: #fff;
    border-radius: 6px;
    padding: 12px 26px;
}

.tpp-pagination-nav:hover {
    background-color: #e85045;
    color: #fff;
}

/* ========================================
   Footer
   ======================================== */
.dashboard-footer {
    padding: 20px 24px;
    text-align: left;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.dashboard-footer p {
    margin: 0;
}

.dashboard-footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

.dashboard-footer a:hover {
    color: var(--text-body);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: none;
    }

    .dashboard-content,
    footer {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        background: var(--sidebar-bg);
        border-bottom: none;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }

    .sidebar-menu.active {
        max-height: 1000px;
        padding: 0 0 20px 0;
        border-bottom: 1px solid var(--sidebar-border);
        transition: max-height 0.5s ease, padding 0.35s ease;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .menu-item {
        flex-direction: row;
        padding: 14px 24px;
        border-left: 3px solid transparent;
        border-bottom: none;
        white-space: normal;
    }

    .menu-item i {
        margin-right: 12px;
        margin-bottom: 0;
    }

    .menu-item.active {
        border-left-color: var(--sidebar-active);
        border-bottom-color: transparent;
    }

    .dashboard-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .dashboard-content {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header h1 {
        font-size: 24px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .dashboard-content,
    footer {
        margin-left: 0 !important;
    }

    .topbar {
        padding: 12px 16px;
    }
}

/* Empty State */
.tpp-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #999);
}

.tpp-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    color: var(--border-color, #ddd);
}

.tpp-empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    text-transform: uppercase;
    font-weight: bold;
}

/* ── Dark theme: native select dropdown options ── */
[data-theme="dark"] select option {
    background-color: #282828;
    color: var(--text-dark);
}

/* ── Dark theme: inline inputs & selects (inside tables, cards, etc.) ── */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="search"] {
    color: inherit;
}

[data-theme="dark"] select:not(.tpp-form-select) {
    color: inherit;
}

/* ========================================
   Select Optgroups (grouped dropdowns)
   ======================================== */
select optgroup {
    font-style: normal;
    font-weight: 600;
    font-size: 0.95em;
    color: #555;
    background: #fff;
}

select optgroup option {
    font-weight: 400;
    color: #333;
    background: #fff;
}

select optgroup[label*="Already"] {
    color: #999;
}

select optgroup[label*="Already"] option {
    color: #aaa;
}

[data-theme="dark"] select optgroup {
    color: #888;
    background: #2a2a3e;
}

[data-theme="dark"] select optgroup option {
    color: #ccc;
    background: #2a2a3e;
}

[data-theme="dark"] select optgroup[label*="Already"] {
    color: #666;
}

[data-theme="dark"] select optgroup[label*="Already"] option {
    color: #777;
}

/* ========================================
   Allocation / Data Tables
   ======================================== */
.alloc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.alloc-table th,
.alloc-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.alloc-table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-muted, #888);
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.alloc-table tbody tr:hover {
    background: var(--bg-light, #f9f9f9);
}

[data-theme="dark"] .alloc-table tbody tr:hover {
    background: #2a2a2a;
}

/* Additional teachers dropdown */
.addl-dropdown-menu {
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--text-body, #333);
}

.addl-dropdown-item {
    color: var(--text-body, #333);
}

.addl-dropdown-item:hover {
    background: var(--bg-light, #f5f5f5);
}

[data-theme="dark"] .addl-dropdown-menu {
    background: #2a2a2a;
    border-color: #444;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"] .addl-dropdown-item {
    color: var(--text-body);
}

[data-theme="dark"] .addl-dropdown-item:hover {
    background: #333;
}

/* Inline table editing - inputs and selects inside table rows */
.inline-input, .inline-select {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    background: transparent;
    color: inherit;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease;
}
.inline-input:focus, .inline-select:focus {
    border-color: #84bed6;
}
tr:hover .inline-input,
tr:hover .inline-select {
    border-color: #84bed6;
}
.inline-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

/* CSV Import Preview Modal - used across timetable setup pages */
.csv-preview-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.csv-preview-modal {
    background: var(--bg-card, #fff);
    border-radius: 12px;
    padding: 25px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.csv-preview-modal h3 {
    margin-top: 0;
}
.csv-preview-modal p {
    font-size: 13px;
    color: var(--text-muted, #666);
}
.csv-preview-list {
    max-height: 50vh;
    overflow-y: auto;
}
.csv-preview-modal table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}
.csv-preview-modal table th {
    text-align: left;
    font-weight: 600;
    padding: 5px;
    border-bottom: 1px solid var(--border-color, #ddd);
}
.csv-preview-modal table td {
    padding: 5px;
    border-bottom: 1px solid var(--border-color, #eee);
}
[data-theme="dark"] .csv-preview-modal {
    background: #2a2a2a;
    color: var(--text-body);
}
[data-theme="dark"] .csv-preview-modal table th {
    border-bottom-color: #444;
}
[data-theme="dark"] .csv-preview-modal table td {
    border-bottom-color: #333;
}

/* Progress bar dark mode */
[data-theme="dark"] .progress {
    background-color: #333;
}

/* Table dark mode */
[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-body);
    --bs-table-border-color: #333;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-striped-color: var(--text-body);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
    --bs-table-hover-color: var(--text-body);
    color: var(--text-body);
}
[data-theme="dark"] .table th {
    color: var(--text-muted);
    border-color: #444;
}
[data-theme="dark"] .table td {
    border-color: #333;
}
[data-theme="dark"] .table-success {
    --bs-table-bg: rgba(181, 213, 106, 0.15) !important;
    --bs-table-color: var(--text-body) !important;
    --bs-table-striped-bg: rgba(181, 213, 106, 0.2) !important;
    --bs-table-striped-color: var(--text-body) !important;
    --bs-table-accent-bg: transparent !important;
    color: var(--text-body) !important;
}
[data-theme="dark"] .table-success > * {
    background-color: rgba(181, 213, 106, 0.15) !important;
    color: var(--text-body) !important;
    box-shadow: none !important;
}

/* ============================================================
   TIMETABLE GRID
   ============================================================ */

/* View switcher tabs */
.tt-view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.tt-view-tab {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-body);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.tt-view-tab:hover {
    background: #84bed6;
    color: #fff;
    border-color: #84bed6;
}
.tt-view-tab.active {
    background: #84bed6;
    color: #fff;
    border-color: #84bed6;
}

/* Year group / class tabs */
.tt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.tt-tab {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-white);
    color: var(--text-body);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}
.tt-tab:hover {
    background: #e9ecef;
}
.tt-tab.active {
    background: #84bed6;
    color: #fff;
    border-color: #84bed6;
}
[data-theme="dark"] .tt-tab:hover {
    background: #333;
}

/* Timetable grid table */
.tt-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.tt-grid th {
    padding: 8px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--bg-white);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.tt-grid td {
    padding: 0;
    border: 1px solid var(--border-color);
    vertical-align: top;
    height: 60px;
}
.tt-period {
    width: 10%;
    padding: 8px 6px !important;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-white);
    vertical-align: middle !important;
}
.tt-period-time {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Lesson cell */
.tt-cell {
    padding: 4px 6px !important;
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 56px;
}
.tt-cell-subject {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.2;
}
.tt-cell-detail {
    font-size: 0.7rem;
    opacity: 0.85;
    line-height: 1.2;
}
.tt-cell-room {
    font-size: 0.65rem;
    opacity: 0.7;
    line-height: 1.2;
}

/* Free / blocked cells */
.tt-cell-free {
    background: #f8f9fa !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}
.tt-cell-blocked {
    background: #e9ecef !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}
[data-theme="dark"] .tt-cell-free {
    background: #1a1a2e !important;
}
[data-theme="dark"] .tt-cell-blocked {
    background: #252540 !important;
}

/* Set lesson cells */
.tt-cell-set {
    background: #e2e2e2;
    color: #333;
    padding: 4px 6px !important;
    border-radius: 0;
}
.tt-set-row {
    font-size: 10px;
    line-height: 1.4;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-theme="dark"] .tt-cell-set {
    background: #3a3a3a;
    color: #ccc;
}

/* Legend */
.tt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
}
.tt-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-body);
}
.tt-legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Info bar */
.tt-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-body);
}
.tt-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tt-info-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Dark mode adjustments */
[data-theme="dark"] .tt-grid th {
    background: #1e1e2e;
    border-color: #333;
}
[data-theme="dark"] .tt-grid td {
    border-color: #333;
}
[data-theme="dark"] .tt-period {
    background: #1e1e2e;
}
[data-theme="dark"] .tt-info-bar {
    background: #1e1e2e;
    border-color: #333;
}

/* ===== TIMETABLE REPORTS ===== */
.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}
.report-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.report-tab:hover {
    color: var(--text-body);
}
.report-tab.active {
    color: #84bed6;
    border-bottom-color: #84bed6;
    font-weight: 600;
}
.report-panel {
    display: none;
}
.report-panel.active {
    display: block;
}

/* Stats grid */
.report-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.report-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.report-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-body);
}
.report-stat-value.text-success { color: #b5d56a; }
.report-stat-value.text-danger { color: #ea7066; }
.report-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}
.report-stat-detail {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Report table */
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.report-table thead th {
    background: var(--bg-light);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}
.report-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.report-table tbody tr:last-child td {
    border-bottom: none;
}
.report-table tbody tr:hover {
    background: var(--bg-light);
}

/* Utilisation bar */
.report-bar-container {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    width: 120px;
    vertical-align: middle;
}
.report-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.report-bar-ok { background: #b5d56a; }
.report-bar-warn { background: #f0c24b; }
.report-bar-danger { background: #ea7066; }
.report-bar-low { background: #84bed6; }
.report-bar-label {
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

/* Badges */
.report-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.report-badge-info { background: #e0f2fe; color: #0369a1; }
.report-badge-secondary { background: #f1f5f9; color: #475569; }

/* Status indicators */
.report-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.report-status-ok { background: #ecfccb; color: #3f6212; }
.report-status-warn { background: #fef2f2; color: #991b1b; }
.report-status-info { background: #e0f2fe; color: #0369a1; }

/* Subject list in teacher util */
.report-subjects {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark mode */
[data-theme="dark"] .report-stat-card {
    background: #1e1e2e;
    border-color: #333;
}
[data-theme="dark"] .report-table {
    background: #1e1e2e;
    border-color: #333;
}
[data-theme="dark"] .report-table thead th {
    background: #2a2a3a;
    border-color: #333;
}
[data-theme="dark"] .report-table tbody td {
    border-color: #333;
}
[data-theme="dark"] .report-table tbody tr:hover {
    background: #2a2a3a;
}
[data-theme="dark"] .report-badge-info { background: #1e3a5f; color: #7dd3fc; }
[data-theme="dark"] .report-badge-secondary { background: #334155; color: #94a3b8; }
[data-theme="dark"] .report-status-ok { background: #1a2e05; color: #a3e635; }
[data-theme="dark"] .report-status-warn { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .report-status-info { background: #1e3a5f; color: #7dd3fc; }
[data-theme="dark"] .report-bar-container { background: #333; }

/* ===============================================
   Wizard Progress & Navigation (shared)
   =============================================== */

.wizard-progress {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	padding: 20px 0;
	position: relative;
	z-index: 0;
}

.wizard-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	position: relative;
	text-decoration: none;
	cursor: pointer;
}

.wizard-step-number {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--bg-light, #e9ecef);
	border: 2px solid var(--border-color, #dee2e6);
	color: var(--text-muted, #6c757d);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	margin-bottom: 8px;
	z-index: 2;
	position: relative;
	transition: background 0.2s;
}

.wizard-step:hover .wizard-step-number {
	background: #d6dade;
}

.wizard-step.active .wizard-step-number {
	background: #84bed6;
	border-color: #84bed6;
	color: white;
}

.wizard-step.active:hover .wizard-step-number {
	background: #6fa8bf;
}

.wizard-step.completed .wizard-step-number {
	background: #28a745;
	border-color: #28a745;
	color: white;
}

.wizard-step.completed:hover .wizard-step-number {
	background: #218838;
}

.wizard-step.accessible .wizard-step-number {
	background: #84bed6;
	border-color: #84bed6;
	color: white;
}

.wizard-step.accessible:hover .wizard-step-number {
	background: #6fa8bf;
}

.wizard-step-label {
	font-size: 13px;
	color: var(--text-muted, #6c757d);
	text-align: center;
	font-weight: 500;
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wizard-step.active .wizard-step-label {
	color: #84bed6;
	font-weight: bold;
}

.wizard-step.completed .wizard-step-label {
	color: #28a745;
}

.wizard-step.accessible .wizard-step-label {
	color: #84bed6;
}

.wizard-step-connector {
	position: absolute;
	top: 20px;
	left: 50%;
	width: 100%;
	height: 2px;
	background: var(--bg-light, #e9ecef);
	z-index: 1;
}

.wizard-step.completed .wizard-step-connector {
	background: #28a745;
}

.wizard-step:last-child .wizard-step-connector {
	display: none;
}

.wizard-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
	margin-bottom: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--border-color, #dee2e6);
}

.wizard-nav-left {
	flex: 1;
}

.wizard-nav-right {
	flex: 1;
	text-align: right;
}

/* Dark theme overrides for wizard */
[data-theme="dark"] .wizard-step:hover .wizard-step-number {
	background: #4a4a5a;
}
[data-theme="dark"] .wizard-step-connector {
	background: #444;
}

/* ========================================
   Threaded Comments / Posts
   ======================================== */

/* Post/Comment containers */
.post-container,
.comment-card,
.message-container {
    padding: 10px;
    width: 100%;
    min-height: 80px;
    background-color: var(--bg-white, #FFFFFF);
    border-radius: 5px;
    border-top: 1px solid var(--border-color, #c2c2c2);
    border-right: 1px solid var(--border-color, #c2c2c2);
    border-bottom: 1px solid var(--border-color, #c2c2c2);
    margin-bottom: 0;
}

.post-container-highlight {
    padding: 10px;
    width: 100%;
    min-height: 80px;
    background-color: var(--bg-white, #FFFFFF);
    border-radius: 5px;
    border-left: 5px solid #F9E57C;
    border-top: 2px solid #F9E57C;
    border-right: 2px solid #F9E57C;
    border-bottom: 2px solid #F9E57C;
    margin-bottom: 0;
}

/* Border accent classes */
.left-red { border-left: 5px solid #EA7066; }
.left-blue { border-left: 5px solid #84BED6; }
.left-yellow { border-left: 5px solid #F9E57C; }
.left-grey {
    border-left: 5px solid var(--border-color, #c2c2c2);
    background-color: var(--bg-light, #EEEEEE);
    min-height: 0;
}

/* Post/Comment header */
.post-details-container,
.comment-header {
    display: flex;
    align-items: center;
}

.post-avatar,
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Comments / Discussion */
.comment-item {
    display: flex;
    gap: 10px;
}

.comment-meta {
    color: var(--text-muted, #666);
}

.comment-delete {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.post-details,
.comment-details {
    margin: 0;
    flex-grow: 1;
}

.post-creator,
.comment-author {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-dark, inherit);
}

.post-date,
.comment-date {
    color: var(--text-muted, #c2c2c2);
    font-size: 12px;
}

/* Action buttons */
.post-actions,
.comment-actions {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 8px;
}

.comment-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--bg-light, #f3f4f6);
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 13px;
}

.comment-action-btn:hover {
    background: var(--border-color, #e5e7eb);
    color: var(--text-dark, #333);
}

/* Dividers */
.post-hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--border-color, #EEEEEE);
    margin-top: 5px;
}

.comment-hr {
    border: 0;
    border-top: 1px solid var(--border-color, #EEEEEE);
    margin: 8px 0;
}

/* Connectors */
.connector {
    width: 50%;
    text-align: center;
    min-height: 8px;
    max-height: 8px;
    margin: 0;
    border-right: 2px solid var(--border-color, #c2c2c2);
}

.comment-connector {
    width: 0;
    height: 20px;
    border-right: 2px solid var(--border-color, #c2c2c2);
    margin: 0 auto;
}

/* Post/Comment body */
.post-body,
.comment-body {
    padding: 5px 0;
    min-height: 50px;
    overflow: hidden;
    color: var(--text-body, inherit);
    overflow-wrap: break-word;
    word-break: break-word;
}

.comment-body {
    font-size: 0.95rem;
    line-height: 1.6;
}

.opacity {
    opacity: 0.5;
}

/* Quote UI */
.comment-quote {
    background: var(--bg-light, #f8f9fa);
    border-left: 5px solid #EA7066;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 0 4px 4px 0;
}

.comment-quote.quote-blue {
    border-left-color: #84BED6;
}

.comment-quote.quote-purple {
    border-left-color: #6f42c1;
}

.comment-quote-header {
    font-size: 0.8rem;
    color: var(--text-muted, #6c757d);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scroll-to-quote {
    cursor: pointer;
}

.comment-quote-goto {
    flex-shrink: 0;
}

.quote-highlight {
    background-color: rgba(249, 229, 124, 0.25) !important;
    transition: background-color 0.3s ease;
}

.comment-quote-body {
    font-size: 0.9rem;
    color: var(--text-muted, #555);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.8em;
}


/* Comment attachments */
.comment-attachments {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #e9ecef);
}

.comment-attachment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-light, #f8f9fa);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-dark, #333);
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.comment-attachment:hover {
    background: var(--border-color, #e9ecef);
    text-decoration: none;
    color: var(--text-dark, #333);
}

.comment-attachment img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    background: #fff;
}

/* Form drag/drop */
.form-container {
    border: 2px dashed transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.form-container.dragOver {
    border-color: #84BED6;
    background-color: rgba(132, 190, 214, 0.05);
}

.form-container.dragOut {
    border-color: transparent;
}

/* Delete confirmation */
.post-delete-confirm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.post-delete-confirm {
    font-weight: bold;
    color: var(--text-dark, #000000);
    font-size: 12px;
    margin-bottom: 5px;
}

.post-delete-button {
    cursor: pointer;
    border: 1px solid var(--border-color, #c2c2c2);
    border-radius: 5px;
    font-weight: bold;
    font-size: 10px;
    padding: 5px 8px;
    color: var(--text-muted, #8F8F8F);
    background-color: var(--bg-white, #FCFCFC);
}

.post-delete-button:hover {
    border: 1px solid #84BED6;
}

/* Edit actions */
.edit-post-actions {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: end;
}

/* Fixed quote placeholder */
#fixed-quote-placeholder {
    margin-bottom: 15px;
}

#fixed-quote-placeholder #fixed-quote {
    margin-bottom: 0;
}

/* Upload file list (shared across messages, forums, support) */
.upload-file-list {
    margin-top: 10px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-light, #e9ecef);
    border: 1px solid var(--border-color, #ccc);
    border-radius: 4px;
    margin-bottom: 5px;
    position: relative;
}

.upload-file-item .file-thumbnail {
    flex-shrink: 0;
}

.upload-file-item .file-thumbnail img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.upload-file-item .file-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-light, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted, #6c757d);
}

.upload-file-item .file-info {
    flex: 1;
    min-width: 0;
}

.upload-file-item .file-name {
    font-weight: 500;
    color: var(--text-dark, #495057);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-file-item .file-size {
    font-size: 0.875rem;
    color: var(--text-muted, #6c757d);
}

.upload-file-item .remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
}

/* ==================== Body Map ==================== */
#body-map-container {
	position: relative;
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

#body-map-canvas-wrapper {
	position: relative;
	flex: 0 0 auto;
	width: 450px;
	user-select: none;
}

.body-map-view {
	position: relative;
	cursor: crosshair;
}

.body-map-view img {
	width: 100%;
	height: auto;
	display: block;
}

.body-map-markers {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.body-map-marker {
	position: absolute;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid white;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	transform: translate(-50%, -50%);
	pointer-events: auto;
	cursor: grab;
	z-index: 2;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.body-map-marker:hover {
	transform: translate(-50%, -50%) scale(1.3);
}

.body-map-marker:active {
	cursor: grabbing;
}

.body-map-marker.active {
	transform: translate(-50%, -50%) scale(1.3);
	box-shadow: 0 0 0 4px rgba(132, 190, 214, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3);
}

#body-map-popup {
	flex: 1;
	min-width: 0;
	background: var(--bg-white, white);
	border: 1px solid var(--border-color, #e9ecef);
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.body-map-popup-title {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 12px;
	color: var(--text-dark, #333);
}

.body-map-type-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	margin-bottom: 12px;
}

.body-map-type-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 1px solid var(--border-color, #dee2e6);
	border-radius: 8px;
	background: var(--bg-light, #f8f9fa);
	cursor: pointer;
	font-size: 0.85rem;
	color: var(--text-dark, #333);
	transition: all 0.15s ease;
}

.body-map-type-btn:hover {
	border-color: #84BED6;
}

.body-map-type-btn.selected {
	border-color: #84BED6;
	background: rgba(132, 190, 214, 0.15);
	font-weight: 600;
}

.body-map-type-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}

.body-map-popup-desc {
	margin-bottom: 12px;
}

.body-map-popup-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.body-map-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: 0.85rem;
	color: var(--text-dark, #333);
	border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.body-map-legend-item:last-child {
	border-bottom: none;
}

/* Body Map - view layout (canvas left, legend right) */
.body-map-view-layout {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.body-map-view-layout canvas {
	flex: 0 0 450px;
	max-width: 450px;
}

.body-map-view-legend {
	flex: 1;
	min-width: 0;
}

/* Body Map - read-only mode */
.body-map-readonly .body-map-view {
	cursor: default;
}

.body-map-readonly .body-map-marker {
	cursor: default;
	pointer-events: none;
}

/* Body Map - dark theme */
[data-theme="dark"] #body-map-popup {
	background: var(--bg-white);
	border-color: var(--border-color);
}

[data-theme="dark"] .body-map-type-btn {
	background: var(--bg-light);
	border-color: var(--border-color);
	color: var(--text-dark);
}

[data-theme="dark"] .body-map-marker {
	border-color: #333;
}

[data-theme="dark"] .body-map-view img {
	filter: invert(0.85) hue-rotate(180deg);
}

/* Body Map - mobile */
@media (max-width: 768px) {
	#body-map-container {
		flex-direction: column;
	}

	#body-map-canvas-wrapper {
		width: 100%;
	}

	.body-map-view-layout {
		flex-direction: column;
	}

	.body-map-view-layout canvas {
		flex: none;
		max-width: 100%;
	}

	.body-map-type-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 480px) {
	.body-map-type-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Body Map - print */
@media print {
	#body-map-popup {
		display: none !important;
	}

	.body-map-marker {
		border: 2px solid #333;
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}

	.body-map-type-dot {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
}

/* ========================================
   Pill Selector (multi-select toggle pills)
   ======================================== */
.pill-container {
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-white, white);
    border-radius: 8px;
    border: 1px solid var(--border-color, #ddd);
}

.pill-description {
    color: var(--text-muted, #666);
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 500;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.pill {
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    background-color: var(--bg-light, #E9ECEF);
    color: var(--text-dark, #333);
    border: 1px solid var(--border-color, #ddd);
}

.pill.selected {
    background-color: #EA7066;
    color: white;
    border-color: #EA7066;
}

.pill:hover {
    opacity: 0.9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pill-row:last-child {
    margin-bottom: 0;
}

/* ========================================
   Duration Stepper (+/- number input)
   ======================================== */
.duration-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 5px;
    overflow: hidden;
}

.duration-stepper-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-light, #f0f0f0);
    color: var(--text-dark, #333);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    user-select: none;
}

.duration-stepper-btn:hover {
    background: #84bed6;
    color: white;
}

.duration-stepper-btn:active {
    background: #84bed6;
    color: white;
}

.duration-stepper-value {
    min-width: 60px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark, #333);
    background: var(--bg-white, white);
    border-left: 1px solid var(--border-color, #ddd);
    border-right: 1px solid var(--border-color, #ddd);
}

/* Compact stepper (+/- with editable input) */
.stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 5px;
    overflow: hidden;
}
.stepper-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bg-light, #f0f0f0);
    color: var(--text-dark, #333);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    user-select: none;
    padding: 0;
}
.stepper-btn:hover {
    background: #84bed6;
    color: white;
}
.stepper-input {
    width: 45px;
    height: 30px;
    border: none;
    border-left: 1px solid var(--border-color, #ddd);
    border-right: 1px solid var(--border-color, #ddd);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark, #333);
    background: var(--bg-white, #fff);
    -moz-appearance: textfield;
    padding: 0;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.stepper-input:focus {
    outline: none;
    background: #e3f2fd;
    color: #333;
}

[data-theme="dark"] .stepper-input:focus {
    background: #2a3a4a;
    color: #e8e8e8;
}

/* Toggle row - inline label + switch (mobile-first settings style) */
.tpp-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color, #eee);
    gap: 12px;
}

.tpp-toggle-row:last-of-type {
    border-bottom: none;
}

.tpp-toggle-row label {
    flex: 1;
    margin: 0;
    color: var(--text-body, #555);
    font-size: 0.95em;
    line-height: 1.4;
    cursor: pointer;
}

.tpp-toggle-row .form-check-input {
    flex-shrink: 0;
}

/* Severity / status badge */
.tpp-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.8em;
    font-weight: 600;
}

/* List item rows with bottom border */
.tpp-list-item {
    border-bottom: 1px solid var(--border-color, #eee);
    padding: 12px 0;
}

.tpp-list-item:last-child {
    border-bottom: none;
}

.tpp-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpp-list-item-details {
    margin-top: 6px;
    font-size: 0.9em;
    color: var(--text-muted, #666);
}

/* Collapsible add/edit form panel */
.tpp-add-form {
    display: none;
    margin-top: 15px;
    padding: 15px;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--radius-md, 8px);
    background: var(--bg-light, #f8f9fa);
}

[data-theme="dark"] .tpp-add-form {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* ===============================================
   Flatpickr - Dark Mode (global)
   =============================================== */

/* Calendar container */
[data-theme="dark"] .flatpickr-calendar {
	background: #2a2a2a;
	border-color: #444;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Time picker */
[data-theme="dark"] .flatpickr-time {
	border-top-color: #444;
	background: #2a2a2a;
}

[data-theme="dark"] .flatpickr-time input,
[data-theme="dark"] .flatpickr-time .flatpickr-am-pm {
	color: #e0e0e0;
	background: #2a2a2a;
}

[data-theme="dark"] .flatpickr-time input:hover,
[data-theme="dark"] .flatpickr-time input:focus {
	background: #3a3a3a;
}

[data-theme="dark"] .flatpickr-time .numInputWrapper {
	background: #2a2a2a;
}

[data-theme="dark"] .flatpickr-time .numInputWrapper:hover {
	background: #3a3a3a;
}

[data-theme="dark"] .flatpickr-time .numInputWrapper span.arrowUp:after {
	border-bottom-color: #ccc;
}

[data-theme="dark"] .flatpickr-time .numInputWrapper span.arrowDown:after {
	border-top-color: #ccc;
}

[data-theme="dark"] .flatpickr-time .flatpickr-time-separator {
	color: #e0e0e0;
	background: #2a2a2a;
}

/* Month/year header */
[data-theme="dark"] .flatpickr-months {
	background: #2a2a2a;
}

[data-theme="dark"] .flatpickr-months .flatpickr-month {
	background: #2a2a2a;
	color: #e0e0e0;
}

[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months {
	background: #2a2a2a;
	color: #e0e0e0;
}

[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months option {
	background: #2a2a2a;
	color: #e0e0e0;
}

[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months option:hover,
[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months option:checked {
	background: #3a3a3a;
}

[data-theme="dark"] .flatpickr-current-month input.cur-year {
	color: #e0e0e0;
}

[data-theme="dark"] .flatpickr-current-month .numInputWrapper {
	background: transparent;
}

[data-theme="dark"] .flatpickr-current-month .numInputWrapper:hover {
	background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .flatpickr-current-month .numInputWrapper span.arrowUp:after {
	border-bottom-color: #ccc;
}

[data-theme="dark"] .flatpickr-current-month .numInputWrapper span.arrowDown:after {
	border-top-color: #ccc;
}

/* Prev/next month arrows */
[data-theme="dark"] .flatpickr-months .flatpickr-prev-month,
[data-theme="dark"] .flatpickr-months .flatpickr-next-month {
	color: #e0e0e0;
	fill: #e0e0e0;
}

[data-theme="dark"] .flatpickr-months .flatpickr-prev-month:hover,
[data-theme="dark"] .flatpickr-months .flatpickr-next-month:hover {
	color: #fff;
	fill: #fff;
}

[data-theme="dark"] .flatpickr-months .flatpickr-prev-month svg,
[data-theme="dark"] .flatpickr-months .flatpickr-next-month svg {
	fill: #e0e0e0;
}

[data-theme="dark"] .flatpickr-months .flatpickr-prev-month:hover svg,
[data-theme="dark"] .flatpickr-months .flatpickr-next-month:hover svg {
	fill: #fff;
}

/* Weekday headers */
[data-theme="dark"] span.flatpickr-weekday {
	background: #2a2a2a;
	color: #999;
}

[data-theme="dark"] .flatpickr-weekdays {
	background: #2a2a2a;
}

/* Day cells */
[data-theme="dark"] .flatpickr-day {
	color: #e0e0e0;
	border-color: transparent;
}

[data-theme="dark"] .flatpickr-day:hover {
	background: #3a3a3a;
	border-color: #3a3a3a;
}

[data-theme="dark"] .flatpickr-day.selected {
	background: #ea7066;
	border-color: #ea7066;
	color: #fff;
}

[data-theme="dark"] .flatpickr-day.selected:hover {
	background: #d45f55;
	border-color: #d45f55;
}

[data-theme="dark"] .flatpickr-day.today {
	border-color: #ea7066;
}

[data-theme="dark"] .flatpickr-day.today:hover {
	background: #ea7066;
	border-color: #ea7066;
	color: #fff;
}

[data-theme="dark"] .flatpickr-day.flatpickr-disabled,
[data-theme="dark"] .flatpickr-day.flatpickr-disabled:hover {
	color: #3a3a3a;
	background: transparent !important;
	border-color: transparent !important;
	cursor: default !important;
}

[data-theme="dark"] .flatpickr-day.prevMonthDay,
[data-theme="dark"] .flatpickr-day.nextMonthDay {
	color: #3a3a3a;
}

[data-theme="dark"] .flatpickr-day.prevMonthDay:not(.selected):not(.flatpickr-disabled):hover,
[data-theme="dark"] .flatpickr-day.nextMonthDay:not(.selected):not(.flatpickr-disabled):hover {
	color: #999 !important;
	background: #3a3a3a !important;
	border-color: #3a3a3a !important;
}

/* Red X on disabled/past dates */
.flatpickr-day.flatpickr-disabled {
	position: relative;
}

.flatpickr-day.flatpickr-disabled::after {
	content: '×';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 28px;
	font-weight: bold;
	color: rgba(234, 112, 102, 0.6);
	pointer-events: none;
}

[data-theme="dark"] .flatpickr-day.flatpickr-disabled::after {
	color: rgba(234, 112, 102, 0.5);
}

/* Inner containers */
[data-theme="dark"] .flatpickr-innerContainer {
	background: #2a2a2a;
	border-bottom-color: #444;
}

[data-theme="dark"] .flatpickr-rContainer {
	background: #2a2a2a;
}

[data-theme="dark"] .flatpickr-days {
	border-color: #444;
}

/* Selected date colour override (both themes) */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
	background: #ea7066 !important;
	border-color: #ea7066 !important;
	color: #fff !important;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay:hover,
.flatpickr-day.selected.nextMonthDay:hover {
	background: #d45f55 !important;
	border-color: #d45f55 !important;
	color: #fff !important;
}

.flatpickr-day.today {
	border-color: #ea7066 !important;
}

.flatpickr-day.today:hover {
	background: #ea7066 !important;
	border-color: #ea7066 !important;
	color: #fff !important;
}

/* Light mode: improve disabled/other-month date visibility */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
	color: #bbb !important;
	background: transparent !important;
	border-color: transparent !important;
	cursor: default !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
	color: #bbb !important;
}

.flatpickr-day.prevMonthDay:not(.selected):not(.flatpickr-disabled):hover,
.flatpickr-day.nextMonthDay:not(.selected):not(.flatpickr-disabled):hover {
	color: #999 !important;
	background: #f0f0f0 !important;
	border-color: #f0f0f0 !important;
}

/* Inline calendar sizing */
.flatpickr-calendar.inline {
	max-width: 380px;
	margin: 0 auto;
}

/* ========================================
   Parents Evening - Date Pills (Global)
   ======================================== */

/* Date Pills Container */
.date-selector-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	padding: 10px;
}

.pe-dates-container {
	padding: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 1px dashed var(--border-color, #c2c2c2);
	margin-bottom: 20px;
}

/* Date Pill Card */
.pe-date-pill {
	background: var(--bg-white, white);
	border-radius: 8px;
	width: 90px;
	height: 90px;
	display: inline-flex;
	flex-direction: column;
	justify-content: space-between;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	overflow: hidden;
	margin: 0;
	position: relative;
}

.pe-date-pill:hover {
	box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px 0px 0px inset;
}

.pe-date-selected {
	box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px 0px 0px inset;
}

.pe-date-day {
	background-color: #ea7066;
	color: white;
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
	padding: 5px;
}

.pe-date-num {
	font-size: 24px;
	font-weight: bold;
	color: var(--text-dark, #333);
	padding: 5px 5px 3px 5px;
	line-height: 1;
}

.pe-date-month {
	font-size: 11px;
	font-weight: bold;
	color: var(--text-muted, #666);
	text-transform: uppercase;
	padding: 3px 5px 10px 5px;
}

/* Date Pill Remove Button */
.pe-date-remove {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
}

.pe-date-remove:hover {
	transform: scale(1.15);
}

.pe-date-remove .remove-icon {
	width: 22px;
	height: 22px;
	display: block;
}

/* ========================================
   VOICE NOTE PLAYER
========================================= */
.voice-note-player {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	background: rgba(132, 190, 214, 0.08);
	border: 1px solid rgba(132, 190, 214, 0.15);
	border-radius: 8px;
}

.voice-note-player .play-btn {
	width: 32px;
	height: 32px;
	min-width: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #84BED6;
	color: white;
	border: none;
	cursor: pointer;
	font-size: 12px;
}

.voice-note-player .play-btn:hover {
	background: #6babc7;
}

.voice-note-player .skip-btn {
	width: 24px;
	height: 24px;
	min-width: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: #84BED6;
	border: 1px solid #84BED6;
	cursor: pointer;
	font-size: 10px;
}

.voice-note-player .skip-btn:hover {
	background: var(--bg-light, #f0f7fa);
	color: #6babc7;
	border-color: #6babc7;
}

[data-theme="dark"] .voice-note-player .skip-btn:hover {
	background: rgba(132, 190, 214, 0.15);
	color: #9dd0e6;
	border-color: #9dd0e6;
}

.voice-note-player .voice-progress-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.voice-note-player .voice-progress-bar {
	width: 100%;
	height: 6px;
	background: var(--border-color, #d1e7f0);
	border-radius: 3px;
	cursor: pointer;
	position: relative;
}

.voice-note-player .voice-progress-bar .voice-progress {
	height: 100%;
	background: #84BED6;
	border-radius: 3px;
	width: 0%;
	position: relative;
	transition: none;
}

.voice-note-player .voice-progress-bar .voice-progress::after {
	content: '';
	position: absolute;
	right: -6px;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 12px;
	background: #84BED6;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	cursor: grab;
}

.voice-note-player .voice-time {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--text-muted, #6c757d);
}

/* ========================================
   OBSERVATION PANEL (Learning Walks)
   Voice recorder + text notes + unified list
========================================= */

/* Recorder button (medium size for panels) */
.lw-record-btn {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 3px solid #84BED6;
	background: var(--bg-white, white);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	margin: 0 auto;
}

.lw-record-btn:hover {
	background: var(--bg-light, #f0f0f0);
}

.lw-record-btn[data-state="recording"] {
	border-color: #dc3545;
	animation: lw-pulse 1.5s infinite;
}

.lw-record-btn i {
	font-size: 24px;
	color: #84BED6;
}

.lw-record-btn[data-state="recording"] i {
	color: #dc3545;
}

@keyframes lw-pulse {
	0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
	70% { box-shadow: 0 0 0 12px rgba(220, 53, 69, 0); }
	100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.lw-recording-timer {
	font-size: 20px;
	font-weight: bold;
	text-align: center;
	margin-top: 10px;
	font-family: monospace;
	color: var(--text-dark, #333);
}

.lw-recording-status {
	text-align: center;
	color: var(--text-muted, #666);
	margin-top: 6px;
	font-size: 13px;
}

/* Observation item (recording or text note) */
.lw-recording-item {
	margin-top: 12px;
}

/* Delete button for observation items */
.lw-obs-delete {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-muted, #999);
	font-size: 14px;
	padding: 4px;
	transition: color 0.2s;
	flex-shrink: 0;
	align-self: flex-start;
	margin-top: 2px;
}

.lw-obs-delete:hover {
	color: #ea7066;
}

/* =========================================
   MODAL / ALERT SYSTEM (v2)
========================================= */
.tpp-modal-v2 {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tpp-modal-v2.hidden {
	display: none;
}
.tpp-modal-v2-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.tpp-modal-v2-container {
	position: relative;
	z-index: 1;
	width: calc(100% - 32px);
	max-width: 420px;
}
.tpp-modal-v2-content {
	background: var(--bg-white, #ffffff);
	border-radius: var(--radius-lg, 16px);
	padding: 28px 24px 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
	animation: tpp-modal-v2-in 0.2s ease-out;
}
@keyframes tpp-modal-v2-in {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}
.tpp-modal-v2-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-dark, #1a1a1a);
	margin: 0 0 8px 0;
	text-align: center;
}
.tpp-modal-v2-message {
	font-size: 0.9rem;
	color: var(--text-muted, #666);
	margin: 0 0 20px 0;
	text-align: center;
	line-height: 1.5;
}
.tpp-modal-v2-input {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--border-color, #e0e0e0);
	border-radius: var(--radius-md, 10px);
	font-size: 0.9rem;
	color: var(--text-dark, #333);
	background: var(--bg-white, #fff);
	margin-bottom: 20px;
	outline: none;
	transition: border-color 0.15s;
	box-sizing: border-box;
}
.tpp-modal-v2-input:focus {
	border-color: #84bed6;
	box-shadow: 0 0 0 3px rgba(132, 190, 214, 0.15);
}
.tpp-modal-v2-input.is-invalid {
	border-color: #ea7066;
	box-shadow: 0 0 0 3px rgba(234, 112, 102, 0.15);
}
.tpp-modal-v2-actions {
	display: flex;
	gap: 10px;
}
.tpp-modal-v2-actions-split {
	justify-content: stretch;
}
.tpp-modal-v2-btn {
	flex: 1;
	padding: 10px 20px;
	border: none;
	border-radius: var(--radius-md, 10px);
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: all 0.15s;
}
.tpp-modal-v2-btn-primary {
	background: #84bed6;
	color: #fff;
}
.tpp-modal-v2-btn-primary:hover {
	background: #6fafc9;
	box-shadow: 0 2px 8px rgba(132, 190, 214, 0.4);
}
.tpp-modal-v2-btn-secondary {
	background: var(--bg-light, #f5f5f5);
	color: var(--text-muted, #666);
}
.tpp-modal-v2-btn-secondary:hover {
	background: var(--bg-hover, #eee);
}
.tpp-modal-v2-btn-danger {
	background: #ea7066;
	color: #fff;
}
.tpp-modal-v2-btn-danger:hover {
	background: #d9564b;
	box-shadow: 0 2px 8px rgba(234, 112, 102, 0.4);
}

/* Dark theme overrides */
[data-theme="dark"] .tpp-modal-v2-content {
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .tpp-modal-v2-overlay {
	background: rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .tpp-modal-v2-btn-secondary {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text-muted, #aaa);
}
[data-theme="dark"] .tpp-modal-v2-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* ========================================
     COLLAPSIBLE TREE LIST
========================================= */
.tpp-tree { margin-top: 8px; }

/* Header bar — collapsible date/group header */
.tpp-tree-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 15px;
	background: var(--bg-light, #f8f9fa);
	border: 1px solid var(--border-color, #e8e8e8);
	border-radius: 8px;
	cursor: pointer;
	user-select: none;
	margin-bottom: 4px;
	transition: background 0.15s;
}
.tpp-tree-header:not(.tpp-tree-header-static):hover { background: rgba(132, 190, 214, 0.1); }
.tpp-tree-header-static { cursor: default; }

.tpp-tree-header .tpp-tree-chevron {
	font-size: 11px;
	color: var(--text-muted, #888);
	transition: transform 0.2s;
	width: 14px;
	text-align: center;
}
.tpp-tree-header.collapsed .tpp-tree-chevron { transform: rotate(-90deg); }

.tpp-tree-header .tpp-tree-label {
	flex: 1;
	font-weight: 600;
	font-size: 14px;
	color: var(--text-dark, #333);
}

.tpp-tree-header .tpp-tree-stats {
	font-size: 12px;
	color: var(--text-muted, #888);
}

.tpp-tree-header .tpp-tree-header-badge {
	font-size: 10px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	color: white;
	min-width: 40px;
	text-align: center;
}

/* Tree trunk — vertical connecting line */
.tpp-tree-trunk {
	position: relative;
	padding: 4px 0 4px 28px;
	margin-bottom: 8px;
}
.tpp-tree-trunk::before {
	content: '';
	position: absolute;
	left: 15px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--border-color, #ddd);
}

/* Row — individual item in the tree */
.tpp-tree-row {
	position: relative;
	display: flex;
	align-items: center;
	padding: 10px 14px;
	border: 1px solid var(--border-color, #e8e8e8);
	border-top: none;
	background: var(--bg-white, #fff);
	transition: background 0.15s;
	gap: 12px;
}
.tpp-tree-row::before {
	content: '';
	position: absolute;
	left: -13px;
	top: 50%;
	transform: translateY(-50%);
	width: 11px;
	height: 2px;
	background: var(--border-color, #ddd);
}
.tpp-tree-row:first-child { border-radius: 6px 6px 0 0; border-top: 1px solid var(--border-color, #e8e8e8); }
.tpp-tree-row:last-child { border-radius: 0 0 6px 6px; }
.tpp-tree-row:only-child { border-radius: 6px; border-top: 1px solid var(--border-color, #e8e8e8); }
.tpp-tree-row:hover { background: rgba(128, 128, 128, 0.04); }

/* Current/active row highlight */
.tpp-tree-row-active {
	background: rgba(132, 190, 214, 0.08);
	border-left: 3px solid #84bed6;
}

/* Time column */
.tpp-tree-time {
	font-weight: 600;
	font-size: 14px;
	color: var(--text-dark, #333);
	min-width: 130px;
}
.tpp-tree-time i { margin-right: 6px; color: var(--text-muted, #888); font-size: 12px; }

/* Status badge */
.tpp-tree-badge {
	font-size: 10px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 8px;
	text-transform: uppercase;
	color: white;
	min-width: 70px;
	text-align: center;
}
.tpp-tree-badge-available { background: #84bed6; }
.tpp-tree-badge-booked { background: #8bb83a; }
.tpp-tree-badge-unavailable { background: var(--border-color, #ccc); color: var(--text-muted, #999) !important; }
.tpp-tree-badge-break { background: var(--border-color, #ccc); color: var(--text-muted, #999) !important; }

/* Info text next to badge */
.tpp-tree-info {
	font-size: 13px;
	color: var(--text-dark, #333);
}
.tpp-tree-info-bold { font-weight: 600; }
.tpp-tree-info-muted { color: var(--text-muted, #888); font-size: 12px; }

/* Inline message (conflict reason, booking info) */
.tpp-tree-msg {
	font-size: 11px;
	white-space: nowrap;
}
.tpp-tree-msg-success { color: #7aa52e; }
[data-theme="dark"] .tpp-tree-msg-success { color: #b5d56a; }
.tpp-tree-msg-danger { color: #ea7066; }

/* Spacer pushes action to right */
.tpp-tree-spacer { flex: 1; }

/* Action button */
.tpp-tree-action {
	border: none;
	padding: 5px 14px;
	border-radius: 6px;
	color: white;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	transition: opacity 0.15s;
	letter-spacing: 0.3px;
	text-decoration: none;
	display: inline-block;
}
.tpp-tree-action:hover { opacity: 0.85; color: white; text-decoration: none; }
.tpp-tree-action-disabled {
	background: var(--border-color, #ccc) !important;
	color: var(--text-muted, #999) !important;
	cursor: not-allowed;
	opacity: 0.7;
}

/* Small inline badge (consent, status indicator) */
.tpp-tree-tag {
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 4px;
}
.tpp-tree-tag-success { background: rgba(181, 213, 106, 0.15); color: #b5d56a; }
.tpp-tree-tag-danger { background: rgba(234, 112, 102, 0.15); color: #ea7066; }
.tpp-tree-tag-warning { background: rgba(240, 194, 75, 0.15); color: #f0c24b; }

/* Muted rows */
.tpp-tree-row-muted .tpp-tree-time { color: var(--text-muted, #999); }
.tpp-tree-row-nohover { cursor: default; }
.tpp-tree-row-clickable { cursor: pointer; }
.tpp-tree-row-clickable:hover { background: rgba(132, 190, 214, 0.08); }

/* Dark mode overrides */
[data-theme="dark"] .tpp-tree-badge-available { background: rgba(132, 190, 214, 0.2); color: #84bed6 !important; }
[data-theme="dark"] .tpp-tree-badge-booked { background: rgba(181, 213, 106, 0.2); color: #b5d56a !important; }
[data-theme="dark"] .tpp-tree-badge-unavailable { background: rgba(150, 150, 150, 0.15); color: var(--text-muted) !important; }
[data-theme="dark"] .tpp-tree-badge-break { background: rgba(150, 150, 150, 0.15); color: var(--text-muted) !important; }
[data-theme="dark"] .tpp-tree-header-badge { background: rgba(181, 213, 106, 0.2) !important; color: #b5d56a !important; }
[data-theme="dark"] .tpp-tree-action-disabled { background: rgba(150, 150, 150, 0.15) !important; color: var(--text-muted) !important; }
[data-theme="dark"] .tpp-tree-action[style*="#84bed6"] { background: rgba(132, 190, 214, 0.25) !important; color: #84bed6 !important; }
[data-theme="dark"] .tpp-tree-action[style*="#ea7066"] { background: rgba(234, 112, 102, 0.25) !important; color: #ea7066 !important; }
[data-theme="dark"] .tpp-tree-action[style*="#b5d56a"] { background: rgba(181, 213, 106, 0.25) !important; color: #b5d56a !important; }

/* Mobile */
@media (max-width: 767px) {
	.tpp-tree-time { min-width: 0; font-size: 13px; }
	.tpp-tree-row { padding: 8px 10px; gap: 6px; flex-wrap: wrap; }
	.tpp-tree-msg {
		width: 100%;
		order: 10;
		white-space: normal;
		margin-top: 2px;
	}
	.tpp-tree-info {
		width: 100%;
		order: 10;
	}
	.tpp-tree-header { flex-wrap: wrap; gap: 6px; }
	.tpp-tree-header .tpp-tree-stats { font-size: 11px; }
}
