/* AIS UI CSS — generated from public/assets/css/manifest.json */
/* Runtime entrypoint: /assets/ais-ui.css; source modules are not linked directly. */

/* ===== CSS owner: tokens.css ===== */

:root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --text: #1d2738;
    --muted: #5f6f86;
    --line: #edf1f7;
    --border: #d9e2ef;
    --border-soft: #edf1f7;
    --surface-muted: #f5f7fb;
    --accent: #2f6fb3;
    --accent-soft: #eef5fb;
    --accent-teal: #5eb8ae;
    --accent-cyan: #38a4c6;
    --accent-blue: #2b5fad;
    --accent-teal-dark: #2d8278;
    --error: #c5384f;
    --warning: #c47c1d;
    --conflict-color: #c5384f;
    --conflict-color-strong: #d9304f;
    --conflict-surface: #fdecef;
    --conflict-border: #f3c6cf;
    --problem-color: #b85a62;
    --problem-critical-surface: #f8e4e7;
    --problem-critical-color: #b85a62;
    --problem-warning-surface: #fff5e8;
    --problem-warning-color: #7a5314;
    --problem-warning-border: #e1bd78;
    /* Shared semantic color roles. Existing aliases stay available while
       components migrate; the values intentionally preserve the approved UI. */
    --color-canvas: var(--bg);
    --color-surface: var(--surface);
    --color-surface-subtle: var(--surface-muted);
    --color-surface-soft: #f8fafd;
    --color-surface-tinted: #f8fafc;
    --color-surface-elevated: #ffffff;
    --color-surface-deep: #f9fbfe;
    --color-surface-muted-strong: #f3f6fa;
    --color-surface-status: #f6f8fb;
    --color-surface-active: #eef3ff;
    --color-surface-active-emphasis: #e8edf5;
    --color-surface-hover-strong: #eef3fb;
    --color-surface-strong: #edf1f7;
    --color-surface-emphasis: #dfe7f1;
    --panel-surface: var(--color-surface);
    --panel-border: var(--color-border-soft);
    --panel-shadow: var(--shadow);
    --color-border: var(--border);
    --color-border-soft: var(--border-soft);
    --color-border-strong: #cbd6e4;
    --color-border-emphasis: #a9b8cc;
    --color-border-focus: #8eadd4;
    --color-border-inverse: #ffffff;
    --color-border-highlight: #8eadd4;
    --color-container-border: var(--color-border);
    --color-divider-border: var(--color-border-soft);
    --color-text: var(--text);
    --color-text-secondary: var(--muted);
    --color-text-muted: #8a94a6;
    --color-text-strong: #1f2a44;
    --color-text-emphasis: #1f2a44;
    --color-text-high: #1f2a44;
    --color-text-bright: #1f2a44;
    --color-text-brightest: #111827;
    --color-text-on-strong: #ffffff;
    --color-text-navigation: #31445f;
    --color-text-tertiary: #718096;
    --color-text-subtle-high: #5f6f86;
    --color-text-neutral: #4f5f77;
    --color-text-quieter: #6b778c;
    --color-text-disabled: #8a94a6;
    --color-text-on-light: #111111;
    --color-warning-contrast-text: #654f18;
    --grid-line-strong: #d9e2ee;
    --grid-cell-border-inline: #e1e8f1;
    --grid-cell-border-block: #e6ecf4;
    --all-schedule-v2-weeks-divider: var(--grid-line-strong);
    --grid-meta-cell-divider-shadow: inset 0 -1px 0 var(--color-border-soft);
    --shadow-inset-soft: inset 0 0 0 1px rgba(70, 124, 196, 0.08);
    --shadow-inset-strong: inset 0 0 0 1px rgba(70, 124, 196, 0.12);
    --focus-outline-offset: 1px;
    --focus-outline-inset-offset: -2px;
    --grid-frame-outline-offset: -1px;
    --color-text-control: #4f5f77;
    --color-text-control-hover: #31445f;
    --color-text-meta: #4b5b75;
    --color-link-text: #2b5fad;
    --color-link-hover: #234f93;
    --color-link-muted: #4f6f9f;
    --color-tree-text: #2b3d58;
    --color-filter-text: #334563;
    --color-message-text: #5f7086;
    --color-filter-hover-surface: #f5f8fc;
    --color-filter-hover-border: #e1e8f2;
    --color-filter-active-surface: #eef3ff;
    --color-filter-active-border: #cfdcf4;
    --color-filter-active-text: #2f4f92;
    --brand-logo-color: #ffffff;
    --color-control-bg: #ffffff;
    --color-control-border: #dce3ee;
    --color-control-border-subtle: #d5deeb;
    --color-control-border-compact: #d8e2ef;
    --color-control-placeholder: #8a94a6;
    --color-control-focus-border: #a9c2e5;
    --color-control-focus-border-compact: #9bb8de;
    --color-control-focus-ring: rgba(70, 124, 196, 0.12);
    --color-control-disabled-bg: #f4f6f9;
    --color-control-disabled-border: #e3e8f0;
    --color-control-disabled-text: #66738a;
    --color-choice-border: #aab8cd;
    --color-choice-active: #4a6fb3;
    --color-choice-mark: #2d8278;
    --color-choice-focus-ring: rgba(74, 111, 179, 0.18);
    --color-editor-control-surface: var(--color-control-bg);
    --color-editor-control-border: #dbe4f0;
    --color-editor-control-text: #1f2937;
    --color-editor-control-text-emphasis: #1f2a44;
    --color-editor-control-text-muted: #42526e;
    --color-editor-control-placeholder: #7e8590;
    --color-editor-control-shadow: inset 0 0 0 1px rgba(219, 228, 240, 0.15);
    --color-editor-static-surface: #f8fafc;
    --color-editor-static-border: #dbe4f0;
    --color-editor-static-text: #42526e;
    --color-editor-add-surface: transparent;
    --color-editor-add-border: var(--color-editor-remove-border);
    --color-editor-add-text: var(--color-editor-control-text-muted);
    --color-editor-add-hover-surface: #f8fafc;
    --color-editor-add-hover-border: #cbd6e4;
    --color-editor-add-hover-text: #111827;
    --color-editor-remove-surface: #ffffff;
    --color-editor-remove-border: #dce3ee;
    --color-editor-remove-text: #1f2a44;
    --color-editor-remove-hover-surface: #fff5f7;
    --color-editor-remove-hover-border: #e4b7c0;
    --color-editor-remove-hover-text: #b8283f;
    --footer-tool-surface: #ffffff;
    --footer-tool-border: #dce3ee;
    --footer-tool-text: #3d4e6c;
    --footer-tool-hover-surface: #eef5fb;
    --footer-tool-hover-border: #8eadd4;
    --footer-tool-hover-text: #2b5fad;
    --footer-tool-icon-filter: none;
    --help-surface: #ffffff;
    --help-border: #dce3ee;
    --help-text: #1f2a44;
    --help-text-muted: #8a94a6;
    --help-disabled-text: #8a94a6;
    --help-item-surface: transparent;
    --help-item-hover-surface: #f4f7fb;
    --help-item-focus-ring: #2b5fad;
    --help-divider: #edf1f7;
    --help-empty-surface: #f5f7fb;
    --help-empty-text: #4c5d75;
    --help-arrow-text: #718096;
    --help-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.08);
    --select-chevron-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' fill='none' stroke='%231d2738' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --color-surface-hover: #f4f7fb;
    --color-surface-selected: #eef5fb;
    --color-surface-selected-border: #c4d6f3;
    --color-action-primary-bg: #2b5fad;
    --color-action-primary-border: #2b5fad;
    --color-action-primary-text: #ffffff;
    --color-action-secondary-bg: transparent;
    --color-action-secondary-border: #dce3ee;
    --color-action-secondary-text: #1f2a44;
    --color-table-surface: #ffffff;
    --color-table-header-surface: transparent;
    --color-table-row-hover: #f7faff;
    --color-table-border: #edf1f7;
    --color-table-header-text: #5f6f86;
    --color-tab-text: #5f6b85;
    --color-tab-active-surface: #f4f7fb;
    --color-tab-active-border: #d8e2ef;
    --color-tab-active-text: #1f2a44;
    --color-compact-tag-surface: var(--color-surface-tinted);
    --color-compact-tag-border: #e0e7f1;
    --color-compact-tag-text: #334563;
    --tour-overlay-color: #1f2a44;
    --tour-overlay-opacity: 0.46;
    --color-data-table-border: #dfe5ef;
    --color-data-table-header-surface: #f8fafc;
    --schedule-map-label-published-surface: #3f7764;
    --schedule-map-label-published-border: #3f7764;
    --schedule-map-label-published-text: #ffffff;
    --schedule-map-label-work-surface: #526d92;
    --schedule-map-label-work-border: #526d92;
    --schedule-map-label-work-text: #ffffff;
    --schedule-map-label-draft-surface: #e7ebef;
    --schedule-map-label-draft-border: #d6dde5;
    --schedule-map-label-draft-text: #2c394a;
    --schedule-map-conflict-counter-surface: #b45e65;
    --schedule-map-context-1-surface: #f0f5f8;
    --schedule-map-context-1-accent: #bfd0dc;
    --schedule-map-context-2-surface: #f1f6f3;
    --schedule-map-context-2-accent: #c2d5c8;
    --schedule-map-context-3-surface: #f6f5f1;
    --schedule-map-context-3-accent: #ded4c1;
    --schedule-map-context-4-surface: #f3f5f7;
    --schedule-map-context-4-accent: #c9d1db;
    --schedule-map-context-5-surface: #f1f6f6;
    --schedule-map-context-5-accent: #bfd6d3;
    --schedule-map-context-6-surface: #f7f3f0;
    --schedule-map-context-6-accent: #e0cfc3;
    --color-data-table-header-text: #2b3d59;
    --color-data-table-text: #273a56;
    --color-data-table-row-hover: #f8fbff;
    --color-data-table-tree-surface: #f8fbff;
    --color-data-table-tree-border: #e4ebf5;
    --color-popover-surface: #ffffff;
    --color-popover-border: #dbe5f2;
    --color-popover-shadow: 0 18px 38px rgba(29, 39, 56, 0.12);
    --color-toast-surface: #ffffff;
    --color-toast-border: #e2e8f1;
    --color-toast-text: #1f2a44;
    --color-toast-title: #111827;
    --color-toast-secondary: #5f6b85;
    --color-toast-close: #5f6b85;
    --color-toast-close-hover-bg: #f4f7fb;
    --color-toast-close-hover-text: #1f2a44;
    --color-toast-icon-bg: linear-gradient(135deg, #49b3a6 0%, #3aa0c9 50%, #2b5fad 100%);
    --color-toast-icon-text: #ffffff;
    --color-toast-label: #4b40b6;
    --color-toast-shadow: 0 12px 26px rgba(31, 42, 68, 0.14);
    --color-overlay: rgba(15, 23, 38, 0.5);
    --color-overlay-soft: rgba(16, 24, 39, 0.34);
    --color-drawer-surface: #ffffff;
    --color-dialog-surface: #ffffff;
    --color-dialog-border: #d9e3f2;
    --drawer-divider-color: #e8edf5;
    --scrollbar-track: transparent;
    --scrollbar-thumb: #aeb8c7;
    --scrollbar-thumb-hover: #8f9bad;
    --color-danger-surface: var(--problem-critical-surface);
    --color-danger-border: var(--conflict-border);
    --color-danger-text: var(--problem-critical-color);
    --color-success-surface: #eef8ef;
    --color-success-border: #a8d2aa;
    --color-success-text: #4b8f5d;
    --feedback-default-surface: transparent;
    --feedback-default-border: transparent;
    --feedback-default-text: var(--color-text);
    --feedback-error-surface: #fdecef;
    --feedback-error-border: #f3c6cf;
    --feedback-error-text: #921f35;
    --feedback-danger-surface: #f8e8eb;
    --feedback-danger-border: transparent;
    --feedback-danger-text: #9d3746;
    --feedback-warning-surface: #fff5e8;
    --feedback-warning-border: #e1bd78;
    --feedback-warning-text: #8f5e14;
    --feedback-success-surface: #e8f6ee;
    --feedback-success-border: #cfeade;
    --feedback-success-text: #1f7148;
    --feedback-compact-success-surface: #eaf6ed;
    --feedback-compact-success-text: #347747;
    --feedback-compact-warning-surface: #fff4dc;
    --feedback-compact-warning-text: #956212;
    --feedback-compact-error-surface: #fdeceb;
    --feedback-compact-error-text: #b6332b;
    --feedback-compact-error-strong-surface: #c13a31;
    --feedback-compact-error-strong-text: #ffffff;
    --status-neutral-surface: #f1f4f8;
    --status-neutral-border: #dce4ee;
    --status-neutral-text: #647086;
    --status-positive-surface: #edf7ef;
    --status-positive-border: #cfe7d6;
    --status-positive-text: #39784a;
    --status-positive-indicator: #4f9360;
    --status-running-surface: #edf4fb;
    --status-running-border: #cbdbea;
    --status-running-text: #356da8;
    --status-running-indicator: #5d8fc4;
    --status-pending-surface: #fff5e8;
    --status-pending-border: #e1bd78;
    --status-pending-text: #7a5314;
    --status-negative-surface: #fdecee;
    --status-negative-border: #efc9ce;
    --status-negative-text: #9c2638;
    --compact-counter-surface: #eef2f7;
    --compact-counter-text: #5b6981;
    --presence-empty-surface: #fbfcfe;
    --presence-empty-border: #e8edf4;
    --presence-empty-text: #8a96a8;
    --grid-active-slot-surface: #f5f9ff;
    --grid-active-slot-ring: rgba(43, 95, 173, 0.28);
    --grid-sticky-bg: #f5f7fb;
    --grid-row-hover-surface: #fbfdff;
    --grid-column-hover-surface: #f2f7ff;
    --grid-time-row-hover-surface: #f5f8fc;
    --sidebar-surface: #ffffff;
    --sidebar-border: var(--color-border-soft);
    --sidebar-avatar-filter: none;
    --sidebar-navigation-icon-filter: none;
    --sidebar-navigation-hover-surface: var(--color-surface-hover);
    --sidebar-navigation-marker: var(--color-text-strong);
    --sidebar-navigation-icon: var(--color-text-control);
    --sidebar-indicator-surface: var(--color-text-strong);
    --sidebar-indicator-text: var(--color-text-on-strong);
    --sidebar-avatar-surface: var(--color-surface-selected);
    --sidebar-menu-icon: var(--color-text-control);
    --color-action-hover-bg: var(--color-surface-hover);
    --color-action-primary-hover-bg: var(--color-action-primary-bg);
    --replay-viewer-surface: #111318;
    --replay-viewer-text: #ffffff;
    --replay-viewer-text-muted: rgba(255, 255, 255, 0.72);
    --replay-viewer-text-soft: rgba(255, 255, 255, 0.6);
    --replay-viewer-border: rgba(255, 255, 255, 0.14);
    --replay-viewer-surface-overlay: rgba(17, 19, 24, 0.92);
    --replay-viewer-surface-popover: rgba(17, 19, 24, 0.96);
    --replay-viewer-hover: rgba(255, 255, 255, 0.12);
    --replay-viewer-hover-soft: rgba(255, 255, 255, 0.1);
    --replay-viewer-alert-surface: rgba(155, 45, 45, 0.94);
    --replay-viewer-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.24);
    --replay-viewer-shadow-alert: 0 10px 28px rgba(0, 0, 0, 0.28);
    --replay-viewer-shadow-controls: 0 14px 36px rgba(0, 0, 0, 0.34);
    --replay-viewer-shadow-popover: 0 16px 40px rgba(0, 0, 0, 0.36);
    --lesson-neutral-accent: #8a94a6;
    --lesson-card-surface: #f7fbff;
    --lesson-card-border: #cbd9eb;
    --lesson-card-text: #1f2a3d;
    --lesson-card-title-text: #1f2a3d;
    --lesson-card-profile-text: #2f7f71;
    --lesson-card-meta-text: #4d5b70;
    --lesson-card-room-text: #1f2a44;
    --lesson-chip-surface: rgba(255, 255, 255, 0.78);
    --lesson-chip-border: rgba(74, 96, 130, 0.15);
    --lesson-chip-text: #33435a;
    --lesson-selected-title-text: var(--lesson-card-title-text);
    --lesson-selected-meta-text: var(--lesson-card-meta-text);
    --lesson-lecture-surface: #f1fbf4;
    --lesson-lecture-border: var(--lesson-card-border);
    --lesson-lecture-accent: #4faf69;
    --lesson-lecture-interaction: #4faf69;
    --lesson-lecture-ring: rgba(79, 175, 105, 0.16);
    --lesson-lecture-title-text: var(--lesson-card-title-text);
    --lesson-lecture-profile-text: var(--lesson-card-profile-text);
    --lesson-lecture-meta-text: var(--lesson-card-meta-text);
    --lesson-lecture-room-text: var(--lesson-card-room-text);
    --lesson-lecture-chip-surface: var(--lesson-chip-surface);
    --lesson-lecture-chip-border: var(--lesson-chip-border);
    --lesson-lecture-chip-text: var(--lesson-chip-text);
    --lesson-practice-surface: #f2f7ff;
    --lesson-practice-border: var(--lesson-card-border);
    --lesson-practice-accent: #6aa7e8;
    --lesson-practice-interaction: #6aa7e8;
    --lesson-practice-ring: rgba(106, 167, 232, 0.18);
    --lesson-practice-title-text: var(--lesson-card-title-text);
    --lesson-practice-profile-text: var(--lesson-card-profile-text);
    --lesson-practice-meta-text: var(--lesson-card-meta-text);
    --lesson-practice-room-text: var(--lesson-card-room-text);
    --lesson-practice-chip-surface: var(--lesson-chip-surface);
    --lesson-practice-chip-border: var(--lesson-chip-border);
    --lesson-practice-chip-text: var(--lesson-chip-text);
    --lesson-lab-surface: #fff8e6;
    --lesson-lab-border: var(--lesson-card-border);
    --lesson-lab-accent: #d9ad3d;
    --lesson-lab-interaction: #d9ad3d;
    --lesson-lab-ring: rgba(217, 173, 61, 0.18);
    --lesson-lab-title-text: var(--lesson-card-title-text);
    --lesson-lab-profile-text: var(--lesson-card-profile-text);
    --lesson-lab-meta-text: var(--lesson-card-meta-text);
    --lesson-lab-room-text: var(--lesson-card-room-text);
    --lesson-lab-chip-surface: var(--lesson-chip-surface);
    --lesson-lab-chip-border: var(--lesson-chip-border);
    --lesson-lab-chip-text: var(--lesson-chip-text);
    --lesson-exam-surface: #fff3f3;
    --lesson-exam-border: var(--lesson-card-border);
    --lesson-exam-accent: #d56b6b;
    --lesson-exam-interaction: #d56b6b;
    --lesson-exam-ring: rgba(213, 107, 107, 0.18);
    --lesson-exam-title-text: var(--lesson-card-title-text);
    --lesson-exam-profile-text: var(--lesson-card-profile-text);
    --lesson-exam-meta-text: var(--lesson-card-meta-text);
    --lesson-exam-room-text: var(--lesson-card-room-text);
    --lesson-exam-chip-surface: var(--lesson-chip-surface);
    --lesson-exam-chip-border: var(--lesson-chip-border);
    --lesson-exam-chip-text: var(--lesson-chip-text);
    --lesson-consultation-surface: #effbf9;
    --lesson-consultation-border: var(--lesson-card-border);
    --lesson-consultation-accent: #4fb6a8;
    --lesson-consultation-interaction: #4fb6a8;
    --lesson-consultation-ring: rgba(79, 182, 168, 0.18);
    --lesson-consultation-title-text: var(--lesson-card-title-text);
    --lesson-consultation-profile-text: var(--lesson-card-profile-text);
    --lesson-consultation-meta-text: var(--lesson-card-meta-text);
    --lesson-consultation-room-text: var(--lesson-card-room-text);
    --lesson-consultation-chip-surface: var(--lesson-chip-surface);
    --lesson-consultation-chip-border: var(--lesson-chip-border);
    --lesson-consultation-chip-text: var(--lesson-chip-text);
    --lesson-other-surface: #f7f3ff;
    --lesson-other-border: var(--lesson-card-border);
    --lesson-other-accent: #9b7ce5;
    --lesson-other-interaction: #9b7ce5;
    --lesson-other-ring: rgba(155, 124, 229, 0.18);
    --lesson-other-title-text: var(--lesson-card-title-text);
    --lesson-other-profile-text: var(--lesson-card-profile-text);
    --lesson-other-meta-text: var(--lesson-card-meta-text);
    --lesson-other-room-text: var(--lesson-card-room-text);
    --lesson-other-chip-surface: var(--lesson-chip-surface);
    --lesson-other-chip-border: var(--lesson-chip-border);
    --lesson-other-chip-text: var(--lesson-chip-text);
    --coverage-summary-indicator: #7a879a;
    --inline-link-border: #8eadd4;
    --inline-link-hover-border: #5f6f86;
    --directory-option-outline: var(--color-border-focus);
    --tour-description-text: var(--color-text-secondary);
    --getting-started-next-border: var(--color-border);
    --status-high-surface: var(--status-running-indicator);
    --grid-lock-border: var(--conflict-color);
    --aggregate-timeline-column-guides: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent calc(var(--grid-group-width, 176px) - 1px),
        #dce5f0 calc(var(--grid-group-width, 176px) - 1px),
        #dce5f0 var(--grid-group-width, 176px)
    );
    --aggregate-timeline-grid-guides:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent calc(var(--grid-group-width, 176px) - 1px),
            #dce5f0 calc(var(--grid-group-width, 176px) - 1px),
            #dce5f0 var(--grid-group-width, 176px)
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(var(--aggregate-timeline-guide-size) - 1px),
            #edf1f6 calc(var(--aggregate-timeline-guide-size) - 1px),
            #edf1f6 var(--aggregate-timeline-guide-size)
        );
    --aggregate-timeline-rail-background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(var(--aggregate-timeline-guide-size) - 1px),
            #e7edf5 calc(var(--aggregate-timeline-guide-size) - 1px),
            #e7edf5 var(--aggregate-timeline-guide-size)
        ),
        #f8fafc;
    --all-schedule-neutral-accent: #6aa7e8;
    --grid-rail-sticky-surface: #f5f7fb;
    --grid-non-study-row-surface: #fff8e6;
    --grid-non-study-row-hover-surface: #fff3d0;
    --grid-plan-drop-blocked-state-surface: #f6f8fc;
    --grid-plan-drop-allowed-state-surface: #f2faf8;
    --grid-plan-drop-hover-state-surface: #e8f6f3;
    --grid-entry-drag-state-surface: #f7fafd;
    --grid-entry-drop-safe-state-surface: #f1faf4;
    --grid-entry-drop-risk-state-surface: #fff1f1;
    --grid-entry-drop-warning-state-surface: #fff7e8;
    --grid-entry-drop-current-state-surface: #f4f7fb;
    --grid-entry-drop-safe-hover-surface: #e6f5ea;
    --grid-entry-drop-risk-hover-surface: #ffe5e5;
    --grid-entry-drop-warning-hover-surface: #fff0d6;
    --grid-editor-problem-border: #f0c9d1;
    --control-focus-shadow: 0 0 0 3px rgba(47, 99, 216, 0.12);
    --profile-remove-border: var(--color-control-border);
    --profile-remove-hover-surface: var(--color-surface-hover);
    --profile-remove-hover-border: var(--color-border-focus);
    --ai-accent-gradient: linear-gradient(112deg, #ff1485 0%, #ef409a 54%, #e81ae5 100%);
    --ai-accent-border-gradient: linear-gradient(112deg, #ff1485 0%, #ef409a 32%, #e81ae5 56%, #ef409a 78%, #ff1485 100%);
    --ai-action-text: #ef409a;
    --ai-action-on-accent-text: rgba(255, 255, 255, .94);
    --ai-action-background:
        linear-gradient(#fff, #fff) padding-box,
        var(--ai-accent-border-gradient) border-box;
    --ai-action-hover-overlay-opacity: 1;
    --ai-action-loading-overlay-opacity: 1;
    --ai-result-field-background:
        linear-gradient(#fff7fb, #fff7fb) padding-box,
        linear-gradient(112deg, #ff1485 0%, #ef409a 32%, #e81ae5 56%, #ef409a 78%, #ff1485 100%) border-box;
    --ai-result-focus-ring: 0 0 0 2px rgba(239, 64, 154, 0.14);
    --ai-result-save-background:
        linear-gradient(112deg, #ff1485 0%, #ef409a 54%, #e81ae5 100%) padding-box,
        linear-gradient(112deg, #ff1485 0%, #ef409a 32%, #e81ae5 56%, #ef409a 78%, #ff1485 100%) border-box;
    --ai-result-text: #cf1d79;
    --study-plan-mapping-text: #4b67b0;
    --study-plan-mapping-hover-text: #2f5597;
    --schedule-create-section-surface: var(--color-surface);
    --schedule-create-label-text: #52647d;
    --schedule-create-text: #14203a;
    --schedule-create-meta-text: #71819a;
    --schedule-create-focus-shadow: 0 0 0 3px rgba(47, 99, 216, 0.12);
    --nav-scrollbar-hidden: transparent transparent;
    --nav-scrollbar-hover: rgba(255, 255, 255, 0.25) transparent;
    --nav-scrollbar-thumb-hover: rgba(255, 255, 255, 0.25);
    --nav-section-icon-filter: brightness(0) invert(1);
    --nav-section-icon-opacity: 0.62;
    --getting-started-cta-surface: #ffe36b;
    --getting-started-cta-border: #3d3200;
    --getting-started-cta-hover-surface: #ffd84d;
    --getting-started-cta-hover-border: #2f2700;
    --getting-started-cta-hover-text: #2f2700;
    --getting-started-cta-icon-stroke: #3d3200;
    --getting-started-readiness-text: #e2e2e2;
    --getting-started-close-text: rgba(61, 50, 0, 0.72);
    --getting-started-close-hover-text: #2f2700;
    --getting-started-close-hover-surface: rgba(61, 50, 0, 0.1);
    --schedule-history-border: var(--color-action-secondary-border);
    --schedule-create-divider: var(--color-border-highlight);
    --schedule-create-hover-divider: var(--color-border-inverse);
    --conflict-contrast-text: #ffffff;
    --schedule-rename-surface: transparent;
    --schedule-rename-border: transparent;
    --schedule-rename-text: #5f6b85;
    --schedule-rename-shadow: none;
    --schedule-rename-hover-surface: #f2f6fb;
    --schedule-rename-hover-text: #1d3150;
    --ai-result-select-background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' fill='none' stroke='%23cf1d79' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 18px center / 16px 16px no-repeat,
        #fff4fa;
    --grid-check-ok-surface: var(--status-positive-indicator);
    --grid-group-profile-text: var(--color-text-secondary);
    --aggregate-timeline-text: var(--color-text-secondary);
    --grid-time-cell-shadow: inset -1px 0 0 var(--color-border), inset 1px 0 0 var(--color-border);
    --coverage-scrollbar: var(--scrollbar-thumb) var(--scrollbar-track);
    --directory-panel-shadow: 0 0 5px rgba(31, 42, 68, 0.08);
    --directory-focus-shadow: inset 0 0 0 1px var(--color-control-focus-border), 0 0 0 3px var(--color-control-focus-ring);
    --directory-badge-surface: var(--color-compact-tag-surface);
    --directory-badge-border: var(--color-compact-tag-border);
    --directory-badge-hover-surface: var(--color-surface-hover);
    --directory-popover-border: var(--color-popover-border);
    --directory-popover-shadow: var(--color-popover-shadow);
    --directory-popover-scrollbar: var(--scrollbar-thumb) var(--scrollbar-track);
    --lesson-card-hover-surface: var(--color-surface-hover);
    --lesson-card-hover-border: var(--color-border-focus);
    --auth-screen-background: linear-gradient(135deg, #eef3fb 0%, #f7f9fc 100%);
    --auth-backdrop-filter: blur(5px);
    --auth-card-surface: rgba(255, 255, 255, 0.94);
    --auth-card-border: var(--color-border);
    --disabled-state-surface: var(--color-control-disabled-bg);
    --disabled-state-text: var(--color-control-disabled-text);
    --selection-surface: var(--color-surface-selected-border);
    --grid-drop-blocked-surface: var(--color-surface-subtle);
    --grid-drop-safe-shadow: inset 0 0 0 1px var(--color-border-focus);
    --grid-drop-hover-shadow: inset 0 0 0 2px var(--color-control-focus-border);
    --focus-outline-color: var(--color-control-focus-border);
    --floating-surface-shadow: var(--color-popover-shadow);
    --status-badge-border: var(--status-neutral-border);
    --grid-cell-divider-shadow: inset 0 1px 0 var(--color-border), inset 0 -1px 0 var(--color-border-soft);
    --grid-row-divider-shadow: inset 0 1px 0 var(--color-border-soft);
    --grid-frame-outline-color: transparent;
    --grid-interaction-outline-color: transparent;
    --grid-interaction-active-shadow: 0 0 0 2px var(--all-schedule-v2-line);
    --grid-interaction-border: var(--color-control-focus-border);
    --grid-frame-corner-border: transparent var(--grid-line-strong) var(--color-border-soft) transparent;
    --grid-frame-head-shadow: inset 0 1px 0 var(--color-border), inset 0 -1px 0 var(--grid-line-strong);
    --grid-frame-corner-shadow: inset 1px 0 0 var(--color-border), inset 0 1px 0 var(--color-border), inset -1px 0 0 var(--grid-line-strong), inset 0 -1px 0 var(--grid-line-strong);
    --grid-frame-time-shadow: inset -1px 0 0 var(--grid-line-strong), inset 1px 0 0 var(--color-border);
    --getting-started-attention-surface: var(--feedback-warning-surface);
    --getting-started-attention-border: var(--feedback-warning-border);
    --getting-started-attention-text: var(--feedback-warning-text);
    --getting-started-todo-surface: var(--feedback-error-surface);
    --getting-started-todo-border: var(--feedback-error-border);
    --getting-started-todo-text: var(--feedback-error-text);
    --directory-editor-surface: #ffffff;
    --directory-editor-border: #d7e3f1;
    --directory-editor-shadow: 0 8px 18px rgba(31, 48, 76, 0.035);
    --status-info-surface: #eef4fb;
    --status-info-border: #cbdbea;
    --status-info-text: #315d91;
    --empty-state-surface: #f8fbff;
    --empty-state-border: var(--color-border);
    --empty-state-text: var(--color-text-secondary);
    --calendar-surface: #fff;
    --calendar-surface-subtle: #f8fbff;
    --calendar-header-surface: #f8fafd;
    --calendar-border: #e1e8f2;
    --calendar-month-border: #e2e8f2;
    --calendar-header-border: #edf1f7;
    --calendar-text-strong: #1f2a44;
    --calendar-text: #5f6b85;
    --calendar-day-secondary-text: #5f6b85;
    --calendar-hover-surface: #f5f8fc;
    --calendar-warning-surface: #fffaf0;
    --calendar-ok-surface: #f6fbf7;
    --calendar-system-surface: #edf4ff;
    --calendar-system-hover-surface: #e2edfb;
    --calendar-system-border: #8fb0d8;
    --calendar-system-text: #3f628f;
    --calendar-heat-surface-low: #edf7f8;
    --calendar-heat-surface-high: #6faec2;
    --calendar-heat-border-low: #cfe3ea;
    --calendar-heat-border-high: #4b84aa;
    --calendar-heat-text-low: #315a68;
    --calendar-heat-text-high: #173c5f;
    --calendar-hard-fill: rgba(217, 122, 108, 0.23);
    --calendar-soft-fill: rgba(214, 175, 88, 0.26);
    --calendar-lesson-fill-1: rgba(111, 174, 194, 0.3);
    --calendar-lesson-fill-2: rgba(111, 174, 194, 0.42);
    --calendar-lesson-fill-3: rgba(75, 132, 170, 0.44);
    --calendar-lesson-fill-4: rgba(75, 132, 170, 0.58);
    --calendar-published-surface: #eef8ef;
    --calendar-published-border: #a8d2aa;
    --calendar-published-text: #3f6f49;
    --calendar-published-surface-1: #e4f4e5;
    --calendar-published-surface-2: #d2ebd5;
    --calendar-published-surface-3: #acd8b2;
    --calendar-published-surface-4: #78b986;
    --calendar-published-border-2: #8fc495;
    --calendar-published-border-3: #6fb57a;
    --calendar-published-border-4: #4b8f5d;
    --calendar-published-text-strong: #173f27;
    --calendar-count-surface: #eef3fa;
    --calendar-count-text: #5f6b85;
    --calendar-weekend-surface: #fff7e8;
    --calendar-weekend-hover-surface: #ffefd0;
    --calendar-weekend-border: #d6af58;
    --calendar-weekend-text: #8a6721;
    --calendar-holiday-surface: #fff0ee;
    --calendar-holiday-hover-surface: #ffe5e2;
    --calendar-holiday-border: #d97a6c;
    --calendar-holiday-text: #a33d34;
    --calendar-non-study-surface: #eef8f8;
    --calendar-non-study-hover-surface: #e0f2f2;
    --calendar-non-study-border: #76b6b6;
    --calendar-non-study-text: #427c7a;
    --calendar-risk-warning-border: #d6af58;
    --calendar-risk-info-border: #6faec2;
    --calendar-risk-ok-border: #6fb56f;
    --calendar-risk-muted-border: #aeb8c6;
    --weekday-label-surface: #ffd95d;
    --weekday-label-text: #111827;
    --progress-track: #dfe6f0;
    --progress-fill: linear-gradient(135deg, #49b3a6 0%, #3aa0c9 50%, #2b5fad 100%);
    --progress-fill-info: #5d8cc7;
    --progress-fill-upload: linear-gradient(90deg, #6db6ae, #4d6fb3);
    --progress-fill-muted: #9aa7ba;
    --progress-track-on-accent: rgba(255, 255, 255, 0.24);
    --progress-fill-on-accent: #fff;
    --getting-started-progress-center: #ffffff;
    --getting-started-progress-fill: #4fb967;
    --getting-started-progress-track: #e4eaf3;
    /* Semantic profile palette; feature selectors consume these roles. */
    --profile-color-1-surface: #eee6ff;
    --profile-color-1-text: #5a3f9c;
    --profile-color-1-dot: #9b74d9;
    --profile-color-1-directory-dot: var(--profile-color-1-surface);
    --profile-color-2-surface: #e1f6e9;
    --profile-color-2-text: #17733f;
    --profile-color-2-dot: #39a96b;
    --profile-color-2-directory-dot: var(--profile-color-2-surface);
    --profile-color-3-surface: #e5f0ff;
    --profile-color-3-text: #2463b2;
    --profile-color-3-dot: #4f8fdc;
    --profile-color-3-directory-dot: var(--profile-color-3-surface);
    --profile-color-4-surface: #ffe9dc;
    --profile-color-4-text: #c14f18;
    --profile-color-4-dot: #e28a19;
    --profile-color-4-directory-dot: var(--profile-color-4-surface);
    --profile-color-5-surface: #dff7fa;
    --profile-color-5-text: #137483;
    --profile-color-5-dot: #1ea7b1;
    --profile-color-5-directory-dot: var(--profile-color-5-surface);
    --profile-color-6-surface: #ffe4ef;
    --profile-color-6-text: #b82d63;
    --profile-color-6-dot: #df5f8d;
    --profile-color-6-directory-dot: var(--profile-color-6-surface);
    --profile-color-7-surface: #e3f7f0;
    --profile-color-7-text: #16715e;
    --profile-color-7-dot: #24a487;
    --profile-color-7-directory-dot: var(--profile-color-7-surface);
    --profile-color-8-surface: #fff1cc;
    --profile-color-8-text: #9b650e;
    --profile-color-8-dot: #d9a928;
    --profile-color-8-directory-dot: var(--profile-color-8-surface);
    --profile-color-9-surface: #e6f7ff;
    --profile-color-9-text: #176a96;
    --profile-color-9-dot: #2d9bd4;
    --profile-color-9-directory-dot: var(--profile-color-9-surface);
    --profile-color-10-surface: #f1ecff;
    --profile-color-10-text: #6449a8;
    --profile-color-10-dot: #7f63cf;
    --profile-color-10-directory-dot: var(--profile-color-10-surface);
    --profile-color-11-surface: #eaf7dc;
    --profile-color-11-text: #4e7418;
    --profile-color-11-dot: #83ad35;
    --profile-color-11-directory-dot: var(--profile-color-11-surface);
    --profile-color-12-surface: #ffe8e2;
    --profile-color-12-text: #a9432d;
    --profile-color-12-dot: #d6674f;
    --profile-color-12-directory-dot: var(--profile-color-12-surface);
    --profile-color-13-surface: #e2f3ff;
    --profile-color-13-text: #285f9f;
    --profile-color-13-dot: #4b83c6;
    --profile-color-13-directory-dot: var(--profile-color-13-surface);
    --profile-color-14-surface: #e7f4ef;
    --profile-color-14-text: #236d59;
    --profile-color-14-dot: #3c9c80;
    --profile-color-14-directory-dot: var(--profile-color-14-surface);
    --profile-color-15-surface: #fff0e1;
    --profile-color-15-text: #a45b18;
    --profile-color-15-dot: #d48731;
    --profile-color-15-directory-dot: var(--profile-color-15-surface);
    --profile-color-16-surface: #e8ecff;
    --profile-color-16-text: #4459a7;
    --profile-color-16-dot: #6278cf;
    --profile-color-16-directory-dot: var(--profile-color-16-surface);
    --profile-color-17-surface: #edf6e6;
    --profile-color-17-text: #3d7630;
    --profile-color-17-dot: #67a956;
    --profile-color-17-directory-dot: var(--profile-color-17-surface);
    --profile-color-18-surface: #fde8f6;
    --profile-color-18-text: #a53679;
    --profile-color-18-dot: #d45a9d;
    --profile-color-18-directory-dot: var(--profile-color-18-surface);
    --profile-color-19-surface: #e1f5f2;
    --profile-color-19-text: #1d746b;
    --profile-color-19-dot: #38a89d;
    --profile-color-19-directory-dot: var(--profile-color-19-surface);
    --profile-color-20-surface: #f7edff;
    --profile-color-20-text: #744493;
    --profile-color-20-dot: #9a68bd;
    --profile-color-20-directory-dot: var(--profile-color-20-surface);
    --profile-color-21-surface: #fff5d9;
    --profile-color-21-text: #8b6b13;
    --profile-color-21-dot: #c7a037;
    --profile-color-21-directory-dot: var(--profile-color-21-surface);
    --profile-color-22-surface: #e8f2ff;
    --profile-color-22-text: #315f99;
    --profile-color-22-dot: #5d8fc8;
    --profile-color-22-directory-dot: var(--profile-color-22-surface);
    --profile-color-23-surface: #faece7;
    --profile-color-23-text: #9a4f3a;
    --profile-color-23-dot: #c76f59;
    --profile-color-23-directory-dot: var(--profile-color-23-surface);
    --profile-color-24-surface: #e6f0f5;
    --profile-color-24-text: #316276;
    --profile-color-24-dot: #5a93a8;
    --profile-color-24-directory-dot: var(--profile-color-24-surface);
    --shadow: 0 0px 5px rgba(28, 42, 65, 0.05);
    --desktop-min-width: 1024px;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 52px;
    --grid-left-width: 45px;
    --grid-meta-gutter: 28px;
    --grid-group-base-width: 176px;
    --grid-group-width: var(--grid-group-base-width);
    --grid-single-group-width: 560px;
    /* Layout semantic paint contracts. */
    --btn-btn-light-border: 1px solid #d6e0ee;
    --btn-btn-light-text: #2f3f56;
    --html-scrollbar: #aeb8c6 #f3f6fa;
    --nav-indicator-attention-surface: #f2a220;
    --nav-indicator-attention-text: #241600;
    --nav-indicator-count-surface: #328cf6;
    --sidebar-collapsed-section-text: transparent;
    --sidebar-collapsed-indicator-text: transparent;
    --nav-link-is-active-border: #42dfd2;
    --select-surface: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' fill='none' stroke='%231d2738' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --webkit-scrollbar-thumb-border: 2px solid #f3f6fa;
    --webkit-scrollbar-thumb-hover-surface: #8f9bab;
    --webkit-scrollbar-thumb-surface: #b7c1cf;


    /* Layout residual semantic paint contracts. */
    --layout-app-sidebar-surface: linear-gradient(150deg, rgba(47, 125, 139, 0.98) 0%, rgba(45, 116, 160, 0.98) 46%, rgba(54, 91, 157, 0.99) 100%);
    --layout-app-sidebar-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.18);
    --layout-nav-webkit-scrollbar-thumb-hover-surface: rgba(255, 255, 255, 0.78);
    --layout-nav-link-text: rgba(255, 255, 255, 0.86);
    --layout-nav-link-hover-nav-link-is-active-surface: rgba(255, 255, 255, 0.24);
    --layout-nav-icon-svg-stroke: rgba(255, 255, 255, 0.92);
    --layout-nav-footer-border-top: 1px solid rgba(255, 255, 255, 0.18);
    --layout-app-shell-data-sidebar-state-collapsed-app-sidebar-hover-shadow: 18px 0 36px rgba(14, 32, 62, 0.18);
    --layout-app-shell-is-sidebar-hover-locked-data-sidebar-state-collapsed-app-sidebar-hover-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.15);
    --layout-nav-hover-scrollbar: rgba(255, 255, 255, 0.25) transparent;
    --layout-nav-hover-webkit-scrollbar-thumb-surface: rgba(255, 255, 255, 0.25);
    --layout-nav-section-title-text: rgba(255, 255, 255, 0.62);
    --layout-nav-section-title-border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    --layout-nav-section-has-nav-section-icon-nav-section-title-border-bottom-color: rgba(255, 255, 255, 0.16);
    --layout-nav-section-chevron-text: rgba(255, 255, 255, 0.62);
    --layout-nav-link-hover-surface: rgba(255, 255, 255, 0.1);
    --layout-nav-link-is-active-surface: rgba(255, 255, 255, 0.14);
    --layout-nav-link-is-disabled-text: rgba(255, 255, 255, 0.5);
    --layout-sidebar-release-version-text: rgba(255, 255, 255, 0.64);
    --layout-sidebar-release-version-strong-text: rgba(255, 255, 255, 0.86);
    --layout-sidebar-user-summary-hover-sidebar-user-open-sidebar-user-summary-surface: rgba(255, 255, 255, 0.14);
    --layout-sidebar-user-avatar-surface: rgba(255, 255, 255, 0.86);
    --layout-sidebar-user-role-text: rgba(255, 255, 255, 0.72);
    --layout-sidebar-user-chevron-text: rgba(255, 255, 255, 0.76);
    --layout-sidebar-user-menu-border: 1px solid rgba(220, 227, 238, 0.9);
    --layout-sidebar-user-menu-shadow: 0 10px 24px rgba(20, 32, 54, 0.16);
    --layout-app-shell-data-sidebar-state-collapsed-app-sidebar-app-shell-data-sidebar-state-collapse-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.18);
    --layout-app-shell-data-sidebar-state-collapsed-nav-section-title-border-bottom-color: rgba(255, 255, 255, 0.14);
    --layout-app-shell-data-sidebar-state-collapsed-nav-section-has-nav-section-icon-nav-section-titl-border-bottom-color: rgba(255, 255, 255, 0.16);
    --layout-app-shell-data-sidebar-state-collapsed-not-is-sidebar-hover-locked-app-sidebar-hover-shadow: 12px 0 28px rgba(31, 54, 92, 0.16),
            inset -1px 0 0 rgba(255, 255, 255, 0.18);
    --layout-app-shell-data-sidebar-state-collapsed-not-is-sidebar-hover-locked-app-sidebar-hover-nav-text: rgba(255, 255, 255, 0.62);
    --layout-app-shell-data-sidebar-state-collapsed-not-is-sidebar-hover-locked-app-sidebar-hover-nav-border-bottom-color: rgba(255, 255, 255, 0.16);
    --layout-status-draft-status-surface: #edf1fb;
    --layout-status-draft-status-text: #415272;
    --layout-status-in-review-status-surface: #eee9ff;
    --layout-status-in-review-status-text: #5f45a6;
    --layout-status-approved-status-surface: #e6f6ed;
    --layout-status-approved-status-text: #1e744a;
    --layout-status-published-status-surface: #e7eefb;
    --layout-status-published-status-text: #244f95;
    --layout-status-archived-status-surface: #efefef;
    --layout-status-archived-status-text: #666;
    --layout-status-new-status-surface: #e8f6ee;
    --layout-status-new-status-text: #1f7148;
    --layout-status-update-status-surface: #eef3ff;
    --layout-status-update-status-text: #2f5193;
    --layout-status-invalid-status-surface: #fdecef;
    --layout-status-invalid-status-text: #921f35;
    --layout-status-skipped-status-surface: #efefef;
    --layout-status-skipped-status-text: #666;
    --layout-grid-editor-problems-slot-state-slot-state-border-top: 1px solid rgba(240, 201, 209, 0.72);
    /* Components semantic paint contracts. */
    --driver-active-is-page-tour-ai-related-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #2B5FAD;
    --grid-action-tooltip-border: 1px solid #dce5f1;
    --grid-action-tooltip-change-border: 1px solid #e6ebf2;
    --grid-action-tooltip-change-text: #34445f;
    --grid-action-tooltip-event-text: #66758d;
    --grid-action-tooltip-subject-text: #263650;
    --grid-breadcrumb-before-text: #a9b6c8;
    --grid-cell-has-teacher-constraint-block-grid-empty-slot-text: #b94a48;
    --grid-cell-has-teacher-constraint-block-is-soft-text: #94640c;
    --grid-cell-has-teacher-constraint-block-surface: #fff7f7;
    --grid-check-count-is-ok-surface: #37a66a;
    --grid-check-inline-border: 1px solid #dce5f1;
    --grid-check-inline-text: #31435f;
    --grid-collaboration-state-is-warning-surface: #fff4d7;
    --grid-collaboration-state-is-warning-text: #94640c;
    --grid-command-panel-border: 1px solid #e7edf5;
    --grid-corner-cell-shadow: inset -1px 0 0 #d9e2ee, inset 0 -1px 0 #d9e2ee, inset 1px 0 0 #dfe7f1;
    --grid-day-block-grid-time-cell-shadow: inset -1px 0 0 #d9e2ee, inset 0 1px 0 #d5deea;
    --grid-day-block-shadow: inset 0 1px 0 #d5deea;
    --grid-editor-problems-is-scrollable-border: 2px solid #fff7f8;
    --grid-editor-problems-is-scrollable-hover-surface: #8f9bab;
    --grid-editor-problems-is-scrollable-surface: #b7c1cf;
    --grid-editor-problems-scrollbar: #aeb8c6 #fff7f8;
    --grid-editor-problems-surface: #fff7f8;
    --grid-editor-problems-text: #8f2437;
    --grid-empty-slot-hover-border: #b9c8dc;
    --grid-empty-slot-hover-text: #2459a6;
    --grid-empty-slot-text: #c0c6cf;
    --grid-group-name-text: #18243a;
    --grid-group-profiles-text: #6c7890;
    --grid-group-target-item-border: 1px solid #edf2f8;
    --grid-group-target-item-text: #3d4e67;
    --grid-group-target-section-border: 1px solid #edf2f8;
    --grid-group-targets-border: 1px solid #e1e8f3;
    --grid-group-targets-border-variant-2: 1px solid #edf2f8;
    --grid-group-targets-text: #3d4e67;
    --grid-help-empty-cell-target-border: 1px dashed #b9c8dc;
    --grid-help-empty-cell-target-text: #2459a6;
    --grid-help-move-target-marker-border: 1px solid #b9c8dc;
    --grid-help-move-target-marker-is-source-border: #cfd7e3;
    --grid-help-move-target-marker-is-target-border: #9cc9a8;
    --grid-help-move-target-marker-is-target-text: #376f46;
    --grid-icon-action-border: 1px solid #dde6f2;
    --grid-icon-action-text: #43536e;
    --grid-lock-marker-surface: var(--grid-lock-color, #C5384F);
    --grid-meta-cell-grid-pair-marker-text: #c0c6cf;
    --grid-outside-template-slot-border: 1px dashed #e4d7c4;
    --grid-outside-template-slot-text: #a2763f;
    --grid-pair-marker-text: #c0c6cf;
    --grid-period-action-ghost-text: #52617a;
    --grid-period-action-surface: #eef5ff;
    --grid-period-action-text: #2459a6;
    --grid-period-edit-hover-text: #2459a6;
    --grid-period-warning-text: #94640c;
    --grid-primary-action-surface: #1f66d1;
    --grid-problem-action-border: 1px solid #9eb7da;
    --grid-problem-action-hover-border: #789fd2;
    --grid-problem-action-hover-surface: #e5f0ff;
    --grid-problem-action-surface: #eef5ff;
    --grid-problem-body-text: #637289;
    --grid-problem-body-text-variant-2: #33445f;
    --grid-problem-dates-surface: #f2f5fa;
    --grid-problem-dates-text: #52617a;
    --grid-problem-entry-group-text: #52617a;
    --grid-problem-entry-link-hover-border: #b6c9e4;
    --grid-problem-entry-link-hover-surface: #eef5ff;
    --grid-problem-entry-link-hover-text: #2459a6;
    --grid-problem-entry-side-text: #52617a;
    --grid-problem-entry-subject-text: #6f7b91;
    --grid-problem-interval-list-border: 1px solid #e2e9f3;
    --grid-problem-interval-list-text: #52617a;
    --grid-problem-intervals-text: #637289;
    --grid-problem-item-border: 1px solid #e2e9f3;
    --grid-problem-item-is-warning-grid-problem-mark-surface: #c47c1d;
    --grid-problem-item-text: #26354d;
    --grid-problem-links-hover-border: #9eb7da;
    --grid-problem-links-hover-surface: #eef5ff;
    --grid-problem-links-text: #2459a6;
    --grid-problem-merge-date-text: #52617a;
    --grid-problem-merge-groups-border: 1px solid #e2e9f3;
    --grid-problem-merge-groups-text: #637289;
    --grid-problem-merge-groups-text-variant-2: #52617a;
    --grid-problem-merge-row-surface: #fbfcff;
    --grid-problem-merge-time-text: #637289;
    --grid-problem-reasons-text: #637289;
    --grid-problems-close-hover-border: #dce5f1;
    --grid-problems-close-text: #52617a;
    --grid-problems-head-border: 1px solid #e5ecf5;
    --grid-problems-list-border: 2px solid #f3f6fa;
    --grid-problems-list-hover-surface: #8f9bab;
    --grid-problems-list-scrollbar: #aeb8c6 #f3f6fa;
    --grid-problems-list-surface: #b7c1cf;
    --grid-problems-popover-border: 1px solid #dce5f1;
    --grid-publication-open-hover-surface: #188447;
    --grid-readonly-banner-border: 1px solid #f1cf86;
    --grid-readonly-banner-surface: #fff7e4;
    --grid-readonly-banner-text: #7b5513;
    --grid-readonly-copy-border: 1px solid #dce5f1;
    --grid-readonly-copy-hover-border: #b8c9df;
    --grid-readonly-copy-hover-text: #2459a6;
    --grid-readonly-note-text: #40516c;
    --grid-save-state-is-dirty-surface: #fff4d7;
    --grid-save-state-is-dirty-text: #94640c;
    --grid-search-wrap-border: 1px solid #dde6f2;
    --grid-sheet-border: 1px solid #dfe7f1;
    --grid-sheet-border-variant-2: 2px solid #f3f6fa;
    --grid-sheet-footer-app-page-help-footer-border: 1px solid #DCE5F1;
    --grid-sheet-footer-tool-border: 1px solid #DCE5F1;
    --grid-sheet-footer-tool-text: #607089;
    --grid-sheet-footer-tools-border: 1px solid #DCE5F1;
    --grid-sheet-footer-tools-surface: #EDF2F8;
    --grid-sheet-head-shadow: inset 0 -1px 0 #d9e2ee;
    --grid-sheet-hover-surface: #8f9bab;
    --grid-sheet-is-plan-dragging-grid-group-head-text: #275F5F;
    --grid-sheet-scrollbar: #aeb8c6 #f3f6fa;
    --grid-sheet-surface: #b7c1cf;
    --grid-sheet-tab-border: 1px solid #dce5f1;
    --grid-sheet-tab-hover-text: #2f4f84;
    --grid-sheet-tab-is-active-text: #18355f;
    --grid-sheet-tab-is-published-hover-surface: #dcefdc;
    --grid-sheet-tab-is-published-hover-text: #285b39;
    --grid-sheet-tab-is-published-is-active-text: #225534;
    --grid-sheet-tab-is-published-text: #356844;
    --grid-sheet-tab-surface: #eef3f9;
    --grid-sheet-tab-text: #56657c;
    --grid-sheet-table-grid-time-cell-shadow: inset -1px 0 0 #d9e2ee;
    --grid-sheet-table-is-outside-template-hover-surface: #f8f4ed;
    --grid-sheet-table-is-outside-template-surface: #fbfaf7;
    --grid-sheet-tabs-nav-border: 1px solid #dce5f1;
    --grid-sheet-tabs-nav-is-active-text: #18355f;
    --grid-sheet-tabs-nav-surface: #edf2f8;
    --grid-sheet-tabs-nav-text: #607089;
    --grid-status-badge-text: #40516c;
    --grid-status-draft-text: #166a75;
    --grid-status-published-surface: #25a65a;
    --grid-time-cell-shadow-variant-2: inset -1px 0 0 #d9e2ee;
    --grid-toggle-text: #42526d;
    --grid-toolbar-button-border: 1px solid #dce5f1;
    --grid-toolbar-button-disabled-border: #e3e9f1;
    --grid-toolbar-button-disabled-surface: #f5f7fa;
    --grid-toolbar-button-hover-border: #c9d6e6;
    --grid-toolbar-button-hover-text: #2459a6;
    --grid-toolbar-button-text: #40516c;
    --grid-top-legend-text: #43536e;
    --grid-version-copy-button-border: 1px solid #dce5f1;
    --grid-version-copy-button-hover-border: #9fb5d2;
    --grid-xlsx-draft-open-border: 1px solid #dce5f1;
    --grid-xlsx-draft-open-hover-border: #c8d5e6;
    --grid-xlsx-draft-open-hover-surface: #f7faff;
    --grid-xlsx-draft-open-text: #31435f;
    --grid-sheet-head-divider-shadow: inset 0 1px 0 #dfe7f1, inset 0 -1px 0 #d9e2ee;
    --group-grid-grid-day-block-grid-time-cell-shadow: inset -1px 0 0 #d9e2ee, inset 1px 0 0 #dfe7f1, inset 0 1px 0 #d5deea;
    --group-grid-grid-sheet-head-grid-corner-cell-shadow: inset 1px 0 0 #dfe7f1, inset 0 1px 0 #dfe7f1, inset -1px 0 0 #d9e2ee, inset 0 -1px 0 #d9e2ee;
    --group-grid-grid-time-cell-shadow: inset -1px 0 0 #d9e2ee, inset 1px 0 0 #dfe7f1;
    --lesson-card-has-teacher-constraint-conflict-border: #e6d2a0;
    --lesson-card-is-just-merged-surface: #f3fbf9;
    --lesson-card-is-plan-coverage-highlight-border: #4D9EAA;
    --lesson-card-is-plan-coverage-highlight-outline: 2px solid #4D9EAA;
    --lesson-chip-joint-border: #8fc9bd;
    --lesson-chip-joint-surface: #eaf8f5;
    --lesson-chip-joint-text: #2f7368;
    --presence-inline-count-border: 1px solid #dce5f1;
    --presence-inline-count-surface: #f7faff;
    --presence-inline-count-text: #40516c;
    --presence-popover-text: #29384f;
    --presence-session-line-text: #667795;
    --presence-user-group-border: 1px solid #edf2f8;
    --xlsx-draft-chip-text: #2459a6;
    --xlsx-draft-dates-text: #226f7c;


    /* Components residual semantic paint contracts. */
    --components-from-shadow: 0 4px 8px rgba(31, 42, 68, 0.16);
    --components-grid-publication-open-hover-grid-publication-open-focus-visible-outline: 2px solid rgba(37, 166, 90, 0.22);
    --components-grid-version-copy-button-hover-grid-version-copy-button-focus-visible-outline: 2px solid rgba(43, 95, 173, 0.18);
    --components-grid-action-tooltip-shadow: 0 8px 22px rgba(31, 42, 68, 0.14);
    --components-grid-problems-popover-surface: rgba(255, 255, 255, 0.98);
    --components-grid-problems-popover-shadow: 0 18px 44px rgba(28, 42, 65, 0.16);
    --components-alert-grid-problem-links-a-border-color: rgba(146, 31, 53, 0.22);
    --components-alert-grid-problem-links-a-surface: rgba(255, 255, 255, 0.74);
    --components-grid-study-graph-study-graph-profile-surface: #eef3f9;
    --components-grid-study-graph-study-graph-hover-surface: #f2f7ff;
    --components-grid-study-graph-study-graph-profile-text: #29466f;
    --components-grid-study-graph-study-graph-lecture-surface: #f1fbf4;
    --components-grid-study-graph-study-graph-practice-surface: #f2f7ff;
    --components-grid-study-graph-study-graph-lab-surface: #fff8e6;
    --components-grid-study-graph-study-graph-exam-surface: #fff3f3;
    --components-grid-study-graph-study-graph-consultation-surface: #effbf9;
    --components-grid-study-graph-study-graph-other-surface: #f7f3ff;
    --components-grid-study-graph-study-graph-lecture-text: #347747;
    --components-grid-study-graph-study-graph-practice-text: #4b67b0;
    --components-grid-study-graph-study-graph-lab-text: #956212;
    --components-grid-study-graph-study-graph-exam-text: #b94a48;
    --components-grid-study-graph-study-graph-consultation-text: #367f7f;
    --components-grid-study-graph-study-graph-other-text: #68539b;
    --components-grid-study-graph-table-tbody-tr-not-grid-study-graph-profile-row-hover-td-shadow: inset 0 0 0 999px rgba(65, 102, 154, 0.025);
    --components-grid-study-graph-table-is-col-hover-shadow: inset 0 0 0 999px rgba(65, 102, 154, 0.04);
    --components-grid-study-graph-table-tbody-tr-not-grid-study-graph-profile-row-hover-td-is-col-hover-shadow: inset 0 0 0 999px rgba(65, 102, 154, 0.065);
    --components-group-grid-grid-sheet-table-tbody-tr-is-non-study-day-grid-meta-cell-before-surface: rgba(242, 185, 75, 0.16);
    --components-group-grid-grid-sheet-table-tbody-tr-is-outside-template-grid-meta-cell-before-surface: rgba(142, 104, 43, 0.08);
    --components-grid-marker-row-is-non-study-day-before-surface: rgba(242, 185, 75, 0.16);
    --components-grid-marker-row-is-outside-template-before-surface: rgba(142, 104, 43, 0.08);
    --components-all-schedule-v2-entry-all-schedule-v2-week-fill: #e4ecfd;
    --components-all-schedule-v2-entry-all-schedule-v2-week-number-active: #b7c1d3;
    --components-all-schedule-v2-entry-all-schedule-v2-card-bg: #f2f7ff;
    --components-all-schedule-v2-entry-all-schedule-v2-line: #6aa7e8;
    --components-all-schedule-v2-week-number-text: rgba(55, 72, 99, 0.24);
    --components-all-schedule-v2-entry-lesson-lecture-all-schedule-v2-week-fill: #e1f2e2;
    --components-all-schedule-v2-entry-lesson-lecture-all-schedule-v2-week-number-active: #b5c9b8;
    --components-all-schedule-v2-entry-lesson-practice-all-schedule-v2-week-fill: #e3ebfb;
    --components-all-schedule-v2-entry-lesson-practice-all-schedule-v2-week-number-active: #b5bfd2;
    --components-all-schedule-v2-entry-lesson-lab-all-schedule-v2-entry-lesson-credit-all-schedule-v2-week-fill: #faedca;
    --components-all-schedule-v2-entry-lesson-lab-all-schedule-v2-entry-lesson-credit-all-schedule-v2-week-number-active: #c9bb97;
    --components-all-schedule-v2-entry-lesson-exam-all-schedule-v2-week-fill: #f5dede;
    --components-all-schedule-v2-entry-lesson-exam-all-schedule-v2-week-number-active: #c9b0b0;
    --components-all-schedule-v2-entry-lesson-consultation-all-schedule-v2-week-fill: #dff1ef;
    --components-all-schedule-v2-entry-lesson-consultation-all-schedule-v2-week-number-active: #afc7c3;
    --components-all-schedule-v2-entry-lesson-other-all-schedule-v2-week-fill: #eee7fb;
    --components-all-schedule-v2-entry-lesson-other-all-schedule-v2-week-number-active: #beb6d0;
    --components-grid-cell-has-teacher-constraint-block-shadow: inset 0 0 0 1px rgba(185, 74, 72, 0.18);
    --components-grid-cell-has-teacher-constraint-block-is-soft-shadow: inset 0 0 0 1px rgba(214, 175, 88, 0.22);
    --components-grid-cell-is-locked-by-other-grid-lock-color: #C5384F;
    --components-grid-sheet-is-plan-dragging-is-plan-drop-allowed-shadow: inset 0 0 0 1px rgba(118, 182, 182, 0.28);
    --components-grid-sheet-is-plan-dragging-grid-cell-is-plan-drop-hover-shadow: inset 0 0 0 2px rgba(76, 160, 148, 0.55);
    --components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-safe-shadow: inset 0 0 0 1px rgba(75, 143, 93, 0.28);
    --components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-risk-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0.26);
    --components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-warning-shadow: inset 0 0 0 1px rgba(214, 175, 88, 0.34);
    --components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-current-shadow: inset 0 0 0 1px rgba(138, 148, 166, 0.28);
    --components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-hover-is-entry-drop-safe-shadow: inset 0 0 0 2px rgba(75, 143, 93, 0.55);
    --components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-hover-is-entry-drop-risk-shadow: inset 0 0 0 2px rgba(217, 45, 32, 0.52);
    --components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-hover-is-entry-drop-warning-shadow: inset 0 0 0 2px rgba(214, 175, 88, 0.58);
    --components-lesson-card-is-plan-coverage-highlight-lesson-card-is-plan-coverage-highlight-hover-less-shadow: 0 0 0 2px rgba(77, 158, 170, 0.16);
    --components-lesson-card-is-just-merged-lesson-card-is-just-merged-hover-lesson-card-is-just-merged-i-outline: 2px solid rgba(73, 179, 166, 0.72);
    --components-grid-focus-clone-outline: 2px solid rgba(47, 102, 216, 0.8);
    --components-grid-focus-clone-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 8px 20px rgba(20, 34, 62, 0.22);
    --components-grid-sheet-is-focus-preview-lesson-card-is-focus-target-outline: 2px solid rgba(47, 102, 216, 0.65);
    --components-grid-slot-editor-panel-slot-blue: #2f66d8;
    --components-grid-slot-editor-panel-slot-blue-soft: #edf4ff;
    --components-grid-slot-editor-panel-slot-border: #dfe7f3;
    --components-grid-slot-editor-panel-slot-muted: #60708b;
    --components-presence-popover-shadow: 0 14px 28px rgba(32, 45, 68, 0.16);
    --components-slot-editor-panel-modal-panel-shadow: -14px 0 34px rgba(0, 0, 0, 0.12);
    /* Features semantic paint contracts. */
    --aggregate-grid-filter-field-directory-combobox-text: #718099;
    --aggregate-grid-filters-text: #607089;
    --aggregate-timeline-lane-surface: repeating-linear-gradient( to bottom, transparent 0, transparent calc(var(--aggregate-timeline-guide-size) - 1px), #edf1f6 calc(var(--aggregate-timeline-guide-size) - 1px), #edf1f6 var(--aggregate-timeline-guide-size) ), repeating-linear-gradient( to bottom, transparent 0, transparent calc((var(--aggregate-timeline-guide-size) * 2) - 1px), #dce5f0 calc((var(--aggregate-timeline-guide-size) * 2) - 1px), #dce5f0 calc(var(--aggregate-timeline-guide-size) * 2) ), #fff;
    --aggregate-timeline-resource-head-grid-group-profiles-text: #69758a;
    --aggregate-timeline-row-divider-shadow: inset 0 1px 0 #d5deea;
    --account-mfa-danger-text: #9a4152;
    --account-mfa-manual-border: 1px solid #dfe7f1;
    --account-mfa-setup-border: 1px solid #dfe7f1;
    --admin-organization-panel-admin-organization-add-user-panel-directory-import-panel-border: #e3eaf3;
    --admin-organization-panel-form-field-error-text: #b94a48;
    --admin-token-cell-muted-text: #728098;
    --admin-university-backup-metrics-border: 1px solid #e3eaf3;
    --admin-university-backup-metrics-text: #66748b;
    --admin-university-backup-stats-border: 1px solid #dfe7f1;
    --admin-university-backup-warning-border: 1px solid #f0d7d3;
    --admin-university-backup-warning-surface: #fff6f5;
    --admin-university-backup-warning-text: #7b332d;
    --ai-buy-tokens-btn-surface: #f3b33d;
    --ai-buy-tokens-btn-text: #17223a;
    --ai-model-refresh-btn-border: 1px solid #dfe7f1;
    --ai-settings-toggle-border: 1px solid #dfe7f1;
    --ai-subscription-card-surface: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.2), transparent 26%), linear-gradient(112deg, #d56f9c 0%, #c85f9d 52%, #a665c6 100%);
    --ai-subscription-card-shadow: 0 18px 42px rgba(166, 101, 198, 0.16);
    --ai-subscription-decoration-surface: rgba(255, 255, 255, 0.12);
    --ai-subscription-status-surface: rgba(255, 255, 255, 0.16);
    --ai-subscription-status-enabled-surface: rgba(255, 255, 255, 0.24);
    --ai-subscription-status-disabled-surface: rgba(21, 31, 52, 0.18);
    --ai-subscription-primary-text: #fff;
    --ai-subscription-secondary-text: rgba(255, 255, 255, 0.82);
    --ai-subscription-label-text: rgba(255, 255, 255, 0.76);
    --ai-subscription-meta-text: rgba(255, 255, 255, 0.78);
    --ai-subscription-progress-track: rgba(255, 255, 255, 0.24);
    --ai-subscription-progress-fill: #fff;
    --ai-subscription-progress-shadow: 0 2px 18px rgba(255, 255, 255, 0.4);
    --ai-subscription-note-border-color: rgba(255, 255, 255, 0.22);
    --ai-subscription-note-surface: rgba(255, 255, 255, 0.12);
    --ai-subscription-note-text: rgba(255, 255, 255, 0.86);
    --ai-test-result-border: 1px solid #dfe7f1;
    --ai-test-result-head-error-text: #a73535;
    --ai-test-result-head-ok-text: #1f7a49;
    --ai-test-result-is-error-border: #f0c4c4;
    --ai-test-result-is-error-surface: #fff5f5;
    --ai-test-result-is-ok-border: #bfe6cf;
    --ai-test-result-is-ok-surface: #f1fbf5;
    --ai-usage-card-border: 1px solid #dfe7f1;
    --ai-usage-card-surface: linear-gradient(90deg, rgba(73, 179, 166, 0.12) 0%, rgba(58, 160, 201, 0.1) 50%, rgba(43, 95, 173, 0.1) 100%), #f8fbff;
    --ai-usage-card-text: #53637b;
    --ai-usage-level-is-high-text: #a73535;
    --ai-usage-level-is-low-surface: #e8f6ef;
    --ai-usage-level-is-low-text: #1f7a49;
    --ai-usage-level-is-mid-surface: #fff4d8;
    --ai-usage-level-is-mid-text: #9b681b;
    --assignment-box-border: 1px solid #dfe7f2;
    --assignment-external-targets-border: 1px solid #e6edf6;
    --assignment-mode-list-before-border: 2px solid #a8b5c9;
    --assignment-mode-list-border: 1px solid #dfe7f2;
    --assignment-mode-list-is-active-before-border: #2f66d8;
    --assignment-mode-list-is-active-before-shadow: inset 0 0 0 4px #fff;
    --assignment-mode-list-is-active-before-surface: #2f66d8;
    --assignment-mode-list-is-active-text: #1f57c8;
    --assignment-mode-list-surface: #fbfcff;
    --assignment-mode-list-text: #23324f;
    --assignment-search-border: 1px solid #dfe7f2;
    --assignment-search-text: #8a96aa;
    --assignment-target-footer-text: #34455f;
    --assignment-target-head-text: #23324f;
    --assignment-target-head-text-variant-2: #2f66d8;
    --auth-schedule-sheet-grid-sheet-border: 1px solid #dfe7f1;
    --auth-schedule-sheet-grid-time-cell-before-text: #c0c6cf;
    --auth-schedule-sheet-grid-time-label-text: #52627a;
    --bell-day-header-label-text: #2d3e58;
    --bell-day-state-disabled-surface: #f1f3f7;
    --bell-day-state-disabled-text: #7b879a;
    --bell-day-state-enabled-surface: #e8f5eb;
    --bell-day-state-enabled-text: #16884a;
    --bell-day-state-hover-border: #cfd8e8;
    --bell-day-state-override-border: #cadafc;
    --bell-day-state-override-surface: #edf3ff;
    --bell-day-state-override-text: #224d96;
    --bell-day-state-surface: #f4f6fa;
    --bell-day-state-text: #64758d;
    --bell-inline-message-error-text: #b74d43;
    --bell-inline-message-info-text: #3f5e8c;
    --bell-inline-message-ok-text: #1f6b44;
    --bell-override-editor-border: 1px solid #8ad7e9;
    --bell-override-editor-input-border: 1px solid #d4deed;
    --bell-override-editor-title-text: #425979;
    --bell-row-menu-border: 1px solid #d9e1ef;
    --bell-row-menu-btn-border: 1px solid #d7deeb;
    --bell-row-menu-btn-hover-surface: #f7f9fd;
    --bell-row-menu-btn-text: #2d3f5e;
    --bell-row-menu-hover-surface: #eff3fa;
    --bell-row-menu-is-danger-text: #b1463d;
    --bell-row-menu-text: #2b3d57;
    --bell-schedule-table-border: 1px solid #e3e8f1;
    --bell-schedule-table-wrap-border: 1px solid #e3e8f1;
    --commercial-access-overview-border: 1px solid #dfe7f1;
    --commercial-access-overview-text: #6d7b91;
    --commercial-access-overview-text-variant-2: #1d2a42;
    --commercial-access-section-border: 1px solid #e4eaf3;
    --commercial-access-section-head-text: #66758d;
    --commercial-feature-badge-border: 1px solid #d9e2f0;
    --commercial-feature-badge-surface: #f3f6fb;
    --commercial-feature-badge-text: #415574;
    --commercial-feature-callout-border: 1px solid #d9e3f1;
    --commercial-feature-callout-surface: #f6f9fd;
    --commercial-feature-callout-text: #53647e;
    --commercial-feature-callout-text-variant-2: #263b5b;
    --commercial-quota-entry-border: 1px solid #edf1f6;
    --commercial-quota-entry-edit-form-grid-border: 1px solid #e1e7f0;
    --commercial-quota-entry-edit-text: #315ea8;
    --commercial-quota-entry-main-text: #5d6c83;
    --commercial-quota-entry-main-text-variant-2: #1d2a42;
    --commercial-quota-entry-main-text-variant-3: #8490a3;
    --commercial-quota-history-border: 1px solid #e4eaf3;
    --commercial-quota-section-border: 1px solid #e4eaf3;
    --commercial-quota-summary-text: #5d6c83;
    --commercial-quota-summary-text-variant-2: #1d2a42;
    --commercial-read-only-banner-border: 1px solid #ead6d9;
    --commercial-read-only-banner-surface: #fff7f7;
    --commercial-read-only-banner-text: #6f3e46;
    --commercial-read-only-banner-text-variant-2: #7f2533;
    --commercial-trial-banner-border: 1px solid #d8e3f2;
    --commercial-trial-banner-surface: #f4f8fd;
    --commercial-trial-banner-text: #4f6381;
    --commercial-trial-banner-text-variant-2: #294b78;
    --compact-list-list-item-surface: #fafbfd;
    --constraint-all-day-btn-is-active-border: #80bdb7;
    --constraint-all-day-btn-is-active-surface: #f1fbf9;
    --constraint-all-day-btn-is-active-text: #4f8c84;
    --constraint-all-day-btn-text: #536079;
    --constraint-card-not-preferred-border: #e6d2a0;
    --constraint-card-not-preferred-constraint-rule-chip-text: #94640c;
    --constraint-card-unavailable-border: #e3b6bd;
    --constraint-card-unavailable-border-variant-2: #b94a48;
    --constraint-card-unavailable-constraint-rule-chip-text: #b94a48;
    --constraint-card-unavailable-surface: #fff7f7;
    --constraint-type-chip-is-blocked-text: #b94a48;
    --constraint-type-chip-is-warning-text: #94640c;
    --constraints-mode-tab-hover-surface: #f6f9fd;
    --constraints-mode-tab-hover-text: #2f4f84;
    --constraints-mode-tab-is-active-surface: #eef5ff;
    --constraints-mode-tab-text: #52617a;
    --constraints-mode-tabs-border: 1px solid #dce5f1;
    --constraints-teacher-calendar-link-border: 1px solid #dce5f1;
    --constraints-teacher-calendar-link-hover-border: #bfd0e8;
    --custom-select-inline-custom-select-control-focus-border: #c8d8ef;
    --custom-select-inline-custom-select-control-focus-text: #17233a;
    --custom-select-inline-custom-select-control-text: #2f67b8;
    --date-chip-text: #243650;
    --date-preview-list-border: 1px solid #dfe7f1;
    --department-plx-alias-confirmed-count-surface: #e9f7ef;
    --department-plx-alias-confirmed-count-text: #2f6f4a;
    --department-plx-alias-row-is-confirmed-surface: #f0f9f3;
    --department-plx-target-cell-custom-select-is-ai-suggested-surface: #fff3fa;
    --directory-code-input-focus-shadow: inset 0 0 0 1px #c9daf4, 0 0 0 3px rgba(70, 124, 196, 0.12);
    --directory-code-input-focus-surface: #f7faff;
    --directory-combobox-empty-text: #7b8ba1;
    --directory-combobox-result-hint-text: #7b8ba1;
    --directory-combobox-result-hover-surface: #f3f8ff;
    --directory-combobox-result-hover-text: #214a86;
    --directory-combobox-result-text: #26384f;
    --directory-combobox-results-scroll-border: 2px solid #f3f6fa;
    --directory-combobox-results-scroll-hover-surface: #8f9bab;
    --directory-combobox-results-scroll-scrollbar: #aeb8c6 #f3f6fa;
    --directory-combobox-results-scroll-surface: #b7c1cf;
    --directory-count-badge-surface: #eef2f8;
    --directory-count-badge-text: #60708a;
    --directory-import-note-surface: #f3f6fb;
    --directory-import-note-text: #61718c;
    --directory-import-workspace-with-preview-before-text: #c5cfdd;
    --directory-linked-date-text: #354c68;
    --directory-linked-popover-border: 1px solid #d8e3f3;
    --directory-linked-popover-item-hover-surface: #f4f8ff;
    --directory-linked-popover-item-text: #243552;
    --directory-linked-popover-panel-border: 1px solid #dce6f4;
    --directory-linked-popover-panel-border-variant-2: 2px solid #f3f6fa;
    --directory-linked-popover-panel-hover-surface: #8f9bab;
    --directory-linked-popover-panel-scrollbar: #aeb8c6 #f3f6fa;
    --directory-linked-popover-panel-surface: #b7c1cf;
    --directory-linked-popover-surface: #f7faff;
    --directory-linked-popover-text: #41628f;
    --directory-linked-secondary-text: #5c6b7c;
    --directory-list-message-error-text: #a43648;
    --directory-list-message-text: #2f6c50;
    --directory-list-table-directory-linked-popover-panel-focus-text: #243552;
    --directory-list-table-directory-name-cell-text: #2f67b8;
    --directory-list-table-focus-border: #c8d8ef;
    --directory-list-table-focus-text: #17233a;
    --directory-list-table-table-action-btn-focus-border: #fff;
    --directory-name-cell-focus-shadow: inset 0 0 0 1px #c9daf4, 0 0 0 3px rgba(70, 124, 196, 0.12);
    --directory-name-cell-focus-surface: #f7faff;
    --directory-note-icon-border: 1px solid #5a78b6;
    --directory-note-icon-text: #4f73ba;
    --directory-preview-empty-border: 1px dashed #d7e1ef;
    --directory-preview-empty-text: #8390a6;
    --directory-preview-remove-hover-text: #233858;
    --directory-preview-remove-text: #52627c;
    --directory-preview-table-text: #5a6680;
    --directory-profile-list-table-icon-save-btn-is-ai-suggested-focus-text: #2f67b8;
    --directory-profile-list-table-icon-save-btn-is-visible-border: #d4ddec;
    --directory-profile-list-table-icon-save-btn-is-visible-hover-border: #efc5ce;
    --directory-profile-list-table-icon-save-btn-is-visible-hover-surface: #fff7f9;
    --directory-profile-list-table-icon-save-btn-is-visible-hover-text: #b3263b;
    --directory-profile-list-table-icon-save-btn-is-visible-text: #8e5360;
    --directory-profile-list-table-is-duplicate-short-name-border: 2px solid #e66b54;
    --directory-profile-list-table-is-duplicate-short-name-focus-border: #e66b54;
    --directory-profile-list-table-is-duplicate-short-name-surface: #fff6f3;
    --directory-profile-list-table-is-duplicate-short-name-text: #a43f31;
    --directory-row-select-focus-border: #c8d8ef;
    --directory-row-select-focus-text: #17233a;
    --directory-row-select-text: #2f67b8;
    --directory-step-num-success-surface: linear-gradient(165deg, #49b3a6 0%, #3aa0c9 50%, #2b5fad 100%);
    --directory-step-toggle-hover-border: #cbd8ea;
    --directory-step-toggle-hover-text: #263b5c;
    --directory-step-toggle-text: #52627c;
    --directory-toolbar-search-border: 1px solid #dfe7f1;
    --directory-toolbar-search-text: #52627c;
    --directory-toolbar-toggle-border: 1px solid #dfe7f1;
    --directory-toolbar-toggle-hover-border: #cbd8ea;
    --directory-toolbar-toggle-hover-text: #263b5c;
    --disclosure-icon-text: #9fd3cc;
    --education-forms-table-is-inactive-row-directory-name-cell-text: #7a879b;
    --entry-subtitle-text: #64748b;
    --getting-started-missing-before-surface: #d94b3d;
    --getting-started-nav-is-active-border: #2f6fb3;
    --getting-started-nav-is-active-surface: #2f6fb3;
    --getting-started-section-head-text: #3f8f55;
    --getting-started-section-is-recommended-getting-started-section-head-text: #9a691c;
    --getting-started-section-is-recommended-getting-started-step-num-text: #b47b16;
    --getting-started-status-is-attention-text: #a86d10;
    --getting-started-status-is-done-text: #3f8f55;
    --getting-started-status-is-todo-text: #b94a48;
    --getting-started-step-num-text: #477f58;
    --grid-activity-change-text: #26334d;
    --grid-activity-changes-border-color: #e3ebf5;
    --grid-activity-item-grid-activity-lesson-card-lesson-card-border: 3px solid var(--lesson-accent, #8fa3bf);
    --grid-activity-item-grid-activity-lesson-card-lesson-card-hover-border: var(--lesson-accent, #8fa3bf);
    --grid-activity-lesson-info-lesson-card-meta-text: #68768d;
    --grid-activity-lesson-title-lesson-card-title-text: #16213a;
    --grid-activity-meta-text: #68768d;
    --grid-calendar-legend-is-heat-low-border: #b7d8df;
    --grid-calendar-legend-is-published-surface: #dcefdc;
    --grid-group-target-hint-text: #9a6b16;
    --grid-group-target-remove-hover-border: #cfdbea;
    --grid-group-target-remove-hover-text: #233858;
    --grid-group-target-remove-text: #465872;
    --grid-group-targets-is-external-target-is-joint-candidate-surface: #fff8e8;
    --grid-group-targets-is-external-target-text: #2f5f62;
    --grid-group-targets-is-joint-candidate-border: #e3c36d;
    --grid-plan-coverage-empty-has-description-text: #3D4A62;
    --grid-plan-coverage-empty-is-success-border: #CDE4D3;
    --grid-plan-coverage-empty-is-success-surface: #F7FBF8;
    --grid-plan-coverage-group-head-surface: linear-gradient(150deg, #2F7D8B 0%, #2D74A0 46%, #365B9D 100%);
    --grid-plan-coverage-hidden-restore-focus-visible-outline: 2px solid #6FAFBA;
    --grid-plan-coverage-hidden-restore-hover-border: #8BBCC5;
    --grid-plan-coverage-hidden-restore-hover-surface: #F0F8FA;
    --grid-plan-coverage-item-is-partial-surface: #FFFEFB;
    --grid-plan-coverage-open-is-active-border: #9ECBD4;
    --grid-plan-coverage-open-is-active-surface: #EFF8FA;
    --grid-plan-coverage-open-is-active-text: #2F6F78;
    --grid-plan-coverage-result-workload-hover-border: #6FAFBA;
    --grid-plan-coverage-result-workload-is-complete-border: #CFE2D3;
    --grid-plan-coverage-result-workload-is-complete-surface: #F2F9F3;
    --grid-plan-coverage-result-workload-is-error-border: #E7B2AE;
    --grid-plan-coverage-result-workload-is-error-surface: #FFF9F8;
    --grid-plan-coverage-result-workload-is-overage-border: #EDC8C5;
    --grid-plan-coverage-result-workload-is-overage-surface: #FFF4F3;
    --grid-plan-coverage-result-workload-is-selected-border: #2F7D8B;
    --grid-plan-coverage-result-workload-is-selected-is-error-text: #FFF8F7;
    --grid-plan-coverage-result-workload-is-selected-surface: #F0F8FA;
    --grid-plan-coverage-result-workload-is-selected-surface-variant-2: linear-gradient(150deg, #2F7D8B 0%, #2D74A0 46%, #365B9D 100%);
    --grid-plan-coverage-result-workload-is-shortage-border: #EAD7A8;
    --grid-plan-coverage-result-workload-is-shortage-surface: #FFF8E8;
    --grid-plan-coverage-scroll-border: 2px solid #F4F7FB;
    --grid-plan-coverage-scroll-scrollbar: #AEB8C6 #F4F7FB;
    --grid-plan-coverage-scroll-surface: #AEB8C6;
    --grid-plan-coverage-status-filters-is-active-after-surface: #54A8A5;
    --grid-plan-coverage-stream-text: #44738A;
    --grid-plan-coverage-summary-state-is-ready-surface: #4B9B61;
    --grid-plan-coverage-summary-state-surface: #D6A52C;
    --grid-plan-coverage-summary-values-is-control-text: #2F6F78;
    --grid-plan-coverage-type-hover-border: #9ECFC6;
    --grid-plan-coverage-type-hover-surface: #F4FAF8;
    --grid-plan-coverage-type-is-complete-surface: #F8FBF9;
    --grid-plan-coverage-type-is-error-border: #E7B2AE;
    --grid-plan-coverage-type-is-pending-border: #EAD7A8;
    --grid-plan-coverage-type-is-selected-border: #2F7D8B;
    --grid-plan-coverage-type-is-selected-grid-plan-coverage-delta-text: #8F241F;
    --grid-plan-coverage-type-is-selected-surface: linear-gradient(150deg, #2F7D8B 0%, #2D74A0 46%, #365B9D 100%);
    --grid-slot-editor-panel-assignment-mode-list-border: 1px solid #dfe7f2;
    --grid-slot-editor-panel-assignment-mode-list-text: #566176;
    --grid-slot-editor-panel-assignment-target-picker-shell-is-joint-mode-border: 1px solid #dce5f1;
    --grid-slot-editor-panel-assignment-target-picker-shell-is-joint-mode-surface: #fcfdff;
    --grid-slot-editor-panel-constraint-editor-panel-constraint-all-day-btn-border: #80bdb7;
    --grid-slot-editor-panel-constraint-editor-panel-constraint-all-day-btn-hover-text: #2f4f84;
    --grid-slot-editor-panel-constraint-editor-panel-constraint-all-day-btn-text: #4f8c84;
    --grid-slot-editor-panel-date-chip-text: #25324a;
    --grid-slot-editor-panel-date-plan-extra-surface: #D92D20;
    --grid-slot-editor-panel-date-preview-box-text: #556176;
    --grid-slot-editor-panel-date-preview-list-border: 2px solid #f3f6fa;
    --grid-slot-editor-panel-date-preview-list-scrollbar: #aeb8c6 #f3f6fa;
    --grid-slot-editor-panel-date-preview-list-surface: #b7c1cf;
    --grid-slot-editor-panel-entry-drag-text: #a9b4c4;
    --grid-slot-editor-panel-entry-order-shadow: 0 0 0 3px #fff;
    --grid-slot-editor-panel-form-grid-date-choice-border: #cdd9ee;
    --grid-slot-editor-panel-form-grid-date-choice-border-variant-2: #78b8b0;
    --grid-slot-editor-panel-form-grid-date-choice-border-variant-3: #efc77c;
    --grid-slot-editor-panel-form-grid-date-choice-surface: #f5f9fb;
    --grid-slot-editor-panel-form-grid-date-choice-surface-variant-2: #f7faff;
    --grid-slot-editor-panel-form-grid-date-choice-surface-variant-3: #eef8f6;
    --grid-slot-editor-panel-form-grid-date-choice-surface-variant-4: #e0aa2d;
    --grid-slot-editor-panel-form-grid-date-choice-text: #34435c;
    --grid-slot-editor-panel-form-grid-date-choice-text-variant-2: #81540e;
    --grid-slot-editor-panel-grid-group-targets-grid-joint-selected-item-border: #e3c36d;
    --grid-slot-editor-panel-grid-group-targets-is-external-target-surface: #fff8e8;
    --grid-slot-editor-panel-grid-group-targets-is-external-target-text: #2f5f62;
    --grid-slot-editor-panel-grid-group-targets-is-joint-selected-list-border: #dfe7f2;
    --grid-slot-editor-panel-grid-group-targets-is-joint-selected-list-text: #3d4e67;
    --grid-slot-editor-panel-grid-group-targets-surface: #f5f8fd;
    --grid-slot-editor-panel-grid-group-targets-text: #44516a;
    --grid-slot-editor-panel-slot-add-entry-dropzone-border: 1px dashed #9ed7d1;
    --grid-slot-editor-panel-slot-add-entry-dropzone-surface: linear-gradient(180deg, #fff, #f7fcfb);
    --grid-slot-editor-panel-slot-editor-alerts-alert-border: #efd5a9;
    --grid-slot-editor-panel-slot-entry-card-is-department-entry-border: 1px solid #d8e2f0;
    --grid-slot-editor-panel-slot-entry-card-is-department-entry-text: #17213a;
    --grid-slot-editor-panel-slot-entry-delete-text: #7f4a56;
    --grid-slot-editor-panel-slot-entry-icon-hover-surface: #f1f5fb;
    --grid-slot-editor-panel-slot-entry-icon-text: #52617a;
    --grid-slot-editor-panel-slot-rule-tabs-is-active-surface: #f1fbf9;
    --grid-slot-editor-panel-slot-rule-tabs-text: #536079;
    --grid-slot-editor-panel-slot-subject-type-group-slot-field-type-hover-surface: #8f9bab;
    --grid-xlsx-draft-card-text: #17243b;
    --grid-xlsx-draft-debug-item-border: #b8c7d9;
    --grid-xlsx-draft-debug-item-is-error-border: #c93a4f;
    --grid-xlsx-draft-debug-item-is-error-surface: #fff3f4;
    --grid-xlsx-draft-debug-item-is-success-border: #45a864;
    --grid-xlsx-draft-debug-item-is-success-surface: #f3fbf5;
    --grid-xlsx-draft-debug-item-is-warning-border: #d9ad3d;
    --grid-xlsx-draft-debug-item-is-warning-surface: #fff9eb;
    --grid-xlsx-draft-debug-item-text: #22314a;
    --grid-xlsx-draft-debug-item-text-variant-2: #43536e;
    --grid-xlsx-draft-debug-text: #66758d;
    --grid-xlsx-draft-field-border: #d7e2f0;
    --grid-xlsx-draft-field-border-variant-2: #cfd9e8;
    --grid-xlsx-draft-field-surface: #f7faff;
    --grid-xlsx-draft-field-text: #5d687a;
    --grid-xlsx-draft-field-text-variant-2: #12203a;
    --grid-xlsx-draft-field-text-variant-3: #263650;
    --grid-xlsx-draft-message-border: #cfe0f6;
    --grid-xlsx-draft-message-is-error-border: #f0c2c2;
    --grid-xlsx-draft-message-is-error-text: #a72d2d;
    --grid-xlsx-draft-message-is-ok-border: #ccebd5;
    --grid-xlsx-draft-message-is-ok-surface: #effaf3;
    --grid-xlsx-draft-message-is-ok-text: #1f7b45;
    --grid-xlsx-draft-message-is-warning-border: #f0dcaa;
    --grid-xlsx-draft-message-is-warning-text: #8a6410;
    --grid-xlsx-draft-message-surface: #eef6ff;
    --grid-xlsx-draft-message-text: #2459a6;
    --grid-xlsx-draft-open-is-commercial-locked-border: #d8e0eb;
    --grid-xlsx-draft-open-is-commercial-locked-text: #68778e;
    --grid-xlsx-draft-panel-icon-btn-text: #52617a;
    --grid-xlsx-draft-panel-slot-editor-head-text: #101b33;
    --grid-xlsx-draft-stats-border: #e0eaf6;
    --grid-xlsx-draft-stats-text: #12203a;
    --grid-xlsx-draft-stats-text-variant-2: #66758d;
    --grid-xlsx-draft-unplaced-border: #f0d4cf;
    --grid-xlsx-draft-unplaced-head-text: #8f352d;
    --grid-xlsx-draft-unplaced-head-text-variant-2: #6f2b27;
    --grid-xlsx-draft-unplaced-head-text-variant-3: #9a584f;
    --grid-xlsx-draft-unplaced-meta-text: #66758d;
    --grid-xlsx-draft-unplaced-more-text: #8f5b54;
    --grid-xlsx-draft-unplaced-reasons-border: #edc8c2;
    --grid-xlsx-draft-unplaced-reasons-surface: #fff3f1;
    --grid-xlsx-draft-unplaced-reasons-text: #8f352d;
    --grid-xlsx-draft-unplaced-row-border: #f2d8d3;
    --grid-xlsx-draft-unplaced-row-border-variant-2: #c93a4f;
    --grid-xlsx-draft-unplaced-surface: #fff8f6;
    --grid-xlsx-draft-unplaced-title-text: #18243b;
    --group-actions-menu-border: 1px solid #dce6f2;
    --group-actions-menu-btn-text: #3f506a;
    --group-actions-menu-text-action-hover-surface: #f4f8fd;
    --group-name-link-text: #245fc6;
    --group-profile-badge-text: #17415c;
    --groups-editor-block-text: #2c3e56;
    --groups-editor-grid-text: #d53f56;
    --groups-import-issues-text: #9b3b3b;
    --groups-import-row-existing-surface: #fafafa;
    --groups-import-row-invalid-surface: #fff7f7;
    --groups-import-summary-border: 1px solid #dfe7f3;
    --groups-import-summary-text: #14233b;
    --groups-import-summary-text-variant-2: #637089;
    --groups-import-table-text: #4f6078;
    --groups-import-table-text-variant-2: #64748b;
    --groups-list-table-group-tree-count-surface: #edf2fa;
    --groups-list-table-group-tree-count-text: #66758c;
    --icon-btn-border: 1px solid #dfe7f2;
    --icon-btn-surface: #f4f7fc;
    --icon-btn-text: #22314d;
    --icon-save-btn-border: 1px solid #cddbf1;
    --icon-save-btn-hover-surface: #dfe9fb;
    --icon-save-btn-surface: #edf3ff;
    --icon-save-btn-text: #1f4e92;
    --impersonation-banner-border: 1px solid #d7e0ec;
    --impersonation-banner-btn-border: 1px solid #dce5f1;
    --impersonation-banner-btn-text: #31435f;
    --impersonation-banner-surface: #eef3f8;
    --impersonation-banner-text: #52627a;
    --impersonation-banner-text-variant-2: #2d3950;
    --import-review-metric-is-warning-text: #B94A48;
    --inline-action-message-error-text: #b74d43;
    --inline-action-message-ok-text: #1f6b44;
    --inline-link-hover-text: #234f90;
    --inline-link-text: #2f67b8;
    --list-item-is-selected-border: #7eb0e7;
    --mfa-qr-code-border: 1px solid #dfe7f1;
    --mfa-qr-code-text: #65728a;
    --organization-ai-active-delete-note-text: #7a879b;
    --organization-ai-assignment-form-text: #4f5f78;
    --organization-ai-badge-is-active-border: #c9daf1;
    --organization-ai-badge-is-active-text: #45669d;
    --organization-ai-badge-is-disabled-text: #7a879b;
    --organization-ai-badge-is-enabled-text: #39794c;
    --organization-ai-badge-text: #667389;
    --organization-ai-balance-card-border: 1px solid #dfe6f0;
    --organization-ai-balance-card-is-assigned-border: #99cbdc;
    --organization-ai-balance-card-status-chip-text: #68768b;
    --organization-ai-balance-details-text: #7a879b;
    --organization-ai-balance-primary-text: #68768b;
    --organization-ai-balance-toolbar-text: #4f5f78;
    --organization-ai-block-border: 1px solid #edf1f6;
    --organization-ai-block-text: #68768b;
    --organization-ai-connection-card-is-active-border: #8fb1df;
    --organization-ai-connection-status-is-danger-border: #efcece;
    --organization-ai-connection-status-is-danger-text: #a33f3f;
    --organization-ai-connection-status-is-success-text: #39794c;
    --organization-ai-connection-status-text: #667389;
    --organization-ai-connections-empty-surface: #fafbfd;
    --organization-ai-connections-empty-text: #68768b;
    --organization-ai-connections-empty-text-variant-2: #34425a;
    --organization-ai-current-border: 1px solid #dce8f1;
    --organization-ai-current-label-text: #6d7b91;
    --organization-ai-current-surface: #f7fbfd;
    --organization-ai-eyebrow-text: #7a879b;
    --organization-ai-history-edit-text: #315ea8;
    --organization-ai-history-entry-border: 1px solid #edf1f6;
    --organization-ai-history-entry-status-chip-text: #68768b;
    --organization-ai-history-entry-text: #45546d;
    --organization-ai-history-form-border: 1px solid #e3eaf3;
    --organization-ai-history-list-border: 1px solid #edf1f6;
    --organization-ai-load-error-border: #efcece;
    --organization-ai-load-error-surface: #fff6f6;
    --organization-ai-load-error-text: #953d3d;
    --organization-ai-loading-text: #68768b;
    --organization-ai-no-fallback-border: 1px solid #d8e3f3;
    --organization-ai-no-fallback-is-error-border: #efcece;
    --organization-ai-no-fallback-is-error-surface: #fff6f6;
    --organization-ai-no-fallback-is-error-text: #953d3d;
    --organization-ai-no-fallback-surface: #f4f7fc;
    --organization-ai-no-fallback-text: #47566e;
    --organization-ai-section-head-text: #68768b;
    --organization-ai-source-usage-text: #68768b;
    --organization-ai-status-is-error-border: #f0cece;
    --organization-ai-status-is-error-surface: #fff6f6;
    --organization-ai-status-is-error-text: #a83d3d;
    --organization-ai-status-is-success-border: 1px solid #cfe7dc;
    --organization-ai-status-is-success-surface: #f3fbf7;
    --organization-ai-status-is-success-text: #276749;
    --organization-ai-zero-warning-accent: #315ea8;
    --organization-ai-zero-warning-border: 1px solid #efcf9d;
    --organization-ai-zero-warning-surface: #fffaf1;
    --organization-ai-zero-warning-text: #795313;
    --organization-publication-panel-is-commercial-locked-border: #d9e3f1;
    --organization-publication-panel-is-commercial-locked-directory-step-num-surface: #edf2f8;
    --organization-publication-panel-is-commercial-locked-directory-step-num-text: #687991;
    --organization-publication-panel-is-commercial-locked-directory-step-toggle-disabled-text: #697890;
    --organization-publication-vk-log-status-is-failure-text: #b94a48;
    --organization-publication-vk-status-is-failure-text: #b94a48;
    --organization-user-action-group-border: 1px solid #dfe7f1;
    --organization-user-action-group-text: #33425c;
    --organization-user-drawer-text: #68758b;
    --organization-user-secret-border: 1px solid #a9c8b6;
    --organization-user-secret-surface: #f1faf5;
    --organization-user-secret-text: #254a34;
    --organization-user-secret-text-variant-2: #173e27;
    --organization-user-summary-border: 1px solid #e1e7f0;
    --preview-name-hint-text: #677990;
    --profile-level-group-title-text: #51647e;
    --profile-picker-add-btn-hover-text: #253f68;
    --profile-picker-add-btn-text: #4a6284;
    --profile-picker-container-border: 1px solid #dce5f1;
    --profile-picker-container-surface: #fcfdff;
    --profile-picker-empty-text: #6f8096;
    --profile-picker-result-border: 1px solid #eef2f8;
    --profile-picker-result-hint-text: #9a6b16;
    --profile-picker-result-hover-surface: #f3f8ff;
    --profile-picker-result-is-joint-candidate-border: 1px solid #ead796;
    --profile-picker-result-is-joint-candidate-hover-surface: #fff6df;
    --profile-picker-result-meta-text: #687b96;
    --profile-picker-result-name-text: #1f2e44;
    --profile-picker-search-input-border: 1px solid #d7e1ef;
    --profile-picker-search-input-focus-surface: #fcfeff;
    --profile-picker-search-input-text: #25364d;
    --profile-picker-search-input-text-variant-2: #7b8ba1;
    --profile-selected-direction-text: #6f8198;
    --profile-selected-item-border: 1px solid #dfe8f4;
    --profile-selected-name-text: #2a3f5f;
    --profile-selected-remove-hover-border: #cfdbea;
    --profile-selected-remove-hover-text: #233858;
    --profile-selected-remove-text: #465872;
    --schedules-action-btn-hover-border: #c7d4e7;
    --schedules-action-btn-hover-text: #263b5c;
    --schedules-action-danger-hover-border: #efc5ce;
    --schedules-action-danger-hover-surface: #fff7f9;
    --schedules-action-danger-hover-text: #b3263b;
    --schedules-action-danger-text: #8e5360;
    --schedules-archive-toggle-text: #596a82;
    --schedules-clickable-row-focus-outline: 2px solid #9bb7e4;
    --schedules-conflict-is-ok-text: #2f7b48;
    --schedules-conflict-is-warn-text: #8b5d18;
    --schedules-context-card-border: 1px solid #dfe7f1;
    --schedules-context-card-schedules-context-icon-main-surface: #eeeeff;
    --schedules-context-card-schedules-context-icon-main-text: #4b46e8;
    --schedules-context-card-title-text: #172238;
    --schedules-context-icon-fork-surface: #fbf5e5;
    --schedules-context-icon-fork-text: #9b7418;
    --schedules-context-icon-main-surface: #e9eefb;
    --schedules-context-icon-main-text: #385ca0;
    --schedules-context-meta-before-surface: #77869a;
    --schedules-context-meta-text: #66758b;
    --schedules-context-note-text: #7b899b;
    --schedules-context-subtitle-text: #536882;
    --schedules-context-table-wrap-border: 1px solid #eef2f7;
    --schedules-context-title-text: #1f2f48;
    --schedules-create-field-focus-border: #a9bedc;
    --schedules-create-section-text: #33445d;
    --schedules-create-settings-note-text: #64758d;
    --schedules-create-source-field-directory-combobox-search-disabled-border: #e1e8f1;
    --schedules-create-source-field-directory-combobox-search-disabled-text: #8b99ac;
    --schedules-drawer-archive-schedules-archive-toggle-text: #385ca0;
    --schedules-drawer-card-hover-border: #c8d7ec;
    --schedules-drawer-card-published-hover-surface: linear-gradient(90deg, #49b3a6 0%, #3aa0c9 58%, #2b5fad 100%) 0 0 / 100% 4px no-repeat, #fbfdff;
    --schedules-drawer-card-published-surface: linear-gradient(90deg, #49b3a6 0%, #3aa0c9 58%, #2b5fad 100%) 0 0 / 100% 4px no-repeat, #fff;
    --schedules-filters-grid-text: #2d3f5b;
    --schedules-list-head-text: #172238;
    --schedules-period-labels-draft-text: #6f7f94;
    --schedules-period-labels-main-schedules-period-label-shadow: inset 0 0 0 1px #d8e3f1;
    --schedules-period-labels-main-schedules-period-label-text: #2f496b;
    --schedules-period-text: #354c68;
    --schedules-pin-text: #3aa0c9;
    --schedules-publication-day-production-calendar-day-focus-visible-outline: 2px solid #1f2a44;
    --schedules-publication-legend-is-published-surface: #dcefdc;
    --schedules-publication-preset-btn-is-active-border: #7b9ae8;
    --schedules-publication-preset-btn-is-active-text: #36579d;
    --schedules-publication-preset-btn-text: #31405d;
    --schedules-publication-recommendation-border: 1px solid #ead39b;
    --schedules-publication-recommendation-text: #74551b;
    --schedules-publication-status-trigger-hover-border: #7db48b;
    --schedules-publication-status-trigger-hover-surface: #e4f4e7;
    --schedules-publication-status-trigger-hover-text: #2f6e42;
    --schedules-row-fork-schedules-context-cell-before-surface: #dce3ee;
    --schedules-row-fork-schedules-period-labels-draft-schedules-period-label-hover-shadow: inset 0 0 0 1px #e1e8f2;
    --schedules-row-fork-schedules-period-labels-draft-schedules-period-label-hover-text: #405572;
    --schedules-row-fork-schedules-period-text: #4e6179;
    --schedules-status-mark-border: 2px solid #fff;
    --schedules-status-mark-published-surface: #35a864;
    --schedules-table-border: 1px solid #edf1f6;
    --schedules-table-schedules-row-fork-surface: #fcfdff;
    --schedules-table-text: #41516d;
    --schedules-version-empty-text: #728197;
    --schedules-version-icon-archive-text: #2f63d8;
    --schedules-version-icon-draft-surface: #fff4e5;
    --schedules-version-icon-draft-text: #d98216;
    --schedules-version-icon-main-surface: #e9f8ee;
    --schedules-version-icon-main-text: #18a04f;
    --schedules-version-icon-published-surface: #e9f8ee;
    --schedules-version-icon-published-text: #18a04f;
    --schedules-version-title-text: #172238;
    --schedules-version-updated-text: #9aa4b5;
    --schedules-workspace-schedules-updated-cell-schedules-presence-label-text: #376f46;
    --slot-add-inline-border: 1px solid #dce7fa;
    --slot-combo-result-hover-surface: #f3f7fd;
    --slot-combo-result-text: #22304a;
    --slot-combo-result-text-variant-2: #7a8698;
    --slot-combo-results-hover-surface: #8f9bab;
    --slot-content-note-border: 1px solid #dfe9fb;
    --slot-content-note-border-variant-2: 1px solid #8fb2f2;
    --slot-content-note-text: #2f66d8;
    --slot-editor-context-chip-text: #31435f;
    --slot-editor-day-label-surface: #ffe478;
    --slot-editor-day-label-text: #101827;
    --slot-editor-lock-icon-surface: #f3f7fc;
    --slot-editor-lock-icon-text: #2f66d8;
    --slot-editor-lock-icon-text-variant-2: #6c7b93;
    --slot-editor-lock-state-is-warning-surface: #fff4d7;
    --slot-editor-lock-state-is-warning-text: #94640c;
    --slot-editor-lock-state-text: #556680;
    --slot-editor-pair-label-surface: #f1f5fb;
    --slot-editor-pair-label-text: #24334f;
    --slot-entry-card-lesson-exam-border: #d56b6b;
    --slot-entry-card-lesson-lab-border: #d9ad3d;
    --slot-entry-delete-border: 1px solid #f0c5ce;
    --slot-entry-delete-surface: #fff8f9;
    --slot-entry-delete-text: #9a4152;
    --slot-section-title-surface: #f1f5fb;
    --slot-section-title-text: #111c34;
    --slot-section-title-text-variant-2: #3f4e68;
    --slot-summary-card-border: 1px solid #dde7f5;
    --slot-summary-card-is-active-border: #74a4ef;
    --slot-summary-card-is-active-shadow: inset 4px 0 0 #2f66d8;
    --slot-summary-card-is-active-surface: linear-gradient(90deg, #f7faff 0%, #fff 58%);
    --slot-summary-card-text: #21304d;
    --slot-summary-extra-text: #324362;
    --slot-summary-index-text: #66758d;
    --slot-summary-more-text: #50617d;
    --slot-summary-sub-text: #384860;
    --slot-summary-title-text: #111c34;
    --slot-summary-type-before-surface: #2f66d8;
    --slot-summary-type-text: #2d62ca;
    --study-plan-batch-message-text: #66748c;
    --study-plan-batch-status-is-error-text: #b94a48;
    --study-plan-batch-status-is-requires-correct-export-text: #7a5a18;
    --study-plan-department-confirm-btn-border: #f0c766;
    --study-plan-department-confirm-btn-text: #705216;
    --study-plan-department-similar-border: 1px solid #f2d28a;
    --study-plan-department-similar-label-text: #927229;
    --study-plan-department-similar-text: #6f551d;
    --study-plan-json-list-border: 1px solid #e2e9f3;
    --study-plan-profile-input-focus-border: #9fb8df;
    --study-plan-profile-input-info-text: #66748c;
    --study-plan-profile-input-meta-text: #66748c;
    --study-plan-upload-progress-head-text: #62708a;
    --system-ai-compatibility-row-is-failed-system-ai-compatibility-status-surface: #fff0ed;
    --system-ai-confirmation-border: 1px solid #edc4ca;
    --system-ai-confirmation-surface: #fff8f9;
    --system-ai-confirmation-text: #7f2736;
    --system-ai-confirmation-text-variant-2: #68424a;
    --system-ai-health-dot-surface: #9aa5b5;
    --table-action-btn-border: 1px solid #d4ddec;
    --table-action-btn-hover-border: #c3d0e5;
    --table-action-btn-table-action-danger-hover-border: #efc5ce;
    --table-action-btn-table-action-danger-hover-surface: #fff7f9;
    --table-action-btn-table-action-danger-hover-text: #b3263b;
    --table-action-btn-table-action-danger-text: #8e5360;
    --table-action-btn-table-action-restore-hover-border: #cce5d7;
    --table-action-btn-table-action-restore-hover-surface: #f5fbf7;
    --table-action-btn-table-action-restore-hover-text: #2f7a56;
    --table-action-btn-table-action-restore-text: #3e6b54;
    --table-action-btn-text: #3a4f70;
    --table-inline-input-focus-border: #c8d8ef;
    --table-inline-input-focus-text: #17233a;
    --table-inline-link-hover-text: #234d9f;
    --table-inline-link-text: #3c66bd;
    --teacher-linked-departments-text: #5c6b7c;
    --teachers-source-table-is-imported-surface: #f7fbf8;
    --text-action-danger-hover-text: #ba2f44;
    --trusted-device-choice-accent: #467cc4;
    --trusted-device-choice-focus-border: #7b9ae8;
    --usage-dialog-body-text: #566b88;
    --usage-dialog-title-text: #263a57;
    --xlsx-group-result-head-surface: #f6f9fd;
    --xlsx-preview-debug-entry-border: 4px solid #8fa1ba;
    --xlsx-preview-debug-entry-is-error-surface: #fff6f7;
    --xlsx-preview-debug-entry-is-progress-border: #2f78bd;
    --xlsx-preview-debug-entry-is-progress-surface: #f6fbff;
    --xlsx-preview-debug-entry-is-success-border: #2e8a66;
    --xlsx-preview-debug-entry-is-success-surface: #f4fbf7;
    --xlsx-preview-debug-entry-text: #24364d;
    --xlsx-preview-grid-panel-grid-sheet-tabs-bar-border: 1px solid #dfe7f1;
    --xlsx-preview-grid-panel-xlsx-preview-lesson-card-xlsx-preview-lesson-dates-text: #2f6f95;
    --xlsx-preview-grid-table-surface: #f6f9fd;
    --xlsx-preview-grid-table-text: #334762;
    --xlsx-preview-lesson-card-border: 1px solid #dce6f3;
    --xlsx-preview-lesson-card-is-requires-review-surface: #fff9ef;
    --xlsx-preview-lesson-card-surface: #f9fbff;
    --xlsx-preview-lesson-popover-border: 1px solid #cbd9ec;
    --xlsx-preview-lesson-popover-head-border: 1px solid #e3ebf5;
    --xlsx-preview-lesson-warning-text: #9a5c0f;
    --xlsx-preview-schema-text: #355273;
    --xlsx-preview-status-badge-surface: #fff1db;
    --xlsx-preview-status-badge-text: #9a5c0f;
    --xlsx-preview-type-badge-lab-surface: #f2edff;
    --xlsx-preview-type-badge-lab-text: #7155b7;
    --xlsx-preview-type-badge-lecture-surface: #e7f1ff;
    --xlsx-preview-type-badge-practice-surface: #ecf8f5;
    --xlsx-preview-type-badge-text: #48617e;
    --xlsx-structure-group-hover-border: #9fc7eb;
    --xlsx-structure-group-text: #355273;
    --xlsx-structure-sheet-surface: #f6f9fd;
    --xlsx-structure-sheet-text: #355273;

    /* Features residual semantic paint contracts. */
    --features-0-surface: rgba(73, 179, 166, 0.18);
    --features-78-surface: rgba(73, 179, 166, 0.18);
    --features-app-shell-data-active-nav-groups-app-sidebar-hover-shadow: 18px 0 36px rgba(14, 32, 62, 0.18);
    --features-app-shell-data-active-nav-schedules-app-sidebar-hover-shadow: 18px 0 36px rgba(14, 32, 62, 0.18);
    --features-body-has-grid-workspace-app-sidebar-hover-shadow: 18px 0 36px rgba(14, 32, 62, 0.18);
    --features-auth-screen-before-surface: linear-gradient(135deg, rgba(73, 179, 166, 0.72) 0%, rgba(58, 160, 201, 0.66) 50%, rgba(43, 95, 173, 0.74) 100%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    --features-auth-card-surface: rgba(255, 255, 255, 0.94);
    --features-auth-card-border: 1px solid rgba(220, 227, 238, 0.9);
    --features-auth-card-shadow: 0 16px 44px rgba(31, 42, 68, 0.12);
    --features-auth-form-form-control-focus-outline: 3px solid rgba(94, 172, 179, .16);
    --features-auth-form-form-control-focus-border-color: rgba(94, 172, 179, .7);
    --features-mfa-code-digit-focus-outline: 3px solid rgba(94, 172, 179, .16);
    --features-mfa-code-digit-focus-border-color: rgba(94, 172, 179, .7);
    --features-xlsx-preview-hint-box-textarea-focus-shadow: 0 0 0 3px rgba(56, 164, 198, 0.12);
    --features-xlsx-preview-lesson-card-shadow: 0 2px 8px rgba(28, 42, 65, 0.06);
    --features-xlsx-preview-lesson-popover-shadow: 0 18px 42px rgba(25, 45, 75, 0.2);
    --features-grid-xlsx-draft-card-shadow: 0 8px 18px rgba(31, 48, 76, 0.035);
    --features-grid-plan-coverage-side-shadow: -8px 0 22px rgba(31, 42, 68, 0.12);
    --features-grid-plan-coverage-side-is-controls-preview-grid-plan-coverage-controls-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
    --features-grid-plan-coverage-view-button-is-active-shadow: 0 1px 3px rgba(31, 42, 68, 0.08);
    --features-grid-plan-coverage-toast-getting-started-tour-toast-shadow: 0 1px 2px rgba(16, 24, 40, 0.04),
            0 1px 3px rgba(16, 24, 40, 0.08);
    --features-grid-plan-coverage-directory-action-focus-visible-shadow: 0 0 0 2px rgba(75, 142, 154, 0.2);
    --features-grid-plan-coverage-result-workload-hover-grid-plan-coverage-result-workload-focus-visibl-shadow: inset 0 0 0 1px rgba(78, 145, 157, 0.18);
    --features-grid-plan-coverage-result-workload-is-selected-grid-plan-coverage-result-workload-is-sel-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    --features-grid-plan-coverage-group-head-border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    --features-grid-plan-coverage-group-name-small-text: rgba(255, 255, 255, 0.82);
    --features-grid-plan-coverage-group-result-small-text: rgba(255, 255, 255, 0.82);
    --features-grid-plan-coverage-type-coverage-color: #76B6B6;
    --features-grid-plan-coverage-type-is-lecture-coverage-color: #4faf69;
    --features-grid-plan-coverage-type-is-practice-coverage-color: #6aa7e8;
    --features-grid-plan-coverage-type-is-lab-coverage-color: #d9ad3d;
    --features-grid-plan-coverage-type-is-credit-coverage-color: #d9ad3d;
    --features-grid-plan-coverage-type-is-exam-coverage-color: #d56b6b;
    --features-grid-plan-coverage-type-is-consultation-coverage-color: #4fb6a8;
    --features-grid-plan-coverage-type-is-selected-grid-plan-coverage-type-is-selected-hover-grid-plan--shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    --features-grid-plan-coverage-type-is-selected-grid-plan-coverage-fix-border-top-color: rgba(255, 255, 255, 0.2);
    --features-constraints-header-actions-constraints-filter-search-focus-shadow: 0 0 0 2px rgba(70, 124, 196, 0.12);
    --features-constraint-card-unavailable-constraint-rule-chip-border-color: rgba(185, 74, 72, 0.2);
    --features-constraint-card-not-preferred-constraint-rule-chip-border-color: rgba(214, 175, 88, 0.28);
    --features-slot-editor-actions-surface: rgba(255, 255, 255, 0.96);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-accent: #6fb56f;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-bg: #edf7ed;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-bg-hover: #e7f3e7;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-accent: #7b9ae8;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-bg: #eef3ff;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-bg-hover: #e8efff;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-accent: #d6af58;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-bg: #fff7e8;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-bg-hover: #fff2d9;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-accent: #d97a6c;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-bg: #fff0ee;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-bg-hover: #ffe9e6;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-accent: #76b6b6;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-bg: #eef8f8;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-bg-hover: #e6f4f4;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-accent: #8fa3bf;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-bg: #f7fbff;
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-bg-hover: #f2f7ff;
    --features-lesson-card-is-activity-highlight-outline: 3px solid rgba(58, 160, 201, 0.28);
    --features-lesson-card-is-activity-highlight-shadow: 0 0 0 1px rgba(58, 160, 201, 0.28);
    --features-grid-slot-editor-panel-form-grid-input-focus-grid-slot-editor-panel-form-grid-select-foc-shadow: 0 0 0 2px rgba(58, 160, 201, 0.14);
    --features-slot-combo-results-shadow: 0 12px 28px rgba(28, 41, 64, 0.14);
    --features-grid-slot-editor-panel-date-plan-extra-shadow: 0 1px 2px rgba(217, 45, 32, 0.22);
    --features-grid-slot-editor-panel-form-grid-date-choice-context-focus-visible-outline: 2px solid rgba(73, 179, 166, .35);
    --features-ai-model-refresh-btn-hover-ai-model-refresh-btn-focus-visible-shadow: 0 0 0 4px rgba(70, 124, 196, 0.12);
    --features-ai-usage-level-border-top: 1px solid rgba(105, 123, 150, 0.16);
    --features-ai-test-result-head-border-bottom: 1px solid rgba(105, 123, 150, 0.16);
    --features-grid-slot-editor-panel-slot-entry-card-shadow: 0 8px 18px rgba(31, 48, 76, 0.035);
    --features-study-plan-list-card-is-active-surface: linear-gradient(90deg, rgba(115, 184, 180, .16), rgba(77, 113, 184, .12));
    --features-study-plan-list-card-is-active-border-color: rgba(77, 113, 184, .22);
    --features-study-plan-list-card-is-active-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --features-nav-start-close-text: rgba(61, 50, 0, 0.72);
    --features-nav-start-close-hover-nav-start-close-focus-visible-nav-start-close-active-surface: rgba(61, 50, 0, 0.1);
    --features-getting-started-nav-span-surface: rgba(31, 42, 68, 0.08);
    --features-getting-started-nav-a-is-active-span-surface: rgba(255, 255, 255, 0.18);
    --features-directory-step-toggle-hover-directory-step-toggle-focus-visible-shadow: 0 6px 16px rgba(43, 95, 173, 0.08);
    --features-directory-toolbar-panel-shadow: 0 12px 30px rgba(31, 48, 76, 0.055);
    --features-directory-toolbar-search-focus-within-shadow: 0 0 0 4px rgba(70, 124, 196, 0.12);
    --features-directory-toolbar-toggle-hover-directory-toolbar-toggle-focus-visible-shadow: 0 6px 16px rgba(43, 95, 173, 0.08);
    --features-directory-combobox-results-shadow: 0 18px 38px rgba(29, 39, 56, 0.12);
    --features-custom-select-inline-custom-select-control-focus-custom-select-inline-is-open-custom-sel-shadow: 0 0 0 3px rgba(91, 125, 188, 0.14);
    --features-status-chip-will-add-status-surface: #e8f6ee;
    --features-status-chip-will-add-status-text: #1f7148;
    --features-status-chip-excluded-status-surface: #f1f4f8;
    --features-status-chip-excluded-status-text: #657187;
    --features-status-chip-exact-confirmed-status-surface: #dff3e7;
    --features-status-chip-exact-confirmed-status-text: #22643f;
    --features-status-chip-unmatched-status-surface: #f7e9ea;
    --features-status-chip-unmatched-status-text: #93424a;
    --features-status-chip-duplicate-in-list-status-surface: #fff5e8;
    --features-status-chip-duplicate-in-list-status-text: #8f5e14;
    --features-status-chip-already-exists-status-chip-already-on-department-status-chip-already-on-dire-status-surface: #eef3ff;
    --features-status-chip-already-exists-status-chip-already-on-department-status-chip-already-on-dire-status-text: #2f5193;
    --features-status-chip-exists-system-link-status-surface: #e8f6ee;
    --features-status-chip-exists-system-link-status-text: #1f7148;
    --features-status-chip-similar-exists-status-surface: #fff8e9;
    --features-status-chip-similar-exists-status-text: #8b6723;
    --features-status-chip-invalid-status-surface: #fdecef;
    --features-status-chip-invalid-status-text: #921f35;
    --features-status-chip-archived-status-border: #dce4ee;
    --features-status-chip-archived-status-surface: #f1f4f8;
    --features-status-chip-archived-status-text: #657187;
    --features-status-chip-published-status-border: #cfeade;
    --features-status-chip-published-status-surface: #eaf7f0;
    --features-status-chip-published-status-text: #1d6b4f;
    --features-status-chip-draft-status-border: #dce6f2;
    --features-status-chip-draft-status-surface: #f2f6fb;
    --features-status-chip-draft-status-text: #3f5878;
    --features-status-chip-work-status-border: #cfe4f0;
    --features-status-chip-work-status-surface: #edf7fb;
    --features-status-chip-work-status-text: #25618e;
    --features-status-chip-review-status-border: #ead9b6;
    --features-status-chip-review-status-surface: #fff7e8;
    --features-status-chip-review-status-text: #74551e;
    --features-usage-dialog-shadow: 0 12px 30px rgba(20, 42, 74, 0.18);
    --features-directory-list-table-input-type-text-focus-shadow: 0 0 0 3px rgba(91, 125, 188, 0.14);
    --features-directory-list-table-tbody-tr-focus-within-input-type-text-directory-list-table-tbody-tr-border-color: rgba(255, 255, 255, 0.86);
    --features-directory-list-table-tbody-tr-focus-within-input-type-text-directory-list-table-tbody-tr-shadow: 0 8px 22px rgba(27, 71, 133, 0.18);
    --features-directory-list-table-tbody-tr-focus-within-table-action-btn-directory-list-table-tbody-t-border-color: rgba(255, 255, 255, 0.72);
    --features-directory-linked-popover-panel-shadow: 0 16px 40px rgba(32, 55, 92, 0.16);
    --features-directory-list-table-tbody-tr-focus-within-directory-linked-date-directory-list-table-tb-text: rgba(255, 255, 255, 0.86);
    --features-directory-list-table-tbody-tr-focus-within-directory-linked-popover-summary-border-color: rgba(255, 255, 255, 0.72);
    --features-directory-list-table-tbody-tr-focus-within-directory-linked-popover-summary-surface: rgba(255, 255, 255, 0.18);
    --features-inline-link-border-bottom: 1px dotted rgba(47, 103, 184, 0.45);
    --features-inline-link-hover-border-bottom-color: rgba(35, 79, 144, 0.55);
    --features-directory-row-select-focus-shadow: 0 0 0 3px rgba(91, 125, 188, 0.14);
    --features-directory-list-table-tbody-tr-focus-within-directory-name-cell-input-directory-list-tabl-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 8px 22px rgba(27, 71, 133, 0.18);
    --features-directory-list-table-tbody-tr-focus-within-custom-select-inline-custom-select-control-border-color: rgba(255, 255, 255, 0.86);
    --features-directory-list-table-tbody-tr-focus-within-custom-select-inline-custom-select-control-shadow: 0 8px 22px rgba(27, 71, 133, 0.18);
    --features-directory-profile-list-table-input-is-duplicate-short-name-focus-directory-profile-list--shadow: 0 0 0 2px rgba(230, 107, 84, .14);
    --features-directory-profile-dot-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
    --features-groups-list-panel-shadow: 0 8px 24px rgba(31, 48, 76, 0.045);
    --features-groups-editor-panel-slot-editor-panel-shadow: -14px 0 28px rgba(32, 48, 76, 0.08);
    --features-teachers-source-table-status-chip-imported-status-surface: #eef8ef;
    --features-teachers-source-table-status-chip-imported-status-text: #4b8f5d;
    --features-teachers-source-table-status-chip-matched-status-surface: #eef3ff;
    --features-teachers-source-table-status-chip-matched-status-text: #2f5193;
    --features-teachers-source-table-status-chip-missing-status-surface: #fff5e8;
    --features-teachers-source-table-status-chip-missing-status-text: #8f5e14;
    --features-profile-picker-search-input-focus-shadow: 0 0 0 3px rgba(70, 124, 196, 0.14);
    --features-group-actions-menu-shadow: 0 12px 30px rgba(31, 48, 76, 0.14);
    --features-table-inline-input-focus-shadow: 0 0 0 3px rgba(91, 125, 188, 0.14);
    --features-schedules-status-mark-shadow: 0 1px 3px rgba(25, 43, 72, 0.14);
    --features-schedules-action-btn-surface: rgba(255, 255, 255, 0.94);
    --features-schedules-action-btn-hover-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    --features-schedules-context-card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04),
            0 1px 1px rgba(16, 24, 40, 0.02);
    --features-schedules-create-menu-btn-border-left-color: rgba(255, 255, 255, 0.28);
    --features-schedules-search-focus-within-shadow: 0 0 0 3px rgba(70, 124, 196, 0.11);
    --features-schedules-detail-panel-slot-editor-panel-shadow: -8px 0 18px rgba(16, 24, 40, 0.06),
            -1px 0 0 rgba(16, 24, 40, 0.04);
    --features-schedules-publication-panel-slot-editor-panel-shadow: -8px 0 18px rgba(16, 24, 40, 0.06),
            -1px 0 0 rgba(16, 24, 40, 0.04);
    --features-admin-organization-disclosure-toggle-focus-visible-outline: 2px solid rgba(58, 160, 201, 0.34);
    --features-organization-ai-balance-card-is-assigned-shadow: 0 0 0 1px rgba(58, 160, 201, 0.08);
    --features-admin-organization-user-delete-slot-entry-delete-link-text: rgba(164, 54, 72, 0.48);
    --features-status-chip-status-chip-muted-status-border: #e4eaf3;
    --features-status-chip-status-chip-muted-status-surface: #f2f5f9;
    --features-status-chip-status-chip-muted-status-text: #657187;
    --features-study-plan-profile-input-select-focus-shadow: 0 0 0 3px rgba(91, 125, 188, 0.14);
    --features-schedules-drawer-card-focus-visible-outline: 2px solid rgba(47, 99, 216, 0.18);
    --features-schedules-create-field-input-focus-shadow: 0 0 0 3px rgba(47, 99, 216, 0.12);
    --features-bell-row-menu-shadow: 0 8px 24px rgba(31, 42, 61, 0.14);
    --features-bell-override-editor-shadow: 0 14px 34px rgba(29, 40, 59, 0.22);
    --features-organization-ai-connection-card-is-active-shadow: 0 0 0 1px rgba(93, 140, 199, 0.12);

    /* Features residual semantic paint contracts. */
    --features-nav-readiness-indicator-before-webkit-mask: radial-gradient(circle, transparent 0 65%, #000 66%);
    --features-nav-readiness-indicator-before-mask: radial-gradient(circle, transparent 0 65%, #000 66%);
    --features-getting-started-progress-before-webkit-mask: radial-gradient(circle, transparent 0 57%, #000 58%);
    --features-getting-started-progress-before-mask: radial-gradient(circle, transparent 0 57%, #000 58%);

}

/* ===== CSS owner: base.css ===== */

/* Low-specificity typography defaults are theme-neutral. Component rules can
   override them without `!important`, while unstyled copy still follows the
   semantic theme roles from first paint. */
:where(a, label) {
    color: inherit;
}
:where(h1, h2, h3, h4, strong) {
    color: var(--color-text-emphasis);
}

:where(p, small, .muted) {
    color: var(--color-text-secondary);
}

/* Accessibility and native visibility utilities must win over component
   display rules, including dynamically rendered controls. */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.is-hidden,
[hidden] {
    display: none !important;
}

* {
    box-sizing: border-box;
}

/* ===== CSS owner: layout.css ===== */

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-canvas);
    font-family: "Segoe UI", "Noto Sans", sans-serif;
}

html,
body {
    min-width: var(--desktop-min-width);
    scrollbar-width: thin;
    scrollbar-color: var(--html-scrollbar);
}

html {
    scrollbar-gutter: stable;
}

html.has-grid-workspace {
    min-width: 0;
    overflow-x: hidden;
    scrollbar-gutter: auto;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
    background-image: none;
}

::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--color-surface-muted-strong);
}

::-webkit-scrollbar-thumb {
    border: var(--webkit-scrollbar-thumb-border);
    border-radius: 999px;
    background: var(--webkit-scrollbar-thumb-surface);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    border-color: var(--color-control-border);
    background: var(--color-control-bg);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 4px var(--color-control-focus-ring);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-control-placeholder);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--color-text);
    box-shadow: 0 0 0 1000px var(--color-control-bg) inset;
    caret-color: var(--color-text);
}

select {
    appearance: none;
    padding-right: 44px;
    background-image: var(--select-surface);
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px 16px;
}

.app-shell {
    min-width: var(--desktop-min-width);
    min-height: 100vh;
    position: relative;
    --current-sidebar-width: var(--sidebar-width);
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 30;
    width: var(--sidebar-width);
    color: var(--progress-fill-on-accent);
    padding: 12px 7px 10px;
    background:
        var(--layout-app-sidebar-surface);
    box-shadow: var(--layout-app-sidebar-shadow);
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: width 0.18s ease, box-shadow 0.18s ease;
}

.app-shell.is-sidebar-initializing .app-sidebar,
.app-shell.is-sidebar-initializing .app-main,
.app-shell.is-sidebar-initializing .brand-text,
.app-shell.is-sidebar-initializing .nav-text,
.app-shell.is-sidebar-initializing .nav-link {
    transition: none !important;
}

.brand {
    display: flex;
    height: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    gap: 0;
    align-items: center;
    margin: 0 0 25px;
    padding: 0 6px;
}

.brand-mark {
    display: none;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: none;
    box-shadow: none;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.brand-title {
    font-weight: 600;
    font-size: 13px;
}

.brand-subtitle {
    opacity: 0.85;
    font-size: 11px;
}

.brand-text,
.nav-text {
    max-width: 190px;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.16s ease, opacity 0.12s ease, transform 0.16s ease;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 5px;
    margin-right: -5px;
    flex: 1 1 auto;
    scrollbar-color: transparent transparent;
    scrollbar-width: thin;
}

.nav::-webkit-scrollbar {
    width: 3px;
}

.nav::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

.nav::-webkit-scrollbar-thumb {
    border: 0;
    border-radius: 999px;
    background: transparent;
    background-clip: padding-box;
}

.nav::-webkit-scrollbar-thumb:hover {
    background: var(--layout-nav-webkit-scrollbar-thumb-hover-surface);
    background-clip: padding-box;
}

.nav-link {
    position: relative;
    color: var(--layout-nav-link-text);
    text-decoration: none;
    min-height: 30px;
    height: 30px;
    padding: 0 8px 0 9px;
    border-left: 2px solid transparent;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    overflow: visible;
}

.nav-link:hover,
.nav-link.is-active {
    background: var(--layout-nav-link-hover-nav-link-is-active-surface);
}

.nav-icon {
    width: 22px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--layout-nav-icon-svg-stroke);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-icon-svg.is-ai-settings-icon {
    width: 16px;
    height: 16px;
}

.nav-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: var(--layout-nav-footer-border-top);
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
}

.nav-logout-form {
    margin: 0;
}

.nav-link-placeholder {
    cursor: default;
}

.nav-toggle {
    width: 100%;
    border: 0;
    border-left: 2px solid transparent;
    text-align: left;
    background: transparent;
    cursor: pointer;
    justify-content: flex-start;
    height: 36px;
    min-height: 36px;
}

.app-main {
    margin-left: var(--current-sidebar-width);
    padding: 18px 22px 74px;
    min-height: 100vh;
    transition: margin-left 0.18s ease;
}

body.has-grid-workspace {
    min-width: 0;
    overflow: hidden;
}

body.has-grid-workspace .app-shell {
    min-width: 0;
}

body.modal-open {
    overflow: hidden;
}

body.has-grid-workspace .app-main {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: 18px 0 0 22px;
}

body.has-grid-workspace .app-main > .grid-workspace {
    margin-top: -18px;
}

body.has-grid-workspace .app-main > .impersonation-banner + .grid-workspace,
body.has-grid-workspace .app-main > .commercial-read-only-banner + .grid-workspace,
body.has-grid-workspace .app-main > .commercial-trial-banner + .grid-workspace {
    margin-top: 0;
}

.app-shell[data-sidebar-state="collapsed"] {
    --current-sidebar-width: var(--sidebar-collapsed-width);
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar {
    width: var(--sidebar-collapsed-width);
    padding-left: 8px;
    padding-right: 8px;
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover {
    width: var(--sidebar-width);
    padding-left: 14px;
    padding-right: 14px;
    box-shadow: var(--layout-app-shell-data-sidebar-state-collapsed-app-sidebar-hover-shadow);
}

.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover {
    width: var(--sidebar-collapsed-width);
    padding-left: 8px;
    padding-right: 8px;
    box-shadow: var(--layout-app-shell-is-sidebar-hover-locked-data-sidebar-state-collapsed-app-sidebar-hover-shadow);
}

.app-shell[data-sidebar-state="collapsed"] .brand {
    padding: 0;
    justify-content: center;
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .brand {
    padding: 0 8px;
    justify-content: flex-start;
}

.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .brand {
    padding: 0;
    justify-content: center;
}

.app-shell[data-sidebar-state="collapsed"] .brand-text,
.app-shell[data-sidebar-state="collapsed"] .nav-text {
    opacity: 0;
    max-width: 0;
    transform: translateX(-4px);
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .brand-text,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-text {
    opacity: 1;
    max-width: 190px;
    transform: translateX(0);
}

.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .brand-text,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-text {
    opacity: 0;
    max-width: 0;
    transform: translateX(-4px);
}

.app-shell[data-sidebar-state="collapsed"] .nav-link {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
    justify-content: center;
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-link {
    padding-left: 10px;
    padding-right: 10px;
    gap: 10px;
    justify-content: flex-start;
}

.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-link {
    padding-left: 0;
    padding-right: 0;
    gap: 0;
    justify-content: center;
}

.brand-mark.brand-compact-logo {
    background: var(--brand-logo-color);
    mask: url('/assets/ais-logo-compact.svg') center / contain no-repeat;
    -webkit-mask: url('/assets/ais-logo-compact.svg') center / contain no-repeat;
    box-shadow: none;
    border-radius: 0;
    filter: none;
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    filter: brightness(0) invert(1);
}

.brand-text {
    display: none;
}

.nav:hover {
    scrollbar-color: var(--layout-nav-hover-scrollbar);
}

.nav:hover::-webkit-scrollbar-thumb {
    background: var(--layout-nav-hover-webkit-scrollbar-thumb-surface);
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-section-title {
    min-height: 18px;
    height: 18px;
    padding: 0 8px;
    color: var(--layout-nav-section-title-text);
    font-size: 10px;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    border-bottom: var(--layout-nav-section-title-border-bottom);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nav-section-title::-webkit-details-marker {
    display: none;
}

.nav-section-title::marker {
    content: "";
    font-size: 0;
}

.nav-section.has-nav-section-icon .nav-section-title {
    min-height: 28px;
    height: 28px;
    padding: 0 8px 9px 11px;
    border-bottom-color: var(--layout-nav-section-has-nav-section-icon-nav-section-title-border-bottom-color);
    justify-content: space-between;
}

.nav-section-title-leading {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-section.has-nav-section-icon .nav-section-title-leading {
    gap: 8px;
}

.nav-section-icon {
    width: 14px;
    height: 14px;
    margin: 0 1px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.62;
}

.app-sidebar .nav-icon-image {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.86;
}

.nav-section-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-section-chevron {
    flex: 0 0 auto;
    width: 16px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--layout-nav-section-chevron-text);
    font-size: 0;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.15s ease;
}

.nav-section-chevron::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.nav-section:not([open]) .nav-section-chevron {
    transform: rotate(-90deg);
}

.nav-section-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0 4px;
}

.nav-section-items > :last-child {
    margin-bottom: 10px;
}

.nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    border-radius: 6px 0 0 6px;
    background: transparent;
}

.nav-link:hover {
    background: var(--layout-nav-link-hover-surface);
}

.nav-link.is-active {
    color: var(--progress-fill-on-accent);
    background: var(--layout-nav-link-is-active-surface);
    border-left-color: var(--nav-link-is-active-border);
    font-weight: 500;
}

.nav-link.is-active::before {
    background: transparent;
}

.nav-link.is-disabled {
    cursor: default;
    color: var(--layout-nav-link-is-disabled-text);
}

.nav-link.is-disabled:hover {
    background: transparent;
}

.app-sidebar .nav-icon {
    width: 16px;
    min-width: 16px;
    height: 16px;
}

.app-sidebar .nav-icon-svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.65;
}

.app-sidebar .nav-link.is-active .nav-icon-image {
    opacity: 1;
}

.app-sidebar .nav-link.is-disabled .nav-icon-image {
    opacity: 0.5;
}

.nav-icon-svg.is-ai-icon {
    width: 12px;
    height: 12px;
}

.nav-icon-svg.is-ai-icon path {
    stroke: currentColor;
    stroke-width: 0.9;
    stroke-linejoin: round;
}

.nav-text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: max-width 0.16s ease, opacity 0.12s ease, transform 0.16s ease;
}

.nav-indicator {
    flex: 0 0 auto;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--progress-fill-on-accent);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.nav-indicator-count {
    background: var(--nav-indicator-count-surface);
}

.nav-indicator-attention {
    background: var(--nav-indicator-attention-surface);
    color: var(--nav-indicator-attention-text);
}

.sidebar-release-version {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px;
    color: var(--layout-sidebar-release-version-text);
    font-size: 11px;
    line-height: 1;
    box-sizing: border-box;
}

.sidebar-release-version strong {
    overflow: hidden;
    color: var(--layout-sidebar-release-version-strong-text);
    font-size: 11px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-icon-expand {
    display: none;
}

.sidebar-user {
    position: relative;
}

.sidebar-user summary {
    list-style: none;
}

.sidebar-user summary::-webkit-details-marker {
    display: none;
}

.sidebar-user-summary {
    height: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 4.78px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--progress-fill-on-accent);
    box-sizing: border-box;
    transition: background-color 0.15s ease;
}

.sidebar-user-summary:hover,
.sidebar-user[open] .sidebar-user-summary {
    background: var(--layout-sidebar-user-summary-hover-sidebar-user-open-sidebar-user-summary-surface);
}

.sidebar-user-avatar {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--layout-sidebar-user-avatar-surface);
    font-size: 12px;
    font-weight: 600;
}

.sidebar-user-text {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0;
}

.sidebar-user-name,
.sidebar-user-role {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-user-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.15;
}

.sidebar-user-role {
    color: var(--layout-sidebar-user-role-text);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.15;
}

.sidebar-user-chevron {
    width: 16px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--layout-sidebar-user-chevron-text);
}

.sidebar-user-chevron .nav-icon-svg {
    width: 14px;
    height: 14px;
}

.sidebar-user-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 40;
    width: 220px;
    padding: 6px;
    border: var(--layout-sidebar-user-menu-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: var(--layout-sidebar-user-menu-shadow);
}

.sidebar-user-menu form {
    margin: 0;
}

.sidebar-user-menu-item {
    width: 100%;
    min-height: 36px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: var(--color-action-secondary-text);
    background: transparent;
    font: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-user-menu-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-tab-text);
}

.sidebar-user-menu-icon .nav-icon-svg {
    width: 16px;
    height: 16px;
}

.sidebar-user-menu-label {
    min-width: 0;
    overflow: hidden;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.sidebar-user-menu-item.is-disabled {
    color: var(--color-text-disabled);
    cursor: default;
}

.sidebar-user-menu-item.is-disabled .sidebar-user-menu-icon {
    color: var(--color-text-disabled);
}

.sidebar-user-menu-item.is-disabled:hover {
    background: transparent;
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover {
    width: var(--sidebar-collapsed-width);
    padding-left: 7px;
    padding-right: 7px;
    box-shadow: var(--layout-app-shell-data-sidebar-state-collapsed-app-sidebar-app-shell-data-sidebar-state-collapse-shadow);
}

.app-shell[data-sidebar-state="collapsed"] .brand,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .brand,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .brand {
    padding: 0;
    justify-content: center;
}

.app-shell[data-sidebar-state="collapsed"] .brand-logo {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"] .brand-mark {
    display: inline-flex;
}

.app-shell[data-sidebar-state="collapsed"] .nav {
    gap: 14px;
    padding-right: 0;
    margin-right: 0;
    overflow-x: visible;
    scrollbar-width: none;
}

.app-shell[data-sidebar-state="collapsed"] .nav::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.app-shell[data-sidebar-state="collapsed"] .nav-section {
    gap: 1px;
}

.app-shell[data-sidebar-state="collapsed"] .nav-section-title {
    width: 38px;
    min-height: 18px;
    height: 18px;
    padding: 0;
    margin: 0 auto;
    color: var(--sidebar-collapsed-section-text);
    border-bottom-color: var(--layout-app-shell-data-sidebar-state-collapsed-nav-section-title-border-bottom-color);
    cursor: default;
    pointer-events: none;
}

.app-shell[data-sidebar-state="collapsed"] .nav-section-title-text,
.app-shell[data-sidebar-state="collapsed"] .nav-section-chevron {
    opacity: 0;
}

.app-shell[data-sidebar-state="collapsed"] .nav-section.has-nav-section-icon .nav-section-title {
    min-height: 28px;
    height: 28px;
    padding: 0 8px 9px 10px;
    border-left: 2px solid transparent;
    border-bottom-color: var(--layout-app-shell-data-sidebar-state-collapsed-nav-section-has-nav-section-icon-nav-section-titl-border-bottom-color);
    justify-content: center;
}

.app-shell[data-sidebar-state="collapsed"] .nav-section.has-nav-section-icon {
    position: relative;
}

.app-shell[data-sidebar-state="collapsed"] .nav-section.has-nav-section-icon .nav-section-title-leading {
    width: auto;
    justify-content: center;
}

.app-shell[data-sidebar-state="collapsed"] .nav-section.has-nav-section-icon .nav-section-icon {
    position: absolute;
    left: 50%;
    top: 9px;
    width: 14px;
    height: 14px;
    margin: 0;
    transform: translate(-50%, -50%);
}

.app-shell[data-sidebar-state="collapsed"] .nav-section.has-nav-section-icon .nav-section-chevron {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"] .nav-link,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-link,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-link {
    width: 38px;
    min-height: 30px;
    height: 30px;
    padding: 0 8px 0 9px;
    gap: 0;
    justify-content: flex-start;
}

.app-shell[data-sidebar-state="collapsed"] .nav-toggle,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-toggle,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-toggle {
    min-height: 36px;
    height: 36px;
}

.app-shell[data-sidebar-state="collapsed"] .nav-link::before {
    top: 0;
    bottom: 0;
}

.app-shell[data-sidebar-state="collapsed"] .brand-text,
.app-shell[data-sidebar-state="collapsed"] .nav-text,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .brand-text,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-text,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .brand-text,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-text {
    opacity: 0;
    max-width: 0;
    transform: translateX(-4px);
}

.app-shell[data-sidebar-state="collapsed"] .nav-indicator {
    position: absolute;
    top: 4px;
    right: 5px;
    min-width: 6px;
    width: 6px;
    height: 6px;
    padding: 0;
    overflow: hidden;
    color: var(--sidebar-collapsed-indicator-text);
    font-size: 0;
}

.app-shell[data-sidebar-state="collapsed"] .nav-icon-collapse {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"] .nav-icon-expand {
    display: inline-flex;
}

.app-shell[data-sidebar-state="collapsed"] .sidebar-release-version {
    width: 38px;
    justify-content: center;
    padding: 0;
}

.app-shell[data-sidebar-state="collapsed"] .sidebar-release-version span {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"] .sidebar-user-summary {
    width: 38px;
    height: 36px;
    min-height: 36px;
    justify-content: flex-start;
    padding: 4px 0 4px 4.78px;
}

.app-shell[data-sidebar-state="collapsed"] .sidebar-user-text,
.app-shell[data-sidebar-state="collapsed"] .sidebar-user-chevron {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"] .sidebar-user-menu {
    left: calc(100% + 8px);
    right: auto;
    bottom: 0;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover {
    z-index: 75;
    width: var(--sidebar-width);
    padding: 12px 7px 10px;
    box-shadow:
        var(--layout-app-shell-data-sidebar-state-collapsed-not-is-sidebar-hover-locked-app-sidebar-hover-shadow);
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .brand {
    padding: 0 6px;
    justify-content: flex-start;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .brand-logo {
    display: block;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .brand-mark {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section-title {
    width: auto;
    padding: 0 8px;
    margin: 0;
    color: var(--layout-app-shell-data-sidebar-state-collapsed-not-is-sidebar-hover-locked-app-sidebar-hover-nav-text);
    pointer-events: auto;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section-title-text,
.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section-chevron {
    opacity: 1;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section-chevron {
    transition: transform 0.15s ease, opacity 0s linear 0.18s;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section.has-nav-section-icon .nav-section-title-leading {
    width: auto;
    justify-content: flex-start;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section.has-nav-section-icon .nav-section-title {
    min-height: 28px;
    height: 28px;
    padding: 0 8px 9px 11px;
    border-left: 0;
    border-bottom-color: var(--layout-app-shell-data-sidebar-state-collapsed-not-is-sidebar-hover-locked-app-sidebar-hover-nav-border-bottom-color);
    justify-content: space-between;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section.has-nav-section-icon .nav-section-icon {
    position: static;
    left: auto;
    top: auto;
    width: 14px;
    height: 14px;
    margin: 0 1px;
    transform: none;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section.has-nav-section-icon .nav-section-chevron {
    display: inline-flex;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-link {
    width: auto;
    padding: 0 8px 0 9px;
    gap: 8px;
    justify-content: flex-start;
}

@media (prefers-reduced-motion: reduce) {
    .app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-section-chevron {
        transition-delay: 0s;
    }
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav {
    padding-right: 5px;
    margin-right: -5px;
    scrollbar-width: thin;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav::-webkit-scrollbar {
    width: 3px;
    height: auto;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .brand-text,
.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-text {
    opacity: 1;
    max-width: none;
    transform: none;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-indicator {
    position: static;
    min-width: 16px;
    width: auto;
    height: 16px;
    padding: 0 4px;
    overflow: visible;
    color: var(--progress-fill-on-accent);
    font-size: 10px;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .sidebar-release-version {
    width: auto;
    justify-content: space-between;
    padding: 0 8px;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .sidebar-release-version span {
    display: inline;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .sidebar-user-summary {
    width: auto;
    justify-content: flex-start;
    padding: 4px 6px 4px 4.78px;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .sidebar-user-avatar {
    transform: none;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .sidebar-user-text,
.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .sidebar-user-chevron {
    display: flex;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.page-head h1 {
    margin: 0;
    font-size: 24px;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--color-text-secondary);
}

.read-only-note {
    color: var(--warning);
    font-weight: 600;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form input,
.inline-form select,
.inline-form button,
.toolbar input,
.toolbar select {
    border: 1px solid var(--color-control-border);
    border-radius: 10px;
    background: var(--color-control-bg);
}

.inline-form input,
.inline-form select,
.toolbar input,
.toolbar select {
    height: 36px;
    padding: 0 12px;
}

button,
.btn {
    height: 32px;
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    padding: 0 11px;
    cursor: pointer;
    border-color: var(--color-action-primary-border);
    background: var(--color-action-primary-bg);
    color: var(--color-action-primary-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    transition: filter 0.15s ease;
}

button:hover,
.btn:hover {
    filter: brightness(1.04);
}

.btn.ghost,
button.ghost {
    background: var(--color-action-secondary-bg);
    border-width: 1px;
    border-style: solid;
    border-color: var(--color-action-secondary-border);
    color: var(--color-action-secondary-text);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn.btn-light,
button.btn-light {
    background: var(--color-surface-hover-strong);
    color: var(--btn-btn-light-text);
    border: var(--btn-btn-light-border);
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    filter: none;
}

.panel,
.card {
    background: var(--component-surface, var(--color-surface));
    border-width: 1px;
    border-style: solid;
    border-color: var(--component-border, var(--color-border-soft));
    border-radius: 10px;
    box-shadow: var(--component-shadow, var(--shadow));
}

.panel {
    --component-surface: var(--panel-surface);
    --component-border: var(--panel-border);
    --component-shadow: var(--panel-shadow);
    padding: 16px;
}

.card-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
    padding: 14px;
}

.card h3 {
    margin: 0 0 8px;
}

.card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state h2 {
    margin-top: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--status-surface, var(--status-neutral-surface));
    border-color: var(--status-border, var(--status-neutral-border));
    color: var(--status-text, var(--status-neutral-text));
    font-size: 12px;
    font-weight: 600;
}

.status-draft { --status-surface: var(--layout-status-draft-status-surface); --status-text: var(--layout-status-draft-status-text); }
.status-in_review { --status-surface: var(--layout-status-in-review-status-surface); --status-text: var(--layout-status-in-review-status-text); }
.status-approved { --status-surface: var(--layout-status-approved-status-surface); --status-text: var(--layout-status-approved-status-text); }
.status-published { --status-surface: var(--layout-status-published-status-surface); --status-text: var(--layout-status-published-status-text); }
.status-archived { --status-surface: var(--layout-status-archived-status-surface); --status-text: var(--layout-status-archived-status-text); }
.status-new { --status-surface: var(--layout-status-new-status-surface); --status-text: var(--layout-status-new-status-text); }
.status-update { --status-surface: var(--layout-status-update-status-surface); --status-text: var(--layout-status-update-status-text); }
.status-invalid { --status-surface: var(--layout-status-invalid-status-surface); --status-text: var(--layout-status-invalid-status-text); }
.status-skipped { --status-surface: var(--layout-status-skipped-status-surface); --status-text: var(--layout-status-skipped-status-text); }

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.muted {
    color: var(--muted);
}

.grid-board {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.slot-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
}

.slot-card h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.slot-preview {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    min-height: 32px;
}

.slot-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-state {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.slot-state > span:first-child {
    white-space: pre-line;
}

.slot-state.error {
    color: var(--error);
}

.slot-state.warning {
    color: var(--warning);
}

.slot-state .grid-problem-links {
    margin-top: 6px;
}

.slot-state .grid-problem-intervals {
    margin-top: 6px;
}

.grid-editor-problems .slot-state + .slot-state {
    margin-top: 8px;
    padding-top: 8px;
    border-top: var(--layout-grid-editor-problems-slot-state-slot-state-border-top);
}

.grid-editor-problems .grid-problem-interval-list {
    min-width: 0;
}

.grid-editor-problems .grid-problem-interval-list i {
    min-width: 0;
    overflow: visible;
}

.grid-workspace {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.grid-body {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
}

.grid-body.has-plan-coverage.is-plan-coverage-pinned {
    grid-template-columns: minmax(0, 1fr) clamp(440px, 31vw, 560px);
    gap: 0;
}

.grid-main-column {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

/* ===== CSS owner: components.css ===== */

/* Shared component contracts. */
/* Production-calendar data keeps one visual owner in every page, drawer and
   dynamically rendered schedule state. Hosts may compose geometry only. */
.calendar-day-state.is-holiday {
    --calendar-day-state-surface: var(--calendar-holiday-surface);
    --calendar-day-state-hover-surface: var(--calendar-holiday-hover-surface);
    --calendar-day-state-border: var(--calendar-holiday-border);
    --calendar-day-state-text: var(--calendar-holiday-text);
}

.calendar-day-state.is-weekend {
    --calendar-day-state-surface: var(--calendar-weekend-surface);
    --calendar-day-state-hover-surface: var(--calendar-weekend-hover-surface);
    --calendar-day-state-border: var(--calendar-weekend-border);
    --calendar-day-state-text: var(--calendar-weekend-text);
}

.calendar-day-state.is-non-study {
    --calendar-day-state-surface: var(--calendar-non-study-surface);
    --calendar-day-state-hover-surface: var(--calendar-non-study-hover-surface);
    --calendar-day-state-border: var(--calendar-non-study-border);
    --calendar-day-state-text: var(--calendar-non-study-text);
}

.calendar-day-state {
    border-color: var(--calendar-day-state-border);
    background: var(--calendar-day-state-surface);
    color: var(--calendar-day-state-text);
}

.calendar-system-indicator {
    --calendar-day-state-surface: var(--calendar-system-surface);
    --calendar-day-state-hover-surface: var(--calendar-system-hover-surface);
    --calendar-day-state-border: var(--calendar-system-border);
    --calendar-day-state-text: var(--calendar-system-text);
    border-color: var(--calendar-system-border);
    background: var(--calendar-system-surface);
    color: var(--calendar-system-text);
}

/* A weekday is one semantic label across the grid, study graph and drawers.
   Geometry stays with each host component; the shared class owns only color. */
.weekday-label {
    background: var(--weekday-label-surface);
    color: var(--weekday-label-text);
}

.weekday-label.is-non-study-day.calendar-day-state {
    background: var(--calendar-day-state-surface);
    color: var(--calendar-day-state-text);
}

/* Linear progress primitive. Components own only geometry and an optional
   semantic variant; theme mapping stays centralized in the root tokens. */
.progress-track,
:where(
    .schedules-progress,
    .ai-subscription-progress,
    .organization-ai-balance-progress,
    .study-plan-upload-progress-track,
    .grid-calendar-week-load-row i
) {
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: var(--component-progress-track, var(--progress-track));
}

.progress-fill,
:where(
    .schedules-progress > span,
    .ai-subscription-progress > span,
    .organization-ai-balance-progress > span,
    .study-plan-upload-progress-track > span
) {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--component-progress-fill, var(--progress-fill));
}

.app-page-help-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 24px;
    padding: 12px 0 4px;
}

.app-page-theme-toggle,
.app-page-help-trigger {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    border-color: var(--footer-tool-border);
    border-radius: 8px;
    background: var(--footer-tool-surface);
    color: var(--footer-tool-text);
    cursor: pointer;
}

.app-page-theme-toggle {
    flex: 0 0 40px;
    padding: 0;
}

.app-page-theme-toggle img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: var(--footer-tool-icon-filter);
}

.app-page-theme-toggle:hover,
.app-page-theme-toggle:focus-visible,
.app-page-help-menu[open] .app-page-help-trigger,
.app-page-help-trigger:hover,
.app-page-help-trigger:focus-visible {
    border-color: var(--footer-tool-hover-border);
    background: var(--footer-tool-hover-surface);
    color: var(--footer-tool-hover-text);
    outline: 0;
}

.app-page-help-menu {
    position: relative;
}

.app-page-help-trigger {
    list-style: none;
}

.app-page-help-trigger::-webkit-details-marker {
    display: none;
}

.app-page-help-trigger .nav-icon-svg {
    width: 20px;
    height: 20px;
}

/* The sidebar icon class has a white default stroke. The help footer uses the
   same SVG markup on a light surface, so it must inherit the footer color. */
.app-page-help-footer .nav-icon-svg {
    stroke: currentColor;
}

.app-page-help-menu-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 30;
    width: 248px;
    padding: 6px;
    border: 1px solid;
    border-color: var(--help-border);
    border-radius: 10px;
    background: var(--help-surface);
    color: var(--help-text);
    box-shadow: var(--help-shadow);
}

.app-page-help-menu-item {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    background: var(--help-item-surface);
    color: var(--help-text);
    font: 400 13px/1.3 Inter, system-ui, sans-serif;
    text-align: left;
}

.app-page-help-menu-item-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-page-help-menu-item-main .nav-icon-svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

button.app-page-help-menu-item {
    cursor: pointer;
}

button.app-page-help-menu-item:hover,
button.app-page-help-menu-item:focus-visible {
    background: var(--help-item-hover-surface);
    outline: 2px solid var(--help-item-focus-ring);
    outline-color: var(--help-item-focus-ring);
    outline-offset: -2px;
}

.app-page-help-menu-item.is-disabled {
    color: var(--help-disabled-text);
    cursor: default;
}

.app-page-help-menu-panel .app-page-help-menu-item small {
    margin-left: auto;
    color: var(--help-text-muted);
    font: 500 11px/1.3 Inter, system-ui, sans-serif;
}

.grid-help-menu-panel {
    width: min(460px, calc(100vw - 28px));
    max-height: min(68vh, 620px);
    padding: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.grid-help-menu-panel > [data-page-tour-short-launch] {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--help-divider);
    border-radius: 6px 6px 0 0;
}

.grid-help-catalog {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.grid-help-search-shell {
    flex: 0 0 auto;
    padding: 8px 6px 7px;
    background: var(--help-surface);
}

.grid-help-question-list {
    min-height: 0;
    max-height: calc(min(68vh, 620px) - 102px);
    padding: 0 2px 3px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.grid-help-question-group + .grid-help-question-group {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--help-divider);
}

.grid-help-question-group-title {
    margin: 0;
    padding: 8px 10px 4px;
    color: var(--help-text-muted);
    font: 600 12px/1.35 Inter, system-ui, sans-serif;
}

.grid-help-question.app-page-help-menu-item {
    position: relative;
    min-height: 38px;
    padding: 7px 30px 7px 10px;
    white-space: normal;
}

.grid-help-question.app-page-help-menu-item::after {
    content: '›';
    position: absolute;
    right: 11px;
    top: 50%;
    color: var(--help-arrow-text);
    font-size: 18px;
    line-height: 1;
    transform: translateY(-50%);
}

.grid-help-search-empty {
    margin: 2px 6px 6px;
    padding: 14px 12px;
    border-radius: 8px;
    background: var(--help-empty-surface);
    color: var(--help-empty-text);
    font: 400 13px/1.45 Inter, system-ui, sans-serif;
}

.getting-started-tour-toast-copy {
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
}

.getting-started-tour-toast-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.getting-started-tour-toast-actions .btn {
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    white-space: nowrap;
}

.getting-started-tour-toast-preference {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 20px;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.35;
    cursor: pointer;
}

.getting-started-tour-toast-preference input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent-blue);
}

.getting-started-tour-toast-preference:focus-within {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 2px;
    border-radius: 4px;
}

.driver-popover.ais-tour-popover {
    width: min(360px, calc(100vw - 32px));
    max-width: 360px;
    padding: 16px;
    border: 1px solid var(--color-popover-border);
    border-radius: 12px;
    background: var(--color-popover-surface);
    color: var(--color-text-strong);
    box-shadow: var(--color-popover-shadow);
}

.driver-popover.ais-tour-popover .driver-popover-title {
    padding-right: 28px;
    color: var(--color-text-strong);
    font: 600 16px/1.35 Inter, system-ui, sans-serif;
}

.driver-popover.ais-tour-popover .driver-popover-description {
    color: var(--color-text-secondary);
    font: 400 14px/1.45 Inter, system-ui, sans-serif;
}

.driver-popover.ais-tour-popover .getting-started-tour-popover-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--color-link-text);
    font: 500 13px/1.35 Inter, system-ui, sans-serif;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.driver-popover.ais-tour-popover .getting-started-tour-popover-link:hover,
.driver-popover.ais-tour-popover .getting-started-tour-popover-link:focus-visible {
    color: var(--color-link-hover);
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 2px;
    border-radius: 4px;
}

.driver-popover.ais-tour-popover .driver-popover-close-btn {
    width: 28px;
    height: 28px;
    color: var(--color-text-secondary);
    border-radius: 6px;
}

.driver-popover.ais-tour-popover .driver-popover-close-btn:hover,
.driver-popover.ais-tour-popover .driver-popover-close-btn:focus-visible {
    color: var(--color-text-strong);
    background: var(--color-surface-hover);
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 1px;
}

.driver-popover.ais-tour-popover .driver-popover-footer {
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--color-divider-border);
}

.driver-active td:has(.is-page-tour-ai-related) {
    position: relative;
    z-index: 10001;
    isolation: isolate;
}

.driver-active .directory-name-cell:has(> .is-page-tour-ai-related) {
    position: relative;
    z-index: 1;
    border-radius: 10px;
    background: var(--color-surface);
}

.driver-active .is-page-tour-ai-related {
    position: relative;
    z-index: 2;
    border-color: var(--color-action-primary-border);
    background-color: var(--color-surface) !important;
    box-shadow: var(--driver-active-is-page-tour-ai-related-shadow);
    pointer-events: none;
}

.driver-popover.ais-tour-popover .driver-popover-progress-text {
    color: var(--color-text-secondary);
    font: 500 12px/1.35 Inter, system-ui, sans-serif;
}

.driver-popover.ais-tour-popover .driver-popover-navigation-btns {
    gap: 8px;
}

.driver-popover.ais-tour-popover .driver-popover-footer button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--color-action-primary-border);
    border-radius: 8px;
    background: var(--color-action-primary-bg);
    color: var(--color-action-primary-text);
    font: 500 13px/1 Inter, system-ui, sans-serif;
}

.driver-popover.ais-tour-popover .driver-popover-footer .driver-popover-prev-btn {
    border-color: var(--color-action-secondary-border);
    background: var(--color-action-secondary-bg);
    color: var(--color-action-secondary-text);
}

.driver-popover.ais-tour-popover .driver-popover-footer button:hover,
.driver-popover.ais-tour-popover .driver-popover-footer button:focus-visible {
    border-color: var(--color-control-focus-border);
    background: var(--color-surface-hover);
    color: var(--color-text-strong);
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 2px;
}

.driver-popover.ais-tour-popover .driver-popover-footer .driver-popover-prev-btn:hover,
.driver-popover.ais-tour-popover .driver-popover-footer .driver-popover-prev-btn:focus-visible {
    border-color: var(--color-control-focus-border);
    background: var(--color-surface-hover);
    color: var(--color-text-strong);
}

.driver-popover.ais-tour-popover .driver-popover-arrow {
    border-color: var(--color-popover-surface);
}

.driver-popover.ais-tour-popover .driver-popover-arrow-side-left,
.driver-popover.ais-tour-popover .driver-popover-arrow-side-right {
    border-top-color: transparent;
    border-bottom-color: transparent;
}

.driver-popover.ais-tour-popover .driver-popover-arrow-side-left {
    border-right-color: transparent;
}

.driver-popover.ais-tour-popover .driver-popover-arrow-side-right {
    border-left-color: transparent;
}

.driver-popover.ais-tour-popover .driver-popover-arrow-side-top,
.driver-popover.ais-tour-popover .driver-popover-arrow-side-bottom {
    border-left-color: transparent;
    border-right-color: transparent;
}

.driver-popover.ais-tour-popover .driver-popover-arrow-side-top {
    border-bottom-color: transparent;
}

.driver-popover.ais-tour-popover .driver-popover-arrow-side-bottom {
    border-top-color: transparent;
}

body.has-grid-workspace :not(body):has(> .driver-active-element) {
    overflow: visible !important;
}

/* Driver measures highlighted targets synchronously. Keep drawers at their final
   coordinates for the whole tour so the stage cannot lag behind the slide-in. */
body[data-page-tour-interaction-lock="1"] .slot-editor:not(.is-hidden) .slot-editor-backdrop,
body[data-page-tour-interaction-lock="1"] .slot-editor:not(.is-hidden) .slot-editor-panel {
    animation: none !important;
}

@media (max-width: 720px) {
    .getting-started-head {
        align-items: stretch;
    }

    .getting-started-head-actions {
        justify-content: stretch;
    }

    .getting-started-head-actions .btn {
        flex: 1 1 180px;
    }

}


.grid-topbar {
    position: relative;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 0 12px;
}

.grid-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.grid-breadcrumb > a,
.grid-breadcrumb > span,
.grid-breadcrumb > button {
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
}

.grid-breadcrumb .grid-breadcrumb-elide {
    flex: 0 1 auto;
    max-width: min(42vw, 720px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-breadcrumb .grid-breadcrumb-period {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-breadcrumb a {
    color: var(--color-link-text);
    text-decoration: none;
}

.grid-breadcrumb span::before,
.grid-breadcrumb .grid-period-edit::before {
    content: "/";
    margin-right: 8px;
    color: var(--grid-breadcrumb-before-text);
}

.grid-period-edit {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.grid-period-edit:hover,
.grid-period-edit:focus {
    color: var(--grid-period-edit-hover-text);
    outline: none;
}

.grid-period-editor {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 8px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: 12px;
}

body.has-grid-workspace .grid-period-editor {
    margin-left: min(var(--grid-left-rail-offset), var(--grid-main-safe-overhang));
    margin-right: 8px;
    width: calc(100% - min(var(--grid-left-rail-offset), var(--grid-main-safe-overhang)) - 8px);
}

.grid-period-editor.is-hidden {
    display: none;
}

.grid-period-editor label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.grid-period-editor input {
    height: 36px;
    min-height: 36px;
    padding: 0 8px;
    border: 1px solid var(--color-control-border-compact);
    border-radius: 8px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font-size: 12px;
}

.grid-period-action {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--lesson-card-border);
    border-radius: 8px;
    background: var(--grid-period-action-surface);
    color: var(--grid-period-action-text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.grid-period-action.ghost {
    background: var(--color-surface);
    color: var(--grid-period-action-ghost-text);
}

.grid-period-warning {
    flex-basis: 100%;
    color: var(--grid-period-warning-text);
    line-height: 1.3;
}

.grid-period-warning.is-hidden {
    display: none;
}

.grid-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.grid-title-row h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0;
}

.grid-context-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    padding-right: 5px;
}

.grid-context-row .grid-breadcrumb {
    flex: 0 1 auto;
    min-width: 0;
}

.grid-context-row .grid-status-badge,
.grid-context-row .grid-published-controls,
.grid-context-row .grid-version-controls,
.grid-context-row .grid-readonly-note,
.grid-context-row .grid-readonly-copy {
    flex: 0 0 auto;
}

.grid-version-controls {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    border-radius: 4px;
}

.grid-version-controls.has-menu > .grid-status-badge {
    min-width: 0;
    border-radius: 4px 0 0 4px;
}

.grid-version-menu-wrap {
    position: relative;
    flex: 0 0 20px;
}

.grid-version-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    padding: 0;
    border: 0;
    border-radius: 0 4px 4px 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.grid-version-menu-trigger:hover,
.grid-version-menu-trigger:focus-visible,
.grid-version-menu-trigger[aria-expanded="true"] {
    background: color-mix(in srgb, currentColor 12%, transparent);
    outline: none;
}

.grid-version-menu-trigger svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.grid-version-controls .grid-version-action-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    min-width: 230px;
}

.grid-context-row .grid-xlsx-draft-open {
    margin-left: auto;
}

.grid-context-row .grid-draft-assembly-open {
    margin-left: 0;
}

.grid-context-row > .grid-top-legend {
    flex: 0 0 auto;
    margin-left: auto;
}

.grid-version-line {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-right: 5px;
    color: var(--muted);
    font-size: 12px;
}

.grid-version-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.grid-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding-right: 5px;
    color: var(--muted);
    font-size: 11px;
}

.grid-actions-left {
    min-width: 0;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 12px;
}

.grid-action-group {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
}

.grid-actions-row .grid-top-legend {
    flex: 0 0 auto;
    margin-left: auto;
}

.grid-top-legend {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--grid-top-legend-text);
    font-size: 11px;
}

.grid-xlsx-draft-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    height: 20px;
    min-height: 20px;
    padding: 3px 7px;
    border: var(--grid-xlsx-draft-open-border);
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--grid-xlsx-draft-open-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.grid-xlsx-draft-open svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.grid-xlsx-draft-open:hover,
.grid-xlsx-draft-open:focus-visible {
    border-color: var(--grid-xlsx-draft-open-hover-border);
    background: var(--grid-xlsx-draft-open-hover-surface);
    outline: none;
}

.grid-published-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.grid-publication-open {
    box-sizing: border-box;
    appearance: none;
    height: 20px;
    min-height: 20px;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.grid-publication-open:hover,
.grid-publication-open:focus-visible {
    background: var(--grid-publication-open-hover-surface);
    color: var(--progress-fill-on-accent);
    outline: var(--components-grid-publication-open-hover-grid-publication-open-focus-visible-outline);
    outline-offset: 1px;
}

.grid-version-copy-button {
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: var(--grid-version-copy-button-border);
    border-radius: 4px;
    background: var(--color-surface-soft);
    color: var(--color-link-text);
    cursor: pointer;
}

.grid-version-copy-button:hover,
.grid-version-copy-button:focus-visible {
    border-color: var(--grid-version-copy-button-hover-border);
    background: var(--color-surface);
    outline: var(--components-grid-version-copy-button-hover-grid-version-copy-button-focus-visible-outline);
    outline-offset: 1px;
}

.grid-version-copy-button svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.grid-status-badge,
.grid-save-state,
.grid-version-date,
.grid-readonly-note,
.grid-readonly-copy,
.grid-context-strip span,
.grid-indicator-sample {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--status-info-surface);
    color: var(--grid-status-badge-text);
    font-size: 11px;
    line-height: 1;
}

.grid-status-published {
    background: var(--grid-status-published-surface);
    color: var(--progress-fill-on-accent);
}

.grid-status-draft {
    background: var(--calendar-heat-surface-low);
    color: var(--grid-status-draft-text);
}

.grid-readonly-note {
    background: var(--status-info-surface);
    color: var(--grid-readonly-note-text);
}

.grid-readonly-copy {
    border: var(--grid-readonly-copy-border);
    cursor: pointer;
    height: 20px;
}

.grid-readonly-copy:hover,
.grid-readonly-copy:focus {
    border-color: var(--grid-readonly-copy-hover-border);
    background: var(--color-data-table-tree-surface);
    color: var(--grid-readonly-copy-hover-text);
    outline: none;
}

.grid-save-state.is-dirty {
    background: var(--grid-save-state-is-dirty-surface);
    color: var(--grid-save-state-is-dirty-text);
}

.grid-save-state.is-hidden {
    display: none;
}

.grid-save-state.is-error,
.grid-indicator-sample.conflict {
    background: var(--problem-color);
    color: var(--progress-fill-on-accent);
}

.grid-collaboration-state.is-warning {
    background: var(--grid-collaboration-state-is-warning-surface);
    color: var(--grid-collaboration-state-is-warning-text);
}

.grid-indicator-sample.comment {
    width: 20px;
    min-width: 20px;
    padding: 0;
    justify-content: center;
}

.grid-top-legend .grid-indicator-sample {
    width: auto;
    min-width: 13px;
    height: 13px;
    min-height: 13px;
    padding: 0 3px;
    border-radius: 4px;
    justify-content: center;
    font-size: 8px;
    line-height: 1;
}

.grid-top-legend .grid-indicator-sample.conflict,
.grid-top-legend .grid-indicator-sample.comment {
    width: 13px;
    min-width: 13px;
    padding: 0;
}

.grid-top-legend .comment-icon {
    width: 9px;
    height: 9px;
}

.comment-icon {
    display: block;
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.grid-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grid-search-wrap input {
    width: min(320px, 36vw);
    border: var(--grid-search-wrap-border);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--color-surface);
}

.grid-icon-action {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: var(--grid-icon-action-border);
    background: var(--color-surface);
    color: var(--grid-icon-action-text);
    cursor: pointer;
}

.grid-context-strip,
.grid-command-panel,
.grid-statusbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.grid-command-panel {
    padding: 9px 10px;
    border: var(--grid-command-panel-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.grid-check-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 20px;
    min-height: 20px;
    padding: 3px 7px;
    border: var(--grid-check-inline-border);
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--grid-check-inline-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.grid-check-inline:disabled {
    cursor: default;
    opacity: 0.52;
    background: var(--color-surface-hover);
}

.grid-toolbar-button {
    gap: 4px;
    height: 20px;
    min-height: 20px;
    padding: 2px 6px;
    border: var(--grid-toolbar-button-border);
    border-radius: 4px;
    background: var(--color-surface-soft);
    color: var(--grid-toolbar-button-text);
    font-weight: 500;
}

.grid-toolbar-button:hover,
.grid-toolbar-button:focus-visible {
    border-color: var(--grid-toolbar-button-hover-border);
    background: var(--color-surface);
    color: var(--grid-toolbar-button-hover-text);
    outline: none;
}

.grid-toolbar-button:disabled,
.grid-toolbar-button:disabled:hover {
    border-color: var(--grid-toolbar-button-disabled-border);
    background: var(--grid-toolbar-button-disabled-surface);
    color: var(--presence-empty-text);
}

.grid-toolbar-icon {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.grid-toolbar-icon-mask {
    display: inline-block;
    background-color: currentColor;
    mask: var(--grid-toolbar-icon-mask) center / contain no-repeat;
}

.grid-toolbar-icon-undo {
    --grid-toolbar-icon-mask: url('/assets/actions/undo.svg');
}

.grid-toolbar-icon-only {
    width: 20px;
    min-width: 20px;
    padding: 0;
}

.grid-action-tooltip-anchor {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    height: 20px;
}

.grid-action-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 80;
    width: min(310px, calc(100vw - 32px));
    display: none;
    box-sizing: border-box;
    padding: 9px 10px;
    border: var(--grid-action-tooltip-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--components-grid-action-tooltip-shadow);
    color: var(--color-action-secondary-text);
    text-align: left;
    white-space: normal;
}

.grid-action-tooltip-anchor:hover .grid-action-tooltip,
.grid-action-tooltip-anchor:focus-within .grid-action-tooltip {
    display: grid;
    gap: 3px;
}

.grid-action-tooltip-title {
    color: var(--color-action-secondary-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.grid-action-tooltip-event,
.grid-action-tooltip-context,
.grid-action-tooltip-empty {
    color: var(--grid-action-tooltip-event-text);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

.grid-action-tooltip-subject {
    color: var(--grid-action-tooltip-subject-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
}

.grid-action-tooltip-change {
    display: grid;
    gap: 1px;
    margin-top: 3px;
    padding-top: 5px;
    border-top: var(--grid-action-tooltip-change-border);
}

.grid-action-tooltip-change small {
    color: var(--color-text-tertiary);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.25;
}

.grid-action-tooltip-change span {
    color: var(--grid-action-tooltip-change-text);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
}

.grid-actions-row .grid-presence-inline {
    position: relative;
    padding: 0;
    border: 0;
    background: transparent;
}

.grid-actions-row .presence-popover {
    cursor: default;
    text-align: left;
}

.grid-primary-action {
    background: var(--grid-primary-action-surface);
}

.grid-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--grid-toggle-text);
    font-size: 13px;
}

.grid-check-count {
    margin-right: 1px;
    min-width: 14px;
    min-height: 14px;
    align-items: center;
    justify-content: center;
    padding: 1px 4px;
    border-radius: 999px;
    background: var(--conflict-color-strong);
    color: var(--progress-fill-on-accent);
    font-size: 10px;
    line-height: 1;
    display: inline-flex;
}

@media (max-width: 1180px) {
    .grid-context-row,
    .grid-actions-row {
        flex-wrap: wrap;
    }

    .grid-context-row .grid-breadcrumb {
        flex: 1 1 100%;
    }

    .grid-actions-left {
        flex: 1 1 100%;
    }

    .grid-actions-row .grid-top-legend {
        width: 100%;
        justify-content: flex-end;
    }
}

.grid-check-count.is-ok {
    background: var(--grid-check-count-is-ok-surface);
}

.grid-check-count.is-error {
    background: var(--conflict-color-strong);
}

.grid-problems-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 70;
    width: min(720px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 64px));
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: var(--grid-problems-popover-border);
    border-radius: 12px;
    background: var(--components-grid-problems-popover-surface);
    box-shadow: var(--components-grid-problems-popover-shadow);
}

.grid-problems-popover.is-hidden {
    display: none;
}

.grid-problems-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 10px;
    border-bottom: var(--grid-problems-head-border);
}

.grid-problems-head strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.grid-problems-head span {
    display: block;
    margin-top: 2px;
    color: var(--color-text-quieter);
    font-size: 12px;
}

.grid-problems-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--grid-problems-close-text);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.grid-problems-close:hover,
.grid-problems-close:focus-visible {
    border-color: var(--grid-problems-close-hover-border);
    background: var(--color-filter-hover-surface);
    color: var(--color-toast-close-hover-text);
    outline: none;
}

.grid-problems-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--grid-problems-list-scrollbar);
}

.grid-problems-list::-webkit-scrollbar {
    width: 10px;
}

.grid-problems-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--color-surface-muted-strong);
}

.grid-problems-list::-webkit-scrollbar-thumb {
    border: var(--grid-problems-list-border);
    border-radius: 999px;
    background: var(--grid-problems-list-surface);
}

.grid-problems-list::-webkit-scrollbar-thumb:hover {
    background: var(--grid-problems-list-hover-surface);
}

.grid-problem-item {
    width: 100%;
    height: auto;
    min-height: 72px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 0 0 auto;
    overflow: visible;
    padding: 10px;
    border: var(--grid-problem-item-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--grid-problem-item-text);
    text-align: left;
    cursor: pointer;
}

.grid-problem-item:hover,
.grid-problem-item:focus {
    background: var(--color-data-table-tree-surface);
    filter: none;
    outline: none;
    border-color: var(--lesson-card-border);
}

.grid-problem-mark {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--problem-color);
    color: var(--progress-fill-on-accent);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.grid-problem-item.is-warning .grid-problem-mark {
    background: var(--grid-problem-item-is-warning-grid-problem-mark-surface);
}

.grid-problem-body {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: visible;
}

.grid-problem-body strong,
.grid-problem-body small,
.grid-problem-body em {
    display: block;
}

.grid-problem-body strong {
    color: var(--lesson-card-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    white-space: pre-line;
}

.grid-problem-body small {
    color: var(--grid-problem-body-text);
    font-size: 11px;
    line-height: 1.25;
}

.grid-problem-body em {
    color: var(--grid-problem-body-text-variant-2);
    font-size: 12px;
    font-style: normal;
    line-height: 1.25;
}

.grid-problem-reasons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

.grid-problem-reasons i {
    color: var(--grid-problem-reasons-text);
    font-size: 12px;
    font-style: normal;
    line-height: 1.3;
}

.grid-problem-intervals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    color: var(--grid-problem-intervals-text);
    font-size: 11px;
    line-height: 1.3;
}

.grid-problem-interval-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.grid-problem-interval-list i,
.grid-problem-entry-link {
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 3px 6px;
    border: var(--grid-problem-interval-list-border);
    border-radius: 6px;
    background: var(--color-surface-tinted);
    color: var(--grid-problem-interval-list-text);
    font-size: 11px;
    font-style: normal;
    line-height: 1.2;
    overflow-wrap: anywhere;
    white-space: normal;
}

.grid-problem-entry-link {
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
}

.grid-problem-entry-side {
    flex: 0 0 auto;
    color: var(--grid-problem-entry-side-text);
    font-weight: 500;
    white-space: nowrap;
}

.grid-problem-entry-details {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.grid-problem-entry-details .lesson-dot {
    flex: 0 0 auto;
    margin-right: 0;
}

.grid-problem-entry-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-problem-entry-link:hover,
.grid-problem-entry-link:focus-visible {
    border-color: var(--grid-problem-entry-link-hover-border);
    background: var(--grid-problem-entry-link-hover-surface);
    color: var(--grid-problem-entry-link-hover-text);
    outline: none;
}

.grid-problem-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
}

.grid-problem-merge-groups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 7px;
    color: var(--grid-problem-merge-groups-text);
    font-size: 11px;
    line-height: 1.3;
}

.grid-problem-merge-groups i {
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border: var(--grid-problem-merge-groups-border);
    border-radius: 6px;
    background: var(--color-surface-tinted);
    color: var(--grid-problem-merge-groups-text-variant-2);
    font-size: 11px;
    font-style: normal;
    line-height: 1.2;
}

.grid-problem-merge-plan {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.grid-problem-merge-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.grid-problem-merge-subject {
    min-width: 0;
    display: block;
    overflow: hidden;
    color: var(--color-action-secondary-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-problem-merge-list {
    display: grid;
    gap: 4px;
}

.grid-problem-merge-row {
    display: grid;
    grid-template-columns: minmax(86px, 112px) minmax(0, 1fr) max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid var(--drawer-divider-color);
    border-radius: 8px;
    background: var(--grid-problem-merge-row-surface);
    color: var(--color-tab-text);
    font-size: 11px;
    line-height: 1.25;
}

.grid-problem-merge-row.has-time {
    grid-template-columns: minmax(86px, 112px) 74px minmax(0, 1fr) max-content minmax(0, 1fr);
}

.grid-problem-merge-date {
    min-width: 0;
    overflow: hidden;
    color: var(--grid-problem-merge-date-text);
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-problem-merge-time {
    min-width: 0;
    overflow: hidden;
    color: var(--grid-problem-merge-time-text);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-problem-merge-relation {
    color: var(--color-text-disabled);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.grid-problem-merge-groups-inline {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
}

.grid-problem-merge-source,
.grid-problem-merge-target {
    min-width: 0;
    flex-wrap: nowrap;
}

.grid-problem-merge-row .grid-problem-entry-link {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    min-width: 0;
    width: 100%;
    flex: 1 1 0;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 7px;
    font-size: 11px;
    justify-content: flex-start;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-problem-merge-row .grid-problem-entry-link.has-subject {
    height: 38px;
    min-height: 38px;
    display: inline-grid;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 1px;
}

.grid-problem-entry-group,
.grid-problem-entry-subject {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-problem-entry-group {
    color: var(--grid-problem-entry-group-text);
    font-weight: 500;
}

.grid-problem-entry-subject {
    color: var(--grid-problem-entry-subject-text);
    font-size: 10px;
    font-weight: 400;
}

.grid-problem-dates i {
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--grid-problem-dates-surface);
    color: var(--grid-problem-dates-text);
    font-size: 10px;
    font-style: normal;
}

.grid-problem-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.grid-problem-links a,
.grid-problem-action {
    width: auto;
    min-width: 190px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
    padding: 0 12px;
    border: 1px solid var(--lesson-card-border);
    border-radius: 8px;
    background: var(--lesson-card-surface);
    color: var(--grid-problem-links-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    white-space: normal;
}

.grid-problem-links a:hover,
.grid-problem-links a:focus {
    border-color: var(--grid-problem-links-hover-border);
    background: var(--grid-problem-links-hover-surface);
    outline: none;
}

.grid-problem-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.grid-problem-action {
    border: var(--grid-problem-action-border);
    background: var(--grid-problem-action-surface);
    cursor: pointer;
}

.grid-problem-action:hover,
.grid-problem-action:focus-visible {
    border-color: var(--grid-problem-action-hover-border);
    background: var(--grid-problem-action-hover-surface);
    outline: none;
}

.grid-problem-action:disabled {
    cursor: default;
    opacity: .64;
}

.alert .grid-problem-links {
    margin-top: 6px;
}

.alert .grid-problem-links a {
    border-color: var(--components-alert-grid-problem-links-a-border-color);
    background: var(--components-alert-grid-problem-links-a-surface);
}

.grid-problems-empty {
    padding: 14px;
    color: var(--color-text-quieter);
    font-size: 13px;
}

.grid-readonly-banner {
    padding: 10px 12px;
    border: var(--grid-readonly-banner-border);
    border-radius: 8px;
    background: var(--grid-readonly-banner-surface);
    color: var(--grid-readonly-banner-text);
}

.grid-panel {
    position: relative;
    padding: 0;
    overflow: visible;
    border-color: transparent;
    border-radius: 8px;
    flex: 1 1 auto;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    margin-left: 0;
}

.grid-sheet {
    --grid-sheet-frame-radius: 8px;
    display: block;
    position: relative;
    overflow: auto;
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: var(--grid-sheet-frame-radius) 0 0 0;
    background: var(--color-surface);
    overscroll-behavior: contain;
    border: var(--grid-sheet-border);
    border-right: 0;
    border-bottom: 0;
    scrollbar-color: var(--grid-sheet-scrollbar);
    scrollbar-width: thin;
}

#group-grid.grid-sheet {
    --grid-meta-gutter: var(--grid-left-rail-offset);
    border: 0;
    background: transparent;
}

.grid-sheet::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.grid-sheet::-webkit-scrollbar-track {
    background: var(--color-surface-muted-strong);
    border-radius: 999px;
}

.grid-sheet::-webkit-scrollbar-thumb {
    border: var(--grid-sheet-border-variant-2);
    border-radius: 999px;
    background: var(--grid-sheet-surface);
}

.grid-sheet::-webkit-scrollbar-thumb:hover {
    background: var(--grid-sheet-hover-surface);
}

.grid-sheet-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: var(--color-surface);
}

#group-grid .grid-sheet-table {
    margin-left: var(--grid-meta-gutter);
    min-width: 0;
    background: var(--grid-sticky-bg, var(--grid-rail-sticky-surface));
}

#group-grid[data-group-count="1"] .grid-sheet-table {
    width: max-content;
    min-width: 0;
}

#group-grid[data-group-count="1"] .grid-group-head,
#group-grid[data-group-count="1"] .grid-cell {
    width: var(--grid-single-group-width);
    min-width: var(--grid-single-group-width);
    max-width: var(--grid-single-group-width);
}

.grid-sheet-tabs-bar {
    min-height: 30px;
    height: 30px;
    display: flex;
    align-items: stretch;
    padding: 0;
    margin-top: -2px;
    background: var(--color-surface-subtle);
}

.grid-sheet-tabs-nav {
    width: 38px;
    min-width: 38px;
    height: 26px;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 1px 0 0;
    padding: 0;
    border: var(--grid-sheet-tabs-nav-border);
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: var(--grid-sheet-tabs-nav-surface);
    color: var(--grid-sheet-tabs-nav-text);
    font-size: 17px;
    font-weight: 600;
    line-height: 0;
    cursor: pointer;
}

.grid-sheet-tabs-nav:hover {
    background: var(--color-surface);
    color: var(--color-link-text);
}

.grid-sheet-tabs-nav span {
    display: block;
    transform: translateY(-1px);
}

.grid-calendar-open svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.grid-sheet-tabs {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.grid-sheet-tabs::-webkit-scrollbar {
    display: none;
}

.grid-sheet-footer-tools {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: stretch;
    margin-left: 4px;
    border-left: var(--grid-sheet-footer-tools-border);
    background: var(--grid-sheet-footer-tools-surface);
}

.grid-sheet-footer-tool {
    width: 32px;
    min-width: 32px;
    height: 30px;
    border: 0;
    border-left: var(--grid-sheet-footer-tool-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    color: var(--grid-sheet-footer-tool-text);
    cursor: pointer;
}

.grid-sheet-footer-tools > .grid-sheet-footer-tool:first-child {
    border-left: 0;
}

.grid-sheet-footer-toolbar-help-menu {
    position: relative;
    display: inline-flex;
}

.grid-sheet-footer-toolbar-help-menu > summary {
    list-style: none;
}

.grid-sheet-footer-toolbar-help-menu > summary::-webkit-details-marker {
    display: none;
}

.grid-sheet-footer-tool svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.16s ease;
}

.grid-sheet-footer-toggle-icon {
    transform-box: view-box;
    transform-origin: 50% 50%;
}

.grid-sheet-footer-tool[aria-expanded="true"] .grid-sheet-footer-toggle-icon {
    transform: rotate(180deg);
}

.grid-sheet-footer-tool:hover,
.grid-sheet-footer-tool:focus-visible {
    outline: 0;
    background: var(--color-surface);
    color: var(--color-link-text);
}

.grid-sheet-footer-toolbar-help-menu[open] .grid-sheet-footer-tool {
    background: var(--color-surface);
    color: var(--color-link-text);
}

.grid-sheet-footer.app-page-help-footer {
    height: 62px;
    min-height: 62px;
    align-items: center;
    margin: 0;
    padding: 0 14px;
    border-top: var(--grid-sheet-footer-app-page-help-footer-border);
    background: var(--color-surface);
}

.grid-sheet-footer.app-page-help-footer[hidden] {
    display: none;
}

.grid-sheet-tab {
    height: 26px;
    min-width: max-content;
    max-width: 210px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: var(--grid-sheet-tab-border);
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: var(--grid-sheet-tab-surface);
    color: var(--grid-sheet-tab-text);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.grid-sheet-tab:hover {
    background: var(--color-data-table-tree-surface);
    color: var(--grid-sheet-tab-hover-text);
}

.grid-sheet-tab.is-active {
    position: relative;
    z-index: 1;
    height: 29px;
    background: var(--color-surface);
    color: var(--grid-sheet-tab-is-active-text);
    font-weight: 600;
}

.grid-sheet-tab.is-published {
    border-color: var(--calendar-published-border);
    background: var(--calendar-published-surface-1);
    color: var(--grid-sheet-tab-is-published-text);
}

.grid-sheet-tab.is-published:hover {
    border-color: var(--calendar-published-border-2);
    background: var(--grid-sheet-tab-is-published-hover-surface);
    color: var(--grid-sheet-tab-is-published-hover-text);
}

.grid-sheet-tab.is-published.is-active {
    border-color: var(--calendar-published-border-3);
    background: var(--calendar-published-surface-2);
    color: var(--grid-sheet-tab-is-published-is-active-text);
}

.grid-sheet-tabs-nav.is-active {
    position: relative;
    z-index: 1;
    height: 29px;
    background: var(--color-surface);
    color: var(--grid-sheet-tabs-nav-is-active-text);
}

#group-grid[data-study-graph="1"] {
    background: var(--grid-sticky-bg, var(--grid-rail-sticky-surface));
}

#group-grid[data-study-graph="1"][data-study-graph-horizontal-scroll="0"] {
    overflow-x: hidden;
}

.grid-study-graph {
    --study-graph-surface: var(--color-table-surface);
    --study-graph-header-surface: var(--color-table-header-surface);
    --study-graph-profile-surface: var(--components-grid-study-graph-study-graph-profile-surface);
    --study-graph-hover-surface: var(--components-grid-study-graph-study-graph-hover-surface);
    --study-graph-border: var(--color-table-border);
    --study-graph-border-strong: var(--color-border);
    --study-graph-text: var(--color-text);
    --study-graph-secondary-text: var(--color-text-secondary);
    --study-graph-muted-text: var(--color-text-muted);
    --study-graph-profile-text: var(--components-grid-study-graph-study-graph-profile-text);
    --study-graph-day-surface: var(--weekday-label-surface);
    --study-graph-day-text: var(--weekday-label-text);
    --study-graph-lecture-surface: var(--components-grid-study-graph-study-graph-lecture-surface);
    --study-graph-practice-surface: var(--components-grid-study-graph-study-graph-practice-surface);
    --study-graph-lab-surface: var(--components-grid-study-graph-study-graph-lab-surface);
    --study-graph-exam-surface: var(--components-grid-study-graph-study-graph-exam-surface);
    --study-graph-consultation-surface: var(--components-grid-study-graph-study-graph-consultation-surface);
    --study-graph-other-surface: var(--components-grid-study-graph-study-graph-other-surface);
    --study-graph-lecture-text: var(--components-grid-study-graph-study-graph-lecture-text);
    --study-graph-practice-text: var(--components-grid-study-graph-study-graph-practice-text);
    --study-graph-lab-text: var(--components-grid-study-graph-study-graph-lab-text);
    --study-graph-exam-text: var(--components-grid-study-graph-study-graph-exam-text);
    --study-graph-consultation-text: var(--components-grid-study-graph-study-graph-consultation-text);
    --study-graph-other-text: var(--components-grid-study-graph-study-graph-other-text);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: transparent;
}

.grid-study-graph-table {
    width: var(--study-graph-table-width, max-content);
    min-width: 0;
    margin-left: var(--grid-meta-gutter);
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: var(--study-graph-text);
    font-size: 11px;
}

.grid-study-graph .grid-study-graph-table th,
.grid-study-graph .grid-study-graph-table td {
    border-right: 1px solid var(--study-graph-border);
    border-bottom: 1px solid var(--study-graph-border);
    background: var(--study-graph-surface);
    vertical-align: middle;
}

.grid-study-graph-table thead th {
    position: sticky;
    top: 0;
    z-index: 24;
    height: 84px;
    padding: 2px;
    background: var(--study-graph-header-surface);
    color: var(--study-graph-secondary-text);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    box-shadow: inset 0 1px 0 var(--study-graph-border-strong), inset 0 -1px 0 var(--study-graph-border-strong);
}

.grid-study-graph-head-label {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 22px;
}

.grid-study-graph-head-label > span {
    min-width: 0;
}

.grid-study-graph-filter-toggle {
    position: absolute;
    top: 50%;
    right: 2px;
    width: 18px;
    min-width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--color-control-border);
    border-radius: 3px;
    background: var(--color-control-bg);
    color: var(--study-graph-secondary-text);
    cursor: pointer;
    transform: translateY(-50%);
}

.grid-study-graph-filter-toggle svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.grid-study-graph-filter-toggle:hover {
    border-color: var(--color-control-focus-border-compact);
    background: var(--color-surface-hover);
    color: var(--study-graph-text);
}

.grid-study-graph-filter-toggle.is-active {
    border-color: var(--color-surface-selected-border);
    background: var(--color-surface-selected);
    color: var(--study-graph-text);
}

.grid-study-graph-filter-toggle:focus-visible {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 1px;
}

.grid-study-graph-filter-popover {
    position: fixed;
    z-index: 70;
    box-sizing: border-box;
    width: min(260px, calc(100vw - 16px));
    padding: 8px;
    border: 1px solid var(--color-popover-border);
    border-radius: 7px;
    background: var(--color-popover-surface);
    box-shadow: var(--color-popover-shadow);
    color: var(--study-graph-text);
    font-size: 11px;
}

.grid-study-graph-filter-popover.is-hidden {
    display: none;
}

.grid-study-graph-filter-popover-head {
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.grid-study-graph-filter-popover-head label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
}

.grid-study-graph-filter-popover-head button,
.grid-study-graph-filter-empty button {
    padding: 1px 3px;
    border: 0;
    background: transparent;
    color: var(--color-action-primary-bg);
    font: inherit;
    line-height: 1.25;
    cursor: pointer;
}

.grid-study-graph-filter-popover-head button:disabled {
    color: var(--study-graph-muted-text);
    cursor: default;
}

.grid-study-graph-filter-popover-head button:not(:disabled):hover,
.grid-study-graph-filter-empty button:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.grid-study-graph-filter-popover-head button:focus-visible,
.grid-study-graph-filter-empty button:focus-visible {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 1px;
}

.grid-study-graph-filter-popover input {
    box-sizing: border-box;
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--color-control-border);
    border-radius: 5px;
    background: var(--color-control-bg);
    color: var(--study-graph-text);
    font: 400 11px/1.25 Inter, system-ui, sans-serif;
}

.grid-study-graph-filter-popover input::placeholder {
    color: var(--color-control-placeholder);
}

.grid-study-graph-filter-popover input:focus-visible {
    border-color: var(--color-control-focus-border);
    outline: 2px solid var(--color-control-focus-ring);
    outline-offset: 0;
}

.grid-study-graph-filter-empty {
    color: var(--study-graph-secondary-text);
}

.grid-study-graph-filter-empty > span {
    margin-right: 6px;
}

.grid-study-graph-subject-head,
.grid-study-graph-subject {
    left: var(--grid-meta-gutter);
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    box-shadow: calc(-1 * var(--grid-meta-gutter)) 0 0 var(--grid-sticky-bg, var(--grid-rail-sticky-surface)), inset 1px 0 var(--study-graph-border-strong);
}

.grid-study-graph-table thead .grid-study-graph-subject-head {
    z-index: 26;
    box-shadow: calc(-1 * var(--grid-meta-gutter)) 0 0 var(--grid-sticky-bg, var(--grid-rail-sticky-surface)), inset 1px 0 var(--study-graph-border-strong), inset 0 1px 0 var(--study-graph-border-strong), inset 0 -1px 0 var(--study-graph-border-strong);
}

.grid-study-graph-table th.grid-study-graph-subject {
    position: sticky;
    z-index: 12;
    padding: 0;
    background: var(--study-graph-surface);
    font-weight: 500;
    text-align: left;
    vertical-align: top;
}

.grid-study-graph-subject-content {
    position: sticky;
    top: 84px;
    z-index: 1;
    display: block;
    padding: 7px 9px;
    background: var(--study-graph-surface);
    box-shadow: inset 1px 0 var(--study-graph-border-strong);
}

.grid-study-graph-subject-content > span,
.grid-study-graph-subject small,
.grid-study-graph-row-meta > span,
.grid-study-graph-week-hours,
.grid-study-graph-week-date {
    display: block;
}

.grid-study-graph-subject small {
    margin-top: 2px;
    color: var(--study-graph-secondary-text);
    font-size: 10px;
    font-weight: 400;
}

.grid-study-graph-row-head,
.grid-study-graph-row-meta {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
}

.grid-study-graph-row-meta {
    padding: 2px 8px;
    color: var(--study-graph-secondary-text);
    line-height: 1.25;
}

.grid-study-graph-row-meta .grid-study-graph-teacher,
.grid-study-graph-details {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.grid-study-graph-row-meta .grid-study-graph-teacher {
    margin-bottom: 1px;
    color: var(--study-graph-text);
    font-weight: 500;
}

.grid-study-graph-details {
    display: block;
    font-size: 10px;
}

.grid-study-graph-day {
    min-width: 24px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 0;
    background: var(--study-graph-day-surface);
    color: var(--study-graph-day-text);
    font-size: 9px;
    font-weight: 400;
    line-height: 15px;
}

.grid-study-graph-total-head,
.grid-study-graph-total {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    text-align: center;
}

.grid-study-graph-total {
    padding: 2px 3px;
    color: var(--study-graph-secondary-text);
    font-variant-numeric: tabular-nums;
}

.grid-study-graph-week-head,
.grid-study-graph-cell {
    width: var(--study-graph-week-width, 54px);
    min-width: var(--study-graph-week-width, 54px);
    max-width: var(--study-graph-week-width, 54px);
    text-align: center;
}

.grid-study-graph-week-head span,
.grid-study-graph-week-head small {
    display: inline-block;
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.grid-study-graph-week-head small {
    margin-left: 2px;
    color: var(--study-graph-secondary-text);
    font-size: 10px;
    font-weight: 400;
}

.grid-study-graph-cell {
    height: 36px;
    padding: 0;
    color: var(--study-graph-secondary-text);
    font-variant-numeric: tabular-nums;
}

.grid-study-graph-week-hours {
    color: var(--study-graph-text);
    font-weight: 600;
}

.grid-study-graph-week-date {
    margin-top: 2px;
    color: var(--study-graph-secondary-text);
    font-size: 10px;
    font-weight: 400;
}

.grid-study-graph-cell.is-empty {
    padding: 2px 3px;
    color: var(--study-graph-muted-text);
    background: var(--study-graph-surface);
}

.grid-study-graph-week-head.is-outside-publication,
.grid-study-graph-cell.is-outside-publication {
    opacity: 0.34;
    filter: saturate(0.35);
}

.grid-study-graph .grid-study-graph-cell.is-lecture {
    background: var(--study-graph-lecture-surface);
}

.grid-study-graph .grid-study-graph-cell.is-practice {
    background: var(--study-graph-practice-surface);
}

.grid-study-graph .grid-study-graph-cell.is-lab,
.grid-study-graph .grid-study-graph-cell.is-credit {
    background: var(--study-graph-lab-surface);
}

.grid-study-graph .grid-study-graph-cell.is-exam {
    background: var(--study-graph-exam-surface);
}

.grid-study-graph .grid-study-graph-cell.is-consultation {
    background: var(--study-graph-consultation-surface);
}

.grid-study-graph .grid-study-graph-cell.is-other {
    background: var(--study-graph-other-surface);
}

.grid-study-graph-week-button {
    width: 100%;
    height: 100%;
    min-height: 36px;
    display: block;
    padding: 2px 3px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.grid-study-graph-week-button:hover,
.grid-study-graph-week-button:focus-visible {
    outline: 1px solid var(--color-control-focus-border);
    outline-offset: -2px;
    background: color-mix(in srgb, var(--study-graph-surface) 72%, var(--study-graph-text));
}

.grid-study-graph-control-head,
.grid-study-graph-control {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    text-align: center;
}

.grid-study-graph-control {
    padding: 2px 4px;
    color: var(--study-graph-secondary-text);
    font-weight: 500;
}

.grid-study-graph-profile-row {
    background: var(--study-graph-profile-surface);
}

.grid-study-graph-table .grid-study-graph-profile-row th {
    position: relative;
    z-index: 10;
    height: auto;
    padding: 5px 10px;
    border-right: 1px solid var(--study-graph-border-strong);
    background: var(--study-graph-profile-surface);
    color: var(--study-graph-profile-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
}

.grid-study-graph-profile-label {
    position: sticky;
    left: calc(var(--grid-meta-gutter) + 10px);
    display: block;
    width: max-content;
    max-width: calc(100vw - var(--current-sidebar-width, 72px) - 48px);
    background: transparent;
    white-space: nowrap;
}

.grid-study-graph-profile-label::before {
    content: '';
    position: absolute;
    top: -5px;
    bottom: -5px;
    left: calc(-1 * (var(--grid-meta-gutter) + 10px));
    width: var(--grid-meta-gutter);
    background: var(--study-graph-profile-surface);
    box-shadow: inset -1px 0 var(--study-graph-border-strong);
}

.grid-study-graph-subject-summary {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    line-height: 16px;
}

.grid-study-graph-subject-hours {
    white-space: nowrap;
}

.grid-study-graph-plan-deltas {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: nowrap;
    margin: 0;
    vertical-align: baseline;
}

.grid-study-graph-plan-delta {
    min-height: 16px;
    display: inline-flex;
    align-items: center;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    line-height: 14px;
    white-space: nowrap;
}

.grid-study-graph-plan-delta.is-lecture {
    background: var(--study-graph-lecture-surface);
    color: var(--study-graph-lecture-text);
}

.grid-study-graph-plan-delta.is-practice {
    background: var(--study-graph-practice-surface);
    color: var(--study-graph-practice-text);
}

.grid-study-graph-plan-delta.is-lab,
.grid-study-graph-plan-delta.is-credit {
    background: var(--study-graph-lab-surface);
    color: var(--study-graph-lab-text);
}

.grid-study-graph-plan-delta.is-exam {
    background: var(--study-graph-exam-surface);
    color: var(--study-graph-exam-text);
}

.grid-study-graph-plan-delta.is-consultation {
    background: var(--study-graph-consultation-surface);
    color: var(--study-graph-consultation-text);
}

.grid-study-graph-plan-delta.is-other {
    background: var(--study-graph-other-surface);
    color: var(--study-graph-other-text);
}

.grid-study-graph-table tbody tr:not(.grid-study-graph-profile-row):hover > td {
    box-shadow: var(--components-grid-study-graph-table-tbody-tr-not-grid-study-graph-profile-row-hover-td-shadow);
}

.grid-study-graph-table .is-col-hover {
    box-shadow: var(--components-grid-study-graph-table-is-col-hover-shadow);
}

.grid-study-graph-table thead th.is-col-hover {
    background: var(--study-graph-hover-surface);
}

.grid-study-graph-table tbody tr:not(.grid-study-graph-profile-row):hover > td.is-col-hover {
    box-shadow: var(--components-grid-study-graph-table-tbody-tr-not-grid-study-graph-profile-row-hover-td-is-col-hover-shadow);
}

.grid-study-graph-empty {
    padding: 20px;
    color: var(--study-graph-secondary-text);
    text-align: center;
}

.grid-sheet th,
.grid-sheet td {
    border-right: 1px solid var(--grid-cell-border-inline);
    border-bottom: 1px solid var(--grid-cell-border-block);
    background: var(--color-surface);
    vertical-align: middle;
}

.grid-sheet-head th {
    position: sticky;
    top: 0;
    z-index: 32;
    height: 36px;
    background: var(--color-surface-tinted);
    box-shadow: var(--grid-sheet-head-shadow);
}

.grid-sheet-head .grid-corner-cell {
    border-top-left-radius: var(--grid-sheet-frame-radius);
}

.grid-corner-cell,
.grid-time-cell {
    position: sticky;
    left: 0;
    z-index: 15;
    width: var(--grid-left-width);
    min-width: var(--grid-left-width);
    max-width: var(--grid-left-width);
}

.grid-meta-corner,
.grid-meta-cell {
    position: sticky;
    left: var(--grid-meta-gutter);
    z-index: 24;
    width: 0;
    min-width: 0;
    max-width: 0;
    padding: 0;
    border-right: 0;
    background: var(--grid-rail-sticky-surface);
    box-shadow: none;
    overflow: visible;
}

#group-grid .grid-sheet-table .grid-meta-corner,
#group-grid .grid-sheet-table .grid-meta-cell {
    border: 0;
    background: var(--grid-rail-sticky-surface);
    box-shadow: var(--grid-meta-cell-divider-shadow);
}

#group-grid .grid-sheet-table .grid-corner-cell {
    border: 0;
}

.grid-meta-corner {
    top: 0;
    z-index: 42;
    height: 36px;
}

#group-grid .grid-corner-cell,
#group-grid .grid-time-cell {
    left: var(--grid-meta-gutter);
}

#group-grid .grid-sheet-head th {
    background: var(--grid-sticky-bg, var(--grid-rail-sticky-surface));
    box-shadow: var(--grid-sheet-head-divider-shadow);
}

#group-grid .grid-sheet-head .grid-meta-corner {
    z-index: 66;
}

.grid-time-cell {
    background: var(--grid-rail-sticky-surface);
    box-shadow: var(--grid-time-cell-shadow-variant-2);
}

.grid-sheet .grid-time-cell {
    background: var(--grid-rail-sticky-surface);
}

#group-grid .grid-time-cell {
    overflow: visible;
    box-shadow: var(--group-grid-grid-time-cell-shadow);
}

#group-grid .grid-sheet-head .grid-corner-cell {
    z-index: 64;
    box-shadow: var(--group-grid-grid-sheet-head-grid-corner-cell-shadow);
}

.grid-corner-cell {
    z-index: 40;
    padding: 0 4px;
    background: var(--grid-rail-sticky-surface);
    box-shadow: var(--grid-corner-cell-shadow);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    color: transparent;
}

.grid-bell-schedule-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--color-text-muted);
    text-decoration: none;
    vertical-align: middle;
}

.grid-bell-schedule-edit-btn:hover,
.grid-bell-schedule-edit-btn:focus-visible {
    border-color: var(--color-control-border);
    background: var(--color-surface-hover);
    color: var(--color-text-strong);
    outline: none;
}

.grid-bell-schedule-edit-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.grid-group-head {
    width: var(--grid-group-width);
    min-width: var(--grid-group-width);
    max-width: var(--grid-group-width);
    padding: 5px 8px 4px;
    text-align: left;
    vertical-align: top;
}

.grid-resource-window-spacer {
    padding: 0;
    pointer-events: none;
}

.grid-sheet-head .grid-resource-window-spacer {
    background: var(--color-surface-tinted);
}

.grid-group-name {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-weight: 700;
    color: var(--grid-group-name-text);
    font-size: 12px;
}

.grid-group-profiles {
    margin-top: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
    color: var(--grid-group-profiles-text);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.15;
}

#group-grid.is-all-schedule-v2 {
    --grid-group-base-width: 288px;
    --grid-group-width: var(--grid-group-base-width);
}

#group-grid {
    outline: 1px solid var(--grid-frame-outline-color);
    outline-offset: var(--grid-frame-outline-offset);
}

.all-schedule-v2-weeks {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--all-schedule-v2-week-count), minmax(0, 1fr));
    min-width: 0;
    min-height: 16px;
    border-top: 0;
    background: var(--all-schedule-v2-card-bg);
    box-shadow: inset 0 1px 0 var(--all-schedule-v2-weeks-divider);
}

#group-grid .grid-sheet-head .grid-group-head.is-col-hover {
    background: var(--grid-column-hover-surface);
}

.grid-sheet-table tbody tr:hover > th,
.grid-sheet-table tbody tr:hover > td {
    background: var(--grid-row-hover-surface);
}

.grid-sheet-table tbody tr:hover > .grid-time-cell {
    background: var(--grid-time-row-hover-surface);
}

.grid-sheet-table tbody tr.is-non-study-day > th,
.grid-sheet-table tbody tr.is-non-study-day > td {
    background: var(--grid-non-study-row-surface);
}

.grid-sheet-table tbody tr.is-non-study-day:hover > th,
.grid-sheet-table tbody tr.is-non-study-day:hover > td {
    background: var(--grid-non-study-row-hover-surface);
}

.grid-sheet-table tbody tr.is-non-study-day.calendar-day-state > th,
.grid-sheet-table tbody tr.is-non-study-day.calendar-day-state > td {
    background: var(--calendar-day-state-surface);
}

.grid-sheet-table tbody tr.is-non-study-day.calendar-day-state:hover > th,
.grid-sheet-table tbody tr.is-non-study-day.calendar-day-state:hover > td {
    background: var(--calendar-day-state-hover-surface);
}

.grid-sheet-table tbody tr.is-outside-template > th,
.grid-sheet-table tbody tr.is-outside-template > td {
    background: var(--grid-sheet-table-is-outside-template-surface);
}

.grid-sheet-table tbody tr.is-outside-template:hover > th,
.grid-sheet-table tbody tr.is-outside-template:hover > td {
    background: var(--grid-sheet-table-is-outside-template-hover-surface);
}

#group-grid .grid-cell.is-col-hover {
    background: var(--grid-row-hover-surface);
}

.grid-day-block .grid-time-cell {
    border-top: 0;
    box-shadow: var(--grid-day-block-grid-time-cell-shadow);
}

.grid-day-block th,
.grid-day-block td {
    box-shadow: var(--grid-day-block-shadow);
}

#group-grid .grid-day-block .grid-time-cell {
    box-shadow: var(--group-grid-grid-day-block-grid-time-cell-shadow);
}

.grid-sheet-table tbody tr:first-child th,
.grid-sheet-table tbody tr:first-child td {
    box-shadow: none;
}

.grid-sheet-table tbody tr:first-child .grid-time-cell {
    box-shadow: var(--grid-sheet-table-grid-time-cell-shadow);
}

#group-grid .grid-sheet-table tbody tr:first-child .grid-time-cell {
    box-shadow: var(--group-grid-grid-time-cell-shadow);
}

.grid-time-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 2px;
    min-height: 48px;
    position: relative;
    overflow: visible;
}

.grid-meta-cell .grid-pair-marker {
    position: absolute;
    left: calc(-1 * var(--grid-meta-gutter));
    top: 50%;
    width: var(--grid-meta-gutter);
    color: var(--grid-meta-cell-grid-pair-marker-text);
    font-size: 9px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.grid-meta-cell .grid-pair-marker.is-first-in-day {
    top: 18px;
    transform: none;
    z-index: 1;
}

#group-grid .grid-meta-cell::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--grid-meta-gutter));
    top: -1px;
    bottom: -1px;
    width: var(--grid-meta-gutter);
    background: var(--grid-sticky-bg, var(--grid-rail-sticky-surface));
    pointer-events: none;
}

#group-grid .grid-meta-corner::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--grid-meta-gutter));
    top: 0;
    bottom: 0;
    width: var(--grid-meta-gutter);
    background: var(--grid-sticky-bg, var(--grid-rail-sticky-surface));
    pointer-events: auto;
}

#group-grid .grid-sheet-table tbody tr.is-non-study-day > .grid-meta-cell::before {
    background: var(--components-group-grid-grid-sheet-table-tbody-tr-is-non-study-day-grid-meta-cell-before-surface);
}

#group-grid .grid-sheet-table tbody tr.is-non-study-day.calendar-day-state > .grid-meta-cell::before {
    background: var(--calendar-day-state-surface);
}

#group-grid .grid-sheet-table tbody tr.is-outside-template > .grid-meta-cell::before {
    background: var(--components-group-grid-grid-sheet-table-tbody-tr-is-outside-template-grid-meta-cell-before-surface);
}

.grid-meta-cell .grid-day-pair-marker {
    position: absolute;
    left: calc(-1 * var(--grid-meta-gutter));
    top: 0;
    width: var(--grid-meta-gutter);
    min-width: var(--grid-meta-gutter);
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--weekday-label-surface);
    color: var(--weekday-label-text);
    font-size: 10px;
    font-weight: 400;
    line-height: 16px;
    transform: none;
    z-index: 2;
    pointer-events: none;
}

.grid-meta-cell .grid-day-pair-marker.is-non-study-day {
    background: var(--calendar-day-state-surface, var(--weekday-label-surface));
    color: var(--calendar-day-state-text, var(--weekday-label-text));
    font-weight: 600;
}

.grid-row-markers-clip {
    position: absolute;
    top: var(--grid-head-height, 38px);
    left: calc(-1 * var(--grid-meta-gutter));
    width: var(--grid-meta-gutter);
    height: calc(100% - var(--grid-head-height, 38px));
    overflow: hidden;
    z-index: 25;
    pointer-events: none;
}

.grid-row-markers-track {
    will-change: transform;
}

.grid-pair-markers-clip {
    position: absolute;
    top: 38px;
    left: calc(-1 * var(--grid-meta-gutter));
    width: calc(var(--grid-meta-gutter) + var(--grid-left-width));
    height: calc(100% - 38px);
    overflow: hidden;
    z-index: 26;
    pointer-events: none;
}

.grid-pair-markers {
    position: relative;
}

.grid-pair-marker {
    position: absolute;
    width: 18px;
    color: var(--grid-pair-marker-text);
    font-size: 9px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    transform: translateY(-50%);
}

.grid-day-pair-marker {
    position: absolute;
    width: 28px;
    min-width: 28px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--weekday-label-surface);
    color: var(--weekday-label-text);
    font-size: 10px;
    font-weight: 400;
    line-height: 16px;
    text-align: center;
}

.grid-day-pair-marker.is-non-study-day {
    background: var(--calendar-day-state-surface, var(--weekday-label-surface));
    color: var(--calendar-day-state-text, var(--weekday-label-text));
    font-weight: 600;
}

.grid-marker-row {
    height: 48px;
    position: relative;
}

.grid-marker-row.is-non-study-day::before {
    content: "";
    position: absolute;
    inset: 0 -1px 0 0;
    background: var(--components-grid-marker-row-is-non-study-day-before-surface);
}

.grid-marker-row.is-outside-template::before {
    content: "";
    position: absolute;
    inset: 0 -1px 0 0;
    background: var(--components-grid-marker-row-is-outside-template-before-surface);
}

.grid-marker-row.grid-empty-row {
    height: 18px;
}

.grid-day-mini,
.grid-day-sticky {
    width: 28px;
    min-width: 28px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: var(--weekday-label-surface);
    font-weight: 400;
    color: var(--weekday-label-text);
    font-size: 10px;
    line-height: 16px;
    text-transform: none;
    text-align: center;
    box-shadow: none;
    position: absolute;
    right: -1px;
    top: 0;
    z-index: 28;
    pointer-events: none;
    will-change: transform;
}

.grid-day-mini {
    z-index: 22;
    will-change: auto;
}

.grid-day-mini.is-empty {
    display: none;
}

.grid-day-sticky.is-hidden {
    display: none;
}

.grid-day-sticky {
    display: none;
}

.grid-time-stack {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.grid-time-label {
    color: var(--color-text-secondary);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
}

.grid-time-end {
    color: var(--color-text-muted);
    font-weight: 500;
}

.grid-time-separator {
    width: 1px;
    height: 10px;
    border-left: 1px dashed var(--color-text-muted);
}

.grid-time-label.is-hidden {
    visibility: hidden;
}

.grid-time-note {
    margin-top: 2px;
    color: var(--color-text-secondary);
    font-size: 8px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.grid-cell {
    position: relative;
    width: var(--grid-group-width);
    min-width: var(--grid-group-width);
    max-width: var(--grid-group-width);
    height: 48px;
    padding: 3px 4px;
    background: var(--color-surface);
    vertical-align: top;
    overflow: visible;
}

#group-grid.is-all-schedule-v2 .grid-cell {
    padding: 3px 4px;
}

#group-grid .grid-cell.has-multiple-grid-cards {
    padding-bottom: 14px;
}

#group-grid .grid-sheet-table tbody tr.grid-day-end > .grid-cell {
    padding-bottom: 18px;
}

.all-schedule-v2-entry {
    --all-schedule-v2-week-fill: var(--components-all-schedule-v2-entry-all-schedule-v2-week-fill);
    --all-schedule-v2-week-number-active: var(--components-all-schedule-v2-entry-all-schedule-v2-week-number-active);
    --all-schedule-v2-card-bg: var(--components-all-schedule-v2-entry-all-schedule-v2-card-bg);
    --all-schedule-v2-border: var(--lesson-practice-border);
    --all-schedule-v2-line: var(--components-all-schedule-v2-entry-all-schedule-v2-line);
    position: relative;
    min-width: 0;
    margin-bottom: 3px;
    overflow: hidden;
    border: 1px solid var(--all-schedule-v2-border);
    border-left: 3px solid var(--all-schedule-v2-line);
    border-radius: 5px;
    background: var(--all-schedule-v2-card-bg);
}

.all-schedule-v2-entry:last-child {
    margin-bottom: 0;
}

.all-schedule-v2-entry:focus-within {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--all-schedule-v2-line) 28%, transparent);
}

#group-grid.is-all-schedule-v2 .all-schedule-v2-entry:hover,
#group-grid.is-all-schedule-v2 .all-schedule-v2-entry:focus-within,
#group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:hover,
#group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:focus-visible {
    z-index: 5;
}

#group-grid.is-all-schedule-v2 .all-schedule-v2-entry:hover,
#group-grid.is-all-schedule-v2 .all-schedule-v2-entry:focus-within {
    outline: 1px dashed var(--grid-interaction-outline-color);
    outline-offset: var(--focus-outline-offset);
}

#group-grid.is-all-schedule-v2 .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) {
    z-index: 5;
    outline: 1px dashed var(--grid-interaction-outline-color);
    outline-offset: var(--focus-outline-offset);
    box-shadow: var(--grid-interaction-active-shadow);
}

.all-schedule-v2-card {
    min-width: 0;
}

#group-grid.is-all-schedule-v2 .all-schedule-v2-card :is(.lesson-card) {
    width: 100%;
    min-height: 32px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 3px 5px;
}

#group-grid.is-all-schedule-v2 .all-schedule-v2-card :is(.lesson-card:hover, .lesson-card:focus-visible, .lesson-card.is-active-slot, .lesson-card.is-linked-hover) {
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: 0;
}

:is(.all-schedule-v2-card-primary, .all-schedule-v2-card-secondary) {
    display: grid;
    min-width: 0;
    align-items: center;
    column-gap: 5px;
}

.all-schedule-v2-card-primary {
    grid-template-columns: minmax(0, 1fr) max-content;
}

.all-schedule-v2-card-secondary {
    grid-template-columns: minmax(0, 1fr) max-content;
    margin-top: 1px;
}

.all-schedule-v2-card .lesson-card-title {
    font-size: 10px;
    line-height: 1.15;
}

.all-schedule-v2-card :is(.lesson-card-meta, .lesson-card-room) {
    position: static;
    min-width: 0;
    margin: 0;
    color: var(--lesson-card-meta-text);
}

.all-schedule-v2-card :is(.lesson-card-meta) {
    font-size: 10px;
    font-weight: 400;
    line-height: 1.15;
}

.all-schedule-v2-card :is(.lesson-card-room) {
    max-width: 90px;
    color: var(--lesson-card-room-text);
    font-weight: 500;
    justify-self: end;
    text-align: right;
}

.all-schedule-v2-card :is(.lesson-card-indicators) {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    max-width: none;
    min-height: 0;
    margin: 0;
    justify-self: end;
}

.all-schedule-v2-card :is(
    .lesson-card-title,
    .lesson-card-profile,
    .lesson-card-meta,
    .lesson-card-room
) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-schedule-v2-week-fill {
    grid-row: 1;
    min-width: 0;
    background: var(--all-schedule-v2-week-fill);
}

.all-schedule-v2-week-number {
    z-index: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: var(--components-all-schedule-v2-week-number-text);
    font-size: 7px;
    font-weight: 500;
    line-height: 1;
    pointer-events: auto;
}

.all-schedule-v2-week-number.is-active {
    color: var(--all-schedule-v2-week-number-active);
    font-weight: 500;
}

.all-schedule-v2-weeks::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient( to right, transparent 0, transparent calc((100% / var(--all-schedule-v2-week-count)) - 1px), var(--color-surface-active-emphasis) calc((100% / var(--all-schedule-v2-week-count)) - 1px), var(--color-surface-active-emphasis) calc(100% / var(--all-schedule-v2-week-count)) );
    pointer-events: none;
}

.all-schedule-v2-entry.lesson-lecture {
    --all-schedule-v2-week-fill: var(--components-all-schedule-v2-entry-lesson-lecture-all-schedule-v2-week-fill);
    --all-schedule-v2-week-number-active: var(--components-all-schedule-v2-entry-lesson-lecture-all-schedule-v2-week-number-active);
    --all-schedule-v2-title-color: var(--lesson-lecture-title-text);
    --all-schedule-v2-profile-color: var(--lesson-lecture-profile-text);
    --all-schedule-v2-chip-bg: var(--lesson-lecture-chip-surface);
    --all-schedule-v2-chip-border: var(--lesson-lecture-chip-border);
    --all-schedule-v2-chip-color: var(--lesson-lecture-chip-text);
    --all-schedule-v2-card-bg: var(--lesson-lecture-surface);
    --all-schedule-v2-border: var(--lesson-lecture-border);
    --all-schedule-v2-line: var(--lesson-lecture-interaction);
}

.all-schedule-v2-entry.lesson-practice {
    --all-schedule-v2-week-fill: var(--components-all-schedule-v2-entry-lesson-practice-all-schedule-v2-week-fill);
    --all-schedule-v2-week-number-active: var(--components-all-schedule-v2-entry-lesson-practice-all-schedule-v2-week-number-active);
    --all-schedule-v2-title-color: var(--lesson-practice-title-text);
    --all-schedule-v2-profile-color: var(--lesson-practice-profile-text);
    --all-schedule-v2-chip-bg: var(--lesson-practice-chip-surface);
    --all-schedule-v2-chip-border: var(--lesson-practice-chip-border);
    --all-schedule-v2-chip-color: var(--lesson-practice-chip-text);
    --all-schedule-v2-card-bg: var(--lesson-practice-surface);
    --all-schedule-v2-border: var(--lesson-practice-border);
    --all-schedule-v2-line: var(--lesson-practice-interaction);
}

.all-schedule-v2-entry.lesson-lab,
.all-schedule-v2-entry.lesson-credit {
    --all-schedule-v2-week-fill: var(--components-all-schedule-v2-entry-lesson-lab-all-schedule-v2-entry-lesson-credit-all-schedule-v2-week-fill);
    --all-schedule-v2-week-number-active: var(--components-all-schedule-v2-entry-lesson-lab-all-schedule-v2-entry-lesson-credit-all-schedule-v2-week-number-active);
    --all-schedule-v2-title-color: var(--lesson-lab-title-text);
    --all-schedule-v2-profile-color: var(--lesson-lab-profile-text);
    --all-schedule-v2-chip-bg: var(--lesson-lab-chip-surface);
    --all-schedule-v2-chip-border: var(--lesson-lab-chip-border);
    --all-schedule-v2-chip-color: var(--lesson-lab-chip-text);
    --all-schedule-v2-card-bg: var(--lesson-lab-surface);
    --all-schedule-v2-border: var(--lesson-lab-border);
    --all-schedule-v2-line: var(--lesson-lab-interaction);
}

.all-schedule-v2-entry.lesson-exam {
    --all-schedule-v2-week-fill: var(--components-all-schedule-v2-entry-lesson-exam-all-schedule-v2-week-fill);
    --all-schedule-v2-week-number-active: var(--components-all-schedule-v2-entry-lesson-exam-all-schedule-v2-week-number-active);
    --all-schedule-v2-title-color: var(--lesson-exam-title-text);
    --all-schedule-v2-profile-color: var(--lesson-exam-profile-text);
    --all-schedule-v2-chip-bg: var(--lesson-exam-chip-surface);
    --all-schedule-v2-chip-border: var(--lesson-exam-chip-border);
    --all-schedule-v2-chip-color: var(--lesson-exam-chip-text);
    --all-schedule-v2-card-bg: var(--lesson-exam-surface);
    --all-schedule-v2-border: var(--lesson-exam-border);
    --all-schedule-v2-line: var(--lesson-exam-interaction);
}

.all-schedule-v2-entry.lesson-consultation {
    --all-schedule-v2-week-fill: var(--components-all-schedule-v2-entry-lesson-consultation-all-schedule-v2-week-fill);
    --all-schedule-v2-week-number-active: var(--components-all-schedule-v2-entry-lesson-consultation-all-schedule-v2-week-number-active);
    --all-schedule-v2-title-color: var(--lesson-consultation-title-text);
    --all-schedule-v2-profile-color: var(--lesson-consultation-profile-text);
    --all-schedule-v2-chip-bg: var(--lesson-consultation-chip-surface);
    --all-schedule-v2-chip-border: var(--lesson-consultation-chip-border);
    --all-schedule-v2-chip-color: var(--lesson-consultation-chip-text);
    --all-schedule-v2-card-bg: var(--lesson-consultation-surface);
    --all-schedule-v2-border: var(--lesson-consultation-border);
    --all-schedule-v2-line: var(--lesson-consultation-interaction);
}

.all-schedule-v2-entry.lesson-other {
    --all-schedule-v2-week-fill: var(--components-all-schedule-v2-entry-lesson-other-all-schedule-v2-week-fill);
    --all-schedule-v2-week-number-active: var(--components-all-schedule-v2-entry-lesson-other-all-schedule-v2-week-number-active);
    --all-schedule-v2-title-color: var(--lesson-other-title-text);
    --all-schedule-v2-profile-color: var(--lesson-other-profile-text);
    --all-schedule-v2-chip-bg: var(--lesson-other-chip-surface);
    --all-schedule-v2-chip-border: var(--lesson-other-chip-border);
    --all-schedule-v2-chip-color: var(--lesson-other-chip-text);
    --all-schedule-v2-card-bg: var(--lesson-other-surface);
    --all-schedule-v2-border: var(--lesson-other-border);
    --all-schedule-v2-line: var(--lesson-other-interaction);
}

.all-schedule-v2-entry .lesson-card-title {
    color: var(--all-schedule-v2-title-color, var(--lesson-card-title-text));
}

.all-schedule-v2-entry .lesson-card-profile {
    color: var(--all-schedule-v2-profile-color, var(--lesson-card-meta-text));
}

.all-schedule-v2-entry .lesson-card-meta {
    color: var(--all-schedule-v2-meta-color, var(--lesson-card-meta-text));
}

.all-schedule-v2-entry .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--all-schedule-v2-chip-bg, var(--lesson-chip-surface));
    border-color: var(--all-schedule-v2-chip-border, var(--lesson-chip-border));
    color: var(--all-schedule-v2-chip-color, var(--lesson-chip-text));
}

.grid-sheet td.grid-cell {
    vertical-align: top;
}

.grid-cell.has-teacher-constraint-block {
    background: var(--grid-cell-has-teacher-constraint-block-surface);
    box-shadow: var(--components-grid-cell-has-teacher-constraint-block-shadow);
}

.grid-cell.has-teacher-constraint-block.is-soft {
    background: var(--calendar-warning-surface);
    box-shadow: var(--components-grid-cell-has-teacher-constraint-block-is-soft-shadow);
}

.grid-cell.has-teacher-constraint-block .grid-empty-slot {
    color: var(--grid-cell-has-teacher-constraint-block-grid-empty-slot-text);
    opacity: 0.5;
}

.grid-cell.has-teacher-constraint-block.is-soft .grid-empty-slot {
    color: var(--grid-cell-has-teacher-constraint-block-is-soft-text);
}

.grid-empty-row .grid-time-inner {
    min-height: 18px;
}

.grid-empty-row .grid-time-stack {
    gap: 1px;
}

.grid-empty-row .grid-time-separator {
    height: 2px;
}

.grid-empty-row .grid-cell {
    height: 18px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.grid-empty-slot {
    width: 100%;
    height: 100%;
    min-height: 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--grid-empty-slot-text);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    opacity: 0.34;
    outline: 1px dashed transparent;
    outline-offset: -1px;
    transition: opacity 0.12s ease, outline-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.grid-sheet-table tbody tr:hover .grid-empty-slot,
.grid-cell.is-col-hover .grid-empty-slot {
    opacity: 0.55;
}

.grid-empty-slot:hover,
.grid-empty-slot:focus,
.grid-empty-slot.is-active-slot {
    outline-color: var(--grid-empty-slot-hover-border);
    background: var(--grid-active-slot-surface);
    color: var(--grid-empty-slot-hover-text);
    opacity: 1;
}

.grid-empty-slot:has(> .grid-help-empty-cell-target) {
    position: relative;
}

.grid-help-empty-cell-target {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: var(--grid-help-empty-cell-target-border);
    background: var(--grid-active-slot-surface);
    color: var(--grid-help-empty-cell-target-text);
    font-size: 20px;
    font-weight: 600;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.grid-help-move-target-marker {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 7;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border: var(--grid-help-move-target-marker-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--lesson-card-meta-text);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    pointer-events: none;
}

.grid-help-move-target-marker.is-target {
    border-color: var(--grid-help-move-target-marker-is-target-border);
    background: var(--color-success-surface);
    color: var(--grid-help-move-target-marker-is-target-text);
}

.grid-help-move-target-marker.is-source {
    border-color: var(--grid-help-move-target-marker-is-source-border);
    background: var(--color-surface-hover);
    color: var(--color-tab-text);
}

.grid-help-move-map-focus,
.grid-help-move-pair-focus {
    position: fixed;
    pointer-events: none;
}

.grid-help-demo-moving-card {
    z-index: 8;
    pointer-events: none;
    animation: gridHelpCardMove 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes gridHelpCardMove {
    from {
        opacity: 0.7;
        transform: translate(var(--grid-help-move-x), var(--grid-help-move-y));
        box-shadow: var(--components-from-shadow);
    }
    to {
        opacity: 1;
        transform: translate(0, 0);
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .grid-help-demo-moving-card {
        animation: none;
    }
}

.grid-outside-template-slot {
    width: 100%;
    min-height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: var(--grid-outside-template-slot-border);
    border-radius: 6px;
    color: var(--grid-outside-template-slot-text);
    font-size: 9px;
    line-height: 1;
    opacity: 0.82;
}

.grid-cell.is-active-slot {
    background: var(--grid-active-slot-surface);
    box-shadow: inset 0 0 0 1px var(--grid-active-slot-ring);
}

.grid-cell.is-locked-by-other {
    --grid-lock-color: var(--components-grid-cell-is-locked-by-other-grid-lock-color);
}

.grid-cell.is-locked-by-other::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 6;
    border: 2px solid var(--grid-lock-color);
    border-radius: 8px;
    pointer-events: none;
}

.grid-lock-marker {
    position: absolute;
    top: -8px;
    left: 8px;
    z-index: 7;
    display: block;
    box-sizing: border-box;
    width: min(100%, max-content);
    max-width: calc(100% - 16px);
    min-width: 0;
    height: 18px;
    padding: 2px 7px;
    border: 0;
    border-radius: 5px;
    background: var(--grid-lock-marker-surface);
    color: var(--progress-fill-on-accent);
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.grid-sheet.is-plan-dragging .grid-cell,
.grid-sheet.is-plan-dragging .grid-group-head,
.grid-sheet.is-entry-dragging .grid-cell {
    transition: background 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.grid-sheet.is-plan-dragging .is-plan-drop-blocked {
    opacity: 0.34;
    background: var(--grid-plan-drop-blocked-state-surface);
}

.grid-sheet.is-plan-dragging .is-plan-drop-allowed {
    background: var(--grid-plan-drop-allowed-state-surface);
    box-shadow: var(--components-grid-sheet-is-plan-dragging-is-plan-drop-allowed-shadow);
}

.grid-sheet.is-plan-dragging .grid-group-head.is-plan-drop-allowed {
    color: var(--grid-sheet-is-plan-dragging-grid-group-head-text);
}

.grid-sheet.is-plan-dragging .grid-cell.is-plan-drop-hover {
    background: var(--grid-plan-drop-hover-state-surface);
    box-shadow: var(--components-grid-sheet-is-plan-dragging-grid-cell-is-plan-drop-hover-shadow);
}

.grid-sheet.is-entry-dragging .grid-cell {
    background: var(--grid-entry-drag-state-surface);
}

.grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-safe {
    background: var(--grid-entry-drop-safe-state-surface);
    box-shadow: var(--components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-safe-shadow);
}

.grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-risk {
    background: var(--grid-entry-drop-risk-state-surface);
    box-shadow: var(--components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-risk-shadow);
}

.grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-warning {
    background: var(--grid-entry-drop-warning-state-surface);
    box-shadow: var(--components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-warning-shadow);
}

.grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-current {
    background: var(--grid-entry-drop-current-state-surface);
    box-shadow: var(--components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-current-shadow);
}

.grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-hover.is-entry-drop-safe {
    background: var(--grid-entry-drop-safe-hover-surface);
    box-shadow: var(--components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-hover-is-entry-drop-safe-shadow);
}

.grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-hover.is-entry-drop-risk {
    background: var(--grid-entry-drop-risk-hover-surface);
    box-shadow: var(--components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-hover-is-entry-drop-risk-shadow);
}

.grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-hover.is-entry-drop-warning {
    background: var(--grid-entry-drop-warning-hover-surface);
    box-shadow: var(--components-grid-sheet-is-entry-dragging-grid-cell-is-entry-drop-hover-is-entry-drop-warning-shadow);
}

.lesson-card {
    --lesson-accent: var(--lesson-neutral-accent);
    --lesson-accent-ring: var(--color-control-focus-ring);
    --lesson-current-surface: var(--lesson-card-surface);
    --lesson-current-border: var(--lesson-card-border);
    --lesson-current-title-text: var(--lesson-card-title-text);
    --lesson-current-profile-text: var(--lesson-card-profile-text);
    --lesson-current-meta-text: var(--lesson-card-meta-text);
    --lesson-current-room-text: var(--lesson-card-room-text);
    --lesson-current-chip-surface: var(--lesson-chip-surface);
    --lesson-current-chip-border: var(--lesson-chip-border);
    --lesson-current-chip-text: var(--lesson-chip-text);
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--lesson-current-border);
    border-left-width: 3px;
    border-radius: 5px;
    padding: 4px 6px 4px 7px;
    background: var(--lesson-current-surface);
    color: var(--lesson-card-text);
    cursor: pointer;
    text-align: left;
    box-shadow: none;
    display: block;
    position: relative;
    padding-right: 31px;
    overflow: hidden;
    outline: none;
    transition: border-color 0.12s ease, background 0.12s ease, outline-color 0.12s ease, box-shadow 0.12s ease;
}

.lesson-card[draggable="true"] {
    cursor: grab;
}

.lesson-card.is-entry-drag-source {
    opacity: 0.58;
    cursor: grabbing;
}

.grid-sheet.has-plan-coverage-highlight .lesson-card {
    transition:
        opacity 0.12s ease,
        filter 0.12s ease,
        border-color 0.12s ease,
        background 0.12s ease,
        outline-color 0.12s ease,
        box-shadow 0.12s ease;
}

.lesson-card.is-plan-coverage-dimmed {
    opacity: 0.2;
    filter: saturate(0.45);
}

.lesson-card.is-outside-publication,
.lesson-card.is-outside-publication:hover,
.lesson-card.is-outside-publication:focus-visible {
    opacity: 0.34;
    filter: saturate(0.35);
}

.lesson-card.is-plan-coverage-highlight,
.lesson-card.is-plan-coverage-highlight:hover,
.lesson-card.is-plan-coverage-highlight:focus-visible {
    opacity: 1;
    filter: none;
    border-color: var(--lesson-card-is-plan-coverage-highlight-border);
    outline: var(--lesson-card-is-plan-coverage-highlight-outline);
    outline-offset: 1px;
    box-shadow: var(--components-lesson-card-is-plan-coverage-highlight-lesson-card-is-plan-coverage-highlight-hover-less-shadow);
    z-index: 6;
}

.lesson-card.is-plan-coverage-highlight.is-outside-publication,
.lesson-card.is-plan-coverage-highlight.is-outside-publication:hover,
.lesson-card.is-plan-coverage-highlight.is-outside-publication:focus-visible {
    opacity: 0.34;
    filter: saturate(0.35);
}

.grid-sheet tbody tr.is-plan-coverage-day-hidden {
    display: none;
}

.lesson-card.has-profile-targets {
    min-height: 54px;
}

.lesson-card.is-joint-entry {
    padding-right: 52px;
}

.lesson-card.has-room {
    min-height: 48px;
    padding-bottom: 16px;
}

.lesson-card.has-teacher-constraint-conflict {
    border-color: var(--lesson-card-has-teacher-constraint-conflict-border);
    background: var(--calendar-warning-surface);
}

.lesson-card.has-entry-parts {
    height: auto;
    min-height: max-content;
    padding-right: 6px;
    overflow: visible;
}

.lesson-card.has-entry-parts.has-room {
    padding-bottom: 4px;
}

.lesson-card:hover,
.lesson-card:focus-visible,
.lesson-card.is-linked-hover,
.lesson-card.is-active-slot {
    border-top-color: var(--lesson-accent);
    border-right-color: var(--lesson-accent);
    border-bottom-color: var(--lesson-accent);
    outline: 2px solid var(--lesson-accent);
    outline-offset: 1px;
    box-shadow: 0 0 0 2px var(--lesson-accent-ring);
    z-index: 5;
}

.lesson-card.is-just-merged,
.lesson-card.is-just-merged:hover,
.lesson-card.is-just-merged.is-linked-hover,
.lesson-card.is-just-merged.is-active-slot {
    outline: var(--components-lesson-card-is-just-merged-lesson-card-is-just-merged-hover-lesson-card-is-just-merged-i-outline);
    outline-offset: 2px;
    background: var(--lesson-card-is-just-merged-surface);
}

.grid-focus-backdrop,
.grid-focus-clone-layer {
    position: fixed;
    pointer-events: none;
}

.grid-focus-backdrop {
    z-index: 67;
    background: var(--color-overlay);
}

.grid-focus-clone-layer {
    inset: 0;
    z-index: 68;
}

.grid-focus-backdrop.is-hidden,
.grid-focus-clone-layer.is-hidden {
    display: none;
}

.grid-focus-clone {
    position: fixed !important;
    width: auto;
    margin: 0 !important;
    outline: var(--components-grid-focus-clone-outline);
    outline-offset: 2px;
    background: var(--color-surface);
    box-shadow: var(--components-grid-focus-clone-shadow);
    opacity: 1;
    filter: none;
    transform: none !important;
}

.grid-sheet.is-focus-preview .lesson-card.is-focus-target {
    outline: var(--components-grid-sheet-is-focus-preview-lesson-card-is-focus-target-outline);
    outline-offset: 2px;
}

.lesson-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--lesson-current-title-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
}

.lesson-card-profile {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
    color: var(--lesson-current-profile-text);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.1;
}

.lesson-card-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
    color: var(--lesson-current-meta-text);
    font-size: 10px;
    line-height: 1.15;
}

.lesson-card-room {
    position: absolute;
    right: 31px;
    bottom: 3px;
    left: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0;
    color: var(--lesson-current-room-text);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.05;
}

.lesson-card.is-joint-entry .lesson-card-room {
    right: 52px;
}

.lesson-card.has-entry-parts .lesson-card-room {
    position: static;
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.15;
}

.lesson-card.has-entry-parts .lesson-card-meta {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.lesson-card-parts {
    display: grid;
    gap: 1px;
    margin-top: 3px;
    padding-right: 2px;
}

.lesson-card-part {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    color: var(--lesson-current-meta-text);
    font-size: 9px;
    line-height: 1.15;
}

.lesson-card.has-entry-parts .lesson-card-parts {
    gap: 2px;
    padding-right: 0;
}

.lesson-card.has-entry-parts .lesson-card-part {
    align-items: flex-start;
    flex-wrap: wrap;
}

.lesson-card-part-label {
    overflow: hidden;
    min-width: 0;
    max-width: 42%;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--lesson-current-room-text);
    font-weight: 600;
}

.lesson-card.has-entry-parts .lesson-card-part-label {
    overflow: visible;
    max-width: none;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.lesson-card-part-meta {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-card.has-entry-parts .lesson-card-part-meta {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.lesson-card-indicators {
    position: absolute;
    right: 4px;
    bottom: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 0;
    min-height: 0;
    max-width: 48px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.lesson-card-indicators:empty {
    display: none;
}

.grid-help-demo-result-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
        "title title"
        "meta meta"
        "room indicators";
    align-items: center;
    gap: 2px 6px;
    box-sizing: border-box;
    height: auto;
    min-height: 52px;
    padding: 5px 6px 5px 7px;
    overflow: hidden;
}

.grid-help-demo-result-stack {
    display: grid;
    width: 100%;
    gap: 2px;
}

.grid-help-linked-result-target {
    position: fixed;
    pointer-events: none;
}

.grid-help-demo-result-card .lesson-card-title {
    grid-area: title;
    min-width: 0;
}

.grid-help-demo-result-card .lesson-card-meta {
    grid-area: meta;
    min-width: 0;
    margin-top: 0;
}

.grid-help-demo-result-card .lesson-card-room {
    position: static;
    grid-area: room;
    min-width: 0;
    margin-top: 0;
}

.grid-help-demo-result-card .lesson-card-indicators {
    position: static;
    grid-area: indicators;
    max-width: 58px;
    margin-top: 0;
    flex-wrap: nowrap;
}

.lesson-card.has-entry-parts .lesson-card-indicators {
    position: static;
    max-width: none;
    justify-content: flex-start;
    margin-top: 4px;
}

.lesson-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 13px;
    min-width: 13px;
    padding: 0 3px;
    border-radius: 4px;
    background: var(--lesson-current-chip-surface);
    border: 1px solid var(--lesson-current-chip-border);
    color: var(--lesson-current-chip-text);
    font-size: 8px;
    line-height: 1;
}

.lesson-chip.conflict {
    width: 13px;
    min-width: 13px;
    padding: 0;
    border-color: var(--conflict-color);
    background: var(--problem-color);
    color: var(--progress-fill-on-accent);
    font-weight: 600;
}

.lesson-card-constraint-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border: 1px solid var(--conflict-border);
    border-radius: 999px;
    background: var(--conflict-surface);
    color: var(--conflict-color);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.lesson-chip.joint {
    border-color: var(--lesson-chip-joint-border);
    background: var(--lesson-chip-joint-surface);
    color: var(--lesson-chip-joint-text);
    font-weight: 600;
}

.lesson-chip.comment {
    width: 13px;
    min-width: 13px;
    padding: 0;
}

.lesson-chip.comment .comment-icon {
    width: 9px;
    height: 9px;
}

.lesson-card.lesson-lecture {
    --lesson-accent: var(--lesson-lecture-accent);
    --lesson-accent-ring: var(--lesson-lecture-ring);
    --lesson-current-surface: var(--lesson-lecture-surface);
    --lesson-current-border: var(--lesson-lecture-border);
    --lesson-current-title-text: var(--lesson-lecture-title-text);
    --lesson-current-profile-text: var(--lesson-lecture-profile-text);
    --lesson-current-meta-text: var(--lesson-lecture-meta-text);
    --lesson-current-room-text: var(--lesson-lecture-room-text);
    --lesson-current-chip-surface: var(--lesson-lecture-chip-surface);
    --lesson-current-chip-border: var(--lesson-lecture-chip-border);
    --lesson-current-chip-text: var(--lesson-lecture-chip-text);
    border-left-color: var(--lesson-lecture-accent);
}

.lesson-card.lesson-practice {
    --lesson-accent: var(--lesson-practice-accent);
    --lesson-accent-ring: var(--lesson-practice-ring);
    --lesson-current-surface: var(--lesson-practice-surface);
    --lesson-current-border: var(--lesson-practice-border);
    --lesson-current-title-text: var(--lesson-practice-title-text);
    --lesson-current-profile-text: var(--lesson-practice-profile-text);
    --lesson-current-meta-text: var(--lesson-practice-meta-text);
    --lesson-current-room-text: var(--lesson-practice-room-text);
    --lesson-current-chip-surface: var(--lesson-practice-chip-surface);
    --lesson-current-chip-border: var(--lesson-practice-chip-border);
    --lesson-current-chip-text: var(--lesson-practice-chip-text);
    border-left-color: var(--lesson-practice-accent);
}

.lesson-card.lesson-lab,
.lesson-card.lesson-credit {
    --lesson-accent: var(--lesson-lab-accent);
    --lesson-accent-ring: var(--lesson-lab-ring);
    --lesson-current-surface: var(--lesson-lab-surface);
    --lesson-current-border: var(--lesson-lab-border);
    --lesson-current-title-text: var(--lesson-lab-title-text);
    --lesson-current-profile-text: var(--lesson-lab-profile-text);
    --lesson-current-meta-text: var(--lesson-lab-meta-text);
    --lesson-current-room-text: var(--lesson-lab-room-text);
    --lesson-current-chip-surface: var(--lesson-lab-chip-surface);
    --lesson-current-chip-border: var(--lesson-lab-chip-border);
    --lesson-current-chip-text: var(--lesson-lab-chip-text);
    border-left-color: var(--lesson-lab-accent);
}

.lesson-card.lesson-exam {
    --lesson-accent: var(--lesson-exam-accent);
    --lesson-accent-ring: var(--lesson-exam-ring);
    --lesson-current-surface: var(--lesson-exam-surface);
    --lesson-current-border: var(--lesson-exam-border);
    --lesson-current-title-text: var(--lesson-exam-title-text);
    --lesson-current-profile-text: var(--lesson-exam-profile-text);
    --lesson-current-meta-text: var(--lesson-exam-meta-text);
    --lesson-current-room-text: var(--lesson-exam-room-text);
    --lesson-current-chip-surface: var(--lesson-exam-chip-surface);
    --lesson-current-chip-border: var(--lesson-exam-chip-border);
    --lesson-current-chip-text: var(--lesson-exam-chip-text);
    border-left-color: var(--lesson-exam-accent);
}

.lesson-card.lesson-consultation {
    --lesson-accent: var(--lesson-consultation-accent);
    --lesson-accent-ring: var(--lesson-consultation-ring);
    --lesson-current-surface: var(--lesson-consultation-surface);
    --lesson-current-border: var(--lesson-consultation-border);
    --lesson-current-title-text: var(--lesson-consultation-title-text);
    --lesson-current-profile-text: var(--lesson-consultation-profile-text);
    --lesson-current-meta-text: var(--lesson-consultation-meta-text);
    --lesson-current-room-text: var(--lesson-consultation-room-text);
    --lesson-current-chip-surface: var(--lesson-consultation-chip-surface);
    --lesson-current-chip-border: var(--lesson-consultation-chip-border);
    --lesson-current-chip-text: var(--lesson-consultation-chip-text);
    border-left-color: var(--lesson-consultation-accent);
}

.lesson-card.lesson-other {
    --lesson-accent: var(--lesson-other-accent);
    --lesson-accent-ring: var(--lesson-other-ring);
    --lesson-current-surface: var(--lesson-other-surface);
    --lesson-current-border: var(--lesson-other-border);
    --lesson-current-title-text: var(--lesson-other-title-text);
    --lesson-current-profile-text: var(--lesson-other-profile-text);
    --lesson-current-meta-text: var(--lesson-other-meta-text);
    --lesson-current-room-text: var(--lesson-other-room-text);
    --lesson-current-chip-surface: var(--lesson-other-chip-surface);
    --lesson-current-chip-border: var(--lesson-other-chip-border);
    --lesson-current-chip-text: var(--lesson-other-chip-text);
    border-left-color: var(--lesson-other-accent);
}

.lesson-card.has-conflict {
    border-right: 3px solid var(--conflict-color-strong);
}

.lesson-card.xlsx-grid-draft-card {
    height: auto;
    min-height: 64px;
    overflow: visible;
    opacity: 1;
    transition: border-color 0.12s ease, background 0.12s ease, outline-color 0.12s ease, box-shadow 0.12s ease;
}

.lesson-card.xlsx-grid-draft-card:hover,
.lesson-card.xlsx-grid-draft-card:focus-visible {
    opacity: 1;
}

.lesson-card.xlsx-grid-draft-card .lesson-card-title {
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.lesson-card.xlsx-grid-draft-card .lesson-card-profile,
.lesson-card.xlsx-grid-draft-card .lesson-card-meta {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.xlsx-draft-chip {
    color: var(--xlsx-draft-chip-text);
    font-weight: 700;
}

.xlsx-draft-dates {
    color: var(--xlsx-draft-dates-text);
    font-weight: 600;
}

.lesson-dot {
    --lesson-dot-color: var(--lesson-neutral-accent);
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 3px;
    background: var(--lesson-dot-color);
}

.lesson-dot.lesson-lecture { --lesson-dot-color: var(--lesson-lecture-accent); }
.lesson-dot.lesson-practice { --lesson-dot-color: var(--lesson-practice-accent); }
.lesson-dot.lesson-lab,
.lesson-dot.lesson-credit { --lesson-dot-color: var(--lesson-lab-accent); }
.lesson-dot.lesson-exam { --lesson-dot-color: var(--lesson-exam-accent); }
.lesson-dot.lesson-consultation { --lesson-dot-color: var(--lesson-consultation-accent); }
.lesson-dot.lesson-other { --lesson-dot-color: var(--lesson-other-accent); }

.grid-sheet[data-scale="90"] {
    --grid-group-base-width: 162px;
    --grid-group-width: var(--grid-group-base-width);
    font-size: 0.94em;
}

.grid-sheet[data-scale="110"] {
    --grid-group-base-width: 196px;
    --grid-group-width: var(--grid-group-base-width);
    font-size: 1.04em;
}

.grid-slot-editor-panel {
    --drawer-width: 720px;
    width: min(980px, calc(100vw - 132px));
    --slot-blue: var(--components-grid-slot-editor-panel-slot-blue);
    --slot-blue-soft: var(--components-grid-slot-editor-panel-slot-blue-soft);
    --slot-border: var(--components-grid-slot-editor-panel-slot-border);
    --slot-muted: var(--components-grid-slot-editor-panel-slot-muted);
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.grid-slot-editor-panel::-webkit-scrollbar {
    width: 8px;
}

.grid-slot-editor-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
}

.grid-editor-problems {
    border: 1px solid var(--grid-editor-problem-border);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--grid-editor-problems-surface);
    max-height: none;
    overflow: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--grid-editor-problems-scrollbar);
}

.grid-editor-problems.is-scrollable {
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 22px;
}

.grid-editor-problems.is-scrollable::-webkit-scrollbar {
    width: 10px;
}

.grid-editor-problems.is-scrollable::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--grid-editor-problems-surface);
}

.grid-editor-problems.is-scrollable::-webkit-scrollbar-thumb {
    border: var(--grid-editor-problems-is-scrollable-border);
    border-radius: 999px;
    background: var(--grid-editor-problems-is-scrollable-surface);
}

.grid-editor-problems.is-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--grid-editor-problems-is-scrollable-hover-surface);
}

.grid-editor-problems h3 {
    margin: 0 0 5px;
    color: var(--grid-editor-problems-text);
    font-size: 12px;
}

.grid-group-targets {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 160px;
    overflow: auto;
    border: var(--grid-group-targets-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.grid-group-targets label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-bottom: var(--grid-group-targets-border-variant-2);
    border-radius: 0;
    background: transparent;
    color: var(--grid-group-targets-text);
    font-size: 13px;
}

.grid-group-targets label:last-child {
    border-bottom: 0;
}

.grid-group-target-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-bottom: var(--grid-group-target-item-border);
    border-radius: 0;
    background: transparent;
    color: var(--grid-group-target-item-text);
    font-size: 13px;
}

.grid-group-target-item:last-child {
    border-bottom: 0;
}

.grid-group-target-main {
    flex: 1 1 auto;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.grid-group-target-main span,
.grid-group-target-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-group-target-main small {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.grid-group-target-section {
    padding: 7px 10px 5px;
    border-top: var(--grid-group-target-section-border);
    border-bottom: var(--grid-group-target-section-border);
    background: var(--color-data-table-tree-surface);
    color: var(--color-tab-text);
    font-size: 11px;
    font-weight: 600;
}

.presence-bar {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    margin: 0;
}

.grid-presence-inline {
    min-width: 0;
}

.presence-inline-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 20px;
    max-width: 170px;
    padding: 0 8px;
    border: var(--presence-inline-count-border);
    border-radius: 4px;
    background: var(--presence-inline-count-surface);
    color: var(--presence-inline-count-text);
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.presence-inline-count.grid-toolbar-button {
    box-sizing: border-box;
    height: 20px;
    min-height: 20px;
    padding: 2px 6px;
    background: var(--color-surface-soft);
    color: var(--presence-inline-count-text);
    font-size: 11px;
    font-weight: 500;
}

.presence-inline-count.grid-toolbar-button.is-empty {
    border-color: var(--presence-empty-border);
    background: var(--presence-empty-surface);
    color: var(--presence-empty-text);
}

.presence-popover {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 65;
    width: max-content;
    min-width: 220px;
    max-width: 320px;
    padding: 8px;
    border: 1px solid var(--color-control-border-compact);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--components-presence-popover-shadow);
    color: var(--presence-popover-text);
}

.presence-bar:hover .presence-popover,
.presence-bar:focus-within .presence-popover,
.presence-bar.is-grid-help-open .presence-popover {
    display: block;
}

.presence-user-group + .presence-user-group {
    margin-top: 7px;
    padding-top: 7px;
    border-top: var(--presence-user-group-border);
}

.presence-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    font-size: 12px;
}

.presence-user-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.presence-session-count {
    flex: 0 0 auto;
    color: var(--color-tab-text);
    font-size: 11px;
    font-weight: 600;
}

.presence-session-line,
.presence-empty {
    margin-top: 3px;
    color: var(--presence-session-line-text);
    font-size: 11px;
    line-height: 1.25;
}

/* Shared table viewport. Feature modules own table columns and row semantics. */
.schedules-table-wrap {
    max-height: none;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: var(--color-surface);
}

/* Shared drawer/dialog shell. Feature modules own only their inner content. */
.slot-editor.is-hidden,
.modal.is-hidden {
    display: none;
}

.slot-editor,
.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
}

.slot-editor-backdrop,
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--color-overlay);
}

.slot-editor-panel,
.modal-panel {
    position: absolute;
    background: var(--color-surface-elevated);
    box-shadow: var(--components-slot-editor-panel-modal-panel-shadow);
}

.slot-editor-panel {
    --drawer-width: 650px;
    --drawer-screen-gap: 112px;
    --drawer-padding-top: 16px;
    --drawer-padding-right: 0;
    --drawer-padding-left: 18px;
    --drawer-gap: 0;
    --drawer-scrollbar-gutter: 16px;
    --drawer-scroll-content-gap: 16px;
    top: 0;
    right: 0;
    width: min(var(--drawer-width), calc(100vw - var(--drawer-screen-gap)));
    height: 100%;
    border-radius: 12px 0 0 12px;
    padding: var(--drawer-padding-top) var(--drawer-padding-right) 0 var(--drawer-padding-left);
    display: flex;
    flex-direction: column;
    gap: var(--drawer-gap);
    border-left: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    background: var(--color-drawer-surface);
}

.modal-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 96vw);
    padding: 16px;
    border-radius: 10px;
    background: var(--color-dialog-surface);
    border-color: var(--color-dialog-border);
}

.slot-editor-panel > .slot-editor-head {
    flex: 0 0 auto;
    box-sizing: border-box;
    margin-left: calc(-1 * var(--drawer-padding-left));
    padding-left: var(--drawer-padding-left);
    padding-right: var(--drawer-scrollbar-gutter);
    padding-bottom: 10px;
}

.slot-editor-panel > .slot-editor-scroll-area {
    min-height: 0;
    flex: 1 1 auto;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: var(--drawer-scroll-content-gap);
    padding-right: var(--drawer-scrollbar-gutter);
    padding-bottom: var(--drawer-scroll-content-gap);
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.slot-editor-panel > .schedules-drawer-summary,
.slot-editor-panel > .study-plan-drawer-tabs {
    margin-right: var(--drawer-scrollbar-gutter);
}

.slot-editor-panel > .slot-editor-head:has(+ .slot-editor-scroll-area),
.slot-editor-panel > .slot-editor-head:has(+ #slot-editor-alerts),
.slot-editor-panel > .slot-editor-head:has(+ #slot-editor-alerts + .slot-editor-scroll-area),
.slot-editor-panel > .schedules-drawer-summary:has(+ .slot-editor-scroll-area),
.slot-editor-panel > .study-plan-drawer-tabs:has(+ .slot-editor-scroll-area) {
    box-sizing: border-box;
    margin-left: calc(-1 * var(--drawer-padding-left));
    padding-left: var(--drawer-padding-left);
    padding-right: var(--drawer-scrollbar-gutter);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--drawer-divider-color);
}

.slot-editor-panel > .slot-editor-actions {
    position: relative;
    bottom: auto;
    z-index: 1;
    flex: 0 0 auto;
    box-sizing: border-box;
    margin: 0 0 0 calc(-1 * var(--drawer-padding-left));
    padding: 8px var(--drawer-padding-left) 10px var(--drawer-padding-left);
    border-top: 1px solid var(--drawer-divider-color);
}

.slot-editor:not(.is-hidden) .slot-editor-backdrop {
    animation: drawerBackdropIn 150ms ease-out both;
}

.slot-editor:not(.is-hidden) .slot-editor-panel {
    animation: drawerPanelIn 190ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes drawerPanelIn {
    from {
        opacity: 0.98;
        transform: translateX(26px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes drawerBackdropIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slot-editor:not(.is-hidden) .slot-editor-backdrop,
    .slot-editor:not(.is-hidden) .slot-editor-panel {
        animation: none;
    }
}

.modal-panel-compact {
    width: min(460px, 96vw);
}

.slot-editor-head,
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-editor-head {
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 8px;
}

.slot-editor-title-block {
    min-width: 0;
}

.slot-editor-head h2 {
    margin: 0;
    color: var(--color-text-emphasis);
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 0;
}

.form-grid {
    display: grid;
    gap: 18px 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
}

.form-grid.one-col {
    grid-template-columns: 1fr;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--color-text-meta);
    font-size: 13px;
    font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    height: 46px;
    padding: 10px 14px;
    border-color: var(--color-control-border);
    border-radius: 12px;
    color: var(--color-text);
    font-size: 15px;
    background-color: var(--color-control-bg);
}

.slot-editor-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.slot-editor-context-chip,
.slot-editor-lock-state {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.1;
}

.slot-editor-context-chip {
    background: var(--calendar-day-state-surface, var(--status-info-surface));
    color: var(--calendar-day-state-text, var(--slot-editor-context-chip-text));
    font-weight: 600;
}

.slot-editor-lock-state {
    padding-right: 0;
    padding-left: 0;
    background: transparent;
    color: var(--slot-editor-lock-state-text);
}

.slot-editor-lock-state.is-warning {
    background: var(--slot-editor-lock-state-is-warning-surface);
    color: var(--slot-editor-lock-state-is-warning-text);
}

/* ===== CSS owner: features.css ===== */

/* Page- and workflow-specific surfaces. */
/* Aggregate schedule grid composition. */
body.has-grid-workspace .grid-workspace {
    --grid-main-safe-overhang: 22px;
}

body.has-grid-workspace .grid-main-column {
    --grid-left-rail-offset: 23px;
    margin-left: calc(-1 * min(var(--grid-left-rail-offset), var(--grid-main-safe-overhang)));
    width: calc(100% + min(var(--grid-left-rail-offset), var(--grid-main-safe-overhang)));
}

.grid-sheet-tabs-bar.is-workspace-edge {
    margin-left: calc(-1 * var(--grid-main-safe-overhang));
    width: calc(100% + var(--grid-main-safe-overhang));
}

.schedules-toolbar-panel.aggregate-grid-filter-panel {
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 0;
    margin: 0 8px 0 min(var(--grid-left-rail-offset), var(--grid-main-safe-overhang));
    margin-bottom: 8px;
    width: calc(100% - min(var(--grid-left-rail-offset), var(--grid-main-safe-overhang)) - 8px);
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.aggregate-grid-filters {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    width: 100%;
    min-width: max-content;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--aggregate-grid-filters-text);
    font-size: 12px;
    flex-wrap: nowrap;
}

.aggregate-grid-filter-group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    min-width: 0;
}

.aggregate-grid-filter-group-resource {
    flex: 0 1 auto;
}

.aggregate-grid-filter-group-context {
    margin-left: auto;
}

.aggregate-grid-filter-field {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}

.aggregate-grid-filter-field > span:not(.directory-combobox) {
    flex: 0 0 auto;
    color: var(--aggregate-grid-filter-field-directory-combobox-text);
    font-weight: 600;
}

.aggregate-grid-filter-field input {
    box-sizing: border-box;
    height: 34px;
    min-height: 34px;
    border: 1px solid var(--color-control-border-compact);
    border-radius: 9px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    padding: 0 10px;
}

.aggregate-grid-filter-field .custom-select-control {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    gap: 8px;
    border-radius: 9px;
    font-size: 13px;
    box-shadow: none;
}

.aggregate-grid-filter-field .custom-select-control:focus,
.aggregate-grid-filter-field .custom-select.is-open .custom-select-control {
    border-color: var(--color-control-focus-border-compact);
    box-shadow: 0 0 0 2px var(--color-control-focus-ring);
}

.aggregate-grid-filter-field .custom-select-control svg {
    width: 14px;
    height: 14px;
}

.aggregate-grid-filter-source .custom-select {
    width: 180px;
}

.aggregate-grid-filter-department {
    flex: 1 1 360px;
    width: min(520px, 36vw);
    min-width: 300px;
}

.aggregate-grid-filter-department > .directory-combobox,
.aggregate-grid-filter-building > .directory-combobox,
.aggregate-grid-filter-floor > .directory-combobox,
.aggregate-grid-filter-type > .directory-combobox {
    flex: 1 1 auto;
    min-width: 0;
    height: 34px;
    color: inherit;
    font-weight: 400;
}

.aggregate-grid-filter-department.schedules-filter-combobox-field .directory-combobox-search,
.aggregate-grid-filter-building.schedules-filter-combobox-field .directory-combobox-search,
.aggregate-grid-filter-floor.schedules-filter-combobox-field .directory-combobox-search,
.aggregate-grid-filter-type.schedules-filter-combobox-field .directory-combobox-search {
    box-sizing: border-box;
    height: 34px;
    min-height: 34px;
    padding: 0 34px 0 10px;
    border-color: var(--color-control-border-compact);
    border-radius: 9px;
    background-position: right 10px center;
    background-size: 16px 16px;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1;
}

.aggregate-grid-filter-department.schedules-filter-combobox-field .directory-combobox-search:focus,
.aggregate-grid-filter-building.schedules-filter-combobox-field .directory-combobox-search:focus,
.aggregate-grid-filter-floor.schedules-filter-combobox-field .directory-combobox-search:focus,
.aggregate-grid-filter-type.schedules-filter-combobox-field .directory-combobox-search:focus {
    border-color: var(--color-control-focus-border-compact);
    box-shadow: 0 0 0 2px var(--color-control-focus-ring);
}

.aggregate-grid-filter-building {
    width: 220px;
    min-width: 180px;
}

.aggregate-grid-filter-floor {
    width: 130px;
    min-width: 110px;
}

.aggregate-grid-filter-type {
    width: 200px;
    min-width: 170px;
}

#group-grid.is-aggregate-timeline {
    --aggregate-timeline-guide-size: 20px;
    background: var(--color-surface);
}

.aggregate-timeline-table {
    width: max-content;
    min-width: 0;
    background: var(--color-surface);
}

.aggregate-timeline-head {
    background: var(--color-surface-tinted);
}

.aggregate-timeline-corner {
    vertical-align: middle;
}

.aggregate-timeline-resource-head {
    overflow: hidden;
}

.aggregate-timeline-resource-head .grid-group-name > span,
.aggregate-timeline-resource-head .grid-group-profiles {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.aggregate-timeline-resource-head .grid-group-profiles {
    margin-top: 2px;
    color: var(--aggregate-timeline-resource-head-grid-group-profiles-text);
    font-size: 11px;
    font-weight: 400;
}

#group-grid .aggregate-timeline-horizontal-spacer {
    background-color: var(--color-surface-tinted);
    background-image: var(--aggregate-timeline-column-guides);
}

#group-grid .aggregate-timeline-head .aggregate-timeline-horizontal-spacer {
    box-shadow: var(--grid-sheet-head-divider-shadow);
}

.aggregate-timeline-day {
    background: var(--color-surface);
}

#group-grid .aggregate-timeline-day > .aggregate-timeline-horizontal-spacer {
    height: 100%;
    background-color: var(--color-surface);
    background-image:
        var(--aggregate-timeline-grid-guides);
    box-shadow: var(--aggregate-timeline-row-divider-shadow);
}

#group-grid .aggregate-timeline-rail {
    height: 100%;
    padding: 0;
    vertical-align: top;
    background: var(--aggregate-timeline-rail-background);
}

.aggregate-timeline-time-marker {
    position: absolute;
    z-index: 2;
    left: 0;
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    transform: translateY(4px);
}

#group-grid .aggregate-timeline-lane {
    position: relative;
    min-width: 0;
    padding: 0;
    background:
        var(--aggregate-timeline-lane-surface);
    box-shadow: var(--aggregate-timeline-row-divider-shadow);
    cursor: default;
}

#group-grid .aggregate-timeline-day:first-child > .aggregate-timeline-lane {
    box-shadow: none;
}

#group-grid .aggregate-timeline-day:first-child > .aggregate-timeline-horizontal-spacer {
    box-shadow: none;
}

#group-grid .aggregate-timeline-lane:hover,
#group-grid .aggregate-timeline-lane.is-col-hover {
    background-color: var(--grid-row-hover-surface);
}

.aggregate-timeline-day.is-time-row-hover > .aggregate-timeline-lane::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: var(--aggregate-timeline-hover-top, 0);
    right: 1px;
    left: 1px;
    height: calc(var(--aggregate-timeline-guide-size) - 1px);
    background: var(--grid-row-hover-surface);
    pointer-events: none;
}

.aggregate-timeline-row-hover-rail {
    position: absolute;
    z-index: 1;
    top: var(--aggregate-timeline-hover-top, 0);
    right: 1px;
    left: 1px;
    display: none;
    height: calc(var(--aggregate-timeline-guide-size) - 1px);
    background: var(--color-filter-hover-surface);
    pointer-events: none;
}

.aggregate-timeline-day.is-time-row-hover .aggregate-timeline-row-hover-rail {
    display: block;
}

#group-grid .aggregate-timeline-empty-slot {
    position: absolute;
    z-index: 1;
    right: 4px;
    left: 4px;
    width: auto;
    height: calc(var(--aggregate-timeline-guide-size) - 6px);
    min-height: 14px;
    visibility: visible;
    opacity: 0;
    pointer-events: none;
}

#group-grid .aggregate-timeline-lane.is-empty-slot-hover .aggregate-timeline-empty-slot {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

#group-grid .aggregate-timeline-empty-slot:focus {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.aggregate-timeline-lane.is-empty-slot-hover .aggregate-timeline-empty-slot {
    outline-color: var(--grid-empty-slot-hover-border);
    background: var(--grid-active-slot-surface);
    color: var(--grid-empty-slot-hover-text);
    opacity: 1;
}

.aggregate-timeline-event-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.aggregate-timeline-event {
    position: absolute;
    z-index: 2;
    min-height: 48px;
    pointer-events: auto;
}

.aggregate-timeline-event-cards,
.aggregate-timeline-event .lesson-card {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.aggregate-timeline-event .lesson-card {
    overflow: hidden;
}

.aggregate-timeline-slot-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.aggregate-timeline-slot-choices .btn {
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
}

.aggregate-grid-filter-date input {
    width: 126px;
}

.aggregate-grid-panel {
    display: flex;
    flex-direction: column;
}

.aggregate-grid-panel #group-grid {
    flex: 1 1 auto;
    height: auto;
}

.aggregate-grid-panel #group-grid.is-awaiting-filters {
    min-height: 100%;
    background: var(--color-surface);
}

.auth-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background: var(--bg);
    overflow: hidden;
}

html.auth-document,
html.auth-document body {
    min-width: 0;
}

.auth-screen {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 32px;
}

.auth-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        var(--features-auth-screen-before-surface);
    pointer-events: none;
}

.auth-schedule-backdrop {
    position: fixed;
    inset: -12px;
    z-index: 0;
    overflow: hidden;
    opacity: 1;
    filter: blur(5px);
    pointer-events: none;
}

.auth-schedule-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-schedule-sheet.grid-sheet {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border-right: var(--auth-schedule-sheet-grid-sheet-border);
    border-bottom: var(--auth-schedule-sheet-grid-sheet-border);
    overflow: hidden;
    --grid-left-width: 78px;
    --grid-group-width: 272px;
}

.auth-schedule-sheet .grid-sheet-table {
    width: max-content;
    min-width: 100%;
}

.auth-schedule-sheet .grid-sheet-head th {
    position: static;
    height: 82px;
}

.auth-schedule-sheet .grid-corner-cell,
.auth-schedule-sheet .grid-time-cell {
    position: static;
}

.auth-schedule-sheet .grid-group-head {
    width: var(--grid-group-width);
    min-width: var(--grid-group-width);
    max-width: var(--grid-group-width);
    height: 82px;
    padding: 18px 12px 8px;
}

.auth-schedule-sheet .grid-time-cell {
    position: relative;
    width: var(--grid-left-width);
    min-width: var(--grid-left-width);
    max-width: var(--grid-left-width);
    padding: 0;
}

.auth-schedule-sheet .grid-time-cell::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-schedule-sheet-grid-time-cell-before-text);
    font-size: 10px;
    line-height: 16px;
}

.auth-schedule-sheet .grid-time-cell[data-day-label=""]::before {
    content: attr(data-pair-no);
}

.auth-schedule-sheet .grid-time-cell:not([data-day-label=""])::before {
    content: attr(data-day-label);
    background: var(--weekday-label-surface);
    color: var(--weekday-label-text);
}

.auth-schedule-sheet .grid-time-inner {
    min-height: 40px;
    padding-left: 28px;
}

.auth-schedule-sheet .grid-time-label {
    color: var(--auth-schedule-sheet-grid-time-label-text);
    font-size: 14px;
    font-weight: 600;
}

.auth-schedule-sheet .grid-cell {
    width: var(--grid-group-width);
    min-width: var(--grid-group-width);
    max-width: var(--grid-group-width);
    height: 40px;
    padding: 5px 7px;
}

.auth-schedule-sheet .lesson-card {
    cursor: default;
}

.auth-schedule-sheet .lesson-card + .lesson-card {
    margin-top: 4px;
}

.auth-schedule-sheet .grid-empty-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.auth-schedule-lesson {
    opacity: 0.72;
}

.auth-schedule-lesson-add,
.auth-schedule-lesson-remove {
    animation-delay: var(--delay, 0s);
    animation-duration: 8s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-in-out;
    will-change: opacity, transform;
}

.auth-schedule-lesson-add {
    opacity: 0;
    animation-name: authScheduleAdd;
}

.auth-schedule-lesson-remove {
    opacity: 0.72;
    animation-name: authScheduleRemove;
}

.auth-card {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    background: var(--features-auth-card-surface);
    border: var(--features-auth-card-border);
    border-radius: 10px;
    box-shadow: var(--features-auth-card-shadow);
    padding: 32px;
    backdrop-filter: blur(10px);
}

.auth-brand {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-bottom: 28px;
    text-align: center;
}

.auth-brand-logo {
    display: block;
    width: min(320px, 100%);
    height: auto;
}

.auth-brand p {
    margin: 0;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form .form-label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.auth-form .form-control {
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 16px;
    color: var(--text);
}

.auth-form .form-control:focus {
    outline: var(--features-auth-form-form-control-focus-outline);
    border-color: var(--features-auth-form-form-control-focus-border-color);
}

.auth-submit.btn {
    height: 48px;
    margin-top: 8px;
    border-radius: 10px;
    font-size: 16px;
}

.auth-secondary-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-underline-offset: 3px;
}

.auth-secondary-link:hover,
.auth-secondary-link:focus-visible {
    color: var(--accent-blue);
}

.auth-flow-card {
    width: min(500px, 100%);
}

.auth-flow-title {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 24px;
    line-height: 1.25;
    text-align: center;
}

.auth-flow-description,
.auth-flow-status p {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.55;
    text-align: center;
}

.auth-flow-hint {
    margin: -8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.mfa-code-entry {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.mfa-code-entry[hidden],
[data-mfa-code-fallback][hidden] {
    display: none;
}

.mfa-code-entry legend {
    margin-bottom: 8px;
    padding: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.mfa-code-digits {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.mfa-code-digit {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--text);
    font: inherit;
    font-size: 20px;
    text-align: center;
}

.mfa-code-digit:focus {
    outline: var(--features-mfa-code-digit-focus-outline);
    border-color: var(--features-mfa-code-digit-focus-border-color);
}

.auth-trusted-device-choice {
    align-items: center;
}

.auth-flow-status {
    display: grid;
    gap: 4px;
    text-align: center;
}

.auth-flow-status .auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.alert.alert-danger {
    --feedback-surface: var(--feedback-danger-surface);
    --feedback-border: var(--feedback-danger-border);
    --feedback-text: var(--feedback-danger-text);
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--feedback-surface, var(--feedback-default-surface));
    border-color: var(--feedback-border, var(--feedback-default-border));
    color: var(--feedback-text, var(--feedback-default-text));
}

@keyframes authScheduleAdd {
    0%, 20% {
        opacity: 0;
        transform: scale(0.97);
    }
    38%, 100% {
        opacity: 0.72;
        transform: scale(1);
    }
}

@keyframes authScheduleRemove {
    0%, 30% {
        opacity: 0.72;
        transform: scale(1);
    }
    55%, 100% {
        opacity: 0;
        transform: scale(0.98);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-schedule-lesson {
        animation: none;
    }
}

@media (max-width: 700px) {
    .auth-schedule-backdrop {
        inset: 0;
    }

    .auth-schedule-frame {
        width: 100%;
        transform: none;
    }

    .auth-card {
        width: min(400px, 100%);
        padding: 28px;
    }
}

.xlsx-preview-workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.xlsx-preview-upload-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
}

.xlsx-preview-upload-main {
    min-width: 0;
    flex: 1 1 auto;
}

.xlsx-preview-file-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.xlsx-preview-file-box input {
    width: min(720px, 100%);
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--text);
}

.xlsx-preview-hint-box {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-weight: 600;
}

.xlsx-preview-hint-box textarea {
    width: min(920px, 100%);
    min-height: 92px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--text);
    font: inherit;
    line-height: 1.35;
}

.xlsx-preview-hint-box textarea:focus {
    outline: 0;
    border-color: var(--accent-cyan);
    box-shadow: var(--features-xlsx-preview-hint-box-textarea-focus-shadow);
}

.xlsx-preview-message {
    min-height: 28px;
    margin-top: 10px;
}

.xlsx-preview-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.xlsx-preview-summary-card {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.xlsx-preview-summary-card strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    color: var(--text);
}

.xlsx-preview-summary-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.xlsx-preview-grid-panel {
    padding: 0;
    overflow: hidden;
}

.xlsx-preview-review-panel {
    padding: 16px;
    overflow: hidden;
}

.xlsx-preview-grid-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-soft);
}

.xlsx-preview-grid-head h2 {
    margin: 0;
    font-size: 22px;
}

.xlsx-preview-grid-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.xlsx-preview-schema {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 560px;
}

.xlsx-preview-schema span {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--xlsx-preview-schema-text);
    font-size: 13px;
}

.xlsx-preview-grid-scroll {
    overflow: auto;
    max-height: calc(100vh - 260px);
}

.xlsx-preview-grid-table {
    width: 100%;
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.xlsx-preview-grid-table th,
.xlsx-preview-grid-table td {
    border-right: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
}

.xlsx-preview-grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    min-width: 190px;
    padding: 14px 12px;
    background: var(--xlsx-preview-grid-table-surface);
    color: var(--xlsx-preview-grid-table-text);
    font-weight: 700;
    text-align: center;
}

.xlsx-preview-grid-table td {
    min-height: 116px;
    padding: 10px;
    background: var(--color-surface);
}

.xlsx-preview-grid-table .xlsx-preview-time-col {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 150px;
    min-width: 150px;
    background: var(--xlsx-preview-grid-table-surface);
    text-align: left;
}

.xlsx-preview-grid-table tbody .xlsx-preview-time-col {
    padding: 12px;
    color: var(--text);
}

.xlsx-preview-time-col span,
.xlsx-preview-group-name {
    display: block;
    font-weight: 700;
}

.xlsx-preview-time-col small,
.xlsx-preview-grid-table thead small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.xlsx-preview-lesson-card {
    padding: 10px;
    border: var(--xlsx-preview-lesson-card-border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: var(--xlsx-preview-lesson-card-surface);
    box-shadow: var(--features-xlsx-preview-lesson-card-shadow);
}

.xlsx-preview-lesson-card + .xlsx-preview-lesson-card {
    margin-top: 8px;
}

.xlsx-preview-lesson-card.is-requires_review {
    border-left-color: var(--warning);
    background: var(--xlsx-preview-lesson-card-is-requires-review-surface);
}

.xlsx-preview-lesson-card.is-invalid {
    border-left-color: var(--error);
    background: var(--color-editor-remove-hover-surface);
}

.xlsx-preview-lesson-title {
    font-weight: 700;
    color: var(--text);
}

.xlsx-preview-lesson-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.xlsx-preview-type-badge,
.xlsx-preview-status-badge,
.xlsx-preview-confidence {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--color-surface-hover-strong);
    color: var(--xlsx-preview-type-badge-text);
    font-size: 12px;
    font-weight: 700;
}

.xlsx-preview-type-badge.lecture {
    background: var(--xlsx-preview-type-badge-lecture-surface);
    color: var(--accent);
}

.xlsx-preview-type-badge.practice,
.xlsx-preview-type-badge.seminar {
    background: var(--xlsx-preview-type-badge-practice-surface);
    color: var(--color-choice-mark);
}

.xlsx-preview-type-badge.lab {
    background: var(--xlsx-preview-type-badge-lab-surface);
    color: var(--xlsx-preview-type-badge-lab-text);
}

.xlsx-preview-status-badge,
.xlsx-preview-confidence {
    background: var(--xlsx-preview-status-badge-surface);
    color: var(--xlsx-preview-status-badge-text);
}

.xlsx-preview-lesson-meta,
.xlsx-preview-lesson-source,
.xlsx-preview-lesson-warning {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.xlsx-preview-lesson-warning {
    color: var(--xlsx-preview-lesson-warning-text);
}

.xlsx-preview-review-list {
    display: grid;
    gap: 10px;
    padding: 16px 20px 20px;
}

.xlsx-preview-grid-workspace {
    height: auto;
    min-height: 0;
    margin-left: var(--grid-meta-gutter);
}

.xlsx-preview-grid-workspace .grid-topbar {
    padding-right: 0;
}

.xlsx-preview-grid-workspace .grid-panel {
    min-height: 0;
    margin-left: 0;
}

.xlsx-preview-grid-scroll.grid-sheet {
    display: block;
    height: 100%;
    max-height: none;
    overflow: auto;
    border-radius: 8px 0 0 0;
}

.xlsx-preview-grid-panel .grid-sheet-tabs-bar {
    border-left: var(--xlsx-preview-grid-panel-grid-sheet-tabs-bar-border);
}

.xlsx-preview-grid-panel .grid-empty-slot.xlsx-preview-empty-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    pointer-events: none;
}

.xlsx-preview-grid-panel .lesson-card {
    cursor: default;
}

.xlsx-preview-grid-panel .lesson-card + .lesson-card {
    margin-top: 4px;
}

.xlsx-preview-grid-panel .grid-cell {
    height: auto;
    min-height: 116px;
    padding: 6px 6px;
    vertical-align: top;
}

.xlsx-preview-grid-panel .xlsx-preview-lesson-card {
    height: auto;
    max-height: none;
    min-height: auto;
    padding: 8px 10px;
    padding-right: 10px;
    overflow: visible;
    white-space: normal;
}

.xlsx-preview-grid-panel .xlsx-preview-lesson-card .lesson-card-title,
.xlsx-preview-grid-panel .xlsx-preview-lesson-card .lesson-card-profile,
.xlsx-preview-grid-panel .xlsx-preview-lesson-card .lesson-card-meta {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.xlsx-preview-grid-panel .xlsx-preview-lesson-card .lesson-card-title {
    line-height: 1.25;
}

.xlsx-preview-grid-panel .xlsx-preview-lesson-card .lesson-card-profile,
.xlsx-preview-grid-panel .xlsx-preview-lesson-card .lesson-card-meta {
    line-height: 1.22;
}

.xlsx-preview-grid-panel .xlsx-preview-lesson-card .xlsx-preview-lesson-dates {
    color: var(--xlsx-preview-grid-panel-xlsx-preview-lesson-card-xlsx-preview-lesson-dates-text);
    font-size: 11px;
    font-weight: 700;
}

.xlsx-preview-grid-panel .xlsx-preview-lesson-card .lesson-card-indicators {
    position: static;
    max-width: none;
    justify-content: flex-start;
    margin-top: 6px;
}

.import-review-workspace {
    display: grid;
    gap: 16px;
}

.import-review-toolbar,
.import-review-table-panel {
    padding: 16px;
}

.import-review-run-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.import-review-run-form label {
    min-width: min(420px, 100%);
}

.import-review-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px;
}

.import-review-metric {
    border: 1px solid var(--drawer-divider-color);
    border-radius: 10px;
    padding: 12px;
    background: var(--color-surface);
}

.import-review-metric span {
    display: block;
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 500;
}

.import-review-metric strong {
    display: block;
    margin-top: 4px;
    color: var(--color-text-strong);
    font-size: 24px;
    font-weight: 600;
}

.import-review-metric.is-warning strong {
    color: var(--import-review-metric-is-warning-text);
}

.import-review-table th,
.import-review-table td {
    vertical-align: top;
}

.import-review-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.import-review-split h3 {
    margin: 0 0 8px;
    color: var(--color-action-secondary-text);
    font-size: 14px;
    font-weight: 600;
}

.import-review-line {
    display: grid;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid var(--drawer-divider-color);
}

.import-review-line span {
    color: var(--color-action-secondary-text);
}

.import-review-line code {
    color: var(--color-tab-text);
    white-space: normal;
}

@media (max-width: 980px) {
    .import-review-summary,
    .import-review-split {
        grid-template-columns: 1fr;
    }
}

.xlsx-preview-lesson-popover {
    position: fixed;
    z-index: 1200;
    padding: 14px;
    border: var(--xlsx-preview-lesson-popover-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--features-xlsx-preview-lesson-popover-shadow);
    color: var(--text);
}

.xlsx-preview-lesson-popover-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: var(--xlsx-preview-lesson-popover-head-border);
}

.xlsx-preview-lesson-popover-head strong {
    font-size: 15px;
    line-height: 1.25;
}

.xlsx-preview-lesson-popover-head button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: var(--status-info-surface);
    color: var(--text);
    cursor: pointer;
}

.xlsx-preview-lesson-popover-body {
    display: grid;
    gap: 6px;
    padding-top: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.xlsx-preview-grid-panel .xlsx-preview-schema {
    max-width: none;
    justify-content: flex-start;
}

.xlsx-preview-grid-panel .xlsx-preview-schema span {
    min-height: 20px;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
}

.xlsx-preview-debug-panel {
    padding: 16px;
    overflow: hidden;
}

.xlsx-preview-debug-list {
    display: grid;
    max-height: 520px;
    gap: 10px;
    overflow: auto;
    padding: 16px 20px 20px;
}

.xlsx-preview-debug-empty {
    padding: 14px 16px;
    border: 1px dashed var(--empty-state-border);
    border-radius: 8px;
    color: var(--empty-state-text);
    background: var(--empty-state-surface);
}

.xlsx-preview-debug-entry {
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-left: var(--xlsx-preview-debug-entry-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.xlsx-preview-debug-entry.is-progress {
    border-left-color: var(--xlsx-preview-debug-entry-is-progress-border);
    background: var(--xlsx-preview-debug-entry-is-progress-surface);
}

.xlsx-preview-debug-entry.is-success {
    border-left-color: var(--xlsx-preview-debug-entry-is-success-border);
    background: var(--xlsx-preview-debug-entry-is-success-surface);
}

.xlsx-preview-debug-entry.is-error {
    border-left-color: var(--error);
    background: var(--xlsx-preview-debug-entry-is-error-surface);
}

.xlsx-preview-debug-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.xlsx-preview-debug-entry-head strong {
    color: var(--text);
}

.xlsx-preview-debug-entry-head span {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.xlsx-preview-debug-entry pre {
    max-height: 360px;
    margin: 10px 0 0;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--xlsx-preview-debug-entry-text);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
}

.xlsx-preview-review-item {
    display: grid;
    grid-template-columns: minmax(220px, 0.34fr) minmax(360px, 1fr);
    gap: 16px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--color-surface);
}

.xlsx-preview-review-item strong,
.xlsx-preview-review-item span {
    display: block;
}

.xlsx-preview-review-item span {
    margin-top: 4px;
    color: var(--muted);
}

.xlsx-two-pass-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    overflow: hidden;
}

.xlsx-two-pass-panel > .xlsx-preview-message {
    margin: 0 20px;
}

.xlsx-two-pass-panel > .xlsx-preview-summary {
    margin: 0 20px;
}

.xlsx-structure-root {
    display: grid;
    gap: 12px;
    padding: 0 20px;
}

.xlsx-structure-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--color-data-table-tree-surface);
}

.xlsx-structure-actions span {
    color: var(--muted);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12px;
}

.xlsx-structure-sheet {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-surface);
}

.xlsx-structure-sheet header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--xlsx-structure-sheet-surface);
}

.xlsx-structure-sheet h3 {
    margin: 0;
    font-size: 18px;
}

.xlsx-structure-sheet p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.xlsx-structure-sheet header > span {
    min-width: max-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--xlsx-structure-sheet-text);
    font-size: 13px;
    font-weight: 700;
}

.xlsx-structure-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    padding: 12px;
}

.xlsx-structure-group {
    display: grid;
    gap: 4px;
    min-height: 86px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.xlsx-structure-group:hover {
    border-color: var(--xlsx-structure-group-hover-border);
    background: var(--color-data-table-tree-surface);
}

.xlsx-structure-group:disabled {
    cursor: wait;
    opacity: 0.65;
}

.xlsx-structure-group strong {
    font-size: 16px;
}

.xlsx-structure-group span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
}

.xlsx-structure-group small {
    color: var(--xlsx-structure-group-text);
    font-weight: 700;
}

.xlsx-group-result {
    margin: 0 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--color-surface);
    overflow: hidden;
}

.xlsx-group-result-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--xlsx-group-result-head-surface);
}

.xlsx-group-result-head h3 {
    margin: 0;
    font-size: 18px;
}

.xlsx-group-result-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.xlsx-group-result pre {
    max-height: 520px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .xlsx-preview-upload-panel,
    .xlsx-preview-grid-head {
        align-items: stretch;
        flex-direction: column;
    }

    .xlsx-preview-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xlsx-preview-review-item {
        grid-template-columns: 1fr;
    }
}

.grid-xlsx-draft-panel.slot-editor-panel {
    --drawer-width: 650px;
}

.grid-xlsx-draft-panel .slot-editor-head {
    align-items: center;
    gap: 10px;
    padding-bottom: 2px;
}

.grid-xlsx-draft-panel .slot-editor-title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.grid-xlsx-draft-panel .slot-editor-head h2 {
    overflow: hidden;
    color: var(--grid-xlsx-draft-panel-slot-editor-head-text);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-xlsx-draft-panel .slot-editor-meta {
    gap: 7px;
    margin-top: 8px;
}

.grid-xlsx-draft-panel .slot-editor-context-chip {
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
}

.grid-xlsx-draft-panel .icon-btn {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-color: transparent;
    background: transparent;
    color: var(--grid-xlsx-draft-panel-icon-btn-text);
    font-size: 20px;
}

.grid-xlsx-draft-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0 4px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.grid-xlsx-draft-scroll::-webkit-scrollbar,
.grid-xlsx-draft-debug::-webkit-scrollbar {
    width: 8px;
}

.grid-xlsx-draft-scroll::-webkit-scrollbar-thumb,
.grid-xlsx-draft-debug::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
}

.grid-xlsx-draft-card {
    border: 1px solid var(--directory-editor-border);
    border-radius: 12px;
    background: var(--color-surface);
    padding: 12px;
    box-shadow: var(--features-grid-xlsx-draft-card-shadow);
}

.grid-xlsx-draft-card:first-child {
    padding-top: 14px;
    background: linear-gradient(90deg, var(--accent-teal) 0%, var(--accent-cyan) 58%, var(--accent) 100%) 0 0 / 100% 4px no-repeat, var(--calendar-surface);
}

.grid-xlsx-draft-card h3 {
    margin: 0 0 10px;
    color: var(--grid-xlsx-draft-card-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
}

.grid-xlsx-draft-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
    color: var(--grid-xlsx-draft-field-text);
    font-size: 12px;
    font-weight: 500;
}

.grid-xlsx-draft-field input,
.grid-xlsx-draft-field textarea {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--grid-xlsx-draft-field-border);
    border-radius: 9px;
    background: var(--color-surface);
    color: var(--grid-xlsx-draft-field-text-variant-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    padding: 7px 10px;
}

.grid-xlsx-draft-field input[type="file"] {
    height: 36px;
    padding: 5px 8px;
}

.grid-xlsx-draft-field input[type="file"]::file-selector-button {
    height: 24px;
    margin-right: 10px;
    padding: 0 8px;
    border: 1px solid var(--grid-xlsx-draft-field-border-variant-2);
    border-radius: 7px;
    background: var(--grid-xlsx-draft-field-surface);
    color: var(--grid-xlsx-draft-field-text-variant-3);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.grid-xlsx-draft-field textarea {
    resize: vertical;
    min-height: 92px;
}

.grid-xlsx-draft-options {
    margin: -2px 0 12px;
    color: var(--grid-xlsx-draft-field-text);
    font-size: 12px;
}

.grid-xlsx-draft-options > summary {
    width: fit-content;
    cursor: pointer;
    color: var(--grid-xlsx-draft-message-text);
    font-weight: 500;
}

.grid-xlsx-draft-options[open] > summary {
    margin-bottom: 10px;
}

.grid-xlsx-draft-options .grid-xlsx-draft-field {
    margin-bottom: 0;
}

.grid-xlsx-draft-options .grid-xlsx-draft-field textarea {
    min-height: 72px;
}

.grid-xlsx-draft-file-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.grid-xlsx-draft-message {
    margin: 4px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--grid-xlsx-draft-message-surface);
    color: var(--grid-xlsx-draft-message-text);
    border: 1px solid var(--grid-xlsx-draft-message-border);
    font-size: 12px;
    line-height: 1.35;
}

.grid-xlsx-draft-message.is-hidden {
    display: none;
}

.grid-xlsx-draft-message.is-ok {
    background: var(--grid-xlsx-draft-message-is-ok-surface);
    border-color: var(--grid-xlsx-draft-message-is-ok-border);
    color: var(--grid-xlsx-draft-message-is-ok-text);
}

.grid-xlsx-draft-message.is-warning {
    background: var(--grid-non-study-row-surface);
    border-color: var(--grid-xlsx-draft-message-is-warning-border);
    color: var(--grid-xlsx-draft-message-is-warning-text);
}

.grid-xlsx-draft-message.is-error {
    background: var(--grid-entry-drop-risk-state-surface);
    border-color: var(--grid-xlsx-draft-message-is-error-border);
    color: var(--grid-xlsx-draft-message-is-error-text);
}

.grid-xlsx-draft-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.grid-xlsx-draft-panel .slot-editor-actions {
    margin: 0 0 0 calc(-1 * var(--drawer-padding-left));
    padding: 8px 18px 10px;
}

.grid-xlsx-draft-panel .slot-editor-actions .btn {
    min-height: 36px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
}

.grid-xlsx-draft-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.grid-xlsx-draft-stats span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--grid-active-slot-surface);
    border: 1px solid var(--grid-xlsx-draft-stats-border);
}

.grid-xlsx-draft-stats strong {
    color: var(--grid-xlsx-draft-stats-text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.grid-xlsx-draft-stats small {
    color: var(--grid-xlsx-draft-stats-text-variant-2);
    font-size: 12px;
    font-weight: 400;
}

.grid-xlsx-draft-result {
    display: grid;
    gap: 5px;
}

.grid-xlsx-draft-result > strong {
    color: var(--grid-xlsx-draft-stats-text);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.grid-xlsx-draft-result > span {
    color: var(--grid-xlsx-draft-stats-text-variant-2);
    font-size: 13px;
    line-height: 1.4;
}

.grid-draft-assembly-summary-list {
    display: grid;
    gap: 0;
    margin: 12px 0 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
    list-style: none;
}

.grid-draft-assembly-summary-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0;
}

.grid-draft-assembly-summary-list li + li {
    border-top: 1px solid var(--color-border);
}

.grid-draft-assembly-summary-list span {
    color: var(--grid-xlsx-draft-stats-text-variant-2);
    font-size: 13px;
    line-height: 1.35;
}

.grid-draft-assembly-summary-list .grid-draft-assembly-summary-count {
    justify-self: end;
    min-width: 28px;
    justify-content: center;
    margin: 0;
}

.grid-xlsx-draft-issues {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.grid-xlsx-draft-issues.is-hidden {
    display: none;
}

.grid-draft-assembly-sources {
    display: grid;
    gap: 0;
    margin-top: 12px;
}

.grid-draft-assembly-source {
    display: grid;
    gap: 3px;
    padding: 9px 0;
    border-top: 1px solid var(--color-border);
}

.grid-draft-assembly-source span {
    color: var(--grid-xlsx-draft-stats-text);
    font-size: 13px;
    line-height: 1.3;
}

.grid-draft-assembly-source small {
    color: var(--grid-xlsx-draft-stats-text-variant-2);
    font-size: 12px;
    line-height: 1.35;
}

.grid-draft-assembly-confirm {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1 0 100%;
    color: var(--grid-xlsx-draft-stats-text);
    font-size: 12px;
    line-height: 1.4;
}

.grid-draft-assembly-confirm input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 1px 0 0;
}

.grid-xlsx-import-issue {
    display: grid;
    gap: 8px;
    padding: 11px;
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--grid-xlsx-draft-message-is-warning-border);
    border-radius: 10px;
    background: var(--color-surface-subtle);
    outline: none;
}

.grid-xlsx-import-issue.is-info {
    border-left-color: var(--status-info-border);
}

.grid-xlsx-import-issue:focus-visible {
    box-shadow: 0 0 0 3px var(--color-control-focus-ring);
}

.grid-xlsx-import-issue > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.grid-xlsx-import-issue > header strong {
    color: var(--grid-xlsx-draft-unplaced-title-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.grid-xlsx-import-issue > header span {
    flex: 0 0 auto;
    color: var(--grid-xlsx-draft-unplaced-meta-text);
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
}

.grid-xlsx-import-issue > p {
    margin: 0;
    color: var(--grid-xlsx-draft-unplaced-meta-text);
    font-size: 12px;
    line-height: 1.4;
}

.grid-xlsx-import-issue > p.grid-xlsx-import-issue-detail {
    color: var(--grid-xlsx-draft-unplaced-head-text);
    font-weight: 500;
}

.grid-xlsx-import-issue > p.grid-draft-assembly-issue-message {
    margin: 0;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.grid-xlsx-import-missing-values,
.grid-xlsx-import-affected ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.grid-xlsx-import-missing-values li {
    padding: 5px 7px;
    border-radius: 7px;
    background: var(--color-surface);
    color: var(--grid-xlsx-draft-unplaced-title-text);
    font-size: 12px;
    line-height: 1.35;
}

.grid-xlsx-import-recommendation {
    display: grid;
    gap: 2px;
    color: var(--grid-xlsx-draft-unplaced-meta-text);
    font-size: 12px;
    line-height: 1.4;
}

.grid-xlsx-import-recommendation strong {
    color: var(--grid-xlsx-draft-unplaced-head-text-variant-2);
    font-weight: 600;
}

.grid-xlsx-import-action {
    width: fit-content;
    color: var(--grid-xlsx-draft-message-text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.grid-xlsx-import-action:hover,
.grid-xlsx-import-action:focus-visible {
    text-decoration: underline;
}

.grid-xlsx-import-affected > summary,
.grid-xlsx-draft-support > summary {
    cursor: pointer;
    color: var(--grid-xlsx-draft-message-text);
    font-size: 12px;
    font-weight: 500;
}

.grid-xlsx-import-affected[open] > summary {
    margin-bottom: 7px;
}

.grid-xlsx-import-affected li {
    display: grid;
    gap: 2px;
    padding-top: 6px;
    border-top: 1px solid var(--grid-xlsx-draft-unplaced-row-border);
}

.grid-xlsx-import-affected li strong {
    color: var(--grid-xlsx-draft-unplaced-title-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.grid-xlsx-import-affected-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}

.grid-xlsx-import-reference-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--grid-xlsx-draft-message-text);
    font: inherit;
    font-size: 11px;
    line-height: 1.35;
    cursor: pointer;
}

.grid-xlsx-import-reference-toggle:hover,
.grid-xlsx-import-reference-toggle:focus-visible {
    text-decoration: underline;
}

.grid-xlsx-import-affected li span {
    color: var(--grid-xlsx-draft-unplaced-meta-text);
    font-size: 11px;
    line-height: 1.35;
}

.grid-xlsx-import-reference-list {
    line-height: 1.4;
}

.grid-xlsx-draft-support > summary {
    list-style-position: inside;
}

.grid-xlsx-draft-support[open] > summary {
    margin-bottom: 10px;
}

.grid-xlsx-draft-debug {
    max-height: 360px;
    overflow: auto;
    color: var(--grid-xlsx-draft-debug-text);
    font-size: 12px;
    line-height: 1.4;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.grid-xlsx-draft-debug-item {
    border-left: 3px solid var(--grid-xlsx-draft-debug-item-border);
    border-radius: 9px;
    background: var(--bg);
    padding: 8px 10px;
    margin-bottom: 8px;
}

.grid-xlsx-draft-debug-item.is-success {
    border-left-color: var(--grid-xlsx-draft-debug-item-is-success-border);
    background: var(--grid-xlsx-draft-debug-item-is-success-surface);
}

.grid-xlsx-draft-debug-item.is-warning,
.grid-xlsx-draft-debug-item.is-progress {
    border-left-color: var(--grid-xlsx-draft-debug-item-is-warning-border);
    background: var(--grid-xlsx-draft-debug-item-is-warning-surface);
}

.grid-xlsx-draft-debug-item.is-error {
    border-left-color: var(--grid-xlsx-draft-debug-item-is-error-border);
    background: var(--grid-xlsx-draft-debug-item-is-error-surface);
}

.grid-xlsx-draft-debug-item div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--grid-xlsx-draft-debug-item-text);
    font-size: 12px;
}

.grid-xlsx-draft-debug-item strong {
    font-weight: 600;
}

.grid-xlsx-draft-debug-item pre {
    margin: 6px 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--grid-xlsx-draft-debug-item-text-variant-2);
    font-size: 11px;
}

.grid-plan-coverage-open {
    white-space: nowrap;
}

.grid-plan-coverage-open.is-active {
    border-color: var(--grid-plan-coverage-open-is-active-border);
    background: var(--grid-plan-coverage-open-is-active-surface);
    color: var(--grid-plan-coverage-open-is-active-text);
}

.grid-plan-coverage-edge {
    position: fixed;
    top: 0;
    bottom: 100px;
    right: 0;
    z-index: 31;
    width: 12px;
}

.grid-body.is-plan-coverage-pinned .grid-plan-coverage-edge {
    display: none;
}

.grid-plan-coverage-side {
    --grid-plan-coverage-controls-preview-offset: 0px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 32;
    width: min(440px, calc(100vw - 76px));
    height: 100%;
    min-height: 0;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 12px 0 0 12px;
    background: var(--color-surface);
    box-shadow: var(--features-grid-plan-coverage-side-shadow);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.grid-body.is-plan-coverage-pinned .grid-plan-coverage-side {
    position: relative;
    width: auto;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: none;
}

.grid-body.is-plan-coverage-pinned .grid-plan-coverage-pin {
    display: none;
}

.grid-plan-coverage-side.is-hidden {
    display: none;
}

.grid-plan-coverage-head {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 11px 12px 9px 14px;
    background: var(--color-surface);
}

.grid-plan-coverage-heading {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grid-plan-coverage-heading strong {
    color: var(--color-text-strong);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.grid-plan-coverage-heading span {
    color: var(--color-text-secondary);
    font-size: 11px;
    line-height: 1.3;
}

.grid-plan-coverage-searchbox {
    min-width: 0;
}

.grid-plan-coverage-searchbox input {
    width: 100%;
    height: 34px;
    border: 1px solid var(--color-control-border);
    border-radius: 7px;
    background: var(--color-control-bg);
    color: var(--color-text);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 400;
}

.grid-plan-coverage-searchbox input:focus-visible {
    outline: 0;
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 2px var(--color-control-focus-ring);
}

.grid-plan-coverage-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.grid-plan-coverage-tool {
    position: relative;
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--color-text-control);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 19px;
    line-height: 1;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.grid-plan-coverage-tool svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.grid-plan-coverage-tool:hover,
.grid-plan-coverage-tool:focus-visible,
.grid-plan-coverage-tool.is-active {
    outline: 0;
    background: var(--color-surface-hover);
    color: var(--color-link-text);
}

.grid-plan-coverage-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: var(--grid-plan-coverage-scroll-scrollbar);
}

.grid-plan-coverage-scroll::-webkit-scrollbar {
    width: 9px;
}

.grid-plan-coverage-scroll::-webkit-scrollbar-track {
    background: var(--color-surface-hover);
}

.grid-plan-coverage-scroll::-webkit-scrollbar-thumb {
    border: var(--grid-plan-coverage-scroll-border);
    border-radius: 999px;
    background: var(--grid-plan-coverage-scroll-surface);
}

.grid-plan-commercial-callout {
    flex: 0 0 auto;
    margin: 0 12px 10px 14px;
}

.grid-plan-coverage-side.is-commercial-locked .grid-plan-commercial-callout {
    margin-bottom: 0;
}

.grid-plan-coverage-message {
    flex: 0 0 auto;
    margin: 10px 12px 0 14px;
    border: 1px solid var(--color-container-border);
    background: var(--color-surface);
    border-radius: 8px;
    padding: 9px 10px;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.grid-plan-coverage-message.is-hidden {
    display: none;
}

.grid-plan-coverage-message.is-warning {
    border-color: var(--feedback-warning-border);
    background: var(--feedback-warning-surface);
    color: var(--feedback-warning-text);
}

.grid-plan-coverage-message.is-error {
    border-color: var(--feedback-error-border);
    background: var(--feedback-error-surface);
    color: var(--feedback-error-text);
}

.grid-plan-coverage-message.is-ok {
    display: none;
}

.grid-plan-coverage-summary {
    flex: 0 0 auto;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--color-divider-border);
    border-radius: 0;
    background: var(--color-table-header-surface);
    padding: 9px 14px 10px;
}

.grid-plan-coverage-summary-state {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 0;
    border: 0;
}

.grid-plan-coverage-summary-state > i {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    align-self: flex-start;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--grid-plan-coverage-summary-state-surface);
}

.grid-plan-coverage-summary-state.is-ready > i {
    background: var(--grid-plan-coverage-summary-state-is-ready-surface);
}

.grid-plan-coverage-summary-state > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.grid-plan-coverage-summary-state strong {
    color: var(--color-text-strong);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.grid-plan-coverage-summary-state small {
    color: var(--color-text-secondary);
    font-size: 10px;
    line-height: 1.35;
}

.grid-plan-coverage-summary-values {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 14px;
    margin-top: 7px;
}

.grid-plan-coverage-summary-values > span {
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 0;
    white-space: nowrap;
}

.grid-plan-coverage-summary-values strong {
    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.grid-plan-coverage-summary-values small {
    color: var(--color-text-secondary);
    font-size: 9px;
}

.grid-plan-coverage-summary-values .is-shortage strong {
    color: var(--feedback-compact-warning-text);
}

.grid-plan-coverage-summary-values .is-overage strong {
    color: var(--feedback-compact-error-text);
}

.grid-plan-coverage-summary-values .is-control strong {
    color: var(--grid-plan-coverage-summary-values-is-control-text);
}

.grid-plan-coverage-summary-values .is-unplanned strong {
    color: var(--feedback-compact-error-text);
}

@media (max-width: 420px) {
    .grid-plan-coverage-summary-values {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px 16px;
    }
}

.grid-plan-coverage-controls {
    position: relative;
    z-index: 4;
    padding: 0 12px 9px 14px;
    border-bottom: 1px solid var(--color-divider-border);
    background: var(--color-surface);
    transform: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    will-change: transform;
}

.grid-plan-coverage-side.is-controls-preview .grid-plan-coverage-controls {
    transform: translateY(var(--grid-plan-coverage-controls-preview-offset));
    box-shadow: var(--features-grid-plan-coverage-side-is-controls-preview-grid-plan-coverage-controls-shadow);
}

.grid-plan-coverage-scope-row {
    display: grid;
    grid-template-columns: minmax(124px, 0.72fr) minmax(0, 1.28fr);
    gap: 7px;
}

.grid-plan-coverage-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.grid-plan-coverage-field > span {
    color: var(--color-text-secondary);
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
}

.grid-plan-coverage-group-field select {
    width: 100%;
    height: 34px;
    border: 1px solid var(--color-control-border);
    border-radius: 7px;
    background: var(--color-control-bg);
    color: var(--color-text);
    padding: 0 25px 0 9px;
    font: inherit;
    font-size: 12px;
}

.grid-plan-coverage-group-field select:focus-visible {
    outline: 0;
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 2px var(--color-control-focus-ring);
}

.grid-plan-coverage-view {
    display: block;
    margin-top: 8px;
}

.grid-plan-coverage-view > div {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--color-container-border);
    border-radius: 7px;
    background: var(--color-surface-subtle);
}

.grid-plan-coverage-view button {
    height: 27px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--color-text-control);
    padding: 0 8px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    white-space: nowrap;
}

.grid-plan-coverage-view button:hover,
.grid-plan-coverage-view button:focus-visible {
    outline: 0;
    color: var(--color-text-control-hover);
}

.grid-plan-coverage-view button.is-active {
    background: var(--color-surface);
    color: var(--color-text-strong);
    font-weight: 600;
    box-shadow: var(--features-grid-plan-coverage-view-button-is-active-shadow);
}

.grid-plan-coverage-status-filters {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 34px;
    margin-top: 6px;
    border-bottom: 1px solid var(--color-divider-border);
}

.grid-plan-coverage-status-filters button {
    position: relative;
    align-self: stretch;
    border: 0;
    background: transparent;
    color: var(--color-text-control);
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    white-space: nowrap;
}

.grid-plan-coverage-status-filters button::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
}

.grid-plan-coverage-status-filters button.is-active {
    color: var(--color-text-strong);
    font-weight: 600;
}

.grid-plan-coverage-status-filters button.is-active::after {
    background: var(--grid-plan-coverage-status-filters-is-active-after-surface);
}

.grid-plan-coverage-status-filters button span {
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
    border-radius: 9px;
    background: var(--compact-counter-surface);
    color: var(--compact-counter-text);
    padding: 0 5px;
    font-size: 9px;
}

.grid-plan-coverage-filters {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-top: 7px;
}

.grid-plan-coverage-filters button {
    height: 26px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-action-secondary-text);
    padding: 0 5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    font-weight: 400;
}

.grid-plan-coverage-filters button:hover,
.grid-plan-coverage-filters button:focus-visible {
    outline: 0;
    border-color: var(--color-control-focus-border);
    background: var(--color-surface-soft);
}

.grid-plan-coverage-filters button.is-active {
    border-color: var(--color-filter-active-border);
    background: var(--color-filter-active-surface);
    color: var(--color-filter-active-text);
    font-weight: 500;
}

.grid-plan-coverage-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10060;
    width: min(324px, calc(100vw - 36px));
    min-height: 86px;
    border: 1px solid var(--color-toast-border);
    border-top: 0;
    border-radius: 12px;
    background: var(--color-toast-surface);
    box-shadow: var(--color-toast-shadow);
    color: var(--color-toast-text);
    padding: 15px 32px 12px 14px;
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 11px;
    overflow: hidden;
    animation: planCoverageToastIn 180ms ease-out both;
}

.grid-plan-coverage-toast::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--component-progress-fill, var(--progress-fill));
    transform-origin: left center;
    animation: planCoverageToastProgress var(--ais-toast-duration, 7000ms) linear both;
}

.grid-plan-coverage-toast.is-paused::before {
    animation-play-state: paused;
}

.grid-plan-coverage-toast.is-leaving {
    animation: planCoverageToastOut 180ms ease-in both;
}

.grid-plan-coverage-toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-toast-close);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}

.grid-plan-coverage-toast-close:hover,
.grid-plan-coverage-toast-close:focus-visible {
    outline: 0;
    background: var(--color-toast-close-hover-bg);
    color: var(--color-toast-close-hover-text);
}

.grid-plan-coverage-toast-icon {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: var(--color-toast-icon-bg);
    color: var(--color-toast-icon-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 15px;
    font-style: italic;
    font-weight: 700;
    line-height: 1;
}

.grid-plan-coverage-toast-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.grid-plan-coverage-toast-body strong {
    color: var(--color-toast-title);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.grid-plan-coverage-toast-body span {
    color: var(--color-toast-secondary);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

.grid-plan-coverage-toast-body label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-toast-label);
    font-size: 10px;
    font-weight: 500;
}

.grid-plan-coverage-toast-body input {
    width: 12px;
    height: 12px;
}

@keyframes planCoverageToastIn {
    from {
        opacity: 0;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes planCoverageToastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(28px);
    }
}

@keyframes planCoverageToastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.grid-plan-coverage-toast.getting-started-tour-toast {
    width: min(360px, calc(100vw - 36px));
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-top: 0;
    box-shadow:
        var(--features-grid-plan-coverage-toast-getting-started-tour-toast-shadow);
}

.getting-started-tour-toast .grid-plan-coverage-toast-body {
    gap: 6px;
}

.getting-started-tour-toast .grid-plan-coverage-toast-body strong {
    color: var(--color-toast-title);
    font-size: 14px;
    line-height: 1.35;
}

.getting-started-tour-toast .grid-plan-coverage-toast-body span {
    color: var(--color-toast-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.grid-plan-coverage-toast.page-tour-completion-choice::before {
    display: none;
}

.page-tour-completion-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

@media (max-width: 720px) {
    .grid-plan-coverage-toast.getting-started-tour-toast {
        right: 12px;
        bottom: 12px;
        width: min(360px, calc(100vw - 24px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .grid-plan-coverage-toast.getting-started-tour-toast,
    .grid-plan-coverage-toast.getting-started-tour-toast.is-leaving {
        animation: none;
    }

    .grid-plan-coverage-toast.getting-started-tour-toast::before {
        animation: none;
    }
}

.grid-plan-coverage-list {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px 12px 14px;
}

.grid-plan-coverage-empty {
    border: 1px dashed var(--color-action-secondary-border);
    border-radius: 8px;
    background: var(--color-surface);
    padding: 18px 14px;
    color: var(--color-tab-text);
    font-size: 12px;
    line-height: 1.45;
}

.grid-plan-coverage-empty.has-description {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.grid-plan-coverage-empty.has-description strong {
    color: var(--grid-plan-coverage-empty-has-description-text);
    font-weight: 600;
}

.grid-plan-coverage-empty.is-success {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-style: solid;
    border-color: var(--grid-plan-coverage-empty-is-success-border);
    background: var(--grid-plan-coverage-empty-is-success-surface);
}

.grid-plan-coverage-empty.is-success strong {
    color: var(--feedback-compact-success-text);
    font-size: 12px;
    font-weight: 600;
}

.grid-plan-coverage-group-section {
    --grid-plan-coverage-group-result-width: 72px;
    border: 1px solid var(--color-container-border);
    border-radius: 9px;
    background: var(--color-surface);
    overflow: hidden;
}

.grid-plan-coverage-discipline-section {
    border: 1px solid var(--color-container-border);
    border-radius: 9px;
    background: var(--color-surface);
    overflow: visible;
}

.grid-plan-coverage-discipline-section.is-issues {
    border-color: var(--feedback-warning-border);
}

.grid-plan-coverage-discipline-section.is-error {
    border-color: var(--feedback-error-border);
}

.grid-plan-coverage-discipline-section.is-ready {
    border-color: var(--feedback-success-border);
}

.grid-plan-coverage-discipline-section.is-ready .grid-plan-coverage-discipline-head {
    background: var(--feedback-success-surface);
}

.grid-plan-coverage-discipline-head {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--color-divider-border);
    border-radius: 8px 8px 0 0;
    background: var(--color-table-header-surface);
}

.grid-plan-coverage-discipline-section.has-sticky-head .grid-plan-coverage-discipline-head {
    position: sticky;
    top: 0;
    z-index: 2;
}

.grid-plan-coverage-discipline-name {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grid-plan-coverage-discipline-name strong {
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.grid-plan-coverage-discipline-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.grid-plan-coverage-discipline-result {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    text-align: right;
}

.grid-plan-coverage-discipline-result strong {
    color: var(--feedback-compact-warning-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.grid-plan-coverage-discipline-result.is-ready strong {
    color: var(--feedback-compact-success-text);
}

.grid-plan-coverage-discipline-result.is-error strong {
    color: var(--feedback-compact-error-text);
}

.grid-plan-coverage-discipline-dismiss {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--color-text-muted);
    padding: 0 0 2px;
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.grid-plan-coverage-discipline-dismiss:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-control-hover);
}

.grid-plan-coverage-discipline-dismiss:focus-visible {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 1px;
    background: var(--color-surface-hover);
    color: var(--color-text-strong);
}

.grid-plan-coverage-discipline-groups {
    display: flex;
    flex-direction: column;
}

.grid-plan-coverage-discipline-groups > .grid-plan-coverage-result-variant:last-child {
    border-radius: 0 0 8px 8px;
}

.grid-plan-coverage-hidden-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--color-divider-border);
}

.grid-plan-coverage-hidden-head {
    min-height: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
    color: var(--color-text-secondary);
}

.grid-plan-coverage-hidden-head strong {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.grid-plan-coverage-hidden-head span {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    background: var(--compact-counter-surface);
    color: var(--compact-counter-text);
    padding: 0 5px;
    font-size: 9px;
    font-weight: 600;
}

.grid-plan-coverage-hidden-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grid-plan-coverage-hidden-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--color-container-border);
    border-radius: 7px;
    background: var(--color-surface-subtle);
    padding: 6px 7px 6px 9px;
    opacity: 0.62;
    transition: opacity 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.grid-plan-coverage-hidden-item:hover,
.grid-plan-coverage-hidden-item:focus-within {
    border-color: var(--color-control-focus-border);
    background: var(--color-surface);
    opacity: 0.92;
}

.grid-plan-coverage-hidden-item > strong {
    min-width: 0;
    color: var(--color-text-strong);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.grid-plan-coverage-hidden-restore {
    min-width: 62px;
    height: 27px;
    flex: 0 0 auto;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 5px;
    background: var(--color-surface);
    color: var(--color-action-secondary-text);
    padding: 0 8px;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.grid-plan-coverage-hidden-restore:hover {
    border-color: var(--grid-plan-coverage-hidden-restore-hover-border);
    background: var(--grid-plan-coverage-hidden-restore-hover-surface);
}

.grid-plan-coverage-hidden-restore:focus-visible {
    outline: var(--grid-plan-coverage-hidden-restore-focus-visible-outline);
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .grid-plan-coverage-discipline-dismiss,
    .grid-plan-coverage-hidden-item {
        transition: none;
    }
}

.grid-plan-coverage-result-variant + .grid-plan-coverage-result-variant {
    border-top: 1px solid var(--color-divider-border);
}

.grid-plan-coverage-result-variant {
    padding: 8px 10px;
    background: var(--color-surface);
}

.grid-plan-coverage-result-variant-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.grid-plan-coverage-result-variant-scope {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.grid-plan-coverage-result-variant-scope strong {
    color: var(--color-text-strong);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.grid-plan-coverage-result-variant-scope small {
    color: var(--color-text-secondary);
    font-size: 10px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.grid-plan-coverage-result-workloads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 4px;
    margin-top: 6px;
}

.grid-plan-coverage-result-workload {
    min-width: 0;
    width: 100%;
    align-self: start;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--color-container-border);
    border-radius: 6px;
    background: var(--color-surface-soft);
    padding: 5px 6px;
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.grid-plan-coverage-discipline-groups.is-subject-unmapped,
.grid-plan-coverage-workload.is-subject-unmapped {
    position: relative;
    min-height: 64px;
    cursor: default;
}

.grid-plan-coverage-discipline-groups.is-subject-unmapped > .grid-plan-coverage-result-variant,
.grid-plan-coverage-workload.is-subject-unmapped > .grid-plan-coverage-type {
    opacity: 0.28;
    pointer-events: none;
}

.grid-plan-coverage-directory-actions {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
}

.grid-plan-coverage-directory-action {
    min-width: 0;
    min-height: 36px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-action-secondary-text);
    padding: 6px 9px;
    font: inherit;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.grid-plan-coverage-directory-action:hover,
.grid-plan-coverage-directory-action:focus-visible {
    outline: 0;
    border-color: var(--color-control-focus-border);
    color: var(--color-text-strong);
}

.grid-plan-coverage-directory-action:focus-visible {
    box-shadow: var(--features-grid-plan-coverage-directory-action-focus-visible-shadow);
}

.grid-plan-coverage-directory-action.is-primary {
    border-color: var(--color-action-primary-border);
    background: var(--color-action-primary-bg);
    color: var(--color-action-primary-text);
}

.grid-plan-coverage-directory-action.is-primary:hover,
.grid-plan-coverage-directory-action.is-primary:focus-visible {
    border-color: var(--color-control-focus-border);
    background: var(--color-surface-hover);
    color: var(--color-text-strong);
}

.grid-plan-coverage-directory-action:disabled {
    cursor: wait;
    opacity: 0.72;
}

.grid-plan-coverage-result-workload[draggable="true"] {
    cursor: grab;
}

.grid-plan-coverage-result-workload[draggable="true"].is-dragging {
    opacity: 0.58;
    cursor: grabbing;
}

.grid-plan-coverage-result-workload:hover,
.grid-plan-coverage-result-workload:focus-visible,
.grid-plan-coverage-result-workload.is-selected {
    outline: 0;
    border-color: var(--grid-plan-coverage-result-workload-hover-border);
    box-shadow: var(--features-grid-plan-coverage-result-workload-hover-grid-plan-coverage-result-workload-focus-visibl-shadow);
}

.grid-plan-coverage-result-workload.is-selected {
    background: var(--grid-plan-coverage-result-workload-is-selected-surface);
}

.grid-plan-coverage-result-workload.is-shortage {
    border-color: var(--grid-plan-coverage-result-workload-is-shortage-border);
    background: var(--grid-plan-coverage-result-workload-is-shortage-surface);
}

.grid-plan-coverage-result-workload.is-pending {
    border-color: var(--grid-plan-coverage-result-workload-is-shortage-border);
    background: var(--grid-plan-coverage-result-workload-is-shortage-surface);
}

.grid-plan-coverage-result-workload.is-error {
    border-color: var(--grid-plan-coverage-result-workload-is-error-border);
    background: var(--grid-plan-coverage-result-workload-is-error-surface);
}

.grid-plan-coverage-result-workload.is-complete {
    border-color: var(--grid-plan-coverage-result-workload-is-complete-border);
    background: var(--grid-plan-coverage-result-workload-is-complete-surface);
}

.grid-plan-coverage-result-workload.is-overage,
.grid-plan-coverage-result-workload.is-unplanned {
    border-color: var(--grid-plan-coverage-result-workload-is-overage-border);
    background: var(--grid-plan-coverage-result-workload-is-overage-surface);
}

.grid-plan-coverage-result-workload.is-selected,
.grid-plan-coverage-result-workload.is-selected:hover,
.grid-plan-coverage-result-workload.is-selected:focus-visible {
    border-color: var(--grid-plan-coverage-result-workload-is-selected-border);
    background: var(--grid-plan-coverage-result-workload-is-selected-surface-variant-2);
    color: var(--color-toast-icon-text);
    box-shadow: var(--features-grid-plan-coverage-result-workload-is-selected-grid-plan-coverage-result-workload-is-sel-shadow);
}

.grid-plan-coverage-result-workload.is-selected > small,
.grid-plan-coverage-result-workload.is-selected strong,
.grid-plan-coverage-result-workload.is-selected em {
    color: var(--color-toast-icon-text);
}

.grid-plan-coverage-result-workload > small {
    color: var(--color-text-secondary);
    font-size: 9px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-plan-coverage-result-workload > span {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 5px;
}

.grid-plan-coverage-result-workload strong {
    color: var(--color-text-strong);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.grid-plan-coverage-result-workload em {
    color: var(--feedback-compact-success-text);
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.grid-plan-coverage-result-workload.is-shortage em {
    color: var(--feedback-compact-warning-text);
}

.grid-plan-coverage-result-workload.is-error em {
    border-radius: 0;
    background: transparent;
    color: var(--feedback-compact-error-text);
    padding: 0;
}

.grid-plan-coverage-result-workload.is-overage em,
.grid-plan-coverage-result-workload.is-unplanned em {
    color: var(--feedback-compact-error-text);
}

.grid-plan-coverage-result-workload.is-selected.is-error em,
.grid-plan-coverage-result-workload.is-selected.is-overage em,
.grid-plan-coverage-result-workload.is-selected.is-unplanned em {
    color: var(--grid-plan-coverage-result-workload-is-selected-is-error-text);
}

.grid-plan-coverage-item.is-cohort .grid-plan-coverage-item-title strong {
    font-size: 11px;
}

.grid-plan-coverage-item.is-cohort .grid-plan-coverage-item-title small {
    max-width: 270px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-plan-coverage-group-head {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: var(--features-grid-plan-coverage-group-head-border-bottom);
    background: var(--grid-plan-coverage-group-head-surface);
}

.grid-plan-coverage-group-name {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.grid-plan-coverage-group-name strong {
    color: var(--color-toast-icon-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.grid-plan-coverage-group-name small {
    max-width: 280px;
    color: var(--features-grid-plan-coverage-group-name-small-text);
    font-size: 10px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-plan-coverage-group-result {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    text-align: right;
}

.grid-plan-coverage-group-result strong {
    color: var(--color-toast-icon-text);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.grid-plan-coverage-group-result small {
    color: var(--features-grid-plan-coverage-group-result-small-text);
    font-size: 9px;
    line-height: 1.2;
}

.grid-plan-coverage-group-result.is-ready strong {
    color: var(--color-toast-icon-text);
}

.grid-plan-coverage-group-items {
    display: flex;
    flex-direction: column;
}

.grid-plan-coverage-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    background: var(--color-surface);
}

.grid-plan-coverage-item + .grid-plan-coverage-item {
    border-top: 1px solid var(--color-divider-border);
}

.grid-plan-coverage-item.is-partial,
.grid-plan-coverage-item.is-over {
    background: var(--grid-plan-coverage-item-is-partial-surface);
}

.grid-plan-coverage-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.grid-plan-coverage-item-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grid-plan-coverage-item-title strong {
    color: var(--color-text-strong);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.grid-plan-coverage-item-title small {
    color: var(--color-text-secondary);
    font-size: 9px;
    line-height: 1.3;
}

.grid-plan-coverage-subject-result {
    min-height: 20px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--feedback-compact-success-surface);
    color: var(--feedback-compact-success-text);
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.grid-plan-coverage-item > .grid-plan-coverage-item-head .grid-plan-coverage-subject-result {
    width: var(--grid-plan-coverage-group-result-width);
    flex: 0 0 var(--grid-plan-coverage-group-result-width);
    margin-right: 9px;
}

.grid-plan-coverage-subject-result.is-shortage {
    background: var(--feedback-compact-warning-surface);
    color: var(--feedback-compact-warning-text);
}

.grid-plan-coverage-subject-result.is-pending {
    background: var(--feedback-compact-warning-surface);
    color: var(--feedback-compact-warning-text);
}

.grid-plan-coverage-subject-result.is-error {
    background: var(--feedback-compact-error-strong-surface);
    color: var(--feedback-compact-error-strong-text);
}

.grid-plan-coverage-subject-result.is-overage,
.grid-plan-coverage-subject-result.is-mixed {
    background: var(--feedback-compact-error-surface);
    color: var(--feedback-compact-error-text);
}

@media (prefers-reduced-motion: reduce) {
    .grid-plan-coverage-controls {
        transition: none;
    }
}

.grid-plan-coverage-workload {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.grid-plan-coverage-type {
    --coverage-color: var(--features-grid-plan-coverage-type-coverage-color);
    display: grid;
    grid-template-columns: minmax(78px, 1fr) minmax(196px, 1.65fr);
    align-items: center;
    gap: 6px 10px;
    min-height: 45px;
    border: 1px solid var(--color-container-border);
    border-radius: 7px;
    background: var(--color-surface-soft);
    padding: 7px 8px;
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease, opacity 0.12s ease;
}

.grid-plan-coverage-type[draggable="true"] {
    cursor: grab;
}

.grid-plan-coverage-type[draggable="true"]:hover,
.grid-plan-coverage-type[draggable="true"]:focus-visible {
    outline: 0;
    border-color: var(--grid-plan-coverage-type-hover-border);
    background: var(--grid-plan-coverage-type-hover-surface);
}

.grid-plan-coverage-type.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.grid-plan-coverage-type.is-complete {
    background: var(--grid-plan-coverage-type-is-complete-surface);
}

.grid-plan-coverage-type.is-pending {
    border-color: var(--grid-plan-coverage-type-is-pending-border);
}

.grid-plan-coverage-type.is-error {
    border-color: var(--grid-plan-coverage-type-is-error-border);
}

.grid-plan-coverage-type.is-lecture { --coverage-color: var(--features-grid-plan-coverage-type-is-lecture-coverage-color); }
.grid-plan-coverage-type.is-practice { --coverage-color: var(--features-grid-plan-coverage-type-is-practice-coverage-color); }
.grid-plan-coverage-type.is-lab { --coverage-color: var(--features-grid-plan-coverage-type-is-lab-coverage-color); }
.grid-plan-coverage-type.is-credit { --coverage-color: var(--features-grid-plan-coverage-type-is-credit-coverage-color); }
.grid-plan-coverage-type.is-exam { --coverage-color: var(--features-grid-plan-coverage-type-is-exam-coverage-color); }
.grid-plan-coverage-type.is-consultation { --coverage-color: var(--features-grid-plan-coverage-type-is-consultation-coverage-color); }

.grid-plan-coverage-type.is-selected,
.grid-plan-coverage-type.is-selected:hover,
.grid-plan-coverage-type.is-selected:focus-visible {
    outline: 0;
    border-color: var(--grid-plan-coverage-type-is-selected-border);
    background: var(--grid-plan-coverage-type-is-selected-surface);
    color: var(--color-toast-icon-text);
    box-shadow: var(--features-grid-plan-coverage-type-is-selected-grid-plan-coverage-type-is-selected-hover-grid-plan--shadow);
}

.grid-plan-coverage-type.is-selected .grid-plan-coverage-type-name,
.grid-plan-coverage-type.is-selected .grid-plan-coverage-stream,
.grid-plan-coverage-type.is-selected .grid-plan-coverage-type-values small,
.grid-plan-coverage-type.is-selected .grid-plan-coverage-type-values strong,
.grid-plan-coverage-type.is-selected .grid-plan-coverage-delta,
.grid-plan-coverage-type.is-selected .grid-plan-coverage-fix {
    color: var(--color-toast-icon-text);
}

.grid-plan-coverage-type.is-selected .grid-plan-coverage-fix {
    border-top-color: var(--features-grid-plan-coverage-type-is-selected-grid-plan-coverage-fix-border-top-color);
}

.grid-plan-coverage-type-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grid-plan-coverage-type-name {
    color: var(--color-text-strong);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
}

.grid-plan-coverage-stream {
    color: var(--grid-plan-coverage-stream-text);
    font-size: 9px;
    line-height: 1.25;
}

.grid-plan-coverage-type-values {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(50px, 1fr) minmax(58px, 1fr) var(--grid-plan-coverage-group-result-width);
    align-items: center;
    gap: 6px;
}

.grid-plan-coverage-type-values > span:not(.grid-plan-coverage-delta) {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.grid-plan-coverage-type-values small {
    color: var(--color-text-secondary);
    font-size: 8px;
    line-height: 1;
}

.grid-plan-coverage-type-values strong {
    color: var(--color-text-strong);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.grid-plan-coverage-delta {
    width: var(--grid-plan-coverage-group-result-width);
    min-height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--feedback-compact-success-surface);
    color: var(--feedback-compact-success-text);
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.grid-plan-coverage-delta.is-shortage {
    background: var(--feedback-compact-warning-surface);
    color: var(--feedback-compact-warning-text);
}

.grid-plan-coverage-delta.is-overage,
.grid-plan-coverage-delta.is-unplanned,
.grid-plan-coverage-delta.is-error {
    background: var(--feedback-compact-error-surface);
    color: var(--feedback-compact-error-text);
}

.grid-plan-coverage-type.is-selected .grid-plan-coverage-delta.is-overage,
.grid-plan-coverage-type.is-selected .grid-plan-coverage-delta.is-unplanned,
.grid-plan-coverage-type.is-selected .grid-plan-coverage-delta.is-error {
    background: var(--grid-entry-drop-risk-state-surface);
    color: var(--grid-plan-coverage-type-is-selected-grid-plan-coverage-delta-text);
}

.grid-plan-coverage-result-correction {
    margin-top: 6px;
    color: var(--color-text-secondary);
    font-size: 9px;
    line-height: 1.35;
}

.grid-plan-coverage-result-correction strong {
    color: var(--color-text-strong);
    font-weight: 600;
}

.grid-plan-coverage-fix {
    grid-column: 1 / -1;
    padding-top: 5px;
    border-top: 1px solid var(--color-divider-border);
    color: var(--color-text-secondary);
    font-size: 9px;
    line-height: 1.35;
}

.constraints-workspace {
    --grid-left-width: 45px;
    --grid-group-width: 176px;
}

.constraints-context-row {
    gap: 8px;
}

.constraints-context-left {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 12px;
}

.constraints-context-left .grid-breadcrumb {
    flex: 0 1 auto;
}

.constraints-mode-tabs {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 2px;
    height: 28px;
    padding: 2px;
    border: var(--constraints-mode-tabs-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.constraints-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 6px;
    color: var(--constraints-mode-tab-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.constraints-mode-tab:hover,
.constraints-mode-tab:focus-visible {
    background: var(--constraints-mode-tab-hover-surface);
    color: var(--constraints-mode-tab-hover-text);
    outline: none;
}

.constraints-mode-tab.is-active {
    background: var(--constraints-mode-tab-is-active-surface);
    color: var(--constraints-mode-tab-hover-text);
    font-weight: 500;
}

.account-tabs {
    margin-bottom: 18px;
}

.account-panel {
    max-width: 980px;
}

.account-panel .directory-import-workspace {
    grid-template-columns: minmax(0, 1fr);
}

.account-panel .directory-import-input {
    display: block;
}

.account-panel .directory-import-input > p {
    margin: 0 0 16px;
}

.account-panel .form-grid input,
.account-panel .form-grid select,
.account-panel .form-grid textarea {
    width: 100%;
    border: 1px solid var(--color-control-border);
    background-color: var(--color-control-bg);
}

.account-panel .form-grid input:disabled,
.account-panel .form-grid select:disabled,
.account-panel .form-grid textarea:disabled {
    border-color: var(--color-control-disabled-border);
    background-color: var(--color-control-disabled-bg);
    color: var(--color-control-disabled-text);
}

.account-mfa-panel {
    margin-top: 18px;
}

.account-mfa-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--color-tab-text);
    font-size: 13px;
}

.account-mfa-setup {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    margin-bottom: 18px;
    padding: 16px;
    border: var(--account-mfa-setup-border);
    border-radius: 10px;
    background: var(--color-surface-soft);
}

.account-mfa-setup-side {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.mfa-qr-code {
    width: 220px;
    min-height: 220px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: var(--mfa-qr-code-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--mfa-qr-code-text);
    text-align: center;
}

.mfa-qr-code svg {
    display: block;
    width: 100%;
    height: auto;
}

.mfa-qr-fallback {
    max-width: 170px;
    font-size: 12px;
    line-height: 1.45;
}

.account-mfa-manual {
    min-width: 0;
    display: grid;
    gap: 8px;
    color: var(--color-tab-text);
    font-size: 13px;
}

.account-mfa-manual code {
    padding: 12px 14px;
    border: var(--account-mfa-manual-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-action-secondary-text);
    font-size: 14px;
    overflow-wrap: anywhere;
    user-select: all;
}

.account-mfa-form {
    max-width: 620px;
}

.trusted-device-choice {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 10px;
    background: var(--color-surface-subtle);
    color: var(--color-action-secondary-text);
    cursor: pointer;
}

.trusted-device-choice > input[type="checkbox"],
.account-panel .form-grid .trusted-device-choice > input[type="checkbox"] {
    appearance: auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    padding: 0;
    flex: 0 0 18px;
    accent-color: var(--trusted-device-choice-accent);
}

.trusted-device-choice > span {
    min-width: 0;
    display: grid;
    gap: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.trusted-device-choice small {
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 400;
}

.trusted-device-choice:focus-within {
    border-color: var(--trusted-device-choice-focus-border);
}

.account-trusted-device-choice {
    max-width: 620px;
}

.account-mfa-action > form {
    padding: 0 15px 15px;
}

.account-trusted-count {
    display: inline-flex;
    min-width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--color-filter-active-surface);
    color: var(--study-plan-mapping-text);
    font-size: 12px;
    font-weight: 500;
}

.account-trusted-devices-body {
    padding: 0 16px 16px;
}

.account-trusted-devices-help,
.account-trusted-devices-empty {
    max-width: 70ch;
    margin: 0;
    color: var(--color-tab-text);
    font-size: 13px;
    line-height: 1.5;
}

.account-trusted-devices-table-wrap {
    margin-top: 12px;
}

.account-trusted-devices-table {
    min-width: 720px;
}

.account-trusted-devices-table th:first-child,
.account-trusted-devices-table td:first-child {
    width: 42%;
}

.account-trusted-browser-name {
    display: block;
    max-width: 48ch;
    overflow-wrap: anywhere;
}

.account-trusted-current {
    display: inline-flex;
    margin-top: 4px;
    color: var(--study-plan-mapping-text);
    font-size: 12px;
    font-weight: 500;
}

.account-trusted-devices-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.account-mfa-danger > summary,
.account-mfa-danger .btn {
    color: var(--account-mfa-danger-text);
}

.account-mfa-recovery-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.account-mfa-recovery-head > div {
    min-width: 0;
}

.account-mfa-recovery-head p {
    max-width: 65ch;
    margin: 8px 0 0;
}

.account-mfa-recovery-download {
    flex: 0 0 auto;
    min-height: 40px;
}

.account-mfa-code-list {
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    list-style: none;
}

.account-mfa-code-list code {
    margin: 0;
}

.account-session-actions {
    justify-content: flex-end;
    margin-bottom: 12px;
}

.account-email-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
}

@media (max-width: 680px) {
    .account-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        height: auto;
    }

    .account-tabs .constraints-mode-tab {
        min-height: 34px;
    }

    .account-panel .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-mfa-state {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-mfa-setup {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .account-mfa-manual {
        width: 100%;
    }

    .account-mfa-setup-side {
        width: 100%;
    }

    .account-mfa-recovery-head {
        flex-direction: column;
    }

    .account-mfa-recovery-download {
        width: 100%;
    }

    .account-mfa-code-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

.constraints-header-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.constraints-filter-combobox {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
}

.constraints-period-filter {
    width: 190px;
}

.constraints-department-filter {
    width: 230px;
}

.constraints-filter-combobox .directory-combobox {
    width: 100%;
    height: 28px;
}

.constraints-header-actions .constraints-filter-search {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    padding: 4px 26px 4px 10px;
    border-radius: 6px;
    background-position: right 9px center;
    background-size: 12px 12px;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.constraints-header-actions .constraints-filter-search:focus {
    box-shadow: var(--features-constraints-header-actions-constraints-filter-search-focus-shadow);
}

.constraints-filter-combobox .directory-combobox-results {
    right: 0;
    left: auto;
    z-index: 80;
    width: max-content;
    min-width: 100%;
    max-width: min(520px, calc(100vw - var(--current-sidebar-width, 72px) - 32px));
}

.constraints-filter-result {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.constraints-filter-result-main,
.constraints-filter-result-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.constraints-filter-result-main {
    font-weight: 400;
}

.constraints-filter-result-meta {
    color: var(--color-text-quieter);
    font-size: 10px;
    font-weight: 400;
}

.constraints-header-actions .constraints-fill-btn {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.constraints-grid-message {
    position: absolute;
    z-index: 6;
    top: 8px;
    right: 12px;
    max-width: min(440px, calc(100% - 24px));
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface-elevated);
    box-shadow: var(--shadow);
    font-size: 12px;
}

.constraints-grid-message.has-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.constraints-grid-message-action.btn {
    min-height: 24px;
    padding: 2px 8px;
    white-space: nowrap;
    font-size: 12px;
}

.constraints-fill-scroll {
    padding-top: 14px;
}

.constraints-fill-summary.schedules-drawer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.constraints-fill-summary.schedules-drawer-summary article {
    min-width: 0;
    min-height: 70px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    background: var(--color-surface-soft);
}

.constraints-fill-summary.schedules-drawer-summary strong {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
}

.constraints-fill-summary.schedules-drawer-summary span {
    color: var(--color-text-secondary);
    font-size: 11px;
    line-height: 1.25;
}

.constraints-fill-stat-to_create {
    border-color: var(--color-success-border);
    background: var(--color-success-surface);
}

.constraints-fill-skipped {
    display: grid;
    gap: 10px;
}

.constraints-fill-section-head h3,
.constraints-fill-section-head p {
    margin: 0;
}

.constraints-fill-section-head h3 {
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
}

.constraints-fill-section-head p,
.constraints-fill-target-note,
.constraints-fill-portable-note {
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.constraints-fill-section-head p {
    margin-top: 3px;
}

.constraints-fill-skipped-list {
    display: grid;
    gap: 8px;
}

.constraints-fill-teacher {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.constraints-fill-teacher summary {
    min-height: 38px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: var(--color-text-strong);
    font-size: 12px;
    font-weight: 500;
    list-style: none;
}

.constraints-fill-teacher summary::-webkit-details-marker {
    display: none;
}

.constraints-fill-teacher summary:focus-visible {
    outline: 2px solid var(--focus-outline-color);
    outline-offset: -2px;
}

.constraints-fill-teacher summary span {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-soft);
    color: var(--color-text-secondary);
    font-size: 11px;
}

.constraints-fill-teacher ul {
    margin: 0;
    padding: 0 12px 10px;
    display: grid;
    gap: 6px;
    list-style: none;
}

.constraints-fill-teacher li {
    min-width: 0;
    padding-top: 7px;
    border-top: 1px solid var(--color-divider-border);
    display: grid;
    grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
    gap: 10px;
    color: var(--color-text-secondary);
    font-size: 11px;
}

.constraints-fill-teacher li strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--color-text-strong);
    font-weight: 500;
}

.constraints-fill-target-note,
.constraints-fill-portable-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--color-surface-soft);
}

.constraints-fill-empty,
.constraints-fill-loading {
    min-height: 120px;
}

.constraints-grid-panel {
    min-height: 0;
}

.constraints-grid .grid-sheet-table {
    min-width: max-content;
}

.constraints-teacher-head .grid-group-name {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    font-weight: 600;
}

.constraints-teacher-head .grid-group-name span {
    flex: 1 1 auto;
    min-width: 0;
}

.constraints-teacher-calendar-link {
    flex: 0 0 auto;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: var(--constraints-teacher-calendar-link-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--study-plan-mapping-text);
    cursor: pointer;
}

.constraints-teacher-calendar-link svg {
    width: 16px;
    height: 16px;
}

.constraints-teacher-calendar-link:hover,
.constraints-teacher-calendar-link:focus-visible {
    border-color: var(--constraints-teacher-calendar-link-hover-border);
    background: var(--lesson-card-surface);
    outline: none;
}

.constraints-cell {
    height: 48px;
}

.constraints-empty-slot {
    min-height: 14px;
}

.constraints-grid .grid-empty-row .grid-time-inner {
    min-height: 18px;
}

.constraints-grid .grid-empty-row .constraints-cell {
    height: 18px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.constraints-overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    pointer-events: none;
}

.constraint-card {
    min-height: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 3px 6px 3px 7px;
    overflow: hidden;
}

.constraint-overlay-card {
    position: absolute;
    box-sizing: border-box;
    pointer-events: auto;
    align-items: flex-start;
    padding-top: 6px;
    padding-bottom: 6px;
}

.constraint-card.is-primary-segment {
    min-height: 24px;
}

.constraint-card-time {
    min-width: 0;
    overflow: hidden;
    color: var(--color-action-secondary-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.constraint-card-unavailable {
    border-color: var(--constraint-card-unavailable-border);
    border-left-color: var(--constraint-card-unavailable-border-variant-2);
    background: var(--constraint-card-unavailable-surface);
}

.constraint-card-not_preferred {
    border-color: var(--constraint-card-not-preferred-border);
    border-left-color: var(--calendar-risk-warning-border);
    background: var(--calendar-warning-surface);
}

.constraint-rule-chip {
    width: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
}

.constraint-card-unavailable .constraint-rule-chip {
    border-color: var(--features-constraint-card-unavailable-constraint-rule-chip-border-color);
    color: var(--constraint-card-unavailable-constraint-rule-chip-text);
}

.constraint-card-not_preferred .constraint-rule-chip {
    border-color: var(--features-constraint-card-not-preferred-constraint-rule-chip-border-color);
    color: var(--constraint-card-not-preferred-constraint-rule-chip-text);
}

.constraint-type-chip {
    font-weight: 500;
}

.constraint-type-chip.is-blocked {
    background: var(--grid-entry-drop-risk-state-surface);
    color: var(--constraint-type-chip-is-blocked-text);
}

.constraint-type-chip.is-warning {
    background: var(--grid-entry-drop-warning-state-surface);
    color: var(--constraint-type-chip-is-warning-text);
}

.constraint-editor-panel .constraint-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.constraint-editor-panel .constraint-rule-field,
.constraint-editor-panel .constraint-date-preview-box {
    grid-column: 1 / -1;
}

.constraint-editor-panel .slot-rule-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.constraint-editor-panel .slot-rule-tabs button {
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 11px;
}

.constraint-date-range-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.constraint-all-day-btn {
    width: max-content;
    min-height: 30px;
    align-self: end;
    padding: 5px 12px;
    border: 1px solid var(--color-editor-control-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--constraint-all-day-btn-text);
    font-size: 12px;
    font-weight: 400;
}

.constraint-all-day-btn.is-active {
    border-color: var(--constraint-all-day-btn-is-active-border);
    background: var(--constraint-all-day-btn-is-active-surface);
    color: var(--constraint-all-day-btn-is-active-text);
}

.constraint-editor-panel .constraint-reason-field {
    grid-column: 1 / -1;
}

.constraint-editor-panel textarea {
    min-height: 84px;
    resize: vertical;
}

.teacher-calendar-panel.slot-editor-panel {
    --drawer-width: 760px;
}

.teacher-calendar-scroll.slot-editor-scroll-area {
    gap: 10px;
}

.teacher-calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--calendar-text);
    font-size: 12px;
}

.teacher-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.teacher-calendar-legend i {
    width: 10px;
    height: 10px;
    border: 1px solid var(--calendar-day-state-border, transparent);
    border-radius: 3px;
}

.teacher-calendar-legend .is-hard {
    border-color: var(--calendar-holiday-border);
    background: var(--calendar-holiday-surface);
    color: var(--calendar-holiday-text);
}

.teacher-calendar-day.is-hard {
    border-color: var(--calendar-holiday-border);
    color: var(--calendar-holiday-text);
}

.teacher-calendar-legend .is-soft {
    border-color: var(--calendar-weekend-border);
    background: var(--calendar-weekend-surface);
    color: var(--calendar-weekend-text);
}

.teacher-calendar-day.is-soft {
    border-color: var(--calendar-weekend-border);
    color: var(--calendar-weekend-text);
}

.teacher-calendar-day.production-calendar-day.is-system-calendar-day {
    border-color: var(--calendar-day-state-border, var(--calendar-system-border));
    background: var(--calendar-day-state-surface, var(--calendar-system-surface));
    color: var(--calendar-day-state-text, var(--calendar-system-text));
}

.teacher-calendar-day.production-calendar-day.is-system-calendar-day:hover,
.teacher-calendar-day.production-calendar-day.is-system-calendar-day:focus-visible {
    border-color: var(--calendar-day-state-border, var(--calendar-system-border));
    background: var(--calendar-day-state-hover-surface, var(--calendar-system-hover-surface));
}

.teacher-calendar-grid {
    display: grid;
    gap: 12px;
}

.teacher-calendar-months.production-calendar-months {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.teacher-calendar-day.production-calendar-day {
    height: 28px;
    overflow: hidden;
}

.teacher-calendar-day.is-outside {
    opacity: 0.35;
    pointer-events: none;
}

.teacher-calendar-day-fill {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 0;
    pointer-events: none;
}

.teacher-calendar-day-fill.is-hard {
    background: var(--calendar-hard-fill);
}

.teacher-calendar-day-fill.is-soft {
    background: var(--calendar-soft-fill);
}

.teacher-calendar-legend .is-lesson-load {
    border-color: var(--calendar-heat-border-low);
    background: var(--calendar-heat-surface-low);
}

.department-teacher-calendar-day-fill.is-lesson {
    background: var(--calendar-lesson-fill-1);
}

.department-teacher-calendar-day-fill.is-lesson[data-lesson-load="2"] {
    background: var(--calendar-lesson-fill-2);
}

.department-teacher-calendar-day-fill.is-lesson[data-lesson-load="3"] {
    background: var(--calendar-lesson-fill-3);
}

.department-teacher-calendar-day-fill.is-lesson[data-lesson-load="4"] {
    background: var(--calendar-lesson-fill-4);
}

.department-teacher-calendar-day.has-lessons:not(.is-hard):not(.is-soft) {
    border-color: var(--calendar-heat-border-low);
}

.teacher-calendar-day > span,
.teacher-calendar-day > small {
    position: relative;
    z-index: 1;
}

.teacher-calendar-day.has-event small {
    color: inherit;
}

.grid-calendar-panel.slot-editor-panel {
    --drawer-width: 760px;
}

.grid-calendar-scroll.slot-editor-scroll-area {
    gap: 10px;
}

.grid-calendar-controls {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.grid-calendar-filter {
    display: grid;
    gap: 4px;
    min-width: 190px;
    margin: 0;
    color: var(--calendar-text);
    font-size: 12px;
    font-weight: 500;
}

.grid-calendar-filter select {
    height: 34px;
    border: 1px solid var(--calendar-border);
    border-radius: 8px;
    background-color: var(--calendar-surface);
    color: var(--calendar-text-strong);
    font-size: 13px;
}

.grid-calendar-filter.is-hidden {
    display: none;
}

.grid-calendar-legend .is-heat-low {
    border-color: var(--grid-calendar-legend-is-heat-low-border);
    background: var(--calendar-heat-surface-low);
}

.grid-calendar-legend .is-heat-high {
    border-color: var(--calendar-heat-border-high);
    background: var(--calendar-heat-surface-high);
}

.grid-calendar-legend .is-published {
    border-color: var(--calendar-risk-ok-border);
    background: var(--grid-calendar-legend-is-published-surface);
}

.grid-calendar-months.production-calendar-months {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.grid-calendar-day.production-calendar-day {
    position: relative;
    height: 28px;
    overflow: visible;
}

.grid-calendar-day[data-grid-calendar-heat-level] {
    --grid-calendar-heat-weight: 0%;
    border-color: color-mix(in srgb, var(--calendar-heat-border-low), var(--calendar-heat-border-high) var(--grid-calendar-heat-weight));
    background: color-mix(in srgb, var(--calendar-heat-surface-low), var(--calendar-heat-surface-high) var(--grid-calendar-heat-weight));
    color: var(--calendar-heat-text-low);
}

.grid-calendar-day[data-grid-calendar-heat-level="2"] {
    --grid-calendar-heat-weight: 33%;
}

.grid-calendar-day[data-grid-calendar-heat-level="3"] {
    --grid-calendar-heat-weight: 66%;
}

.grid-calendar-day[data-grid-calendar-heat-level="4"] {
    --grid-calendar-heat-weight: 100%;
    color: var(--calendar-heat-text-high);
}

.production-calendar-day.is-published {
    border-color: var(--calendar-published-border);
    background: var(--calendar-published-surface);
    color: var(--calendar-published-text);
}

.production-calendar-day.is-published[data-grid-calendar-heat-level="1"] {
    background: var(--calendar-published-surface-1);
}

.production-calendar-day.is-published[data-grid-calendar-heat-level="2"] {
    border-color: var(--calendar-published-border-2);
    background: var(--calendar-published-surface-2);
}

.production-calendar-day.is-published[data-grid-calendar-heat-level="3"] {
    border-color: var(--calendar-published-border-3);
    background: var(--calendar-published-surface-3);
}

.production-calendar-day.is-published[data-grid-calendar-heat-level="4"] {
    border-color: var(--calendar-published-border-4);
    background: var(--calendar-published-surface-4);
    color: var(--calendar-published-text-strong);
}

.grid-calendar-day.production-calendar-day.is-system-calendar-day {
    box-shadow: none;
}

.grid-calendar-day.production-calendar-day.is-system-calendar-day:hover,
.grid-calendar-day.production-calendar-day.is-system-calendar-day:focus-visible {
    box-shadow: none;
}

.grid-calendar-day.production-calendar-day.is-system-calendar-day.calendar-day-state:not(.is-published) {
    border-color: var(--calendar-day-state-border);
    background: var(--calendar-day-state-surface);
    color: var(--calendar-day-state-text);
}

.grid-calendar-day.production-calendar-day.is-published.is-system-calendar-day.is-weekend,
.grid-calendar-day.production-calendar-day.is-published.is-system-calendar-day.is-holiday,
.grid-calendar-day.production-calendar-day.is-published.is-system-calendar-day.is-non-study {
    border-color: var(--calendar-day-state-border);
    background: var(--calendar-published-surface);
    color: var(--calendar-published-text);
}

.grid-calendar-day.is-active-week,
.teacher-calendar-day.is-active-week {
    outline: 2px solid var(--color-action-primary-border);
    outline-offset: -2px;
}

.grid-calendar-day > span,
.grid-calendar-day > small {
    position: relative;
    z-index: 1;
}

.grid-calendar-day small {
    color: inherit;
    font-size: 10px;
}

.grid-calendar-problem-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 13px;
    height: 13px;
    padding: 0 3px;
    border: 1px solid var(--surface);
    border-radius: 999px;
    background: var(--problem-color);
    color: var(--progress-fill-on-accent);
    font-size: 8px;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}

.grid-calendar-analytics {
    display: grid;
    gap: 10px;
    padding-top: 2px;
}

.grid-calendar-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.grid-calendar-summary span {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--calendar-border);
    border-radius: 8px;
    background: var(--calendar-surface-subtle);
}

.grid-calendar-summary strong {
    display: block;
    color: var(--calendar-text-strong);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.1;
}

.grid-calendar-summary small {
    display: block;
    margin-top: 3px;
    color: var(--calendar-text);
    font-size: 11px;
    line-height: 1.2;
}

.grid-calendar-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 10px;
}

.grid-calendar-analytics-card {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--calendar-border);
    border-radius: 8px;
    background: var(--calendar-surface);
}

.grid-calendar-analytics-card h3 {
    margin: 0 0 8px;
    color: var(--calendar-text-strong);
    font-size: 13px;
    font-weight: 600;
}

.grid-calendar-week-load {
    display: grid;
    gap: 5px;
}

.grid-calendar-week-load-row {
    display: grid;
    grid-template-columns: minmax(108px, 1fr) minmax(120px, 1.4fr) 34px;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--calendar-text);
    font-size: 12px;
    text-align: left;
}

.grid-calendar-week-load-row:hover {
    background: var(--calendar-hover-surface);
}

.grid-calendar-week-load-row i {
    position: relative;
    height: 5px;
}

.grid-calendar-week-load-row i::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--week-load, 0%);
    border-radius: inherit;
    background: var(--component-progress-fill, var(--progress-fill));
}

.grid-calendar-week-load-row strong {
    color: var(--calendar-text-strong);
    font-weight: 600;
    text-align: right;
}

.grid-calendar-risk-list {
    display: grid;
    gap: 6px;
}

.grid-calendar-risk {
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--calendar-border);
    border-left-width: 3px;
    border-radius: 8px;
    background: var(--calendar-surface-subtle);
}

.grid-calendar-risk strong {
    color: var(--calendar-text-strong);
    font-size: 12px;
    font-weight: 600;
}

.grid-calendar-risk span {
    color: var(--calendar-text);
    font-size: 11px;
    line-height: 1.25;
}

.grid-calendar-risk.is-warning {
    border-left-color: var(--calendar-risk-warning-border);
    background: var(--calendar-warning-surface);
}

.grid-calendar-risk.is-info {
    border-left-color: var(--calendar-risk-info-border);
}

.grid-calendar-risk.is-ok {
    border-left-color: var(--calendar-risk-ok-border);
    background: var(--calendar-ok-surface);
}

.grid-calendar-risk.is-muted {
    border-left-color: var(--calendar-risk-muted-border);
}

.constraint-date-field.is-hidden {
    display: none;
}

@media (max-width: 900px) {
    .constraints-context-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .constraints-context-left {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .constraints-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .constraints-period-filter,
    .constraints-department-filter {
        width: min(100%, 320px);
    }

    .constraints-fill-summary.schedules-drawer-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .constraints-fill-teacher li {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }

}

.icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--icon-btn-surface);
    color: var(--icon-btn-text);
    border: var(--icon-btn-border);
    cursor: pointer;
    font-size: 19px;
}

.slot-editor-close.icon-btn {
    appearance: none;
    box-sizing: border-box;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: var(--color-text-strong);
    font-size: 18px;
    line-height: 1;
    filter: none;
}

.slot-editor-close.icon-btn:hover,
.slot-editor-close.icon-btn:focus-visible {
    background: var(--color-surface-hover);
    filter: none;
}

.slot-editor-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slot-editor-lock-icon,
.slot-editor-renew {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--slot-editor-lock-icon-text);
    font-size: 13px;
    font-weight: 600;
}

.slot-editor-lock-icon {
    width: 20px;
    height: 20px;
    justify-content: center;
    border-radius: 6px;
    color: var(--slot-editor-lock-icon-text-variant-2);
    background: var(--slot-editor-lock-icon-surface);
    font-size: 12px;
}

.slot-entry-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
    padding-right: 2px;
    min-height: 0;
}

.slot-entry-card {
    border: 1px solid var(--slot-border);
    border-left: 0;
    border-radius: 16px;
    padding: 18px;
    background: var(--color-surface);
}

.slot-entry-card.lesson-lecture {
    border-left-color: var(--lesson-lecture-accent);
}

.slot-entry-card.lesson-practice {
    border-left-color: var(--lesson-practice-accent);
}

.slot-entry-card.lesson-lab {
    border-left-color: var(--slot-entry-card-lesson-lab-border);
}

.slot-entry-card.lesson-credit {
    border-left-color: var(--slot-entry-card-lesson-lab-border);
}

.slot-entry-card.lesson-exam {
    border-left-color: var(--slot-entry-card-lesson-exam-border);
}

.slot-entry-card.lesson-consultation {
    border-left-color: var(--lesson-consultation-accent);
}

.slot-entry-card.lesson-other {
    border-left-color: var(--lesson-other-accent);
}

.slot-entry-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.entry-label {
    display: block;
    color: var(--color-text-strong);
    font-size: 16px;
    line-height: 1.2;
}

.entry-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--entry-subtitle-text);
    font-size: 12px;
}

.slot-entry-delete {
    width: auto;
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: var(--slot-entry-delete-border);
    border-radius: 10px;
    background: var(--slot-entry-delete-surface);
    color: var(--slot-entry-delete-text);
    font-size: 13px;
    font-weight: 600;
}

.slot-entry-delete:hover {
    border-color: var(--conflict-border);
    background: var(--conflict-surface);
}

.form-field-error {
    color: var(--error);
    font-size: 12px;
    font-weight: 500;
}

.password-policy-feedback {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.password-policy-feedback[data-state="invalid"] {
    color: var(--error);
}

.password-policy-feedback[data-state="valid"] {
    color: var(--color-success-text);
}

.admin-organization-new-link {
    margin-left: auto;
}

.impersonation-banner {
    align-items: center;
    background: var(--impersonation-banner-surface);
    border-bottom: var(--impersonation-banner-border);
    box-sizing: border-box;
    color: var(--impersonation-banner-text);
    display: flex;
    flex: 0 0 auto;
    font-size: 12px;
    gap: 10px;
    justify-content: space-between;
    line-height: 20px;
    margin: -18px -22px 14px;
    min-height: 32px;
    overflow: visible;
    padding: 4px 22px;
    white-space: nowrap;
}

body.has-grid-workspace .impersonation-banner {
    padding-right: 27px;
}

.impersonation-banner strong,
.impersonation-banner span {
    display: inline;
}

.impersonation-banner strong {
    color: var(--impersonation-banner-text-variant-2);
    margin-right: 6px;
}

.impersonation-banner form {
    margin: 0;
}

.impersonation-banner .btn {
    box-sizing: border-box;
    height: 20px;
    min-height: 20px;
    padding: 3px 7px;
    border: var(--impersonation-banner-btn-border);
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--impersonation-banner-btn-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.commercial-read-only-banner {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
    margin: -18px -22px 14px;
    padding: 10px 22px;
    border-bottom: var(--commercial-read-only-banner-border);
    background: var(--commercial-read-only-banner-surface);
    color: var(--commercial-read-only-banner-text);
}

.commercial-read-only-banner > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.commercial-read-only-banner strong {
    color: var(--commercial-read-only-banner-text-variant-2);
    font-size: 13px;
    font-weight: 600;
}

.commercial-read-only-banner span:not(.status-chip) {
    font-size: 12px;
    line-height: 1.4;
}

.commercial-trial-banner {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
    margin: -18px -22px 14px;
    padding: 7px 22px;
    border-bottom: var(--commercial-trial-banner-border);
    background: var(--commercial-trial-banner-surface);
    color: var(--commercial-trial-banner-text);
    font-size: 12px;
    line-height: 1.35;
}

.commercial-trial-banner strong {
    color: var(--commercial-trial-banner-text-variant-2);
    font-weight: 600;
}

.field-hint {
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.slot-editor-actions,
.modal-actions,
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.slot-editor-actions,
.modal-actions {
    justify-content: flex-end;
}

.slot-editor-actions {
    position: sticky;
    bottom: 0;
    margin: auto -26px 0;
    padding: 18px 26px 22px;
    background: var(--features-slot-editor-actions-surface);
    backdrop-filter: blur(8px);
    flex: 0 0 auto;
    justify-content: flex-end;
}

.slot-editor-actions-right {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

[data-commercial-proposal-university-save-message] {
    margin: 0;
}

.slot-content-panel {
    border: 1px solid var(--slot-border);
    border-radius: 16px;
    background: var(--color-surface);
    padding: 14px;
}

.slot-content-head,
.slot-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.slot-section-title {
    justify-content: flex-start;
    color: var(--slot-section-title-text);
    font-size: 15px;
    font-weight: 600;
}

.slot-section-title b {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 8px;
    background: var(--slot-section-title-surface);
    color: var(--slot-section-title-text-variant-2);
    font-size: 12px;
}

.slot-add-inline {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: var(--slot-add-inline-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--slot-blue);
    font-size: 13px;
    font-weight: 600;
}

.slot-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.slot-summary-card {
    display: grid;
    grid-template-columns: 34px 132px minmax(0, 1fr) minmax(190px, 0.8fr) 28px;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 10px 12px;
    border: var(--slot-summary-card-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--slot-summary-card-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.slot-summary-card.is-active {
    border-color: var(--slot-summary-card-is-active-border);
    box-shadow: var(--slot-summary-card-is-active-shadow);
    background: var(--slot-summary-card-is-active-surface);
}

.slot-summary-index {
    color: var(--slot-summary-index-text);
    font-size: 13px;
    text-align: center;
}

.slot-summary-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--slot-summary-type-text);
    font-size: 13px;
    font-weight: 600;
}

.slot-summary-type::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--slot-summary-type-before-surface);
}

.slot-summary-title {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--slot-summary-title-text);
    font-size: 16px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-summary-sub,
.slot-summary-extra {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--slot-summary-sub-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-summary-extra {
    color: var(--slot-summary-extra-text);
}

.slot-summary-more {
    width: 28px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--slot-summary-more-text);
    font-size: 18px;
}

.slot-content-note,
.assignment-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 12px;
    border: var(--slot-content-note-border);
    border-radius: 10px;
    background: var(--color-data-table-tree-surface);
    color: var(--slot-content-note-text);
    font-size: 13px;
}

.slot-content-note span,
.assignment-info span {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: var(--slot-content-note-border-variant-2);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.assignment-box {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    margin-top: 20px;
    border: var(--assignment-box-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--color-surface);
}

.assignment-mode-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: var(--assignment-mode-list-surface);
    border-right: var(--assignment-mode-list-border);
}

.assignment-mode-list button {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--assignment-mode-list-text);
    font-size: 13px;
    text-align: left;
}

.assignment-mode-list button::before {
    content: "";
    width: 15px;
    height: 15px;
    border: var(--assignment-mode-list-before-border);
    border-radius: 50%;
    background: var(--color-surface);
}

.assignment-mode-list button.is-active {
    color: var(--assignment-mode-list-is-active-text);
    font-weight: 600;
}

.assignment-mode-list button.is-active::before {
    border-color: var(--assignment-mode-list-is-active-before-border);
    box-shadow: var(--assignment-mode-list-is-active-before-shadow);
    background: var(--assignment-mode-list-is-active-before-surface);
}

.assignment-target-panel {
    padding: 14px;
}

.assignment-target-head,
.assignment-target-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.assignment-target-head strong {
    color: var(--assignment-target-head-text);
    font-size: 14px;
}

.assignment-target-head button {
    border: 0;
    background: transparent;
    color: var(--assignment-target-head-text-variant-2);
    font-size: 12px;
    font-weight: 600;
}

.assignment-search {
    height: 38px;
    display: flex;
    align-items: center;
    margin: 12px 0 8px;
    padding: 0 12px;
    border: var(--assignment-search-border);
    border-radius: 10px;
    color: var(--assignment-search-text);
    font-size: 13px;
}

.assignment-target-footer {
    padding-top: 9px;
    color: var(--assignment-target-footer-text);
    font-size: 13px;
}

.assignment-external-targets {
    margin-top: 10px;
    padding-top: 10px;
    border-top: var(--assignment-external-targets-border);
}

.assignment-external-targets.is-hidden {
    display: none;
}

.grid-group-targets label.is-external-target {
    border-left: 3px solid var(--calendar-non-study-border);
    background: var(--calendar-non-study-surface);
    color: var(--grid-group-targets-is-external-target-text);
}

.grid-group-targets .grid-group-target-item.is-external-target {
    border-left: 3px solid var(--calendar-non-study-border);
    background: var(--calendar-non-study-surface);
    color: var(--grid-group-targets-is-external-target-text);
}

.grid-group-targets label.is-joint-candidate {
    border-color: var(--grid-group-targets-is-joint-candidate-border);
    background: var(--calendar-warning-surface);
    color: var(--color-warning-contrast-text);
}

.grid-group-targets .grid-group-target-item.is-joint-candidate {
    border-color: var(--grid-group-targets-is-joint-candidate-border);
    background: var(--calendar-warning-surface);
    color: var(--color-warning-contrast-text);
}

.grid-group-targets label.is-external-target.is-joint-candidate {
    border-left-color: var(--calendar-risk-warning-border);
    background: var(--grid-group-targets-is-external-target-is-joint-candidate-surface);
    color: var(--color-warning-contrast-text);
}

.grid-group-targets .grid-group-target-item.is-external-target.is-joint-candidate {
    border-left-color: var(--calendar-risk-warning-border);
    background: var(--grid-group-targets-is-external-target-is-joint-candidate-surface);
    color: var(--color-warning-contrast-text);
}

.grid-group-target-remove {
    flex: 0 0 auto;
    min-width: 58px;
    height: 28px;
    padding: 0 9px;
    border: 1px solid var(--color-popover-border);
    border-radius: 7px;
    background: var(--color-surface);
    color: var(--grid-group-target-remove-text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.grid-group-target-remove:hover,
.grid-group-target-remove:focus-visible {
    border-color: var(--grid-group-target-remove-hover-border);
    background: var(--color-data-table-tree-surface);
    color: var(--grid-group-target-remove-hover-text);
    outline: none;
}

.grid-group-target-hint {
    color: var(--grid-group-target-hint-text);
    font-weight: 600;
}

.slot-rule-grid {
    align-items: end;
    margin-top: 20px;
}

.date-preview-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--color-text-meta);
    font-size: 13px;
    font-weight: 600;
}

.date-preview-list {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: var(--date-preview-list-border);
    border-radius: 12px;
    overflow: hidden;
}

.date-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--color-surface-hover-strong);
    color: var(--date-chip-text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Compact slot editor: the grid is the primary workspace, the drawer must stay quiet. */
.grid-slot-editor-panel.slot-editor-panel {
    --drawer-width: 720px;
}

.grid-slot-editor-panel .slot-editor-head {
    align-items: center;
    gap: 10px;
    padding-bottom: 2px;
}

.grid-slot-editor-panel .slot-editor-title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.grid-slot-editor-panel .slot-editor-head h2 {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-slot-editor-panel .icon-btn {
    width: 28px;
    min-width: 28px;
    height: 28px;
    font-size: 16px;
}

.grid-slot-editor-panel .slot-content-panel {
    border-radius: 12px;
    padding: 10px;
}

.grid-slot-editor-panel .slot-add-inline {
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
}

.grid-slot-editor-panel .slot-summary-list {
    gap: 6px;
    margin-top: 10px;
}

.grid-slot-editor-panel .slot-summary-card {
    grid-template-columns: 28px 105px minmax(0, 1fr) minmax(140px, 0.65fr) 20px;
    gap: 8px;
    min-height: 58px;
    padding: 7px 9px;
}

.grid-slot-editor-panel .slot-summary-title {
    font-size: 14px;
}

.grid-slot-editor-panel .slot-summary-sub,
.grid-slot-editor-panel .slot-summary-extra,
.grid-slot-editor-panel .slot-summary-type,
.grid-slot-editor-panel .slot-content-note,
.grid-slot-editor-panel .assignment-info {
    font-size: 12px;
}

.grid-slot-editor-panel .slot-content-note,
.grid-slot-editor-panel .assignment-info {
    padding: 7px 9px;
}

.grid-slot-editor-panel .slot-editor-scroll-area {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
    padding: 0 var(--drawer-scrollbar-gutter) 0 0;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.grid-slot-editor-panel #slot-editor-alerts {
    flex: 0 0 auto;
    gap: 8px;
    max-height: none;
    overflow: visible;
}

.grid-slot-editor-panel #slot-editor-alerts .alert {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 9px 12px;
    border: 1px solid transparent;
    line-height: 1.38;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.grid-slot-editor-panel #slot-editor-alerts .alert.error {
    border-color: var(--grid-editor-problem-border);
}

.grid-slot-editor-panel #slot-editor-alerts .alert.warning {
    border-color: var(--grid-slot-editor-panel-slot-editor-alerts-alert-border);
}

.grid-slot-editor-panel .grid-editor-problems {
    flex: 0 0 auto;
    max-height: min(34vh, 260px);
    overflow: visible;
}

.grid-slot-editor-panel .grid-editor-problems.is-scrollable {
    overflow-x: hidden;
    overflow-y: auto;
}

.grid-slot-editor-panel .grid-editor-problems .slot-state,
.grid-slot-editor-panel .grid-editor-problems .slot-state > span:first-child {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.grid-slot-editor-panel .slot-entry-card.is-xlsx-draft-editor {
    border-style: dashed;
    background: var(--lesson-card-surface);
}

.grid-slot-editor-panel .entry-label {
    font-size: 14px;
}

.grid-slot-editor-panel .slot-entry-delete {
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--grid-slot-editor-panel-slot-entry-delete-text);
    font-size: 12px;
}

.grid-slot-editor-panel .slot-entry-body > .form-grid:not(.slot-rule-grid) {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.5fr) minmax(130px, 0.42fr);
}

.grid-slot-editor-panel .slot-field-subject {
    grid-column: 1 / -1;
}

.grid-slot-editor-panel .slot-field-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 24px;
}

.grid-slot-editor-panel .slot-field-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.grid-slot-editor-panel .slot-entry-delete-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.55;
    box-shadow: none;
    transition: color 0.14s ease, opacity 0.14s ease;
}

.grid-slot-editor-panel .slot-entry-card:hover .slot-entry-delete-link,
.grid-slot-editor-panel .slot-entry-card:focus-within .slot-entry-delete-link {
    color: var(--color-danger-text);
    opacity: 1;
}

.grid-slot-editor-panel .slot-entry-delete-link:hover,
.grid-slot-editor-panel .slot-entry-delete-link:focus-visible {
    background: transparent;
    color: var(--color-editor-remove-hover-text);
    filter: none;
}

.grid-slot-editor-panel .slot-entry-parts {
    display: grid;
    position: relative;
    grid-column: 1 / -1;
    gap: 4px;
}

.grid-slot-editor-panel .slot-entry-parts.is-single-part-list {
    gap: 0;
}

.grid-slot-editor-panel .slot-entry-parts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 500;
}

.grid-slot-editor-panel .slot-entry-parts-actions {
    display: none;
}

.grid-slot-editor-panel .slot-part-add:disabled {
    cursor: default;
    opacity: 1;
}

.grid-slot-editor-panel .slot-part-remove:disabled {
    cursor: default;
}

.grid-slot-editor-panel .slot-entry-parts-list {
    display: grid;
    gap: 8px;
}

.grid-slot-editor-panel .slot-part-remove:hover,
.grid-slot-editor-panel .slot-part-remove:focus-visible {
    border-color: var(--color-editor-remove-hover-border);
    background: var(--color-editor-remove-hover-surface);
    color: var(--color-editor-remove-hover-text);
}

.grid-slot-editor-panel .slot-part-add:hover,
.grid-slot-editor-panel .slot-part-add:focus-visible {
    border-color: var(--color-editor-add-hover-border);
    background: var(--color-editor-add-hover-surface);
    color: var(--color-editor-add-hover-text);
}

.grid-slot-editor-panel .field-hint {
    font-size: 11px;
}

.grid-activity-panel.grid-slot-editor-panel {
    --drawer-width: 560px;
}

.grid-activity-list.slot-editor-scroll-area {
    gap: 8px;
    padding-right: var(--drawer-scrollbar-gutter);
}

.grid-activity-empty {
    padding: 14px 12px;
    border: 1px dashed var(--empty-state-border);
    border-radius: 8px;
    background: var(--empty-state-surface);
    color: var(--empty-state-text);
    font-size: 13px;
}

.grid-activity-item.grid-activity-lesson-card.lesson-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
        "main actions"
        "changes actions"
        "footer actions";
    flex: 0 0 auto;
    column-gap: 8px;
    row-gap: 4px;
    align-items: center;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 6px 7px 6px 8px;
    padding-right: 8px;
    border: 1px solid var(--lesson-card-border);
    border-left: var(--grid-activity-item-grid-activity-lesson-card-lesson-card-border);
    border-radius: 5px;
    background: var(--lesson-bg, var(--lesson-card-surface));
    color: var(--color-action-secondary-text);
    overflow: visible;
    white-space: normal;
}

.grid-activity-item.grid-activity-lesson-card.lesson-card.is-undoable {
    background: var(--lesson-bg, var(--lesson-card-surface));
}

.grid-activity-item.grid-activity-lesson-card.lesson-card.lesson-lecture {
    --lesson-accent: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-accent);
    --lesson-bg: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-bg);
    --lesson-bg-hover: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-bg-hover);
    border-left-color: var(--lesson-accent);
    background: var(--lesson-bg);
}

.grid-activity-item.grid-activity-lesson-card.lesson-card.lesson-practice {
    --lesson-accent: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-accent);
    --lesson-bg: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-bg);
    --lesson-bg-hover: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-bg-hover);
    border-left-color: var(--lesson-accent);
    background: var(--lesson-bg);
}

.grid-activity-item.grid-activity-lesson-card.lesson-card.lesson-credit,
.grid-activity-item.grid-activity-lesson-card.lesson-card.lesson-lab {
    --lesson-accent: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-accent);
    --lesson-bg: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-bg);
    --lesson-bg-hover: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-bg-hover);
    border-left-color: var(--lesson-accent);
    background: var(--lesson-bg);
}

.grid-activity-item.grid-activity-lesson-card.lesson-card.lesson-exam {
    --lesson-accent: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-accent);
    --lesson-bg: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-bg);
    --lesson-bg-hover: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-bg-hover);
    border-left-color: var(--lesson-accent);
    background: var(--lesson-bg);
}

.grid-activity-item.grid-activity-lesson-card.lesson-card.lesson-consultation {
    --lesson-accent: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-accent);
    --lesson-bg: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-bg);
    --lesson-bg-hover: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-bg-hover);
    border-left-color: var(--lesson-accent);
    background: var(--lesson-bg);
}

.grid-activity-item.grid-activity-lesson-card.lesson-card.lesson-other {
    --lesson-accent: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-accent);
    --lesson-bg: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-bg);
    --lesson-bg-hover: var(--features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-bg-hover);
    border-left-color: var(--lesson-accent);
    background: var(--lesson-bg);
}

.grid-activity-item.grid-activity-lesson-card.lesson-card:hover,
.grid-activity-item.grid-activity-lesson-card.lesson-card:focus-visible {
    border-top-color: var(--grid-activity-item-grid-activity-lesson-card-lesson-card-hover-border);
    border-right-color: var(--grid-activity-item-grid-activity-lesson-card-lesson-card-hover-border);
    border-bottom-color: var(--grid-activity-item-grid-activity-lesson-card-lesson-card-hover-border);
    background: var(--lesson-bg-hover, var(--lesson-bg, var(--lesson-card-surface)));
    outline: none;
    box-shadow: none;
    z-index: auto;
}

.grid-activity-lesson-main {
    grid-area: main;
    display: grid;
    gap: 2px;
    min-width: 0;
}

.grid-activity-lesson-title.lesson-card-title,
.grid-activity-lesson-info.lesson-card-meta {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-activity-lesson-title.lesson-card-title {
    color: var(--grid-activity-lesson-title-lesson-card-title-text);
    font-size: 12px;
    line-height: 1.18;
}

.grid-activity-lesson-info.lesson-card-meta {
    margin-top: 0;
    color: var(--grid-activity-lesson-info-lesson-card-meta-text);
    font-size: 10px;
    line-height: 1.2;
}

.grid-activity-meta,
.grid-activity-status {
    color: var(--grid-activity-meta-text);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-activity-changes {
    grid-area: changes;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding-top: 2px;
    border-top: 1px solid var(--grid-activity-changes-border-color);
}

.grid-activity-change {
    display: -webkit-box;
    max-height: calc(1.24em * 2);
    overflow: hidden;
    color: var(--grid-activity-change-text);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.24;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.grid-activity-card-footer {
    grid-area: footer;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
}

.grid-activity-meta {
    flex: 1 1 auto;
}

.grid-activity-status {
    flex: 0 0 auto;
}

.grid-activity-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: max-content;
}

.grid-activity-actions:empty {
    display: none;
}

.grid-activity-undo-btn.btn {
    min-height: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1;
}

.lesson-card.is-activity-highlight {
    outline: var(--features-lesson-card-is-activity-highlight-outline);
    outline-offset: 2px;
    box-shadow: var(--features-lesson-card-is-activity-highlight-shadow);
}

.grid-slot-editor-panel .assignment-search {
    height: 32px;
    margin: 8px 0 6px;
    border-radius: 8px;
    font-size: 12px;
}

.grid-slot-editor-panel .slot-editor-actions {
    margin: 0 0 0 calc(-1 * var(--drawer-padding-left));
    padding: 8px 18px 10px;
}

.schedules-detail-panel.slot-editor-panel,
.grid-slot-editor-panel .slot-entry-list,
.grid-slot-editor-panel .slot-editor-scroll-area,
.grid-slot-editor-panel .grid-group-targets {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.schedules-detail-panel.slot-editor-panel::-webkit-scrollbar,
.grid-slot-editor-panel .slot-entry-list::-webkit-scrollbar,
.grid-slot-editor-panel .slot-editor-scroll-area::-webkit-scrollbar,
.grid-slot-editor-panel .grid-group-targets::-webkit-scrollbar {
    width: 8px;
}

.schedules-detail-panel.slot-editor-panel::-webkit-scrollbar-thumb,
.grid-slot-editor-panel .slot-entry-list::-webkit-scrollbar-thumb,
.grid-slot-editor-panel .slot-editor-scroll-area::-webkit-scrollbar-thumb,
.grid-slot-editor-panel .grid-group-targets::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
}

.grid-slot-editor-panel .slot-editor-title-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.slot-editor-day-label,
.slot-editor-pair-label,
.slot-editor-group-label {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
}

.slot-editor-day-label {
    background: var(--slot-editor-day-label-surface);
    color: var(--slot-editor-day-label-text);
}

.slot-editor-pair-label,
.slot-editor-group-label {
    background: var(--slot-editor-pair-label-surface);
    color: var(--slot-editor-pair-label-text);
}

.slot-editor-groups-labels {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}

.grid-slot-editor-panel .slot-editor-close {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-strong);
    font-size: 20px;
}

.grid-slot-editor-panel .slot-entry-marker {
    position: static;
    z-index: 2;
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0;
}

.grid-slot-editor-panel .entry-drag {
    color: var(--grid-slot-editor-panel-entry-drag-text);
    font-size: 15px;
    line-height: 0.65;
}

.grid-slot-editor-panel .slot-entry-body {
    min-width: 0;
    width: 100%;
}

.grid-slot-editor-panel .slot-entry-card-head > div {
    display: none;
}

.grid-slot-editor-panel .slot-entry-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.grid-slot-editor-panel .slot-entry-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--grid-slot-editor-panel-slot-entry-icon-text);
    font-size: 16px;
}

.grid-slot-editor-panel .slot-entry-icon:hover {
    background: var(--grid-slot-editor-panel-slot-entry-icon-hover-surface);
}

.grid-slot-editor-panel .assignment-mode-list button::before {
    display: none;
}

.grid-slot-editor-panel .assignment-search,
.grid-slot-editor-panel .assignment-target-head,
.grid-slot-editor-panel .assignment-target-footer {
    display: none;
}

.grid-slot-editor-panel .assignment-external-targets {
    margin-top: 8px;
    padding-top: 8px;
}

.grid-slot-editor-panel .slot-entry-card.is-department-entry .assignment-search {
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    border: var(--grid-slot-editor-panel-slot-entry-card-is-department-entry-border);
    border-radius: 9px;
    background: var(--color-surface);
    color: var(--grid-slot-editor-panel-slot-entry-card-is-department-entry-text);
}

.grid-slot-editor-panel .slot-entry-card-head {
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 4px;
}

.grid-slot-editor-panel .form-grid label,
.grid-slot-editor-panel .form-grid .slot-field-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    min-width: 0;
    color: var(--color-text-meta);
    font-size: 13px;
    font-weight: 500;
}

.grid-slot-editor-panel .assignment-target-panel {
    padding: 10px 0 0;
}

/* Slot editor refinement: keep the form lighter than the spreadsheet grid. */
.grid-slot-editor-panel .slot-editor-day-label,
.grid-slot-editor-panel .slot-editor-pair-label,
.grid-slot-editor-panel .slot-editor-group-label {
    font-weight: 560;
}

.grid-slot-editor-panel .form-grid {
    gap: 12px 16px;
}

.grid-slot-editor-panel .form-grid label {
    gap: 5px;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 500;
}

.grid-slot-editor-panel .form-grid input::placeholder,
.grid-slot-editor-panel .form-grid textarea::placeholder {
    color: var(--color-editor-control-placeholder);
    font-weight: 400;
}

.grid-slot-editor-panel .assignment-box {
    display: block;
    margin-top: 12px;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.grid-slot-editor-panel .assignment-mode-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px 18px;
    padding: 0;
    border-right: 0;
    border-bottom: var(--grid-slot-editor-panel-assignment-mode-list-border);
    background: transparent;
}

.grid-slot-editor-panel .assignment-mode-list button {
    min-height: 30px;
    padding: 0 0 6px;
    border-radius: 0;
    color: var(--grid-slot-editor-panel-assignment-mode-list-text);
    font-size: 12px;
    font-weight: 400;
    transition: color 0.14s ease, opacity 0.14s ease;
}

.grid-slot-editor-panel .assignment-mode-list button:not(.is-active) {
    opacity: 0.52;
}

.grid-slot-editor-panel .assignment-mode-list button:not(.is-active):hover,
.grid-slot-editor-panel .assignment-mode-list button:not(.is-active):focus-visible {
    opacity: 1;
}

.grid-slot-editor-panel .grid-group-targets.is-joint-selected-list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    max-height: 180px;
    padding: 8px;
}

.grid-slot-editor-panel .grid-group-targets .grid-group-target-item {
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
}

.grid-slot-editor-panel .grid-group-targets .grid-joint-selected-item {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.grid-slot-editor-panel .grid-group-targets .grid-joint-selected-item.is-joint-candidate {
    border-color: var(--grid-slot-editor-panel-grid-group-targets-grid-joint-selected-item-border);
    background: var(--calendar-warning-surface);
    color: var(--color-warning-contrast-text);
}

.grid-slot-editor-panel .grid-group-targets label.is-external-target {
    border-left: 3px solid var(--calendar-non-study-border);
    background: var(--calendar-non-study-surface);
    color: var(--grid-slot-editor-panel-grid-group-targets-is-external-target-text);
}

.grid-slot-editor-panel .grid-group-targets .grid-group-target-item.is-external-target {
    border-left: 3px solid var(--calendar-non-study-border);
    background: var(--calendar-non-study-surface);
    color: var(--grid-slot-editor-panel-grid-group-targets-is-external-target-text);
}

.grid-slot-editor-panel .grid-group-targets label.is-joint-candidate {
    border-color: var(--grid-slot-editor-panel-grid-group-targets-grid-joint-selected-item-border);
    background: var(--calendar-warning-surface);
    color: var(--color-warning-contrast-text);
}

.grid-slot-editor-panel .grid-group-targets .grid-group-target-item.is-joint-candidate {
    border-color: var(--grid-slot-editor-panel-grid-group-targets-grid-joint-selected-item-border);
    background: var(--calendar-warning-surface);
    color: var(--color-warning-contrast-text);
}

.grid-slot-editor-panel .grid-group-targets label.is-external-target.is-joint-candidate {
    border-left-color: var(--calendar-risk-warning-border);
    background: var(--grid-slot-editor-panel-grid-group-targets-is-external-target-surface);
    color: var(--color-warning-contrast-text);
}

.grid-slot-editor-panel .grid-group-targets .grid-group-target-item.is-external-target.is-joint-candidate {
    border-left-color: var(--calendar-risk-warning-border);
    background: var(--grid-slot-editor-panel-grid-group-targets-is-external-target-surface);
    color: var(--color-warning-contrast-text);
}

/* Slot editor controls: explicit borders, project-native autocomplete, compact groups. */
.grid-slot-editor-panel .form-grid input,
.grid-slot-editor-panel .form-grid select,
.grid-slot-editor-panel .form-grid textarea {
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 7px 11px;
    background: var(--color-editor-control-surface);
    border: 1px solid var(--color-editor-control-border);
    border-left: 1px solid var(--color-editor-control-border);
    border-radius: 9px;
    box-shadow: var(--color-editor-control-shadow);
    color: var(--color-editor-control-text);
    font-size: 14px;
    font-weight: 400;
}

.grid-slot-editor-panel .form-grid input:focus,
.grid-slot-editor-panel .form-grid select:focus,
.grid-slot-editor-panel .form-grid textarea:focus {
    outline: 0;
    border-color: var(--accent-cyan);
    box-shadow: var(--features-grid-slot-editor-panel-form-grid-input-focus-grid-slot-editor-panel-form-grid-select-foc-shadow);
}

/* Slot editor input groups: subject/type and teacher/room/text must read as one compound control. */
.grid-slot-editor-panel .slot-input-group {
    gap: 0;
    align-items: end;
}

.grid-slot-editor-panel .slot-subject-type-group {
    position: relative;
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(172px, 0.34fr);
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-subject {
    grid-column: auto;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type {
    justify-content: flex-end;
    gap: 0;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select {
    min-width: 0;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-entry-delete-link {
    position: absolute;
    top: 2px;
    right: 0;
    z-index: 2;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-subject input,
.grid-slot-editor-panel .slot-subject-type-group .slot-field-type select,
.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-control,
.grid-slot-editor-panel .slot-entry-part-row input,
.grid-slot-editor-panel .slot-entry-part-row .slot-part-subject-label,
.grid-slot-editor-panel .slot-part-remove {
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    color: var(--color-editor-control-text-emphasis);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
}

.grid-slot-editor-panel .slot-part-remove {
    width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-editor-remove-border);
    border-radius: 8px;
    background: var(--color-editor-remove-surface);
    color: var(--color-editor-remove-text);
    cursor: pointer;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-subject input {
    border-right: 0;
    border-radius: 10px 0 0 10px;
}

.grid-slot-editor-panel .slot-entry-card.has-protected-part-subjects .slot-subject-type-group .slot-field-subject input:disabled {
    background: var(--color-surface-tinted);
    color: var(--color-editor-control-text-muted);
    cursor: not-allowed;
    opacity: 1;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type select,
.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-control {
    border-left: 1px solid var(--color-editor-control-border);
    border-radius: 0 10px 10px 0;
}

.grid-slot-editor-panel .slot-entry-part-row {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(112px, 0.5fr) minmax(0, 0.65fr) 36px;
    gap: 0;
    align-items: end;
}

.grid-slot-editor-panel .slot-entry-part-row.is-single-part {
    grid-template-columns: minmax(0, 0.85fr) minmax(112px, 0.5fr) minmax(0, 0.65fr) 36px;
}

.grid-slot-editor-panel .slot-entry-part-row.is-add-target-row .slot-field-part-label input {
    border-radius: 0;
}

.grid-slot-editor-panel .slot-entry-part-row.is-add-target-row .slot-field-part-label .slot-part-subject-label {
    border-radius: 0;
}

.grid-slot-editor-panel .slot-entry-part-row label {
    min-width: 0;
    gap: 0;
}

.grid-slot-editor-panel .slot-entry-part-row input {
    border-radius: 0;
}

.grid-slot-editor-panel .slot-entry-part-row .slot-part-subject-label {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-editor-static-border);
    border-left: 0;
    background: var(--color-editor-static-surface);
    color: var(--color-editor-static-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-slot-editor-panel .slot-entry-part-row .slot-part-subject-label.is-hidden {
    display: none;
}

.grid-slot-editor-panel .slot-entry-part-row .slot-field-teacher input {
    border-radius: 10px 0 0 10px;
}

.grid-slot-editor-panel .slot-entry-part-row.is-teacher-locked .slot-field-teacher input,
.grid-slot-editor-panel .slot-entry-part-row .slot-field-teacher input[aria-disabled="true"] {
    background: var(--color-surface-tinted);
    color: var(--color-editor-control-placeholder);
    cursor: not-allowed;
    opacity: 1;
}

.grid-slot-editor-panel .slot-entry-part-row.is-single-part .slot-field-part-label input {
    border-radius: 0 10px 10px 0;
}

.grid-slot-editor-panel .slot-entry-part-row.is-single-part .slot-field-part-label .slot-part-subject-label {
    border-radius: 0 10px 10px 0;
}

.grid-slot-editor-panel .slot-entry-part-row.is-single-part.is-add-target-row .slot-field-part-label input {
    border-radius: 0;
}

.grid-slot-editor-panel .slot-entry-part-row.is-single-part.is-add-target-row .slot-field-part-label .slot-part-subject-label {
    border-radius: 0;
}

.grid-slot-editor-panel .slot-entry-part-row .slot-field-room input,
.grid-slot-editor-panel .slot-entry-part-row .slot-field-part-label input,
.grid-slot-editor-panel .slot-entry-part-row .slot-field-part-label .slot-part-subject-label,
.grid-slot-editor-panel .slot-entry-part-row .slot-part-add,
.grid-slot-editor-panel .slot-entry-part-row .slot-part-remove {
    border-left: 0;
}

.grid-slot-editor-panel .slot-entry-part-row .slot-part-add,
.grid-slot-editor-panel .slot-entry-part-row .slot-part-remove {
    width: 36px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 0 10px 10px 0;
    font-size: 18px;
}

.grid-slot-editor-panel .slot-part-add {
    grid-column: 4;
    align-self: stretch;
    justify-self: stretch;
    border: 1px solid var(--color-editor-add-border);
    background: var(--color-editor-add-surface);
    color: var(--color-editor-add-text);
    line-height: 1;
}

.grid-slot-editor-panel .slot-part-add span {
    display: block;
    transform: translateY(-1px);
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-control svg {
    width: 14px;
    height: 14px;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-results {
    left: auto;
    right: 0;
    width: max-content;
    min-width: 100%;
    max-width: min(420px, calc(100vw - 24px));
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-results .directory-combobox-results-scroll {
    max-height: min(260px, calc(100vh - 180px));
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-results .directory-combobox-results-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-results .directory-combobox-results-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-results .directory-combobox-results-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-results .directory-combobox-results-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--grid-slot-editor-panel-slot-subject-type-group-slot-field-type-hover-surface);
}

.grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-results .directory-combobox-result {
    min-height: 30px;
    padding: 7px 10px;
    white-space: normal;
}

@media (max-width: 760px) {
    .grid-slot-editor-panel .slot-subject-type-group,
    .grid-slot-editor-panel .slot-entry-part-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .grid-slot-editor-panel .slot-entry-part-row .slot-part-add {
        grid-column: 1;
        justify-self: end;
        border-left: 1px solid var(--color-editor-add-border);
    }

    .grid-slot-editor-panel .slot-subject-type-group .slot-field-subject input,
    .grid-slot-editor-panel .slot-subject-type-group .slot-field-type select,
    .grid-slot-editor-panel .slot-subject-type-group .slot-field-type .custom-select-control,
    .grid-slot-editor-panel .slot-entry-part-row input,
    .grid-slot-editor-panel .slot-entry-part-row .slot-part-subject-label,
    .grid-slot-editor-panel .slot-entry-part-row .slot-part-remove {
        border: 1px solid var(--color-editor-control-border);
        border-radius: 10px;
    }

    .grid-slot-editor-panel .slot-entry-part-row .slot-part-remove {
        width: 100%;
    }
}

.slot-combo-results {
    position: fixed;
    z-index: 10020;
    min-width: 180px;
    max-width: calc(100vw - 24px);
    max-height: 206px;
    overflow: auto;
    padding: 5px;
    border: 1px solid var(--color-editor-control-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: var(--features-slot-combo-results-shadow);
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.slot-combo-results::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.slot-combo-results::-webkit-scrollbar-track {
    background: transparent;
}

.slot-combo-results::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
}

.slot-combo-results::-webkit-scrollbar-thumb:hover {
    background: var(--slot-combo-results-hover-surface);
}

.slot-combo-results.is-subject-combo {
    max-height: min(300px, calc(100vh - 140px));
}

.slot-combo-result {
    width: 100%;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--slot-combo-result-text);
    font-size: 13px;
    font-weight: 400;
    text-align: left;
}

.slot-combo-results.is-subject-combo .slot-combo-result {
    align-items: flex-start;
    min-height: 30px;
}

.slot-combo-result:hover {
    background: var(--slot-combo-result-hover-surface);
}

.slot-combo-result span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-combo-results.is-subject-combo .slot-combo-result span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.slot-combo-result small,
.slot-combo-empty {
    color: var(--slot-combo-result-text-variant-2);
    font-size: 11px;
}

.slot-combo-result small {
    flex: 0 0 auto;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-combo-empty {
    padding: 8px 9px;
}

.grid-slot-editor-panel .grid-group-targets {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px 6px;
    max-height: 240px;
    overflow: auto;
    padding: 7px 8px;
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.grid-slot-editor-panel .grid-group-targets label {
    border: var(--grid-slot-editor-panel-assignment-mode-list-border);
    border-radius: 8px;
    background: var(--grid-slot-editor-panel-grid-group-targets-surface);
    color: var(--grid-slot-editor-panel-grid-group-targets-text);
    font-weight: 400;
}

.grid-slot-editor-panel .grid-group-targets label,
.grid-slot-editor-panel .grid-group-targets .grid-group-target-item {
    min-height: 24px;
    padding: 3px 7px;
    gap: 5px;
    font-size: 12px;
}

.grid-slot-editor-panel .grid-group-targets:not(.is-joint-selected-list) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
}

.grid-slot-editor-panel .grid-group-targets:not(.is-joint-selected-list) label,
.grid-slot-editor-panel .grid-group-targets:not(.is-joint-selected-list) .grid-group-target-item {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.grid-slot-editor-panel .grid-group-targets:not(.is-joint-selected-list) .grid-group-target-main {
    min-width: 0;
}

.grid-slot-editor-panel .grid-group-targets input[type="checkbox"] {
    width: 13px;
    height: 13px;
    appearance: none;
    position: relative;
    margin: 3px 3px 3px 4px;
    border: 1px solid var(--color-choice-border);
    border-radius: 3px;
    background: var(--color-surface);
    flex: 0 0 auto;
    accent-color: var(--color-choice-active);
}

.grid-slot-editor-panel .grid-group-targets input[type="checkbox"]:checked {
    border-color: var(--color-choice-active);
    background: var(--color-surface);
}

.grid-slot-editor-panel .grid-group-targets input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0;
    width: 4px;
    height: 8px;
    border: solid var(--color-choice-mark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.grid-slot-editor-panel .grid-group-targets .grid-group-target-joint-chip {
    flex: 0 0 13px;
    width: 13px;
    min-width: 13px;
    height: 13px;
    align-self: center;
    overflow: hidden;
    margin: 3px 3px 3px 4px;
    padding: 0;
    font-size: 5px;
    line-height: 1;
}

.grid-slot-editor-panel .grid-group-targets:not(.is-joint-selected-list) .grid-group-target-item.is-external-target {
    max-width: 100%;
    min-height: 28px;
    box-sizing: border-box;
    border-left: var(--grid-slot-editor-panel-assignment-mode-list-border);
    border-color: var(--grid-slot-editor-panel-grid-group-targets-is-joint-selected-list-border);
    background: var(--lesson-card-surface);
    color: var(--grid-slot-editor-panel-grid-group-targets-is-joint-selected-list-text);
}

.grid-slot-editor-panel .grid-group-targets:not(.is-joint-selected-list) .grid-group-target-item.is-external-target .grid-group-target-main {
    min-width: 0;
}

.grid-slot-editor-panel .grid-group-targets:not(.is-joint-selected-list) .grid-group-target-item.is-external-target .grid-group-target-main small {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.grid-slot-editor-panel .assignment-target-picker-shell {
    min-width: 0;
}

.grid-slot-editor-panel .assignment-target-picker-shell.is-joint-mode {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    padding: 8px;
    border: var(--grid-slot-editor-panel-assignment-target-picker-shell-is-joint-mode-border);
    border-radius: 10px;
    background: var(--grid-slot-editor-panel-assignment-target-picker-shell-is-joint-mode-surface);
    box-sizing: border-box;
}

.grid-slot-editor-panel .assignment-target-picker-shell.is-joint-mode .grid-group-targets.is-joint-selected-list {
    gap: 8px;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.grid-slot-editor-panel .grid-group-targets .grid-joint-selected-item + .grid-joint-selected-item {
    margin-top: 0;
}

.grid-slot-editor-panel .assignment-target-picker-shell.is-joint-mode .assignment-external-targets {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.grid-slot-editor-panel .assignment-target-picker-shell.is-joint-mode .assignment-external-targets .assignment-search {
    min-height: 36px;
    margin: 0;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
    box-sizing: border-box;
}

.grid-slot-editor-panel .assignment-target-picker-shell.is-joint-mode .profile-picker-search-input {
    height: 34px;
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1.35;
}

.grid-slot-editor-panel .assignment-target-picker-shell.is-joint-mode .grid-group-targets .muted {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 400;
    color: var(--color-tab-text);
}

.grid-slot-editor-panel .slot-rule-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 8px;
}

.grid-slot-editor-panel .slot-rule-grid > label:first-child {
    grid-column: 1 / -1;
}

.grid-slot-editor-panel .slot-rule-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.grid-slot-editor-panel .date-rule-count {
    color: var(--accent-teal-dark);
    font-weight: 600;
}

.grid-slot-editor-panel .date-rule-count.has-non-study {
    color: var(--warning);
}

.grid-slot-editor-panel .date-plan-summary {
    min-width: 0;
    margin-left: -6px;
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

.grid-slot-editor-panel .date-plan-summary.is-hidden {
    display: none;
}

.grid-slot-editor-panel .date-plan-summary.is-complete {
    color: var(--color-success-text);
}

.grid-slot-editor-panel .date-plan-summary.is-warning,
.grid-slot-editor-panel .date-plan-summary.is-over {
    color: var(--color-tab-text);
}

.grid-slot-editor-panel .date-plan-extra {
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--grid-slot-editor-panel-date-plan-extra-surface);
    color: var(--color-toast-icon-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    box-shadow: var(--features-grid-slot-editor-panel-date-plan-extra-shadow);
    vertical-align: 1px;
}

.grid-slot-editor-panel .date-rule-action {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-teal-dark);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.grid-slot-editor-panel .date-rule-action:hover {
    color: var(--accent-blue);
}

.grid-slot-editor-panel .slot-rule-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--color-editor-control-border);
    border-radius: 7px;
}

.grid-slot-editor-panel .slot-rule-tabs button {
    min-height: 32px;
    padding: 5px 7px;
    border: 0;
    border-right: 1px solid var(--color-editor-control-border);
    border-radius: 0;
    background: var(--color-surface);
    color: var(--grid-slot-editor-panel-slot-rule-tabs-text);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.grid-slot-editor-panel .slot-rule-tabs button:last-child {
    border-right: 0;
}

.grid-slot-editor-panel .slot-rule-tabs button.is-active {
    box-shadow: inset 0 0 0 1px var(--accent-teal), 0 0 0 1px var(--accent-teal);
    background: var(--grid-slot-editor-panel-slot-rule-tabs-is-active-surface);
    color: var(--accent-teal-dark);
    font-weight: 400;
}

.grid-slot-editor-panel .slot-rule-tabs button.is-active:first-child {
    border-radius: 6px 0 0 6px;
}

.grid-slot-editor-panel .slot-rule-tabs button.is-active:last-child {
    border-radius: 0 6px 6px 0;
}

.grid-slot-editor-panel .date-preview-box {
    grid-column: 1 / -1;
    width: 100%;
    gap: 5px;
    color: var(--grid-slot-editor-panel-date-preview-box-text);
    font-size: 12px;
    font-weight: 500;
}

.grid-slot-editor-panel .date-preview-list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: stretch;
    min-height: 38px;
    max-height: 132px;
    overflow: auto;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 9px;
    scrollbar-width: thin;
    scrollbar-color: var(--grid-slot-editor-panel-date-preview-list-scrollbar);
}

.grid-slot-editor-panel .date-preview-list::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.grid-slot-editor-panel .date-preview-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--color-surface-muted-strong);
}

.grid-slot-editor-panel .date-preview-list::-webkit-scrollbar-thumb {
    border: var(--grid-slot-editor-panel-date-preview-list-border);
    border-radius: 999px;
    background: var(--grid-slot-editor-panel-date-preview-list-surface);
}

.grid-slot-editor-panel .date-preview-list::-webkit-scrollbar-thumb:hover {
    background: var(--grid-slot-editor-panel-slot-subject-type-group-slot-field-type-hover-surface);
}

.grid-slot-editor-panel .date-chip {
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 8px;
    color: var(--grid-slot-editor-panel-date-chip-text);
    font-size: 12px;
    font-weight: 500;
}

.grid-slot-editor-panel .form-grid .date-choice {
    min-height: 28px;
    height: 28px;
    width: 78px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 4px 8px;
    border: var(--grid-slot-editor-panel-assignment-mode-list-border);
    border-radius: 8px;
    background: var(--grid-slot-editor-panel-form-grid-date-choice-surface);
    color: var(--grid-slot-editor-panel-form-grid-date-choice-text);
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
}

.grid-slot-editor-panel .form-grid .date-choice.has-date-context {
    width: 104px;
    height: 28px;
    border-color: var(--grid-slot-editor-panel-form-grid-date-choice-border);
    background: var(--grid-slot-editor-panel-form-grid-date-choice-surface-variant-2);
}

.grid-slot-editor-panel .form-grid .date-choice.is-date-context-active {
    border-color: var(--grid-slot-editor-panel-form-grid-date-choice-border-variant-2);
    background: var(--grid-slot-editor-panel-form-grid-date-choice-surface-variant-3);
}

.grid-slot-editor-panel .form-grid .date-choice input[type="checkbox"] {
    flex: 0 0 auto;
}

.grid-slot-editor-panel .form-grid .date-choice-context {
    min-width: 0;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.grid-slot-editor-panel .form-grid .date-choice-context:focus-visible {
    border-radius: 4px;
    outline: var(--features-grid-slot-editor-panel-form-grid-date-choice-context-focus-visible-outline);
    outline-offset: 2px;
}

.grid-slot-editor-panel .form-grid .date-choice-room {
    flex: 0 0 auto;
    overflow: visible;
    color: var(--color-tab-text);
    font-size: 11px;
    font-weight: 500;
}

.grid-slot-editor-panel .form-grid .date-choice.calendar-day-state {
    border-color: var(--calendar-day-state-border);
    background: var(--calendar-day-state-surface);
    color: var(--calendar-day-state-text);
}

.grid-slot-editor-panel .form-grid .date-choice small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin-left: auto;
    border-radius: 999px;
    background: var(--grid-slot-editor-panel-form-grid-date-choice-surface-variant-4);
    color: var(--progress-fill-on-accent);
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

.grid-slot-editor-panel .form-grid .date-choice input {
    width: 13px;
    height: 13px;
    min-width: 13px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    appearance: none;
    position: relative;
    border: 1px solid var(--color-choice-border);
    border-radius: 3px;
    background: var(--color-surface);
}

.grid-slot-editor-panel .form-grid .date-choice input:checked {
    border-color: var(--color-choice-active);
    background: var(--color-surface);
}

.grid-slot-editor-panel .form-grid .date-choice input:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0;
    width: 4px;
    height: 8px;
    border: solid var(--color-choice-mark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.grid-slot-editor-panel .form-grid .date-choice span {
    line-height: 1;
}

.grid-slot-editor-panel.constraint-editor-panel .slot-rule-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-slot-editor-panel.constraint-editor-panel .slot-rule-tabs button {
    min-width: 0;
    padding-right: 3px;
    padding-left: 3px;
    font-size: 11px;
}

.grid-slot-editor-panel.constraint-editor-panel .date-preview-list.is-hidden {
    display: none;
}

.grid-slot-editor-panel.constraint-editor-panel .slot-editor-close {
    width: 32px;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border-color: transparent;
    color: var(--grid-slot-editor-panel-slot-entry-icon-text);
    font-size: 20px;
}

.grid-slot-editor-panel.constraint-editor-panel .slot-editor-close:hover {
    background: var(--grid-slot-editor-panel-slot-entry-icon-hover-surface);
    filter: none;
}

.grid-slot-editor-panel.constraint-editor-panel .slot-entry-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-content: initial;
    gap: 10px;
    margin-bottom: 12px;
}

.grid-slot-editor-panel.constraint-editor-panel .slot-entry-card-head .entry-label {
    justify-self: start;
}

.grid-slot-editor-panel.constraint-editor-panel .slot-entry-delete-link {
    justify-self: end;
}

.grid-slot-editor-panel.constraint-editor-panel .constraint-all-day-btn {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    min-height: 38px;
    align-self: end;
    padding: 7px 11px;
    border: 1px solid var(--color-editor-control-border);
    border-radius: 9px;
    background: var(--color-surface);
    color: var(--grid-slot-editor-panel-slot-rule-tabs-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    filter: none;
    transform: none;
}

.grid-slot-editor-panel.constraint-editor-panel .constraint-all-day-btn:hover {
    background: var(--color-data-table-tree-surface);
    color: var(--grid-slot-editor-panel-constraint-editor-panel-constraint-all-day-btn-hover-text);
    filter: none;
}

.grid-slot-editor-panel.constraint-editor-panel .constraint-all-day-btn.is-active {
    border-color: var(--grid-slot-editor-panel-constraint-editor-panel-constraint-all-day-btn-border);
    background: var(--grid-slot-editor-panel-slot-rule-tabs-is-active-surface);
    color: var(--grid-slot-editor-panel-constraint-editor-panel-constraint-all-day-btn-text);
}

.production-calendar-page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 22px;
    padding-bottom: 74px;
}

.production-calendar-list {
    flex: 0 0 auto;
}

.production-calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.production-calendar-card {
    border-radius: 10px;
}

.admin-production-calendar-filters {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.admin-production-calendar-toolbar {
    justify-content: flex-end;
    width: auto;
    margin-left: auto;
    margin-top: 8px;
}

.admin-production-calendar-filters select,
.admin-production-calendar-filters .custom-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 150px;
}

.admin-production-calendar-filters select {
    height: 34px;
    min-height: 34px;
    box-sizing: border-box;
    border: 1px solid var(--color-control-border-compact);
    border-radius: 8px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    padding: 6px 30px 6px 10px;
}

.admin-production-calendar-filters .custom-select-control {
    height: 34px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
}

.admin-production-calendar-filters #admin-production-calendar-year + .custom-select {
    width: 96px;
    min-width: 96px;
}

.admin-production-calendar-filters #admin-production-calendar-workweek + .custom-select {
    width: 190px;
    min-width: 190px;
}

.admin-production-calendar-filters .grid-xlsx-draft-open {
    flex: 0 0 auto;
    height: 34px;
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 400;
}

.admin-production-calendar-filters #admin-production-calendar-workweek {
    min-width: 190px;
}

.production-calendar-section-head,
.production-calendar-table-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.production-calendar-section-head > div,
.production-calendar-table-head > div {
    min-width: 0;
}

.production-calendar-page h2,
.production-calendar-section-head h2,
.production-calendar-table-head h2 {
    margin: 0;
    color: var(--color-text-strong);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.production-calendar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 10px;
}

.production-calendar-row > * {
    min-width: 0;
}

.production-calendar-row-manual {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.44fr) minmax(0, 1fr) auto;
}

.production-calendar-row-import {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
}

.production-calendar-row-import .btn {
    grid-column: 2;
    justify-self: end;
}

.production-calendar-row label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 400;
}

.production-calendar-row input,
.production-calendar-row select,
.production-calendar-table input,
.production-calendar-table select {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    border: 1px solid var(--color-control-border);
    border-radius: 8px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    padding: 8px 10px;
}

.production-calendar-row .btn {
    height: 40px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.production-calendar-count {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 7px;
    background: var(--calendar-count-surface);
    color: var(--calendar-count-text);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.production-calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 12px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.production-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.production-calendar-legend i {
    width: 10px;
    height: 10px;
    border: 1px solid var(--calendar-day-state-border, transparent);
    border-radius: 3px;
}

.production-calendar-editor-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.grid-slot-editor-panel.production-calendar-editor-panel .slot-entry-card-head,
.production-calendar-editor-panel .slot-entry-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-content: initial;
    gap: 10px;
}

.grid-slot-editor-panel.production-calendar-editor-panel .slot-entry-card-head .entry-label,
.production-calendar-editor-panel .slot-entry-card-head .entry-label {
    justify-self: start;
}

.grid-slot-editor-panel.production-calendar-editor-panel .slot-entry-delete-link,
.production-calendar-editor-panel .slot-entry-delete-link {
    justify-self: end;
}

.production-calendar-title-field {
    grid-column: 1 / -1;
}

.production-calendar-year-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.production-calendar-year {
    display: grid;
    gap: 10px;
}

.production-calendar-year h3 {
    margin: 0;
    color: var(--calendar-text-strong);
    font-size: 15px;
    font-weight: 600;
}

.production-calendar-months {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 8px;
}

.production-calendar-month {
    min-width: 0;
    border: 1px solid var(--calendar-month-border);
    border-radius: 10px;
    background: var(--calendar-surface);
    overflow: hidden;
}

.production-calendar-month header {
    padding: 7px 9px;
    border-bottom: 1px solid var(--calendar-header-border);
    background: var(--calendar-header-surface);
    color: var(--calendar-text-strong);
    font-size: 13px;
    font-weight: 500;
}

.production-calendar-weekdays,
.production-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.production-calendar-weekdays {
    padding: 5px 7px 3px;
    color: var(--calendar-text);
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

.production-calendar-days {
    gap: 2px;
    padding: 0 7px 7px;
}

.production-calendar-day {
    position: relative;
    display: block;
    min-width: 0;
    height: 26px;
    padding: 2px;
    border: 1px solid var(--calendar-day-state-border, transparent);
    border-radius: 5px;
    background: var(--calendar-day-state-surface, transparent);
    color: var(--calendar-day-state-text, var(--calendar-text));
    font: inherit;
    font-size: 11px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
}

.production-calendar-day:hover,
.production-calendar-day:focus-visible {
    border-color: var(--calendar-border);
    background: var(--calendar-surface-subtle);
    outline: none;
}

.production-calendar-day.calendar-day-state:not(.is-published):hover,
.production-calendar-day.calendar-day-state:not(.is-published):focus-visible {
    border-color: var(--calendar-day-state-border);
    background: var(--calendar-day-state-hover-surface);
    color: var(--calendar-day-state-text);
}

.production-calendar-day.calendar-day-state.is-published:hover,
.production-calendar-day.calendar-day-state.is-published:focus-visible {
    border-color: var(--calendar-day-state-border);
    background: var(--calendar-published-surface);
    color: var(--calendar-published-text);
}

.production-calendar-day.is-empty {
    cursor: default;
    pointer-events: none;
}

.production-calendar-day.has-event {
    font-weight: 500;
}

.production-calendar-day span,
.production-calendar-day small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.production-calendar-day small {
    margin-top: 2px;
    color: var(--calendar-day-secondary-text);
    font-size: 8px;
    font-weight: 400;
}

.production-calendar-day.calendar-day-state:not(.is-published) small {
    color: var(--calendar-day-state-text);
}

.production-calendar-edit-title {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-divider-border);
    background: var(--color-surface-soft);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.production-calendar-sources {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.production-calendar-sources-title {
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 400;
}

.production-calendar-source-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--color-container-border);
    border-radius: 8px;
    background: var(--color-surface-subtle);
}

.production-calendar-source-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.production-calendar-source-main strong,
.production-calendar-source-main span,
.production-calendar-source-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.production-calendar-source-main strong {
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 500;
}

.production-calendar-source-main span,
.production-calendar-source-main small {
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 400;
}

.production-calendar-source-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.production-calendar-table-wrap {
    overflow: auto;
    border: 1px solid var(--color-table-border);
    border-radius: 10px;
    background: var(--color-table-surface);
}

.production-calendar-table {
    min-width: 760px;
}

.production-calendar-table th,
.production-calendar-table td {
    vertical-align: middle;
}

.production-calendar-table th {
    color: var(--color-table-header-text);
    font-size: 12px;
    font-weight: 500;
    background: var(--color-table-header-surface);
}

.production-calendar-table td {
    color: var(--color-text);
    font-size: 13px;
}

.production-calendar-table tbody tr:hover td {
    background: var(--color-table-row-hover);
}

.production-calendar-table td:first-child {
    width: 150px;
}

.production-calendar-table td:nth-child(2) {
    width: 165px;
}

.production-calendar-table td:last-child {
    width: 155px;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .production-calendar-layout,
    .production-calendar-row,
    .production-calendar-row-manual,
    .production-calendar-row-import {
        grid-template-columns: 1fr;
    }

    .production-calendar-months {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .production-calendar-source-card {
        grid-template-columns: 1fr;
    }

    .production-calendar-source-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .production-calendar-months {
        grid-template-columns: 1fr;
    }
}

.ai-settings-page {
    display: grid;
    gap: 18px;
}

.ai-settings-panel {
    width: 100%;
}

.ai-settings-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: 18px;
    align-items: start;
}

.ai-settings-layout-single {
    grid-template-columns: minmax(0, 920px);
}

.ai-own-model-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.ai-subscription-card {
    position: relative;
    min-height: 360px;
    padding: 28px;
    border-radius: 18px;
    color: var(--ai-subscription-primary-text);
    background:
        var(--ai-subscription-card-surface);
    box-shadow: var(--ai-subscription-card-shadow);
    overflow: hidden;
}

.ai-subscription-neuro-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: .42;
    pointer-events: none;
}

.ai-subscription-card::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: -70px;
    bottom: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--ai-subscription-decoration-surface);
    pointer-events: none;
}

.ai-subscription-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-subscription-kicker {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.86;
}

.ai-subscription-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--ai-subscription-status-surface);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ai-subscription-status.is-enabled {
    background: var(--ai-subscription-status-enabled-surface);
}

.ai-subscription-status.is-disabled {
    background: var(--ai-subscription-status-disabled-surface);
}

.ai-subscription-card h2 {
    position: relative;
    z-index: 1;
    margin: 38px 0 10px;
    color: var(--ai-subscription-primary-text);
    font-size: 30px;
    line-height: 1.12;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.ai-subscription-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--ai-subscription-secondary-text);
    font-size: 15px;
}

.ai-subscription-tokens {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
}

.ai-subscription-tokens span {
    color: var(--ai-subscription-label-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.ai-subscription-tokens > span {
    flex: 0 0 auto;
}

.ai-subscription-remaining {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 6px;
    color: var(--ai-subscription-primary-text);
    font-size: 32px;
    line-height: 1;
    letter-spacing: 0;
}

.ai-subscription-progress {
    --component-progress-track: var(--ai-subscription-progress-track);
    --component-progress-fill: var(--ai-subscription-progress-fill);
    position: relative;
    z-index: 1;
    height: 8px;
    margin-top: 18px;
}

.ai-subscription-progress span {
    box-shadow: var(--ai-subscription-progress-shadow);
    transition: width 180ms ease;
}

.ai-subscription-meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--ai-subscription-meta-text);
    font-size: 12px;
}

.ai-subscription-note {
    position: relative;
    z-index: 1;
    margin-top: 44px;
    padding: 14px;
    border: 1px solid var(--ai-subscription-note-border-color);
    border-radius: 14px;
    background: var(--ai-subscription-note-surface);
    color: var(--ai-subscription-note-text);
    font-size: 13px;
    line-height: 1.45;
}

.directory-step-head .directory-step-title {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.ai-buy-tokens-btn {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 46px;
    margin-top: 34px;
    background: var(--ai-buy-tokens-btn-surface);
    color: var(--ai-buy-tokens-btn-text);
    font-weight: 600;
}

.ai-settings-grid {
    margin-top: 0;
}

.ai-connection-grid {
    max-width: 100%;
}

.ai-connection-grid .ai-settings-model-field {
    grid-column: auto;
    min-width: 0;
}

.ai-settings-grid .custom-select-control {
    height: 46px;
    min-height: 46px;
    padding-top: 0;
    padding-bottom: 0;
}

.ai-settings-model-field {
    grid-column: 1 / -1;
    min-width: 0;
}

.ai-settings-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    min-height: 46px;
    min-width: 260px;
    padding: 0 14px;
    border: var(--ai-settings-toggle-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
}

.ai-settings-toggle-head {
    margin-left: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    justify-content: flex-end;
}

.ai-settings-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    border-radius: 4px;
}

.ai-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.ai-settings-action-message {
    box-sizing: border-box;
    flex: 1 1 auto;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    margin-top: 0;
    margin-right: auto;
    padding: 0 14px;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    visibility: visible;
}

.ai-settings-action-message.is-hidden {
    display: inline-flex !important;
    visibility: hidden;
}

.ai-settings-action-message:not(.is-hidden) {
    display: inline-flex;
}

.ai-usage-actions {
    justify-content: flex-start;
}

.ai-model-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 12px;
    align-items: center;
}

.ai-model-picker > .directory-combobox {
    min-width: 0;
}

.ai-model-picker .directory-combobox-search {
    box-sizing: border-box;
    min-width: 0;
}

.ai-model-picker .custom-select {
    width: 100%;
    min-width: 0;
}

.ai-model-refresh-btn {
    width: 46px;
    height: 46px;
    min-width: 46px;
    padding: 0;
    border: var(--ai-model-refresh-btn-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.ai-model-refresh-btn:hover,
.ai-model-refresh-btn:focus-visible {
    border-color: var(--color-control-focus-border);
    box-shadow: var(--features-ai-model-refresh-btn-hover-ai-model-refresh-btn-focus-visible-shadow);
    outline: none;
}

.ai-model-refresh-btn:disabled {
    cursor: default;
    opacity: 0.82;
}

.ai-model-refresh-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-model-refresh-btn.is-loading svg {
    animation: ai-spin 0.9s linear infinite;
}

@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

.ai-test-result {
    width: 100%;
    margin-top: 16px;
    padding: 16px 18px;
    border: var(--ai-test-result-border);
    border-radius: 14px;
    background: var(--color-data-table-tree-surface);
}

.ai-test-result.is-ok {
    border-color: var(--ai-test-result-is-ok-border);
    background: var(--ai-test-result-is-ok-surface);
}

.ai-test-result.is-error {
    border-color: var(--ai-test-result-is-error-border);
    background: var(--ai-test-result-is-error-surface);
}

.ai-usage-panel {
    display: flex;
    flex-direction: column;
}

.ai-usage-card {
    display: grid;
    gap: 12px;
    align-content: center;
    flex: 1 1 auto;
    margin-top: 0;
    padding: 22px;
    border: var(--ai-usage-card-border);
    border-radius: 16px;
    background:
        var(--ai-usage-card-surface);
    color: var(--ai-usage-card-text);
}

.ai-usage-card > span {
    font-size: 14px;
    font-weight: 600;
}

.ai-usage-card > strong {
    color: var(--lesson-card-text);
    font-size: 38px;
    line-height: 1;
    letter-spacing: 0;
}

.ai-usage-level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
    border-top: var(--features-ai-usage-level-border-top);
    font-size: 14px;
}

.ai-usage-level b {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.ai-usage-level b.is-low {
    background: var(--ai-usage-level-is-low-surface);
    color: var(--ai-usage-level-is-low-text);
}

.ai-usage-level b.is-mid {
    background: var(--ai-usage-level-is-mid-surface);
    color: var(--ai-usage-level-is-mid-text);
}

.ai-usage-level b.is-high {
    background: var(--conflict-surface);
    color: var(--ai-usage-level-is-high-text);
}

.ai-test-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: var(--features-ai-test-result-head-border-bottom);
}

.ai-test-result-head .ok {
    color: var(--ai-test-result-head-ok-text);
}

.ai-test-result-head .error {
    color: var(--ai-test-result-head-error-text);
}

.ai-test-result-grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px 16px;
    padding-top: 12px;
}

.ai-test-result-grid span {
    color: var(--muted);
}

.ai-test-result-grid strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

@media (max-width: 760px) {
    .ai-settings-layout {
        grid-template-columns: 1fr;
    }

    .ai-subscription-card {
        position: relative;
        top: auto;
        min-height: 0;
    }

    .ai-settings-grid {
        grid-template-columns: 1fr;
    }

    .ai-settings-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .ai-settings-action-message {
        width: 100%;
        margin-right: 0;
    }

    .ai-model-picker {
        grid-template-columns: 1fr;
    }

    .ai-settings-actions .btn {
        width: 100%;
    }

    .ai-settings-toggle {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .ai-settings-toggle-head {
        margin-left: 0;
    }
}

/* Slot editor card geometry: the entry number is a badge, not a wasted column. */
.grid-slot-editor-panel .slot-entry-card {
    position: relative;
    display: block;
    padding: 12px;
    border: 1px solid var(--directory-editor-border);
    border-radius: 12px;
    box-shadow: var(--features-grid-slot-editor-panel-slot-entry-card-shadow);
    background: linear-gradient(90deg, var(--accent-teal) 0%, var(--accent-cyan) 58%, var(--accent) 100%) 0 0 / 100% 4px no-repeat, var(--calendar-surface);
}

.grid-slot-editor-panel .entry-order {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--progress-fill-on-accent);
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
    box-shadow: var(--grid-slot-editor-panel-entry-order-shadow);
}

.grid-slot-editor-panel .slot-entry-list {
    gap: 24px;
    padding: 10px 0 0;
    flex: 0 0 auto;
    overflow: visible;
}

.grid-slot-editor-panel .slot-entry-card::before {
    content: none;
}


.grid-slot-editor-panel .slot-add-entry-dropzone {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: var(--grid-slot-editor-panel-slot-add-entry-dropzone-border);
    border-radius: 10px;
    background: var(--grid-slot-editor-panel-slot-add-entry-dropzone-surface);
    color: var(--accent-teal-dark);
    font-size: 14px;
    font-weight: 500;
}

.grid-slot-editor-panel .assignment-mode-list button.is-active {
    color: var(--accent-teal-dark);
    box-shadow: inset 0 -2px 0 var(--accent-teal);
    font-weight: 500;
    opacity: 1;
}

.grid-slot-editor-panel .slot-add-entry-dropzone span {
    font-size: 20px;
    line-height: 1;
}

.slot-editor.is-readonly-by-lock .slot-add-entry-dropzone {
    display: none;
}

.slot-editor.is-readonly-by-lock .slot-entry-delete-link {
    display: none;
}

.slot-editor.is-readonly-by-lock .slot-entry-card {
    background: var(--presence-empty-surface);
}


.danger-btn {
    background: var(--conflict-surface);
    color: var(--error);
    border: 1px solid var(--conflict-border);
}

.alerts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alert {
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--feedback-surface, var(--feedback-default-surface));
    border-color: var(--feedback-border, var(--feedback-default-border));
    color: var(--feedback-text, var(--feedback-default-text));
    font-size: 13px;
}

.alert.error {
    --feedback-surface: var(--feedback-error-surface);
    --feedback-border: var(--feedback-error-border);
    --feedback-text: var(--feedback-error-text);
}

.alert.warning {
    --feedback-surface: var(--feedback-warning-surface);
    --feedback-border: var(--feedback-warning-border);
    --feedback-text: var(--feedback-warning-text);
}

.alert.ok {
    --feedback-surface: var(--feedback-success-surface);
    --feedback-border: var(--feedback-success-border);
    --feedback-text: var(--feedback-success-text);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tab-btn {
    background: var(--color-action-secondary-bg);
    border: 1px solid var(--color-action-secondary-border);
    color: var(--color-action-secondary-text);
}

.tab-btn.is-active {
    background: var(--color-surface-selected);
    border-color: var(--color-surface-selected-border);
}

.inline-editor {
    margin-bottom: 12px;
}

.inline-editor .editor-row {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    align-items: end;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
}

.list-item.is-selected {
    border-color: var(--list-item-is-selected-border);
    background: var(--grid-active-slot-surface);
}

.compact-list .list-item {
    background: var(--compact-list-list-item-surface);
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 20px;
}

.directory-empty-guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    text-align: left;
}

.directory-empty-guide h2 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.directory-empty-guide p {
    margin: 0;
    color: var(--muted);
}

.directory-empty-guide .btn {
    flex: 0 0 auto;
}

.import-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.import-mapping {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.import-mapping label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}

.import-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.import-summary .card {
    box-shadow: none;
    border-radius: 10px;
    padding: 10px;
}

.directory-page-head-actions {
    display: flex;
    justify-content: flex-end;
    margin: -10px 0 16px;
}

.study-plan-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.study-plan-upload-row input[type="file"] {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}

.study-plan-viewer-panel {
    padding-bottom: 24px;
}

.study-plan-viewer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(620px, 2.4fr);
    gap: 14px;
    align-items: stretch;
}

.study-plan-viewer-grid.has-history {
    grid-template-columns: minmax(240px, 0.8fr) minmax(520px, 1.8fr) minmax(240px, 0.8fr);
}

.study-plan-master-column,
.study-plan-detail-column {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.study-plan-master-column {
    display: flex;
    flex-direction: column;
    max-height: 680px;
}

.study-plan-detail-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.study-plan-history-toggle {
    width: auto;
    min-width: 150px;
    padding-inline: 12px;
}

.study-plan-history-column.is-hidden {
    display: none;
}

.study-plan-column-head,
.study-plan-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
}

.study-plan-column-head h3,
.study-plan-detail-head h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    color: var(--text);
}

.study-plan-column-note {
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}

.study-plan-select-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding: 10px;
}

.study-plan-list-card {
    width: 100%;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.study-plan-list-card:hover {
    background: var(--surface-muted);
    border-color: var(--border-soft);
}

.study-plan-list-card.is-active {
    background: var(--features-study-plan-list-card-is-active-surface);
    border-color: var(--features-study-plan-list-card-is-active-border-color);
    box-shadow: var(--features-study-plan-list-card-is-active-shadow);
}

.study-plan-list-card-title {
    width: 100%;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.study-plan-list-card-subtitle {
    width: 100%;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}

.study-plan-list-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    font-size: 11px;
    color: var(--muted);
}

.study-plan-list-card-meta > span:not(.status-chip) {
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--surface-muted);
}

.study-plan-detail-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-soft);
}

.study-plan-tab {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
}

.study-plan-tab:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.study-plan-tab.is-active {
    border-color: var(--border);
    background: var(--surface-muted);
    color: var(--text);
}

.study-plan-tab span {
    color: var(--muted);
}

.study-plan-detail-content {
    min-height: 380px;
    overflow: auto;
    padding: 14px 16px 18px;
}

.study-plan-detail-table th:first-child,
.study-plan-detail-table td:first-child {
    width: auto;
}

.study-plan-json-view,
.study-plan-json-list pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text);
}

@media (max-width: 1180px) {
    .study-plan-viewer-grid {
        grid-template-columns: 1fr;
    }

    .study-plan-master-column {
        max-height: none;
    }
}

.project-groups-footer {
    justify-content: flex-end;
}

.group-choice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.group-choice-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-choice-meta {
    font-size: 12px;
    color: var(--muted);
}

.page-head-compact {
    margin-bottom: 12px;
}

.page-head-compact h1 {
    margin: 0;
}

.directory-page-head {
    display: block;
}

.directory-page-head.directory-page-head-with-actions {
    display: flex;
    align-items: flex-start;
}

.directory-page-head p {
    max-width: 760px;
}

.directory-page-head > .directory-page-head-actions {
    margin: 0;
    flex: 0 0 auto;
}

.departments-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.directory-page-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-start-cta {
    position: relative;
    display: block;
    min-height: 30px;
    height: 30px;
    margin-bottom: 4px;
}

.nav-start-cta.is-hidden {
    display: none;
}

.nav-settings-getting-started {
    display: none;
}

.nav-settings-getting-started.is-visible {
    display: contents;
}

.nav-settings-getting-started.is-arriving .nav-link {
    visibility: hidden;
}

.app-shell[data-getting-started-dismissed="1"] .nav-start-cta {
    display: none;
}

.nav-link.nav-link-start {
    background: var(--getting-started-cta-surface);
    color: var(--getting-started-cta-icon-stroke);
}

.nav-start-cta .nav-link.nav-link-start {
    padding-right: 40px;
}

.nav-link.nav-link-start:hover,
.nav-link.nav-link-start.is-active {
    background: var(--getting-started-cta-hover-surface);
    color: var(--getting-started-close-hover-text);
}

.nav-link.nav-link-start .nav-icon-svg {
    stroke: currentColor;
}

.nav-readiness-indicator {
    --nav-readiness-fill: currentColor;
    --nav-readiness-track: color-mix(in srgb, currentColor 24%, transparent);
    position: relative;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: currentColor;
}

.nav-readiness-indicator::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(var(--nav-readiness-fill) var(--getting-started-progress-current), var(--nav-readiness-track) 0);
    -webkit-mask: var(--features-nav-readiness-indicator-before-webkit-mask);
    mask: var(--features-nav-readiness-indicator-before-mask);
    pointer-events: none;
}

.nav-readiness-indicator-value {
    position: relative;
    z-index: 1;
    color: currentColor;
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.nav-start-close {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 5px;
    z-index: 1;
    width: 20px;
    height: 20px;
    margin-block: auto;
    padding: 0;
    border: 0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--features-nav-start-close-text);
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-start-close:hover,
.nav-start-close:focus-visible,
.nav-start-close:active {
    color: var(--getting-started-close-hover-text);
    background: var(--features-nav-start-close-hover-nav-start-close-focus-visible-nav-start-close-active-surface);
    outline: none;
}

.nav-start-close .nav-icon-svg {
    width: 14px;
    height: 14px;
}

.nav-start-fly-clone {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    transform-origin: left top;
    transition:
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.9s ease;
}

.app-shell[data-sidebar-state="collapsed"] .nav-start-cta,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-start-cta {
    margin-bottom: 4px;
}

.app-shell[data-sidebar-state="collapsed"] .nav-start-close,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-start-close {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-start-close {
    display: inline-flex;
}

.getting-started-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.getting-started-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.getting-started-readiness {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr) minmax(220px, 320px);
    align-items: center;
    gap: 24px;
    padding: 24px;
}

.getting-started-progress {
    --getting-started-progress-current: var(--getting-started-progress, 0%);
    position: relative;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    background: var(--getting-started-progress-center);
}

.getting-started-progress::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(
        var(--getting-started-progress-fill) var(--getting-started-progress-current),
        var(--getting-started-progress-track) 0
    );
    -webkit-mask: var(--features-getting-started-progress-before-webkit-mask);
    mask: var(--features-getting-started-progress-before-mask);
    pointer-events: none;
}

.getting-started-progress > strong,
.getting-started-progress > span {
    position: relative;
    z-index: 1;
}

.getting-started-progress.is-animating {
    will-change: background;
}

.getting-started-progress strong {
    color: var(--color-text-emphasis);
    font-size: 30px;
    line-height: 1;
    font-weight: 600;
}

.getting-started-progress span {
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.getting-started-readiness-copy {
    min-width: 0;
}

.getting-started-readiness-copy h2,
.getting-started-next h2,
.getting-started-section-head h2,
.getting-started-finish-panel h2 {
    margin: 0;
    color: var(--color-text-strong);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 600;
}

.getting-started-readiness-copy p,
.getting-started-next p,
.getting-started-section-head p,
.getting-started-finish-panel p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.35;
}

.getting-started-readiness-copy > p,
.getting-started-next p,
.getting-started-section-head p,
.getting-started-finish-panel p {
    margin-top: 6px;
}

.getting-started-missing {
    margin-top: 16px;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.getting-started-missing span {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-strong);
    font-weight: 500;
}

.getting-started-missing ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.getting-started-missing li {
    position: relative;
    padding-left: 14px;
}

.getting-started-missing li::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--getting-started-missing-before-surface);
}

.getting-started-next {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    padding-left: 24px;
    border-left: 1px solid var(--color-divider-border);
}

.getting-started-next .btn {
    width: 100%;
    min-height: 36px;
}

.getting-started-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.getting-started-nav a {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-surface);
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
}

.getting-started-nav a.is-active {
    border-color: var(--getting-started-nav-is-active-border);
    background: var(--getting-started-nav-is-active-surface);
    color: var(--progress-fill-on-accent);
}

.getting-started-nav span {
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--features-getting-started-nav-span-surface);
    font-size: 12px;
    font-weight: 500;
}

.getting-started-nav a.is-active span {
    background: var(--features-getting-started-nav-a-is-active-span-surface);
}

.getting-started-section {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.getting-started-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px 24px;
}

.getting-started-section-head > span {
    min-width: 30px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-success-surface);
    color: var(--getting-started-section-head-text);
    font-size: 12px;
    font-weight: 600;
}

.getting-started-section.is-recommended .getting-started-section-head > span {
    background: var(--calendar-weekend-surface);
    color: var(--getting-started-section-is-recommended-getting-started-section-head-text);
}

.getting-started-steps {
    --getting-started-step-columns: 42px minmax(360px, 1fr) 260px 320px;
    border-top: 1px solid var(--color-divider-border);
}

.getting-started-steps-head {
    display: grid;
    grid-template-columns: var(--getting-started-step-columns);
    align-items: center;
    gap: 12px;
    min-height: 34px;
    padding: 0 18px 0 24px;
    border-bottom: 1px solid var(--color-divider-border);
    background: var(--color-surface-tinted);
    color: var(--color-table-header-text);
    font-size: 11px;
    font-weight: 500;
}

.getting-started-steps-head span:nth-child(4) {
    justify-self: end;
    padding-right: 6px;
}

.getting-started-step-row {
    display: grid;
    grid-template-columns: var(--getting-started-step-columns);
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 18px 12px 24px;
    border-top: 1px solid var(--color-divider-border);
}

.getting-started-steps-head + .getting-started-step-row {
    border-top: 0;
}

.getting-started-step-row:hover {
    background: var(--color-table-row-hover);
}

.getting-started-step-num {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-success-surface);
    color: var(--getting-started-step-num-text);
    font-size: 12px;
    font-weight: 600;
}

.getting-started-section.is-recommended .getting-started-step-num {
    background: var(--calendar-weekend-surface);
    color: var(--getting-started-section-is-recommended-getting-started-step-num-text);
}

.getting-started-step-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.getting-started-step-copy strong {
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.getting-started-step-copy small {
    color: var(--color-text-secondary);
    display: grid;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.getting-started-step-template-note {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.getting-started-step-template-link {
    color: var(--color-link-muted);
    font-size: 12px;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 32%, transparent);
    white-space: nowrap;
    text-underline-offset: 3px;
}

.getting-started-step-template-link:hover {
    color: var(--color-text-strong);
    text-decoration-color: currentColor;
}

.getting-started-status {
    justify-self: start;
    max-width: 100%;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.getting-started-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.getting-started-status.is-done {
    background: var(--color-success-surface);
    color: var(--getting-started-status-is-done-text);
}

.getting-started-status.is-todo {
    background: var(--grid-entry-drop-risk-state-surface);
    color: var(--getting-started-status-is-todo-text);
}

.getting-started-status.is-attention {
    background: var(--calendar-weekend-surface);
    color: var(--getting-started-status-is-attention-text);
}

.getting-started-step-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.getting-started-step-action.btn {
    min-width: 156px;
    min-height: 34px;
    white-space: nowrap;
}

.getting-started-finish-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, max-content);
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
}

.getting-started-finish-panel > div {
    min-width: 0;
    flex: 1 1 auto;
}

.getting-started-finish-actions {
    justify-self: end;
    width: min(340px, 100%);
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.getting-started-finish-actions .btn {
    min-height: 40px;
    width: 100%;
    box-sizing: border-box;
}

.getting-started-primary-action.btn {
    min-height: 40px;
    padding: 0 16px;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .getting-started-readiness {
        grid-template-columns: 132px minmax(0, 1fr);
    }

    .getting-started-next {
        grid-column: 1 / -1;
        padding-top: 16px;
        padding-left: 0;
        border-top: 1px solid var(--color-action-secondary-border);
        border-left: 0;
    }

    .getting-started-next .btn {
        width: auto;
        align-self: flex-start;
    }

    .getting-started-step-row {
        grid-template-columns: 34px minmax(0, 1fr) minmax(132px, 180px);
    }

    .getting-started-steps-head {
        display: none;
    }

    .getting-started-step-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .getting-started-head,
    .getting-started-readiness,
    .getting-started-finish-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

    .getting-started-progress {
        width: 116px;
        height: 116px;
    }

    .getting-started-step-row {
        grid-template-columns: 28px minmax(0, 1fr);
        align-items: start;
    }

    .getting-started-status,
    .getting-started-step-actions {
        grid-column: 2;
    }

    .getting-started-step-actions,
    .getting-started-finish-actions {
        flex-direction: column;
        align-items: stretch;
        flex-basis: auto;
        justify-self: stretch;
        width: 100%;
        min-width: 0;
    }

    .getting-started-step-action.btn,
    .getting-started-finish-actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .getting-started-progress.is-animating {
        transition: none;
        will-change: auto;
    }
}

.disclosure-heading {
    margin: 0;
}

.disclosure-header {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 0;
    height: auto;
    text-align: left;
    font-weight: 600;
    filter: none;
    transform: none;
    cursor: pointer;
}

.disclosure-title {
    font-size: 20px;
    line-height: 1.2;
}

.disclosure-icon {
    color: var(--disclosure-icon-text);
    font-size: 26px;
}

.department-add-panel {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.department-add-panel textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    border: 1px solid var(--color-control-border);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--color-control-bg);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.department-add-panel textarea:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 4px var(--color-control-focus-ring);
}

.directory-step-panel {
    position: relative;
    padding: 22px 24px 24px;
}

.directory-step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.directory-step-head h2 {
    margin: 0;
    color: var(--color-text-strong);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
}

.directory-import-panel .directory-step-head {
    padding-right: 132px;
    margin-bottom: 28px;
}

.directory-plan-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--color-choice-active);
}

.directory-plan-loading.is-hidden {
    display: none;
}

.directory-plan-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-action-secondary-border);
    border-top-color: currentColor;
    border-radius: 999px;
    animation: directory-plan-spin 0.7s linear infinite;
}

.directory-plan-source-btn.btn {
    width: 158px;
    min-width: 158px;
    gap: 8px;
    white-space: nowrap;
}

.directory-plan-source-btn.is-loading::before {
    content: "";
    width: 13px;
    height: 13px;
    border: 2px solid var(--color-action-secondary-border);
    border-top-color: currentColor;
    border-radius: 999px;
    animation: directory-plan-spin 0.7s linear infinite;
}

@keyframes directory-plan-spin {
    to {
        transform: rotate(360deg);
    }
}

.directory-list-panel-head {
    display: grid;
    grid-template-columns: auto auto auto minmax(220px, 1fr);
}

.profile-list-head-actions {
    grid-column: 4;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.directory-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background-image: var(--color-toast-icon-bg);
    background-attachment: fixed;
    background-size: 100vw 100vh;
    color: var(--progress-fill-on-accent);
    font-size: 12px;
    font-weight: 600;
    flex: 0 0 auto;
}

.directory-step-num-success {
    background-image: var(--directory-step-num-success-surface);
    background-attachment: fixed;
    background-size: 100vw 100vh;
}

.directory-step-toggle {
    position: absolute;
    top: 18px;
    right: 24px;
    height: 34px;
    padding: 0 11px 0 13px;
    border: 1px solid var(--color-popover-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--directory-step-toggle-text);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.directory-step-toggle:hover,
.directory-step-toggle:focus-visible {
    border-color: var(--directory-step-toggle-hover-border);
    background: var(--color-data-table-tree-surface);
    color: var(--directory-step-toggle-hover-text);
    box-shadow: var(--features-directory-step-toggle-hover-directory-step-toggle-focus-visible-shadow);
    outline: none;
}

.directory-step-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.16s ease;
}

.directory-import-panel .department-add-panel.is-hidden,
.directory-import-panel .directory-import-workspace.is-hidden {
    display: none;
}

.directory-import-panel.is-collapsed {
    padding-bottom: 18px;
}

.directory-import-panel.is-collapsed .directory-step-head {
    margin-bottom: 0;
}

.directory-import-panel.is-collapsed .directory-step-toggle svg {
    transform: rotate(180deg);
}

.directory-import-panel.is-collapsed .department-add-panel,
.directory-import-panel.is-collapsed .inline-action-message {
    display: none;
}

.directory-combobox-field select {
    height: 46px;
    padding-inline: 14px;
    font-size: 14px;
}

.directory-combobox {
    position: relative;
    width: 100%;
}

.directory-combobox-search {
    width: 100%;
    height: 46px;
    padding: 10px 44px 10px 14px;
    border: 1px solid var(--color-control-border);
    border-radius: 12px;
    background-color: var(--color-control-bg);
    background-image: var(--select-chevron-image);
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px 16px;
    color: var(--color-text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.directory-combobox-search:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 4px var(--color-control-focus-ring);
    background-color: var(--color-control-bg);
}

.directory-combobox-search::placeholder {
    color: var(--color-control-placeholder);
}

.directory-toolbar-panel {
    min-width: 0;
    max-width: 100%;
    padding: 24px 28px;
    border-radius: 12px;
    box-shadow: var(--features-directory-toolbar-panel-shadow);
}

.directory-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 20px;
}

.directory-toolbar-search {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0 16px;
    border: var(--directory-toolbar-search-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--directory-toolbar-search-text);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.directory-toolbar-search:focus-within {
    border-color: var(--color-control-focus-border);
    box-shadow: var(--features-directory-toolbar-search-focus-within-shadow);
    background-color: var(--color-surface);
}

.directory-toolbar-search svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.directory-toolbar-search input {
    appearance: none;
    -webkit-appearance: none;
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 15px;
}

.directory-toolbar-search input:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.directory-toolbar-search input::-webkit-search-decoration,
.directory-toolbar-search input::-webkit-search-cancel-button,
.directory-toolbar-search input::-webkit-search-results-button,
.directory-toolbar-search input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.directory-toolbar-search input::placeholder {
    color: var(--color-control-placeholder);
}

.directory-toolbar-toggle {
    height: 46px;
    width: 162px;
    padding: 0 20px;
    border: var(--directory-toolbar-toggle-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--lesson-card-text);
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.directory-toolbar-toggle:hover,
.directory-toolbar-toggle:focus-visible {
    border-color: var(--directory-toolbar-toggle-hover-border);
    background: var(--color-data-table-tree-surface);
    color: var(--directory-toolbar-toggle-hover-text);
    box-shadow: var(--features-directory-toolbar-toggle-hover-directory-toolbar-toggle-focus-visible-shadow);
    outline: none;
}

.directory-toolbar-toggle:disabled {
    cursor: default;
    opacity: 0.58;
    box-shadow: none;
}

.directory-toolbar-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.16s ease;
}

.directory-toolbar-toggle[aria-pressed="false"] svg {
    transform: rotate(180deg);
}

.directory-combobox-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--color-popover-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: var(--features-directory-combobox-results-shadow);
}

.directory-combobox-results-scroll {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 12px 6px 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--directory-combobox-results-scroll-scrollbar);
}

.directory-combobox-results-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.directory-combobox-results-scroll::-webkit-scrollbar-track {
    margin: 8px 0;
    border-radius: 999px;
    background: var(--color-surface-muted-strong);
}

.directory-combobox-results-scroll::-webkit-scrollbar-thumb {
    border: var(--directory-combobox-results-scroll-border);
    border-radius: 999px;
    background: var(--directory-combobox-results-scroll-surface);
}

.directory-combobox-results-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--directory-combobox-results-scroll-hover-surface);
}

.directory-combobox-result,
.directory-combobox-empty {
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--directory-combobox-result-text);
    font-size: 14px;
    line-height: 1.25;
}

.directory-combobox-result {
    cursor: pointer;
}

.directory-combobox-result-main {
    display: block;
}

.directory-combobox-result-hint {
    display: block;
    margin-top: 4px;
    color: var(--directory-combobox-result-hint-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

.directory-combobox-result:hover,
.directory-combobox-result.is-active,
.directory-combobox-result.is-selected {
    background: var(--directory-combobox-result-hover-surface);
    color: var(--directory-combobox-result-hover-text);
}

.directory-combobox-empty {
    color: var(--directory-combobox-empty-text);
}

.native-select-hidden {
    display: none;
}

.custom-select {
    position: relative;
    width: 100%;
    min-width: min(100%, var(--custom-select-min-width, 0px));
}

.custom-select-control {
    width: 100%;
    min-height: 38px;
    padding: 10px 14px;
    border: 1px solid var(--color-control-border);
    border-radius: 12px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.custom-select-control:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 4px var(--color-control-focus-ring);
}

.custom-select-control:disabled {
    cursor: default;
    opacity: 0.62;
}

.custom-select-value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-control svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
    transition: transform 0.16s ease;
}

.custom-select.is-open .custom-select-control svg {
    transform: rotate(180deg);
}

.custom-select-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    width: max-content;
    min-width: 100%;
    max-width: min(520px, calc(100vw - 48px));
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--color-popover-border);
    border-radius: 12px;
    background: var(--color-popover-surface);
    box-shadow: var(--color-popover-shadow);
}

.custom-select-results-portal {
    position: fixed;
    z-index: 70;
    top: 0;
    left: 0;
    right: auto;
    min-width: 0;
    max-width: calc(100vw - 24px);
}

.custom-select-results-portal .directory-combobox-results-scroll {
    max-height: min(260px, calc(100vh - 24px));
    overflow-y: auto;
}

.custom-select-search-shell {
    padding: 6px 6px 4px;
    border-bottom: 1px solid var(--color-border-soft);
    background: var(--color-popover-surface);
}

.custom-select-search {
    box-sizing: border-box;
    width: 100%;
    height: 30px;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid var(--color-control-border);
    border-radius: 7px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    font-size: 12px;
    outline: none;
}

.custom-select-search:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 2px var(--color-control-focus-ring);
}

.custom-select-inline .custom-select-control {
    min-height: 34px;
    padding: 0 8px;
    border-color: transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--custom-select-inline-custom-select-control-text);
}

.custom-select-inline .custom-select-control:focus,
.custom-select-inline.is-open .custom-select-control {
    border-color: var(--custom-select-inline-custom-select-control-focus-border);
    background: var(--color-surface);
    color: var(--custom-select-inline-custom-select-control-focus-text);
    box-shadow: var(--features-custom-select-inline-custom-select-control-focus-custom-select-inline-is-open-custom-sel-shadow);
}

.directory-import-workspace {
    display: block;
}

.directory-import-workspace--with-preview {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) 42px minmax(0, 1.08fr);
    column-gap: 24px;
    align-items: start;
}

.directory-import-workspace--with-preview::before {
    content: "\2192";
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    color: var(--directory-import-workspace-with-preview-before-text);
    font-size: 28px;
    line-height: 1;
}

.directory-import-input,
.directory-import-preview {
    display: grid;
    grid-template-rows: 30px 20px auto auto;
    align-items: start;
}

.directory-import-input {
    grid-column: 1;
    grid-row: 1;
}

.directory-import-preview {
    grid-column: 3;
    grid-row: 1;
}

.directory-import-input textarea {
    min-height: 148px;
    height: 148px;
    font-size: 14px;
    line-height: 1.45;
    overflow: hidden;
}

.directory-block-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
    min-height: 30px;
}

.directory-block-head h3 {
    margin: 0;
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.directory-import-input > p,
.directory-import-preview > p {
    min-height: 0;
    margin: -8px 0 0px;
    padding-right: 0;
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.35;
}

.directory-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 88px;
    padding: 0 11px;
    border-radius: 8px;
    background: var(--directory-count-badge-surface);
    color: var(--directory-count-badge-text);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.directory-list-message {
    justify-self: end;
    min-height: 28px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--directory-list-message-text);
    font-size: 13px;
    line-height: 1.3;
}

.directory-list-message:empty {
    display: none;
}

.directory-list-message.error {
    color: var(--directory-list-message-error-text);
}

.directory-message-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    flex: 0 0 auto;
}

.directory-import-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--directory-import-note-surface);
    color: var(--directory-import-note-text);
    font-size: 12px;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.directory-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border: var(--directory-note-icon-border);
    border-radius: 999px;
    color: var(--directory-note-icon-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    flex: 0 0 auto;
}

.directory-preview-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.directory-clear-btn.btn {
    height: 28px;
    padding-inline: 12px;
    border-radius: 8px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.directory-clear-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.directory-preview-wrap {
    border: 1px solid var(--color-filter-hover-border);
    border-radius: 8px;
    background: var(--color-surface);
    min-height: 148px;
}

.directory-preview-table th,
.directory-preview-table td {
    padding: 9px 14px;
    height: 44px;
}

.directory-preview-table th {
    color: var(--directory-preview-table-text);
    font-size: 12px;
    font-weight: 600;
    background: var(--presence-empty-surface);
}

.directory-preview-table th:nth-child(1),
.directory-preview-table td:nth-child(1) {
    width: 56px;
}

.directory-preview-table th:nth-child(3),
.directory-preview-table td:nth-child(3) {
    /*width: 160px;*/
}

.directory-preview-table th:nth-child(4),
.directory-preview-table td:nth-child(4) {
    /*width: 64px;
    text-align: center;*/
}

.directory-preview-empty {
    min-height: 146px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--directory-preview-empty-border);
    border-radius: 8px;
    color: var(--directory-preview-empty-text);
    font-size: 13px;
}

.directory-preview-empty.is-hidden {
    display: none;
}

.directory-import-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.directory-import-footer .btn {
    min-width: 212px;
}

.directory-preview-remove {
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--directory-preview-remove-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.directory-preview-remove:hover,
.directory-preview-remove:focus-visible {
    border-color: var(--color-popover-border);
    background: var(--color-data-table-tree-surface);
    color: var(--directory-preview-remove-hover-text);
}

.directory-preview-remove svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1100px) {
    .directory-import-workspace--with-preview {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .directory-import-workspace--with-preview::before {
        content: "";
        display: none;
    }

    .directory-import-input,
    .directory-import-preview {
        grid-column: 1;
    }

    .directory-import-input {
        grid-row: 1;
    }

    .directory-import-preview {
        grid-row: 2;
    }

    .directory-import-preview > p {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .directory-import-panel .directory-step-head {
        padding-right: 0;
    }

    .directory-step-toggle {
        position: static;
        margin: -6px 0 16px 34px;
    }
}

.inline-action-message {
    min-height: 18px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-message-text);
}

.inline-action-message.ok {
    color: var(--inline-action-message-ok-text);
}

.inline-action-message.error {
    color: var(--inline-action-message-error-text);
}

.dept-preview-wrap {
    overflow: auto;
    border-radius: 10px;
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-table-surface);
    color: var(--color-text);
}

.simple-table-minimal th,
.simple-table-minimal td {
    border-bottom: 1px solid var(--color-table-border);
}

.simple-table th,
.simple-table td {
    padding: 10px;
    text-align: left;
    vertical-align: middle;
    border-color: var(--color-table-border);
}

.simple-table th {
    background: var(--color-table-header-surface);
    color: var(--color-table-header-text);
}

.simple-table tbody tr:hover > td {
    background: var(--color-table-row-hover);
}

.simple-table tr:last-child td {
    border-bottom: 0;
}

.simple-table tbody tr.is-inactive-row > td {
    opacity: 0.58;
}

@keyframes row-save-ok-fade {
    0% {
        background: var(--features-78-surface);
    }
    78% {
        background: var(--features-0-surface);
    }
    100% {
        background: transparent;
    }
}

.simple-table tbody tr.row-save-ok > td {
    animation: row-save-ok-fade 3.8s ease-out;
}

.list-item.row-save-ok {
    animation: row-save-ok-fade 3.8s ease-out;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--status-surface, var(--status-neutral-surface));
    border-color: var(--status-border, var(--status-neutral-border));
    color: var(--status-text, var(--status-neutral-text));
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    white-space: nowrap;
}

.status-chip.status-positive {
    border-color: var(--status-positive-border);
    background: var(--status-positive-surface);
    color: var(--status-positive-text);
}

.status-chip.status-running {
    border-color: var(--status-running-border);
    background: var(--status-running-surface);
    color: var(--status-running-text);
}

.status-chip.status-warning {
    border-color: var(--status-pending-border);
    background: var(--status-pending-surface);
    color: var(--status-pending-text);
}

.status-chip.status-negative {
    border-color: var(--status-negative-border);
    background: var(--status-negative-surface);
    color: var(--status-negative-text);
}

.status-chip.status-neutral {
    border-color: var(--status-neutral-border);
    background: var(--status-neutral-surface);
    color: var(--status-neutral-text);
}

.status-chip.will-add {
    --status-surface: var(--features-status-chip-will-add-status-surface);
    --status-text: var(--features-status-chip-will-add-status-text);
}

.status-chip.excluded {
    --status-surface: var(--features-status-chip-excluded-status-surface);
    --status-text: var(--features-status-chip-excluded-status-text);
}

.directory-preview-table tr.is-excluded td {
    color: var(--color-text-disabled);
    background: var(--color-surface-status);
}

.directory-preview-table tr.is-excluded .status-chip,
.directory-preview-table tr.is-excluded .directory-preview-remove {
    text-decoration: none;
}

.status-chip.exact-confirmed {
    --status-surface: var(--features-status-chip-exact-confirmed-status-surface);
    --status-text: var(--features-status-chip-exact-confirmed-status-text);
}

.status-chip.unmatched {
    --status-surface: var(--features-status-chip-unmatched-status-surface);
    --status-text: var(--features-status-chip-unmatched-status-text);
}

.status-chip.duplicate-in-list {
    --status-surface: var(--features-status-chip-duplicate-in-list-status-surface);
    --status-text: var(--features-status-chip-duplicate-in-list-status-text);
}

.status-chip.already-exists,
.status-chip.already-on-department,
.status-chip.already-on-direction {
    --status-surface: var(--features-status-chip-already-exists-status-chip-already-on-department-status-chip-already-on-dire-status-surface);
    --status-text: var(--features-status-chip-already-exists-status-chip-already-on-department-status-chip-already-on-dire-status-text);
}

.status-chip.exists-system-link {
    --status-surface: var(--features-status-chip-exists-system-link-status-surface);
    --status-text: var(--features-status-chip-exists-system-link-status-text);
}

.status-chip.similar-exists {
    --status-surface: var(--features-status-chip-similar-exists-status-surface);
    --status-text: var(--features-status-chip-similar-exists-status-text);
}

.status-chip.invalid {
    --status-surface: var(--features-status-chip-invalid-status-surface);
    --status-text: var(--features-status-chip-invalid-status-text);
}

.status-chip.archived {
    --status-border: var(--features-status-chip-archived-status-border);
    --status-surface: var(--features-status-chip-archived-status-surface);
    --status-text: var(--features-status-chip-archived-status-text);
}

.status-chip.published {
    --status-border: var(--features-status-chip-published-status-border);
    --status-surface: var(--features-status-chip-published-status-surface);
    --status-text: var(--features-status-chip-published-status-text);
}

.status-chip.draft {
    --status-border: var(--features-status-chip-draft-status-border);
    --status-surface: var(--features-status-chip-draft-status-surface);
    --status-text: var(--features-status-chip-draft-status-text);
}

.status-chip.work {
    --status-border: var(--features-status-chip-work-status-border);
    --status-surface: var(--features-status-chip-work-status-surface);
    --status-text: var(--features-status-chip-work-status-text);
}

.status-chip.review {
    --status-border: var(--features-status-chip-review-status-border);
    --status-surface: var(--features-status-chip-review-status-surface);
    --status-text: var(--features-status-chip-review-status-text);
}

.usage-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: var(--color-overlay-soft);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.usage-dialog {
    width: min(360px, 100%);
    border-radius: 10px;
    border: 1px solid var(--color-dialog-border);
    background: var(--color-dialog-surface);
    box-shadow: var(--features-usage-dialog-shadow);
    padding: 14px;
}

.usage-dialog-title {
    color: var(--usage-dialog-title-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.usage-dialog-body {
    margin-top: 10px;
    color: var(--usage-dialog-body-text);
    font-size: 13px;
    line-height: 1.4;
}

.usage-dialog-line + .usage-dialog-line {
    margin-top: 4px;
}

.usage-dialog-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.preview-name-main {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.preview-name-hint {
    margin-top: 4px;
    color: var(--preview-name-hint-text);
    font-size: 12px;
    line-height: 1.25;
}

.directory-list-table-wrap {
    overflow: hidden;
    border: 1px solid var(--color-filter-hover-border);
    border-radius: 8px;
    background: var(--color-surface);
}

#subjects-page-root .directory-list-table-wrap {
    overflow: visible;
}

.directory-list-table th {
    background: var(--color-surface-tinted);
    color: var(--color-data-table-header-text);
    font-size: 14px;
    font-weight: 600;
}

.directory-list-table td {
    color: var(--color-data-table-text);
    font-size: 14px;
}

.directory-list-table input[type="text"] {
    width: 100%;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    padding: 0 10px;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.directory-list-table input[type="text"]:focus {
    background: var(--color-surface);
    border-color: var(--directory-list-table-focus-border);
    box-shadow: var(--features-directory-list-table-input-type-text-focus-shadow);
    outline: none;
}

.directory-list-table .directory-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: row-reverse;
    gap: 8px;
    opacity: 0.38;
    transition: opacity 0.16s ease;
}

.directory-list-table tbody tr:hover .directory-row-actions,
.directory-list-table tbody tr:focus-within .directory-row-actions,
.directory-list-table .directory-row-actions:focus-within,
.directory-list-table tbody tr.is-dirty .directory-row-actions {
    opacity: 1;
}

.directory-list-table th:first-child,
.directory-list-table td:first-child,
.directory-preview-table th:first-child,
.directory-preview-table td:first-child {
    width: 26px;
    font-size: 14px;
}

.directory-list-table th:last-child,
.directory-list-table td:last-child {
    width: 120px;
    text-align: right;
}

.directory-list-table thead th {
    padding: 10px;
}

.directory-list-table thead th:not(:first-child):not(:last-child) {
    padding-left: 18px;
}

.directory-profile-list-table thead th:nth-child(2) {
    padding-left: 40px;
}

.directory-list-table tbody td {
    height: 42px;
    padding: 8px 10px;
    line-height: 1.3;
}

.directory-subject-list-table tbody td {
    vertical-align: middle;
}

.directory-subject-list-table tbody tr.has-linked-popover > td,
.directory-subject-list-table tbody tr:has(.directory-linked-popover) > td {
    vertical-align: top;
    padding-top: 14px;
}

.directory-subject-list-table tbody tr.has-linked-popover .directory-name-cell,
.directory-subject-list-table tbody tr:has(.directory-linked-popover) .directory-name-cell {
    align-items: stretch;
}

.directory-subject-list-table tbody tr.has-linked-popover > td:nth-child(1),
.directory-subject-list-table tbody tr.has-linked-popover > td:nth-child(4),
.directory-subject-list-table tbody tr.has-linked-popover > td:nth-child(5),
.directory-subject-list-table tbody tr:has(.directory-linked-popover) > td:nth-child(1),
.directory-subject-list-table tbody tr:has(.directory-linked-popover) > td:nth-child(4),
.directory-subject-list-table tbody tr:has(.directory-linked-popover) > td:nth-child(5) {
    padding-top: 22px;
}

.directory-subject-list-table tbody td.directory-subject-title-cell {
    position: relative;
}

.directory-subject-list-table tbody td.directory-subject-title-cell.has-linked-popover {
    padding-bottom: 44px;
}

.directory-subject-title-cell > .directory-linked-popover {
    position: absolute;
    left: 10px;
    bottom: 8px;
    margin-top: 0;
}

.directory-list-table tbody tr:hover > td {
    background: var(--color-data-table-tree-surface);
}

.directory-list-table tbody tr:focus-within,
.directory-list-table tbody tr.is-dirty {
    background: var(--color-toast-icon-bg);
}

.directory-list-table tbody tr:focus-within > td,
.directory-list-table tbody tr.is-dirty > td {
    background: transparent;
    color: var(--progress-fill-on-accent);
}

.directory-list-table tbody tr:focus-within input[type="text"],
.directory-list-table tbody tr:focus-within select,
.directory-list-table tbody tr.is-dirty input[type="text"],
.directory-list-table tbody tr.is-dirty select {
    border-color: var(--features-directory-list-table-tbody-tr-focus-within-input-type-text-directory-list-table-tbody-tr-border-color);
    background-color: var(--color-surface);
    color: var(--directory-list-table-focus-text);
    box-shadow: var(--features-directory-list-table-tbody-tr-focus-within-input-type-text-directory-list-table-tbody-tr-shadow);
}

.directory-list-table tbody tr:focus-within .table-action-btn,
.directory-list-table tbody tr.is-dirty .table-action-btn {
    border-color: var(--features-directory-list-table-tbody-tr-focus-within-table-action-btn-directory-list-table-tbody-t-border-color);
    background: transparent;
    color: var(--progress-fill-on-accent);
}

.directory-list-table tbody tr:focus-within .table-action-btn:hover,
.directory-list-table tbody tr:focus-within .table-action-btn:focus-visible,
.directory-list-table tbody tr.is-dirty .table-action-btn:hover,
.directory-list-table tbody tr.is-dirty .table-action-btn:focus-visible {
    border-color: var(--directory-list-table-table-action-btn-focus-border);
    background: transparent;
    color: var(--progress-fill-on-accent);
    outline: none;
}

.directory-profile-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within,
.directory-subject-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within {
    background: transparent;
}

.directory-profile-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within > td,
.directory-subject-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within > td {
    background: var(--color-surface);
    color: var(--color-data-table-text);
}

.directory-profile-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within .directory-name-cell input,
.directory-subject-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within .directory-name-cell input {
    color: var(--directory-profile-list-table-icon-save-btn-is-ai-suggested-focus-text);
}

.directory-profile-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within input.directory-ai-result-field,
.directory-subject-list-table tbody tr:has(.icon-save-btn.is-ai-suggested):focus-within input.directory-ai-result-field {
    color: var(--ai-result-text);
}

.directory-profile-list-table tbody tr.is-dirty .table-action-btn.table-action-danger,
.directory-subject-list-table tbody tr.is-dirty .table-action-btn.table-action-danger {
    border-color: var(--directory-profile-list-table-icon-save-btn-is-visible-border);
    background: var(--color-surface);
    color: var(--directory-profile-list-table-icon-save-btn-is-visible-text);
    opacity: 0.46;
}

.directory-profile-list-table tbody tr.is-dirty .table-action-btn.table-action-danger:hover,
.directory-profile-list-table tbody tr.is-dirty .table-action-btn.table-action-danger:focus-visible,
.directory-subject-list-table tbody tr.is-dirty .table-action-btn.table-action-danger:hover,
.directory-subject-list-table tbody tr.is-dirty .table-action-btn.table-action-danger:focus-visible {
    border-color: var(--directory-profile-list-table-icon-save-btn-is-visible-hover-border);
    background: var(--directory-profile-list-table-icon-save-btn-is-visible-hover-surface);
    color: var(--directory-profile-list-table-icon-save-btn-is-visible-hover-text);
    opacity: 1;
}

.directory-list-table-meta th:nth-child(3),
.directory-list-table-meta td:nth-child(3) {
    width: 180px;
}

.directory-list-table-meta th:nth-child(4),
.directory-list-table-meta td:nth-child(4) {
    width: 180px;
}

.directory-list-table-meta th:nth-child(5),
.directory-list-table-meta td:nth-child(5) {
    width: 160px;
}

.directory-linked-date {
    color: var(--directory-linked-date-text);
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
}

.directory-linked-secondary {
    margin-top: 4px;
    padding-left: 10px;
    color: var(--directory-linked-secondary-text);
    font-size: 12px;
    line-height: 1.35;
}

.directory-linked-popover {
    position: relative;
    display: inline-block;
    padding-left: 0;
}

.directory-linked-popover summary {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border: var(--directory-linked-popover-border);
    border-radius: 999px;
    background: var(--directory-linked-popover-surface);
    color: var(--directory-linked-popover-text);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.directory-linked-popover summary::-webkit-details-marker {
    display: none;
}

.directory-linked-popover summary::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.16s ease;
}

.directory-linked-popover[open] summary::after {
    transform: rotate(225deg) translateY(-1px);
}

.directory-linked-popover-panel {
    position: absolute;
    z-index: 80;
    top: calc(100% + 6px);
    left: 0;
    width: min(420px, 72vw);
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    border: var(--directory-linked-popover-panel-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: var(--features-directory-linked-popover-panel-shadow);
    scrollbar-width: thin;
    scrollbar-color: var(--directory-linked-popover-panel-scrollbar);
}

.directory-linked-popover-panel::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.directory-linked-popover-panel::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--color-surface-muted-strong);
}

.directory-linked-popover-panel::-webkit-scrollbar-thumb {
    border: var(--directory-linked-popover-panel-border-variant-2);
    border-radius: 999px;
    background: var(--directory-linked-popover-panel-surface);
}

.directory-linked-popover-panel::-webkit-scrollbar-thumb:hover {
    background: var(--directory-linked-popover-panel-hover-surface);
}

.directory-linked-popover-item {
    padding: 7px 8px;
    border-radius: 7px;
    color: var(--directory-linked-popover-item-text);
}

.directory-linked-popover-item:hover {
    background: var(--directory-linked-popover-item-hover-surface);
}

.directory-list-table tbody tr:focus-within .directory-linked-date,
.directory-list-table tbody tr:focus-within .directory-linked-secondary {
    color: var(--features-directory-list-table-tbody-tr-focus-within-directory-linked-date-directory-list-table-tb-text);
}

.directory-list-table tbody tr:focus-within .directory-linked-popover summary {
    border-color: var(--features-directory-list-table-tbody-tr-focus-within-directory-linked-popover-summary-border-color);
    background: var(--features-directory-list-table-tbody-tr-focus-within-directory-linked-popover-summary-surface);
    color: var(--progress-fill-on-accent);
}

.directory-list-table tbody tr:focus-within .directory-linked-popover-panel {
    color: var(--directory-list-table-directory-linked-popover-panel-focus-text);
}

.directory-list-table tbody tr.direction-level-row > td {
    padding-top: 14px;
    padding-bottom: 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-data-table-header-text);
    background: var(--color-surface-soft);
    border-bottom-color: var(--color-data-table-tree-border);
}

.teacher-linked-departments {
    margin-top: 0;
    padding-left: 10px;
    color: var(--teacher-linked-departments-text);
    font-size: 12px;
    line-height: 1.35;
}

.inline-link {
    color: var(--inline-link-text);
    text-decoration: none;
    border-bottom: var(--features-inline-link-border-bottom);
}

.inline-link:hover {
    color: var(--inline-link-hover-text);
    border-bottom-color: var(--features-inline-link-hover-border-bottom-color);
}

.directory-row-select {
    width: 100%;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: transparent;
    color: var(--directory-row-select-text);
    font-weight: 400;
    padding: 0 30px 0 8px;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.directory-row-select:focus {
    border-color: var(--directory-row-select-focus-border);
    background-color: var(--color-surface);
    color: var(--directory-row-select-focus-text);
    box-shadow: var(--features-directory-row-select-focus-shadow);
}

.directory-name-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.directory-name-cell input {
    width: 100%;
    min-width: 220px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    padding: 0 8px;
    background: transparent;
    outline: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.directory-list-table .directory-name-cell input,
.directory-list-table .directory-code-input {
    color: var(--directory-list-table-directory-name-cell-text);
    font-weight: 400;
}

.directory-name-cell input:focus {
    background: var(--directory-name-cell-focus-surface);
    box-shadow: var(--directory-name-cell-focus-shadow);
}

.directory-code-input {
    width: 100%;
    min-width: 90px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    padding: 0 8px;
    background: transparent;
    outline: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.directory-code-input:focus {
    background: var(--directory-code-input-focus-surface);
    box-shadow: var(--directory-code-input-focus-shadow);
}

.directory-list-table tbody tr:focus-within .directory-name-cell input,
.directory-list-table tbody tr:focus-within .directory-code-input {
    color: var(--directory-list-table-focus-text);
    background-color: var(--color-surface);
    box-shadow: var(--features-directory-list-table-tbody-tr-focus-within-directory-name-cell-input-directory-list-tabl-shadow);
}

.directory-list-table tbody tr:focus-within .custom-select-inline .custom-select-control {
    border-color: var(--features-directory-list-table-tbody-tr-focus-within-custom-select-inline-custom-select-control-border-color);
    background-color: var(--color-surface);
    color: var(--directory-list-table-focus-text);
    box-shadow: var(--features-directory-list-table-tbody-tr-focus-within-custom-select-inline-custom-select-control-shadow);
}

.education-form-list-head .directory-count-badge {
    grid-column: 4;
    justify-self: end;
}

.education-form-status-note {
    margin-bottom: 16px;
}

.education-forms-table th:nth-child(2) {
    min-width: 280px;
}

.education-forms-table th:nth-child(3) {
    width: 120px;
}

.directory-list-table.education-forms-table th:last-child,
.directory-list-table.education-forms-table td:last-child {
    width: 220px;
}

.education-forms-table tbody tr.is-inactive-row > td {
    opacity: 1;
    background-color: var(--presence-empty-surface);
}

.education-forms-table tbody tr.is-inactive-row .directory-name-cell input {
    color: var(--education-forms-table-is-inactive-row-directory-name-cell-text);
}

.directory-list-table .education-form-row-actions {
    flex-direction: row;
    justify-content: flex-end;
    opacity: 1;
}

.education-form-row-actions .btn {
    min-width: 86px;
    white-space: nowrap;
}

@media (max-width: 760px) {
}

.directory-profile-name-cell {
    flex-direction: row;
    align-items: center;
    gap: 9px;
}

.directory-profile-name-cell input {
    min-width: 0;
    flex: 1 1 auto;
}

input.directory-ai-result-field.is-ai-suggested {
    border: 2px solid transparent;
    background: var(--ai-result-field-background);
    background-size: 100% 100%, 230% 230%;
    background-position: 0 0, 0% 50%;
    color: var(--ai-result-text);
    font-weight: 400;
    box-shadow: none;
    animation: ai-accent-border-flow 3.6s ease-in-out infinite;
}

input.directory-ai-result-field.is-ai-suggested:focus {
    border-color: transparent;
    box-shadow: var(--ai-result-focus-ring);
    outline: none;
}

.directory-profile-list-table input.is-duplicate-short-name,
.directory-profile-list-table input.is-ai-suggested.is-duplicate-short-name,
.directory-subject-list-table input.is-duplicate-short-name,
.directory-subject-list-table input.is-ai-suggested.is-duplicate-short-name {
    border: var(--directory-profile-list-table-is-duplicate-short-name-border);
    background: var(--directory-profile-list-table-is-duplicate-short-name-surface);
    color: var(--directory-profile-list-table-is-duplicate-short-name-text);
    animation: none;
}

.directory-profile-list-table input.is-duplicate-short-name:focus,
.directory-profile-list-table input.is-ai-suggested.is-duplicate-short-name:focus,
.directory-subject-list-table input.is-duplicate-short-name:focus,
.directory-subject-list-table input.is-ai-suggested.is-duplicate-short-name:focus {
    border-color: var(--directory-profile-list-table-is-duplicate-short-name-focus-border);
    box-shadow: var(--features-directory-profile-list-table-input-is-duplicate-short-name-focus-directory-profile-list--shadow);
    outline: none;
}

.directory-profile-list-table .icon-save-btn.is-ai-suggested,
.directory-profile-list-table tbody tr:has(.icon-save-btn.is-ai-suggested) .icon-save-btn.is-ai-suggested,
.directory-subject-list-table .icon-save-btn.is-ai-suggested,
.directory-subject-list-table tbody tr:has(.icon-save-btn.is-ai-suggested) .icon-save-btn.is-ai-suggested {
    border: 2px solid transparent;
    background:
        var(--ai-result-save-background);
    background-size: 100% 100%, 230% 230%;
    background-position: 0 0, 0% 50%;
    color: var(--ai-action-on-accent-text);
    box-shadow: none;
    animation: ai-accent-border-flow 3.6s ease-in-out infinite;
}

.directory-profile-list-table .icon-save-btn.is-ai-suggested:hover,
.directory-profile-list-table .icon-save-btn.is-ai-suggested:focus-visible,
.directory-subject-list-table .icon-save-btn.is-ai-suggested:hover,
.directory-subject-list-table .icon-save-btn.is-ai-suggested:focus-visible {
    filter: saturate(1.06);
    color: var(--ai-action-on-accent-text);
    outline: none;
}

.directory-profile-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 10px;
    box-shadow: var(--features-directory-profile-dot-shadow);
}

.directory-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    opacity: 0.38;
    transition: opacity 0.16s ease;
}

.groups-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}

.groups-page-head > div {
    min-width: 0;
}

.groups-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.groups-more-btn {
    min-width: 44px;
    padding-inline: 12px;
}

.groups-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.groups-toolbar-panel {
    min-width: 0;
    max-width: 100%;
}

.groups-list-panel {
    min-width: 0;
    max-width: 100%;
    overflow: auto;
    padding: 18px;
    border-radius: 8px;
    box-shadow: var(--features-groups-list-panel-shadow);
}

.groups-editor-panel.slot-editor-panel {
    --drawer-width: 650px;
    box-shadow: var(--features-groups-editor-panel-slot-editor-panel-shadow);
}

.groups-import-scroll.schedules-drawer-scroll.slot-editor-scroll-area {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.groups-import-scroll::-webkit-scrollbar {
    width: 10px;
}

.groups-import-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: transparent;
}

.groups-import-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    background-clip: padding-box;
}

.groups-import-upload {
    box-sizing: border-box;
    width: 100%;
}

.groups-import-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 10px;
    min-width: 0;
}

.groups-import-summary article {
    min-width: 0;
    padding: 12px 14px;
    border: var(--groups-import-summary-border);
    border-radius: 8px;
    background: var(--color-data-table-tree-surface);
    box-sizing: border-box;
}

.groups-import-summary strong {
    display: block;
    color: var(--groups-import-summary-text);
    font-size: 22px;
    line-height: 1.1;
}

.groups-import-summary span {
    display: block;
    margin-top: 4px;
    color: var(--groups-import-summary-text-variant-2);
    font-size: 12px;
}

.groups-import-table-wrap {
    overflow: visible;
    border: 1px solid var(--calendar-month-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-sizing: border-box;
}

.groups-import-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.groups-import-col-rows {
    width: 7%;
}

.groups-import-col-group {
    width: 13%;
}

.groups-import-col-faculty {
    width: 17%;
}

.groups-import-col-form {
    width: 9%;
}

.groups-import-col-course {
    width: 6%;
}

.groups-import-col-profiles {
    width: 38%;
}

.groups-import-col-status {
    width: 10%;
}

.groups-import-table th,
.groups-import-table td {
    vertical-align: top;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: normal;
}

.groups-import-table.simple-table th,
.groups-import-table.simple-table td {
    padding: 8px 9px;
}

.groups-import-table th {
    color: var(--groups-import-table-text);
    white-space: nowrap;
}

.groups-import-table td:nth-child(2) {
    font-weight: 400;
}

.groups-import-table th:first-child,
.groups-import-table td:first-child {
    width: 7%;
    color: var(--groups-import-table-text-variant-2);
    white-space: normal;
    overflow-wrap: anywhere;
}

.groups-import-table th:nth-child(2),
.groups-import-table td:nth-child(2) {
    width: 13%;
}

.groups-import-table th:nth-child(3),
.groups-import-table td:nth-child(3) {
    width: 17%;
}

.groups-import-table th:nth-child(4),
.groups-import-table td:nth-child(4) {
    width: 9%;
}

.groups-import-table th:nth-child(5),
.groups-import-table td:nth-child(5) {
    width: 6%;
    text-align: center;
}

.groups-import-table th:nth-child(6),
.groups-import-table td:nth-child(6) {
    width: 38%;
}

.groups-import-table th:nth-child(7),
.groups-import-table td:nth-child(7) {
    width: 10%;
}

.groups-import-table .group-profile-badge {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 400;
    max-width: 100%;
    white-space: normal;
}

.groups-import-row-invalid {
    background: var(--groups-import-row-invalid-surface);
}

.groups-import-row-existing {
    background: var(--groups-import-row-existing-surface);
}

.teachers-source-table th:first-child,
.teachers-source-table td:first-child {
    width: 24%;
}

.teachers-source-table th:nth-child(2),
.teachers-source-table td:nth-child(2) {
    width: auto;
}

.teachers-source-table th:nth-child(3),
.teachers-source-table td:nth-child(3) {
    width: 150px;
}

.teachers-source-table th:nth-child(4),
.teachers-source-table td:nth-child(4) {
    width: 180px;
    text-align: right;
    white-space: nowrap;
}

.teacher-xlsx-import-teachers-btn {
    min-height: 30px;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
}

.teachers-source-table tr.is-imported td {
    background: var(--teachers-source-table-is-imported-surface);
}

.teachers-source-table .status-chip.imported {
    --status-surface: var(--features-teachers-source-table-status-chip-imported-status-surface);
    --status-text: var(--features-teachers-source-table-status-chip-imported-status-text);
}

.teachers-source-table .status-chip.matched {
    --status-surface: var(--features-teachers-source-table-status-chip-matched-status-surface);
    --status-text: var(--features-teachers-source-table-status-chip-matched-status-text);
}

.teachers-source-table .status-chip.missing {
    --status-surface: var(--features-teachers-source-table-status-chip-missing-status-surface);
    --status-text: var(--features-teachers-source-table-status-chip-missing-status-text);
}

.teachers-source-table tr.is-excluded td {
    color: var(--color-text-disabled);
    background: var(--color-surface-status);
    text-decoration: line-through;
}

.teachers-source-table tr.is-excluded .muted,
.teachers-source-table tr.is-excluded .status-chip,
.teachers-source-table tr.is-excluded .directory-preview-remove {
    text-decoration: none;
}

.groups-import-issues {
    display: grid;
    gap: 2px;
    margin-top: 6px;
    color: var(--groups-import-issues-text);
    font-size: 12px;
    line-height: 1.35;
}

.groups-editor-panel .slot-editor-close {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-strong);
    font-size: 18px;
    line-height: 1;
}

.groups-editor-panel .slot-editor-close:hover,
.groups-editor-panel .slot-editor-close:focus-visible {
    background: var(--color-surface-hover);
}

.groups-editor-panel .slot-editor-meta {
    display: block;
    margin-top: 4px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.groups-editor-panel .slot-editor-head {
    align-items: center;
    gap: 10px;
    padding-bottom: 2px;
}

.groups-editor-panel .slot-editor-title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.groups-editor-panel .slot-editor-head h2 {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.groups-editor-scroll {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
    padding: 0 4px 12px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.groups-editor-message:empty {
    display: none;
}

.groups-editor-form-card {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--directory-editor-border);
    border-radius: 8px;
    background: linear-gradient(90deg, var(--accent-teal) 0%, var(--accent-cyan) 58%, var(--accent) 100%) 0 0 / 100% 4px no-repeat, var(--directory-editor-surface);
    box-shadow: var(--directory-editor-shadow);
    box-sizing: border-box;
}

.groups-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px 12px;
    min-width: 0;
}

.groups-editor-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-meta);
}

.groups-editor-grid label b {
    color: var(--groups-editor-grid-text);
}

.groups-editor-grid input,
.groups-editor-grid select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 36px;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 9px;
    background: var(--color-control-bg);
    padding: 7px 10px;
    color: var(--color-text);
    font: inherit;
    outline: none;
    box-sizing: border-box;
}

.groups-editor-grid input:focus,
.groups-editor-grid select:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 3px var(--color-control-focus-ring);
}

label.group-form-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.groups-editor-block {
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    box-sizing: border-box;
}

.groups-profile-picker-block {
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.groups-editor-block h3 {
    margin: 0 0 3px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--groups-editor-block-text);
}

.groups-editor-block p {
    margin: 0 0 10px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.profile-picker {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-picker-container {
    width: 100%;
    min-width: 0;
    border: var(--profile-picker-container-border);
    border-radius: 10px;
    background: var(--profile-picker-container-surface);
    padding: 8px;
    gap: 0;
    box-sizing: border-box;
}

.profile-picker-selected-zone {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    background: var(--color-surface);
    border: 0;
    border-radius: 8px;
    padding: 0;
    box-sizing: border-box;
}

.profile-picker-search-zone {
    margin-top: 10px;
}

.profile-picker-search-input {
    width: 100%;
    min-width: 0;
    height: 36px;
    border: var(--profile-picker-search-input-border);
    border-radius: 9px;
    background: var(--color-surface);
    padding: 7px 10px;
    font-size: 13px;
    color: var(--profile-picker-search-input-text);
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
    box-sizing: border-box;
}

.profile-picker-search-input::placeholder {
    color: var(--profile-picker-search-input-text-variant-2);
}

.profile-picker-search-input:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: var(--features-profile-picker-search-input-focus-shadow);
    background: var(--profile-picker-search-input-focus-surface);
}

.profile-picker-results {
    width: 100%;
    background: transparent;
    max-height: 260px;
    overflow: auto;
}

.profile-picker-results-zone {
    margin-top: 10px;
}

.profile-picker-result {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 2px;
    border-bottom: var(--profile-picker-result-border);
    cursor: pointer;
    transition: background-color 0.12s ease;
    border-radius: 8px;
}

.profile-picker-result:last-child {
    border-bottom: 0;
}

.profile-picker-result:hover {
    background: var(--profile-picker-result-hover-surface);
}

.profile-picker-result.is-joint-candidate {
    margin-bottom: 8px;
    padding: 9px 10px;
    border: var(--profile-picker-result-is-joint-candidate-border);
    background: var(--calendar-warning-surface);
    color: var(--color-warning-contrast-text);
}

.profile-picker-result.is-joint-candidate:hover {
    background: var(--profile-picker-result-is-joint-candidate-hover-surface);
}

.profile-picker-result-main {
    min-width: 0;
    flex: 1;
}

.profile-picker-result-name {
    font-size: 14px;
    color: var(--profile-picker-result-name-text);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-picker-result-meta {
    font-size: 12px;
    color: var(--profile-picker-result-meta-text);
    margin-top: 2px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-picker-result-hint {
    color: var(--profile-picker-result-hint-text);
    font-weight: 500;
}

.profile-picker-add-btn {
    border: 0;
    background: transparent;
    color: var(--profile-picker-add-btn-text);
    font-size: 12px;
    font-weight: 500;
    padding: 0 2px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.12s ease;
}

.profile-picker-add-btn:hover {
    color: var(--profile-picker-add-btn-hover-text);
    text-decoration: underline;
}

.profile-picker-selected {
    margin-top: 0;
}

.profile-picker-chips {
    min-height: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-picker-empty,
.profile-picker-empty-result {
    color: var(--profile-picker-empty-text);
    font-size: 13px;
}

.profile-picker-empty {
    margin-top: 0;
}

.profile-picker-empty.is-hidden {
    display: none;
}

.profile-picker-empty-result {
    padding: 8px 2px 2px;
}

.profile-level-group + .profile-level-group {
    margin-top: 10px;
}

.profile-level-group-title {
    margin-bottom: 4px;
    color: var(--profile-level-group-title-text);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0;
}

.profile-selected-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 46px;
    padding: 7px 9px;
    border: var(--profile-selected-item-border);
    border-radius: 8px;
    background: var(--grid-row-hover-surface);
}

.profile-selected-item + .profile-selected-item {
    margin-top: 8px;
}

.profile-selected-item:last-child {
    border-bottom: var(--profile-selected-item-border);
}

.profile-selected-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-selected-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border-radius: 999px;
}

.profile-selected-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--profile-selected-name-text);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-selected-direction {
    color: var(--profile-selected-direction-text);
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-selected-remove {
    min-width: 68px;
    height: 30px;
    border: 1px solid var(--color-popover-border);
    border-radius: 7px;
    background: var(--color-surface);
    color: var(--profile-selected-remove-text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    padding: 0 10px;
    flex-shrink: 0;
}

.groups-editor-panel .slot-editor-actions {
    margin: 0 0 0 calc(-1 * var(--drawer-padding-left));
    padding: 8px 18px 10px;
}

.profile-selected-remove:hover {
    border-color: var(--profile-selected-remove-hover-border);
    background: var(--color-data-table-tree-surface);
    color: var(--profile-selected-remove-hover-text);
    text-decoration: none;
}

.groups-list-table th:nth-child(1),
.groups-list-table td:nth-child(1) {
    width: 52px;
}

.groups-list-table th:nth-child(2),
.groups-list-table td:nth-child(2) {
    width: 30%;
}

.groups-list-table th:nth-child(3),
.groups-list-table td:nth-child(3) {
    width: 44%;
}

.groups-list-table th:nth-child(4),
.groups-list-table td:nth-child(4) {
    width: 132px;
}

.groups-list-table {
    min-width: 760px;
    border: 1px solid var(--color-data-table-border);
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.groups-list-table th {
    background: var(--color-data-table-header-surface);
    color: var(--color-data-table-header-text);
    font-size: 14px;
    font-weight: 600;
}

.groups-list-table td {
    color: var(--color-data-table-text);
    font-size: 14px;
}

.groups-list-table tbody tr:not(.group-tree-row):hover > td {
    background: var(--color-data-table-row-hover);
}

.groups-list-table tbody td {
    height: 42px;
    padding: 8px 10px;
    line-height: 1.3;
}

.groups-list-table thead th {
    padding: 10px;
}

.rooms-toolbar {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.rooms-list-panel {
    overflow-x: auto;
}

.rooms-list-table {
    --rooms-column-sequence-width: 4.35%;
    --rooms-column-name-width: 20%;
    --rooms-column-building-width: 18%;
    --rooms-column-floor-width: 7.35%;
    --rooms-column-capacity-width: 10%;
    --rooms-column-type-width: 13%;
    --rooms-column-accessible-width: 6.35%;
    --rooms-column-status-width: 9.85%;
    --rooms-column-actions-width: 11.1%;
    --rooms-cell-inline-padding: 10px;
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.rooms-list-table th:nth-child(1),
.rooms-list-table td:nth-child(1) {
    width: var(--rooms-column-sequence-width);
}

.rooms-list-table th:nth-child(2),
.rooms-list-table td:nth-child(2) {
    width: var(--rooms-column-name-width);
}

.rooms-list-table th:nth-child(3),
.rooms-list-table td:nth-child(3) {
    width: var(--rooms-column-building-width);
}

.rooms-list-table th:nth-child(4),
.rooms-list-table td:nth-child(4) {
    width: var(--rooms-column-floor-width);
}

.rooms-list-table th:nth-child(5),
.rooms-list-table td:nth-child(5) {
    width: var(--rooms-column-capacity-width);
}

.rooms-list-table th:nth-child(6),
.rooms-list-table td:nth-child(6) {
    width: var(--rooms-column-type-width);
}

.rooms-list-table th:nth-child(7),
.rooms-list-table td:nth-child(7) {
    width: var(--rooms-column-accessible-width);
}

.rooms-list-table th:nth-child(8),
.rooms-list-table td:nth-child(8) {
    width: var(--rooms-column-status-width);
}

.rooms-list-table th:nth-child(9),
.rooms-list-table td:nth-child(9) {
    width: var(--rooms-column-actions-width);
}

.rooms-list-table td:nth-child(3),
.rooms-list-table td:nth-child(6) {
    overflow-wrap: anywhere;
}

.rooms-list-table thead th,
.rooms-list-table tbody td {
    padding-left: var(--rooms-cell-inline-padding);
    padding-right: var(--rooms-cell-inline-padding);
}

@media (min-width: 1025px) and (max-width: 1239px) {
    .rooms-list-table {
        --rooms-column-sequence-width: 4.8%;
        --rooms-column-name-width: 14.9%;
        --rooms-column-building-width: 13.1%;
        --rooms-column-floor-width: 6.85%;
        --rooms-column-capacity-width: 13.2%;
        --rooms-column-type-width: 14.25%;
        --rooms-column-accessible-width: 6.85%;
        --rooms-column-status-width: 11.5%;
        --rooms-column-actions-width: 14.55%;
        --rooms-cell-inline-padding: 6px;
    }

    .rooms-list-table .room-actions {
        flex-wrap: nowrap;
    }
}

.rooms-editor-field-wide {
    grid-column: 1 / -1;
}

.rooms-editor-field-wide textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 10px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    padding: 10px 12px;
}

.rooms-import-table th:first-child,
.rooms-import-table td:first-child {
    width: 7%;
}

.rooms-import-table th:nth-child(2),
.rooms-import-table td:nth-child(2) {
    width: 15%;
}

.rooms-import-table th:nth-child(3),
.rooms-import-table td:nth-child(3) {
    width: 15%;
}

.rooms-import-table th:nth-child(4),
.rooms-import-table td:nth-child(4) {
    width: 7%;
    text-align: left;
}

.rooms-import-table th:nth-child(5),
.rooms-import-table td:nth-child(5) {
    width: 9%;
    text-align: left;
}

.rooms-import-table th:nth-child(6),
.rooms-import-table td:nth-child(6) {
    width: 16%;
}

.rooms-import-table th:nth-child(7),
.rooms-import-table td:nth-child(7) {
    width: 7%;
}

.rooms-import-table th:nth-child(8),
.rooms-import-table td:nth-child(8) {
    width: 24%;
}

.room-name-link {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
    text-align: left;
    vertical-align: middle;
}

.room-actions {
    justify-content: flex-end;
}

.room-status-badge {
    border: 1px solid transparent;
    font-weight: 500;
}

.room-status-badge.is-active {
    background: var(--status-positive-surface);
    color: var(--status-positive-text);
    border-color: var(--status-positive-border);
}

.room-status-badge.is-inactive {
    background: var(--status-neutral-surface);
    color: var(--status-neutral-text);
    border-color: var(--status-neutral-border);
}

.groups-list-profiles {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.groups-list-table .group-tree-row > td {
    height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
    background: var(--color-data-table-tree-surface);
    border-bottom-color: var(--color-data-table-tree-border);
}

.groups-list-table .group-tree-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--color-tree-text);
    text-decoration: none;
}

.groups-list-table .group-tree-marker {
    width: 12px;
    color: var(--color-tree-text);
    font-size: 11px;
}

.groups-list-table .group-tree-count {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 7px;
    background: var(--groups-list-table-group-tree-count-surface);
    color: var(--groups-list-table-group-tree-count-text);
    font-size: 12px;
    font-weight: 600;
}

.groups-list-table .group-tree-toggle:hover,
.groups-list-table .group-tree-toggle:focus {
    text-decoration: none;
}

.groups-list-table .group-tree-toggle-level-1 {
    font-size: 15px;
}

.groups-list-table .group-tree-toggle-level-2 {
    margin-left: 22px;
    font-size: 14px;
}

.groups-list-table .group-tree-toggle-level-3 {
    margin-left: 44px;
    font-size: 13px;
}

.group-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-name-link {
    color: var(--group-name-link-text);
    font-weight: 600;
}

.group-profile-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 7px;
    color: var(--group-profile-badge-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.profile-color-1 {
    background: var(--profile-color-1-surface);
    color: var(--profile-color-1-text);
}

.profile-selected-dot.profile-color-1 {
    background: var(--profile-color-1-dot);
}

.directory-profile-dot.profile-color-1 {
    background: var(--profile-color-1-directory-dot);
}

.profile-color-2 {
    background: var(--profile-color-2-surface);
    color: var(--profile-color-2-text);
}

.profile-selected-dot.profile-color-2 {
    background: var(--profile-color-2-dot);
}

.directory-profile-dot.profile-color-2 {
    background: var(--profile-color-2-directory-dot);
}

.profile-color-3 {
    background: var(--profile-color-3-surface);
    color: var(--profile-color-3-text);
}

.profile-selected-dot.profile-color-3 {
    background: var(--profile-color-3-dot);
}

.directory-profile-dot.profile-color-3 {
    background: var(--profile-color-3-directory-dot);
}

.profile-color-4 {
    background: var(--profile-color-4-surface);
    color: var(--profile-color-4-text);
}

.profile-selected-dot.profile-color-4 {
    background: var(--profile-color-4-dot);
}

.directory-profile-dot.profile-color-4 {
    background: var(--profile-color-4-directory-dot);
}

.profile-color-5 {
    background: var(--profile-color-5-surface);
    color: var(--profile-color-5-text);
}

.profile-selected-dot.profile-color-5 {
    background: var(--profile-color-5-dot);
}

.directory-profile-dot.profile-color-5 {
    background: var(--profile-color-5-directory-dot);
}

.profile-color-6 {
    background: var(--profile-color-6-surface);
    color: var(--profile-color-6-text);
}

.profile-selected-dot.profile-color-6 {
    background: var(--profile-color-6-dot);
}

.directory-profile-dot.profile-color-6 {
    background: var(--profile-color-6-directory-dot);
}

.profile-color-7 {
    background: var(--profile-color-7-surface);
    color: var(--profile-color-7-text);
}

.profile-selected-dot.profile-color-7 {
    background: var(--profile-color-7-dot);
}

.directory-profile-dot.profile-color-7 {
    background: var(--profile-color-7-directory-dot);
}

.profile-color-8 {
    background: var(--profile-color-8-surface);
    color: var(--profile-color-8-text);
}

.profile-selected-dot.profile-color-8 {
    background: var(--profile-color-8-dot);
}

.directory-profile-dot.profile-color-8 {
    background: var(--profile-color-8-directory-dot);
}

.profile-color-9 {
    background: var(--profile-color-9-surface);
    color: var(--profile-color-9-text);
}

.profile-selected-dot.profile-color-9 {
    background: var(--profile-color-9-dot);
}

.directory-profile-dot.profile-color-9 {
    background: var(--profile-color-9-directory-dot);
}

.profile-color-10 {
    background: var(--profile-color-10-surface);
    color: var(--profile-color-10-text);
}

.profile-selected-dot.profile-color-10 {
    background: var(--profile-color-10-dot);
}

.directory-profile-dot.profile-color-10 {
    background: var(--profile-color-10-directory-dot);
}

.profile-color-11 {
    background: var(--profile-color-11-surface);
    color: var(--profile-color-11-text);
}

.profile-selected-dot.profile-color-11 {
    background: var(--profile-color-11-dot);
}

.directory-profile-dot.profile-color-11 {
    background: var(--profile-color-11-directory-dot);
}

.profile-color-12 {
    background: var(--profile-color-12-surface);
    color: var(--profile-color-12-text);
}

.profile-selected-dot.profile-color-12 {
    background: var(--profile-color-12-dot);
}

.directory-profile-dot.profile-color-12 {
    background: var(--profile-color-12-directory-dot);
}

.profile-color-13 {
    background: var(--profile-color-13-surface);
    color: var(--profile-color-13-text);
}

.profile-selected-dot.profile-color-13 {
    background: var(--profile-color-13-dot);
}

.directory-profile-dot.profile-color-13 {
    background: var(--profile-color-13-directory-dot);
}

.profile-color-14 {
    background: var(--profile-color-14-surface);
    color: var(--profile-color-14-text);
}

.profile-selected-dot.profile-color-14 {
    background: var(--profile-color-14-dot);
}

.directory-profile-dot.profile-color-14 {
    background: var(--profile-color-14-directory-dot);
}

.profile-color-15 {
    background: var(--profile-color-15-surface);
    color: var(--profile-color-15-text);
}

.profile-selected-dot.profile-color-15 {
    background: var(--profile-color-15-dot);
}

.directory-profile-dot.profile-color-15 {
    background: var(--profile-color-15-directory-dot);
}

.profile-color-16 {
    background: var(--profile-color-16-surface);
    color: var(--profile-color-16-text);
}

.profile-selected-dot.profile-color-16 {
    background: var(--profile-color-16-dot);
}

.directory-profile-dot.profile-color-16 {
    background: var(--profile-color-16-directory-dot);
}

.profile-color-17 {
    background: var(--profile-color-17-surface);
    color: var(--profile-color-17-text);
}

.profile-selected-dot.profile-color-17 {
    background: var(--profile-color-17-dot);
}

.directory-profile-dot.profile-color-17 {
    background: var(--profile-color-17-directory-dot);
}

.profile-color-18 {
    background: var(--profile-color-18-surface);
    color: var(--profile-color-18-text);
}

.profile-selected-dot.profile-color-18 {
    background: var(--profile-color-18-dot);
}

.directory-profile-dot.profile-color-18 {
    background: var(--profile-color-18-directory-dot);
}

.profile-color-19 {
    background: var(--profile-color-19-surface);
    color: var(--profile-color-19-text);
}

.profile-selected-dot.profile-color-19 {
    background: var(--profile-color-19-dot);
}

.directory-profile-dot.profile-color-19 {
    background: var(--profile-color-19-directory-dot);
}

.profile-color-20 {
    background: var(--profile-color-20-surface);
    color: var(--profile-color-20-text);
}

.profile-selected-dot.profile-color-20 {
    background: var(--profile-color-20-dot);
}

.directory-profile-dot.profile-color-20 {
    background: var(--profile-color-20-directory-dot);
}

.profile-color-21 {
    background: var(--profile-color-21-surface);
    color: var(--profile-color-21-text);
}

.profile-selected-dot.profile-color-21 {
    background: var(--profile-color-21-dot);
}

.directory-profile-dot.profile-color-21 {
    background: var(--profile-color-21-directory-dot);
}

.profile-color-22 {
    background: var(--profile-color-22-surface);
    color: var(--profile-color-22-text);
}

.profile-selected-dot.profile-color-22 {
    background: var(--profile-color-22-dot);
}

.directory-profile-dot.profile-color-22 {
    background: var(--profile-color-22-directory-dot);
}

.profile-color-23 {
    background: var(--profile-color-23-surface);
    color: var(--profile-color-23-text);
}

.profile-selected-dot.profile-color-23 {
    background: var(--profile-color-23-dot);
}

.directory-profile-dot.profile-color-23 {
    background: var(--profile-color-23-directory-dot);
}

.profile-color-24 {
    background: var(--profile-color-24-surface);
    color: var(--profile-color-24-text);
}

.profile-selected-dot.profile-color-24 {
    background: var(--profile-color-24-dot);
}

.directory-profile-dot.profile-color-24 {
    background: var(--profile-color-24-directory-dot);
}

.group-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
    flex-wrap: wrap;
    opacity: 0.38;
    transition: opacity 0.16s ease;
}

.groups-list-table tbody tr:hover .group-actions,
.group-actions:focus-within {
    opacity: 1;
}

.group-row-action.schedules-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.group-row-action.schedules-action-btn svg {
    width: 15px;
    height: 15px;
}

.group-actions-menu-wrap {
    position: relative;
}

.group-actions-menu-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--group-actions-menu-btn-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.group-actions-menu-btn:hover,
.group-actions-menu-btn:focus-visible {
    background: var(--status-info-surface);
}

.group-actions-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 20;
    min-width: 164px;
    padding: 6px;
    border: var(--group-actions-menu-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--features-group-actions-menu-shadow);
}

.group-actions-menu.is-hidden {
    display: none;
}

.group-actions-menu .text-action {
    width: 100%;
    min-height: 30px;
    justify-content: flex-start;
    padding: 5px 8px;
    border-radius: 6px;
    text-align: left;
}

.group-actions-menu .text-action:hover {
    background: var(--group-actions-menu-text-action-hover-surface);
    text-decoration: none;
}

@media (max-width: 980px) {
    .app-shell[data-active-nav="groups"] .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-collapsed-width);
        height: auto;
        padding-left: 7px;
        padding-right: 7px;
        overflow: hidden;
    }

    .app-shell[data-active-nav="groups"] .app-sidebar:hover {
        width: var(--sidebar-width);
        padding-left: 14px;
        padding-right: 14px;
        box-shadow: var(--features-body-has-grid-workspace-app-sidebar-hover-shadow);
    }

    .app-shell[data-active-nav="groups"] .brand {
        padding: 0;
        justify-content: center;
    }

    .app-shell[data-active-nav="groups"] .app-sidebar:hover .brand {
        padding: 0 8px;
        justify-content: flex-start;
    }

    .app-shell[data-active-nav="groups"] .brand-text,
    .app-shell[data-active-nav="groups"] .nav-text {
        opacity: 0;
        max-width: 0;
    }

    .app-shell[data-active-nav="groups"] .app-sidebar:hover .brand-text,
    .app-shell[data-active-nav="groups"] .app-sidebar:hover .nav-text {
        opacity: 1;
        max-width: 190px;
    }

    .app-shell[data-active-nav="groups"] .nav-link {
        justify-content: center;
        gap: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-shell[data-active-nav="groups"] .nav-start-close {
        display: none;
    }

    .app-shell[data-active-nav="groups"] .app-sidebar:hover .nav-link {
        justify-content: flex-start;
        gap: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-shell[data-active-nav="groups"] .app-sidebar:hover .nav-start-close {
        display: inline-flex;
    }

    .app-shell[data-active-nav="groups"] .app-main {
        margin-left: var(--sidebar-collapsed-width);
        padding: 12px 12px 48px;
    }

    .groups-page-head,
    .groups-head-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .groups-head-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .groups-list-toolbar {
        grid-template-columns: 1fr;
    }

    .groups-tree-toggle-btn {
        justify-self: start;
    }

    .groups-editor-panel.slot-editor-panel {
        width: 100vw;
        padding: 22px 20px 0;
    }

    .groups-editor-grid {
        grid-template-columns: 1fr;
    }
}

/* In editable directory rows keep same content inset as headers: no double left/right padding (td + input). */
.simple-table td .directory-name-cell input,
.simple-table td .directory-code-input,
.simple-table td .directory-row-select {
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;
    margin: 0;
}

.text-action {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: 0;
    display: inline;
    color: var(--color-text-control);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    filter: none;
    transform: none;
}

.text-action:hover {
    color: var(--color-text-control-hover);
    text-decoration: underline;
}

.text-action-danger:hover {
    color: var(--text-action-danger-hover-text);
}

.table-inline-link {
    color: var(--table-inline-link-text);
    font-weight: 500;
    text-decoration: none;
}

.table-inline-link:hover,
.table-inline-link:focus-visible {
    color: var(--table-inline-link-hover-text);
    text-decoration: underline;
    outline: none;
}

.table-inline-input {
    width: 100%;
    min-width: 0;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 500;
    padding: 0 10px;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.table-inline-input:focus {
    border-color: var(--table-inline-input-focus-border);
    background: var(--color-surface);
    color: var(--table-inline-input-focus-text);
    box-shadow: var(--features-table-inline-input-focus-shadow);
    outline: none;
}

.table-action-btn.icon-save-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: var(--icon-save-btn-border);
    background: var(--icon-save-btn-surface);
    color: var(--icon-save-btn-text);
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.table-action-btn.icon-save-btn.is-visible {
    display: inline-flex;
    pointer-events: auto;
    opacity: 1;
}

.table-action-btn.icon-save-btn:hover {
    background: var(--icon-save-btn-hover-surface);
}

.directory-profile-list-table .icon-save-btn.is-visible.is-ai-suggested,
.directory-subject-list-table .icon-save-btn.is-visible.is-ai-suggested {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
    border: 2px solid transparent;
    background:
        var(--ai-result-save-background);
    background-size: 100% 100%, 230% 230%;
    background-position: 0 0, 0% 50%;
    color: var(--ai-action-on-accent-text);
    box-shadow: none;
    animation: ai-accent-border-flow 3.6s ease-in-out infinite;
}

.directory-profile-list-table .icon-save-btn.is-visible.is-ai-suggested:hover,
.directory-profile-list-table .icon-save-btn.is-visible.is-ai-suggested:focus-visible,
.directory-subject-list-table .icon-save-btn.is-visible.is-ai-suggested:hover,
.directory-subject-list-table .icon-save-btn.is-visible.is-ai-suggested:focus-visible {
    color: var(--ai-action-on-accent-text);
    filter: saturate(1.06);
    outline: none;
}

.table-action-btn {
    width: 32px;
    height: 32px;
    border: var(--table-action-btn-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--table-action-btn-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.table-action-btn:hover {
    border-color: var(--table-action-btn-hover-border);
    background: var(--color-table-row-hover);
}

.table-action-btn.table-action-danger {
    color: var(--table-action-btn-table-action-danger-text);
}

.table-action-btn.table-action-danger:hover {
    border-color: var(--table-action-btn-table-action-danger-hover-border);
    background: var(--table-action-btn-table-action-danger-hover-surface);
    color: var(--table-action-btn-table-action-danger-hover-text);
}

.table-action-btn.table-action-restore {
    color: var(--table-action-btn-table-action-restore-text);
}

.table-action-btn.table-action-restore:hover {
    border-color: var(--table-action-btn-table-action-restore-hover-border);
    background: var(--table-action-btn-table-action-restore-hover-surface);
    color: var(--table-action-btn-table-action-restore-hover-text);
}

.table-action-btn svg {
    display: block;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    max-height: 18px;
    flex: 0 0 18px;
    overflow: visible;
}

.simple-table td:last-child,
.simple-table th:last-child {
    white-space: nowrap;
}

.schedules-page-head {
    margin-bottom: 14px;
}

.schedules-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.schedules-head-btn {
    gap: 6px;
}

.schedules-btn-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.schedules-btn-icon svg {
    width: 14px;
    height: 14px;
}

#schedules-history-btn .schedules-btn-icon svg {
    width: 13px;
    height: 13px;
    opacity: 0.82;
}

.schedules-list-panel h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.schedules-filters-panel {
    padding-top: 14px;
    padding-bottom: 14px;
}

.schedules-filters-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(130px, 0.55fr);
    gap: 12px;
    align-items: end;
}

.schedules-filters-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--schedules-filters-grid-text);
}

.schedules-filters-grid .directory-combobox,
.schedules-filters-grid .custom-select {
    width: 100%;
    min-width: 0;
}

.schedules-filters-grid select {
    height: 40px;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 10px;
    padding: 0 12px;
    background: var(--color-surface);
}

.schedules-filter-combobox-field .directory-combobox-search,
.schedules-filters-grid .custom-select-control {
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
    border-color: var(--color-control-border-subtle);
    padding: 0 12px;
    font-size: 14px;
    line-height: 1;
}

.schedules-filter-combobox-field .directory-combobox-results {
    z-index: 35;
}

.schedules-filters-actions {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.schedules-list-panel {
    margin-top: 22px;
}

.schedules-list-panel > .alerts {
    margin-bottom: 10px;
}

.schedules-clickable-row {
    cursor: pointer;
}

.schedules-clickable-row:hover td {
    background: var(--color-data-table-tree-surface);
}

.schedules-clickable-row:hover td .schedules-context-icon,
.schedules-clickable-row:hover td .schedules-action-btn,
.schedules-clickable-row:hover td .schedules-period-label {
    background-clip: padding-box;
}

.schedules-clickable-row:focus {
    outline: var(--schedules-clickable-row-focus-outline);
    outline-offset: -2px;
}

.schedules-table tr.schedules-row-fork td {
    background: var(--schedules-table-schedules-row-fork-surface);
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 13px;
    vertical-align: middle;
}

.schedules-context-cell {
    min-width: 360px;
}

.schedules-row-fork .schedules-context-cell {
    position: relative;
}

.schedules-row-fork .schedules-context-cell::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--schedules-row-fork-schedules-context-cell-before-surface);
}

.schedules-row-fork-last .schedules-context-cell::before {
    bottom: 50%;
}

.schedules-row-fork .schedules-context-cell::after {
    content: '';
    position: absolute;
    left: 32px;
    top: 50%;
    width: 28px;
    height: 1px;
    background: var(--schedules-row-fork-schedules-context-cell-before-surface);
}

.schedules-context-main,
.schedules-context-fork {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.schedules-row-fork .schedules-context-fork {
    align-items: center;
}

.schedules-context-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.schedules-status-mark {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 16px;
    height: 16px;
    border: var(--schedules-status-mark-border);
    border-radius: 50%;
    box-shadow: var(--features-schedules-status-mark-shadow);
}

.schedules-status-mark-published {
    background: var(--schedules-status-mark-published-surface);
    color: var(--progress-fill-on-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.schedules-status-mark-published svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedules-row-fork .schedules-context-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.schedules-context-icon.main {
    background: var(--schedules-context-icon-main-surface);
    color: var(--schedules-context-icon-main-text);
}

.schedules-context-icon.fork {
    background: var(--schedules-context-icon-fork-surface);
    color: var(--schedules-context-icon-fork-text);
}

.schedules-context-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedules-row-fork .schedules-context-icon svg {
    width: 15px;
    height: 15px;
}

.schedules-context-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    color: var(--schedules-context-title-text);
}

.schedules-row-fork .schedules-context-title {
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedules-context-subtitle {
    margin-top: 2px;
    color: var(--schedules-context-subtitle-text);
    line-height: 1.35;
}

.schedules-context-note {
    margin-top: 2px;
    color: var(--schedules-context-note-text);
    font-size: 12px;
}

.schedules-fork-branch {
    position: relative;
    padding-left: 56px;
}

.schedules-fork-branch::before {
    content: none;
}

.schedules-fork-branch::after {
    content: none;
}

.schedules-row-fork .schedules-period {
    font-size: 13px;
    color: var(--schedules-row-fork-schedules-period-text);
    white-space: nowrap;
}

.schedules-period,
.schedules-updated {
    font-size: 13px;
    white-space: nowrap;
    color: var(--schedules-period-text);
}

.schedules-period-labels {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.schedules-period-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 82px;
    padding: 0 9px;
    border-radius: 8px;
    line-height: 1;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.schedules-period-labels-main .schedules-period-label {
    background: var(--status-info-surface);
    color: var(--schedules-period-labels-main-schedules-period-label-text);
    box-shadow: var(--schedules-period-labels-main-schedules-period-label-shadow);
}

.schedules-period-labels-draft {
    color: var(--schedules-period-labels-draft-text);
}

.schedules-period-labels-draft .schedules-period-label {
    min-width: 76px;
    padding-left: 9px;
    padding-right: 9px;
    color: inherit;
    background: transparent;
    box-shadow: inset 0 0 0 1px transparent;
}

.schedules-row-fork:hover .schedules-period-labels-draft .schedules-period-label {
    background: var(--color-surface-hover);
    color: var(--schedules-row-fork-schedules-period-labels-draft-schedules-period-label-hover-text);
    box-shadow: var(--schedules-row-fork-schedules-period-labels-draft-schedules-period-label-hover-shadow);
}

.schedules-updated {
    line-height: 1.35;
}

.schedules-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    opacity: 0.38;
    transition: opacity 0.16s ease;
}

.schedules-clickable-row:hover .schedules-actions,
.schedules-clickable-row:focus .schedules-actions,
.schedules-actions:focus-within {
    opacity: 1;
}

.schedules-action-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-editor-control-border);
    border-radius: 10px;
    background: var(--features-schedules-action-btn-surface);
    color: var(--schedule-create-label-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.schedules-action-btn:hover {
    background: var(--color-data-table-tree-surface);
    border-color: var(--schedules-action-btn-hover-border);
    color: var(--schedules-action-btn-hover-text);
    box-shadow: var(--features-schedules-action-btn-hover-shadow);
}

.schedules-action-danger {
    color: var(--schedules-action-danger-text);
}

.schedules-action-danger:hover {
    color: var(--schedules-action-danger-hover-text);
    border-color: var(--schedules-action-danger-hover-border);
    background: var(--schedules-action-danger-hover-surface);
}

.schedules-action-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedules-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.schedules-list-head h2 {
    margin: 0;
    color: var(--schedules-list-head-text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.schedules-sort-control {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-control);
    font-size: 13px;
    white-space: nowrap;
}

.schedules-sort-control select {
    min-width: 230px;
    height: 42px;
    border: 1px solid var(--color-popover-border);
    border-radius: 10px;
    background-color: var(--color-surface);
    color: var(--lesson-card-text);
    font-weight: 500;
    padding-left: 14px;
}

.schedules-sort-control .custom-select {
    width: auto;
    flex: 0 0 auto;
}

.schedules-sort-control .custom-select-control {
    min-height: 42px;
}

.schedules-context-list-wrap {
    min-width: 0;
}

.schedules-context-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.schedules-context-card {
    overflow: hidden;
    border: var(--schedules-context-card-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow:
        var(--features-schedules-context-card-shadow);
}

.schedules-context-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 22px 22px 18px;
    background: var(--color-surface);
    transition: background-color 0.16s ease;
}

.schedules-context-card:hover .schedules-context-card-head {
    background: var(--grid-row-hover-surface);
}

.schedules-context-card .schedules-context-icon.main {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    background: var(--schedules-context-card-schedules-context-icon-main-surface);
    color: var(--schedules-context-card-schedules-context-icon-main-text);
}

.schedules-context-card .schedules-context-icon.main svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.75;
}

.schedules-context-card-title {
    min-width: 0;
}

.schedules-context-card-title h2 {
    margin: 0 0 8px;
    color: var(--schedules-context-card-title-text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.22;
}

.schedules-context-meta,
.schedules-context-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 14px;
    color: var(--schedules-context-meta-text);
    font-size: 12px;
    line-height: 1.35;
}

.schedules-context-meta span + span,
.schedules-context-summary > span:not(.status-chip) + span {
    position: relative;
}

.schedules-context-meta span + span::before,
.schedules-context-summary > span:not(.status-chip) + span::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: var(--schedules-context-meta-before-surface);
    transform: translateY(-50%);
}

.schedules-context-summary {
    margin-top: 9px;
    color: var(--color-text-disabled);
    font-size: 11px;
}

.schedules-context-card-actions {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.schedules-context-table-wrap {
    border-top: var(--schedules-context-table-wrap-border);
    padding-top: 4px;
    overflow-x: auto;
}

.schedules-version-title {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    color: var(--schedules-version-title-text);
    font-weight: 500;
}

.schedules-version-title .table-inline-link,
.schedules-version-title .table-inline-input {
    min-width: 0;
}

.schedules-version-title .table-inline-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-version-title > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-version-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}

.schedules-version-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedules-version-icon-main {
    background: var(--schedules-version-icon-main-surface);
    color: var(--schedules-version-icon-main-text);
}

.schedules-version-icon-archive {
    background: var(--color-filter-active-surface);
    color: var(--schedules-version-icon-archive-text);
}

.schedules-version-period {
    white-space: nowrap;
}

.schedules-version-updated {
    color: var(--color-text-disabled);
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
}

.schedules-version-updated span {
    display: block;
}

.schedules-version-updated span + span {
    color: var(--schedules-version-updated-text);
    font-size: 11px;
}

.schedules-version-empty {
    color: var(--schedules-version-empty-text);
    text-align: center;
}

.schedules-action-menu-wrap {
    position: relative;
}

.schedules-action-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10050;
    min-width: 168px;
    padding: 6px;
    border: 1px solid var(--color-popover-border);
    border-radius: 10px;
    background: var(--color-popover-surface);
    opacity: 1;
    backdrop-filter: none;
    box-shadow: var(--color-popover-shadow);
}

.schedules-action-menu button,
.schedules-action-menu a {
    width: 100%;
    height: auto;
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-control);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 9px 10px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
    filter: none;
    transform: none;
}

.schedules-action-menu button:hover,
.schedules-action-menu button:focus-visible,
.schedules-action-menu a:hover,
.schedules-action-menu a:focus-visible {
    background: var(--color-surface-hover);
    color: var(--color-text-control-hover);
    filter: none;
    outline: none;
}

.schedules-action-menu button.is-danger {
    color: var(--color-danger-text);
}

.schedules-action-menu svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.schedules-action-icon,
.ui-action-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    mask: var(--action-icon-mask) center / contain no-repeat;
}

.schedules-action-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.schedules-action-icon-rename {
    --action-icon-mask: url('/assets/actions/schedule-rename.svg');
}

.schedules-action-icon-copy {
    --action-icon-mask: url('/assets/actions/schedule-copy.svg');
}

.schedules-action-icon-conflicts {
    --action-icon-mask: url('/assets/actions/schedule-conflicts.svg');
    color: var(--conflict-color);
}

.schedules-action-icon-archive {
    --action-icon-mask: url('/assets/actions/schedule-archive.svg');
}

.schedules-action-icon-bell-schedule {
    --action-icon-mask: url('/assets/nav/bell-schedule.svg');
}

.schedules-action-icon-publish {
    --action-icon-mask: url('/assets/nav/publish-schedule.svg');
}

.ui-action-icon-delete {
    --action-icon-mask: url('/assets/actions/delete.svg');
}

.directory-preview-remove .ui-action-icon,
.schedules-action-btn .ui-action-icon,
.table-action-btn .ui-action-icon {
    width: 16px;
    height: 16px;
}

.schedules-action-menu-select-field {
    width: 100%;
    min-height: 38px;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 220px;
    margin: 0;
    padding: 9px 10px;
    border-radius: 8px;
}

.schedules-action-menu-select-field:hover,
.schedules-action-menu-select-field:focus-within {
    background: var(--color-surface-hover);
}

.schedules-action-menu-select-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-control);
}

.schedules-action-menu-select-icon svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.schedules-action-menu-select-field select {
    width: 100%;
    min-height: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-control);
    font: inherit;
    font-size: 14px;
}

.schedules-action-menu-select-field .custom-select {
    width: 100%;
    min-width: 0;
}

.schedules-action-menu-select-field .custom-select-control {
    min-height: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-control);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
}

.schedules-action-menu-select-field .custom-select-control:hover,
.schedules-action-menu-select-field .custom-select-control:focus-visible {
    background: transparent;
    color: var(--color-text-control-hover);
    box-shadow: none;
}

.schedules-action-menu-select-field .custom-select-results {
    left: auto;
    right: 0;
    width: min(360px, calc(100vw - 48px));
    max-width: min(360px, calc(100vw - 48px));
}

.schedules-action-menu-select-field .directory-combobox-result {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-archive-toggle {
    min-height: 30px;
    margin: 10px 22px 16px;
    border: 0;
    background: transparent;
    color: var(--schedules-archive-toggle-text);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.schedules-archive-toggle.is-disabled {
    cursor: default;
    color: var(--color-text-disabled);
}

.schedules-archive-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.16s ease;
}

.schedules-archive-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

@media (max-width: 1180px) {
    .schedules-filters-grid {
        grid-template-columns: 1fr;
    }

    .schedules-filters-actions {
        justify-content: flex-end;
    }

    .schedules-context-title {
        font-size: 16px;
    }
}

.schedules-workspace {
    position: relative;
    display: grid;
    gap: 12px;
}

.schedules-workspace .schedules-page-head {
    margin-bottom: 0;
}

.schedules-workspace .page-head h1 {
    margin-bottom: 4px;
    font-size: 30px;
    line-height: 1.12;
    font-weight: 650;
}

.schedules-workspace .page-head p {
    margin: 0;
    font-size: 14px;
}

.schedules-create-split {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.schedules-create-split .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding-right: 10px;
}

.schedules-create-menu-btn {
    width: 34px;
    min-width: 34px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-left-color: var(--features-schedules-create-menu-btn-border-left-color);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.schedules-create-menu-btn svg {
    width: 14px;
    height: 14px;
}

.schedules-toolbar-panel {
    position: static;
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
    box-sizing: border-box;
}

#schedules-workspace .schedules-toolbar-panel {
    container-name: schedules-toolbar;
    container-type: inline-size;
}

.schedules-toolbar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
    gap: 8px clamp(32px, 4vw, 80px);
    min-width: 0;
}

.schedules-filter-zone {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.schedules-summary-zone {
    display: grid;
    grid-template-rows: repeat(2, 34px);
    align-items: center;
    justify-items: end;
    gap: 8px;
    min-width: 0;
}

.schedules-period-row,
.schedules-filters-row,
.schedules-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.schedules-period-row {
    margin-bottom: 8px;
}

.schedules-filter-zone .schedules-period-row {
    margin: 0;
}

.schedules-filters-row {
    flex-wrap: nowrap;
}

.schedules-view-switch {
    box-sizing: border-box;
    flex: 0 0 auto;
    align-self: stretch;
    height: 34px;
    padding: 2px;
    width: max-content;
}

.schedules-view-switch .constraints-mode-tab {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    padding: 0 9px;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.schedules-view-switch .constraints-mode-tab.is-active {
    background: var(--constraints-mode-tab-is-active-surface);
    color: var(--constraints-mode-tab-hover-text);
}

.schedules-map-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px;
    padding: 16px 20px;
    border-radius: 9px;
    background: var(--color-surface-selected);
    color: var(--color-text);
    font-size: 13px;
}

.schedules-map-selection > div {
    display: inline-flex;
    gap: 6px;
}

.schedules-map-selection .btn {
    min-height: 26px;
    padding: 3px 9px;
    font-size: 12px;
}

.schedules-map-view {
    overflow-x: auto;
    padding: 1px;
}

.schedules-map-columns {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(5, minmax(184px, 1fr));
    grid-auto-columns: minmax(184px, 1fr);
    gap: 0;
    min-width: 920px;
}

.schedules-map-columns::before {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    left: 0;
    height: 44px;
    border-bottom: 1px solid var(--color-data-table-border);
    background: var(--color-data-table-header-surface);
    content: '';
    pointer-events: none;
}

.schedules-map-course {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.schedules-map-course h2 {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    height: 44px;
    margin: 0;
    padding: 0 18px;
    background: var(--color-data-table-header-surface);
    color: var(--color-data-table-header-text);
    font-size: 12px;
    font-weight: 600;
}

.schedules-map-faculties {
    display: grid;
    gap: 7px;
    padding: 8px;
}

.schedules-map-faculty {
    overflow: hidden;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 6px;
}

.schedules-map-faculty:has(.schedules-map-presence:hover) {
    position: relative;
    z-index: 4;
    overflow: visible;
}

.schedules-map-faculty h3 {
    margin: 0;
    padding: 5px 7px;
    background: var(--color-surface-subtle);
    color: var(--color-text-secondary);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
}

.schedules-map-groups {
    display: grid;
}

.schedules-map-group {
    position: relative;
    display: grid;
    grid-template-columns: minmax(48px, auto) minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    min-height: 29px;
    padding: 3px 6px;
    font-size: 12px;
}

.schedules-map-group.has-multiple-actions {
    padding-bottom: 8px;
}

.schedules-map-group-title {
    box-sizing: border-box;
    display: block;
    height: 20px;
    min-height: 20px;
    justify-self: stretch;
    align-self: start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    line-height: 20px;
    text-align: left;
    cursor: pointer;
}

.schedules-map-group-title:hover {
    color: var(--color-action-primary-bg);
}

.schedules-map-group-title:focus-visible {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 1px;
}

.schedules-map-group.is-selected {
    background: var(--color-surface-selected);
}

.schedules-map-group-block.is-shared-context.schedules-map-context-tint-1 { background: var(--schedule-map-context-1-surface); box-shadow: inset 1px 0 var(--schedule-map-context-1-accent); }
.schedules-map-group-block.is-shared-context.schedules-map-context-tint-2 { background: var(--schedule-map-context-2-surface); box-shadow: inset 1px 0 var(--schedule-map-context-2-accent); }
.schedules-map-group-block.is-shared-context.schedules-map-context-tint-3 { background: var(--schedule-map-context-3-surface); box-shadow: inset 1px 0 var(--schedule-map-context-3-accent); }
.schedules-map-group-block.is-shared-context.schedules-map-context-tint-4 { background: var(--schedule-map-context-4-surface); box-shadow: inset 1px 0 var(--schedule-map-context-4-accent); }
.schedules-map-group-block.is-shared-context.schedules-map-context-tint-5 { background: var(--schedule-map-context-5-surface); box-shadow: inset 1px 0 var(--schedule-map-context-5-accent); }
.schedules-map-group-block.is-shared-context.schedules-map-context-tint-6 { background: var(--schedule-map-context-6-surface); box-shadow: inset 1px 0 var(--schedule-map-context-6-accent); }

.schedules-map-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 3px;
}

.schedules-map-view .schedules-map-label,
.schedules-map-view .schedules-map-create {
    box-sizing: border-box;
    height: 20px;
    min-height: 20px;
    padding: 3px 7px;
    border: 1px solid transparent;
    border-radius: 4px;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.schedules-map-view .schedules-map-label {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0 7px;
    cursor: pointer;
    white-space: nowrap;
}

.schedules-map-schedule {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    height: 20px;
}

.schedules-map-schedule:has(.schedules-map-problem-counters) .schedules-map-label {
    border-radius: 4px 0 0 4px;
}

.schedules-map-schedule.has-presence .schedules-map-label {
    border-color: var(--status-positive-border);
}

.schedules-map-problem-counters {
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 auto;
    height: 20px;
}

.schedules-map-problem-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 20px;
    min-width: 20px;
    padding: 0 4px;
    border: 0;
    border-radius: 0;
    color: var(--color-action-primary-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.schedules-map-problem-counter:last-child {
    border-radius: 0 4px 4px 0;
}

.schedules-map-problem-counter.is-critical {
    background: var(--schedule-map-conflict-counter-surface);
}

.schedules-map-problem-counter.is-warning {
    background: var(--problem-warning-surface);
    color: var(--problem-warning-color);
}

.schedules-map-presence {
    position: absolute;
    top: -7px;
    right: -7px;
    z-index: 2;
}

.schedules-map-presence-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid var(--status-positive-border);
    border-radius: 50%;
    background: var(--status-positive-surface);
    color: var(--status-positive-text);
    font-size: 7px;
    font-weight: 600;
    line-height: 1;
}

.schedules-map-presence .presence-popover {
    top: calc(100% + 5px);
    right: 0;
    left: auto;
    min-width: 196px;
}

.schedules-map-presence-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--status-positive-indicator);
}

.schedules-map-view .schedules-map-label.published {
    --status-border: var(--schedule-map-label-published-border);
    --status-surface: var(--schedule-map-label-published-surface);
    --status-text: var(--schedule-map-label-published-text);
}

.schedules-map-view .schedules-map-label.work {
    --status-border: var(--schedule-map-label-work-border);
    --status-surface: var(--schedule-map-label-work-surface);
    --status-text: var(--schedule-map-label-work-text);
}

.schedules-map-view .schedules-map-label.draft {
    --status-border: var(--schedule-map-label-draft-border);
    --status-surface: var(--schedule-map-label-draft-surface);
    --status-text: var(--schedule-map-label-draft-text);
}

.schedules-map-view .schedules-map-create {
    border-color: transparent;
    background: var(--color-surface-muted-strong);
    color: var(--color-text-muted);
    cursor: pointer;
}

.schedules-map-view .schedules-map-create.is-selected {
    border-color: var(--color-action-primary-border);
    background: var(--color-action-primary-bg);
    color: var(--color-action-primary-text);
}

.schedules-map-view .schedules-map-label:hover,
.schedules-map-view .schedules-map-create:hover {
    border-color: var(--color-control-focus-border);
}

.schedules-map-view .schedules-map-create.is-course-locked,
.schedules-map-view .schedules-map-create.is-course-locked:hover {
    border-color: transparent;
    background: var(--color-surface-muted-strong);
    color: var(--color-text-muted);
    cursor: not-allowed;
    opacity: .58;
}

.schedules-map-view .schedules-map-create:hover {
    background: var(--color-surface-selected);
    color: var(--color-action-secondary-text);
}

.schedules-map-drafts-toggle {
    display: inline-grid;
    width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--schedule-map-label-draft-border);
    border-radius: 4px;
    background: var(--schedule-map-label-draft-surface);
    color: var(--schedule-map-label-draft-text);
    cursor: pointer;
}

.schedules-map-drafts-toggle svg {
    width: 14px;
    height: 14px;
}

.schedules-map-drafts-toggle:hover,
.schedules-map-drafts-toggle:focus-visible {
    border-color: var(--color-control-focus-border);
    background: var(--color-surface-selected);
    outline: none;
}

.schedules-map-drafts-menu button {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 12px;
    min-width: 190px;
}

.schedules-map-drafts-menu button span:last-child {
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
}

.schedules-map-view .schedules-map-label:focus-visible,
.schedules-map-view .schedules-map-create:focus-visible {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 1px;
}

.schedules-period-select,
.schedules-filters-row label {
    min-width: 0;
}

.schedules-period-select select,
.schedules-filters-row select {
    height: 34px;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 9px;
    background: var(--color-surface);
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-weight: 400;
}

.schedules-period-select .custom-select-control,
.schedules-filters-row .custom-select-control {
    min-height: 34px;
    padding: 7px 10px;
    border-color: var(--color-control-border-subtle);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 400;
    gap: 8px;
}

.schedules-period-select .custom-select-control svg,
.schedules-filters-row .custom-select-control svg {
    width: 14px;
    height: 14px;
}

.schedules-filters-row .directory-combobox {
    width: 100%;
    min-width: 0;
}

.schedules-filters-row .directory-combobox-search {
    height: 34px;
    min-height: 34px;
    padding: 7px 34px 7px 10px;
    border-color: var(--color-control-border);
    border-radius: 9px;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 400;
    background-position: right 12px center;
    background-size: 14px 14px;
}

.schedules-filters-row .directory-combobox-results {
    z-index: 45;
}

.schedules-period-select .custom-select,
.schedules-filters-row .custom-select {
    width: auto;
}

.schedules-filter-zone .schedules-period-select:first-child {
    flex: 0 0 118px;
}

.schedules-semester-select {
    min-width: 185px;
}

.schedules-filter-zone .schedules-semester-select {
    flex: 0 0 184px;
    min-width: 0;
}

.schedules-search {
    height: 34px;
    width: min(520px, 100%);
    min-width: 320px;
    max-width: 520px;
    flex: 0 1 520px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 9px;
    background: var(--color-surface);
    padding: 0 10px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.schedules-filter-zone .schedules-search {
    width: min(360px, 100%);
    min-width: 210px;
    max-width: 360px;
    flex: 0 1 360px;
}

.schedules-search:focus-within {
    border-color: var(--color-control-focus-border);
    box-shadow: var(--features-schedules-search-focus-within-shadow);
    background: var(--color-surface);
}

.schedules-search svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--color-tab-text);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedules-search input {
    width: 100%;
    height: 30px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-action-secondary-text);
    font-size: 13px;
}

.schedules-search input:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.grid-help-search.schedules-search {
    width: 100%;
    min-width: 0;
    height: 34px;
    flex: 0 0 auto;
}

.grid-help-search.schedules-search input::placeholder {
    color: var(--color-table-header-text);
    opacity: 1;
}

.schedules-filters-row .schedules-filter-faculty {
    flex: 0 1 260px;
    min-width: 210px;
}

.schedules-filters-row .schedules-filter-level {
    flex: 0 1 168px;
    min-width: 136px;
}

.schedules-filters-row .schedules-filter-course {
    flex: 0 0 126px;
    min-width: 108px;
}

.schedules-filters-row .schedules-filter-form {
    flex: 0 1 176px;
    min-width: 148px;
}

.schedules-period-row .schedules-filter-status {
    flex: 0 0 154px;
    min-width: 132px;
}

.schedules-more-filters {
    height: 34px;
    margin: 0;
    flex: 0 0 138px;
    min-width: 138px;
    padding-inline: 10px;
    font-size: 13px;
    font-weight: 400;
    border-radius: 9px;
    white-space: nowrap;
}

.schedules-filter-check,
.schedules-quick-filter {
    flex: 0 0 auto;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--color-filter-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.schedules-filter-check:hover,
.schedules-quick-filter:hover {
    background: var(--color-filter-hover-surface);
    border-color: var(--color-filter-hover-border);
}

.schedules-filter-check.is-active,
.schedules-quick-filter.is-active {
    background: var(--color-filter-active-surface);
    border-color: var(--color-filter-active-border);
    color: var(--color-filter-active-text);
}

.schedules-quick-filters {
    flex: 0 1 430px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 390px;
    flex-wrap: nowrap;
}

.schedules-quick-filter {
    flex: 0 0 auto;
    white-space: nowrap;
}

.schedules-quick-filter b {
    min-width: 24px;
    height: 22px;
    border-radius: 7px;
    background: var(--compact-counter-surface);
    color: var(--color-action-secondary-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 400;
}

.schedules-campaign-summary {
    flex: 0 0 300px;
    margin-left: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    color: var(--color-tab-text);
    font-size: 12px;
}

.schedules-summary-zone .schedules-quick-filters {
    width: 100%;
    min-width: 0;
    flex: 0 1 auto;
    justify-content: flex-end;
}

.schedules-summary-zone .schedules-campaign-summary {
    width: 100%;
    min-width: 0;
    flex: 0 1 auto;
    margin-left: 0;
}

.schedules-campaign-metric {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.schedules-campaign-metric > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

#schedules-ready-main {
    display: inline-flex;
    gap: 4px;
    min-width: 0;
    color: var(--color-action-secondary-text);
    font-weight: 400;
    white-space: nowrap;
}

#schedules-ready-main span {
    color: var(--color-tab-text);
}

#schedules-ready-main strong {
    color: var(--color-text-strong);
    font-weight: 500;
}

#schedules-ready-percent {
    color: var(--color-tab-text);
    font-weight: 400;
}

.schedules-progress {
    position: relative;
    height: 3px;
    display: block;
}

.schedules-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    transition: width 0.16s ease;
}

@container schedules-toolbar (max-width: 1120px) {
    .schedules-toolbar-layout {
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }

    .schedules-filter-zone {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .schedules-toolbar-layout .schedules-period-row {
        display: grid;
        grid-template-columns: 118px 184px minmax(210px, 1fr) 154px;
    }

    .schedules-toolbar-layout .schedules-filters-row {
        display: grid;
        grid-template-columns: minmax(210px, 1.5fr) minmax(136px, 1fr) minmax(108px, 126px) minmax(148px, 176px) auto;
    }

    .schedules-toolbar-layout .schedules-period-row > label,
    .schedules-toolbar-layout .schedules-filters-row > label {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .schedules-toolbar-layout .schedules-period-row .custom-select,
    .schedules-toolbar-layout .schedules-filters-row .custom-select,
    .schedules-toolbar-layout .schedules-search {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .schedules-summary-zone {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
        grid-template-rows: 34px;
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-self: stretch;
        justify-items: stretch;
        gap: 12px;
    }

    .schedules-summary-zone .schedules-quick-filters {
        width: auto;
        gap: 4px;
        justify-self: end;
        flex-wrap: nowrap;
    }

    .schedules-summary-zone .schedules-campaign-summary {
        width: 100%;
        justify-self: end;
    }

    .schedules-summary-zone .schedules-quick-filter {
        gap: 4px;
        padding-inline: 4px;
    }

}

.app-shell:not([data-sidebar-state="collapsed"]) #schedules-workspace .schedules-toolbar-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.app-shell:not([data-sidebar-state="collapsed"]) #schedules-workspace .schedules-filter-zone {
    grid-column: 1 / -1;
    grid-row: 1;
}

.app-shell:not([data-sidebar-state="collapsed"]) #schedules-workspace .schedules-summary-zone {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: auto minmax(0, 1fr) minmax(240px, 280px);
    grid-template-rows: 34px;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-self: stretch;
    justify-items: stretch;
    gap: 12px;
}

.app-shell:not([data-sidebar-state="collapsed"]) #schedules-workspace .schedules-summary-zone .schedules-view-switch {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.app-shell:not([data-sidebar-state="collapsed"]) #schedules-workspace .schedules-summary-zone .schedules-quick-filters {
    width: auto;
    gap: 4px;
    justify-self: end;
    flex-wrap: nowrap;
}

.app-shell:not([data-sidebar-state="collapsed"]) #schedules-workspace .schedules-summary-zone .schedules-campaign-summary {
    width: 100%;
    justify-self: end;
}

.app-shell:not([data-sidebar-state="collapsed"]) #schedules-workspace .schedules-summary-zone .schedules-quick-filter {
    gap: 4px;
    padding-inline: 4px;
}

@container schedules-toolbar (max-width: 640px) {
    .schedules-toolbar-layout .schedules-period-row,
    .schedules-toolbar-layout .schedules-filters-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .schedules-filter-zone .schedules-search {
        flex-basis: 100%;
        width: 100%;
        max-width: none;
    }

    .schedules-summary-zone .schedules-quick-filters {
        flex-wrap: wrap;
    }
}

.schedules-table-panel {
    padding: 0;
    overflow: hidden;
}

.schedules-table-panel > .alerts {
    padding: 10px 12px 10px;
}

.schedules-table-panel > .alerts:empty {
    display: none;
}

.schedules-table {
    min-width: 940px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.schedules-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 44px;
    padding: 0 18px;
    border-bottom: 1px solid var(--color-data-table-border);
    background: var(--color-surface-tinted);
    color: var(--schedules-table-text);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.schedules-table td {
    height: 78px;
    padding: 10px 18px;
    border-bottom: var(--schedules-table-border);
    color: var(--color-action-secondary-text);
    font-size: 13px;
    vertical-align: middle;
    transition: background-color 0.16s ease;
}

.schedules-table th:nth-child(1),
.schedules-table td:nth-child(1) {
    min-width: 330px;
}

.schedules-table th:nth-child(2),
.schedules-table td:nth-child(2) {
    width: 180px;
}

.schedules-table th:nth-child(3),
.schedules-table td:nth-child(3) {
    width: 120px;
    text-align: center;
}

.schedules-table th:nth-child(4),
.schedules-table td:nth-child(4) {
    width: 160px;
}

.schedules-table th:nth-child(5),
.schedules-table td:nth-child(5) {
    width: 160px;
}

.schedules-table th:nth-child(6),
.schedules-table td:nth-child(6) {
    width: 200px;
}

.schedules-dispatcher-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.schedules-dispatcher-table th:nth-child(1),
.schedules-dispatcher-table td:nth-child(1) {
    width: 42%;
    min-width: 360px;
}

.schedules-dispatcher-table th:nth-child(2),
.schedules-dispatcher-table td:nth-child(2) {
    width: 125px;
}

.schedules-dispatcher-table th:nth-child(3),
.schedules-dispatcher-table td:nth-child(3) {
    width: 105px;
}

.schedules-dispatcher-table th:nth-child(4),
.schedules-dispatcher-table td:nth-child(4) {
    width: 190px;
}

.schedules-dispatcher-table th:nth-child(5),
.schedules-dispatcher-table td:nth-child(5) {
    width: 230px;
}

.schedules-workspace-row {
    cursor: pointer;
}

.schedules-workspace-row:hover td {
    background: var(--color-table-row-hover);
}

.schedules-workspace-row.is-active td {
    background: var(--color-surface-selected);
}

.schedules-workspace-row.is-deleted {
    opacity: .8;
}

.schedules-drawer-card-deleted {
    opacity: .8;
}

.schedules-workspace-row:focus {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: -2px;
}

.schedules-row-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.schedules-row-title > div {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.schedules-row-title strong {
    display: block;
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-row-meta {
    display: grid;
    gap: 2px;
    margin-top: 4px;
}

.schedules-row-meta span {
    display: block;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#schedules-workspace .schedules-row-meta .schedules-row-groups.is-search-match {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.schedules-pin {
    position: relative;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--schedules-pin-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.schedules-pin svg {
    width: 17px;
    height: 17px;
    display: block;
}

.schedules-pin:hover,
.schedules-pin.is-pinned {
    background: var(--color-surface-hover);
    color: var(--color-link-text);
}

.schedules-pin.is-pinned {
    color: var(--color-link-text);
    -webkit-text-fill-color: currentColor;
}

.admin-organization-pin.is-pinned svg {
    fill: currentColor;
}

.schedules-status-stack {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}

.schedules-status-stack .status-chip {
    min-height: 18px;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 400;
}

.schedules-conflict {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    color: var(--color-action-secondary-text);
    font-weight: 400;
}

.schedules-conflict.is-warn {
    color: var(--schedules-conflict-is-warn-text);
}

.schedules-conflict.is-ok {
    color: var(--schedules-conflict-is-ok-text);
}

.schedules-ready-cell {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 5px 10px;
    max-width: 190px;
}

.schedules-ready-cell span:first-child {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.schedules-ready-cell strong {
    color: var(--color-text-strong);
    font-size: 12px;
    font-weight: 400;
}

.schedules-ready-cell .schedules-progress {
    grid-column: 1 / -1;
}

.schedules-conflicts-short {
    display: none;
}

.schedules-readiness-empty {
    color: var(--color-text-muted);
    font-size: 12px;
}

.schedules-updated-cell {
    display: grid;
    gap: 3px;
    line-height: 1.2;
}

.schedules-updated-cell strong {
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 400;
}

.schedules-updated-cell span {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.schedules-presence-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    margin-top: 4px;
}

.schedules-presence-labels:empty {
    display: none;
}

#schedules-workspace .schedules-updated-cell .schedules-presence-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    padding: 3px 8px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-success-surface);
    color: var(--schedules-workspace-schedules-updated-cell-schedules-presence-label-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
}

#schedules-workspace .schedules-updated-cell .schedules-presence-label i {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
}

#schedules-workspace .schedules-updated-cell .schedules-presence-name {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-detail-drawer {
    z-index: 42;
}

.schedules-detail-panel.slot-editor-panel {
    --drawer-width: 720px;
    box-shadow:
        var(--features-schedules-detail-panel-slot-editor-panel-shadow);
}

.schedules-detail-panel .slot-editor-head {
    align-items: flex-start;
    gap: 10px;
    flex: 0 0 auto;
}

.schedules-detail-panel .slot-editor-head h2 {
    font-size: 18px;
    line-height: 1.25;
}

.schedules-detail-panel .slot-editor-title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.schedules-drawer-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    vertical-align: top;
    transform: translateY(2px);
}

.schedules-drawer-title-row h2 {
    min-width: 0;
    flex: 0 1 auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-detail-panel .schedules-drawer-rename {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    max-height: 24px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    align-self: center;
    background: var(--schedule-rename-surface);
    border-color: var(--schedule-rename-border);
    color: var(--schedule-rename-text);
    box-shadow: var(--schedule-rename-shadow);
}

.schedules-detail-panel .schedules-drawer-rename .schedules-drawer-rename-icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
}

.schedules-detail-panel .schedules-drawer-rename:hover,
.schedules-detail-panel .schedules-drawer-rename:focus-visible {
    background: var(--schedule-rename-hover-surface);
    color: var(--schedule-rename-hover-text);
}

.schedules-detail-panel .slot-editor-meta {
    margin-top: 5px;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.schedules-detail-panel .slot-editor-close {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: var(--color-text-strong);
    font-size: 18px;
}

.schedules-detail-panel .slot-editor-close:hover,
.schedules-detail-panel .slot-editor-close:focus-visible {
    background: var(--color-surface-hover);
}

.schedules-publication-drawer {
    z-index: 44;
}

.grid-publication-drawer.schedules-publication-drawer {
    z-index: 80;
}

.schedules-publication-panel.slot-editor-panel {
    --drawer-width: 920px;
    --drawer-screen-gap: 40px;
    box-shadow:
        var(--features-schedules-publication-panel-slot-editor-panel-shadow);
}

.schedules-publication-panel .slot-editor-head h2 {
    font-size: 18px;
    line-height: 1.25;
}

.schedules-publication-scroll.slot-editor-scroll-area {
    gap: 16px;
}

.schedules-publication-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.schedules-publication-toolbar > div:first-child {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.schedules-publication-label,
.schedules-publication-selection span {
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 500;
}

.schedules-publication-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.schedules-publication-preset.btn {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--color-action-secondary-border);
    background: var(--color-surface);
    color: var(--schedules-publication-preset-btn-text);
    font-weight: 400;
}

.schedules-publication-preset.btn.is-active {
    border-color: var(--schedules-publication-preset-btn-is-active-border);
    background: var(--color-filter-active-surface);
    color: var(--schedules-publication-preset-btn-is-active-text);
}

.schedules-publication-no-presets {
    color: var(--color-text-disabled);
    font-size: 13px;
}

.schedules-publication-selection {
    display: grid;
    gap: 4px;
    min-width: 210px;
    text-align: right;
}

.schedules-publication-selection strong {
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
}

.schedules-publication-legend {
    flex-wrap: wrap;
}

.schedules-publication-legend .is-published {
    border-color: var(--calendar-risk-ok-border);
    background: var(--schedules-publication-legend-is-published-surface);
}

.schedules-publication-legend .is-candidate {
    border: 2px solid var(--color-action-primary-border);
    background: var(--color-surface);
}

.schedules-publication-months.production-calendar-months {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.schedules-publication-day.production-calendar-day {
    position: relative;
    height: 30px;
    overflow: visible;
}

.schedules-publication-day.production-calendar-day.is-candidate {
    z-index: 1;
    outline: 2px solid var(--color-action-primary-border);
    outline-offset: -2px;
}

.schedules-publication-day.production-calendar-day.is-candidate-start,
.schedules-publication-day.production-calendar-day.is-candidate-end {
    outline: 2px solid var(--color-action-primary-border);
    outline-offset: -2px;
}

.schedules-publication-day.production-calendar-day:focus-visible {
    outline: var(--schedules-publication-day-production-calendar-day-focus-visible-outline);
    outline-offset: 1px;
}

.schedules-publication-recommendation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border: var(--schedules-publication-recommendation-border);
    border-radius: 10px;
    background: var(--calendar-warning-surface);
    color: var(--schedules-publication-recommendation-text);
}

.schedules-publication-recommendation.is-hidden {
    display: none;
}

.schedules-publication-recommendation > div {
    display: grid;
    gap: 4px;
}

.schedules-publication-recommendation strong {
    font-size: 13px;
    font-weight: 600;
}

.schedules-publication-recommendation span {
    font-size: 12px;
}

.schedules-publication-recommendation .btn {
    flex: 0 0 auto;
    min-height: 36px;
}

.schedules-publication-actions {
    justify-content: space-between;
}

.schedules-publication-footer-range {
    color: var(--color-tab-text);
    font-size: 13px;
}

@media (max-width: 900px) {
    .schedules-publication-panel.slot-editor-panel {
        --drawer-width: 720px;
        --drawer-screen-gap: 16px;
    }

    .schedules-publication-months.production-calendar-months {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }
}

@media (max-width: 620px) {
    .schedules-publication-toolbar,
    .schedules-publication-recommendation,
    .schedules-publication-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .schedules-publication-selection {
        min-width: 0;
        text-align: left;
    }

    .schedules-publication-months.production-calendar-months {
        grid-template-columns: 1fr;
    }
}

.schedules-drawer-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    flex: 0 0 auto;
    min-height: 28px;
    color: var(--color-tab-text);
    font-size: 12px;
    line-height: 1.35;
}

.schedules-drawer-summary article {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin: 0;
}

.schedules-drawer-summary strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text-strong);
    font-size: 12px;
    font-weight: 400;
}

.schedules-drawer-groups {
    flex: 1 1 100%;
    min-width: 0;
    color: var(--color-tab-text);
}

.study-plans-workspace .schedules-filters-row label:nth-child(1),
.study-plans-workspace .schedules-filters-row label:nth-child(2),
.study-plans-workspace .schedules-filters-row label:nth-child(3),
.study-plans-workspace .schedules-filters-row label:nth-child(4),
.study-plans-workspace .schedules-filters-row label:nth-child(5) {
    flex: 1 1 220px;
}

.study-plans-workspace .schedules-status-row {
    margin-top: 8px;
}

.study-plans-table .schedules-flow-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.study-plans-table .schedules-flow-cell > div {
    min-width: 0;
}

.study-plans-table th:first-child {
    padding-left: 54px;
}

.study-plans-table th:first-child,
.study-plans-table td:first-child {
    width: auto;
    min-width: 420px;
}

.study-plans-table th:nth-child(2),
.study-plans-table td:nth-child(2) {
    width: 84px;
    text-align: center;
}

.study-plans-table th:nth-child(3),
.study-plans-table td:nth-child(3) {
    width: 132px;
    text-align: center;
}

.study-plans-table th:nth-child(4),
.study-plans-table td:nth-child(4) {
    width: 96px;
    text-align: center;
}

.study-plans-table th:nth-child(5),
.study-plans-table td:nth-child(5) {
    width: 112px;
    text-align: left;
}

.study-plans-table th:nth-child(6),
.study-plans-table td:nth-child(6) {
    width: 216px;
    min-width: 216px;
}

.study-plans-table .study-plan-uploaded-cell {
    min-width: 148px;
}

.study-plans-table .study-plan-uploaded-cell strong,
.study-plans-table .study-plan-uploaded-cell span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.study-plan-education-form-chip {
    white-space: nowrap;
}

.admin-organizations-search {
    flex-basis: 640px;
}

.admin-organizations-workspace .schedules-toolbar-panel {
    padding: 12px;
}

.admin-organizations-workspace .schedules-period-row {
    align-items: stretch;
    margin-bottom: 12px;
}

.admin-organizations-workspace .schedules-search,
.admin-organizations-workspace .schedules-period-select select,
.admin-organizations-workspace .schedules-period-select .custom-select-control,
.admin-organizations-workspace .schedules-more-filters {
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
}

.admin-organizations-workspace .schedules-quick-filter {
    text-decoration: none;
}

.admin-organizations-result-summary {
    flex: 0 0 auto;
    color: var(--color-tab-text);
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
}

.admin-organizations-workspace .schedules-table-wrap {
    max-height: calc(100vh - 280px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.admin-organizations-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.admin-organizations-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.admin-organizations-table th,
.admin-organizations-table td {
    box-sizing: border-box;
}

.admin-organizations-table td {
    height: 92px;
    padding-top: 12px;
    padding-bottom: 12px;
    vertical-align: middle;
}

.admin-organizations-table th:nth-child(1),
.admin-organizations-table td:nth-child(1) {
    width: 32%;
    min-width: 0;
}

.admin-organizations-table th:nth-child(2),
.admin-organizations-table td:nth-child(2) {
    width: 22%;
}

.admin-organizations-table th:nth-child(3),
.admin-organizations-table td:nth-child(3) {
    width: 16%;
}

.admin-organizations-table th:nth-child(4),
.admin-organizations-table td:nth-child(4) {
    width: 15%;
}

.admin-organizations-table th:nth-child(5),
.admin-organizations-table td:nth-child(5) {
    width: 15%;
    padding-right: 24px;
}

.admin-organization-title-link {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-organization-title-link:hover {
    color: var(--color-link-text);
}

.admin-organization-identity {
    min-width: 0;
}

.admin-organization-identity .schedules-row-meta {
    display: grid;
    gap: 2px;
    margin-top: 5px;
    min-width: 0;
}

.admin-organization-identity .schedules-row-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-organization-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    min-width: 0;
}

.admin-organization-data-grid > span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.admin-organization-data-grid small {
    overflow: hidden;
    color: var(--color-tab-text);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-organization-data-grid b {
    color: var(--color-action-secondary-text);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.admin-organization-access {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 6px;
    min-width: 0;
}

.admin-organization-access-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--color-text-secondary);
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-organization-meter,
.admin-token-cell,
.admin-subscription-cell {
    display: grid;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 12px;
    width: min(100%, 220px);
    max-width: 220px;
    min-width: 0;
    color: var(--color-action-secondary-text);
    font-size: 12px;
    line-height: 1.3;
}

.admin-organization-meter > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-organization-meter > strong {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    white-space: nowrap;
}

.admin-token-cell .schedules-progress,
.admin-subscription-cell .schedules-progress {
    grid-column: 1 / 2;
    width: 100%;
    max-width: none;
}

.admin-token-cell .muted,
.admin-subscription-cell .muted {
    grid-column: 1 / -1;
    color: var(--admin-token-cell-muted-text);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-token-balance-line {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-token-balance-line > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-token-balance-line > b {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.admin-subscription-cell[data-subscription-state="expired"],
.admin-subscription-cell[data-subscription-state="cancelled"],
.admin-subscription-cell[data-subscription-state="suspended"] {
    --component-progress-fill: var(--progress-fill-muted);
}

.admin-organizations-pagination {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    min-height: 56px;
    padding: 8px 16px;
    border-top: 1px solid var(--color-divider-border);
    background: var(--color-surface);
    box-sizing: border-box;
}

.admin-organizations-pagination-summary,
.admin-organizations-page-size,
.admin-organizations-page-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.admin-organizations-pagination-summary,
.admin-organizations-page-indicator,
.admin-organizations-page-size label {
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.admin-organizations-page-size select,
.admin-organizations-page-size .custom-select-control,
.admin-organizations-page-size .btn,
.admin-organizations-page-nav .btn {
    height: 34px;
    min-height: 34px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
}

.admin-organizations-page-size select {
    min-width: 72px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--color-control-border);
    background-color: var(--color-control-bg);
    color: var(--color-text);
}

.admin-organizations-page-size .custom-select {
    width: 72px;
    min-width: 72px;
}

.admin-organizations-page-size .custom-select-control {
    padding: 0 10px;
    border-color: var(--color-control-border-subtle);
    color: var(--color-text);
    gap: 8px;
}

.admin-organizations-page-size .custom-select-control svg {
    width: 14px;
    height: 14px;
}

.admin-organizations-page-nav .is-disabled {
    color: var(--color-text-disabled);
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

@media (max-width: 900px) {
    .admin-organizations-workspace .schedules-period-row {
        flex-wrap: wrap;
    }

    .admin-organizations-search {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .admin-organizations-workspace .schedules-status-row,
    .admin-organizations-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-organizations-pagination-summary,
    .admin-organizations-page-nav {
        width: 100%;
        justify-content: space-between;
    }
}

.admin-organization-panel.slot-editor-panel {
    --drawer-width: 760px;
    pointer-events: auto;
}

.admin-organization-drawer {
    pointer-events: auto;
}

.admin-organization-drawer .slot-editor-backdrop {
    display: block;
}

.admin-organization-summary {
    padding: 2px 0 4px;
}

.admin-organization-section {
    display: grid;
    gap: 8px;
}

.admin-organization-add-user-panel.directory-import-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 16px;
    row-gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--color-container-border);
    border-radius: 12px;
    background: var(--color-surface);
}

.admin-organization-add-user-panel.directory-import-panel .directory-step-head {
    align-self: center;
    margin-bottom: 0;
    padding-right: 0;
}

.admin-organization-add-user-panel.directory-import-panel .directory-step-toggle {
    position: static;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    margin: 0;
    transform: none;
}

.admin-organization-add-user-panel.directory-import-panel .inline-action-message,
.admin-organization-add-user-panel.directory-import-panel .admin-organization-user-add-workspace {
    grid-column: 1 / -1;
}

.admin-organization-add-user-panel.directory-import-panel.is-collapsed .directory-step-head {
    margin-bottom: 0;
}

.admin-organization-panel .schedules-drawer-section h3 {
    margin: 0;
    color: var(--schedule-create-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.admin-organization-form-card.schedules-drawer-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 12px;
}

.admin-organization-card-info {
    min-width: 0;
}

.admin-organization-panel .span-2 {
    grid-column: 1 / -1;
}

.admin-organization-panel .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-organization-panel .form-grid label {
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.admin-organization-panel .form-grid input,
.admin-organization-panel .form-grid select,
.admin-organization-panel .form-grid textarea {
    min-height: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 13px;
}

.admin-organization-panel .form-grid textarea {
    height: auto;
    min-height: 86px;
    resize: vertical;
}

.admin-organization-feature-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--color-container-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 500;
}

.admin-organization-feature-toggle input[type="hidden"] {
    display: none;
}

.admin-organization-panel .form-grid label.admin-organization-checkbox-row {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.25;
}

.admin-organization-panel .form-grid .admin-organization-checkbox-row input[type="checkbox"] {
    appearance: auto;
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    flex: 0 0 16px;
}

.admin-organization-panel .admin-organization-checkbox-row span {
    color: inherit;
}

.admin-organization-feature-toggle .field-hint {
    margin: 0;
}

.admin-organization-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.commercial-access-section {
    padding-bottom: 16px;
    border-bottom: var(--commercial-access-section-border);
}

.commercial-access-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.commercial-access-section-head p {
    max-width: 62ch;
    margin: 4px 0 0;
    color: var(--commercial-access-section-head-text);
    font-size: 12px;
    line-height: 1.45;
}

.commercial-access-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: var(--commercial-access-overview-border);
    border-radius: 10px;
    background: var(--color-surface-emphasis);
}

.commercial-access-overview > div {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    background: var(--color-surface-deep);
}

.commercial-access-overview span {
    color: var(--commercial-access-overview-text);
    font-size: 11px;
    line-height: 1.2;
}

.commercial-access-overview strong {
    color: var(--commercial-access-overview-text-variant-2);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.commercial-access-form {
    padding-top: 4px;
}

.commercial-quota-section {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: var(--commercial-quota-section-border);
}

.commercial-quota-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 18px;
    color: var(--commercial-quota-summary-text);
    font-size: 12px;
    line-height: 1.4;
}

.commercial-quota-summary strong {
    color: var(--commercial-quota-summary-text-variant-2);
    font-weight: 650;
}

.commercial-quota-grant-form {
    display: grid;
    grid-template-columns: minmax(150px, .55fr) minmax(240px, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.commercial-quota-grant-form label {
    display: grid;
    gap: 6px;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 500;
}

.commercial-quota-grant-form input,
.commercial-quota-grant-form .btn {
    min-height: 40px;
}

.commercial-quota-history {
    display: grid;
    border-top: var(--commercial-quota-history-border);
}

.commercial-quota-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 11px 2px;
    border-bottom: var(--commercial-quota-entry-border);
}

.commercial-quota-entry.is-cancelled {
    opacity: .66;
}

.commercial-quota-entry-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    min-width: 0;
    color: var(--commercial-quota-entry-main-text);
    font-size: 12px;
    line-height: 1.35;
}

.commercial-quota-entry-main strong {
    color: var(--commercial-quota-entry-main-text-variant-2);
    font-size: 13px;
}

.commercial-quota-entry-main span {
    overflow-wrap: anywhere;
}

.commercial-quota-entry-main small {
    color: var(--commercial-quota-entry-main-text-variant-3);
}

.commercial-quota-entry-edit {
    grid-column: 1 / -1;
    padding-top: 2px;
}

.commercial-quota-entry-edit > summary {
    width: fit-content;
    color: var(--commercial-quota-entry-edit-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.commercial-quota-entry-edit > .form-grid {
    margin-top: 12px;
    padding: 12px;
    border: var(--commercial-quota-entry-edit-form-grid-border);
    border-radius: 10px;
    background: var(--color-surface-deep);
}

.commercial-quota-cancel-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 10px;
}

.commercial-quota-cancel-form input,
.commercial-quota-cancel-form .btn {
    min-height: 40px;
}

@media (max-width: 760px) {
    .commercial-access-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .commercial-quota-grant-form,
    .commercial-quota-cancel-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .commercial-quota-grant-form .btn,
    .commercial-quota-cancel-form .btn {
        width: 100%;
    }

    .commercial-quota-entry {
        grid-template-columns: minmax(0, 1fr);
    }

    .commercial-quota-entry > .status-chip {
        justify-self: start;
    }
}

/* Organization editor: project-native disclosure sections and one control vocabulary. */
.admin-organization-panel .slot-editor-head {
    align-items: center;
    gap: 12px;
}

.admin-organization-panel .slot-editor-head h2 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
}

.admin-organization-panel .slot-editor-meta {
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 400;
}

.admin-organization-context {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--color-divider-border);
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.admin-organization-panel .schedules-drawer-scroll {
    gap: 12px;
}

.admin-organization-disclosure {
    flex: 0 0 auto;
    overflow: visible;
    border: 1px solid var(--color-container-border);
    border-radius: 12px;
    background: var(--color-surface);
}

.admin-organization-disclosure-toggle {
    display: grid;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 12px 16px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--color-text-strong);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.admin-organization-disclosure-toggle[aria-expanded="true"] {
    border-radius: 11px 11px 0 0;
}

.admin-organization-disclosure-toggle:hover {
    background: var(--color-surface-tinted);
}

.admin-organization-disclosure-toggle:focus-visible {
    position: relative;
    z-index: 1;
    outline: var(--features-admin-organization-disclosure-toggle-focus-visible-outline);
    outline-offset: -2px;
}

.admin-organization-disclosure-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-organization-disclosure-copy > strong {
    overflow: hidden;
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-organization-disclosure-copy > span,
.admin-organization-disclosure-aside {
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.admin-organization-disclosure-aside {
    white-space: nowrap;
}

.admin-organization-disclosure-toggle > svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--color-text-muted);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    transition: transform 160ms ease;
}

.admin-organization-disclosure-toggle[aria-expanded="false"] > svg {
    transform: rotate(180deg);
}

.admin-organization-disclosure-panel {
    display: grid;
    gap: 12px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--color-divider-border);
}

.admin-organization-disclosure-panel.is-hidden {
    display: none;
}

.commercial-proposal-refresh-results,
.commercial-proposal-refresh-form,
.commercial-proposal-refresh-contacts,
.commercial-proposal-refresh-results-heading {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.commercial-proposal-refresh-results {
    padding-top: 4px;
}

.commercial-proposal-refresh-results-heading h3,
.commercial-proposal-refresh-contacts h4 {
    margin: 0;
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.commercial-proposal-refresh-results-heading p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.commercial-proposal-refresh-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 12px;
}

.commercial-proposal-refresh-table th,
.commercial-proposal-refresh-table td {
    padding: 8px;
    vertical-align: top;
}

.commercial-proposal-refresh-table thead th {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.commercial-proposal-refresh-table tbody th {
    color: var(--color-text-strong);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.commercial-proposal-refresh-form .commercial-proposal-refresh-table th:nth-child(1),
.commercial-proposal-refresh-form .commercial-proposal-refresh-table td:nth-child(1) {
    width: 44px;
}

.commercial-proposal-refresh-form .commercial-proposal-refresh-table th:nth-child(2),
.commercial-proposal-refresh-form .commercial-proposal-refresh-table td:nth-child(2) {
    width: 18%;
}

.commercial-proposal-refresh-value {
    overflow-wrap: anywhere;
    line-height: 1.4;
    white-space: normal;
}

.commercial-proposal-refresh-value.is-current {
    color: var(--color-text-secondary);
}

.commercial-proposal-refresh-choice {
    text-align: center;
}

.commercial-proposal-refresh-choice input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
}

.commercial-proposal-refresh-actions {
    display: flex;
    justify-content: flex-end;
}

.commercial-proposal-refresh-contact-action {
    width: 1%;
    white-space: nowrap;
}

.commercial-proposal-refresh-contact-action form {
    margin: 0;
}

.commercial-proposal-refresh-contacts-table tbody tr:last-child > th {
    border-bottom: 0;
}

@media (max-width: 760px) {
    .commercial-proposal-refresh-actions .btn,
    .commercial-proposal-refresh-contact-action .btn {
        width: 100%;
    }

    .commercial-proposal-refresh-contact-action {
        min-width: 132px;
    }
}

.admin-organization-users-list {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.admin-organization-user-summary {
    display: grid;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px 16px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--color-container-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.admin-organization-user-identity {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.admin-organization-user-identity strong {
    overflow: hidden;
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-organization-user-identity span {
    min-width: 0;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.admin-organization-user-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.admin-organization-user-header-actions > .status-chip {
    flex: 0 0 auto;
    min-height: 32px;
}

.admin-organization-user-header-actions form {
    margin: 0;
}

.admin-organization-user-header-actions .admin-organization-user-resend {
    height: 32px;
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
    white-space: nowrap;
}

.admin-organization-user-facts {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 0;
    padding: 0;
}

.admin-organization-user-facts > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-organization-user-facts dt {
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 1.25;
}

.admin-organization-user-facts dd {
    min-width: 0;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.admin-organization-user-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--color-divider-border);
}

.admin-organization-user-actions form {
    margin: 0;
}

.admin-organization-user-actions .btn {
    min-height: 36px;
}

.admin-organization-section-description {
    max-width: 68ch;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.admin-organization-panel .commercial-access-section,
.admin-organization-panel .commercial-quota-section {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--color-divider-border);
}

.admin-organization-panel .commercial-access-overview {
    margin-top: 0;
}

.admin-organization-panel .commercial-access-form,
.admin-organization-panel .admin-organization-form-grid {
    padding-top: 0;
}

.admin-organization-panel .form-grid,
.admin-organization-panel .admin-organization-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-organization-panel .form-grid label,
.admin-organization-panel .commercial-quota-grant-form label,
.admin-organization-panel .admin-organization-control-row label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.admin-organization-panel .form-grid > label,
.admin-organization-panel .admin-organization-control-row > label {
    align-self: start;
    align-content: start;
}

.admin-organization-panel input:not([type="hidden"]):not([type="checkbox"]),
.admin-organization-panel select,
.admin-organization-panel textarea {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-control-border);
    border-radius: 10px;
    background: var(--color-control-bg);
    box-shadow: none;
    color: var(--color-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.admin-organization-panel .custom-select-control {
    width: 100%;
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-control-border);
    border-radius: 10px;
    background: var(--color-control-bg);
    box-shadow: none;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 400;
}

.admin-organization-panel .custom-select-control:hover {
    border-color: var(--color-control-focus-border);
}

.admin-organization-panel .custom-select-control:focus-visible,
.admin-organization-panel .custom-select.is-open .custom-select-control {
    outline: 0;
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 4px var(--color-control-focus-ring);
}

.admin-organization-panel .custom-select-results {
    z-index: 4;
}

.admin-organization-panel textarea {
    height: auto;
    min-height: 82px;
    padding-block: 8px;
    resize: vertical;
}

.admin-organization-panel input:not([type="hidden"]):not([type="checkbox"])::placeholder,
.admin-organization-panel textarea::placeholder {
    color: var(--color-control-placeholder);
    font-weight: 400;
    opacity: 1;
}

.admin-organization-panel input:not([type="hidden"]):not([type="checkbox"]):hover,
.admin-organization-panel select:hover,
.admin-organization-panel textarea:hover {
    border-color: var(--color-control-focus-border);
}

.admin-organization-panel input:not([type="hidden"]):not([type="checkbox"]):focus,
.admin-organization-panel select:focus,
.admin-organization-panel textarea:focus {
    outline: 0;
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 4px var(--color-control-focus-ring);
}

.admin-organization-panel input:disabled,
.admin-organization-panel select:disabled,
.admin-organization-panel textarea:disabled {
    border-color: var(--color-control-disabled-border);
    background: var(--color-control-disabled-bg);
    color: var(--color-control-disabled-text);
    cursor: not-allowed;
}

.admin-organization-panel .form-field-error {
    color: var(--admin-organization-panel-form-field-error-text);
    font-size: 11px;
    font-weight: 400;
}

.admin-organization-panel .admin-organization-control-row,
.admin-organization-panel .commercial-quota-grant-form,
.admin-organization-panel .commercial-quota-cancel-form {
    align-items: end;
    gap: 12px;
}

.admin-organization-panel .admin-organization-control-row .btn,
.admin-organization-panel .admin-organization-form-actions .btn {
    min-height: 40px;
}

.admin-organization-panel .commercial-quota-summary {
    gap: 8px 20px;
    padding: 8px 12px;
    border: 1px solid var(--color-container-border);
    border-radius: 10px;
    background: var(--color-surface-tinted);
}

.admin-organization-panel .commercial-quota-summary strong {
    font-weight: 600;
}

.admin-organization-panel .commercial-quota-entry-edit > .form-grid {
    background: var(--color-surface-tinted);
}

.organization-ai-administration {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.organization-ai-status {
    min-height: 0;
    color: var(--color-tab-text);
    font-size: 12px;
    line-height: 1.4;
}

.organization-ai-status:empty {
    display: none;
}

.organization-ai-status.is-success,
.organization-ai-status.is-error {
    padding: 10px 12px;
    border: var(--organization-ai-status-is-success-border);
    border-radius: 10px;
    background: var(--organization-ai-status-is-success-surface);
    color: var(--organization-ai-status-is-success-text);
}

.organization-ai-status.is-error {
    border-color: var(--organization-ai-status-is-error-border);
    background: var(--organization-ai-status-is-error-surface);
    color: var(--organization-ai-status-is-error-text);
}

.organization-ai-block {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding-top: 14px;
    border-top: var(--organization-ai-block-border);
}

.organization-ai-block > header {
    display: grid;
    gap: 3px;
}

.organization-ai-block > header h3,
.organization-ai-block > header p {
    margin: 0;
}

.organization-ai-block > header h3 {
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.organization-ai-block > header p {
    max-width: 70ch;
    color: var(--organization-ai-block-text);
    font-size: 12px;
    line-height: 1.45;
}

.organization-ai-loading,
.organization-ai-empty {
    color: var(--organization-ai-loading-text);
    font-size: 12px;
}

.organization-ai-current {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    padding: 11px 12px;
    border: var(--organization-ai-current-border);
    border-radius: 10px;
    background: var(--organization-ai-current-surface);
}

.organization-ai-current-label {
    grid-column: 1 / -1;
    color: var(--organization-ai-current-label-text);
    font-size: 11px;
    line-height: 1.25;
}

.organization-ai-current > strong {
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.organization-ai-current > span:not(.organization-ai-current-label):not(.status-chip) {
    grid-column: 1;
    color: var(--color-tab-text);
    font-size: 12px;
    line-height: 1.35;
}

.organization-ai-current > .status-chip {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: center;
}

.organization-ai-current-usage {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 0;
}

.organization-ai-current-usage > div {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 9px;
    border-radius: 8px;
    background: var(--color-surface);
}

.organization-ai-current-usage dt {
    color: var(--color-text-tertiary);
    font-size: 10px;
    line-height: 1.25;
}

.organization-ai-current-usage dd {
    margin: 0;
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1.3;
}

.organization-ai-assignment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px 12px;
    margin-top: 10px;
}

.organization-ai-assignment-form > label,
.organization-ai-grant-form > label,
.organization-ai-history-form > label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--organization-ai-assignment-form-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.organization-ai-assignment-hint {
    grid-column: 1;
}

.organization-ai-assignment-form > .btn,
.organization-ai-grant-form > .btn {
    height: 40px;
    min-height: 40px;
}

.organization-ai-zero-warning {
    display: grid;
    grid-column: 1 / -1;
    gap: 5px;
    padding: 10px 12px;
    border: var(--organization-ai-zero-warning-border);
    border-radius: 10px;
    background: var(--organization-ai-zero-warning-surface);
    color: var(--organization-ai-zero-warning-text);
    font-size: 12px;
    line-height: 1.4;
}

.organization-ai-zero-warning.is-hidden {
    display: none;
}

.organization-ai-zero-warning > label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 3px;
    font-weight: 500;
    cursor: pointer;
}

.organization-ai-zero-warning input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--organization-ai-zero-warning-accent);
}

.organization-ai-balance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.organization-ai-balance-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.organization-ai-balance-toolbar > label {
    display: grid;
    grid-template-columns: auto minmax(150px, 190px);
    align-items: center;
    gap: 8px;
    color: var(--organization-ai-balance-toolbar-text);
    font-size: 12px;
    font-weight: 500;
}

.organization-ai-balance-toolbar select {
    height: 40px;
    min-height: 40px;
}

.organization-ai-balance-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: var(--organization-ai-balance-card-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.organization-ai-balance-card.is-assigned {
    border-color: var(--organization-ai-balance-card-is-assigned-border);
    box-shadow: var(--features-organization-ai-balance-card-is-assigned-shadow);
}

.organization-ai-balance-card > header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

.organization-ai-balance-card > header > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.organization-ai-balance-card > header strong {
    overflow: hidden;
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-ai-balance-card > header span:not(.status-chip),
.organization-ai-balance-card > small {
    color: var(--organization-ai-balance-card-status-chip-text);
    font-size: 11px;
    line-height: 1.35;
}

.organization-ai-balance-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.organization-ai-balance-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.organization-ai-balance-card dl > div {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 9px;
    border-radius: 8px;
    background: var(--color-surface-tinted);
}

.organization-ai-balance-card dt {
    color: var(--color-text-tertiary);
    font-size: 10px;
    line-height: 1.25;
}

.organization-ai-balance-card dd {
    margin: 0;
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.organization-ai-grant-form {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(130px, .45fr) minmax(200px, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.organization-ai-history-list {
    display: grid;
    border-top: var(--organization-ai-history-list-border);
}

.organization-ai-history-entry {
    display: grid;
    gap: 7px;
    padding: 11px 2px;
    border-bottom: var(--organization-ai-history-entry-border);
}

.organization-ai-history-entry.is-cancelled {
    opacity: .68;
}

.organization-ai-history-entry > header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
}

.organization-ai-history-entry > header > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.organization-ai-history-entry > header strong {
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.organization-ai-history-entry > header span:not(.status-chip),
.organization-ai-history-entry > small {
    color: var(--organization-ai-history-entry-status-chip-text);
    font-size: 11px;
    line-height: 1.35;
}

.organization-ai-history-entry > p {
    margin: 0;
    color: var(--organization-ai-history-entry-text);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.organization-ai-history-edit {
    margin-top: 3px;
}

.organization-ai-history-edit > summary {
    width: fit-content;
    color: var(--organization-ai-history-edit-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.organization-ai-history-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 11px;
    border: var(--organization-ai-history-form-border);
    border-radius: 10px;
    background: var(--color-surface-tinted);
}

.organization-ai-history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.organization-ai-history-actions > .btn {
    min-width: 120px;
}

.admin-organization-panel .admin-organization-add-user-panel.directory-import-panel {
    margin-top: 4px;
    padding: 12px;
    border-color: var(--admin-organization-panel-admin-organization-add-user-panel-directory-import-panel-border);
    border-radius: 10px;
    background: var(--color-surface-tinted);
}

.admin-organization-panel .admin-organization-add-user-panel .directory-step-head h2 {
    font-size: 13px;
    font-weight: 600;
}

.admin-organization-panel .admin-organization-user-card.schedules-drawer-card {
    border-color: var(--color-action-secondary-border);
    border-radius: 10px;
}

.admin-organization-panel .admin-organization-user-card .btn {
    min-height: 36px;
}

@media (max-width: 760px) {
    .admin-organization-disclosure-toggle {
        grid-template-columns: minmax(0, 1fr) 18px;
        gap: 8px 12px;
        min-height: 60px;
        padding: 11px 12px;
    }

    .admin-organization-disclosure-aside,
    .admin-organization-disclosure-toggle > .status-chip {
        grid-column: 1;
        justify-self: start;
    }

    .admin-organization-disclosure-toggle > svg {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .admin-organization-disclosure-panel {
        padding: 12px;
    }

    .admin-organization-user-summary,
    .admin-organization-user-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-organization-user-header-actions {
        grid-column: 1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-organization-user-header-actions form,
    .admin-organization-user-header-actions .btn {
        width: 100%;
    }

    .admin-organization-user-actions {
        grid-column: 1;
    }

    .admin-organization-user-actions form,
    .admin-organization-user-actions .btn {
        width: 100%;
    }

    .admin-organization-panel .form-grid,
    .admin-organization-panel .admin-organization-form-grid,
    .admin-organization-panel .commercial-quota-grant-form,
    .admin-organization-panel .commercial-quota-cancel-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-organization-panel .span-2 {
        grid-column: 1;
    }

    .admin-organization-panel .admin-organization-form-actions .btn,
    .admin-organization-panel .commercial-quota-grant-form .btn,
    .admin-organization-panel .commercial-quota-cancel-form .btn {
        width: 100%;
    }

    .organization-ai-current,
    .organization-ai-assignment-form,
    .organization-ai-balance-grid,
    .organization-ai-grant-form,
    .organization-ai-history-entry > header,
    .organization-ai-history-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-ai-current > .status-chip,
    .organization-ai-current > span:not(.organization-ai-current-label):not(.status-chip) {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .organization-ai-assignment-form > .btn,
    .organization-ai-grant-form > .btn {
        width: 100%;
    }

    .organization-ai-current-usage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .organization-ai-balance-toolbar,
    .organization-ai-history-actions {
        justify-content: stretch;
    }

    .organization-ai-balance-toolbar > label {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-ai-history-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .organization-ai-history-actions > .btn {
        width: 100%;
        min-width: 0;
    }

    .organization-ai-balance-card > header {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-ai-balance-badges {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-organization-disclosure-toggle,
    .admin-organization-disclosure-toggle > svg,
    .admin-organization-panel input,
    .admin-organization-panel select,
    .admin-organization-panel textarea {
        transition: none;
    }
}

.admin-university-backup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.admin-university-backup-card.schedules-drawer-card {
    min-height: 100%;
}

.admin-university-backup-form {
    margin-top: 16px;
}

.admin-university-combobox-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 500;
}

.admin-university-combobox-field .directory-combobox-search {
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
    font-size: 13px;
}

.admin-university-combobox-field .directory-combobox-results {
    top: calc(100% + 6px);
}

.admin-university-backup-stats {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: var(--admin-university-backup-stats-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.admin-university-backup-stats[hidden] {
    display: none;
}

.admin-university-backup-warning {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: var(--admin-university-backup-warning-border);
    border-radius: 10px;
    background: var(--admin-university-backup-warning-surface);
    color: var(--admin-university-backup-warning-text);
    font-size: 13px;
    line-height: 1.35;
}

.admin-university-backup-warning strong {
    color: var(--admin-university-backup-warning-text);
    font-size: 13px;
    font-weight: 600;
}

.admin-university-backup-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.admin-university-backup-metrics div {
    min-width: 0;
    padding: 8px 10px;
    border: var(--admin-university-backup-metrics-border);
    border-radius: 10px;
    background: var(--color-surface-tinted);
}

.admin-university-backup-metrics dt {
    margin: 0;
    color: var(--admin-university-backup-metrics-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.admin-university-backup-metrics dd {
    margin: 3px 0 0;
    color: var(--color-action-secondary-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.admin-university-backup-table-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--color-text-meta);
    font-size: 12px;
    line-height: 1.3;
}

.admin-university-backup-table-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-top: 6px;
    border-top: 1px solid var(--color-table-border);
}

.admin-university-backup-table-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-university-backup-table-list b {
    color: var(--color-action-secondary-text);
    font-weight: 600;
    white-space: nowrap;
}

.admin-organization-users {
    display: grid;
    gap: 12px;
}

.admin-organization-users .schedules-drawer-card {
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-organization-users .admin-organization-user-card.schedules-drawer-card {
    position: relative;
    display: block;
    padding: 12px;
    border: 1px solid var(--color-container-border);
    box-shadow: none;
    background: var(--color-surface);
}

.admin-organization-users .schedules-drawer-card-main {
    min-width: 0;
}

.admin-organization-users .schedules-drawer-card-title {
    align-items: flex-start;
    padding-right: 48px;
}

.admin-organization-users .schedules-drawer-card-meta {
    margin-top: 3px;
    color: var(--schedule-create-label-text);
    font-size: 11px;
    line-height: 1.35;
}

.admin-organization-user-delete-form {
    position: absolute;
    top: 14px;
    right: 12px;
    margin: 0;
}

.admin-organization-user-delete.slot-entry-delete-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--features-admin-organization-user-delete-slot-entry-delete-link-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.62;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.14s ease, opacity 0.14s ease;
}

.admin-organization-user-card:hover .admin-organization-user-delete.slot-entry-delete-link,
.admin-organization-user-card:focus-within .admin-organization-user-delete.slot-entry-delete-link {
    color: var(--conflict-color);
    opacity: 1;
}

.admin-organization-user-add-workspace.department-add-panel {
    margin-top: 0;
}

.organization-users-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.organization-users-list-panel {
    padding: 20px 22px 24px;
}

.organization-users-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 200px 190px auto auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
}

.organization-users-filters label,
.organization-user-drawer label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--color-text-meta);
    font-size: 13px;
    font-weight: 600;
}

.organization-users-filters input,
.organization-users-filters select,
.organization-user-drawer input:not([type="hidden"]):not([type="radio"]),
.organization-user-drawer select,
.organization-user-drawer textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--color-control-border);
    border-radius: 10px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    font-weight: 400;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.organization-users-filters select,
.organization-user-drawer select {
    appearance: none;
    padding-right: 38px;
    background-image: var(--select-chevron-image);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.organization-users-filters input:focus-visible,
.organization-users-filters select:focus-visible,
.organization-user-drawer input:focus-visible,
.organization-user-drawer select:focus-visible,
.organization-user-drawer textarea:focus-visible {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 3px var(--color-control-focus-ring);
}

.organization-user-drawer input[readonly],
.organization-user-drawer input:disabled,
.organization-user-drawer select:disabled,
.organization-user-drawer textarea:disabled {
    background-color: var(--color-surface-muted-strong);
    color: var(--organization-user-drawer-text);
    cursor: not-allowed;
}

.organization-user-drawer textarea {
    min-height: 96px;
    resize: vertical;
}

.organization-user-mode input[type="radio"] {
    appearance: none;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--color-choice-border);
    border-radius: 50%;
    background: var(--color-control-bg);
    box-shadow: inset 0 0 0 4px var(--color-control-bg);
    cursor: pointer;
}

.organization-user-mode input[type="radio"]:checked {
    border-color: var(--color-choice-active);
    background: var(--color-choice-active);
}

.organization-user-mode input[type="radio"]:focus-visible {
    outline: 3px solid var(--color-choice-focus-ring);
    outline-offset: 2px;
}

.organization-users-table td:first-child strong,
.organization-users-table td:first-child small,
.organization-users-table td:nth-child(3) small {
    display: block;
}

.organization-users-table td small {
    margin-top: 4px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.organization-users-table td::before {
    display: none;
}

.organization-user-panel {
    --drawer-width: 620px;
}

.organization-user-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: var(--organization-user-summary-border);
    border-radius: 10px;
    background: var(--color-surface-soft);
    color: var(--color-tab-text);
    font-size: 13px;
}

.organization-user-mode {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--color-container-border);
    border-radius: 10px;
}

.organization-user-mode label {
    flex-direction: row;
    align-items: center;
    font-weight: 500;
}

.organization-user-action-group {
    margin-top: 16px;
    border: var(--organization-user-action-group-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.organization-user-action-group > summary {
    padding: 13px 15px;
    color: var(--organization-user-action-group-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.organization-user-action-group > form,
.organization-user-action-stack {
    padding: 0 15px 15px;
}

.organization-user-action-stack {
    display: grid;
    gap: 14px;
}

.organization-user-secret {
    margin-bottom: 18px;
    padding: 16px;
    border: var(--organization-user-secret-border);
    border-radius: 10px;
    background: var(--organization-user-secret-surface);
    color: var(--organization-user-secret-text);
}

.organization-user-secret code {
    display: block;
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--organization-user-secret-text-variant-2);
    font-size: 14px;
    overflow-wrap: anywhere;
    user-select: all;
}

@media (max-width: 1050px) {
    .organization-users-filters {
        grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr);
    }

    .organization-users-filters .btn {
        width: 100%;
    }
}

@media (max-width: 900px) {
    html.responsive-account-document,
    body[data-active-nav="organization_users"],
    body[data-active-nav="admin_platform_users"],
    body[data-active-nav="account"] {
        min-width: 0;
        overflow-x: hidden;
    }

    body[data-active-nav="organization_users"] .app-shell,
    body[data-active-nav="admin_platform_users"] .app-shell,
    body[data-active-nav="account"] .app-shell {
        min-width: 0;
    }

    .organization-users-table {
        display: block;
        min-width: 0;
    }

    .organization-users-table colgroup {
        display: none;
    }

    .organization-users-table thead {
        display: none;
    }

    .organization-users-table tbody,
    .organization-users-table tr,
    .simple-table.organization-users-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .organization-users-table tr {
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid var(--color-action-secondary-border);
        border-radius: 10px;
        background: var(--color-surface);
    }

    .organization-users-table td {
        display: grid;
        grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        min-width: 0;
        padding: 10px 12px;
        border-bottom: 1px solid var(--drawer-divider-color);
        text-align: left;
    }

    .organization-users-table.directory-list-table tbody td {
        height: auto;
    }

    .organization-users-table td > small {
        grid-column: 2;
        margin-top: 2px;
    }

    .organization-users-table td:last-child {
        border-bottom: 0;
    }

    .organization-users-table td::before {
        display: block;
        content: attr(data-label);
        color: var(--color-tab-text);
        font-size: 12px;
        font-weight: 500;
    }

    .organization-users-table td:last-child .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .organization-users-head {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-users-head > .btn,
    .organization-users-filters .btn,
    .organization-user-drawer .slot-editor-actions .btn {
        width: 100%;
    }

    .organization-users-list-panel {
        padding: 14px;
    }

    .organization-users-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-user-panel {
        --drawer-screen-gap: 0;
        --drawer-padding-left: 14px;
        --drawer-scrollbar-gutter: 14px;
        width: 100vw;
        border-radius: 0;
    }
}

.organization-users-page .form-grid.organization-user-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.organization-users-page .form-grid.organization-user-form label {
    min-width: 0;
}

.organization-users-page .organization-users-form-workspace {
    grid-template-columns: minmax(0, 1fr);
}

.organization-users-page .organization-users-form-workspace::before {
    display: none;
}

.organization-users-page .directory-import-input {
    grid-column: 1;
    min-height: 0;
}

.organization-users-page .directory-import-footer {
    justify-content: flex-end;
}

.organization-publication-panel.directory-step-panel {
    padding: 16px 18px 18px;
}

.organization-publication-panel .directory-step-head {
    margin-bottom: 12px;
}

.organization-publication-panel.directory-import-panel .directory-step-head {
    margin-bottom: 28px;
}

.organization-publication-panel .directory-block-head {
    margin-bottom: 0;
}

.organization-publication-content {
    padding: 0;
}

.organization-publication-fields {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.organization-publication-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1.08fr);
    gap: 12px;
    align-items: stretch;
}

.organization-publication-card {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface-subtle);
}

.organization-publication-card label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 500;
}

.organization-publication-grid input,
.organization-publication-grid textarea {
    width: 100%;
    min-width: 0;
    border-color: var(--color-control-border);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.4;
}

.organization-publication-grid input {
    height: 36px;
    padding: 0 12px;
}

.organization-publication-grid textarea {
    height: 74px;
    min-height: 74px;
    padding: 9px 12px;
    resize: vertical;
}

.organization-publication-vk-card {
    gap: 10px;
}

.organization-publication-panel.is-commercial-locked {
    border-color: var(--organization-publication-panel-is-commercial-locked-border);
}

.organization-publication-panel.is-commercial-locked .directory-step-num {
    background: var(--organization-publication-panel-is-commercial-locked-directory-step-num-surface);
    color: var(--organization-publication-panel-is-commercial-locked-directory-step-num-text);
}

.organization-publication-panel.is-commercial-locked .directory-step-toggle:disabled {
    opacity: 1;
    color: var(--organization-publication-panel-is-commercial-locked-directory-step-toggle-disabled-text);
    cursor: not-allowed;
}

.commercial-feature-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 4px;
    padding: 2px 8px;
    border: var(--commercial-feature-badge-border);
    border-radius: 999px;
    background: var(--commercial-feature-badge-surface);
    color: var(--commercial-feature-badge-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.commercial-feature-callout {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border: var(--commercial-feature-callout-border);
    border-radius: 10px;
    background: var(--commercial-feature-callout-surface);
    color: var(--commercial-feature-callout-text);
}

.commercial-feature-callout strong {
    color: var(--commercial-feature-callout-text-variant-2);
    font-size: 13px;
    font-weight: 600;
}

.commercial-feature-callout span {
    font-size: 12px;
    line-height: 1.4;
}

.commercial-feature-fieldset {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.commercial-feature-fieldset:disabled {
    opacity: .58;
}

.commercial-plan-configurator {
    padding: 0;
    overflow: hidden;
}

.commercial-plan-form {
    padding: 24px;
}

.commercial-plan-form + .commercial-plan-form {
    border-top: 1px solid var(--line, var(--color-action-secondary-border));
}

.commercial-plan-form-head,
.commercial-plan-form-footer {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.commercial-plan-form-head {
    justify-content: space-between;
    margin-bottom: 20px;
}

.commercial-plan-form-head h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
}

.commercial-plan-form-head div > span {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.commercial-plan-feature-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.commercial-plan-feature-group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.commercial-plan-feature-group legend {
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.commercial-plan-feature-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 52px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider-border);
}

.commercial-plan-feature-row input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.commercial-plan-feature-row > span {
    display: grid;
    flex: 1 1 auto;
    gap: 2px;
    min-width: 0;
}

.commercial-plan-feature-row b {
    font-size: 14px;
    font-weight: 500;
}

.commercial-plan-feature-row small,
.commercial-plan-feature-row em {
    color: var(--color-text-muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
}

.commercial-plan-feature-row em {
    flex: 0 0 auto;
}

.commercial-plan-form-footer {
    align-items: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-divider-border);
}

.commercial-plan-form-footer label {
    display: grid;
    gap: 6px;
    flex: 0 1 280px;
}

.commercial-plan-form-footer label > span {
    font-size: 12px;
    font-weight: 500;
}

.commercial-plan-form-footer input {
    min-height: 40px;
}

.commercial-plan-form-footer .commercial-plan-reason {
    flex: 1 1 360px;
}

.commercial-plan-form-footer .btn {
    min-height: 40px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .commercial-plan-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .commercial-plan-form-footer label,
    .commercial-plan-form-footer .commercial-plan-reason {
        width: 100%;
        flex-basis: auto;
    }
}

.ai-commercial-callout {
    margin-bottom: 12px;
}

.ai-commercial-lock {
    width: 100%;
}

.grid-xlsx-draft-open.is-commercial-locked,
.grid-xlsx-draft-open.is-commercial-locked:hover {
    border-color: var(--grid-xlsx-draft-open-is-commercial-locked-border);
    background: var(--color-surface-muted-strong);
    color: var(--grid-xlsx-draft-open-is-commercial-locked-text);
    cursor: not-allowed;
}

.grid-calendar-commercial-callout {
    margin-top: 12px;
}

.bell-commercial-callout {
    margin-bottom: 12px;
}

.organization-publication-vk-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.organization-publication-vk-fields {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.organization-publication-vk-sync {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.organization-publication-vk-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 500;
}

.organization-publication-vk-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.organization-publication-card .organization-publication-vk-toggle-row .ai-settings-toggle,
.organization-publication-card .organization-publication-vk-toggle-row .ai-settings-toggle-head {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    min-height: 46px;
    min-width: 260px;
    width: auto;
    margin: 0;
    padding: 0 14px;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
}

.organization-publication-card .organization-publication-vk-toggle-row .ai-settings-toggle input[type="checkbox"],
.organization-publication-card .organization-publication-vk-toggle-row .ai-settings-toggle-head input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    border-radius: 4px;
}

.organization-publication-card .organization-publication-vk-toggle-row .ai-settings-toggle span,
.organization-publication-card .organization-publication-vk-toggle-row .ai-settings-toggle-head span {
    display: inline;
    white-space: nowrap;
}

.organization-publication-vk-form input[type="url"],
.organization-publication-vk-form input[type="password"] {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--color-control-border);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.4;
    background: var(--color-control-bg);
}

.organization-publication-link-input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--color-control-border);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.4;
    background: var(--color-control-bg);
}

.organization-publication-vk-status,
.organization-publication-vk-message,
.organization-publication-vk-meta {
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 500;
}

.organization-publication-vk-status.is-success,
.organization-publication-vk-message.is-success,
.organization-publication-vk-message.ok {
    color: var(--color-success-text);
}

.organization-publication-vk-status.is-disabled,
.organization-publication-vk-log-status.is-disabled {
    color: var(--color-tab-text);
}

.organization-publication-vk-status.is-failure,
.organization-publication-vk-message.is-error,
.organization-publication-vk-message.error {
    color: var(--organization-publication-vk-status-is-failure-text);
}

.organization-publication-vk-actions {
    justify-content: flex-end;
}

.organization-publication-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.organization-publication-actions .btn {
    min-height: 36px;
    height: 36px;
    min-width: 132px;
}

.organization-publication-vk-log {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding-top: 4px;
    border-top: 1px solid var(--color-divider-border);
}

.organization-publication-vk-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.organization-publication-vk-log-head h4 {
    margin: 0;
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.organization-publication-vk-log-list {
    display: grid;
    min-width: 0;
    border: 1px solid var(--color-container-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-surface);
}

.organization-publication-vk-log-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) 156px;
    gap: 10px;
    align-items: center;
    min-width: 0;
    min-height: 36px;
    padding: 7px 10px;
    border-top: 1px solid var(--color-divider-border);
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.organization-publication-vk-log-row:first-child {
    border-top: 0;
}

.organization-publication-vk-log-status {
    font-weight: 600;
    white-space: nowrap;
}

.organization-publication-vk-log-status.is-success {
    color: var(--color-success-text);
}

.organization-publication-vk-log-status.is-failure {
    color: var(--organization-publication-vk-log-status-is-failure-text);
}

.organization-publication-vk-log-message {
    min-width: 0;
    overflow: hidden;
    color: var(--color-action-secondary-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-publication-vk-log-row time {
    justify-self: end;
    color: var(--color-text-disabled);
    white-space: nowrap;
}

.organization-publication-vk-log-empty {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

.organization-publication-preview {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.organization-publication-widget-shell {
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--color-container-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.organization-publication-widget-frame {
    display: block;
    width: 100%;
    height: 360px;
    min-height: 360px;
    border: 0;
    background: var(--color-surface);
}

#organization-users-page-root .organization-users-table {
    table-layout: fixed;
    font-size: 14px;
    line-height: 1.3;
}

#organization-users-page-root .organization-users-table th,
#organization-users-page-root .organization-users-table td {
    font-size: inherit;
}

#organization-users-page-root .organization-users-table th:first-child,
#organization-users-page-root .organization-users-table td:first-child,
#organization-users-page-root .organization-users-table th:last-child,
#organization-users-page-root .organization-users-table td:last-child {
    width: auto;
}

#organization-users-page-root .organization-users-col-role {
    width: 240px;
}

#organization-users-page-root .organization-users-col-status {
    width: 150px;
}

#organization-users-page-root .organization-users-col-security {
    width: 180px;
}

#organization-users-page-root .organization-users-col-last-login {
    width: 144px;
}

#organization-users-page-root .organization-users-col-action {
    width: 112px;
}

#organization-users-page-root .organization-users-last-login,
#organization-users-page-root .organization-users-last-login time {
    font: inherit;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#organization-users-page-root .organization-users-table th:nth-child(5) {
    white-space: nowrap;
}

#organization-users-page-root .organization-users-action {
    text-align: right;
    white-space: nowrap;
}

#organization-users-page-root .organization-users-open-button {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 1180px) {
    #organization-users-page-root .organization-users-col-role {
        width: 210px;
    }

    #organization-users-page-root .organization-users-col-status {
        width: 132px;
    }

    #organization-users-page-root .organization-users-col-security {
        width: 150px;
    }

    .organization-users-page .form-grid.organization-user-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .admin-university-backup-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-publication-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-publication-vk-form,
    .organization-publication-vk-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-publication-vk-actions {
        justify-content: flex-start;
    }

    .organization-publication-vk-log-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }

    .organization-publication-vk-log-row time {
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .admin-university-backup-metrics {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-publication-actions {
        justify-content: flex-start;
    }

    .organization-publication-actions .btn {
        flex: 1 1 160px;
    }

    .organization-publication-widget-shell,
    .organization-publication-widget-frame {
        min-height: 420px;
    }

    .organization-users-page .form-grid.organization-user-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

.study-plans-table .study-plan-period-cell {
    width: 132px;
    min-width: 132px;
    margin: 0 auto;
    text-align: left;
}

.study-plans-table .study-plan-period-cell span:first-child {
    justify-self: start;
    white-space: nowrap;
}

.study-plans-table .study-plan-period-cell strong {
    justify-self: end;
    text-align: right;
}

.study-plans-table .schedules-row-subtitle {
    margin-top: 3px;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.25;
}

.study-plans-table .status-chip + .status-chip {
    margin-left: 5px;
}

.study-plan-sort-btn,
.schedules-sort-btn {
    position: relative;
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.study-plan-sort-btn.is-active,
.schedules-sort-btn.is-active {
    font-weight: 700;
}

.study-plan-sort-indicator,
.schedules-sort-indicator {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translate(4px, -50%);
    font-size: 10px;
    line-height: 1;
    text-align: center;
}

.status-chip.status-chip-muted {
    --status-border: var(--features-status-chip-status-chip-muted-status-border);
    --status-surface: var(--features-status-chip-status-chip-muted-status-surface);
    --status-text: var(--features-status-chip-status-chip-muted-status-text);
    font-weight: 400;
}

.study-plan-detail-drawer .schedules-detail-panel {
    --drawer-width: 1060px;
}

.study-plan-detail-drawer .slot-editor-head,
.study-plan-detail-drawer .schedules-drawer-summary,
.study-plan-detail-drawer .study-plan-drawer-tabs,
.study-plan-detail-drawer .slot-editor-actions {
    flex: 0 0 auto;
}

#study-plan-drawer-content {
    flex: 1 1 auto;
    min-height: 0;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

#study-plan-drawer-content::-webkit-scrollbar {
    width: 8px;
}

#study-plan-drawer-content::-webkit-scrollbar-track {
    background: transparent;
}

#study-plan-drawer-content::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    background-clip: padding-box;
}

#study-plan-drawer-content::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

#study-plan-drawer-content .directory-list-table-wrap {
    min-height: 0;
    overflow: hidden;
}

#study-plan-upload-drawer .schedules-detail-panel {
    --drawer-width: 920px;
}

.study-plan-upload-drop {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px dashed var(--color-control-border-subtle);
    border-radius: 10px;
    background: var(--color-surface-tinted);
}

.study-plan-upload-drop input[type="file"] {
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 9px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font-size: 13px;
}

.study-plan-upload-drop p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

/* Shared compact document-upload control for reviewed files in drawers. */
.file-upload-control {
    display: grid;
    grid-template-columns: auto auto minmax(160px, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.file-upload-control-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-control > .btn {
    min-height: 40px;
}

.file-upload-control-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
}

.file-upload-control-trigger svg {
    width: 16px;
    height: 16px;
}

.file-upload-control-trigger.is-disabled {
    pointer-events: none;
    opacity: 0.58;
}

.file-upload-control-name {
    min-width: 0;
    overflow: hidden;
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-control-status {
    min-width: 0;
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.3;
    text-align: right;
}

.file-upload-control-trigger:focus-within {
    outline: 2px solid var(--color-control-focus-border);
    outline-offset: 2px;
}

/* Proposal registry follows the organization-list density while exposing the work per recipient. */
#commercial-proposal-review {
    margin-bottom: 16px;
}

#commercial-proposal-university-refresh-section {
    margin-bottom: 16px;
}

#commercial-proposal-review .admin-organization-disclosure-panel {
    gap: 8px;
    border-top: 0;
}

#commercial-proposal-review h3,
#commercial-proposal-review .file-upload-control {
    margin: 0;
}

.commercial-proposal-filter-bar .commercial-proposal-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.7fr) auto;
    width: 100%;
    margin-bottom: 0;
}

.commercial-proposal-filter-bar .commercial-proposal-filter-row:not(:has(.schedules-more-filters)) {
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.7fr);
}

.commercial-proposal-filter-bar .schedules-search,
.commercial-proposal-filter-bar .schedules-period-select,
.commercial-proposal-filter-bar .schedules-period-select .custom-select {
    width: 100%;
    min-width: 0;
}

.commercial-proposal-registry-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.commercial-proposal-registry-table th,
.commercial-proposal-registry-table td {
    box-sizing: border-box;
    padding-right: 12px;
    padding-left: 12px;
}

.commercial-proposal-registry-table th:nth-child(1),
.commercial-proposal-registry-table td:nth-child(1) { min-width: 0; width: 32%; }
.commercial-proposal-registry-table th:nth-child(2),
.commercial-proposal-registry-table td:nth-child(2) { width: 13%; }
.commercial-proposal-registry-table th:nth-child(3),
.commercial-proposal-registry-table td:nth-child(3) { width: 8%; }
.commercial-proposal-registry-table th:nth-child(4),
.commercial-proposal-registry-table td:nth-child(4) { width: 14%; }
.commercial-proposal-registry-table th:nth-child(5),
.commercial-proposal-registry-table td:nth-child(5) { width: 4%; }
.commercial-proposal-registry-table th:nth-child(6),
.commercial-proposal-registry-table td:nth-child(6) { width: 14%; }
.commercial-proposal-registry-table th:nth-child(7),
.commercial-proposal-registry-table td:nth-child(7) { width: 15%; }

.commercial-proposal-registry-table td {
    padding-top: 12px;
    padding-bottom: 12px;
    vertical-align: middle;
}

.commercial-proposal-pin.is-pinned svg { fill: currentColor; }

.commercial-proposal-requisites,
.commercial-proposal-recipient-roles,
.commercial-proposal-recipient-names,
.commercial-proposal-recipient-mail-list,
.commercial-proposal-recipient-emails,
.commercial-proposal-recipient-delivery {
    display: grid;
    gap: 2px;
}

.commercial-proposal-requisites {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    row-gap: 2px;
}

.commercial-proposal-identity {
    align-items: center;
}

.commercial-proposal-requisites span,
.commercial-proposal-requisites a,
.commercial-proposal-recipient-roles span,
.commercial-proposal-recipient-emails span,
.commercial-proposal-recipient-delivery span,
.commercial-proposal-website {
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.35;
}

.commercial-proposal-requisites a { width: max-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commercial-proposal-identity-copy { display: grid; gap: 2px; min-width: 0; }
.commercial-proposal-offer-title { display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0; gap: 2px 6px; }
.commercial-proposal-offer-number { flex: 0 0 auto; color: var(--color-text-primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.commercial-proposal-offer-university-name { min-width: 0; color: var(--color-text-primary); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; white-space: normal; }
.commercial-proposal-document-links { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-width: 0; }
.commercial-proposal-document-links .commercial-proposal-document-button { flex: 0 0 auto; min-height: 22px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.commercial-proposal-document-links .commercial-proposal-document-button.is-pdf { border-color: var(--color-danger-text); background: var(--color-danger-text); color: var(--color-text-on-strong); }
.commercial-proposal-requisites-tooltip { width: max-content; }
.commercial-proposal-requisites-tooltip button { min-height: 20px; padding: 0; border: 0; background: transparent; color: var(--color-link-text); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.commercial-proposal-requisites-tooltip > span { display: none; }
.commercial-proposal-requisites-popover { position: fixed; z-index: 35; width: min(620px, calc(100vw - 24px)); padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--color-surface); color: var(--color-text-primary); box-shadow: var(--color-popover-shadow); font-size: 13px; line-height: 1.5; white-space: pre-line; pointer-events: none; }

.commercial-proposal-recipient-roles,
.commercial-proposal-recipient-names,
.commercial-proposal-recipient-mail-list,
.commercial-proposal-recipient-emails,
.commercial-proposal-recipient-delivery { min-width: 0; }
.commercial-proposal-recipient-roles span,
.commercial-proposal-recipient-names span,
.commercial-proposal-recipient-mail-list > button,
.commercial-proposal-recipient-emails span,
.commercial-proposal-recipient-delivery > div { min-height: 26px; }
.commercial-proposal-recipient-roles { text-align: right; }
.commercial-proposal-recipient-names span,
.commercial-proposal-recipient-emails span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commercial-proposal-recipient-names span { color: var(--color-text-primary); font-size: 13px; font-weight: 400; line-height: 1.35; }
.commercial-proposal-recipient-mail-list { justify-items: center; }
.commercial-proposal-recipient-mail { display: inline-flex; width: 22px; height: 26px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--color-link-text); cursor: pointer; }
.commercial-proposal-recipient-mail:hover:not(:disabled) { color: var(--color-link-hover); background: transparent; }
.commercial-proposal-recipient-mail:focus-visible { outline: 2px solid var(--color-control-focus-border); outline-offset: 2px; border-radius: 3px; }
.commercial-proposal-recipient-mail:disabled { color: var(--color-text-muted); cursor: not-allowed; opacity: .6; }
.commercial-proposal-recipient-mail.is-approved { color: var(--color-success-text); background: transparent; }
.commercial-proposal-recipient-mail::before { content: ''; width: 17px; height: 17px; background: currentColor; mask: url('/assets/commercial-proposals/mail-pending.svg') center / contain no-repeat; -webkit-mask: url('/assets/commercial-proposals/mail-pending.svg') center / contain no-repeat; }
.commercial-proposal-recipient-mail.is-approved::before { mask-image: url('/assets/commercial-proposals/mail-approved.svg'); -webkit-mask-image: url('/assets/commercial-proposals/mail-approved.svg'); }
.commercial-proposal-recipient-mail svg { display: none; }
.commercial-proposal-recipient-delivery > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.commercial-proposal-delivery-status { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 6px; border: 0; border-radius: 6px; color: var(--color-text-secondary); background: var(--color-surface-tinted); font-size: 12px; line-height: 1; white-space: nowrap; }
.commercial-proposal-delivery-status.is-success { color: var(--color-success-text); border-color: var(--color-success-border); background: var(--color-success-surface); }
.commercial-proposal-delivery-status.is-success::before { content: ''; width: 13px; height: 13px; flex: 0 0 auto; background: currentColor; mask: url('/assets/commercial-proposals/mail-sent.svg') center / contain no-repeat; -webkit-mask: url('/assets/commercial-proposals/mail-sent.svg') center / contain no-repeat; }
.commercial-proposal-delivery-status.is-progress { color: var(--color-link-text); border-color: var(--border-soft); background: var(--color-surface); }
.commercial-proposal-delivery-status.is-error { color: var(--color-danger-text); border-color: var(--color-danger-border); background: var(--color-danger-surface); }
.commercial-proposal-delivery-action { color: var(--color-link-text); font-size: 12px; text-decoration: none; white-space: nowrap; }
.commercial-proposal-delivery-action:hover { text-decoration: underline; text-underline-offset: 2px; }

.commercial-proposal-delivery-history { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.commercial-proposal-delivery-history h4 { margin: 0; color: var(--color-text-primary); font-size: 13px; line-height: 1.35; }
.commercial-proposal-delivery-history-table { width: 100%; border-collapse: collapse; color: var(--color-text-secondary); font-size: 12px; line-height: 1.35; }
.commercial-proposal-delivery-history-table :is(th, td) { padding: 2px 0; vertical-align: baseline; }
.commercial-proposal-delivery-history-table th { width: 180px; color: var(--color-text-primary); font-weight: 600; text-align: left; }
.commercial-proposal-delivery-history-table td { min-width: 0; }
.commercial-proposal-delivery-history-table td:nth-child(2),
.commercial-proposal-delivery-history-table td:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commercial-proposal-delivery-history-table td:nth-child(3) { padding-left: 12px; }
.commercial-proposal-delivery-history-table td:last-child { width: 1%; padding-left: 12px; color: var(--color-text-meta); text-align: right; white-space: nowrap; }

.commercial-proposal-mail-panel { width: min(600px, 100vw); }
.commercial-proposal-mail-form.schedules-drawer-scroll.slot-editor-scroll-area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; align-content: start; padding: 20px; }
.commercial-proposal-mail-form > label { display: grid; gap: 7px; min-width: 0; color: var(--color-text-meta); font-size: 12px; font-weight: 500; line-height: 1.3; }
.commercial-proposal-mail-form :is(input, textarea) { width: 100%; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--color-control-border); border-radius: 8px; background: var(--color-control-bg); box-shadow: none; color: var(--color-text); font: inherit; font-size: 14px; line-height: 1.35; resize: none; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.commercial-proposal-mail-form textarea { min-height: 210px; max-height: min(60vh, 620px); padding-block: 8px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: break-word; resize: vertical; }
.commercial-proposal-mail-form :is(input, textarea):hover { border-color: var(--color-control-focus-border); }
.commercial-proposal-mail-form :is(input, textarea):focus { outline: 0; border-color: var(--color-control-focus-border); box-shadow: 0 0 0 4px var(--color-control-focus-ring); }
.commercial-proposal-mail-form :is(input, textarea):disabled { border-color: var(--color-control-disabled-border); background: var(--color-control-disabled-bg); color: var(--color-control-disabled-text); cursor: not-allowed; }
.commercial-proposal-mail-attachment { display: inline-flex; align-items: center; width: max-content; max-width: 100%; gap: 7px; min-height: 30px; padding: 0 9px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--color-text-secondary); font-size: 13px; text-decoration: none; }
.commercial-proposal-mail-attachment:not(.is-disabled):hover { border-color: var(--color-control-focus-border); color: var(--color-link-text); }
.commercial-proposal-mail-attachment.is-disabled { cursor: default; opacity: .72; pointer-events: none; }
.commercial-proposal-mail-attachment::before { content: ''; width: 16px; height: 16px; flex: 0 0 auto; background: var(--color-link-text); mask: url('/assets/commercial-proposals/upload.svg') center / contain no-repeat; -webkit-mask: url('/assets/commercial-proposals/upload.svg') center / contain no-repeat; }
.commercial-proposal-mail-attachment svg { display: none; }
.commercial-proposal-mail-drawer.is-hidden { display: none; }

@media (max-width: 900px) {
    .commercial-proposal-filter-bar .commercial-proposal-filter-row,
    .commercial-proposal-filter-bar .commercial-proposal-filter-row:not(:has(.schedules-more-filters)) {
        grid-template-columns: minmax(0, 1fr);
    }

    .file-upload-control {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .file-upload-control-name {
        grid-column: 1 / -1;
        order: 3;
    }
}

.study-plan-upload-progress {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--color-editor-control-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.study-plan-upload-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--schedule-create-text);
    font-size: 13px;
}

.study-plan-upload-progress-head strong {
    font-weight: 600;
}

.study-plan-upload-progress-head span,
.study-plan-upload-progress-detail {
    color: var(--study-plan-upload-progress-head-text);
    font-size: 12px;
}

.study-plan-upload-progress-track {
    --component-progress-fill: var(--progress-fill-upload);
    height: 8px;
}

.study-plan-upload-progress-track span {
    width: 0;
    transition: width 180ms ease;
}

.study-plan-upload-progress.is-indeterminate .study-plan-upload-progress-track span {
    width: 38%;
    animation: study-plan-upload-progress-slide 1.1s ease-in-out infinite;
}

@keyframes study-plan-upload-progress-slide {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(280%);
    }
}

.study-plan-batch-panel {
    display: grid;
    gap: 10px;
}

.study-plan-batch-panel h3 {
    margin: 0;
    color: var(--schedule-create-text);
    font-size: 14px;
    font-weight: 600;
}

.study-plan-batch-table-wrap {
    overflow: visible;
}

.study-plan-batch-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.study-plan-batch-table th,
.study-plan-batch-table td {
    padding: 10px 12px;
    vertical-align: top;
}

.study-plan-batch-table th {
    background: var(--color-surface-tinted);
    color: var(--color-data-table-header-text);
    font-size: 14px;
    font-weight: 600;
}

.study-plan-batch-table th:nth-child(1),
.study-plan-batch-table td:nth-child(1) {
    width: 42%;
}

.study-plan-batch-table th:nth-child(2),
.study-plan-batch-table td:nth-child(2) {
    width: 132px;
}

.study-plan-batch-table th:nth-child(3),
.study-plan-batch-table td:nth-child(3) {
    width: auto;
}

.study-plan-batch-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.study-plan-batch-main-row > td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.study-plan-batch-profile-row > td {
    padding: 0 12px 14px;
    background: var(--color-surface);
    border-top: 0;
}

.study-plan-batch-table td:last-child,
.study-plan-batch-table th:last-child {
    white-space: normal;
}

.study-plan-batch-file {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.study-plan-batch-file-icon {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 8px;
    background: var(--grid-plan-drop-blocked-state-surface);
    color: var(--color-tab-text);
}

.study-plan-batch-file-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.study-plan-batch-file-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.study-plan-batch-file-name {
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.study-plan-batch-file-ext {
    color: var(--color-text-disabled);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
}

.study-plan-batch-status {
    max-width: 100%;
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;
}

.study-plan-batch-status.is-duplicate {
    background: var(--color-surface-hover);
    color: var(--color-tab-text);
}

.study-plan-batch-status.is-requires_correct_export {
    background: var(--calendar-weekend-surface);
    color: var(--study-plan-batch-status-is-requires-correct-export-text);
}

.study-plan-batch-status.is-imported,
.study-plan-batch-status.is-new_revision {
    background: var(--color-success-surface);
    color: var(--color-success-text);
}

.study-plan-batch-status.is-error {
    background: var(--grid-entry-drop-risk-state-surface);
    color: var(--study-plan-batch-status-is-error-text);
}

.study-plan-batch-message {
    color: var(--study-plan-batch-message-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.study-plan-profile-input {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
    align-items: start;
    width: 100%;
    min-width: 0;
    padding: 10px 0 2px 0;
    border-top: 1px dashed var(--color-data-table-tree-border);
}

.study-plan-profile-input-info {
    flex: 1 1 360px;
    min-width: 240px;
    display: grid;
    gap: 3px;
    color: var(--study-plan-profile-input-info-text);
}

.study-plan-profile-input-label {
    color: var(--color-data-table-header-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.study-plan-profile-input-controls {
    flex: 0 1 680px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: min(100%, 460px);
    max-width: 100%;
}

.study-plan-profile-input .custom-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.study-plan-profile-input .custom-select-control {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 13px;
}

.study-plan-profile-input .custom-select-results {
    left: auto;
    right: 0;
    width: max-content;
    min-width: 100%;
    max-width: min(560px, calc(100vw - 48px));
}

.study-plan-profile-input .directory-combobox-result {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.study-plan-profile-input .directory-combobox-results-scroll {
    max-height: 220px;
}

.study-plan-profile-input-meta {
    color: var(--study-plan-profile-input-meta-text);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.study-plan-profile-input-empty {
    flex: 1 0 100%;
    color: var(--color-text-disabled);
    font-size: 12px;
    line-height: 1.35;
    text-align: right;
}

.study-plan-profile-input select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 36px;
    border: 1px solid var(--color-control-border-subtle);
    border-radius: 9px;
    padding: 0 10px;
    color: var(--color-action-secondary-text);
    font-size: 13px;
}

.study-plan-profile-input select:focus {
    border-color: var(--study-plan-profile-input-focus-border);
    outline: none;
    box-shadow: var(--features-study-plan-profile-input-select-focus-shadow);
}

.study-plan-drawer-tabs {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 4px 0 8px;
}

.study-plan-drawer-tab {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--color-tab-text);
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.study-plan-drawer-tab:hover,
.study-plan-drawer-tab.is-active {
    border-color: var(--color-tab-active-border);
    background: var(--color-tab-active-surface);
    color: var(--color-tab-active-text);
}

.study-plan-department-cell {
    display: inline-grid;
    justify-items: start;
    gap: 2px;
    min-width: 78px;
    line-height: 1.25;
}

.study-plan-department-total,
.study-plan-department-needed {
    display: inline-block;
    min-width: 2ch;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.study-plan-department-total {
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-weight: 400;
}

.study-plan-mapping-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    margin: 3px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--study-plan-mapping-text);
    font: inherit;
    font-size: 12px;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.study-plan-mapping-link:hover {
    color: var(--study-plan-mapping-hover-text);
    text-decoration: underline;
}

.study-plan-department-mapping-panel {
    display: grid;
    gap: 12px;
}

.study-plan-workload-table {
    min-width: 760px;
    table-layout: fixed;
}

.study-plan-workload-table td,
.study-plan-workload-table th {
    vertical-align: top;
}

.study-plan-workload-table th:nth-child(1),
.study-plan-workload-table td:nth-child(1) {
    width: auto;
}

.study-plan-workload-table th:nth-child(2),
.study-plan-workload-table td:nth-child(2),
.study-plan-workload-table th:nth-child(3),
.study-plan-workload-table td:nth-child(3) {
    width: 86px;
    text-align: center;
    vertical-align: middle;
}

.study-plan-workload-table.is-period-expanded-all > thead > tr > th:last-child,
.study-plan-workload-table.is-period-expanded-all > tbody > .study-plan-workload-row > td:last-child {
    width: auto;
    text-align: left;
    white-space: normal;
}

.study-plan-workload-table td:first-child strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.study-plan-workload-table tbody .study-plan-workload-row:focus-within {
    background: transparent;
}

.study-plan-workload-table tbody .study-plan-workload-row:focus-within > td {
    background: var(--color-table-row-hover);
    color: var(--color-text);
}

.study-plan-workload-table tbody .study-plan-workload-row:focus-within .study-plan-period-toggle,
.study-plan-period-toggle[aria-expanded="true"] {
    border-color: var(--color-compact-tag-border);
    background: var(--color-compact-tag-surface);
    color: var(--color-compact-tag-text);
}

.study-plan-subject-cell {
    display: grid;
    gap: 0;
    min-width: 0;
}

.study-plan-subject-cell .study-plan-workload-chips {
    margin-top: 10px;
    margin-bottom: 5px;
}

.study-plan-workload-summary {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 5px 8px;
}

.study-plan-workload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.study-plan-workload-head > span {
    flex: 0 0 auto;
}

.study-plan-workload-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    margin-left: auto;
}

.study-plan-workload-search.schedules-search {
    width: min(360px, 42vw);
    min-width: 220px;
    max-width: 360px;
    flex: 0 1 360px;
    font-weight: 400;
    text-align: left;
}

.study-plan-period-toggle-all,
.study-plan-period-toggle {
    width: max-content;
    min-width: max-content;
    max-width: none;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 0 8px;
    white-space: nowrap;
}

.study-plan-period-toggle {
    height: 22px;
    min-height: 22px;
    max-height: 22px;
    margin-bottom: 5px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.25;
}

.study-plan-workload-head .study-plan-period-toggle-all {
    height: 34px;
    min-height: 34px;
    max-height: 34px;
}

.study-plan-period-toggle > span {
    flex: 0 0 auto;
}

.study-plan-period-toggle svg {
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    height: 15px;
    min-height: 15px;
    max-height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.16s ease-out;
}

.study-plan-period-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.study-plan-period-row > td {
    padding: 0 8px 8px;
    border-top: 0;
    background: var(--color-surface-subtle);
}

.study-plan-period-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--color-table-border);
    border-radius: 8px;
    background: var(--color-table-surface);
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.study-plan-period-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--color-text);
    font-size: 10px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.study-plan-workload-table .study-plan-period-table th,
.study-plan-workload-table .study-plan-period-table td {
    width: auto;
    min-width: 0;
    padding: 3px 4px;
    border-right: 1px solid var(--color-table-border);
    border-bottom: 1px solid var(--color-table-border);
    text-align: center;
    vertical-align: middle;
    font-size: 10px;
    font-weight: 400;
    white-space: nowrap;
}

.study-plan-workload-table .study-plan-period-table th:first-child,
.study-plan-workload-table .study-plan-period-table td:first-child {
    width: 42px;
    min-width: 0;
}

.study-plan-workload-table .study-plan-period-table th:nth-child(2),
.study-plan-workload-table .study-plan-period-table td:nth-child(2) {
    width: 62px;
    min-width: 0;
}

.study-plan-period-table tr > :last-child {
    border-right: 0;
}

.study-plan-period-table tfoot tr:last-child > * {
    border-bottom: 0;
}

.study-plan-period-table thead th {
    background: var(--color-surface-subtle);
    color: var(--color-table-header-text);
    font-weight: 500;
    white-space: normal;
}

.study-plan-period-table tfoot th,
.study-plan-period-table tfoot td {
    background: var(--color-surface-soft);
    color: var(--color-text-strong);
    font-weight: 600;
}

.study-plan-period-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.study-plan-period-heading .lesson-dot {
    flex: 0 0 auto;
    margin-right: 0;
}

.study-plan-period-heading-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.study-plan-period-empty {
    color: var(--color-text-muted);
    font-weight: 400;
}

.study-plan-period-control {
    color: var(--color-text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    .study-plan-period-toggle svg {
        transition: none;
    }
}

.study-plan-workload-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.study-plan-workload-chip {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border: 1px solid var(--color-compact-tag-border);
    border-radius: 6px;
    background: var(--color-compact-tag-surface);
    color: var(--color-compact-tag-text);
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
}

.study-plan-workload-chip .lesson-dot {
    margin-right: 0;
}

.study-plan-subject-department {
    margin-top: -3px;
}

.study-plan-department-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.study-plan-department-prefix {
    color: var(--color-text-muted);
}

.study-plan-department-ok {
    width: 16px;
    height: 16px;
    display: inline-flex;
    flex: 0 0 16px;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    border-radius: 999px;
    background: var(--status-positive-surface);
    color: var(--status-positive-text);
}

.study-plan-department-ok svg {
    width: 11px;
    height: 11px;
}

.study-plan-department-ok path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.study-plan-department-similar {
    display: grid;
    gap: 4px;
    align-items: start;
    width: fit-content;
    max-width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    border: var(--study-plan-department-similar-border);
    border-radius: 8px;
    background: var(--grid-non-study-row-surface);
    color: var(--study-plan-department-similar-text);
    font-size: 12px;
    line-height: 1.35;
}

.study-plan-department-similar-label {
    color: var(--study-plan-department-similar-label-text);
}

.study-plan-department-similar strong {
    color: var(--schedule-create-text);
    font-weight: 600;
}

.study-plan-department-confirm-btn {
    width: fit-content;
    margin-top: 2px;
    border-color: var(--study-plan-department-confirm-btn-border);
    background: var(--color-surface);
    color: var(--study-plan-department-confirm-btn-text);
}

.study-plan-json-list {
    display: grid;
    gap: 8px;
}

.study-plan-json-list article {
    padding: 10px 12px;
    border: var(--study-plan-json-list-border);
    border-radius: 8px;
    background: var(--color-surface-tinted);
}

.study-plan-json-list article strong {
    display: block;
    margin-bottom: 4px;
    color: var(--schedule-create-text);
    font-size: 13px;
}

.study-plan-json-list article p {
    margin: 0;
    color: var(--color-tab-text);
    font-size: 12px;
    line-height: 1.45;
}

.study-plan-json-view {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--color-compact-tag-text);
    font-size: 11px;
    line-height: 1.5;
}

.directory-source-btn.btn {
    height: 28px;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 400;
}

.department-plx-alias-panel {
    display: grid;
    gap: 14px;
    overflow: visible;
}

.department-plx-alias-panel .directory-step-head {
    margin-bottom: 0;
}

.department-plx-alias-head-actions {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
}

.ai-action-btn.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 13px;
    border: 2px solid transparent;
    border-radius: 9px;
    background: var(--ai-action-background);
    background-size: 100% 100%, 230% 230%;
    background-position: 0 0, 0% 50%;
    color: var(--ai-action-text);
    box-shadow: none;
    animation: ai-accent-border-flow 8s ease-in-out infinite;
}

.ai-action-btn.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--ai-accent-gradient);
    opacity: 0;
    transition: opacity .24s ease;
}

.ai-action-btn.btn > span,
.ai-action-btn.btn svg {
    position: relative;
    z-index: 2;
}

.ai-action-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease .16s;
}

.ai-action-btn.is-loading .ai-action-canvas {
    opacity: 1;
    transition-delay: 0s;
}

.ai-action-btn.btn > span {
    background: var(--ai-accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.ai-action-btn.btn svg {
    width: 16px;
    height: 16px;
    color: var(--ai-action-text);
    fill: currentColor;
    stroke: none;
}

.ai-action-btn.btn svg.is-ai-icon {
    width: 16px;
    height: 16px;
}

.ai-action-btn.btn svg path {
    fill: currentColor;
    stroke: none;
}

.ai-action-btn.btn svg.is-ai-icon path {
    stroke: currentColor;
    stroke-width: 0.65;
    stroke-linejoin: round;
}

.ai-action-btn.btn:hover:not(:disabled) {
    box-shadow: none;
    filter: saturate(1.03);
}

.ai-action-btn.btn:hover:not(:disabled)::before {
    opacity: var(--ai-action-hover-overlay-opacity);
}

.ai-action-btn.btn:hover:not(:disabled) > span {
    background: none;
    color: var(--ai-action-on-accent-text);
    -webkit-text-fill-color: var(--ai-action-on-accent-text);
}

.ai-action-btn.btn:hover:not(:disabled) svg,
.ai-action-btn.btn:hover:not(:disabled) svg path {
    color: var(--ai-action-on-accent-text);
    fill: var(--ai-action-on-accent-text);
}

.ai-action-btn.is-loading.btn::before {
    opacity: var(--ai-action-loading-overlay-opacity);
    transition-delay: .22s;
}

.ai-action-btn.is-loading.btn {
    color: var(--ai-action-on-accent-text);
    animation-play-state: paused;
}

.ai-action-btn.is-loading.btn:disabled {
    cursor: wait;
    opacity: 1;
    filter: none;
}

.ai-action-btn.is-loading.btn > span {
    background: none;
    color: var(--ai-action-on-accent-text);
    -webkit-text-fill-color: var(--ai-action-on-accent-text);
    transition: color .18s ease .2s, -webkit-text-fill-color .18s ease .2s;
}

.ai-action-btn.is-loading.btn svg {
    color: var(--ai-action-on-accent-text);
    fill: var(--ai-action-on-accent-text);
}

.ai-action-btn.is-loading.btn svg path {
    fill: var(--ai-action-on-accent-text);
}

@keyframes ai-accent-border-flow {
    from {
        background-position: 0 0, 0% 50%;
    }
    50% {
        background-position: 0 0, 100% 50%;
    }
    to {
        background-position: 0 0, 0% 50%;
    }
}

.grid-xlsx-ai-btn.ai-action-btn.btn {
    animation: none;
}

.grid-xlsx-ai-btn.ai-action-btn.is-loading.btn {
    animation: ai-accent-border-flow 8s ease-in-out infinite;
}

.department-plx-alias-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.department-plx-alias-confirmed-count {
    background: var(--department-plx-alias-confirmed-count-surface);
    color: var(--department-plx-alias-confirmed-count-text);
}

.department-plx-alias-panel select {
    width: 100%;
}

.department-plx-alias-grid {
    position: relative;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--color-surface);
}

.department-plx-alias-grid-head,
.department-plx-alias-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}

.department-plx-alias-grid-head {
    min-height: 48px;
    background: var(--color-surface-tinted);
    color: var(--color-tab-text);
    font-size: 13px;
    font-weight: 600;
}

.department-plx-alias-grid-head > div,
.department-plx-source-cell,
.department-plx-target-cell {
    min-width: 0;
    padding: 14px 16px;
}

.department-plx-alias-row {
    border-top: 1px solid var(--border);
    z-index: 1;
}

.department-plx-alias-row:has(.custom-select.is-open) {
    z-index: 200;
}

.department-plx-alias-row.is-unmatched {
    background: var(--color-surface);
}

.department-plx-alias-row.is-similar {
    background: var(--calendar-warning-surface);
}

.department-plx-alias-row.is-confirmed {
    background: var(--department-plx-alias-row-is-confirmed-surface);
    opacity: .68;
}

.department-plx-alias-row.is-confirmed:focus-within,
.department-plx-alias-row.is-confirmed:hover {
    opacity: 1;
}

.department-plx-alias-row.is-ai-suggested {
    background: inherit;
}

.department-plx-target-cell {
    position: relative;
    z-index: 1;
}

.department-plx-target-cell:has(.custom-select.is-open) {
    z-index: 220;
}

.department-plx-target-cell.is-ai-suggested::before {
    content: "";
    position: absolute;
    inset: 12px 14px;
    z-index: 0;
    border-radius: 14px;
    background: transparent;
    pointer-events: none;
}

.department-plx-target-cell .custom-select.is-ai-suggested {
    position: relative;
    z-index: 2;
}

.department-plx-target-cell .custom-select.is-open {
    z-index: 300;
}

.department-plx-target-cell .custom-select-results {
    z-index: 5000;
    width: 100%;
    max-width: min(760px, calc(100vw - 80px));
}

.department-plx-target-cell .custom-select.is-ai-suggested .custom-select-control,
.department-plx-target-cell .custom-select-control.is-ai-suggested {
    border: 2px solid transparent;
    background:
        var(--ai-result-field-background);
    background-size: 100% 100%, 230% 230%;
    background-position: 0 0, 0% 50%;
    color: var(--ai-result-text);
    font-weight: 400;
    box-shadow: none;
    animation: ai-accent-border-flow 3.6s ease-in-out infinite;
}

.department-plx-target-cell .custom-select.is-ai-suggested .custom-select-control:focus,
.department-plx-target-cell .custom-select.is-ai-suggested.is-open .custom-select-control,
.department-plx-target-cell .custom-select-control.is-ai-suggested:focus {
    border-color: transparent;
    box-shadow: var(--ai-result-focus-ring);
}

.department-plx-target-cell .custom-select.is-ai-suggested .custom-select-value,
.department-plx-target-cell .custom-select-control.is-ai-suggested .custom-select-value {
    color: var(--ai-result-text);
    font-weight: 400;
}

.department-plx-target-cell .custom-select.is-ai-suggested .custom-select-control svg,
.department-plx-target-cell .custom-select-control.is-ai-suggested svg {
    color: var(--ai-result-text);
    stroke: currentColor;
}

.department-plx-target-cell .custom-select.is-ai-suggested .directory-combobox-result.is-selected {
    background: var(--department-plx-target-cell-custom-select-is-ai-suggested-surface);
    color: var(--ai-result-text);
    font-weight: 400;
}

.department-plx-alias-panel select.is-ai-suggested {
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
    background: var(--ai-result-select-background);
    background-clip: padding-box;
    color: var(--ai-result-text);
    font-weight: 400;
    box-shadow: none;
}

.department-plx-alias-panel select.is-ai-suggested option {
    color: var(--color-editor-add-hover-text);
    font-weight: 400;
    background: var(--color-surface);
}

.department-plx-source-cell .preview-name-main {
    max-width: 100%;
    overflow-wrap: anywhere;
    margin-top: 6px;
}

.department-plx-target-cell select {
    max-width: 100%;
}

@media (max-width: 900px) {
    .department-plx-alias-grid-head {
        display: none;
    }

    .department-plx-alias-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .department-plx-alias-head-actions {
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .department-plx-target-cell {
        padding-top: 0;
    }
}

.schedules-drawer-scroll.slot-editor-scroll-area {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 0;
}

.schedules-drawer-section {
    display: grid;
    gap: 8px;
}

.schedules-drawer-section h3 {
    margin: 0;
    color: var(--schedule-create-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.schedules-drawer-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--directory-editor-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: none;
    transition: border-color 0.14s ease, background 0.14s ease;
}

.schedules-drawer-card-published {
    background: var(--schedules-drawer-card-published-surface);
    padding-top: 12px;
}

.schedules-drawer-card:hover,
.schedules-drawer-card:focus-visible {
    border-color: var(--schedules-drawer-card-hover-border);
    background: var(--grid-row-hover-surface);
}

.schedules-drawer-card-published:hover,
.schedules-drawer-card-published:focus-visible {
    background: var(--schedules-drawer-card-published-hover-surface);
}

.schedules-drawer-card:focus-visible {
    outline: var(--features-schedules-drawer-card-focus-visible-outline);
    outline-offset: 2px;
}

.schedules-drawer-card-icon {
    display: grid;
    justify-items: center;
    gap: 6px;
}

.schedules-problem-counts {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.schedules-drawer-card-icon .schedules-problem-counts {
    max-width: 34px;
    flex-wrap: wrap;
    gap: 3px;
}

.schedules-drawer-card-info {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.schedules-drawer-card-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.schedules-drawer-card-title strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--schedule-create-text);
    font-size: 13px;
    font-weight: 600;
}

.schedules-drawer-card-title .status-chip {
    flex: 0 0 auto;
    font-weight: 400;
}

.schedules-publication-status-trigger {
    appearance: none;
    box-sizing: border-box;
    height: 21px;
    cursor: pointer;
    font-family: inherit;
}

.status-chip.schedules-publication-range {
    white-space: pre-line;
}

.schedules-publication-status-trigger:hover,
.schedules-publication-status-trigger:focus-visible {
    border-color: var(--schedules-publication-status-trigger-hover-border);
    background: var(--schedules-publication-status-trigger-hover-surface);
    color: var(--schedules-publication-status-trigger-hover-text);
}

.schedules-publication-status-trigger:focus-visible {
    outline: 2px solid var(--color-action-primary-border);
    outline-offset: 2px;
}

.schedules-drawer-card-info > span,
.schedules-drawer-card-info em {
    display: block;
    color: var(--schedule-create-label-text);
    font-size: 11px;
    font-style: normal;
    line-height: 1.35;
}

.schedules-drawer-card-stats {
    display: grid;
    gap: 4px;
    max-width: 250px;
}

.schedules-drawer-card-info em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-drawer-card .schedules-version-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
}

.schedules-drawer-card .schedules-version-icon svg {
    width: 18px;
    height: 18px;
}

.schedules-conflict-count.grid-check-count {
    width: 34px;
    min-width: 34px;
    min-height: 16px;
    margin-left: 0;
    padding: 2px 4px;
    border-radius: 4px;
    background: var(--problem-color);
    font-size: 11px;
    font-weight: 400;
}

.schedules-table .schedules-conflict-count.grid-check-count {
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    border-radius: 4px;
    background: var(--problem-color);
    font-size: 10px;
    font-weight: 400;
}

.schedules-conflict-count.grid-check-count.is-warning {
    border: 1px solid var(--problem-warning-border);
    background: var(--problem-warning-surface);
    color: var(--problem-warning-color);
}

.schedules-metrics-state {
    display: inline-flex;
    align-items: center;
    max-width: 120px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.schedules-drawer-card-tools {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: flex-end;
    align-self: start;
}

.schedules-drawer-card-action.btn {
    height: 30px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.schedules-drawer-card-tools .table-action-btn {
    width: 32px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    border-radius: 9px;
}

.schedules-drawer-card-tools .table-action-btn svg circle {
    fill: currentColor;
    stroke: none;
}

.schedules-drawer-empty {
    min-height: 42px;
    border: 1px dashed var(--color-control-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.schedules-drawer-archive .schedules-archive-toggle {
    width: 100%;
    justify-content: space-between;
    margin: 0;
    padding: 2px 0 0;
    min-height: 32px;
    color: var(--schedules-drawer-archive-schedules-archive-toggle-text);
}

.schedules-version-icon-published,
.schedules-version-icon-draft,
.schedules-version-icon-archived {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.schedules-version-icon-published {
    background: var(--schedules-version-icon-published-surface);
    color: var(--schedules-version-icon-published-text);
}

.schedules-version-icon-draft {
    background: var(--schedules-version-icon-draft-surface);
    color: var(--schedules-version-icon-draft-text);
}

.schedules-version-icon-archived {
    background: var(--color-filter-active-surface);
    color: var(--study-plan-mapping-text);
}

.schedules-version-icon-published svg,
.schedules-version-icon-draft svg,
.schedules-version-icon-archived svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedules-detail-panel .slot-editor-actions {
    margin: 0 0 0 calc(-1 * var(--drawer-padding-left));
    padding: 8px 18px 10px;
    border-top: 1px solid var(--drawer-divider-color);
}

.slot-editor .groups-import-panel.schedules-detail-panel.slot-editor-panel {
    --drawer-width: 1600px;
    --drawer-screen-gap: 92px;
    box-sizing: border-box;
    overflow: hidden;
}

.slot-editor .groups-import-panel.schedules-detail-panel.constraints-fill-panel {
    --drawer-width: 720px;
    --drawer-screen-gap: 24px;
}

.constraints-fill-drawer {
    z-index: 90;
}

.groups-import-panel .slot-editor-head h2 {
    font-size: 18px;
}

.groups-import-panel .slot-editor-meta {
    font-size: 12px;
}

.schedules-detail-panel .study-plan-detail-actions {
    justify-content: space-between;
}

.schedules-detail-panel .study-plan-upload-actions {
    justify-content: space-between;
}

.schedules-detail-panel #schedules-drawer-primary {
    display: none;
}

.schedules-detail-panel.is-create #schedules-drawer-primary,
.schedules-detail-drawer.is-create #schedules-drawer-primary {
    display: inline-flex;
}

.schedules-create-form {
    display: grid;
    gap: 12px;
}

.schedules-create-section {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--directory-editor-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.schedules-create-section > legend {
    padding: 0 5px;
    color: var(--schedules-create-section-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.schedules-create-section-grid,
.schedules-create-basis-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.schedules-create-field,
.schedules-create-groups {
    display: grid;
    gap: 6px;
    margin: 0;
    min-width: 0;
}

.schedules-create-field-wide {
    grid-column: 1 / -1;
}

.schedules-create-field span,
.schedules-create-groups legend {
    color: var(--schedule-create-label-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

.schedules-create-field input,
.schedules-create-field select {
    width: 100%;
    min-width: 0;
    height: 34px;
    border: 1px solid var(--directory-editor-border);
    border-radius: 9px;
    background: var(--color-surface);
    color: var(--schedule-create-text);
    font: inherit;
    font-size: 13px;
    padding: 0 10px;
}

.schedules-create-field input:focus {
    border-color: var(--schedules-create-field-focus-border);
    outline: none;
    box-shadow: var(--features-schedules-create-field-input-focus-shadow);
}

.schedules-create-field .custom-select-control {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 13px;
}

.schedules-create-source-field .directory-combobox-search {
    box-sizing: border-box;
    height: 34px;
    border-radius: 9px;
    padding: 0 38px 0 10px;
    background-position: right 12px center;
    font-size: 13px;
}

.schedules-create-source-field .directory-combobox-search:disabled {
    border-color: var(--schedules-create-source-field-directory-combobox-search-disabled-border);
    background-color: var(--color-surface-hover);
    color: var(--schedules-create-source-field-directory-combobox-search-disabled-text);
    cursor: not-allowed;
}

.schedules-create-source-field .directory-combobox-search:disabled::placeholder {
    color: var(--schedules-create-source-field-directory-combobox-search-disabled-text);
}

.schedules-create-source-result-status {
    display: block;
    margin-top: 4px;
    color: var(--schedule-create-label-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
}

.schedules-create-settings-note {
    margin: 0;
    color: var(--schedules-create-settings-note-text);
    font-size: 12px;
    line-height: 1.45;
}

.schedules-create-groups {
    border: 1px solid var(--directory-editor-border);
    border-radius: 10px;
    padding: 10px;
}

.schedules-create-groups legend {
    padding: 0 4px;
}

#schedules-create-groups-list {
    display: grid;
    gap: 4px;
    max-height: 220px;
    overflow: auto;
    padding-right: 2px;
}

.schedules-create-group-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-height: 45px;
    color: var(--schedule-create-text);
    font-size: 12px;
}

.schedules-create-group-row input {
    width: 14px;
    height: 14px;
    margin-top: 2px;
}

.schedules-create-group-content {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.schedules-create-group-primary {
    overflow: hidden;
    color: var(--schedule-create-text);
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedules-create-group-profiles {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--schedule-create-meta-text);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .schedules-create-section-grid,
    .schedules-create-basis-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1180px) {
    .schedules-period-row,
    .schedules-status-row {
        flex-wrap: wrap;
    }

    .schedules-search,
    .schedules-campaign-summary {
        flex-basis: 100%;
    }

    #schedules-workspace .schedules-period-row,
    #schedules-workspace .schedules-status-row {
        flex-wrap: wrap;
    }

    #schedules-workspace .schedules-filters-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 1px;
    }

    #schedules-workspace .schedules-filter-faculty {
        min-width: 180px;
    }

    .schedules-table-wrap {
        max-height: none;
    }
}

@media (max-width: 1280px) {
    #schedules-workspace .schedules-page-head {
        align-items: flex-start;
        gap: 14px;
    }

    #schedules-workspace .schedules-page-head > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    #schedules-workspace .schedules-head-actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    #schedules-workspace .schedules-head-btn {
        height: 36px;
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    #schedules-workspace .schedules-create-split {
        flex: 0 0 auto;
    }

    #schedules-workspace .schedules-create-menu-btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    #schedules-workspace .schedules-table-panel,
    #schedules-workspace .schedules-table-wrap {
        max-width: 100%;
    }

    #schedules-workspace .schedules-dispatcher-table {
        min-width: 100%;
        width: 100%;
        table-layout: fixed;
    }

    #schedules-workspace .schedules-dispatcher-table th,
    #schedules-workspace .schedules-dispatcher-table td {
        padding-left: 12px;
        padding-right: 12px;
    }

    #schedules-workspace .schedules-dispatcher-table th:nth-child(1),
    #schedules-workspace .schedules-dispatcher-table td:nth-child(1) {
        min-width: 0;
        width: auto;
    }

    #schedules-workspace .schedules-dispatcher-table th:nth-child(2),
    #schedules-workspace .schedules-dispatcher-table td:nth-child(2) {
        width: 92px;
    }

    #schedules-workspace .schedules-dispatcher-table th:nth-child(3),
    #schedules-workspace .schedules-dispatcher-table td:nth-child(3) {
        width: 84px;
    }

    #schedules-workspace .schedules-dispatcher-table th:nth-child(4),
    #schedules-workspace .schedules-dispatcher-table td:nth-child(4) {
        width: 180px;
    }

    #schedules-workspace .schedules-dispatcher-table th:nth-child(5),
    #schedules-workspace .schedules-dispatcher-table td:nth-child(5) {
        width: 192px;
    }

    #schedules-workspace .schedules-dispatcher-table .schedules-sort-btn {
        white-space: normal;
        line-height: 1.15;
    }

    #schedules-workspace .schedules-dispatcher-table th:nth-child(5) .schedules-sort-btn {
        white-space: nowrap;
    }

    #schedules-workspace .schedules-row-title strong,
    #schedules-workspace .schedules-row-meta span,
    #schedules-workspace .schedules-updated-cell strong,
    #schedules-workspace .schedules-updated-cell span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #schedules-workspace .schedules-ready-cell {
        max-width: none;
        min-width: 0;
        gap: 5px 6px;
    }

    #schedules-workspace .schedules-ready-cell span:first-child,
    #schedules-workspace .schedules-ready-cell strong {
        white-space: nowrap;
    }
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table th:nth-child(3),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table td:nth-child(3) {
    width: 56px;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table th:nth-child(4),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table td:nth-child(4) {
    width: 180px;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table th:nth-child(5),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table td:nth-child(5) {
    width: 132px;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-conflicts-full {
    display: none;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-conflicts-short {
    display: inline;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table th:nth-child(1),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table td:nth-child(1) {
    width: 38%;
    min-width: 0;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table th:nth-child(2),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace .schedules-dispatcher-table td:nth-child(2) {
    width: 104px;
}

.bell-page-head {
    margin-bottom: 16px;
}

.bell-schedule-page {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.bell-schedule-panel {
    min-width: 0;
    max-width: 100%;
    padding: 16px 16px 14px;
}

.bell-template-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bell-template-select-field {
    display: grid;
    gap: 5px;
    min-width: min(360px, 100%);
    flex: 1 1 320px;
}

.bell-template-select-field span {
    color: var(--schedule-create-label-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

.bell-template-select-field select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--directory-editor-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--schedule-create-text);
    font: inherit;
    font-size: 13px;
    padding: 0 10px;
}

.bell-template-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bell-template-actions .btn {
    min-height: 40px;
}

.bell-template-usage-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 10px;
    background: var(--color-surface-tinted);
}

.bell-template-usage-copy {
    display: grid;
    gap: 3px;
    min-width: 240px;
    flex: 1 1 320px;
}

.bell-template-usage-copy strong {
    color: var(--color-text-strong);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.bell-template-usage-copy span {
    color: var(--color-tab-text);
    font-size: 12px;
    line-height: 1.35;
}

.bell-template-usage-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bell-template-usage-actions .btn {
    min-height: 36px;
}

.bell-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bell-add-slot-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: -1px;
}

.bell-schedule-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    border: var(--bell-schedule-table-wrap-border);
    border-radius: 12px;
}

.bell-schedule-table {
    --bell-column-number-width: 5%;
    --bell-column-base-time-width: 31%;
    --bell-column-day-width: 8%;
    --bell-column-actions-width: 8%;
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.bell-schedule-table th,
.bell-schedule-table td {
    text-align: center;
    padding: 10px 8px;
    border-right: var(--bell-schedule-table-border);
}

.bell-schedule-table th:last-child,
.bell-schedule-table td:last-child {
    border-right: 0;
}

.bell-schedule-table th {
    background: transparent;
    font-size: 14px;
    font-weight: 600;
}

.bell-schedule-table td {
    background: var(--color-surface);
}

.bell-col-no {
    width: var(--bell-column-number-width);
    font-weight: 600;
}

.bell-col-base-time {
    width: var(--bell-column-base-time-width);
    text-align: left;
}

.bell-col-day {
    width: var(--bell-column-day-width);
}

.bell-col-actions {
    width: var(--bell-column-actions-width);
    text-align: right;
}

.bell-base-time-editor {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bell-base-time-inputs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.bell-base-time-input {
    width: 86px;
    height: 36px;
    border: 1px solid var(--color-control-border);
    border-radius: 8px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    line-height: 1;
    padding: 0 8px;
}

.bell-base-time-input:hover {
    border-color: var(--color-control-focus-border-compact);
}

.bell-base-time-input:focus {
    border-color: var(--color-control-focus-border);
    box-shadow: 0 0 0 2px var(--color-control-focus-ring);
    outline: none;
}

.bell-base-time-separator {
    color: var(--color-tab-text);
    font-size: 14px;
    line-height: 1;
}

.bell-base-time-suggestions {
    display: flex;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.bell-time-suggestion {
    min-height: 24px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-tab-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    padding: 2px 4px;
    text-align: left;
    text-decoration: none;
}

.bell-time-suggestion:hover,
.bell-time-suggestion:focus-visible {
    background: var(--status-neutral-surface);
    color: var(--color-toast-close-hover-text);
    outline: none;
}

.bell-time-suggestion-secondary {
    color: var(--schedule-create-label-text);
}

.bell-time-suggestion-empty {
    min-height: 24px;
}

.bell-day-header-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.bell-day-header-label {
    display: inline-block;
    font-weight: 400;
    color: var(--bell-day-header-label-text);
}

.bell-day-state {
    min-width: 42px;
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1;
    padding: 0 10px;
    background: var(--bell-day-state-surface);
    color: var(--bell-day-state-text);
}

.bell-day-state:hover {
    border-color: var(--bell-day-state-hover-border);
}

.bell-day-state-enabled {
    background: var(--bell-day-state-enabled-surface);
    color: var(--bell-day-state-enabled-text);
    font-weight: 600;
}

.bell-day-state-disabled {
    background: var(--bell-day-state-disabled-surface);
    color: var(--bell-day-state-disabled-text);
}

.bell-day-state-override {
    background: var(--bell-day-state-override-surface);
    color: var(--bell-day-state-override-text);
    border-color: var(--bell-day-state-override-border);
    font-size: 12px;
    line-height: 1.1;
    min-width: 0;
    max-width: 100%;
    padding: 4px 5px;
    white-space: normal;
    text-wrap: balance;
}

.bell-day-state-override-value {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.bell-day-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}

.bell-row-menu-wrap {
    position: relative;
    display: inline-flex;
}

.bell-row-menu-btn {
    width: 36px;
    height: 36px;
    border: var(--bell-row-menu-btn-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--bell-row-menu-btn-text);
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

.bell-row-menu-btn:hover {
    background: var(--bell-row-menu-btn-hover-surface);
}

.bell-row-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 210px;
    background: var(--color-surface);
    border: var(--bell-row-menu-border);
    border-radius: 10px;
    box-shadow: var(--features-bell-row-menu-shadow);
    padding: 6px;
    z-index: 25;
    display: none;
}

.bell-row-menu.is-open {
    display: grid;
    gap: 4px;
}

.bell-row-menu button {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--bell-row-menu-text);
    cursor: pointer;
}

.bell-row-menu button:hover {
    background: var(--bell-row-menu-hover-surface);
}

.bell-row-menu button.is-danger {
    color: var(--bell-row-menu-is-danger-text);
}

.bell-row-delete-btn {
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
}

.bell-schedule-legend {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    border-color: transparent;
    background: transparent;
    color: var(--color-text-secondary);
}

.bell-schedule-legend-top {
    margin-top: 0;
    margin-bottom: 12px;
    justify-content: flex-end;
}

.bell-schedule-bottom-tools {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bell-inline-message {
    margin-top: 0;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 320px;
    color: var(--color-message-text);
}

.bell-inline-message.is-empty {
    visibility: hidden;
}

.bell-inline-message.ok {
    color: var(--bell-inline-message-ok-text);
}

.bell-inline-message.error {
    color: var(--bell-inline-message-error-text);
}

.bell-inline-message.info {
    color: var(--bell-inline-message-info-text);
}

.bell-inline-message-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.bell-inline-message-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bell-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bell-legend-marker {
    min-width: 30px;
    min-height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.slot-editor-panel > .slot-editor-scroll-area::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.slot-editor-panel > .slot-editor-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.slot-editor-panel > .slot-editor-scroll-area::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    background-clip: padding-box;
}

.slot-editor-panel > .slot-editor-scroll-area::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

.bell-override-editor {
    position: absolute;
    z-index: 50;
    min-width: 280px;
    border: var(--bell-override-editor-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: var(--features-bell-override-editor-shadow);
    padding: 10px;
}

.bell-override-editor-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--bell-override-editor-title-text);
    margin-bottom: 8px;
}

.bell-override-editor-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.bell-override-editor-input {
    height: 34px;
    border: var(--bell-override-editor-input-border);
    border-radius: 8px;
    padding: 0 8px;
}

.bell-override-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 880px) {
    .bell-schedule-table {
        min-width: 940px;
    }

    .bell-col-base-time {
        width: 286px;
    }

    .bell-base-time-editor {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 980px) {
    .slot-editor-panel {
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    body.has-grid-workspace .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-collapsed-width);
        height: auto;
        padding-left: 7px;
        padding-right: 7px;
        overflow: hidden;
    }

    body.has-grid-workspace .app-sidebar:hover {
        width: var(--sidebar-width);
        padding-left: 14px;
        padding-right: 14px;
        box-shadow: var(--features-app-shell-data-active-nav-groups-app-sidebar-hover-shadow);
    }

    body.has-grid-workspace .brand {
        padding: 0;
        justify-content: center;
    }

    body.has-grid-workspace .app-sidebar:hover .brand {
        padding: 0 8px;
        justify-content: flex-start;
    }

    body.has-grid-workspace .brand-text,
    body.has-grid-workspace .nav-text {
        opacity: 0;
        max-width: 0;
    }

    body.has-grid-workspace .app-sidebar:hover .brand-text,
    body.has-grid-workspace .app-sidebar:hover .nav-text {
        opacity: 1;
        max-width: 190px;
    }

    body.has-grid-workspace .nav-link {
        justify-content: center;
        gap: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    body.has-grid-workspace .nav-start-close {
        display: none;
    }

    body.has-grid-workspace .app-sidebar:hover .nav-link {
        justify-content: flex-start;
        gap: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    body.has-grid-workspace .app-sidebar:hover .nav-start-close {
        display: inline-flex;
    }

    body.has-grid-workspace .app-main {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        margin-left: var(--sidebar-collapsed-width);
        height: 100vh;
        min-height: 0;
        overflow: hidden;
        padding: 12px 0 0 12px;
    }

    body.has-grid-workspace .grid-workspace {
        --grid-main-safe-overhang: 12px;
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        margin-top: -12px;
    }

}

@media (max-width: 980px) {
    .app-shell[data-active-nav="schedules"] .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-collapsed-width);
        height: auto;
        padding-left: 7px;
        padding-right: 7px;
        overflow: hidden;
    }

    .app-shell[data-active-nav="schedules"] .app-sidebar:hover {
        width: var(--sidebar-width);
        padding-left: 14px;
        padding-right: 14px;
        box-shadow: var(--features-app-shell-data-active-nav-schedules-app-sidebar-hover-shadow);
    }

    .app-shell[data-active-nav="schedules"] .brand {
        padding: 0;
        justify-content: center;
    }

    .app-shell[data-active-nav="schedules"] .app-sidebar:hover .brand {
        padding: 0 8px;
        justify-content: flex-start;
    }

    .app-shell[data-active-nav="schedules"] .brand-text,
    .app-shell[data-active-nav="schedules"] .nav-text {
        opacity: 0;
        max-width: 0;
    }

    .app-shell[data-active-nav="schedules"] .app-sidebar:hover .brand-text,
    .app-shell[data-active-nav="schedules"] .app-sidebar:hover .nav-text {
        opacity: 1;
        max-width: 190px;
    }

    .app-shell[data-active-nav="schedules"] .nav-link {
        justify-content: center;
        gap: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-shell[data-active-nav="schedules"] .nav-start-close {
        display: none;
    }

    .app-shell[data-active-nav="schedules"] .app-sidebar:hover .nav-link {
        justify-content: flex-start;
        gap: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-shell[data-active-nav="schedules"] .app-sidebar:hover .nav-start-close {
        display: inline-flex;
    }

    .app-shell[data-active-nav="schedules"] .app-main {
        margin-left: var(--sidebar-collapsed-width);
        padding: 12px 12px 48px;
    }

    body.has-grid-workspace .app-shell[data-active-nav="schedules"] .app-main {
        height: 100vh;
        overflow: hidden;
        padding: 12px 0 0 12px;
    }
}

@media (max-width: 980px) {
    .app-shell[data-active-nav="groups"] .nav-start-cta .nav-link.nav-link-start,
    body.has-grid-workspace .nav-start-cta .nav-link.nav-link-start,
    .app-shell[data-active-nav="schedules"] .nav-start-cta .nav-link.nav-link-start {
        padding-right: 8px;
    }

    .app-shell[data-active-nav="groups"] .app-sidebar:hover .nav-start-cta .nav-link.nav-link-start,
    body.has-grid-workspace .app-sidebar:hover .nav-start-cta .nav-link.nav-link-start,
    .app-shell[data-active-nav="schedules"] .app-sidebar:hover .nav-start-cta .nav-link.nav-link-start {
        padding-right: 40px;
    }
}

.app-shell[data-sidebar-state="collapsed"] .nav-start-cta .nav-link.nav-link-start,
.app-shell.is-sidebar-hover-locked[data-sidebar-state="collapsed"] .app-sidebar:hover .nav-start-cta .nav-link.nav-link-start {
    padding-right: 0;
}

.app-shell[data-sidebar-state="collapsed"]:not(.is-sidebar-hover-locked) .app-sidebar:hover .nav-start-cta .nav-link.nav-link-start {
    padding-right: 40px;
}

@media (max-width: 1024px) {
    .app-shell[data-sidebar-forced="compact"] {
        --current-sidebar-width: var(--sidebar-collapsed-width);
    }

    .app-shell[data-sidebar-forced="compact"] .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-collapsed-width);
        height: auto;
        padding-left: 7px;
        padding-right: 7px;
    }

    .app-shell[data-sidebar-forced="compact"][data-sidebar-state="collapsed"] .app-sidebar:not(:hover) {
        overflow: visible;
    }

    .app-shell[data-sidebar-forced="compact"][data-sidebar-state="collapsed"] .app-sidebar:not(:hover) .nav {
        margin-right: -10px;
    }

    .app-shell[data-sidebar-forced="compact"][data-sidebar-state="collapsed"] .app-sidebar:not(:hover) .nav-start-cta {
        width: 38px;
        max-width: 38px;
        margin-left: 0;
        margin-right: 0;
        overflow: visible;
    }

    .app-shell[data-sidebar-forced="compact"] .app-main {
        margin-left: var(--sidebar-collapsed-width);
    }

    .app-shell[data-sidebar-forced="compact"] .impersonation-banner {
        margin: -18px 0 14px;
        overflow: hidden;
        padding-left: 12px;
        padding-right: 12px;
        text-overflow: ellipsis;
    }

    .app-shell[data-sidebar-forced="compact"] .impersonation-banner > div,
    .app-shell[data-sidebar-forced="compact"] .impersonation-banner span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-shell[data-sidebar-forced="compact"] .nav-toggle {
        display: none;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="groups"] .groups-page-head,
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .groups-page-head {
        align-items: flex-start;
        flex-direction: row;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="groups"] .groups-head-actions,
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .groups-head-actions {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="groups"] .groups-head-actions .btn,
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .groups-head-actions .btn {
        flex: 0 0 auto;
        width: auto;
        justify-content: center;
        white-space: nowrap;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="groups"] .groups-list-toolbar,
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .groups-list-toolbar {
        grid-template-columns: minmax(260px, 1fr) auto;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="groups"] .groups-tree-toggle-btn,
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .groups-tree-toggle-btn {
        justify-self: end;
        white-space: nowrap;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table {
        min-width: 100%;
        width: 100%;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th,
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td {
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(1),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(1) {
        width: 44px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(2),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(2) {
        width: auto;
        min-width: 170px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(3),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(3) {
        width: 120px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(4),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(4),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(7),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(7) {
        width: 62px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(5),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(5) {
        width: 96px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(6),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(6) {
        width: 120px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(8),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(8) {
        width: 92px;
    }

    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table th:nth-child(9),
    .app-shell[data-sidebar-forced="compact"][data-active-nav="rooms"] .rooms-list-table td:nth-child(9) {
        width: 100px;
    }

    .app-shell[data-sidebar-forced="compact"] .organization-users-page .form-grid.organization-user-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .app-shell[data-sidebar-forced="compact"] .ai-settings-layout {
        grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    }

    .app-shell[data-sidebar-forced="compact"] .ai-settings-layout-single {
        grid-template-columns: minmax(0, 920px);
    }

    .app-shell[data-sidebar-forced="compact"] .ai-settings-panel {
        box-sizing: border-box;
        min-width: 0;
    }

    .app-shell[data-sidebar-forced="compact"] .ai-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-shell[data-sidebar-forced="compact"] .ai-settings-actions {
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .schedules-period-row,
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .schedules-filters-row,
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .schedules-status-row {
        flex-wrap: nowrap;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .schedules-period-select {
        flex: 0 0 170px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .schedules-search {
        flex: 1 1 auto;
        min-width: 0;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .schedules-filters-row label {
        flex: 1 1 0;
        min-width: 0;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .schedules-campaign-summary {
        flex: 0 0 300px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table {
        min-width: 100%;
        width: 100%;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table th,
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table td {
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table th:first-child,
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table td:first-child {
        min-width: 300px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table th:nth-child(2),
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table td:nth-child(2) {
        width: 70px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table th:nth-child(3),
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table td:nth-child(3) {
        width: 104px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table th:nth-child(4),
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table td:nth-child(4) {
        width: 88px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table th:nth-child(5),
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table td:nth-child(5) {
        width: 96px;
    }

    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table th:nth-child(6),
    .app-shell[data-sidebar-forced="compact"] .study-plans-workspace .study-plans-table td:nth-child(6) {
        width: 160px;
        min-width: 160px;
    }
}
.system-maintenance-page {
    display: grid;
    gap: 16px;
}

.system-maintenance-page .page-head {
    align-items: center;
}

.system-maintenance-panel {
    min-width: 0;
}

.system-maintenance-statuses {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.system-maintenance-statuses .status-chip {
    min-height: 24px;
}

.status-warning {
    border-color: var(--status-pending-border);
    background: var(--status-pending-surface);
    color: var(--status-pending-text);
}

.system-maintenance-table th,
.system-maintenance-table td {
    font-weight: 400;
}

.system-maintenance-table th {
    font-weight: 500;
}

.system-maintenance-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.system-maintenance-metrics > div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-muted);
}

.system-maintenance-metrics span {
    color: var(--muted);
    font-size: 12px;
}

.system-maintenance-metrics strong {
    font-size: 18px;
}

@media (max-width: 900px) {
    .system-maintenance-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    html.responsive-maintenance-document,
    body[data-active-nav="admin_system_maintenance"] {
        min-width: 0;
        overflow-x: hidden;
    }

    body[data-active-nav="admin_system_maintenance"] .app-shell,
    body[data-active-nav="admin_system_maintenance"] .app-main {
        min-width: 0;
    }

    body[data-active-nav="admin_system_maintenance"] .directory-list-table-wrap {
        overflow-x: auto;
    }

    body[data-active-nav="admin_system_maintenance"] .system-maintenance-table {
        min-width: 720px;
    }
}

.system-ai-connections-page {
    display: grid;
    gap: 12px;
}

.system-ai-page-head {
    align-items: center;
}

.system-ai-catalog-panel {
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.system-ai-catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-soft);
}

.system-ai-catalog-head h2,
.system-ai-form-section h3 {
    margin: 0;
    color: var(--text);
}

.system-ai-catalog-head h2 {
    font-size: 17px;
}

.system-ai-catalog-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.system-ai-table-wrap {
    overflow-x: auto;
}

.system-ai-table {
    min-width: 1040px;
}

.system-ai-table th {
    padding: 10px 12px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.system-ai-table td {
    padding: 12px;
}

.system-ai-table tbody tr:hover {
    background: var(--presence-empty-surface);
}

.system-ai-name,
.system-ai-provider,
.system-ai-usage,
.system-ai-assignment {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.system-ai-name strong,
.system-ai-provider strong,
.system-ai-usage strong,
.system-ai-assignment strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.system-ai-name small,
.system-ai-provider small,
.system-ai-usage small,
.system-ai-assignment small {
    color: var(--muted);
    font-size: 11px;
}

.system-ai-name {
    min-width: 160px;
}

.system-ai-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.system-ai-status {
    --status-surface: var(--status-neutral-surface);
    --status-text: var(--status-neutral-text);
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--status-surface);
    color: var(--status-text);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.system-ai-status.is-enabled {
    --status-surface: var(--status-positive-surface);
    --status-text: var(--status-positive-text);
}

.system-ai-status.is-default {
    --status-surface: var(--status-info-surface);
    --status-text: var(--status-info-text);
}

.system-ai-health {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 104px;
}

.system-ai-health-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--system-ai-health-dot-surface);
}

.system-ai-health.is-success .system-ai-health-dot {
    background: var(--status-positive-indicator);
}

.system-ai-health.is-failure .system-ai-health-dot {
    background: var(--error);
}

.system-ai-health > span:last-child {
    display: grid;
    gap: 2px;
}

.system-ai-health strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.system-ai-health small {
    color: var(--muted);
    font-size: 10px;
}

.system-ai-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.system-ai-row-actions .table-action-btn {
    width: auto;
    min-width: 0;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
}

.system-ai-actions-column {
    width: 1%;
    text-align: right;
}

.system-ai-catalog-panel > .empty {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 32px 16px;
    border: 0;
}

.system-ai-catalog-panel > .empty strong {
    color: var(--text);
}

.system-ai-catalog-panel > .empty span {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.system-ai-confirmation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: var(--system-ai-confirmation-border);
    border-radius: 10px;
    background: var(--system-ai-confirmation-surface);
}

.system-ai-confirmation strong {
    color: var(--system-ai-confirmation-text);
    font-size: 13px;
}

.system-ai-confirmation p {
    margin: 3px 0 0;
    color: var(--system-ai-confirmation-text-variant-2);
    font-size: 12px;
    line-height: 1.4;
}

.system-ai-confirmation-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.system-ai-confirmation .btn.danger {
    background: var(--error);
}

.system-ai-connection-panel {
    --drawer-width: 620px;
}

.system-ai-connection-form {
    display: grid;
    align-content: start;
    gap: 12px;
}

.system-ai-form-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--color-surface);
}

.system-ai-form-section h3 {
    font-size: 14px;
}

.system-ai-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.system-ai-section-head > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.system-ai-section-head h3,
.system-ai-section-head p {
    margin: 0;
}

.system-ai-section-head p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.system-ai-section-head .btn {
    flex: 0 0 auto;
    min-height: 38px;
}

.system-ai-compatibility-list {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}

.system-ai-compatibility-empty {
    margin: 0;
    padding: 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.system-ai-compatibility-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 10px;
    background: var(--color-surface);
}

.system-ai-compatibility-row + .system-ai-compatibility-row {
    border-top: 1px solid var(--border-soft);
}

.system-ai-compatibility-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-neutral-text);
}

.system-ai-compatibility-row.is-running .system-ai-compatibility-indicator {
    background: var(--status-running-indicator);
}

.system-ai-compatibility-row.is-passed .system-ai-compatibility-indicator {
    background: var(--status-positive-indicator);
}

.system-ai-compatibility-row.is-failed .system-ai-compatibility-indicator {
    background: var(--error);
}

.system-ai-compatibility-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.system-ai-compatibility-copy strong {
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
}

.system-ai-compatibility-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.system-ai-compatibility-status {
    padding: 3px 7px;
    border: 1px solid var(--status-neutral-border);
    border-radius: 999px;
    background: var(--status-neutral-surface);
    color: var(--status-neutral-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.system-ai-compatibility-row.is-running .system-ai-compatibility-status {
    border-color: var(--status-running-border);
    background: var(--status-running-surface);
    color: var(--status-running-text);
}

.system-ai-compatibility-row.is-passed .system-ai-compatibility-status {
    border-color: var(--status-positive-border);
    background: var(--status-positive-surface);
    color: var(--status-positive-text);
}

.system-ai-compatibility-row.is-failed .system-ai-compatibility-status {
    background: var(--system-ai-compatibility-row-is-failed-system-ai-compatibility-status-surface);
    color: var(--error);
}

.system-ai-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.system-ai-field {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    color: var(--color-text-meta);
    font-size: 12px;
    font-weight: 600;
}

.system-ai-field-wide {
    grid-column: 1 / -1;
}

.system-ai-field input,
.system-ai-field select {
    width: 100%;
    height: 38px;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--color-control-border);
    border-radius: 8px;
    background: var(--color-control-bg);
    color: var(--color-text);
    font: inherit;
    font-weight: 400;
}

.system-ai-field input:focus,
.system-ai-field select:focus {
    border-color: var(--color-control-focus-border);
    outline: 2px solid var(--color-control-focus-ring);
    outline-offset: 0;
}

.system-ai-model-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.system-ai-model-control > .ai-model-combobox {
    min-width: 0;
}

.system-ai-model-control .directory-combobox-search {
    height: 38px;
    min-height: 38px;
    padding: 0 36px 0 10px;
    border-radius: 8px;
    background-position: right 12px center;
    background-size: 14px 14px;
    font-size: 12px;
}

.ai-model-combobox-results.custom-select-results-portal {
    z-index: 90;
}

.ai-model-combobox-results .directory-combobox-results-scroll {
    max-height: min(240px, calc(100vh - 24px));
}

.ai-model-combobox-results .directory-combobox-result,
.ai-model-combobox-results .directory-combobox-empty {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 13px;
}

.system-ai-inline-btn {
    height: 38px;
}

.system-ai-connector-help {
    min-height: 16px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.system-ai-connector-help a {
    color: var(--accent);
}

.system-ai-switches {
    display: grid;
    gap: 8px;
}

.system-ai-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--color-text-meta);
    font-size: 12px;
    line-height: 1.4;
}

.system-ai-check input {
    margin: 2px 0 0;
}

.system-ai-drawer-actions {
    justify-content: space-between;
}

.system-ai-save-hint {
    max-width: 420px;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .system-ai-catalog-head,
    .system-ai-confirmation {
        align-items: flex-start;
        flex-direction: column;
    }

    .system-ai-confirmation-actions {
        width: 100%;
    }

    .system-ai-confirmation-actions .btn {
        flex: 1 1 0;
    }

    .system-ai-form-grid,
    .system-ai-model-control {
        grid-template-columns: minmax(0, 1fr);
    }

    .system-ai-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .system-ai-section-head .btn {
        width: 100%;
    }

    .system-ai-connection-panel {
        --drawer-screen-gap: 12px;
    }

    .system-ai-drawer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .system-ai-save-hint {
        max-width: none;
    }

    .system-ai-drawer-actions > .btn,
    .system-ai-drawer-actions .slot-editor-actions-right,
    .system-ai-drawer-actions .slot-editor-actions-right .btn {
        width: 100%;
    }
}

/* Organization AI settings: explicit system/own source switching. */
.organization-ai-settings-page {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.organization-ai-page-head {
    align-items: flex-start;
}

.organization-ai-overview-grid {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
    gap: 16px;
    min-width: 0;
}

.organization-ai-source-panel,
.organization-ai-system-panel,
.organization-ai-own-panel {
    min-width: 0;
}

.organization-ai-source-card {
    display: grid;
    gap: 12px;
    min-height: 100%;
}

.organization-ai-source-head,
.organization-ai-system-head,
.organization-ai-connection-head,
.organization-ai-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.organization-ai-source-head > div,
.organization-ai-system-head > div,
.organization-ai-connection-head > div,
.organization-ai-section-head > div {
    min-width: 0;
}

.organization-ai-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--organization-ai-eyebrow-text);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-transform: uppercase;
}

.organization-ai-source-head h2,
.organization-ai-section-head h2,
.organization-ai-system-head h3,
.organization-ai-connection-head h3 {
    margin: 0;
    color: var(--color-action-secondary-text);
    font-weight: 600;
}

.organization-ai-source-head h2,
.organization-ai-section-head h2 {
    font-size: 18px;
    line-height: 1.35;
}

.organization-ai-system-head h3,
.organization-ai-connection-head h3 {
    font-size: 16px;
    line-height: 1.4;
}

.organization-ai-section-head p,
.organization-ai-system-head p,
.organization-ai-connection-head p {
    margin: 4px 0 0;
    color: var(--organization-ai-section-head-text);
    font-size: 13px;
    line-height: 1.5;
}

.organization-ai-connection-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--organization-ai-connection-status-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.organization-ai-connection-status.is-success {
    border-color: var(--status-positive-border);
    background: var(--color-success-surface);
    color: var(--organization-ai-connection-status-is-success-text);
}

.organization-ai-connection-status.is-danger {
    border-color: var(--organization-ai-connection-status-is-danger-border);
    background: var(--grid-entry-drop-risk-state-surface);
    color: var(--organization-ai-connection-status-is-danger-text);
}

.organization-ai-source-name {
    color: var(--color-action-secondary-text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.organization-ai-source-identity {
    color: var(--color-tab-text);
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.organization-ai-source-usage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 12px;
    border: 1px solid var(--drawer-divider-color);
    border-radius: 10px;
    background: var(--color-surface-tinted);
}

.organization-ai-source-usage > span,
.organization-ai-source-usage > small {
    color: var(--organization-ai-source-usage-text);
    font-size: 12px;
    line-height: 1.4;
}

.organization-ai-source-usage > strong {
    color: var(--color-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.organization-ai-source-usage > small {
    grid-column: 1 / -1;
}

.organization-ai-no-fallback,
.organization-ai-no-fallback-static {
    display: grid;
    gap: 4px;
    padding: 12px 16px;
    border: var(--organization-ai-no-fallback-border);
    border-radius: 10px;
    background: var(--organization-ai-no-fallback-surface);
    color: var(--organization-ai-no-fallback-text);
}

.organization-ai-no-fallback.is-error {
    border-color: var(--organization-ai-no-fallback-is-error-border);
    background: var(--organization-ai-no-fallback-is-error-surface);
    color: var(--organization-ai-no-fallback-is-error-text);
}

.organization-ai-no-fallback strong,
.organization-ai-no-fallback-static strong {
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.organization-ai-no-fallback span,
.organization-ai-no-fallback-static span,
.organization-ai-no-fallback b {
    color: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

.organization-ai-no-fallback b {
    font-weight: 600;
}

.organization-ai-section-head {
    margin-bottom: 16px;
}

.organization-ai-section-head > .btn {
    flex: 0 0 auto;
}

.organization-ai-system-card {
    display: grid;
    gap: 12px;
}

.organization-ai-balance-primary {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.organization-ai-balance-primary > span,
.organization-ai-balance-primary > small {
    color: var(--organization-ai-balance-primary-text);
    font-size: 12px;
    line-height: 1.4;
}

.organization-ai-balance-primary > strong {
    color: var(--color-text-strong);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.organization-ai-balance-progress {
    --component-progress-fill: var(--progress-fill-info);
    height: 8px;
}

.organization-ai-balance-details,
.organization-ai-connection-usage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.organization-ai-balance-details > div,
.organization-ai-connection-usage > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--drawer-divider-color);
    border-radius: 8px;
    background: var(--color-surface-tinted);
}

.organization-ai-balance-details dt,
.organization-ai-connection-usage dt {
    color: var(--organization-ai-balance-details-text);
    font-size: 11px;
    line-height: 1.4;
}

.organization-ai-balance-details dd,
.organization-ai-connection-usage dd {
    margin: 0;
    color: var(--color-action-secondary-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.organization-ai-connections-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.organization-ai-connection-card {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.organization-ai-connection-card.is-active {
    border-color: var(--organization-ai-connection-card-is-active-border);
    box-shadow: var(--features-organization-ai-connection-card-is-active-shadow);
}

.organization-ai-connection-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.organization-ai-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--color-action-secondary-border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--organization-ai-badge-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.organization-ai-badge.is-active {
    border-color: var(--organization-ai-badge-is-active-border);
    background: var(--color-filter-active-surface);
    color: var(--organization-ai-badge-is-active-text);
}

.organization-ai-badge.is-enabled {
    border-color: var(--status-positive-border);
    background: var(--color-success-surface);
    color: var(--organization-ai-badge-is-enabled-text);
}

.organization-ai-badge.is-disabled {
    color: var(--organization-ai-badge-is-disabled-text);
}

.organization-ai-connection-usage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.organization-ai-connection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.organization-ai-connection-actions .btn {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12px;
}

.organization-ai-active-delete-note {
    margin: 0;
    color: var(--organization-ai-active-delete-note-text);
    font-size: 11px;
    line-height: 1.5;
}

.organization-ai-connections-empty,
.organization-ai-system-empty,
.organization-ai-plan-locked,
.organization-ai-load-error,
.organization-ai-loading {
    display: grid;
    gap: 4px;
    min-height: 84px;
    place-content: center;
    padding: 16px;
    border: 1px dashed var(--color-action-secondary-border);
    border-radius: 10px;
    background: var(--organization-ai-connections-empty-surface);
    color: var(--organization-ai-connections-empty-text);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.organization-ai-connections-empty {
    grid-column: 1 / -1;
}

.organization-ai-connections-empty strong,
.organization-ai-system-empty strong,
.organization-ai-plan-locked strong {
    color: var(--organization-ai-connections-empty-text-variant-2);
    font-weight: 600;
}

.organization-ai-load-error {
    border-color: var(--organization-ai-load-error-border);
    background: var(--organization-ai-load-error-surface);
    color: var(--organization-ai-load-error-text);
}

.organization-ai-connection-drawer .system-ai-connection-panel {
    max-width: 720px;
}

.organization-ai-form-fragment {
    display: contents;
}

.organization-ai-historical-page .ai-subscription-card {
    min-height: 420px;
}

.organization-ai-historical-panel {
    box-sizing: border-box;
    display: flex;
}

.organization-ai-historical-panel #organization-ai-connection-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.organization-ai-historical-panel .system-ai-field {
    gap: 8px;
    color: var(--color-text-meta);
    font-size: 13px;
    font-weight: 600;
}

.organization-ai-historical-panel .system-ai-field input,
.organization-ai-historical-panel .system-ai-field select {
    height: 46px;
    padding: 10px 14px;
    border-color: var(--color-control-border);
    border-radius: 12px;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 400;
}

@media (max-width: 1080px) {
    .organization-ai-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .organization-ai-settings-page {
        gap: 16px;
    }

    .organization-ai-connections-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-ai-source-head,
    .organization-ai-system-head,
    .organization-ai-connection-head,
    .organization-ai-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-ai-section-head > .btn,
    .organization-ai-connection-actions .btn {
        width: 100%;
    }

    .organization-ai-balance-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .organization-ai-historical-page .ai-subscription-card,
    .organization-ai-historical-panel {
        min-height: 0;
    }

    .organization-ai-historical-panel .ai-settings-actions {
        margin-top: 18px;
    }
}

@media (max-width: 460px) {
    .organization-ai-balance-details,
    .organization-ai-connection-usage,
    .organization-ai-source-usage {
        grid-template-columns: minmax(0, 1fr);
    }

    .organization-ai-source-usage > small {
        grid-column: auto;
    }

    .organization-ai-balance-primary {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table {
    min-width: 0;
}

#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(1),
#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(1) {
    width: auto;
    min-width: 0;
}

#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(2),
#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(2) {
    width: 140px;
}

#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(3),
#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(3) {
    width: 110px;
}

#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(4),
#schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(4) {
    width: 230px;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(1),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(1) {
    width: auto;
    min-width: 0;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(2),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(2) {
    width: 104px;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(3),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(3) {
    width: 72px;
}

.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table th:nth-child(4),
.app-shell[data-sidebar-state="expanded"] #schedules-workspace[data-plan-readiness-visible="0"] .schedules-dispatcher-table td:nth-child(4) {
    width: 190px;
}

.schedules-dispatcher-table.user-activity-replay-table {
    min-width: 1040px;
}

.user-activity-replay-toolbar .schedules-period-row {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(220px, 0.34fr) minmax(220px, 0.34fr);
    width: 100%;
    margin-bottom: 0;
}

.user-activity-replay-toolbar .schedules-period-row:has(.schedules-more-filters) {
    grid-template-columns: minmax(360px, 1fr) minmax(220px, 0.34fr) minmax(220px, 0.34fr) auto;
}

.user-activity-replay-toolbar .schedules-search,
.user-activity-replay-toolbar .schedules-period-select,
.user-activity-replay-toolbar .schedules-period-select .custom-select,
.user-activity-replay-toolbar .schedules-more-filters {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.schedules-dispatcher-table.user-activity-replay-table th:nth-child(1),
.schedules-dispatcher-table.user-activity-replay-table td:nth-child(1) {
    width: 30%;
    min-width: 290px;
}

.schedules-dispatcher-table.user-activity-replay-table th:nth-child(2),
.schedules-dispatcher-table.user-activity-replay-table td:nth-child(2) {
    width: 32%;
    min-width: 300px;
}

.schedules-dispatcher-table.user-activity-replay-table th:nth-child(3),
.schedules-dispatcher-table.user-activity-replay-table td:nth-child(3) {
    width: 135px;
}

.schedules-dispatcher-table.user-activity-replay-table th:nth-child(4),
.schedules-dispatcher-table.user-activity-replay-table td:nth-child(4) {
    width: 190px;
}

.schedules-dispatcher-table.user-activity-replay-table th:nth-child(5),
.schedules-dispatcher-table.user-activity-replay-table td:nth-child(5) {
    width: 190px;
}

.user-activity-replay-row-link {
    color: inherit;
    text-decoration: none;
}

.user-activity-replay-row-link:hover,
.user-activity-replay-row-link:focus-visible {
    color: var(--color-link-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.user-activity-actions-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.user-activity-actions-cell > .schedules-row-title {
    min-width: 0;
}

.user-activity-actions-cell .schedules-action-menu-wrap {
    justify-self: end;
}

.user-activity-actions-toggle {
    min-width: 104px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .user-activity-replay-toolbar .schedules-period-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.user-activity-actions-menu {
    width: min(420px, calc(100vw - 24px));
    max-height: min(440px, calc(100vh - 24px));
    overflow-y: auto;
}

.schedules-action-menu.user-activity-actions-menu a {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
}

.user-activity-actions-menu time {
    color: var(--color-text-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
    white-space: nowrap;
}

.user-activity-actions-menu a > span {
    min-width: 0;
    white-space: normal;
}

.user-activity-replay-document,
.user-activity-replay-page {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.user-activity-replay-page {
    margin: 0;
    background: var(--replay-viewer-surface);
}

.user-activity-replay-stage {
    position: relative;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    color: var(--replay-viewer-text);
    background: var(--replay-viewer-surface);
}

.user-activity-replay-viewport {
    position: absolute;
    inset: 0 0 80px;
    overflow: hidden;
    background: var(--replay-viewer-surface);
}

.user-activity-replay-viewport .replayer-wrapper {
    margin: 0;
    transform-origin: top left;
}

.user-activity-replay-viewport .rr-player {
    float: none;
    color: var(--replay-viewer-text);
    background: var(--replay-viewer-surface-popover);
    border-radius: 0;
    box-shadow: none;
}

.user-activity-replay-viewport .rr-player__frame {
    background: var(--replay-viewer-surface);
}

.user-activity-replay-viewport.user-activity-replay-viewport .rr-controller.rr-controller {
    color: var(--replay-viewer-text);
    background: var(--replay-viewer-surface-popover);
    border-radius: 0;
}

.user-activity-replay-viewport.user-activity-replay-viewport .rr-timeline__time.rr-timeline__time {
    color: var(--replay-viewer-text-muted);
}

.user-activity-replay-viewport.user-activity-replay-viewport .rr-progress.rr-progress {
    border-color: var(--replay-viewer-surface-popover);
    background: var(--replay-viewer-border);
}

.user-activity-replay-viewport.user-activity-replay-viewport .rr-progress__step.rr-progress__step {
    background: var(--replay-viewer-text-soft);
}

.user-activity-replay-viewport.user-activity-replay-viewport .rr-controller__btns.rr-controller__btns button {
    color: var(--replay-viewer-text);
}

.user-activity-replay-viewport.user-activity-replay-viewport .rr-controller__btns.rr-controller__btns button svg,
.user-activity-replay-viewport.user-activity-replay-viewport .rr-controller__btns.rr-controller__btns button svg * {
    fill: currentColor;
    stroke: currentColor;
}

.user-activity-replay-topbar {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 80px;
    padding: 8px 16px;
    border-top: 1px solid var(--replay-viewer-border);
    background: var(--replay-viewer-surface-popover);
    pointer-events: none;
}

.user-activity-replay-topbar > * {
    pointer-events: auto;
}

.user-activity-replay-session-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 0 4px;
    border: 0;
    border-radius: 0;
    color: var(--replay-viewer-text-muted);
    background: transparent;
    box-shadow: none;
}

.user-activity-replay-session-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-activity-replay-session-meta strong {
    overflow: hidden;
    max-width: 280px;
    color: var(--replay-viewer-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-activity-replay-page-url {
    overflow: hidden;
    max-width: min(760px, calc(100vw - 220px));
    color: var(--replay-viewer-text-soft);
    font-size: 12px;
    line-height: 16px;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-activity-replay-page-url:hover,
.user-activity-replay-page-url:focus-visible {
    color: var(--replay-viewer-text);
    text-decoration-color: currentColor;
}

.user-activity-replay-alert {
    position: absolute;
    z-index: 5;
    top: 76px;
    left: 50%;
    max-width: min(620px, calc(100vw - 32px));
    padding: 0;
    border-radius: var(--radius-md);
    color: var(--replay-viewer-text);
    background: var(--replay-viewer-alert-surface);
    box-shadow: var(--replay-viewer-shadow-alert);
    transform: translateX(-50%);
}

.user-activity-replay-alert:not(:empty) {
    padding: 10px 14px;
}

.user-activity-replay-loading {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.user-activity-replay-loading[hidden] {
    display: none;
}

.user-activity-replay-loading span {
    width: 28px;
    height: 28px;
    border: 3px solid var(--replay-viewer-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: user-activity-replay-loading-spin 0.8s linear infinite;
}

@keyframes user-activity-replay-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.user-activity-replay-icon-button,
.user-activity-replay-control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-md);
    color: var(--replay-viewer-text);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

.user-activity-replay-icon-button:hover,
.user-activity-replay-control-button:hover,
.user-activity-replay-icon-button:focus-visible,
.user-activity-replay-control-button:focus-visible {
    color: var(--replay-viewer-text);
    background: var(--replay-viewer-hover);
}

.user-activity-replay-icon-button svg,
.user-activity-replay-control-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.user-activity-replay-chapters {
    position: relative;
}

.user-activity-replay-chapters summary {
    list-style: none;
}

.user-activity-replay-chapters summary::-webkit-details-marker {
    display: none;
}

.user-activity-replay-chapters-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(420px, calc(100vw - 40px));
    max-height: min(55vh, 480px);
    overflow: auto;
    border: 1px solid var(--replay-viewer-border);
    border-radius: var(--radius-lg);
    color: var(--replay-viewer-text);
    background: var(--replay-viewer-surface-popover);
    box-shadow: var(--replay-viewer-shadow-popover);
}

.user-activity-replay-chapter-list {
    display: grid;
    margin: 0;
    padding: 8px;
    list-style: none;
}

.user-activity-replay-chapter-list button {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: var(--radius-md);
    color: var(--replay-viewer-text);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.user-activity-replay-chapter-list button:hover,
.user-activity-replay-chapter-list button:focus-visible {
    background: var(--replay-viewer-hover-soft);
}

.user-activity-replay-chapter-list time {
    color: var(--replay-viewer-text-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.user-activity-replay-chapter-list > .empty {
    padding: 12px;
    color: var(--replay-viewer-text-soft);
}

@media (max-width: 760px) {
    .user-activity-replay-topbar {
        padding-right: 10px;
        padding-left: 10px;
    }

    .user-activity-replay-session-primary span:not(.status-chip) {
        display: none;
    }

    .user-activity-replay-session-meta strong {
        max-width: 38vw;
    }

    .user-activity-replay-page-url {
        max-width: calc(100vw - 120px);
    }

    .user-activity-replay-control-button span {
        display: none;
    }
}

/*
 * Monochrome dark preview.
 * This layer changes only visual properties. Layout dimensions, typography,
 * spacing and component geometry remain owned by the rules above.
 */

/* ===== CSS owner: themes.css ===== */

html[data-ui-theme="dark"] {
    color-scheme: dark;
    --bg: #0b0b0c;
    --surface: #151515;
    --text: #f2f2f2;
    --muted: #a1a1a1;
    --line: #242424;
    --border: #303030;
    --border-soft: #242424;
    --surface-muted: #1b1b1c;
    --accent: #e7e7e7;
    --accent-soft: #252525;
    --accent-teal: #b8b8b8;
    --accent-cyan: #c8c8c8;
    --accent-blue: #dddddd;
    --accent-teal-dark: #9d9d9d;
    --error: #d0d0d0;
    --warning: #bdbdbd;
    --conflict-color: #ff6f7a;
    --conflict-color-strong: #ff6f7a;
    --conflict-surface: #4b2025;
    --conflict-border: #8f3d47;
    --problem-color: #ff6f7a;
    --problem-critical-surface: #351b20;
    --problem-critical-color: #e58b94;
    --problem-warning-surface: #2b2b2c;
    --problem-warning-color: #d0d0d0;
    --problem-warning-border: #555555;
    --color-canvas: var(--bg);
    --color-surface: var(--surface);
    --color-surface-subtle: var(--surface-muted);
    --color-surface-soft: #1b1b1c;
    --color-surface-tinted: #1b1b1c;
    --color-surface-elevated: #1b1b1c;
    --color-surface-deep: #171717;
    --color-surface-muted-strong: #242424;
    --color-surface-status: #202021;
    --color-surface-active: #3a3a3a;
    --color-surface-active-emphasis: #3a3a3b;
    --color-surface-hover-strong: #292929;
    --color-surface-strong: #303030;
    --color-surface-emphasis: #4a4a4a;
    --panel-surface: var(--color-surface);
    --panel-border: var(--color-border);
    --panel-shadow: var(--shadow);
    --color-border: var(--border);
    --color-border-soft: var(--border-soft);
    --color-border-strong: #4a4a4a;
    --color-border-emphasis: #555555;
    --color-border-focus: #666666;
    --color-border-inverse: #d0d0d0;
    --color-border-highlight: #a1a1a1;
    --color-container-border: #303030;
    --color-divider-border: #303030;
    --color-text: var(--text);
    --color-text-secondary: var(--muted);
    --color-text-muted: #8f8f8f;
    --color-text-strong: #e5e5e5;
    --color-text-emphasis: #f2f2f2;
    --color-text-high: #ededed;
    --color-text-bright: #eeeeee;
    --color-text-brightest: #f0f0f0;
    --color-text-on-strong: #ffffff;
    --color-text-navigation: #cfcfcf;
    --color-text-tertiary: #c0c0c0;
    --color-text-subtle-high: #b0b0b0;
    --color-text-neutral: #dddddd;
    --color-text-quieter: #b6b6b6;
    --color-text-disabled: #777777;
    --color-text-on-light: #111111;
    --color-warning-contrast-text: #3d3200;
    --grid-line-strong: #2a2a2a;
    --grid-cell-border-inline: var(--grid-line-strong);
    --grid-cell-border-block: var(--color-border-soft);
    --all-schedule-v2-weeks-divider: transparent;
    --grid-meta-cell-divider-shadow: none;
    --shadow-inset-soft: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-inset-strong: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    --color-text-control: #a1a1a1;
    --color-text-control-hover: #d0d0d0;
    --color-text-meta: #a1a1a1;
    --color-link-text: #d0d0d0;
    --color-link-hover: #ededed;
    --color-link-muted: #bdbdbd;
    --color-tree-text: #d0d0d0;
    --color-filter-text: #d0d0d0;
    --color-message-text: #a1a1a1;
    --color-filter-hover-surface: #252525;
    --color-filter-hover-border: #3a3a3a;
    --color-filter-active-surface: #2b2b2c;
    --color-filter-active-border: #555555;
    --color-filter-active-text: #ededed;
    --brand-logo-color: #ffffff;
    --color-control-bg: #101011;
    --color-control-border: #3a3a3a;
    --color-control-border-subtle: #3a3a3a;
    --color-control-border-compact: #3a3a3a;
    --color-control-placeholder: #8f8f8f;
    --color-control-focus-border: #777777;
    --color-control-focus-border-compact: #777777;
    --color-control-focus-ring: rgba(255, 255, 255, 0.08);
    --color-control-disabled-bg: #1b1b1c;
    --color-control-disabled-border: #303030;
    --color-control-disabled-text: #8f8f8f;
    --color-choice-border: #4a4a4a;
    --color-choice-active: #777777;
    --color-choice-mark: #d0d0d0;
    --color-choice-focus-ring: rgba(255, 255, 255, 0.08);
    --color-editor-control-surface: var(--color-control-bg);
    --color-editor-control-border: #3a3a3a;
    --color-editor-control-text: #d0d0d0;
    --color-editor-control-text-emphasis: #ededed;
    --color-editor-control-text-muted: #a1a1a1;
    --color-editor-control-placeholder: #777777;
    --color-editor-control-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --color-editor-static-surface: #242424;
    --color-editor-static-border: #4a4a4a;
    --color-editor-static-text: #d0d0d0;
    --color-editor-add-surface: transparent;
    --color-editor-add-border: var(--color-editor-remove-border);
    --color-editor-add-text: var(--color-editor-control-text-muted);
    --color-editor-add-hover-surface: #3a3a3a;
    --color-editor-add-hover-border: #777777;
    --color-editor-add-hover-text: #f2f2f2;
    --color-editor-remove-surface: #242424;
    --color-editor-remove-border: #4a4a4a;
    --color-editor-remove-text: #d0d0d0;
    --color-editor-remove-hover-surface: #3a3a3a;
    --color-editor-remove-hover-border: #777777;
    --color-editor-remove-hover-text: #f2f2f2;
    --footer-tool-surface: #151515;
    --footer-tool-border: #3a3a3a;
    --footer-tool-text: #ededed;
    --footer-tool-hover-surface: #252525;
    --footer-tool-hover-border: #6f6f6f;
    --footer-tool-hover-text: #ededed;
    --footer-tool-icon-filter: brightness(0) invert(1);
    --help-surface: #151515;
    --help-border: var(--color-border);
    --help-text: #ededed;
    --help-text-muted: #9b9b9b;
    --help-disabled-text: #ededed;
    --help-item-surface: transparent;
    --help-item-hover-surface: #252525;
    --help-item-focus-ring: #888888;
    --help-divider: var(--color-border-soft);
    --help-empty-surface: #1b1b1c;
    --help-empty-text: #9b9b9b;
    --help-arrow-text: #9b9b9b;
    --help-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
    --select-chevron-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' fill='none' stroke='%23e2e2e2' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --color-surface-hover: #252525;
    --color-surface-selected: #2b2b2c;
    --color-surface-selected-border: #555555;
    --color-action-primary-bg: #373739;
    --color-action-primary-border: #a1a1a1;
    --color-action-primary-text: #ffffff;
    --color-action-secondary-bg: transparent;
    --color-action-secondary-border: #252525;
    --color-action-secondary-text: #969696;
    --color-table-surface: #151515;
    --color-table-header-surface: #1b1b1c;
    --color-table-row-hover: #1d1d1e;
    --color-table-border: #303030;
    --color-table-header-text: #bdbdbd;
    --color-tab-text: #a3a3a3;
    --color-tab-active-surface: #292929;
    --color-tab-active-border: #444444;
    --color-tab-active-text: #ededed;
    --color-compact-tag-surface: #1b1b1c;
    --color-compact-tag-border: #3a3a3a;
    --color-compact-tag-text: #a8a8a8;
    --tour-overlay-color: #000000;
    --tour-overlay-opacity: 0.62;
    --color-data-table-border: #303030;
    --color-data-table-header-surface: #1b1b1c;
    --schedule-map-label-published-surface: #3f7764;
    --schedule-map-label-published-border: #3f7764;
    --schedule-map-label-published-text: #ffffff;
    --schedule-map-label-work-surface: #526d92;
    --schedule-map-label-work-border: #526d92;
    --schedule-map-label-work-text: #ffffff;
    --schedule-map-label-draft-surface: #3d4754;
    --schedule-map-label-draft-border: #56616f;
    --schedule-map-label-draft-text: #f1f4f8;
    --schedule-map-conflict-counter-surface: #a85b63;
    --schedule-map-context-1-surface: #242d35;
    --schedule-map-context-1-accent: #46617a;
    --schedule-map-context-2-surface: #242e29;
    --schedule-map-context-2-accent: #4d735c;
    --schedule-map-context-3-surface: #302d27;
    --schedule-map-context-3-accent: #726850;
    --schedule-map-context-4-surface: #282d33;
    --schedule-map-context-4-accent: #566475;
    --schedule-map-context-5-surface: #23302f;
    --schedule-map-context-5-accent: #48716d;
    --schedule-map-context-6-surface: #302b29;
    --schedule-map-context-6-accent: #715d53;
    --color-data-table-header-text: #bdbdbd;
    --color-data-table-text: #ededed;
    --color-data-table-row-hover: #1d1d1e;
    --color-data-table-tree-surface: #1b1b1c;
    --color-data-table-tree-border: #303030;
    --color-popover-surface: #151515;
    --color-popover-border: #303030;
    --color-popover-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
    --color-toast-surface: #1b1b1c;
    --color-toast-border: #3a3a3a;
    --color-toast-text: #ededed;
    --color-toast-title: #f0f0f0;
    --color-toast-secondary: #b0b0b0;
    --color-toast-close: #bdbdbd;
    --color-toast-close-hover-bg: #2b2b2c;
    --color-toast-close-hover-text: #ffffff;
    --color-toast-icon-bg: #3a3a3a;
    --color-toast-icon-text: #f0f0f0;
    --color-toast-label: #bdbdbd;
    --color-toast-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
    --color-overlay: rgba(0, 0, 0, 0.74);
    --color-overlay-soft: rgba(0, 0, 0, 0.34);
    --color-drawer-surface: #151515;
    --color-dialog-surface: #151515;
    --color-dialog-border: #303030;
    --drawer-divider-color: #303030;
    --scrollbar-track: #151515;
    --scrollbar-thumb: #4a4a4a;
    --scrollbar-thumb-hover: #5a5a5a;
    --color-danger-surface: var(--problem-critical-surface);
    --color-danger-border: #6f323b;
    --color-danger-text: var(--problem-critical-color);
    --color-success-surface: #1f3a2a;
    --color-success-border: #3f7950;
    --color-success-text: #9be3a8;
    --feedback-default-surface: #252525;
    --feedback-default-border: #555555;
    --feedback-default-text: #ededed;
    --feedback-error-surface: var(--problem-critical-surface);
    --feedback-error-border: #6f323b;
    --feedback-error-text: var(--problem-critical-color);
    --feedback-danger-surface: var(--problem-critical-surface);
    --feedback-danger-border: #6f323b;
    --feedback-danger-text: var(--problem-critical-color);
    --feedback-warning-surface: #252525;
    --feedback-warning-border: #555555;
    --feedback-warning-text: #ededed;
    --feedback-success-surface: #252525;
    --feedback-success-border: #555555;
    --feedback-success-text: #ededed;
    --feedback-compact-success-surface: #202821;
    --feedback-compact-success-text: #9ac8a3;
    --feedback-compact-warning-surface: #29261f;
    --feedback-compact-warning-text: #d2bd83;
    --feedback-compact-error-surface: #2d2022;
    --feedback-compact-error-text: #e2949b;
    --feedback-compact-error-strong-surface: #713139;
    --feedback-compact-error-strong-text: #ffffff;
    --status-neutral-surface: #242424;
    --status-neutral-border: #494949;
    --status-neutral-text: #dddddd;
    --status-positive-surface: #1b2b21;
    --status-positive-border: #355e43;
    --status-positive-text: #8bd5a0;
    --status-positive-indicator: #63b879;
    --status-running-surface: #192834;
    --status-running-border: #365a73;
    --status-running-text: #91caf0;
    --status-running-indicator: #70acd4;
    --status-pending-surface: #2d271a;
    --status-pending-border: #6b582e;
    --status-pending-text: #e3c170;
    --status-negative-surface: #311f24;
    --status-negative-border: #6f3a45;
    --status-negative-text: #f0a0aa;
    --compact-counter-surface: #242424;
    --compact-counter-text: #dddddd;
    --presence-empty-surface: var(--color-surface-elevated);
    --presence-empty-border: var(--color-control-border);
    --presence-empty-text: var(--color-text-strong);
    --grid-active-slot-surface: #242424;
    --grid-active-slot-ring: #666666;
    --grid-sticky-bg: #151515;
    --grid-row-hover-surface: #1d1d1e;
    --grid-column-hover-surface: #1d1d1e;
    --grid-time-row-hover-surface: #222223;
    --sidebar-surface: #111112;
    --sidebar-border: #242424;
    --sidebar-avatar-filter: grayscale(1) brightness(1.55) contrast(0.92);
    --sidebar-navigation-icon-filter: grayscale(1) brightness(0) invert(1) opacity(0.86);
    --sidebar-navigation-hover-surface: #242425;
    --sidebar-navigation-marker: #e5e5e5;
    --sidebar-navigation-icon: #e2e2e2;
    --sidebar-indicator-surface: #e5e5e5;
    --sidebar-indicator-text: #121212;
    --nav-indicator-attention-surface: #d89428;
    --nav-indicator-attention-text: #1f1404;
    --sidebar-collapsed-section-text: var(--color-action-secondary-text);
    --sidebar-collapsed-indicator-text: var(--sidebar-indicator-text);
    --sidebar-avatar-surface: #e8e8e8;
    --sidebar-menu-icon: #d9d9d9;
    --layout-app-sidebar-shadow: none;
    --layout-app-shell-data-sidebar-state-collapsed-app-sidebar-app-shell-data-sidebar-state-collapse-shadow: none;
    --color-action-hover-bg: #272728;
    --color-action-primary-hover-bg: #48484a;
    --lesson-neutral-accent: #858585;
    --lesson-card-surface: #1d1d1e;
    --lesson-card-border: #3a3a3a;
    --lesson-card-text: #d4d4d4;
    --lesson-card-title-text: #d4d4d4;
    --lesson-card-profile-text: #a6a6a6;
    --lesson-card-meta-text: #a6a6a6;
    --lesson-card-room-text: #c3c3c3;
    --lesson-chip-surface: #242424;
    --lesson-chip-border: #545454;
    --lesson-chip-text: #d4d4d4;
    --lesson-selected-title-text: #f1f1f1;
    --lesson-selected-meta-text: var(--color-text-control-hover);
    --lesson-lecture-surface: #1a251f;
    --lesson-lecture-border: #2f4035;
    --lesson-lecture-accent: #5b8268;
    --lesson-lecture-interaction: #639074;
    --lesson-lecture-ring: transparent;
    --lesson-lecture-title-text: #c6d2c9;
    --lesson-lecture-profile-text: #93a79a;
    --lesson-lecture-meta-text: #93a79a;
    --lesson-lecture-room-text: #c6d2c9;
    --lesson-lecture-chip-surface: #2a3a30;
    --lesson-lecture-chip-border: #4e6b57;
    --lesson-lecture-chip-text: #9fbea9;
    --lesson-practice-surface: #1b2530;
    --lesson-practice-border: #2f3b49;
    --lesson-practice-accent: #668daf;
    --lesson-practice-interaction: #6f98c0;
    --lesson-practice-ring: transparent;
    --lesson-practice-title-text: #c5cedb;
    --lesson-practice-profile-text: #95a2b4;
    --lesson-practice-meta-text: #95a2b4;
    --lesson-practice-room-text: #c5cedb;
    --lesson-practice-chip-surface: #2d3b4d;
    --lesson-practice-chip-border: #526b87;
    --lesson-practice-chip-text: #a5b9d0;
    --lesson-lab-surface: #28271f;
    --lesson-lab-border: #413e31;
    --lesson-lab-accent: #967f49;
    --lesson-lab-interaction: #a08f52;
    --lesson-lab-ring: transparent;
    --lesson-lab-title-text: #d1ccaf;
    --lesson-lab-profile-text: #a79f83;
    --lesson-lab-meta-text: #a79f83;
    --lesson-lab-room-text: #d1ccaf;
    --lesson-lab-chip-surface: #443f2c;
    --lesson-lab-chip-border: #74663e;
    --lesson-lab-chip-text: #c1b47f;
    --lesson-exam-surface: #292224;
    --lesson-exam-border: #433136;
    --lesson-exam-accent: #9c6269;
    --lesson-exam-interaction: #ab6c73;
    --lesson-exam-ring: transparent;
    --lesson-exam-title-text: #d1bdc2;
    --lesson-exam-profile-text: #a68d94;
    --lesson-exam-meta-text: #a68d94;
    --lesson-exam-room-text: #d1bdc2;
    --lesson-exam-chip-surface: #463136;
    --lesson-exam-chip-border: #7a4d58;
    --lesson-exam-chip-text: #c99aa3;
    --lesson-consultation-surface: #1b2827;
    --lesson-consultation-border: #2f403e;
    --lesson-consultation-accent: #60958d;
    --lesson-consultation-interaction: #67a39a;
    --lesson-consultation-ring: transparent;
    --lesson-consultation-title-text: #c5d5d1;
    --lesson-consultation-profile-text: #96aca7;
    --lesson-consultation-meta-text: #96aca7;
    --lesson-consultation-room-text: #c5d5d1;
    --lesson-consultation-chip-surface: #2e4541;
    --lesson-consultation-chip-border: #4d7770;
    --lesson-consultation-chip-text: #a8c8c0;
    --lesson-other-surface: #26232d;
    --lesson-other-border: #3b3547;
    --lesson-other-accent: #8b75ae;
    --lesson-other-interaction: #9880c0;
    --lesson-other-ring: transparent;
    --lesson-other-title-text: #cbbfda;
    --lesson-other-profile-text: #a292b9;
    --lesson-other-meta-text: #a292b9;
    --lesson-other-room-text: #cbbfda;
    --lesson-other-chip-surface: #40364e;
    --lesson-other-chip-border: #695785;
    --lesson-other-chip-text: #b5a3cf;
    --grid-activity-change-text: var(--lesson-card-title-text);
    --grid-activity-changes-border-color: var(--lesson-card-border);
    --grid-activity-lesson-info-lesson-card-meta-text: var(--lesson-card-meta-text);
    --grid-activity-lesson-title-lesson-card-title-text: var(--lesson-card-title-text);
    --grid-activity-meta-text: var(--lesson-card-meta-text);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-accent: var(--lesson-lecture-accent);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-bg: var(--lesson-lecture-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-lecture-lesson-bg-hover: var(--lesson-lecture-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-accent: var(--lesson-practice-accent);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-bg: var(--lesson-practice-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-practice-lesson-bg-hover: var(--lesson-practice-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-accent: var(--lesson-lab-accent);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-bg: var(--lesson-lab-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-credit-grid-activity-ite-lesson-bg-hover: var(--lesson-lab-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-accent: var(--lesson-exam-accent);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-bg: var(--lesson-exam-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-exam-lesson-bg-hover: var(--lesson-exam-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-accent: var(--lesson-consultation-accent);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-bg: var(--lesson-consultation-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-consultation-lesson-bg-hover: var(--lesson-consultation-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-accent: var(--lesson-other-accent);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-bg: var(--lesson-other-surface);
    --features-grid-activity-item-grid-activity-lesson-card-lesson-card-lesson-other-lesson-bg-hover: var(--lesson-other-surface);
    --coverage-summary-indicator: #777777;
    --inline-link-border: #666666;
    --inline-link-hover-border: #a1a1a1;
    --directory-option-outline: #888888;
    --tour-description-text: #9b9b9b;
    --getting-started-next-border: #4a4a4a;
    --status-high-surface: #707070;
    --grid-lock-border: #858585;
    --aggregate-timeline-column-guides: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent calc(var(--grid-group-width, 176px) - 1px),
        #2a2a2a calc(var(--grid-group-width, 176px) - 1px),
        #2a2a2a var(--grid-group-width, 176px)
    );
    --aggregate-timeline-grid-guides:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent calc(var(--grid-group-width, 176px) - 1px),
            #2a2a2a calc(var(--grid-group-width, 176px) - 1px),
            #2a2a2a var(--grid-group-width, 176px)
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(var(--aggregate-timeline-guide-size) - 1px),
            #242424 calc(var(--aggregate-timeline-guide-size) - 1px),
            #242424 var(--aggregate-timeline-guide-size)
        );
    --aggregate-timeline-rail-background: var(--color-surface);
    --all-schedule-neutral-accent: #707070;
    --grid-rail-sticky-surface: var(--color-canvas);
    --grid-non-study-row-surface: var(--color-surface-strong);
    --grid-non-study-row-hover-surface: var(--color-surface-muted-strong);
    --grid-plan-drop-blocked-state-surface: var(--grid-drop-blocked-surface);
    --grid-plan-drop-allowed-state-surface: var(--color-surface-muted-strong);
    --grid-plan-drop-hover-state-surface: var(--color-surface-strong);
    --grid-entry-drag-state-surface: var(--grid-drop-blocked-surface);
    --grid-entry-drop-safe-state-surface: var(--color-surface-muted-strong);
    --grid-entry-drop-risk-state-surface: var(--grid-drop-blocked-surface);
    --grid-entry-drop-warning-state-surface: var(--grid-drop-blocked-surface);
    --grid-entry-drop-current-state-surface: var(--color-surface-muted-strong);
    --grid-entry-drop-safe-hover-surface: var(--color-surface-strong);
    --grid-entry-drop-risk-hover-surface: var(--color-surface-strong);
    --grid-entry-drop-warning-hover-surface: var(--color-surface-strong);
    --grid-editor-problem-border: #6f323b;
    --control-focus-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
    --profile-remove-border: #3d3d3d;
    --profile-remove-hover-surface: #2c2c2c;
    --profile-remove-hover-border: #505050;
    --grid-xlsx-draft-card-text: var(--color-text-strong);
    --grid-xlsx-draft-debug-item-border: var(--color-border-strong);
    --grid-xlsx-draft-debug-item-is-error-border: var(--color-danger-border);
    --grid-xlsx-draft-debug-item-is-error-surface: var(--color-danger-surface);
    --grid-xlsx-draft-debug-item-is-success-border: var(--color-success-border);
    --grid-xlsx-draft-debug-item-is-success-surface: var(--color-success-surface);
    --grid-xlsx-draft-debug-item-is-warning-border: var(--problem-warning-border);
    --grid-xlsx-draft-debug-item-is-warning-surface: var(--problem-warning-surface);
    --grid-xlsx-draft-debug-item-text: var(--color-text-strong);
    --grid-xlsx-draft-debug-item-text-variant-2: var(--color-text-secondary);
    --grid-xlsx-draft-debug-text: var(--color-text-secondary);
    --grid-xlsx-draft-field-border: var(--color-editor-control-border);
    --grid-xlsx-draft-field-border-variant-2: var(--color-editor-control-border);
    --grid-xlsx-draft-field-surface: var(--color-editor-control-surface);
    --grid-xlsx-draft-field-text: var(--color-editor-control-text-muted);
    --grid-xlsx-draft-field-text-variant-2: var(--color-editor-control-text);
    --grid-xlsx-draft-field-text-variant-3: var(--color-editor-control-text);
    --grid-xlsx-draft-message-border: var(--color-border);
    --grid-xlsx-draft-message-is-error-border: var(--color-danger-border);
    --grid-xlsx-draft-message-is-error-text: var(--color-danger-text);
    --grid-xlsx-draft-message-is-ok-border: var(--color-success-border);
    --grid-xlsx-draft-message-is-ok-surface: var(--color-success-surface);
    --grid-xlsx-draft-message-is-ok-text: var(--color-success-text);
    --grid-xlsx-draft-message-is-warning-border: var(--problem-warning-border);
    --grid-xlsx-draft-message-is-warning-text: var(--problem-warning-color);
    --grid-xlsx-draft-message-surface: var(--color-surface-status);
    --grid-xlsx-draft-message-text: var(--color-text-secondary);
    --grid-xlsx-draft-open-is-commercial-locked-border: var(--color-border);
    --grid-xlsx-draft-open-is-commercial-locked-text: var(--color-text-disabled);
    --grid-xlsx-draft-panel-icon-btn-text: var(--color-text-secondary);
    --grid-xlsx-draft-panel-slot-editor-head-text: var(--color-text-emphasis);
    --grid-xlsx-draft-stats-border: var(--color-border);
    --grid-xlsx-draft-stats-text: var(--color-text-strong);
    --grid-xlsx-draft-stats-text-variant-2: var(--color-text-secondary);
    --grid-xlsx-draft-unplaced-border: var(--color-danger-border);
    --grid-xlsx-draft-unplaced-head-text: var(--color-danger-text);
    --grid-xlsx-draft-unplaced-head-text-variant-2: var(--color-danger-text);
    --grid-xlsx-draft-unplaced-head-text-variant-3: var(--color-danger-text);
    --grid-xlsx-draft-unplaced-meta-text: var(--color-text-secondary);
    --grid-xlsx-draft-unplaced-more-text: var(--color-danger-text);
    --grid-xlsx-draft-unplaced-reasons-border: var(--color-danger-border);
    --grid-xlsx-draft-unplaced-reasons-surface: var(--color-danger-surface);
    --grid-xlsx-draft-unplaced-reasons-text: var(--color-danger-text);
    --grid-xlsx-draft-unplaced-row-border: var(--color-danger-border);
    --grid-xlsx-draft-unplaced-row-border-variant-2: var(--color-danger-border);
    --grid-xlsx-draft-unplaced-surface: var(--color-danger-surface);
    --grid-xlsx-draft-unplaced-title-text: var(--color-text-strong);
    --ai-accent-gradient: linear-gradient(112deg, #ff4f9f 0%, #ff75b6 54%, #e95ce1 100%);
    --ai-accent-border-gradient: linear-gradient(112deg, #ff4f9f 0%, #ff75b6 32%, #e95ce1 56%, #ff75b6 78%, #ff4f9f 100%);
    --ai-action-text: #ff75b6;
    --ai-action-on-accent-text: var(--color-text-brightest);
    --ai-action-background:
        linear-gradient(#1b1b1c, #1b1b1c) padding-box,
        var(--ai-accent-border-gradient) border-box;
    --ai-action-hover-overlay-opacity: .18;
    --ai-action-loading-overlay-opacity: .24;
    --ai-result-field-background:
        linear-gradient(#23171e, #23171e) padding-box,
        linear-gradient(112deg, #86385f 0%, #d36398 32%, #9a4676 56%, #d36398 78%, #86385f 100%) border-box;
    --ai-result-focus-ring: 0 0 0 2px rgba(240, 138, 189, .16);
    --ai-result-save-background:
        linear-gradient(112deg, #8d365f 0%, #a94c78 54%, #783e78 100%) padding-box,
        linear-gradient(112deg, #a54874 0%, #d36398 32%, #a44d83 56%, #d36398 78%, #a54874 100%) border-box;
    --ai-result-text: #f08abd;
    --study-plan-mapping-text: #b2b2b2;
    --study-plan-mapping-hover-text: #e0e0e0;
    --schedule-create-section-surface: #181818;
    --schedule-create-label-text: #9c9c9c;
    --schedule-create-text: #dedede;
    --schedule-create-meta-text: #929292;
    --schedule-create-focus-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
    --nav-scrollbar-hidden: transparent transparent;
    --nav-scrollbar-hover: rgba(255, 255, 255, 0.25) transparent;
    --nav-scrollbar-thumb-hover: rgba(255, 255, 255, 0.25);
    --nav-section-icon-filter: grayscale(1) brightness(0) invert(1);
    --nav-section-icon-opacity: 0.58;
    --getting-started-cta-surface: #ffe36b;
    --getting-started-cta-border: #3d3200;
    --getting-started-cta-hover-surface: #ffd84d;
    --getting-started-cta-hover-border: #2f2700;
    --getting-started-cta-hover-text: #2f2700;
    --getting-started-cta-icon-stroke: #3d3200;
    --getting-started-readiness-text: #e2e2e2;
    --getting-started-close-text: rgba(61, 50, 0, 0.72);
    --getting-started-close-hover-text: #2f2700;
    --getting-started-close-hover-surface: rgba(61, 50, 0, 0.1);
    --schedule-history-border: #252525;
    --schedule-create-divider: #737373;
    --schedule-create-hover-divider: #999999;
    --conflict-contrast-text: #180b0d;
    --schedule-rename-surface: transparent;
    --schedule-rename-border: transparent;
    --schedule-rename-text: #a8a8a8;
    --schedule-rename-shadow: none;
    --schedule-rename-hover-surface: #292929;
    --schedule-rename-hover-text: #e0e0e0;
    --ai-result-select-background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' fill='none' stroke='%23a1a1a1' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 18px center / 16px 16px no-repeat,
        #23171e;
    --ai-subscription-card-surface: radial-gradient(circle at 18% 12%, rgba(255, 117, 182, 0.1), transparent 34%), linear-gradient(132deg, #24171f 0%, #291822 52%, #201923 100%);
    --ai-subscription-card-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), 0 8px 24px rgba(255, 79, 159, 0.05);
    --ai-subscription-decoration-surface: rgba(255, 117, 182, 0.06);
    --ai-subscription-status-surface: rgba(255, 117, 182, 0.08);
    --ai-subscription-status-enabled-surface: rgba(255, 117, 182, 0.14);
    --ai-subscription-status-disabled-surface: rgba(255, 255, 255, 0.06);
    --ai-subscription-primary-text: #f8edf3;
    --ai-subscription-secondary-text: rgba(248, 237, 243, 0.82);
    --ai-subscription-label-text: rgba(248, 237, 243, 0.76);
    --ai-subscription-meta-text: rgba(248, 237, 243, 0.74);
    --ai-subscription-progress-track: rgba(255, 117, 182, 0.14);
    --ai-subscription-progress-fill: #f08abd;
    --ai-subscription-progress-shadow: 0 2px 14px rgba(240, 138, 189, 0.18);
    --ai-subscription-note-border-color: rgba(240, 138, 189, 0.2);
    --ai-subscription-note-surface: rgba(240, 138, 189, 0.07);
    --ai-subscription-note-text: rgba(248, 237, 243, 0.84);
    --grid-check-ok-surface: #888888;
    --grid-group-profile-text: #9a9a9a;
    --aggregate-timeline-text: #d7d7d7;
    --grid-time-cell-shadow: inset -1px 0 0 #2a2a2a, inset 1px 0 0 #2a2a2a;
    --coverage-scrollbar: #555555 #151515;
    --directory-panel-shadow: 0 0 5px rgba(0, 0, 0, 0.24);
    --directory-focus-shadow: inset 0 0 0 1px #555555, 0 0 0 3px rgba(255, 255, 255, 0.08);
    --directory-badge-surface: #2a2a2b;
    --directory-badge-border: #454545;
    --directory-badge-hover-surface: #353536;
    --directory-popover-border: #3f3f40;
    --directory-popover-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    --directory-popover-scrollbar: #555555 #1b1b1c;
    --lesson-card-hover-surface: #252526;
    --lesson-card-hover-border: #686868;
    --auth-screen-background: linear-gradient(135deg, #191919 0%, #0d0d0e 100%);
    --auth-backdrop-filter: blur(5px) grayscale(1) brightness(0.42);
    --auth-card-surface: rgba(19, 19, 20, 0.94);
    --auth-card-border: #373737;
    --disabled-state-surface: #202020;
    --disabled-state-text: #8a8a8a;
    --selection-surface: #666666;
    --grid-drop-blocked-surface: #191919;
    --grid-drop-safe-shadow: inset 0 0 0 1px #666666;
    --grid-drop-hover-shadow: inset 0 0 0 2px #8a8a8a;
    --focus-outline-color: #777777;
    --floating-surface-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
    --status-badge-border: #494949;
    --grid-cell-divider-shadow: inset 0 1px 0 #2a2a2a, inset 0 -1px 0 #2a2a2a;
    --grid-row-divider-shadow: inset 0 1px 0 #303030;
    --grid-frame-outline-color: #303030;
    --grid-interaction-outline-color: #8a8a8a;
    --grid-interaction-active-shadow: none;
    --grid-interaction-border: #8a8a8a;
    --grid-frame-corner-border: transparent #2a2a2a #242424 transparent;
    --grid-frame-head-shadow: inset 0 1px 0 #303030, inset 0 -1px 0 #2a2a2a;
    --grid-frame-corner-shadow: inset 1px 0 0 #303030, inset 0 1px 0 #303030, inset -1px 0 0 #2a2a2a, inset 0 -1px 0 #2a2a2a;
    --grid-frame-time-shadow: inset -1px 0 0 #2a2a2a, inset 1px 0 0 #303030;
    --getting-started-attention-surface: #4a371d;
    --getting-started-attention-border: #8c6a2e;
    --getting-started-attention-text: #f4c978;
    --getting-started-todo-surface: #432222;
    --getting-started-todo-border: #8e4a45;
    --getting-started-todo-text: #ffaaa3;
    --directory-editor-surface: #151515;
    --directory-editor-border: #303030;
    --directory-editor-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    --status-info-surface: #242424;
    --status-info-border: #4a4a4a;
    --status-info-text: #d0d0d0;
    --empty-state-surface: var(--color-surface-subtle);
    --empty-state-border: var(--color-border);
    --empty-state-text: var(--color-text-secondary);
    --calendar-surface: var(--color-surface-elevated);
    --calendar-surface-subtle: var(--color-surface-subtle);
    --calendar-header-surface: var(--color-surface-subtle);
    --calendar-border: var(--color-border);
    --calendar-month-border: var(--color-border);
    --calendar-header-border: var(--color-border-soft);
    --calendar-text-strong: var(--color-text-strong);
    --calendar-text: var(--color-text-secondary);
    --calendar-day-secondary-text: #b5b5b5;
    --calendar-hover-surface: #242424;
    --calendar-warning-surface: #262626;
    --calendar-ok-surface: #222222;
    --calendar-system-surface: #202833;
    --calendar-system-hover-surface: #283343;
    --calendar-system-border: #455f82;
    --calendar-system-text: #b5c9e5;
    --calendar-heat-surface-low: #242424;
    --calendar-heat-surface-high: #505050;
    --calendar-heat-border-low: #3c3c3c;
    --calendar-heat-border-high: #707070;
    --calendar-heat-text-low: #b5b5b5;
    --calendar-heat-text-high: #efefef;
    --calendar-hard-fill: rgba(96, 96, 96, 0.42);
    --calendar-soft-fill: rgba(80, 80, 80, 0.42);
    --calendar-lesson-fill-1: rgba(72, 72, 72, 0.34);
    --calendar-lesson-fill-2: rgba(88, 88, 88, 0.42);
    --calendar-lesson-fill-3: rgba(104, 104, 104, 0.48);
    --calendar-lesson-fill-4: rgba(120, 120, 120, 0.54);
    --calendar-published-surface: #242424;
    --calendar-published-border: #4a4a4a;
    --calendar-published-text: #c0c0c0;
    --calendar-published-surface-1: #282828;
    --calendar-published-surface-2: #303030;
    --calendar-published-surface-3: #3a3a3a;
    --calendar-published-surface-4: #464646;
    --calendar-published-border-2: #565656;
    --calendar-published-border-3: #666666;
    --calendar-published-border-4: #777777;
    --calendar-published-text-strong: #f0f0f0;
    --calendar-count-surface: var(--status-neutral-surface);
    --calendar-count-text: var(--status-neutral-text);
    --calendar-weekend-surface: #2a261d;
    --calendar-weekend-hover-surface: #342f23;
    --calendar-weekend-border: #745f35;
    --calendar-weekend-text: #e8c77f;
    --calendar-holiday-surface: #2b2024;
    --calendar-holiday-hover-surface: #35262b;
    --calendar-holiday-border: #7d4851;
    --calendar-holiday-text: #f1b8c0;
    --calendar-non-study-surface: #1d2a2b;
    --calendar-non-study-hover-surface: #253536;
    --calendar-non-study-border: #416e6d;
    --calendar-non-study-text: #a7d8d5;
    --calendar-risk-warning-border: #5a5a5a;
    --calendar-risk-info-border: #5a5a5a;
    --calendar-risk-ok-border: #5a5a5a;
    --calendar-risk-muted-border: #4a4a4a;
    --weekday-label-surface: #3a3a3a;
    --weekday-label-text: #ededed;
    --progress-track: #3b3b3b;
    --progress-fill: #a1a1a1;
    --progress-fill-info: #a1a1a1;
    --progress-fill-upload: #a1a1a1;
    --progress-fill-muted: #777777;
    --getting-started-progress-center: transparent;
    --getting-started-progress-fill: #56c878;
    --getting-started-progress-track: #343437;
    /* Dark mappings for the shared semantic profile palette. */
    --profile-color-1-surface: #3a3149;
    --profile-color-1-text: #d6c8e8;
    --profile-color-1-dot: #9d83bd;
    --profile-color-1-directory-dot: #9d83bd;
    --profile-color-2-surface: #2d4136;
    --profile-color-2-text: #c3dfca;
    --profile-color-2-dot: #75aa86;
    --profile-color-2-directory-dot: #75aa86;
    --profile-color-3-surface: #303d51;
    --profile-color-3-text: #c7d5eb;
    --profile-color-3-dot: #7c9fc9;
    --profile-color-3-directory-dot: #7c9fc9;
    --profile-color-4-surface: #46352c;
    --profile-color-4-text: #e5cbbd;
    --profile-color-4-dot: #b98b6c;
    --profile-color-4-directory-dot: #b98b6c;
    --profile-color-5-surface: #2d4246;
    --profile-color-5-text: #c1dcdf;
    --profile-color-5-dot: #75a7ae;
    --profile-color-5-directory-dot: #75a7ae;
    --profile-color-6-surface: #47313e;
    --profile-color-6-text: #e2c4d4;
    --profile-color-6-dot: #b27798;
    --profile-color-6-directory-dot: #b27798;
    --profile-color-7-surface: #2e423d;
    --profile-color-7-text: #c2ded2;
    --profile-color-7-dot: #78aa99;
    --profile-color-7-directory-dot: #78aa99;
    --profile-color-8-surface: #463a29;
    --profile-color-8-text: #e4d1a4;
    --profile-color-8-dot: #b69a5a;
    --profile-color-8-directory-dot: #b69a5a;
    --profile-color-9-surface: #2e414d;
    --profile-color-9-text: #c2dae6;
    --profile-color-9-dot: #78a8bf;
    --profile-color-9-directory-dot: #78a8bf;
    --profile-color-10-surface: #3b3450;
    --profile-color-10-text: #cec5e8;
    --profile-color-10-dot: #9b86bd;
    --profile-color-10-directory-dot: #9b86bd;
    --profile-color-11-surface: #3d472d;
    --profile-color-11-text: #d0dfa9;
    --profile-color-11-dot: #9aab60;
    --profile-color-11-directory-dot: #9aab60;
    --profile-color-12-surface: #47332f;
    --profile-color-12-text: #e3c3bb;
    --profile-color-12-dot: #b77b6d;
    --profile-color-12-directory-dot: #b77b6d;
    --profile-color-13-surface: #304052;
    --profile-color-13-text: #c3d6e8;
    --profile-color-13-dot: #7e9fbe;
    --profile-color-13-directory-dot: #7e9fbe;
    --profile-color-14-surface: #2e423c;
    --profile-color-14-text: #c1d9cf;
    --profile-color-14-dot: #76a899;
    --profile-color-14-directory-dot: #76a899;
    --profile-color-15-surface: #463728;
    --profile-color-15-text: #e3cca9;
    --profile-color-15-dot: #b48c5b;
    --profile-color-15-directory-dot: #b48c5b;
    --profile-color-16-surface: #353b50;
    --profile-color-16-text: #c7d0e7;
    --profile-color-16-dot: #8395bf;
    --profile-color-16-directory-dot: #8395bf;
    --profile-color-17-surface: #453344;
    --profile-color-17-text: #e0c3d5;
    --profile-color-17-dot: #ad789b;
    --profile-color-17-directory-dot: #ad789b;
    --profile-color-18-surface: #30444a;
    --profile-color-18-text: #c2dde0;
    --profile-color-18-dot: #77a6ae;
    --profile-color-18-directory-dot: #77a6ae;
    --profile-color-19-surface: #463a2d;
    --profile-color-19-text: #e2cfb3;
    --profile-color-19-dot: #b09162;
    --profile-color-19-directory-dot: #b09162;
    --profile-color-20-surface: #3b3550;
    --profile-color-20-text: #d0c7e8;
    --profile-color-20-dot: #9a8bc2;
    --profile-color-20-directory-dot: #9a8bc2;
    --profile-color-21-surface: #2f4234;
    --profile-color-21-text: #c5dec7;
    --profile-color-21-dot: #79a689;
    --profile-color-21-directory-dot: #79a689;
    --profile-color-22-surface: #453333;
    --profile-color-22-text: #e2c2c2;
    --profile-color-22-dot: #b67a7b;
    --profile-color-22-directory-dot: #b67a7b;
    --profile-color-23-surface: #41354b;
    --profile-color-23-text: #d2c6e1;
    --profile-color-23-dot: #9d82b3;
    --profile-color-23-directory-dot: #9d82b3;
    --profile-color-24-surface: #304148;
    --profile-color-24-text: #c1dade;
    --profile-color-24-dot: #78a5af;
    --profile-color-24-directory-dot: #78a5af;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.32), 0 8px 24px rgba(0, 0, 0, 0.16);
}

html[data-ui-theme="dark"] body,
html[data-ui-theme="dark"] .app-shell,
html[data-ui-theme="dark"] .app-main,
html[data-ui-theme="dark"] .auth-page {
    background: var(--color-canvas);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .page-head p,
html[data-ui-theme="dark"] .admin-organizations-result-summary,
html[data-ui-theme="dark"] .admin-organizations-pagination-summary,
html[data-ui-theme="dark"] .admin-organizations-page-size,
html[data-ui-theme="dark"] .admin-organizations-page-indicator,
html[data-ui-theme="dark"] .schedules-row-meta,
html[data-ui-theme="dark"] .schedules-row-meta *,
html[data-ui-theme="dark"] .admin-organization-data-grid,
html[data-ui-theme="dark"] .admin-organization-data-grid *,
html[data-ui-theme="dark"] .admin-organization-meter *,
html[data-ui-theme="dark"] .nav-section-title,
html[data-ui-theme="dark"] .nav-section-chevron {
    color: var(--color-text-secondary);
}

/* Strong text remains a clear typographic emphasis above muted copy. */
html[data-ui-theme="dark"] .schedules-row-meta strong,
html[data-ui-theme="dark"] .admin-organization-data-grid strong,
html[data-ui-theme="dark"] .admin-organization-meter strong {
    color: var(--color-text-strong);
}

html[data-ui-theme="dark"] .app-sidebar {
    background: var(--sidebar-surface);
    background-image: none;
    border-right-color: var(--sidebar-border);
    box-shadow: none;
}

html[data-ui-theme="dark"] .nav-icon-image,
html[data-ui-theme="dark"] .nav-section-icon,
html[data-ui-theme="dark"] .sidebar-user-avatar {
    filter: var(--sidebar-avatar-filter);
}

html[data-ui-theme="dark"] .nav-icon-image,
html[data-ui-theme="dark"] .nav-section-icon {
    filter: var(--sidebar-navigation-icon-filter);
}

html[data-ui-theme="dark"] .nav-link,
html[data-ui-theme="dark"] .nav-section-title,
html[data-ui-theme="dark"] .nav-toggle,
html[data-ui-theme="dark"] .sidebar-user-summary,
html[data-ui-theme="dark"] .sidebar-user-menu-item {
    color: var(--color-text-navigation);
}

html[data-ui-theme="dark"] .nav-link:hover,
html[data-ui-theme="dark"] .nav-link.is-active,
html[data-ui-theme="dark"] .nav-toggle:hover,
html[data-ui-theme="dark"] .sidebar-user-menu-item:hover {
    background: var(--sidebar-navigation-hover-surface);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .nav-link.is-active::before {
    background: transparent;
}

html[data-ui-theme="dark"] .nav-link:not(.is-active):not(.nav-link-start),
html[data-ui-theme="dark"] .nav-start-cta .nav-link {
    border-left-color: transparent;
}

/* Transparent in the light theme must stay transparent in the dark theme. */
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .lesson-card,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-card,
html[data-ui-theme="dark"] .sidebar-user-menu-item,
html[data-ui-theme="dark"] .grid-plan-coverage-tool,
html[data-ui-theme="dark"] .grid-sheet-footer-tool,
html[data-ui-theme="dark"] .grid-plan-coverage-filters,
html[data-ui-theme="dark"] .grid-plan-coverage-status-filters {
    background: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
}

html[data-ui-theme="dark"] .sidebar-user-menu-item:hover,
html[data-ui-theme="dark"] .grid-plan-coverage-tool:hover,
html[data-ui-theme="dark"] .grid-plan-coverage-tool:focus-visible,
html[data-ui-theme="dark"] .grid-plan-coverage-tool.is-active,
html[data-ui-theme="dark"] .grid-sheet-footer-tool:hover,
html[data-ui-theme="dark"] .grid-sheet-footer-tool:focus-visible {
    background: var(--color-surface-hover);
    border-color: var(--color-border-emphasis);
}

html[data-ui-theme="dark"] .nav-link.is-active {
    border-left-color: var(--sidebar-navigation-marker);
}

html[data-ui-theme="dark"] .nav-start-cta .nav-link::before {
    background: transparent;
}

html[data-ui-theme="dark"] .nav-icon-svg,
html[data-ui-theme="dark"] .nav-section-chevron {
    stroke: var(--sidebar-navigation-icon);
}

html[data-ui-theme="dark"] .nav-indicator:not(.nav-indicator-attention) {
    background: var(--sidebar-indicator-surface);
    color: var(--sidebar-indicator-text);
}

html[data-ui-theme="dark"] .sidebar-user-avatar {
    background: var(--sidebar-avatar-surface);
    color: var(--color-text-on-light);
}

html[data-ui-theme="dark"] .sidebar-user-menu-icon,
html[data-ui-theme="dark"] .sidebar-user-menu-icon .nav-icon-svg {
    color: var(--sidebar-menu-icon);
    stroke: var(--sidebar-menu-icon);
}

html[data-ui-theme="dark"] .schedules-table-panel,
html[data-ui-theme="dark"] .schedules-toolbar-panel,
html[data-ui-theme="dark"] .grid-topbar,
html[data-ui-theme="dark"] .grid-context-strip,
html[data-ui-theme="dark"] .grid-command-panel,
html[data-ui-theme="dark"] .grid-statusbar,
html[data-ui-theme="dark"] .grid-sheet {
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: var(--shadow);
}

html[data-ui-theme="dark"] .btn:not(.ai-action-btn),
html[data-ui-theme="dark"] .grid-toolbar-button,
html[data-ui-theme="dark"] .grid-icon-action {
    border-color: var(--color-control-border);
    background: var(--color-surface-elevated);
    color: var(--color-text-strong);
}

/* Shared button hierarchy: filled actions are the visual peak, while ghost
 * and secondary controls recede into the dark workspace. The selector keeps
 * danger, icon-only and component-specific controls on their own contracts. */
html[data-ui-theme="dark"] .btn:not(.ghost):not(.btn-secondary):not(.btn-light):not(.danger):not(.icon-btn):not(.ai-action-btn),
html[data-ui-theme="dark"] .btn.btn-primary,
html[data-ui-theme="dark"] .btn.primary {
    border-color: var(--color-action-primary-border);
    background: var(--color-action-primary-bg);
    box-shadow: var(--shadow-inset-soft);
    color: var(--color-action-primary-text);
}

html[data-ui-theme="dark"] .btn.ghost,
html[data-ui-theme="dark"] .btn.btn-secondary,
html[data-ui-theme="dark"] .btn.btn-light {
    border-color: var(--color-action-secondary-border);
    background: var(--color-action-secondary-bg);
    box-shadow: none;
    color: var(--color-action-secondary-text);
}

html[data-ui-theme="dark"] .btn:not(.ai-action-btn):hover,
html[data-ui-theme="dark"] .grid-toolbar-button:hover,
html[data-ui-theme="dark"] .grid-icon-action:hover {
    border-color: var(--color-border-focus);
    background: var(--color-action-hover-bg);
}

html[data-ui-theme="dark"] .btn-primary,
html[data-ui-theme="dark"] .btn.primary,
html[data-ui-theme="dark"] .grid-primary-action,
html[data-ui-theme="dark"] .auth-submit.btn,
html[data-ui-theme="dark"] .driver-popover.ais-tour-popover .driver-popover-footer button:not(.driver-popover-prev-btn) {
    border-color: var(--color-border-highlight);
    background: var(--color-action-primary-bg);
    box-shadow: var(--shadow-inset-soft);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .btn-primary:hover,
html[data-ui-theme="dark"] .btn.primary:hover,
html[data-ui-theme="dark"] .grid-primary-action:hover,
html[data-ui-theme="dark"] .auth-submit.btn:hover,
html[data-ui-theme="dark"] .driver-popover.ais-tour-popover .driver-popover-footer button:not(.driver-popover-prev-btn):hover {
    border-color: var(--color-border-inverse);
    background: var(--color-action-primary-hover-bg);
    box-shadow: var(--shadow-inset-strong);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .btn:not(.ghost):not(.btn-secondary):not(.btn-light):not(.danger):not(.icon-btn):not(.ai-action-btn):hover,
html[data-ui-theme="dark"] .btn:not(.ghost):not(.btn-secondary):not(.btn-light):not(.danger):not(.icon-btn):not(.ai-action-btn):focus-visible {
    border-color: var(--color-border-inverse);
    background: var(--color-action-primary-hover-bg);
    box-shadow: var(--shadow-inset-strong);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .btn.ghost:hover,
html[data-ui-theme="dark"] .btn.ghost:focus-visible,
html[data-ui-theme="dark"] .btn.btn-secondary:hover,
html[data-ui-theme="dark"] .btn.btn-secondary:focus-visible,
html[data-ui-theme="dark"] .btn.btn-light:hover,
html[data-ui-theme="dark"] .btn.btn-light:focus-visible {
    border-color: var(--color-control-border);
    background: var(--color-surface-deep);
    box-shadow: none;
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .schedules-search,
html[data-ui-theme="dark"] .directory-combobox {
    background: var(--color-surface);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .impersonation-banner {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .impersonation-banner strong,
html[data-ui-theme="dark"] .impersonation-banner button {
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .schedules-quick-filter {
    background: var(--color-surface-subtle);
    border-color: var(--color-border);
    color: var(--color-text-navigation);
}

html[data-ui-theme="dark"] .schedules-quick-filter b {
    background: var(--color-surface-active);
    color: var(--color-text-bright);
}

html[data-ui-theme="dark"] .admin-organization-data-grid b,
html[data-ui-theme="dark"] .admin-organization-meter,
html[data-ui-theme="dark"] .admin-organization-meter > span {
    color: var(--color-text-neutral);
}

html[data-ui-theme="dark"] .grid-cell,
html[data-ui-theme="dark"] .grid-time-cell,
html[data-ui-theme="dark"] .grid-corner-cell {
    border-color: var(--grid-line-strong);
}

html[data-ui-theme="dark"] .grid-top-legend,
html[data-ui-theme="dark"] .grid-top-legend > span:not(.grid-indicator-sample),
html[data-ui-theme="dark"] .grid-group-name,
html[data-ui-theme="dark"] .grid-group-name span,
html[data-ui-theme="dark"] .grid-time-label,
html[data-ui-theme="dark"] .grid-pair-marker,
html[data-ui-theme="dark"] .grid-top-legend .comment-icon {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .lesson-dot,
html[data-ui-theme="dark"] .lesson-dot.lesson-lecture,
html[data-ui-theme="dark"] .lesson-dot.lesson-practice,
html[data-ui-theme="dark"] .lesson-dot.lesson-credit,
html[data-ui-theme="dark"] .lesson-dot.lesson-exam,
html[data-ui-theme="dark"] .lesson-dot.lesson-consultation {
    background: var(--lesson-neutral-accent);
}

html[data-ui-theme="dark"] .grid-check-count.is-ok,
html[data-ui-theme="dark"] .grid-indicator-sample,
html[data-ui-theme="dark"] .grid-indicator-sample.comment,
html[data-ui-theme="dark"] .grid-indicator-sample.conflict {
    background: var(--color-surface-emphasis);
    color: var(--color-text-bright);
}

html[data-ui-theme="dark"] .grid-check-count.is-ok {
    background: var(--grid-check-ok-surface);
    color: var(--color-text-on-light);
}

html[data-ui-theme="dark"] .grid-group-profiles {
    color: var(--grid-group-profile-text);
}

html[data-ui-theme="dark"] .aggregate-grid-filters,
html[data-ui-theme="dark"] .aggregate-grid-filter-group,
html[data-ui-theme="dark"] .aggregate-grid-filter-group label,
html[data-ui-theme="dark"] .grid-sheet-tabs-bar {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-sheet-tabs-bar {
    background: var(--color-surface-subtle);
    border-color: var(--color-border);
}

html[data-ui-theme="dark"] #group-grid .aggregate-timeline-rail {
    background: var(--color-surface);
    background-image: none;
    color: var(--aggregate-timeline-text);
}

html[data-ui-theme="dark"] .sidebar-user-menu,
html[data-ui-theme="dark"] .grid-plan-coverage-side,
html[data-ui-theme="dark"] .grid-plan-coverage-panel,
html[data-ui-theme="dark"] .grid-plan-coverage-controls,
html[data-ui-theme="dark"] .grid-plan-coverage-result,
html[data-ui-theme="dark"] .grid-plan-coverage-group,
html[data-ui-theme="dark"] .schedules-detail-panel {
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: var(--shadow);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .grid-plan-coverage-side input,
html[data-ui-theme="dark"] .grid-plan-coverage-side select,
html[data-ui-theme="dark"] .grid-plan-coverage-side textarea {
    background: var(--color-control-bg);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .grid-cell {
    background: var(--color-surface);
    color: var(--color-text-high);
    border-color: var(--grid-line-strong);
}

html[data-ui-theme="dark"] .grid-time-cell {
    box-shadow: var(--grid-time-cell-shadow);
}

html[data-ui-theme="dark"] .grid-empty-slot,
html[data-ui-theme="dark"] .grid-empty-cell,
html[data-ui-theme="dark"] .grid-day-block,
html[data-ui-theme="dark"] .grid-day-end {
    background: var(--color-surface);
}

html[data-ui-theme="dark"] .grid-meta-cell,
html[data-ui-theme="dark"] .grid-time-cell,
html[data-ui-theme="dark"] .grid-sheet-footer-tools {
    background: var(--color-surface-subtle);
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-plan-coverage-scroll {
    background: transparent;
    scrollbar-color: var(--coverage-scrollbar);
}

html[data-ui-theme="dark"] .grid-plan-coverage-head,
html[data-ui-theme="dark"] .grid-plan-coverage-side,
html[data-ui-theme="dark"] .grid-plan-coverage-controls,
html[data-ui-theme="dark"] .grid-plan-coverage-summary,
html[data-ui-theme="dark"] .grid-plan-coverage-empty,
html[data-ui-theme="dark"] .grid-plan-coverage-group-section,
html[data-ui-theme="dark"] .grid-plan-coverage-discipline-section,
html[data-ui-theme="dark"] .grid-plan-coverage-result-variant {
    background: var(--color-surface);
}

html[data-ui-theme="dark"] .grid-plan-coverage-summary,
html[data-ui-theme="dark"] .grid-plan-coverage-discipline-head,
html[data-ui-theme="dark"] .grid-plan-coverage-group-head,
html[data-ui-theme="dark"] .grid-plan-coverage-result-variant-head,
html[data-ui-theme="dark"] .grid-plan-coverage-hidden-head {
    background: var(--color-surface-subtle);
}

html[data-ui-theme="dark"] .grid-plan-coverage-view > div,
html[data-ui-theme="dark"] .grid-plan-coverage-status-filters,
html[data-ui-theme="dark"] .grid-plan-coverage-filters {
    background: var(--color-surface-subtle);
}

html[data-ui-theme="dark"] .grid-plan-coverage-result-variant-head,
html[data-ui-theme="dark"] .grid-plan-coverage-discipline-head,
html[data-ui-theme="dark"] .grid-plan-coverage-group-head {
    background: var(--color-surface-subtle);
}

html[data-ui-theme="dark"] .grid-plan-coverage-subject-result,
html[data-ui-theme="dark"] .grid-plan-coverage-result-workload,
html[data-ui-theme="dark"] .grid-plan-coverage-workload,
html[data-ui-theme="dark"] .grid-plan-coverage-type {
    background: var(--color-surface-status);
}

html[data-ui-theme="dark"] .grid-plan-coverage-view button.is-active,
html[data-ui-theme="dark"] .grid-plan-coverage-filters button.is-active,
html[data-ui-theme="dark"] .grid-plan-coverage-result-workload.is-selected {
    background: var(--color-surface-active-emphasis);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .grid-plan-coverage-filters button,
html[data-ui-theme="dark"] .grid-plan-coverage-view button {
    background: transparent;
    border-color: var(--color-control-border);
    color: var(--color-text-quieter);
}

html[data-ui-theme="dark"] .grid-plan-coverage-filters button:hover,
html[data-ui-theme="dark"] .grid-plan-coverage-filters button:focus-visible,
html[data-ui-theme="dark"] .grid-plan-coverage-view button:hover,
html[data-ui-theme="dark"] .grid-plan-coverage-view button:focus-visible {
    background: var(--color-surface-hover);
    border-color: var(--color-border-emphasis);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .grid-plan-coverage-message.is-warning,
html[data-ui-theme="dark"] .grid-plan-coverage-message.is-error,
html[data-ui-theme="dark"] .grid-plan-coverage-empty.is-success,
html[data-ui-theme="dark"] .grid-plan-coverage-result-workload.is-shortage,
html[data-ui-theme="dark"] .grid-plan-coverage-result-workload.is-error,
html[data-ui-theme="dark"] .grid-plan-coverage-result-workload.is-complete,
html[data-ui-theme="dark"] .grid-plan-coverage-result-workload.is-overage,
html[data-ui-theme="dark"] .grid-plan-coverage-result-workload.is-unplanned {
    background: var(--color-surface-status);
    border-color: var(--color-border-emphasis);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .grid-plan-coverage-summary-state > i,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-state.is-ready > i,
html[data-ui-theme="dark"] .grid-plan-coverage-type {
    background: var(--coverage-summary-indicator);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .grid-plan-coverage-summary-state strong,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-state small,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-values strong,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-values small,
html[data-ui-theme="dark"] .grid-plan-coverage-discipline-name strong,
html[data-ui-theme="dark"] .grid-plan-coverage-discipline-result strong,
html[data-ui-theme="dark"] .grid-plan-coverage-group-name strong,
html[data-ui-theme="dark"] .grid-plan-coverage-group-name small,
html[data-ui-theme="dark"] .grid-plan-coverage-item-title strong,
html[data-ui-theme="dark"] .grid-plan-coverage-item-title small,
html[data-ui-theme="dark"] .grid-plan-coverage-result-variant-scope strong,
html[data-ui-theme="dark"] .grid-plan-coverage-result-variant-scope small,
html[data-ui-theme="dark"] .grid-plan-coverage-field > span,
html[data-ui-theme="dark"] .grid-plan-coverage-hidden-head {
    color: var(--color-text-quieter);
}

html[data-ui-theme="dark"] .grid-plan-coverage-discipline-result.is-ready strong,
html[data-ui-theme="dark"] .grid-plan-coverage-discipline-result.is-error strong,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-values .is-shortage strong,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-values .is-overage strong,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-values .is-control strong,
html[data-ui-theme="dark"] .grid-plan-coverage-summary-values .is-unplanned strong {
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .all-schedule-v2-entry,
html[data-ui-theme="dark"] .all-schedule-v2-card,
html[data-ui-theme="dark"] .all-schedule-v2-card-primary,
html[data-ui-theme="dark"] .all-schedule-v2-card-secondary,
html[data-ui-theme="dark"] .all-schedule-v2-weeks,
html[data-ui-theme="dark"] .all-schedule-v2-week-fill {
    background: var(--color-surface-subtle);
    color: var(--color-text-bright);
}

html[data-ui-theme="dark"] .all-schedule-v2-week-number {
    color: var(--color-text-disabled);
}

html[data-ui-theme="dark"] .all-schedule-v2-week-number.is-active {
    color: var(--lesson-neutral-accent);
}

html[data-ui-theme="dark"] .directory-page-sections {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--color-border);
    box-shadow: none;
}

html[data-ui-theme="dark"] .directory-step-panel,
html[data-ui-theme="dark"] .groups-list-panel,
html[data-ui-theme="dark"] .directory-list-table-wrap,
html[data-ui-theme="dark"] .groups-editor-panel {
    box-shadow: var(--directory-panel-shadow);
}

html[data-ui-theme="dark"] .directory-import-note {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: transparent;
    color: var(--color-text-secondary);
    box-shadow: none;
}

html[data-ui-theme="dark"] .directory-note-icon {
    border-color: var(--color-control-focus-border);
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .directory-preview-wrap,
html[data-ui-theme="dark"] .directory-preview-table,
html[data-ui-theme="dark"] .directory-preview-table tbody,
html[data-ui-theme="dark"] .directory-preview-table tr,
html[data-ui-theme="dark"] .directory-preview-table td {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-text-high);
    box-shadow: none;
}

html[data-ui-theme="dark"] .directory-preview-table th {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .directory-preview-empty {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text-secondary);
}

/* Editable directory rows are text-first in the light theme.  Keep the
 * controls visually quiet until the row receives focus, then reveal the
 * grayscale editing surface. */
html[data-ui-theme="dark"] .directory-list-table .directory-name-cell input:not(.is-ai-suggested),
html[data-ui-theme="dark"] .directory-list-table .directory-code-input,
html[data-ui-theme="dark"] .directory-list-table .directory-row-select,
html[data-ui-theme="dark"] .simple-table td .directory-name-cell input:not(.is-ai-suggested),
html[data-ui-theme="dark"] .simple-table td .directory-code-input,
html[data-ui-theme="dark"] .simple-table td .directory-row-select {
    background: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .directory-list-table .directory-name-cell input:not(.is-ai-suggested):focus,
html[data-ui-theme="dark"] .directory-list-table .directory-code-input:focus,
html[data-ui-theme="dark"] .directory-list-table .directory-row-select:focus,
html[data-ui-theme="dark"] .directory-list-table tbody tr:focus-within .directory-name-cell input:not(.is-ai-suggested),
html[data-ui-theme="dark"] .directory-list-table tbody tr:focus-within .directory-code-input,
html[data-ui-theme="dark"] .directory-list-table tbody tr:focus-within .directory-row-select,
html[data-ui-theme="dark"] .directory-list-table tbody tr.is-dirty .directory-name-cell input:not(.is-ai-suggested),
html[data-ui-theme="dark"] .directory-list-table tbody tr.is-dirty .directory-code-input,
html[data-ui-theme="dark"] .directory-list-table tbody tr.is-dirty .directory-row-select,
html[data-ui-theme="dark"] .simple-table td .directory-name-cell input:not(.is-ai-suggested):focus,
html[data-ui-theme="dark"] .simple-table td .directory-code-input:focus,
html[data-ui-theme="dark"] .simple-table td .directory-row-select:focus {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-border-emphasis);
    box-shadow: var(--directory-focus-shadow);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .directory-profile-list-table input.is-duplicate-short-name,
html[data-ui-theme="dark"] .directory-subject-list-table input.is-duplicate-short-name,
html[data-ui-theme="dark"] .directory-profile-list-table input.is-ai-suggested.is-duplicate-short-name,
html[data-ui-theme="dark"] .directory-subject-list-table input.is-ai-suggested.is-duplicate-short-name {
    border-color: var(--color-border-focus);
    background: var(--color-surface-hover);
    background-image: none;
    color: var(--color-text-control-hover);
    box-shadow: none;
}

html[data-ui-theme="dark"] .groups-import-row-invalid,
html[data-ui-theme="dark"] .groups-import-row-existing {
    background: var(--color-surface-status);
    background-image: none;
}

/* Secondary directory metadata is intentionally quieter than editable names.
 * Keep linked-department disclosures useful without turning them into white
 * chips or chromatic popovers in the monochrome theme. */
html[data-ui-theme="dark"] .directory-count-badge,
html[data-ui-theme="dark"] .directory-linked-popover summary {
    background: var(--directory-badge-surface);
    background-image: none;
    border-color: var(--directory-badge-border);
    color: var(--color-table-header-text);
    box-shadow: none;
}

html[data-ui-theme="dark"] .directory-linked-popover summary:hover,
html[data-ui-theme="dark"] .directory-linked-popover summary:focus-visible {
    background: var(--directory-badge-hover-surface);
    border-color: var(--color-border-focus);
    color: var(--color-text-bright);
}

html[data-ui-theme="dark"] .directory-linked-popover-panel {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--directory-popover-border);
    box-shadow: var(--directory-popover-shadow);
    scrollbar-color: var(--directory-popover-scrollbar);
}

html[data-ui-theme="dark"] .directory-linked-popover-item {
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .directory-linked-popover-item:hover {
    background: var(--color-surface-hover-strong);
}

html[data-ui-theme="dark"] .directory-linked-date,
html[data-ui-theme="dark"] .directory-linked-secondary,
html[data-ui-theme="dark"] .teacher-linked-departments,
html[data-ui-theme="dark"] .directory-list-table-meta tbody td:nth-child(4),
html[data-ui-theme="dark"] .directory-list-table-meta tbody td:nth-child(5) {
    color: var(--color-action-secondary-text);
}

html[data-ui-theme="dark"] .inline-link {
    color: var(--color-table-header-text);
    border-bottom-color: var(--inline-link-border);
}

html[data-ui-theme="dark"] .inline-link:hover,
html[data-ui-theme="dark"] .inline-link:focus-visible {
    color: var(--color-text-bright);
    border-bottom-color: var(--inline-link-hover-border);
}

html[data-ui-theme="dark"] .lesson-card-title,
html[data-ui-theme="dark"] .lesson-card-room,
html[data-ui-theme="dark"] .lesson-card-meta,
html[data-ui-theme="dark"] .lesson-card-profile,
html[data-ui-theme="dark"] .lesson-card-note,
html[data-ui-theme="dark"] .lesson-card-parts,
html[data-ui-theme="dark"] .lesson-card-part,
html[data-ui-theme="dark"] .lesson-chip {
    color: var(--color-text-bright);
}

html[data-ui-theme="dark"] .lesson-chip {
    background: var(--color-surface-active);
    border-color: var(--color-border-emphasis);
}

html[data-ui-theme="dark"] .lesson-card,
html[data-ui-theme="dark"] .xlsx-preview-lesson-card,
html[data-ui-theme="dark"] .constraint-card {
    background: var(--grid-row-hover-surface);
    border-color: var(--color-control-border);
    border-left-color: var(--lesson-neutral-accent);
    color: var(--color-text-bright);
}

html[data-ui-theme="dark"] .lesson-card:hover {
    background: var(--lesson-card-hover-surface);
    border-color: var(--lesson-card-hover-border);
}

html[data-ui-theme="dark"] .status-chip,
html[data-ui-theme="dark"] .badge {
    --status-surface: var(--status-neutral-surface);
    --status-border: var(--status-neutral-border);
    --status-text: var(--status-neutral-text);
}

html[data-ui-theme="dark"] .empty-state,
html[data-ui-theme="dark"] .empty {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .directory-combobox-option:hover,
html[data-ui-theme="dark"] .directory-combobox-option.is-active {
    background: var(--color-surface-hover);
    outline-color: var(--directory-option-outline);
}

html[data-ui-theme="dark"] .driver-popover.ais-tour-popover,
html[data-ui-theme="dark"] .directory-combobox-menu,
html[data-ui-theme="dark"] .directory-combobox-option {
    background: var(--color-surface);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .driver-popover.ais-tour-popover .driver-popover-description,
html[data-ui-theme="dark"] .driver-popover.ais-tour-popover .driver-popover-progress-text {
    color: var(--tour-description-text);
}

html[data-ui-theme="dark"] .auth-screen::before {
    background: var(--auth-screen-background);
}

html[data-ui-theme="dark"] .auth-schedule-backdrop {
    filter: var(--auth-backdrop-filter);
}

html[data-ui-theme="dark"] .auth-card,
html[data-ui-theme="dark"] .auth-flow-card,
html[data-ui-theme="dark"] .auth-form {
    background: var(--auth-card-surface);
    border-color: var(--auth-card-border);
    box-shadow: var(--shadow);
}

/* The expanded schedule footer is a real dark surface, not the light page
 * footer palette reused by the shared help component. */
html[data-ui-theme="dark"] .grid-sheet-footer.app-page-help-footer {
    background: var(--color-surface);
    background-image: none;
    border-top-color: var(--color-border);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .nav-start-cta .nav-link {
    border-left-color: transparent;
}

/* Preserve the light-theme hierarchy: text rows inside a lesson card are
 * content, not nested surfaces. Keep only the card and its semantic chips
 * visually elevated. */
html[data-ui-theme="dark"] .lesson-card-title,
html[data-ui-theme="dark"] .lesson-card-room,
html[data-ui-theme="dark"] .lesson-card-meta,
html[data-ui-theme="dark"] .lesson-card-profile,
html[data-ui-theme="dark"] .lesson-card-note,
html[data-ui-theme="dark"] .lesson-card-parts,
html[data-ui-theme="dark"] .lesson-card-part,
html[data-ui-theme="dark"] .lesson-card-part-label,
html[data-ui-theme="dark"] .lesson-card-part-meta,
html[data-ui-theme="dark"] .lesson-card-indicators,
html[data-ui-theme="dark"] .all-schedule-v2-card-primary,
html[data-ui-theme="dark"] .all-schedule-v2-card-secondary {
    background: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
}

/* Keep transparent controls transparent when the generic button palette also
 * matches them. */
html[data-ui-theme="dark"] button.grid-plan-coverage-tool,
html[data-ui-theme="dark"] button.grid-sheet-footer-tool {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

html[data-ui-theme="dark"] button.grid-plan-coverage-tool:hover,
html[data-ui-theme="dark"] button.grid-plan-coverage-tool:focus-visible,
html[data-ui-theme="dark"] button.grid-plan-coverage-tool.is-active,
html[data-ui-theme="dark"] button.grid-sheet-footer-tool:hover,
html[data-ui-theme="dark"] button.grid-sheet-footer-tool:focus-visible {
    background: var(--color-surface-hover);
    border-color: var(--color-border-emphasis);
}

html[data-ui-theme="dark"] .grid-plan-coverage-filters button.is-active,
html[data-ui-theme="dark"] .grid-plan-coverage-view button.is-active {
    background: var(--color-surface-active-emphasis);
    border-color: var(--color-border-focus);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .grid-sheet-footer-tool {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] #grid-plan-coverage-title-meta {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-plan-coverage-view > div {
    border-color: var(--color-control-border);
}

/* Repository-wide monochrome cleanup.  These are component surfaces that
 * keep their own light-theme colors instead of inheriting the page palette. */
html[data-ui-theme="dark"] .nav-footer {
    border-color: transparent;
}

html[data-ui-theme="dark"] .directory-list-table-wrap,
html[data-ui-theme="dark"] .schedules-table-wrap,
html[data-ui-theme="dark"] .bell-schedule-table-wrap {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .directory-list-table-wrap table,
html[data-ui-theme="dark"] .directory-list-table-wrap thead,
html[data-ui-theme="dark"] .directory-list-table-wrap tbody,
html[data-ui-theme="dark"] .directory-list-table-wrap tr,
html[data-ui-theme="dark"] .directory-list-table-wrap th,
html[data-ui-theme="dark"] .directory-list-table-wrap td,
html[data-ui-theme="dark"] .schedules-table-wrap table,
html[data-ui-theme="dark"] .schedules-table-wrap thead,
html[data-ui-theme="dark"] .schedules-table-wrap tbody,
html[data-ui-theme="dark"] .schedules-table-wrap tr,
html[data-ui-theme="dark"] .schedules-table-wrap th,
html[data-ui-theme="dark"] .schedules-table-wrap td,
html[data-ui-theme="dark"] .bell-schedule-table-wrap table,
html[data-ui-theme="dark"] .bell-schedule-table-wrap thead,
html[data-ui-theme="dark"] .bell-schedule-table-wrap tbody,
html[data-ui-theme="dark"] .bell-schedule-table-wrap tr,
html[data-ui-theme="dark"] .bell-schedule-table-wrap th,
html[data-ui-theme="dark"] .bell-schedule-table-wrap td {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-text-high);
}

/* Opt-in semantic markers retain their base lesson type color in dark theme. */
html[data-ui-theme="dark"] .lesson-dot.lesson-dot-semantic {
    background: var(--lesson-dot-color);
}

html[data-ui-theme="dark"] .directory-list-table-wrap .study-plan-period-table tfoot > tr > * {
    background: var(--color-surface-soft);
    background-image: none;
    color: var(--color-text-strong);
}

html[data-ui-theme="dark"] .directory-list-table-wrap .study-plan-period-table thead th {
    color: var(--color-text-strong);
}

html[data-ui-theme="dark"] .directory-list-table-wrap .study-plan-period-table tbody td {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .directory-list-table-wrap th,
html[data-ui-theme="dark"] .schedules-table-wrap th,
html[data-ui-theme="dark"] .bell-schedule-table-wrap th {
    background: var(--color-surface-subtle);
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .directory-step-toggle,
html[data-ui-theme="dark"] .groups-search,
html[data-ui-theme="dark"] .directory-toolbar-search,
html[data-ui-theme="dark"] .groups-tree-toggle-btn,
html[data-ui-theme="dark"] .directory-toolbar-toggle,
html[data-ui-theme="dark"] .constraints-teacher-calendar-link,
html[data-ui-theme="dark"] .ai-model-refresh-btn {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-control-border);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .table-action-btn:not(.is-ai-suggested),
html[data-ui-theme="dark"] .schedules-action-btn,
html[data-ui-theme="dark"] .group-row-action {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-control-border);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .group-tree-row {
    background: var(--color-surface-subtle);
    border-color: var(--color-border);
}

html[data-ui-theme="dark"] .group-tree-count,
html[data-ui-theme="dark"] .directory-count-badge,
html[data-ui-theme="dark"] .constraints-mode-tabs,
html[data-ui-theme="dark"] .constraints-mode-tab {
    background: var(--color-surface-muted-strong);
    background-image: none;
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .constraints-mode-tab.is-active {
    background: var(--color-surface-selected);
    border-color: var(--color-border-focus);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .bell-col-no,
html[data-ui-theme="dark"] .bell-col-base-time,
html[data-ui-theme="dark"] .bell-col-day,
html[data-ui-theme="dark"] .bell-col-actions,
html[data-ui-theme="dark"] .bell-day-state,
html[data-ui-theme="dark"] .bell-legend-marker {
    background: var(--color-surface-muted-strong);
    background-image: none;
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .bell-day-state-enabled {
    background: var(--color-surface-strong);
}

html[data-ui-theme="dark"] .bell-day-state-override {
    background: var(--color-surface-active);
}

html[data-ui-theme="dark"] .bell-day-state-disabled {
    background: var(--disabled-state-surface);
    color: var(--disabled-state-text);
}

html[data-ui-theme="dark"] .schedules-campaign-summary,
html[data-ui-theme="dark"] .schedules-campaign-metric {
    color: var(--color-text-secondary);
    border-color: var(--color-control-border);
}

html[data-ui-theme="dark"] .getting-started-next,
html[data-ui-theme="dark"] .getting-started-steps,
html[data-ui-theme="dark"] .getting-started-steps-table,
html[data-ui-theme="dark"] .getting-started-step-row {
    background: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
}

html[data-ui-theme="dark"] .getting-started-next {
    border-left-color: var(--getting-started-next-border);
}

html[data-ui-theme="dark"] .getting-started-status,
html[data-ui-theme="dark"] .getting-started-status.is-done,
html[data-ui-theme="dark"] .getting-started-status.is-todo,
html[data-ui-theme="dark"] .getting-started-status.is-attention {
    background: var(--color-surface-muted-strong);
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] *:focus-visible {
    outline-color: var(--color-border-highlight);
    caret-color: var(--color-text-high);
}

html[data-ui-theme="dark"] ::selection {
    background: var(--selection-surface);
    color: var(--color-text-on-strong);
}

/* Keep the light theme's interaction hierarchy, but remove its hue: hover,
 * active rows, focused rows and drawer scrims remain quiet grayscale states. */
html[data-ui-theme="dark"] .schedules-workspace-row:hover > td,
html[data-ui-theme="dark"] .schedules-row:hover > td,
html[data-ui-theme="dark"] .directory-list-table-wrap tbody tr:hover > td {
    background: var(--grid-row-hover-surface);
}

html[data-ui-theme="dark"] .schedules-workspace-row.is-active > td,
html[data-ui-theme="dark"] .schedules-row.is-active > td,
html[data-ui-theme="dark"] .schedules-workspace-row:focus > td {
    background: var(--color-surface-status);
}

html[data-ui-theme="dark"] .schedules-workspace-row:focus,
html[data-ui-theme="dark"] .schedules-workspace-row:focus-visible {
    outline-color: var(--color-control-focus-border);
}

html[data-ui-theme="dark"] .schedules-ready-cell span:first-child,
html[data-ui-theme="dark"] #schedules-ready-main span,
html[data-ui-theme="dark"] #schedules-ready-percent,
html[data-ui-theme="dark"] .schedules-readiness-empty {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] #schedules-ready-main strong,
html[data-ui-theme="dark"] .schedules-ready-cell strong {
    color: var(--color-text-strong);
}

html[data-ui-theme="dark"] .schedules-row-title strong {
    color: var(--color-text-strong);
}

html[data-ui-theme="dark"] .schedules-pin {
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .schedules-pin:hover,
html[data-ui-theme="dark"] .schedules-pin.is-pinned {
    background: var(--color-surface-muted-strong);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .grid-meta-cell::before,
html[data-ui-theme="dark"] .grid-marker-row::before {
    background: var(--color-surface);
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr.is-outside-template > .grid-meta-cell::before,
html[data-ui-theme="dark"] .grid-marker-row.is-outside-template::before {
    background: var(--color-surface-muted-strong);
}

html[data-ui-theme="dark"] .grid-sheet.is-plan-dragging .is-plan-drop-blocked,
html[data-ui-theme="dark"] .grid-sheet.is-entry-dragging .grid-cell {
    background: var(--grid-drop-blocked-surface);
}

html[data-ui-theme="dark"] .grid-sheet.is-plan-dragging .is-plan-drop-allowed,
html[data-ui-theme="dark"] .grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-safe,
html[data-ui-theme="dark"] .grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-current {
    background: var(--color-surface-muted-strong);
    box-shadow: var(--grid-drop-safe-shadow);
}

html[data-ui-theme="dark"] .grid-sheet.is-plan-dragging .grid-cell.is-plan-drop-hover,
html[data-ui-theme="dark"] .grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-hover,
html[data-ui-theme="dark"] .grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-hover.is-entry-drop-safe,
html[data-ui-theme="dark"] .grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-hover.is-entry-drop-risk,
html[data-ui-theme="dark"] .grid-sheet.is-entry-dragging .grid-cell.is-entry-drop-hover.is-entry-drop-warning {
    background: var(--color-surface-strong);
    box-shadow: var(--grid-drop-hover-shadow);
}

html[data-ui-theme="dark"] .grid-cell.is-locked-by-other::after {
    border-color: var(--grid-lock-border);
}

html[data-ui-theme="dark"] .grid-lock-marker {
    background: var(--color-surface-emphasis);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr {
    background: var(--color-surface);
    background-image: none;
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr.is-outside-template > th,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr.is-outside-template > td {
    background: var(--color-surface-muted-strong);
}

html[data-ui-theme="dark"] .schedules-workspace-row:hover,
html[data-ui-theme="dark"] .schedules-workspace-row.is-active,
html[data-ui-theme="dark"] .schedules-workspace-row:focus {
    background: transparent;
}

html[data-ui-theme="dark"] .schedules-ready-cell span,
html[data-ui-theme="dark"] .schedules-ready-cell .schedules-row-meta,
html[data-ui-theme="dark"] .schedules-ready-cell .schedules-row-meta * {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .schedules-ready-cell strong {
    color: var(--color-text-strong);
}

/* Menus and option lists must not fall back to the light theme's white
 * surface when they are opened, including menus that are hidden during the
 * initial page scan. */
html[data-ui-theme="dark"] .schedules-action-menu,
html[data-ui-theme="dark"] .directory-combobox-results {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--color-border);
    box-shadow: var(--floating-surface-shadow);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .directory-combobox-result,
html[data-ui-theme="dark"] .directory-combobox-empty {
    background: transparent;
    background-image: none;
    border-color: transparent;
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .directory-combobox-result:hover,
html[data-ui-theme="dark"] .directory-combobox-result.is-active,
html[data-ui-theme="dark"] .directory-combobox-result.is-selected,
html[data-ui-theme="dark"] .custom-select-results [aria-selected="true"] {
    background: var(--color-surface-selected);
    background-image: none;
    border-color: transparent;
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .directory-combobox-result-hint {
    color: var(--color-text-muted);
}

html[data-ui-theme="dark"] .grid-topbar,
html[data-ui-theme="dark"] .grid-context-row,
html[data-ui-theme="dark"] .grid-breadcrumb {
    background: transparent;
    background-image: none;
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-status-badge,
html[data-ui-theme="dark"] .grid-xlsx-draft-open,
html[data-ui-theme="dark"] .directory-step-num {
    background: var(--color-surface-muted-strong);
    background-image: none;
    border-color: var(--status-badge-border);
    color: var(--color-text-neutral);
}

html[data-ui-theme="dark"] .grid-period-edit {
    background: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-text-tertiary);
}

html[data-ui-theme="dark"] .grid-corner-cell,
html[data-ui-theme="dark"] .grid-group-head,
html[data-ui-theme="dark"] .grid-cell {
    box-shadow: var(--grid-cell-divider-shadow);
}

html[data-ui-theme="dark"] .grid-sheet-tabs-nav,
html[data-ui-theme="dark"] .grid-sheet-tab,
html[data-ui-theme="dark"] .grid-sheet-footer-tools {
    background: var(--color-surface-subtle);
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-sheet-tabs-nav.is-active,
html[data-ui-theme="dark"] .grid-sheet-tab.is-active,
html[data-ui-theme="dark"] .grid-sheet-tab.is-published,
html[data-ui-theme="dark"] .grid-sheet-tab.is-published.is-active {
    background: var(--color-surface-selected);
    border-color: var(--color-border-emphasis);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .grid-sheet-tabs-nav:hover,
html[data-ui-theme="dark"] .grid-sheet-tab:hover,
html[data-ui-theme="dark"] .grid-sheet-footer-tool:hover,
html[data-ui-theme="dark"] .grid-sheet-footer-tool:focus-visible {
    background: var(--color-surface-hover);
    border-color: var(--color-border-emphasis);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] #group-grid .aggregate-timeline-horizontal-spacer {
    background-color: var(--color-surface);
    background-image: var(--aggregate-timeline-column-guides);
    box-shadow: var(--grid-cell-divider-shadow);
}

html[data-ui-theme="dark"] #group-grid .aggregate-timeline-day,
html[data-ui-theme="dark"] #group-grid .aggregate-timeline-day > .aggregate-timeline-horizontal-spacer {
    background-color: var(--color-surface);
    background-image: var(--aggregate-timeline-grid-guides);
    box-shadow: var(--grid-row-divider-shadow);
}

/* Final contrast pass for the schedule grid: the light theme has no visible
 * separators inside the week strip and no white day rail. */
html[data-ui-theme="dark"] .all-schedule-v2-entry {
    border-color: var(--color-border);
    border-left-color: var(--all-schedule-neutral-accent);
}

html[data-ui-theme="dark"] .all-schedule-v2-weeks::after {
    background: transparent;
}

html[data-ui-theme="dark"] .all-schedule-v2-week-fill {
    background: var(--color-surface-muted-strong);
    border-color: transparent;
}

html[data-ui-theme="dark"] .all-schedule-v2-weeks {
    border-color: transparent;
}

html[data-ui-theme="dark"] .grid-empty-slot,
html[data-ui-theme="dark"] .grid-empty-cell,
html[data-ui-theme="dark"] .aggregate-timeline-empty-slot {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Absolute final parity overrides: this block intentionally comes last so
 * generic component rules cannot reintroduce surfaces into transparent light
 * theme containers. */
html[data-ui-theme="dark"] .grid-panel,
html[data-ui-theme="dark"] #group-grid,
html[data-ui-theme="dark"] #group-grid.grid-sheet,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table thead,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr {
    background: transparent;
    background-image: none;
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-panel {
    border-color: transparent;
}

html[data-ui-theme="dark"] #group-grid .grid-meta-corner,
html[data-ui-theme="dark"] #group-grid .grid-corner-cell,
html[data-ui-theme="dark"] #group-grid .grid-meta-cell,
html[data-ui-theme="dark"] #group-grid .grid-time-cell {
    background: var(--color-canvas);
    background-image: none;
    border-color: transparent;
    box-shadow: none;
}

html[data-ui-theme="dark"] #group-grid .grid-meta-cell::before,
html[data-ui-theme="dark"] #group-grid .grid-marker-row::before {
    background: var(--color-canvas);
    border-color: transparent;
    box-shadow: none;
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr > .grid-cell {
    box-shadow: none;
}

/* Last component-state sweep: every status, legend and helper label keeps
 * its light-theme hierarchy while losing the original hue. */
html[data-ui-theme="dark"] .getting-started-nav a,
html[data-ui-theme="dark"] .getting-started-section-head > span,
html[data-ui-theme="dark"] .getting-started-step-num,
html[data-ui-theme="dark"] .getting-started-section.is-recommended .getting-started-step-num,
html[data-ui-theme="dark"] .getting-started-section.is-recommended .getting-started-section-head > span {
    background: var(--color-surface-muted-strong);
    background-image: none;
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .getting-started-nav a.is-active {
    background: var(--color-surface-selected);
    border-color: var(--color-border-focus);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .getting-started-nav a.is-active span {
    background: var(--color-surface-emphasis);
    border-color: transparent;
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] .getting-started-steps-head {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-table-header-text);
}

/* Readiness statuses keep their semantic colors in dark mode. */
html[data-ui-theme="dark"] .getting-started-section.is-required .getting-started-section-head > span,
html[data-ui-theme="dark"] .getting-started-section.is-required .getting-started-step-num,
html[data-ui-theme="dark"] .getting-started-status.is-done {
    background: var(--color-success-surface);
    border-color: var(--color-success-border);
    color: var(--color-success-text);
}

html[data-ui-theme="dark"] .getting-started-section.is-recommended .getting-started-section-head > span,
html[data-ui-theme="dark"] .getting-started-section.is-recommended .getting-started-step-num,
html[data-ui-theme="dark"] .getting-started-status.is-attention {
    background: var(--getting-started-attention-surface);
    border-color: var(--getting-started-attention-border);
    color: var(--getting-started-attention-text);
}

html[data-ui-theme="dark"] .getting-started-status.is-todo {
    background: var(--getting-started-todo-surface);
    border-color: var(--getting-started-todo-border);
    color: var(--getting-started-todo-text);
}

html[data-ui-theme="dark"] .aggregate-grid-filter-date,
html[data-ui-theme="dark"] .aggregate-grid-filter-date > span,
html[data-ui-theme="dark"] .bell-template-select-field > span,
html[data-ui-theme="dark"] .bell-day-header-label,
html[data-ui-theme="dark"] .bell-base-time-separator,
html[data-ui-theme="dark"] .group-tree-marker {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-time-cell::before {
    background: var(--color-surface-strong);
    background-image: none;
}

html[data-ui-theme="dark"] #schedules-ready-main,
html[data-ui-theme="dark"] #schedules-ready-main *,
html[data-ui-theme="dark"] #schedules-ready-percent,
html[data-ui-theme="dark"] .schedules-updated-relative,
html[data-ui-theme="dark"] .schedules-updated-cell > span {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .schedules-drawer-summary,
html[data-ui-theme="dark"] .slot-editor-context-chip,
html[data-ui-theme="dark"] .schedules-publication-label,
html[data-ui-theme="dark"] .teacher-calendar-legend,
html[data-ui-theme="dark"] .schedules-publication-footer-range {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .getting-started-nav a span {
    background: var(--color-surface-active);
    border-color: transparent;
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .bell-template-select-field .custom-select-value {
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .ais-error-page,
html[data-ui-theme="dark"] .ais-error-shell {
    background: var(--color-canvas);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .ais-error-panel {
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: none;
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .ais-error-code,
html[data-ui-theme="dark"] .ais-error-action,
html[data-ui-theme="dark"] .ais-error-action-primary {
    background: var(--color-surface-selected);
    border-color: var(--color-border-emphasis);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .ais-error-message,
html[data-ui-theme="dark"] .ais-error-meta,
html[data-ui-theme="dark"] .ais-error-panel h1,
html[data-ui-theme="dark"] .ais-error-actions {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .ais-error-meta {
    background: var(--color-surface-subtle);
    border-color: var(--color-border);
}

html[data-ui-theme="dark"] .ais-error-details {
    background: var(--color-surface-muted-strong);
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .ais-error-action:hover,
html[data-ui-theme="dark"] .ais-error-action:focus-visible {
    background: var(--color-surface-active-emphasis);
    border-color: var(--color-control-focus-border);
    outline-color: var(--color-control-focus-border);
}

html[data-ui-theme="dark"] .schedules-dispatcher-table,
html[data-ui-theme="dark"] .schedules-dispatcher-table tbody,
html[data-ui-theme="dark"] .schedules-workspace-row,
html[data-ui-theme="dark"] .schedules-workspace-row > td {
    background: transparent;
    background-image: none;
}

html[data-ui-theme="dark"] .schedules-workspace-row:hover > td,
html[data-ui-theme="dark"] .schedules-row:hover > td {
    background: var(--grid-row-hover-surface);
}

html[data-ui-theme="dark"] .schedules-workspace-row.is-active > td,
html[data-ui-theme="dark"] .schedules-workspace-row:focus > td {
    background: var(--color-surface-status);
}

html[data-ui-theme="dark"] tr.schedules-workspace-row,
html[data-ui-theme="dark"] #schedules-table-body > tr.schedules-workspace-row {
    background-color: transparent;
    background-image: none;
}

/* Drawer cards use a separate light palette in the base stylesheet. Keep the
 * same card hierarchy in dark mode without reintroducing hue, gradients or
 * bright surfaces. */
html[data-ui-theme="dark"] .schedules-drawer-card,
html[data-ui-theme="dark"] .schedules-drawer-card-published,
html[data-ui-theme="dark"] .slot-editor-actions {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--color-border);
    box-shadow: none;
}

html[data-ui-theme="dark"] .schedules-drawer-card:hover,
html[data-ui-theme="dark"] .schedules-drawer-card:focus-visible {
    background: var(--grid-row-hover-surface);
    border-color: var(--color-border-strong);
}

html[data-ui-theme="dark"] .schedules-drawer-card-title strong,
html[data-ui-theme="dark"] .schedules-drawer-section h3 {
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .schedules-drawer-card-info > span,
html[data-ui-theme="dark"] .schedules-drawer-card-info em,
html[data-ui-theme="dark"] .schedules-drawer-groups,
html[data-ui-theme="dark"] .schedules-drawer-card-stats,
html[data-ui-theme="dark"] .schedules-drawer-card-stats * {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .schedules-drawer-card-stats strong {
    color: var(--color-text-strong);
}

html[data-ui-theme="dark"] .schedules-version-icon-published,
html[data-ui-theme="dark"] .schedules-version-icon-draft,
html[data-ui-theme="dark"] .schedules-version-icon-archived {
    background: var(--color-surface-selected);
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .schedules-version-icon-published svg,
html[data-ui-theme="dark"] .schedules-version-icon-draft svg,
html[data-ui-theme="dark"] .schedules-version-icon-archived svg {
    color: var(--color-text-control-hover);
    stroke: currentColor;
}

html[data-ui-theme="dark"] .schedules-drawer-card .status-chip {
    --status-surface: #242424;
    --status-border: #4a4a4a;
    --status-text: #d0d0d0;
}

html[data-ui-theme="dark"] .schedules-publication-status-trigger,
html[data-ui-theme="dark"] .schedules-drawer-card-action.btn,
html[data-ui-theme="dark"] .schedules-drawer-card-tools .table-action-btn {
    background: var(--color-surface-muted-strong);
    background-image: none;
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .schedules-publication-status-trigger:hover,
html[data-ui-theme="dark"] .schedules-publication-status-trigger:focus-visible,
html[data-ui-theme="dark"] .schedules-drawer-card-action.btn:hover,
html[data-ui-theme="dark"] .schedules-drawer-card-action.btn:focus-visible,
html[data-ui-theme="dark"] .schedules-drawer-card-tools .table-action-btn:hover,
html[data-ui-theme="dark"] .schedules-drawer-card-tools .table-action-btn:focus-visible {
    background: var(--color-surface-active);
    border-color: var(--color-control-focus-border);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .schedules-conflict-count.grid-check-count,
html[data-ui-theme="dark"] .schedules-conflict-count.grid-check-count.is-warning {
    background: var(--color-surface-active);
    border-color: var(--color-control-focus-border);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .schedules-drawer-card:focus-visible {
    outline-color: var(--color-control-focus-border);
}

/* Grid frame and corner parity. The frame belongs to the table as a whole;
 * the empty upper-left corner remains transparent and borderless inside it. */
html[data-ui-theme="dark"] #group-grid .grid-sheet-head .grid-corner-cell,
html[data-ui-theme="dark"] #group-grid .grid-meta-corner {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* The light grid uses a dashed interaction contour. Keep it visible on dark
 * cards and do not replace it with a stronger solid highlight. */
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:hover,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:focus-within,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:hover,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:focus-visible {
    box-shadow: none;
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover),
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:is(.is-active-slot, .is-linked-hover) {
    --lesson-accent: #8a8a8a;
    --lesson-accent-ring: transparent;
    border-color: var(--grid-interaction-border);
    box-shadow: none;
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:hover .lesson-card-title,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:hover .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:hover .lesson-card-meta,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:hover .lesson-card-room,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-title,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-meta,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-room {
    background: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
}

/* Slot editor: this surface has its own light component palette, so cover
 * every visible sub-surface and interactive state explicitly. */
html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-editor-day-label {
    background: var(--color-surface-active);
    border-color: var(--color-control-focus-border);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-editor-pair-label,
html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-editor-context-chip {
    background: var(--color-surface-selected);
    border-color: var(--color-border-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .grid-editor-problems {
    background: var(--problem-critical-surface);
    background-image: none;
    border-color: var(--grid-editor-problem-border);
    color: var(--problem-critical-color);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-entry-card,
html[data-ui-theme="dark"] .grid-slot-editor-panel .grid-entry-editor-card {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-control-border);
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .entry-order {
    background: var(--color-surface-active);
    border-color: var(--color-control-focus-border);
    color: var(--color-text);
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-entry-marker {
    background: transparent;
    border-color: transparent;
    color: inherit;
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-box,
html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-target-panel,
html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-target-picker-shell,
html[data-ui-theme="dark"] .grid-slot-editor-panel .grid-group-targets {
    /* These are layout containers, not extra surfaces: inherit the drawer
     * background just as they do in the light theme. */
    background: transparent;
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .grid-group-targets label,
html[data-ui-theme="dark"] .grid-slot-editor-panel .grid-group-targets .grid-group-target-main {
    background: transparent;
    border-color: var(--color-control-border);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-mode-list button,
html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-rule-tabs button {
    background: transparent;
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-mode-list button.is-active {
    background: transparent;
    border-color: transparent;
    color: var(--color-text);
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-rule-tabs button.is-active {
    background: var(--color-surface-selected);
    border-color: var(--color-border-strong);
    color: var(--color-text);
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-mode-list,
html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-rule-tabs {
    border-color: var(--color-border);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-mode-list button:hover,
html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-rule-tabs button:hover,
html[data-ui-theme="dark"] .grid-slot-editor-panel .assignment-mode-list button:focus-visible,
html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-rule-tabs button:focus-visible {
    background: var(--color-surface-active);
    border-color: var(--color-control-focus-border);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .date-preview-box,
html[data-ui-theme="dark"] .grid-slot-editor-panel .date-preview-list {
    background: transparent;
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .date-choice,
html[data-ui-theme="dark"] .grid-slot-editor-panel .date-choice-context {
    background: transparent;
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .date-choice-context {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .date-choice:hover,
html[data-ui-theme="dark"] .grid-slot-editor-panel .date-choice:focus-within,
html[data-ui-theme="dark"] .grid-slot-editor-panel .date-choice.is-selected {
    background: var(--color-surface-active);
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .date-choice input[type="checkbox"] {
    accent-color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .grid-slot-editor-panel .slot-add-entry-dropzone {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-border-focus);
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .form-field-error,
html[data-ui-theme="dark"] .password-policy-feedback[data-state="invalid"],
html[data-ui-theme="dark"] .grid-editor-problems h3,
html[data-ui-theme="dark"] .grid-editor-problems .muted,
html[data-ui-theme="dark"] .grid-editor-problems .slot-state.error,
html[data-ui-theme="dark"] .grid-editor-problems .slot-state.error > span {
    color: var(--problem-critical-color);
}

html[data-ui-theme="dark"] .grid-editor-problems .slot-state + .slot-state {
    border-top-color: var(--conflict-border);
}

/* The period editor is a child of the transparent grid workspace, not a
 * light-themed page panel. Keep its surface in the same dark hierarchy. */
html[data-ui-theme="dark"] .grid-period-editor {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--color-border);
    box-shadow: none;
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .grid-period-action {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-control-border);
    color: var(--color-text-high);
    box-shadow: none;
}

html[data-ui-theme="dark"] .grid-period-action.ghost {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text-tertiary);
}

html[data-ui-theme="dark"] .grid-period-action:hover,
html[data-ui-theme="dark"] .grid-period-action:focus-visible {
    background: var(--color-surface-selected);
    border-color: var(--color-control-focus-border);
    color: var(--color-text);
}

/* Reintroduce the separators that are present in the light grid. The corner
 * is the one deliberate exception: it remains the page surface, without a
 * cell border or inset frame. */
html[data-ui-theme="dark"] #group-grid .grid-sheet-table th,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table td {
    border-right-color: var(--grid-line-strong);
    border-bottom-color: var(--color-border-soft);
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-head th,
html[data-ui-theme="dark"] #group-grid .grid-sheet-head .grid-group-head {
    background: var(--color-surface);
    border-color: var(--grid-frame-corner-border);
    box-shadow: var(--grid-frame-head-shadow);
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr.grid-day-block > th,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr.grid-day-block > td {
    box-shadow: var(--grid-row-divider-shadow);
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr:first-child > th,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr:first-child > td {
    box-shadow: none;
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table .grid-corner-cell,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table .grid-meta-corner,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table .grid-meta-cell {
    background: var(--color-canvas);
    border-color: transparent;
    box-shadow: none;
}

/* The light theme puts the interaction contour on the entry itself. The
 * nested button is transparent and must not create a second contour inside
 * the subject card. */
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:hover,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:focus-visible,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card:is(.is-active-slot, .is-linked-hover) {
    border-color: transparent;
    box-shadow: none;
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry:is(:hover, :focus-within, .is-active-slot, .is-linked-hover) {
    box-shadow: none;
}

/* Profiles keep their semantic color in the dark theme, but the palette is
 * intentionally deeper and softer than the light-theme swatches. Badges do
 * not gain a new contour: the color itself is the only profile marker. */
html[data-ui-theme="dark"] .group-profile-badge {
    border-color: var(--color-border-strong);
    box-shadow: none;
}

html[data-ui-theme="dark"] .directory-profile-dot {
    box-shadow: none;
}

/* The group editor reuses the profile picker in a drawer. Its light-theme
 * container must not become a white island in the dark theme. */
html[data-ui-theme="dark"] .profile-picker-container {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--color-border);
    box-shadow: none;
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .profile-picker-selected-zone {
    background: transparent;
    border-color: transparent;
}

html[data-ui-theme="dark"] .profile-selected-item {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-border);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .profile-picker-search-input {
    background: var(--color-surface-subtle);
    background-image: none;
    border-color: var(--color-control-border);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .profile-picker-search-input::placeholder,
html[data-ui-theme="dark"] .profile-picker-result-meta,
html[data-ui-theme="dark"] .profile-picker-empty,
html[data-ui-theme="dark"] .profile-picker-empty-result,
html[data-ui-theme="dark"] .profile-level-group-title,
html[data-ui-theme="dark"] .profile-selected-direction {
    color: var(--color-action-secondary-text);
}

html[data-ui-theme="dark"] .profile-picker-search-input:focus {
    background: var(--color-surface-muted-strong);
    border-color: var(--color-border-focus);
    box-shadow: var(--control-focus-shadow);
}

html[data-ui-theme="dark"] .profile-picker-result {
    border-bottom-color: var(--color-border);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .profile-picker-result:hover {
    background: var(--color-surface-muted-strong);
}

html[data-ui-theme="dark"] .profile-picker-result.is-joint-candidate {
    border-color: var(--color-border-strong);
    background: var(--color-surface-muted-strong);
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .profile-picker-result.is-joint-candidate:hover {
    background: var(--color-surface-selected);
}

html[data-ui-theme="dark"] .profile-picker-result-name,
html[data-ui-theme="dark"] .profile-selected-name,
html[data-ui-theme="dark"] .groups-editor-block h3 {
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .profile-selected-remove {
    background: var(--color-surface-muted-strong);
    border-color: var(--profile-remove-border);
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .profile-selected-remove:hover {
    background: var(--profile-remove-hover-surface);
    border-color: var(--profile-remove-hover-border);
    color: var(--color-text-brightest);
}

html[data-ui-theme="dark"] .profile-picker-add-btn,
html[data-ui-theme="dark"] .profile-picker-add-btn:hover,
html[data-ui-theme="dark"] .profile-picker-add-btn:focus-visible {
    background: transparent;
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] .profile-picker-add-btn:hover,
html[data-ui-theme="dark"] .profile-picker-add-btn:focus-visible {
    color: var(--color-text-brightest);
}

html[data-ui-theme="dark"] .directory-toolbar-search input::placeholder {
    color: var(--color-action-secondary-text);
    opacity: 1;
}

/* The search control is one surface: the native input must not become a
 * second inset panel inside its wrapper. */
html[data-ui-theme="dark"] .directory-toolbar-search input {
    background: transparent;
    box-shadow: none;
}

/* Study-plan department counts inherit a blue light-theme token. Keep the
 * same hierarchy in dark mode, but neutralize the hue without changing the
 * cell geometry or the interactive mapping affordance. */
html[data-ui-theme="dark"] .study-plans-table .study-plan-department-total {
    color: var(--color-action-secondary-text);
}

html[data-ui-theme="dark"] .study-plans-table .study-plan-mapping-link {
    color: var(--study-plan-mapping-text);
}

html[data-ui-theme="dark"] .study-plans-table .study-plan-mapping-link:hover,
html[data-ui-theme="dark"] .study-plans-table .study-plan-mapping-link:focus-visible {
    color: var(--study-plan-mapping-hover-text);
}

/* Close controls inherit a light hover surface from the base theme. Keep the
 * interaction visible in dark mode without introducing a bright tile. */
html[data-ui-theme="dark"] .slot-editor-panel .slot-editor-close:hover,
html[data-ui-theme="dark"] .slot-editor-panel .slot-editor-close:focus-visible {
    background: var(--color-surface-hover-strong);
    color: var(--color-text);
}

/* The create-schedule form was authored with light-only fieldset, label and
 * disabled-control tokens. Keep its geometry intact, but map every surface
 * and supporting text to the dark neutral palette. */
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-section {
    border-color: var(--color-border);
    background: var(--schedule-create-section-surface);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-section > legend {
    color: var(--color-text-subtle-high);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field > span,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-groups > legend {
    color: var(--schedule-create-label-text);
}

/* The dispatcher search is one compound control in the light theme. Keep the
 * inner search input transparent in dark mode so focus cannot create a second
 * panel inside the control. */
html[data-ui-theme="dark"] .schedules-search,
html[data-ui-theme="dark"] .schedules-search:focus-within {
    background: var(--color-control-bg);
    background-image: none;
    border-color: var(--color-control-border);
    box-shadow: none;
}

html[data-ui-theme="dark"] .schedules-search input,
html[data-ui-theme="dark"] .schedules-search input:focus {
    background: transparent;
    background-image: none;
    box-shadow: none;
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .schedules-search input::placeholder {
    color: var(--color-text-disabled);
    opacity: 1;
}

/* Open menus and their hover/focus states must stay in the same dark neutral
 * hierarchy. The base menu rules use a white light-theme hover surface. */
html[data-ui-theme="dark"] .schedules-action-menu button:hover,
html[data-ui-theme="dark"] .schedules-action-menu button:focus-visible,
html[data-ui-theme="dark"] .schedules-action-menu a:hover,
html[data-ui-theme="dark"] .schedules-action-menu a:focus-visible,
html[data-ui-theme="dark"] .schedules-action-menu-select-field .custom-select-control:hover,
html[data-ui-theme="dark"] .schedules-action-menu-select-field .custom-select-control:focus-visible {
    background: var(--color-surface-selected);
    background-image: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-text-high);
    filter: none;
}

html[data-ui-theme="dark"] .schedules-action-menu button:disabled,
html[data-ui-theme="dark"] .schedules-action-menu button[aria-disabled="true"] {
    background: transparent;
    color: var(--color-text-disabled);
    opacity: 1;
}

html[data-ui-theme="dark"] .schedules-action-menu button,
html[data-ui-theme="dark"] .schedules-action-menu a {
    background: transparent;
    background-image: none;
    box-shadow: none;
}

html[data-ui-theme="dark"] .schedules-action-menu button:hover,
html[data-ui-theme="dark"] .schedules-action-menu button:focus,
html[data-ui-theme="dark"] .schedules-action-menu button:active,
html[data-ui-theme="dark"] .schedules-action-menu a:hover,
html[data-ui-theme="dark"] .schedules-action-menu a:focus,
html[data-ui-theme="dark"] .schedules-action-menu a:active {
    background: var(--color-surface-selected);
    background-image: none;
    box-shadow: none;
    color: var(--color-text-high);
}

/* Every scroll container uses one subdued dark track/thumb pair. Explicit
 * component rules above the theme layer otherwise retain the light palette
 * through scrollbar-color, even when their WebKit pseudo-elements are dark. */
html[data-ui-theme="dark"],
html[data-ui-theme="dark"] body,
html[data-ui-theme="dark"] * {
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html[data-ui-theme="dark"] *::-webkit-scrollbar {
    background: var(--scrollbar-track);
}

html[data-ui-theme="dark"]::-webkit-scrollbar {
    background: var(--scrollbar-track);
}

html[data-ui-theme="dark"] body::-webkit-scrollbar {
    background: var(--scrollbar-track);
}

html[data-ui-theme="dark"] *::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-color: transparent;
}

html[data-ui-theme="dark"]::-webkit-scrollbar-track,
html[data-ui-theme="dark"] body::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-color: transparent;
}

html[data-ui-theme="dark"] *::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-color: var(--scrollbar-track);
}

html[data-ui-theme="dark"]::-webkit-scrollbar-thumb,
html[data-ui-theme="dark"] body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-color: var(--scrollbar-track);
}

html[data-ui-theme="dark"] *::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

html[data-ui-theme="dark"]::-webkit-scrollbar-thumb:hover,
html[data-ui-theme="dark"] body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field input,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field select,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field .custom-select-control,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-source-field .directory-combobox-search {
    border-color: var(--color-control-border);
    background: var(--color-control-bg);
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field input::placeholder,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-source-field .directory-combobox-search::placeholder {
    color: var(--color-text-disabled);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field input:focus,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field .custom-select-control:focus-visible,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-source-field .directory-combobox-search:focus {
    border-color: var(--lesson-card-hover-border);
    box-shadow: var(--schedule-create-focus-shadow);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-field .custom-select-value {
    color: var(--color-text-tertiary);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-source-field .directory-combobox-search:disabled {
    border-color: var(--color-border);
    background: var(--color-surface-deep);
    color: var(--color-control-disabled-text);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-source-field .directory-combobox-search:disabled::placeholder {
    color: var(--color-control-disabled-text);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-source-result-status,
html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-settings-note {
    color: var(--color-text-muted);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-groups {
    border-color: var(--color-border);
    background: transparent;
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-group-row {
    color: var(--schedule-create-text);
}

html[data-ui-theme="dark"] .schedules-detail-panel .schedules-create-group-profiles {
    color: var(--schedule-create-meta-text);
}

/* Non-selected quick-filter chips stay merged with the surrounding surface. */
html[data-ui-theme="dark"] .schedules-quick-filter,
html[data-ui-theme="dark"] .schedules-quick-filter:hover,
html[data-ui-theme="dark"] .schedules-quick-filter:focus,
html[data-ui-theme="dark"] .schedules-quick-filter:focus-visible,
html[data-ui-theme="dark"] .schedules-quick-filter:active {
    background: transparent;
    background-image: none;
    border-color: transparent;
}

/* A selected filter is the one intentional exception: keep its state visible
 * with a restrained neutral surface, matching the light-theme hierarchy. */
html[data-ui-theme="dark"] .schedules-quick-filter.is-active {
    background: var(--color-surface-hover-strong);
    background-image: none;
    border-color: var(--color-border-strong);
    color: var(--color-text-brightest);
    box-shadow: none;
}

/* Sidebar navigation parity: the light theme reveals its scrollbar only while
 * the navigation is being used, and groups items with a quiet closing gap. */
html[data-ui-theme="dark"] .nav {
    scrollbar-color: var(--nav-scrollbar-hidden);
}

html[data-ui-theme="dark"] .nav:hover {
    scrollbar-color: var(--nav-scrollbar-hover);
}

html[data-ui-theme="dark"] .nav::-webkit-scrollbar-track {
    background: transparent;
}

html[data-ui-theme="dark"] .nav::-webkit-scrollbar-thumb {
    border-color: transparent;
    background: transparent;
}

html[data-ui-theme="dark"] .nav:hover::-webkit-scrollbar-thumb {
    background: var(--nav-scrollbar-thumb-hover);
}

/* Section headers are labels, not actions: keep their icon and text quieter
 * than the clickable navigation items below them. */
html[data-ui-theme="dark"] .nav-section-title,
html[data-ui-theme="dark"] .nav-section-title-text,
html[data-ui-theme="dark"] .nav-section-chevron {
    color: var(--color-action-secondary-text);
}

html[data-ui-theme="dark"] .nav-section-icon {
    filter: var(--nav-section-icon-filter);
    opacity: var(--nav-section-icon-opacity);
}

/* Keep the onboarding entry as the persistent attention anchor. This is the
 * intentional bright-color exception shared with the light theme. */
html[data-ui-theme="dark"] .nav-start-cta .nav-link,
html[data-ui-theme="dark"] .nav-start-cta .nav-link.is-active {
    background: var(--getting-started-cta-surface);
    background-image: none;
    border-color: var(--getting-started-cta-border) var(--getting-started-cta-border) var(--getting-started-cta-border) transparent;
    color: var(--color-warning-contrast-text);
}

html[data-ui-theme="dark"] .nav-start-cta .nav-link:hover,
html[data-ui-theme="dark"] .nav-start-cta .nav-link:focus-visible {
    background: var(--getting-started-cta-hover-surface);
    border-color: var(--getting-started-cta-hover-border) var(--getting-started-cta-hover-border) var(--getting-started-cta-hover-border) transparent;
    color: var(--getting-started-cta-hover-text);
}

html[data-ui-theme="dark"] .nav-start-cta .nav-icon-svg,
html[data-ui-theme="dark"] .nav-start-cta .nav-icon-image {
    color: var(--color-warning-contrast-text);
    stroke: var(--getting-started-cta-icon-stroke);
    filter: none;
}

html[data-ui-theme="dark"] .nav-readiness-indicator {
    --nav-readiness-fill: #e2e2e2;
    --nav-readiness-track: rgba(226, 226, 226, 0.45);
    color: var(--getting-started-readiness-text);
}

html[data-ui-theme="dark"] .nav-start-cta .nav-readiness-indicator {
    --nav-readiness-fill: #3d3200;
    --nav-readiness-track: rgba(61, 50, 0, 0.3);
    color: var(--color-warning-contrast-text);
}

html[data-ui-theme="dark"] .nav-start-cta .nav-start-close {
    color: var(--getting-started-close-text);
    background: transparent;
}

html[data-ui-theme="dark"] .nav-start-cta .nav-start-close:hover,
html[data-ui-theme="dark"] .nav-start-cta .nav-start-close:focus-visible {
    color: var(--getting-started-close-hover-text);
    background: var(--getting-started-close-hover-surface);
}

/* Menu counters are informational, so their dark treatment is neutral. */
html[data-ui-theme="dark"] .nav-indicator-count {
    --sidebar-collapsed-indicator-text: var(--color-text-high);
    background: var(--color-surface-active);
    border-color: transparent;
    color: var(--color-text-high);
}

/* The bell-template control is a menu item in the dark action menu. Its
 * light-theme field hover surface must not become a white tile in dark mode.
 * Keep the field and its nested custom control on the menu surface while
 * preserving the existing hover/active geometry. */
html[data-ui-theme="dark"] .schedules-action-menu-select-field,
html[data-ui-theme="dark"] .schedules-action-menu-select-field > select,
html[data-ui-theme="dark"] .schedules-action-menu-select-field .custom-select,
html[data-ui-theme="dark"] .schedules-action-menu-select-field .custom-select-control {
    background: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-text-control-hover);
}

html[data-ui-theme="dark"] .schedules-action-menu-select-field:hover,
html[data-ui-theme="dark"] .schedules-action-menu-select-field:focus-within,
html[data-ui-theme="dark"] .schedules-action-menu-select-field:hover .custom-select-control,
html[data-ui-theme="dark"] .schedules-action-menu-select-field:focus-within .custom-select-control {
    background: var(--color-surface-selected);
    background-image: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] .schedules-action-menu-select-field .custom-select-value,
html[data-ui-theme="dark"] .schedules-action-menu-select-field .schedules-action-menu-select-icon {
    color: inherit;
}

/* Button hierarchy in dark mode follows the light theme's semantics: a
 * secondary action stays quiet, while the primary schedule action keeps a
 * clearer neutral edge. Both states retain the existing geometry. */
html[data-ui-theme="dark"] #schedules-history-btn {
    background: transparent;
    background-image: none;
    border-color: var(--schedule-history-border);
    box-shadow: none;
    color: var(--color-action-secondary-text);
}

html[data-ui-theme="dark"] #schedules-history-btn:hover,
html[data-ui-theme="dark"] #schedules-history-btn:focus-visible {
    background: var(--color-surface-deep);
    border-color: var(--color-control-border);
    box-shadow: none;
    color: var(--color-table-header-text);
}

html[data-ui-theme="dark"] #schedules-create-btn,
html[data-ui-theme="dark"] #schedules-create-menu-btn {
    background: var(--color-action-primary-bg);
    background-image: none;
    border-color: var(--color-border-highlight);
    box-shadow: var(--shadow-inset-soft);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] #schedules-create-menu-btn {
    border-left-color: var(--schedule-create-divider);
}

html[data-ui-theme="dark"] #schedules-create-btn:hover,
html[data-ui-theme="dark"] #schedules-create-btn:focus-visible,
html[data-ui-theme="dark"] #schedules-create-menu-btn:hover,
html[data-ui-theme="dark"] #schedules-create-menu-btn:focus-visible {
    background: var(--color-action-primary-hover-bg);
    border-color: var(--color-border-inverse);
    box-shadow: var(--shadow-inset-strong);
    color: var(--color-text-on-strong);
}

html[data-ui-theme="dark"] #schedules-create-menu-btn:hover,
html[data-ui-theme="dark"] #schedules-create-menu-btn:focus-visible {
    border-left-color: var(--schedule-create-hover-divider);
}

/* Conflict indicators keep their problem meaning in dark mode. The generic
 * monochrome rules above intentionally flatten most status colors, so this
 * semantic layer must come last and is shared by the grid and dispatcher. */
html[data-ui-theme="dark"] .grid-indicator-sample.conflict,
html[data-ui-theme="dark"] .grid-check-count.is-error,
html[data-ui-theme="dark"] .grid-problem-item.is-error .grid-problem-mark,
html[data-ui-theme="dark"] .lesson-chip.conflict,
html[data-ui-theme="dark"] .grid-calendar-problem-badge {
    background: var(--conflict-color);
    border-color: var(--conflict-color);
    color: var(--conflict-contrast-text);
}

html[data-ui-theme="dark"] .lesson-card.has-conflict {
    border-right-color: var(--conflict-color-strong);
}

html[data-ui-theme="dark"] .lesson-card-constraint-chip {
    background: var(--conflict-surface);
    border-color: var(--conflict-border);
    color: var(--conflict-color);
}

html[data-ui-theme="dark"] .schedules-action-menu .schedules-action-icon-conflicts {
    background-color: currentColor;
    color: var(--conflict-color);
}

html[data-ui-theme="dark"] .schedules-conflict-count.grid-check-count,
html[data-ui-theme="dark"] .schedules-conflict-count.grid-check-count:not(.is-warning) {
    background: var(--problem-critical-surface);
    border-color: transparent;
    color: var(--problem-critical-color);
}

html[data-ui-theme="dark"] .schedules-conflict-count.grid-check-count.is-warning {
    background: var(--problem-warning-surface);
    border-color: var(--problem-warning-border);
    color: var(--problem-warning-color);
}

/* Keep the schedule corner aligned with the dark table header and let the
 * left time rail merge into the page background. */
html[data-ui-theme="dark"] #group-grid .grid-sheet-head .grid-corner-cell,
html[data-ui-theme="dark"] .grid-sheet-head .grid-corner-cell {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--grid-frame-corner-border);
    box-shadow: var(--grid-frame-corner-shadow);
}

html[data-ui-theme="dark"] #group-grid .grid-sheet-table .grid-time-cell,
html[data-ui-theme="dark"] #group-grid .grid-time-cell,
html[data-ui-theme="dark"] .grid-time-cell,
html[data-ui-theme="dark"] #group-grid .grid-sheet-table tbody tr.grid-day-block > .grid-time-cell {
    background: var(--color-surface);
    background-image: none;
    border-color: var(--grid-frame-corner-border);
    box-shadow: var(--grid-frame-time-shadow);
}

html[data-ui-theme="dark"] #group-grid .grid-meta-corner::before {
    background: var(--color-canvas);
    border-color: transparent;
    box-shadow: none;
}

/* Final schedule-grid contrast hierarchy. Group headings are the strongest
 * text, lesson metadata is quieter, and subject types use restrained tinted
 * dark surfaces instead of a flat set of competing grays. */
html[data-ui-theme="dark"] #group-grid .grid-group-name,
html[data-ui-theme="dark"] #group-grid .grid-group-name span {
    color: var(--color-text-high);
}

html[data-ui-theme="dark"] #group-grid .grid-group-profiles {
    color: var(--color-text-subtle-high);
}

html[data-ui-theme="dark"] #group-grid .lesson-card-title {
    color: var(--lesson-card-title-text);
}

html[data-ui-theme="dark"] #group-grid .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid .lesson-card-meta,
html[data-ui-theme="dark"] #group-grid .lesson-card-parts,
html[data-ui-theme="dark"] #group-grid .lesson-card-part,
html[data-ui-theme="dark"] #group-grid .lesson-card-part-label,
html[data-ui-theme="dark"] #group-grid .lesson-card-part-meta {
    color: var(--lesson-card-meta-text);
}

html[data-ui-theme="dark"] #group-grid .lesson-card-room {
    color: var(--lesson-card-room-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lecture {
    background: var(--lesson-lecture-surface);
    border-top-color: var(--lesson-lecture-border);
    border-right-color: var(--lesson-lecture-border);
    border-bottom-color: var(--lesson-lecture-border);
    border-left-color: var(--lesson-lecture-accent);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-practice {
    background: var(--lesson-practice-surface);
    border-top-color: var(--lesson-practice-border);
    border-right-color: var(--lesson-practice-border);
    border-bottom-color: var(--lesson-practice-border);
    border-left-color: var(--lesson-practice-accent);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lab,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-credit {
    background: var(--lesson-lab-surface);
    border-top-color: var(--lesson-lab-border);
    border-right-color: var(--lesson-lab-border);
    border-bottom-color: var(--lesson-lab-border);
    border-left-color: var(--lesson-lab-accent);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-exam {
    background: var(--lesson-exam-surface);
    border-top-color: var(--lesson-exam-border);
    border-right-color: var(--lesson-exam-border);
    border-bottom-color: var(--lesson-exam-border);
    border-left-color: var(--lesson-exam-accent);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-consultation {
    background: var(--lesson-consultation-surface);
    border-top-color: var(--lesson-consultation-border);
    border-right-color: var(--lesson-consultation-border);
    border-bottom-color: var(--lesson-consultation-border);
    border-left-color: var(--lesson-consultation-accent);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-other {
    background: var(--lesson-other-surface);
    border-top-color: var(--lesson-other-border);
    border-right-color: var(--lesson-other-border);
    border-bottom-color: var(--lesson-other-border);
    border-left-color: var(--lesson-other-accent);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry.lesson-lecture {
    --all-schedule-v2-week-fill: #1a251f;
    --all-schedule-v2-week-empty-bg: #131c17;
    --all-schedule-v2-week-number: #314538;
    --all-schedule-v2-week-number-active: #4a6252;
    --all-schedule-v2-title-color: #c6d2c9;
    --all-schedule-v2-profile-color: #93a79a;
    --all-schedule-v2-chip-bg: #2a3a30;
    --all-schedule-v2-chip-border: #4e6b57;
    --all-schedule-v2-chip-color: #9fbea9;
    --all-schedule-v2-card-bg: #1a251f;
    --all-schedule-v2-line: #639074;
    --all-schedule-v2-border: var(--lesson-lecture-border);
    background: var(--lesson-lecture-surface);
    border-color: var(--lesson-lecture-border);
    border-left-color: var(--lesson-lecture-accent);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry.lesson-practice {
    --all-schedule-v2-week-fill: #1b2530;
    --all-schedule-v2-week-empty-bg: #171f29;
    --all-schedule-v2-week-number: #34485f;
    --all-schedule-v2-week-number-active: #4f6680;
    --all-schedule-v2-title-color: #c5cedb;
    --all-schedule-v2-profile-color: #95a2b4;
    --all-schedule-v2-chip-bg: #2d3b4d;
    --all-schedule-v2-chip-border: #526b87;
    --all-schedule-v2-chip-color: #a5b9d0;
    --all-schedule-v2-card-bg: #1b2530;
    --all-schedule-v2-line: #6f98c0;
    --all-schedule-v2-border: var(--lesson-practice-border);
    background: var(--lesson-practice-surface);
    border-color: var(--lesson-practice-border);
    border-left-color: var(--lesson-practice-accent);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry.lesson-lab,
html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry.lesson-credit {
    --all-schedule-v2-week-fill: #28271f;
    --all-schedule-v2-week-empty-bg: #202018;
    --all-schedule-v2-week-number: #514a31;
    --all-schedule-v2-week-number-active: #675d3d;
    --all-schedule-v2-title-color: #d1ccaf;
    --all-schedule-v2-profile-color: #a79f83;
    --all-schedule-v2-chip-bg: #443f2c;
    --all-schedule-v2-chip-border: #74663e;
    --all-schedule-v2-chip-color: #c1b47f;
    --all-schedule-v2-card-bg: #28271f;
    --all-schedule-v2-line: #a08f52;
    --all-schedule-v2-border: var(--lesson-lab-border);
    background: var(--lesson-lab-surface);
    border-color: var(--lesson-lab-border);
    border-left-color: var(--lesson-lab-accent);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry.lesson-exam {
    --all-schedule-v2-week-fill: #292224;
    --all-schedule-v2-week-empty-bg: #21191c;
    --all-schedule-v2-week-number: #53383e;
    --all-schedule-v2-week-number-active: #633f46;
    --all-schedule-v2-title-color: #d1bdc2;
    --all-schedule-v2-profile-color: #a68d94;
    --all-schedule-v2-chip-bg: #463136;
    --all-schedule-v2-chip-border: #7a4d58;
    --all-schedule-v2-chip-color: #c99aa3;
    --all-schedule-v2-card-bg: #292224;
    --all-schedule-v2-line: #ab6c73;
    --all-schedule-v2-border: var(--lesson-exam-border);
    background: var(--lesson-exam-surface);
    border-color: var(--lesson-exam-border);
    border-left-color: var(--lesson-exam-accent);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry.lesson-consultation {
    --all-schedule-v2-week-fill: #1b2827;
    --all-schedule-v2-week-empty-bg: #14201f;
    --all-schedule-v2-week-number: #34534e;
    --all-schedule-v2-week-number-active: #4e7069;
    --all-schedule-v2-title-color: #c5d5d1;
    --all-schedule-v2-profile-color: #96aca7;
    --all-schedule-v2-chip-bg: #2e4541;
    --all-schedule-v2-chip-border: #4d7770;
    --all-schedule-v2-chip-color: #a8c8c0;
    --all-schedule-v2-card-bg: #1b2827;
    --all-schedule-v2-line: #67a39a;
    --all-schedule-v2-border: var(--lesson-consultation-border);
    background: var(--lesson-consultation-surface);
    border-color: var(--lesson-consultation-border);
    border-left-color: var(--lesson-consultation-accent);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry.lesson-other {
    --all-schedule-v2-week-fill: #26232d;
    --all-schedule-v2-week-empty-bg: #1e1a25;
    --all-schedule-v2-week-number: #493c5a;
    --all-schedule-v2-week-number-active: #5d4b72;
    --all-schedule-v2-title-color: #cbbfda;
    --all-schedule-v2-profile-color: #a292b9;
    --all-schedule-v2-chip-bg: #40364e;
    --all-schedule-v2-chip-border: #695785;
    --all-schedule-v2-chip-color: #b5a3cf;
    --all-schedule-v2-card-bg: #26232d;
    --all-schedule-v2-line: #9880c0;
    --all-schedule-v2-border: var(--lesson-other-border);
    background: var(--lesson-other-surface);
    border-color: var(--lesson-other-border);
    border-left-color: var(--lesson-other-accent);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-week-fill {
    /* A filled week is part of the subject surface, not a second highlight. */
    background: var(--all-schedule-v2-week-fill);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-weeks {
    /* Empty weeks stay discoverable while remaining darker than the card surface. */
    background: var(--all-schedule-v2-week-empty-bg);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-week-number {
    color: var(--all-schedule-v2-week-number);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-week-number.is-active {
    color: var(--all-schedule-v2-week-number-active);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card-title {
    color: var(--all-schedule-v2-title-color);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card-profile {
    color: var(--all-schedule-v2-profile-color);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card-meta {
    color: var(--all-schedule-v2-profile-color);
}

html[data-ui-theme="dark"] #group-grid.is-all-schedule-v2 .all-schedule-v2-entry .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--all-schedule-v2-chip-bg);
    border-color: var(--all-schedule-v2-chip-border);
    color: var(--all-schedule-v2-chip-color);
}

/* A selected/linked lesson is the one intentional text-emphasis state. */
html[data-ui-theme="dark"] #group-grid .lesson-card:is(.is-active-slot, .is-linked-hover) .lesson-card-title,
html[data-ui-theme="dark"] #group-grid .lesson-card:is(.is-active-slot, .is-linked-hover) .lesson-card-room,
html[data-ui-theme="dark"] #group-grid .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-title,
html[data-ui-theme="dark"] #group-grid .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-room {
    color: var(--lesson-selected-title-text);
}

html[data-ui-theme="dark"] #group-grid .lesson-card:is(.is-active-slot, .is-linked-hover) .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid .lesson-card:is(.is-active-slot, .is-linked-hover) .lesson-card-meta,
html[data-ui-theme="dark"] #group-grid .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid .all-schedule-v2-entry:is(.is-active-slot, .is-linked-hover) .lesson-card-meta {
    color: var(--color-text-control-hover);
}

/* Conflict meaning remains stronger than the muted subject palette. */
html[data-ui-theme="dark"] #group-grid .lesson-card.has-conflict {
    border-right-color: var(--conflict-color-strong);
}

/* Keep the regular week sheets in the same muted subject palette as the
 * all-weeks sheet. Conflict chips stay red in the semantic layer above. */
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lecture .lesson-card-title,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lecture .lesson-card-room {
    color: var(--lesson-lecture-title-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lecture .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lecture .lesson-card-meta {
    color: var(--lesson-lecture-meta-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-practice .lesson-card-title,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-practice .lesson-card-room {
    color: var(--lesson-practice-title-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-practice .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-practice .lesson-card-meta {
    color: var(--lesson-practice-meta-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lab .lesson-card-title,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lab .lesson-card-room,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-credit .lesson-card-title,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-credit .lesson-card-room {
    color: var(--lesson-lab-title-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lab .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lab .lesson-card-meta,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-credit .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-credit .lesson-card-meta {
    color: var(--lesson-lab-meta-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-exam .lesson-card-title,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-exam .lesson-card-room {
    color: var(--lesson-exam-title-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-exam .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-exam .lesson-card-meta {
    color: var(--lesson-exam-meta-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-consultation .lesson-card-title,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-consultation .lesson-card-room {
    color: var(--lesson-consultation-title-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-consultation .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-consultation .lesson-card-meta {
    color: var(--lesson-consultation-meta-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-other .lesson-card-title,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-other .lesson-card-room {
    color: var(--lesson-other-title-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-other .lesson-card-profile,
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-other .lesson-card-meta {
    color: var(--lesson-other-meta-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lecture .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--lesson-lecture-chip-surface);
    border-color: var(--lesson-lecture-chip-border);
    color: var(--lesson-lecture-chip-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-practice .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--lesson-practice-chip-surface);
    border-color: var(--lesson-practice-chip-border);
    color: var(--lesson-practice-chip-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-lab .lesson-card-indicators .lesson-chip:not(.conflict),
html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-credit .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--lesson-lab-chip-surface);
    border-color: var(--lesson-lab-chip-border);
    color: var(--lesson-lab-chip-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-exam .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--lesson-exam-chip-surface);
    border-color: var(--lesson-exam-chip-border);
    color: var(--lesson-exam-chip-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-consultation .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--lesson-consultation-chip-surface);
    border-color: var(--lesson-consultation-chip-border);
    color: var(--lesson-consultation-chip-text);
}

html[data-ui-theme="dark"] #group-grid:not(.is-all-schedule-v2) .lesson-card.lesson-other .lesson-card-indicators .lesson-chip:not(.conflict) {
    background: var(--lesson-other-chip-surface);
    border-color: var(--lesson-other-chip-border);
    color: var(--lesson-other-chip-text);
}

/* Keep legend labels neutral; only the type marker carries the card color. */
html[data-ui-theme="dark"] .grid-workspace .grid-top-legend > span:not(.grid-indicator-sample) {
    color: var(--color-text-secondary);
}

html[data-ui-theme="dark"] .grid-workspace .grid-top-legend .lesson-dot.lesson-lecture {
    background: var(--lesson-lecture-accent);
}

html[data-ui-theme="dark"] .grid-workspace .grid-top-legend .lesson-dot.lesson-practice {
    background: var(--lesson-practice-accent);
}

html[data-ui-theme="dark"] .grid-workspace .grid-top-legend .lesson-dot.lesson-credit {
    background: var(--lesson-lab-accent);
}

html[data-ui-theme="dark"] .grid-workspace .grid-top-legend .lesson-dot.lesson-exam {
    background: var(--lesson-exam-accent);
}

html[data-ui-theme="dark"] .grid-workspace .grid-top-legend .lesson-dot.lesson-consultation {
    background: var(--lesson-consultation-accent);
}

/* Study graph palette belongs to the theme; component geometry stays shared. */
html[data-ui-theme="dark"] .grid-study-graph {
    --study-graph-profile-surface: #1d1d1e;
    --study-graph-hover-surface: #252525;
    --study-graph-border-strong: #303030;
    --study-graph-profile-text: #d8d8d8;
    --study-graph-lecture-surface: #1d2b22;
    --study-graph-practice-surface: #1f2935;
    --study-graph-lab-surface: #2c281c;
    --study-graph-exam-surface: #2d2023;
    --study-graph-consultation-surface: #1d2b29;
    --study-graph-other-surface: #292431;
    --study-graph-lecture-text: #9fbea9;
    --study-graph-practice-text: #a5b9d0;
    --study-graph-lab-text: #c1b47f;
    --study-graph-exam-text: #c99aa3;
    --study-graph-consultation-text: #a8c8c0;
    --study-graph-other-text: #b5a3cf;
}
html[data-ui-theme="dark"] .schedules-map-create {
    background: var(--color-surface);
}
