:root {
    /* Core Colors */
    /* Accent / links / borders — darker blue (≈ Tailwind blue-600) */
    --primary-color: #2563eb;
    /* Filled primary controls (.btn-primary, .view-toggle active) — lighter (≈ blue-500); hover steps to --primary-color */
    --primary-button-bg: #3b82f6;
    --primary-button-hover: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --sidebar-width: 260px;
    --header-height: 64px;
    /* Fixed .page-actions vertical footprint; keep in sync if bar styling changes */
    --page-actions-height: 4.5rem;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Stacking — seat map “full screen” panel is 5000; dialogs must stack above it */
    --z-seat-plan-workspace-fs: 5000;
    --z-modal-overlay: 6000;

    /* Sidebar Theme Variables (Default Dark) */
    --sidebar-bg: #0f172a;
    --sidebar-border: #1e293b;
    --sidebar-text: #f1f5f9;
    --sidebar-header-text: #ffffff;
    --sidebar-header-bg-start: #0f172a;
    --sidebar-header-bg-end: #1e293b;
    --sidebar-item-text: #94a3b8;
    --sidebar-hover-bg: #1e293b;
    --sidebar-hover-text: #f8fafc;
    --sidebar-group-header: #64748b;
    --sidebar-sub-item: #cbd5e1;
    /* Slightly stronger than --sidebar-border for section breaks in the menu scroll area */
    --sidebar-section-divider: rgba(148, 163, 184, 0.16);
}

/* Sidebar Collapsed State */
body.sidebar-collapsed {
    --sidebar-width: 70px;
}

body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .version-badge,
body.sidebar-collapsed .nav-group-header,
body.sidebar-collapsed #theme-text {
    display: none;
}

body.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

body.sidebar-collapsed .sidebar-footer {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
    gap: 0.75rem;
}

body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .nav-sub-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    font-size: 0;
    /* Hide text properly */
}

body.sidebar-collapsed .nav-item svg,
body.sidebar-collapsed .nav-sub-item svg,
body.sidebar-collapsed #theme-toggle svg {
    margin-right: 0 !important;
}

body.sidebar-collapsed #theme-toggle {
    justify-content: center !important;
    padding: 0.5rem !important;
    width: 100% !important;
}

body.sidebar-collapsed #sidebar-collapse-btn {
    width: 100% !important;
}

/* Padding + separator under sidebar search (divider matches menu section rules) */
.sidebar-search-container {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sidebar-section-divider);
}

/* Hide search box when sidebar is collapsed */
body.sidebar-collapsed .sidebar-search-container {
    display: none;
}

/* Sidebar Toggle Button Specifics */
#sidebar-collapse-btn {
    color: var(--sidebar-item-text);
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    opacity: 0.7;
}

#sidebar-collapse-btn:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-text);
}

body.light-mode #sidebar-collapse-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--sidebar-text);
}

/* Tooltip on hover for collapsed (simple browser tooltip via title attr, handling in PHP) */

/* Light Mode Overrides */
body.light-mode {
    --sidebar-bg: #ffffff;
    --sidebar-border: #e2e8f0;
    --sidebar-text: #1e293b;
    --sidebar-header-text: #0f172a;
    --sidebar-header-bg-start: #ffffff;
    --sidebar-header-bg-end: #f8fafc;
    --sidebar-item-text: #64748b;
    --sidebar-hover-bg: #f1f5f9;
    --sidebar-hover-text: #0f172a;
    --sidebar-group-header: #94a3b8;
    --sidebar-sub-item: #475569;
    --sidebar-section-divider: rgba(148, 163, 184, 0.20);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    /* Slate 900 */
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    color: var(--sidebar-text);
    transition: background-color 0.3s, border-color 0.3s;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sidebar-header-text);
    border-bottom: 1px solid var(--sidebar-border);
    letter-spacing: -0.025em;
    background: linear-gradient(to right, var(--sidebar-header-bg-start), var(--sidebar-header-bg-end));
    justify-content: space-between;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: scroll;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.375rem;
    border-radius: 0.5rem;
    color: var(--sidebar-item-text);
    /* Slate 400 */
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

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

.nav-item.active {
    background-color: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.nav-item.active:hover {
    background-color: rgba(59, 130, 246, 0.28);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #60a5fa;
}

body.light-mode .nav-item.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

body.light-mode .nav-item.active:hover {
    background-color: #dbeafe;
    color: var(--primary-hover);
    box-shadow: inset 3px 0 0 var(--primary-hover);
}

.nav-group-header {
    padding: 1.5rem 1rem 0.5rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-group-header);
    /* Slate 500 */
    font-weight: 700;
    margin-top: 0.5rem;
    border-top: 1px solid var(--sidebar-section-divider);
}

.nav-group-header:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 1rem;
}

.nav-section {
    border-top: 1px solid var(--sidebar-section-divider);
    margin: 0;
    padding-block: 0.5625rem;
}

.nav-section-toggle {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    /* Grid centers label + chevron more reliably than flex for dense uppercase rows */
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.4375rem 0.75rem;
    min-height: 2.25rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--sidebar-group-header);
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: left;
    text-transform: uppercase;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.nav-section-toggle:hover,
.nav-section-toggle:focus-visible {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-hover-text);
    outline: none;
}

.nav-section.open > .nav-section-toggle,
.nav-section.active-section > .nav-section-toggle {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--sidebar-section-divider);
    color: var(--sidebar-hover-text);
}

body.light-mode .nav-section.open > .nav-section-toggle,
body.light-mode .nav-section.active-section > .nav-section-toggle {
    background: #f8fafc;
    border-color: var(--sidebar-section-divider);
    color: var(--sidebar-header-text);
}

.nav-section.open > .nav-section-toggle:hover,
.nav-section.open > .nav-section-toggle:focus-visible,
.nav-section.active-section > .nav-section-toggle:hover,
.nav-section.active-section > .nav-section-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(148, 163, 184, 0.24);
    color: var(--sidebar-header-text);
}

body.light-mode .nav-section.open > .nav-section-toggle:hover,
body.light-mode .nav-section.open > .nav-section-toggle:focus-visible,
body.light-mode .nav-section.active-section > .nav-section-toggle:hover,
body.light-mode .nav-section.active-section > .nav-section-toggle:focus-visible {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.32);
    color: var(--sidebar-header-text);
}

.nav-section.open > .nav-section-panel {
    margin-top: 0.25rem;
}

.nav-section-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nav-section-chevron {
    display: block;
    width: 14px;
    height: 14px;
    transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-section.open > .nav-section-toggle .nav-section-chevron {
    transform: rotate(180deg);
}

/* Sliding accordion panel (grid 0fr → 1fr — avoids display:none blink) */
.nav-section-panel {
    display: grid;
    grid-template-rows: 0fr;
    min-height: 0;
    overflow: hidden;
    transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-section.open > .nav-section-panel,
.nav-section.search-match > .nav-section-panel {
    grid-template-rows: 1fr;
}

.nav-section-items {
    display: block;
    min-height: 0;
    overflow: hidden;
    /* Padding only when expanded — otherwise it leaks height below the toggle at 0fr */
    padding-bottom: 0;
    opacity: 0;
    transition: opacity 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-section.open > .nav-section-panel > .nav-section-items,
.nav-section.search-match > .nav-section-panel > .nav-section-items {
    opacity: 1;
    padding-bottom: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .nav-section-panel {
        transition-duration: 0.01ms !important;
    }
    .nav-section-items {
        transition-duration: 0.01ms !important;
    }
    .nav-section-chevron {
        transition-duration: 0.01ms !important;
    }
}

body.sidebar-collapsed .nav-section {
    border-top: 1px solid var(--sidebar-section-divider);
    margin: 0;
    padding-block: 0.5625rem;
}

body.sidebar-collapsed .nav-section-toggle {
    grid-template-columns: 1fr;
    justify-items: center;
    height: auto;
    min-height: 40px;
    padding: 0.5rem 0;
}

body.sidebar-collapsed .nav-section-title {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0;
    letter-spacing: 0;
}

body.sidebar-collapsed .nav-section-title::after {
    content: attr(data-short-label);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

body.light-mode.sidebar-collapsed .nav-section-title {
    background: rgba(15, 23, 42, 0.06);
}

body.sidebar-collapsed .nav-section.open > .nav-section-toggle .nav-section-title,
body.sidebar-collapsed .nav-section.active-section > .nav-section-toggle .nav-section-title {
    background: rgba(255, 255, 255, 0.10);
    color: var(--sidebar-header-text);
}

body.light-mode.sidebar-collapsed .nav-section.open > .nav-section-toggle .nav-section-title,
body.light-mode.sidebar-collapsed .nav-section.active-section > .nav-section-toggle .nav-section-title {
    background: rgba(15, 23, 42, 0.08);
    color: var(--sidebar-header-text);
}

body.sidebar-collapsed .nav-section-chevron {
    display: none;
}

body.sidebar-collapsed .nav-section.open > .nav-section-panel,
body.sidebar-collapsed .nav-section.search-match > .nav-section-panel {
    grid-template-rows: 1fr;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    color: var(--sidebar-sub-item);
    /* Slate 300 */
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    border-left: 3px solid transparent;
    box-sizing: border-box;
}

.nav-sub-item:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-header-text);
    /* Use header text color for hover state on light mode */
}

.nav-sub-item.active {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-header-text);
    border-left-color: var(--primary-color);
}

.nav-sub-item.active:hover {
    background-color: rgba(59, 130, 246, 0.22);
    color: #ffffff;
    border-left-color: #60a5fa;
}

/* Light mode active state adjustment */
body.light-mode .nav-sub-item.active {
    background-color: #eff6ff;
    color: var(--primary-color);
}

body.light-mode .nav-sub-item.active:hover {
    background-color: #dbeafe;
    color: var(--primary-hover);
    border-left-color: var(--primary-hover);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    height: var(--header-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.top-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
}

.header-page-icon {
    width: 2rem;
    height: 2rem;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#page-toolbar-portal {
    position: relative; /* establishes containing block for dp-panel if needed */
    flex-shrink: 0;     /* don't compress when page-content grows */
    padding: 0; /* no padding until real toolbar content is moved here (see main layout JS) */
    min-height: 0;
}
/* Do not rely on :empty — whitespace text nodes between tags are not :empty and used to double top spacing with .page-content */
#page-toolbar-portal.page-toolbar-portal--has-content {
    padding: 2rem 2rem 0; /* match .page-content horizontal padding; no bottom so panel's margin-bottom handles spacing */
}

.page-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Whitespace/newlines between PHP output chunks become text nodes and can create extra   vertical gap (line boxes). Collapse that without affecting typography inside blocks. */
.page-view {
    line-height: 0;
}
.page-view > * {
    line-height: normal;
}

.app-footer {
    position: static;
    display: block;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Components */
.card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid transparent;
}

.btn-standard {
    height: 38px;
    font-family: inherit;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.btn-standard:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-outline):not(.btn-dark):hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}
.btn-md:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-outline):not(.btn-dark):hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}
.btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-outline):not(.btn-dark):hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.btn-primary {
    background-color: var(--primary-button-bg);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-button-hover);
}

.btn:disabled, .btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-soft {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.btn-soft:hover {
    background-color: #bfdbfe;
    color: #1e3a8a;
    border-color: #93c5fd;
}

.btn-back {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.btn-back:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #94a3b8;
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #eff6ff;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-outline-success {
    background-color: transparent;
    border: 1px solid var(--success);
    color: var(--success);
}

.btn-outline-success:hover {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-icon-danger {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-icon-danger:hover {
    color: var(--danger);
    background: #fee2e2;
    border-radius: 4px;
}

.btn-icon {
    background: transparent;
    border: 0;
    box-shadow: none;
    outline: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
}

.btn-icon:hover,
a.btn-icon:hover {
    color: var(--primary-color);
    background: #dbeafe;
    border-radius: 4px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    background-color: #f9fafb;
    border-bottom: 1px solid var(--border-color);
}

thead tr:first-child th:first-child {
    border-top-left-radius: 0.5rem;
}

thead tr:first-child th:last-child {
    border-top-right-radius: 0.5rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

th:first-child,
td:first-child {
    padding-left: 1.5rem;
}

th:last-child,
td:last-child {
    padding-right: 1.5rem;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f7f9fc;
}

/* Animations */
@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0px rgba(59, 130, 246, 0.5);
        border-color: var(--primary-color);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
        border-color: var(--primary-color);
    }

    100% {
        box-shadow: 0 0 0 0px rgba(59, 130, 246, 0);
    }
}

.highlight-card {
    animation: highlight-pulse 0.6s ease-out;
    border: 1px solid var(--primary-color) !important;
}

/* Settings → Exam Halls: row state while editing / after save */
.exam-halls-table tbody tr.room-row-editing td {
    background-color: #e0f2fe;
}

.exam-halls-table tbody tr.room-row-editing:hover td {
    background-color: #bae6fd;
}

@keyframes exam-hall-row-saved-flash {
    0% {
        background-color: #bbf7d0;
    }

    40% {
        background-color: #4ade80;
    }

    100% {
        background-color: transparent;
    }
}

.exam-halls-table tbody tr.room-row-flash-success td {
    animation: exam-hall-row-saved-flash 1.1s ease-out forwards;
}

.badge-quick-add {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.badge-quick-add:hover {
    background: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
}

/* Global Input Styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select {
    cursor: pointer;
    position: relative;
    height: 38px;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
}

/* Date/datetime: must keep native appearance or Chrome/Edge hide the calendar picker */
input[type="date"],
input[type="datetime-local"] {
    cursor: pointer;
    position: relative;
    height: 38px;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    -webkit-appearance: auto;
    appearance: auto;
}

/*
 * Sidebar menu search — placed after global input[type=text] so padding/border are not overridden (that caused placeholder text to overlap the icon).
 */
.sidebar-search-inner {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-inner > svg {
    position: absolute;
    left: 11px;
    color: var(--sidebar-item-text);
    opacity: 0.85;
    pointer-events: none;
    flex-shrink: 0;
}

.sidebar-search-container input[type="text"] {
    width: 100%;
    /* left inset clears icon (~16px from 11px) + spacing before typed text */
    padding: 0.45rem 0.625rem 0.45rem 2.5rem;
    border-radius: 6px;
    border: 1px solid var(--sidebar-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--sidebar-text);
    outline: none;
    font-size: 0.9em;
    height: 36px;
    cursor: text;
    -webkit-appearance: none;
    appearance: none;
}

.sidebar-search-container input[type="text"]::placeholder {
    color: var(--sidebar-item-text);
    opacity: 1;
}

body.light-mode .sidebar-search-container input[type="text"] {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--sidebar-border);
    color: var(--sidebar-text);
}

body.light-mode .sidebar-search-inner > svg {
    opacity: 0.7;
}

/* Inside form groups, inputs fill full width */
.form-group input[type="date"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.modal-body input[type="date"],
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"],
.modal-body input[type="tel"],
.modal-body input[type="number"],
.modal-body select {
    width: 100%;
    display: block;
}

/* Standardized Modal Close Button */
.modal-header {
    position: relative;
    padding-right: 3rem;
    /* Provide space for absolute close btn */
}

.modal-close-btn {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background-color: #fee2e2;
    color: #dc2626;
    transform: scale(1.05);
}

/* Modal Layout */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal-overlay, 6000);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.close {
    color: #64748b;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: var(--danger);
    text-decoration: none;
}
/* ── User Avatar ────────────────────────────────────────────────────── */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    display: block;
    flex-shrink: 0;
}
.user-avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.avatar-preview-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}
.avatar-initials-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ── Quick Access Bar ───────────────────────────────────────────────── */
.quick-access-bar {
    display: flex;
    align-items: center;
    gap: 2px;
}
.qa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.qa-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border-color);
    color: var(--primary-color);
}
.qa-btn.qa-active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: transparent;
}
.qa-edit-btn {
    opacity: 0.45;
}
.qa-edit-btn:hover {
    opacity: 1;
}

/* ── Quick Access Customizer Modal ──────────────────────────────────── */
.qa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-overlay, 6000);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qa-modal-box {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.qa-modal-header {
    position: relative;
    padding: 1.25rem 3rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
    flex-shrink: 0;
}
.qa-modal-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}
.qa-modal-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: background 0.15s;
}
.qa-modal-close:hover { background: #e2e8f0; color: #1e293b; }
.qa-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.qa-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Quick Access Checkbox Row (modal + profile page) ───────────────── */
.qa-check-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 5px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-color);
    user-select: none;
}
.qa-check-row:hover { background: rgba(0, 0, 0, 0.04); }
.qa-check-row input[type=checkbox] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}
.qa-check-row svg { flex-shrink: 0; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM v2 — Components
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────────────── */
:root {
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --panel-header-bg: #f8fafc;
    /* Padding-y (0.875rem each) + btn-md (34px) — stable header with or without actions */
    --panel-header-min-height: calc(1.75rem + 34px);
    --text-color: #1e293b;
    --text-secondary: #475569;
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Panel ──────────────────────────────────────────────────────────── */
.panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.panel.dp-overflow,
.card.dp-overflow { overflow: visible; }
.modal-body.dp-overflow { overflow: visible; }
.panel-header {
    padding: 0.875rem 1.25rem;
    min-height: var(--panel-header-min-height, calc(1.75rem + 34px));
    background: var(--panel-header-bg);
    border-bottom: 1px solid #e2e8f0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.panel-header:last-child {
    border-radius: var(--radius-xl);
    border-bottom: none;
}

/* Students list: pagination bar keeps stable height with or without page controls */
.students-pagination-bar {
    min-height: 2.75rem;
    box-sizing: border-box;
}

.panel-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.panel-body { padding: 1.25rem; }
.panel-body-flush { padding: 0; }

/* Hall Allotment (manage date) — filter / action bar */
.hall-allotment-toolbar.panel {
    margin-bottom: 2rem;
}
.hall-allotment-toolbar__date {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.hall-allotment-session-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Seat map — empty / warning callouts (match design-preview panels) */
.panel.seat-plan-callout-panel {
    margin-bottom: 0;
}
.panel.seat-plan-callout-panel--warning {
    border-color: #fecaca;
    background: #fffafa;
}

/* Seat map workspace — single panel, room strip + grid (allocations/seat-plan/map) */
.panel.seat-plan-workspace {
    /* Default .panel is overflow:hidden, which clips seat hover tooltips */
    overflow: visible;
}
.panel-body.seat-plan-workspace__body {
    padding: 0;
}
.seat-plan-workspace__header {
    min-height: auto;
}
.seat-plan-workspace__header-stats {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main, #1e293b);
    flex: 1 1 14rem;
    min-width: 0;
    line-height: 1.35;
}
.seat-plan-workspace__header-trailing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    flex: 0 1 auto;
    margin-left: auto;
    justify-content: flex-end;
}
.seat-plan-workspace__header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    align-items: center;
    flex: 0 1 auto;
    margin-left: 0;
}
.seat-plan-workspace__expand-btn {
    flex-shrink: 0;
    padding: 0.32rem 0.5rem;
    line-height: 1;
}
.seat-plan-workspace__expand-btn .seat-plan-fs-icon {
    display: block;
}

/* Seat map panel only — fixed overlay within the viewport (not browser native fullscreen) */
body.seat-plan-workspace-fs-active {
    overflow: hidden;
}
.panel.seat-plan-workspace.seat-plan-workspace--fullscreen {
    position: fixed;
    inset: 0;
    z-index: var(--z-seat-plan-workspace-fs, 5000);
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.panel.seat-plan-workspace.seat-plan-workspace--fullscreen .panel-header {
    border-radius: 0;
    flex-shrink: 0;
}
.panel.seat-plan-workspace.seat-plan-workspace--fullscreen .panel-body.seat-plan-workspace__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
}
.panel.seat-plan-workspace.seat-plan-workspace--fullscreen .seat-plan-room-strip {
    flex-shrink: 0;
}
.panel.seat-plan-workspace.seat-plan-workspace--fullscreen .seat-plan-layout {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
    align-content: stretch;
}
.panel.seat-plan-workspace.seat-plan-workspace--fullscreen .seat-plan-workspace__sidebar {
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: scroll; /* permanent gutter; matches non-fullscreen sidebar */
}
.panel.seat-plan-workspace.seat-plan-workspace--fullscreen .seat-plan-workspace__main {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow: auto;
}
.seat-plan-room-strip {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.seat-plan-room-strip__label {
    font-size: 0.85rem;
    flex-shrink: 0;
}
/* Count in brackets: must stay readable on btn-primary (selected room tab) */
.seat-plan-room-tab__count {
    font-weight: 500;
    margin-left: 0.1em;
}
.btn-primary.seat-plan-room-tab .seat-plan-room-tab__count {
    color: rgba(255, 255, 255, 0.92);
}
.btn-outline-secondary.seat-plan-room-tab .seat-plan-room-tab__count,
.btn-outline.seat-plan-room-tab .seat-plan-room-tab__count {
    color: var(--text-muted, #64748b);
}
.seat-plan-room-strip__layout-toggle {
    flex-shrink: 0;
    padding: 0.1rem 0;
}
.seat-plan-layout-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-main, #1e293b);
    user-select: none;
}
.seat-plan-layout-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary-color, #2563eb);
    cursor: pointer;
}
.seat-plan-room-strip__divider {
    display: inline-block;
    width: 1px;
    min-height: 1.5rem;
    align-self: stretch;
    background: var(--border-color, #e2e8f0);
    margin: 0 0.15rem;
}
/* Flush split inside workspace panel (no outer gutter — matches design-preview flush patterns) */
.seat-plan-layout {
    display: grid;
    grid-template-columns: minmax(272px, 320px) 1fr;
    gap: 0;
    /* stretch: sidebar and main share row height so grey background fills the left column */
    align-items: stretch;
    overflow: visible;
    margin: 0;
}
.seat-plan-workspace__sidebar {
    border-right: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    /* Align with .seat-plan-room-strip horizontal padding (1.25rem) */
    padding: 1rem 1rem 1.25rem 1.25rem;
    min-width: 0;
    /* Independent scroll: sidebar scrolls on its own while the seat grid stays put */
    max-height: calc(100vh - 196px);
    overflow-y: scroll; /* always show vertical scrollbar gutter (avoids layout shift) */
    overflow-x: hidden;
}
.seat-plan-sidebar-section--courses {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color, #e2e8f0) 85%, #94a3b8);
}
.seat-plan-sidebar-section__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
}
.seat-plan-sidebar-section__hint {
    font-size: 0.78rem;
    line-height: 1.35;
    margin: 0 0 0.65rem;
}
.seat-plan-course-order-actions {
    margin: -0.15rem 0 0.55rem;
    font-size: 0.78rem;
}
.seat-plan-course-accordions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.seat-plan-year-accordion {
    border: 1px solid color-mix(in srgb, var(--border-color, #e2e8f0) 90%, #94a3b8);
    border-radius: var(--radius-md, 8px);
    background: var(--card-bg, #fff);
    overflow: hidden;
}
.seat-plan-year-accordion > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-muted, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.seat-plan-year-accordion > summary::-webkit-details-marker {
    display: none;
}
.seat-plan-year-accordion__reset {
    flex-shrink: 0;
    font-size: 0.72rem !important;
}
.seat-plan-year-accordion .seat-plan-courses-badges {
    padding: 0.45rem 0.5rem 0.55rem;
}
.seat-plan-auto-modal .modal-body.seat-plan-auto-modal__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    column-gap: 0;
}
.seat-plan-auto-modal__pane--rooms {
    padding: 0.2rem 1.25rem 0.25rem 0.15rem;
    border-right: 1px solid var(--border-color, #e2e8f0);
}
.seat-plan-auto-modal__pane--options {
    padding: 0.2rem 0.1rem 0.25rem 1.5rem;
}
.seat-plan-auto-modal__options-inner {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 0.35rem 0.15rem 0.5rem 0.35rem;
    min-height: 100%;
}
.seat-plan-auto-modal__options-inner .seat-plan-auto-modal__pane-title {
    margin-bottom: 0.15rem;
}
@media (max-width: 900px) {
    .seat-plan-auto-modal .modal-body.seat-plan-auto-modal__body {
        grid-template-columns: 1fr;
    }
    .seat-plan-auto-modal__pane--rooms {
        padding-right: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border-color, #e2e8f0);
        padding-bottom: 1.25rem;
        margin-bottom: 0.25rem;
    }
    .seat-plan-auto-modal__pane--options {
        padding-left: 0;
        padding-top: 0.75rem;
    }
}
.seat-plan-auto-modal__pane-title {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    letter-spacing: -0.01em;
}
.seat-plan-auto-modal__hint {
    font-size: 0.78rem;
    margin: 0 0 0.5rem;
}
.seat-plan-auto-modal__bulk {
    margin: 0 0 0.5rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
/* Scroll list spacing matches stock handover #available-dates-list */
.seat-plan-auto-modal__rooms {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.3rem 0.2rem 0.4rem 0;
}
/* Compact single-line row: name · available/total · order */
.seat-plan-modal-room-card {
    font-size: 0.8rem;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md, 0.5rem);
    background: var(--card-bg, #fff);
    padding: 0.4rem 0.6rem 0.42rem;
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.seat-plan-modal-room-card:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}
/* Same light grey as .modal-header / .modal-footer ( --panel-header-bg ) */
.seat-plan-modal-room-card:has(.seat-plan-modal-inc:checked) {
    background: var(--panel-header-bg, #f8fafc);
    border-color: #e5e7eb;
}
.seat-plan-modal-room-card:has(.seat-plan-modal-inc:checked):hover {
    background: color-mix(in srgb, #0f172a 3%, var(--panel-header-bg, #f8fafc));
    border-color: #e5e7eb;
}
.seat-plan-modal-room-card__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem 0.55rem;
    flex-wrap: nowrap;
    min-width: 0;
}
.seat-plan-modal-room-inc-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    min-width: 0;
    flex: 1 1 0;
}
.seat-plan-modal-room-card .seat-plan-modal-inc {
    outline: none;
}
.seat-plan-modal-room-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
    font-size: 0.8125rem;
}
/* available / total — compact, scannable; tooltip has full detail */
.seat-plan-modal-room-card__cap {
    display: inline-flex;
    align-items: baseline;
    flex-shrink: 0;
    font-size: 0.75rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #6b7280;
    white-space: nowrap;
    user-select: none;
    padding: 0.12rem 0.28rem;
    border-radius: 4px;
    background: rgba(243, 244, 246, 0.85);
    border: 1px solid #e5e7eb;
}
.seat-plan-modal-room-card__cap--empty .seat-plan-modal-room-card__cap-free {
    color: #b45309;
}
.seat-plan-modal-room-card__cap-sep {
    font-weight: 500;
    margin: 0 0.05rem;
    color: #9ca3af;
}
.seat-plan-modal-room-card__cap-total {
    font-weight: 500;
    color: #6b7280;
}
.seat-plan-modal-room-card__cap-free {
    color: #374151;
    font-weight: 600;
}
.seat-plan-modal-room-card__fill {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    flex-shrink: 0;
    margin-left: auto;
}
.seat-plan-modal-room-card__fill-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}
.seat-plan-modal-fill-order {
    width: auto;
    min-width: 2.6rem;
    max-width: 3.1rem;
    height: 26px;
    padding: 0 1.25rem 0 0.32rem;
    box-sizing: border-box;
    border-radius: var(--radius-md, 0.5rem);
    border: 1px solid var(--border-color, #e2e8f0);
    font: inherit;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--text-main, #1e293b);
    background-color: var(--card-bg, #fff);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.28rem center;
    background-size: 10px;
}
.seat-plan-modal-fill-order:focus {
    outline: none;
    box-shadow: none;
}
@media (max-width: 640px) {
    .seat-plan-modal-room-card__header {
        flex-wrap: wrap;
    }
    .seat-plan-modal-room-card__fill {
        margin-left: auto;
    }
}
.seat-plan-auto-modal__opt-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
    border-radius: var(--radius-md, 0.5rem);
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, #fff);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.seat-plan-auto-modal__opt-card:hover {
    border-color: color-mix(in srgb, var(--primary-color, #2563eb) 28%, var(--border-color, #e2e8f0));
    background: color-mix(in srgb, var(--primary-color, #2563eb) 5%, var(--card-bg, #fff));
}
.seat-plan-auto-modal__opt-card:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary-color, #2563eb) 38%, var(--border-color, #e2e8f0));
    background: color-mix(in srgb, var(--primary-color, #2563eb) 6%, var(--card-bg, #fff));
}
.seat-plan-auto-modal__opt-card input[type="checkbox"] {
    width: 1.0625rem;
    height: 1.0625rem;
    flex-shrink: 0;
    margin: 0.15rem 0 0;
    cursor: pointer;
    accent-color: var(--primary-color, #2563eb);
    outline: none;
}
.seat-plan-auto-modal__opt-card-text {
    flex: 1;
    min-width: 0;
}
.seat-plan-auto-modal__radio-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
}
.seat-plan-auto-modal__radio-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.7rem 0.9rem;
    font-size: 0.84rem;
    line-height: 1.35;
    cursor: pointer;
    border-radius: var(--radius-md, 0.5rem);
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, #fff);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, background 0.15s;
}
.seat-plan-auto-modal__radio-card:hover {
    border-color: color-mix(in srgb, var(--primary-color, #2563eb) 28%, var(--border-color, #e2e8f0));
    background: color-mix(in srgb, var(--primary-color, #2563eb) 4%, var(--card-bg, #fff));
}
.seat-plan-auto-modal__radio-card:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary-color, #2563eb) 45%, var(--border-color, #e2e8f0));
    background: color-mix(in srgb, var(--primary-color, #2563eb) 7%, var(--card-bg, #fff));
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}
.seat-plan-auto-modal__radio-card input[type="radio"] {
    width: 1.0625rem;
    height: 1.0625rem;
    min-width: 1.0625rem;
    min-height: 1.0625rem;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
    accent-color: var(--primary-color, #2563eb);
    outline: none;
}
.seat-plan-auto-modal__radio-card-text {
    flex: 1;
    min-width: 0;
}
.seat-plan-auto-modal__warn {
    margin: 0;
    padding: 0.5rem 0.65rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: var(--radius-md, 0.5rem);
    font-size: 0.8rem;
    line-height: 1.35;
}
/* Warning left, Cancel / Run right (same bar as .modal-footer) */
.seat-plan-auto-modal__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}
.seat-plan-auto-modal__footer .seat-plan-auto-modal__warn {
    flex: 1 1 12rem;
    min-width: 0;
    text-align: left;
}
.seat-plan-auto-modal__footer-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}
.seat-plan-auto-modal__fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}
.seat-plan-auto-modal__legend {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0;
}
.seat-plan-auto-modal__year-table-wrap {
    overflow-x: auto;
    margin-top: 0;
}
/* Uses shared .table-wrap.table-sm from design standard (settings/design-preview) */
.table-wrap .seat-plan-auto-modal__year-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.seat-plan-auto-modal__year-table td.seat-plan-auto-modal__td-sep {
    text-align: center;
    vertical-align: middle;
}
.seat-plan-modal-priority.form-select-like,
.seat-plan-modal-priority {
    width: 100%;
    max-width: 11rem;
    padding: 0.28rem 0.4rem;
    border-radius: var(--radius-md, 0.5rem);
    border: 1px solid var(--border-color, #e2e8f0);
    font: inherit;
    font-size: 0.8125rem;
    color: var(--text-main, #1e293b);
    background: var(--card-bg, #fff);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.seat-plan-modal-priority:focus {
    outline: none;
    box-shadow: none;
}
.btn-link-like {
    background: none;
    border: 0;
    padding: 0;
    color: var(--primary-color, #2563eb);
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
}
.btn-link-like:hover {
    color: var(--primary-color-hover, #1d4ed8);
}
.seat-plan-courses-badges {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
}
.seat-plan-courses-badges.seat-plan-courses-badges--drag-active .seat-plan-course-badge:not(.seat-plan-course-badge--reorder-source) {
    transition: box-shadow 0.1s ease, transform 0.1s ease, padding-top 0.12s ease;
}
.seat-plan-course-badge {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    margin: 0;
    padding: 5px 8px 6px 4px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    border-radius: 8px;
    border: 1.5px solid var(--course-accent, #94a3b8);
    background: color-mix(in srgb, var(--course-accent, #94a3b8) 14%, #ffffff);
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    cursor: default;
    user-select: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.15s ease, padding-top 0.12s ease, padding-bottom 0.12s ease;
}
.seat-plan-course-badge[draggable="true"] {
    cursor: grab;
}
.seat-plan-course-badge[draggable="true"]:active {
    cursor: grabbing;
}
.seat-plan-course-badge[draggable="true"]:hover {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
    border-color: color-mix(in srgb, var(--course-accent, #94a3b8) 55%, #0f172a);
}
.seat-plan-course-badge__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Equal gap on both sides of the code: circle ←gap→ code ←gap→ count */
    gap: 0;
}
.seat-plan-course-badge__meta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    /* Right gap between circle and code */
    margin-right: 9px;
}
.seat-plan-course-badge__priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Fixed square → border-radius 50% makes a true circle */
    width: 1.55rem;
    height: 1.55rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    color: #fff;
    background: rgba(15, 23, 42, 0.58);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}
.seat-plan-course-badge--complete .seat-plan-course-badge__meta {
    /* completion tick is ::after absolutely positioned top-right, no extra padding needed */
}
.seat-plan-course-badge__sort-handle {
    flex: 0 0 11px;
    align-self: stretch;
    min-height: 2.25rem;
    margin-top: 0.15rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--course-accent, #94a3b8) 22%, #f1f5f9);
    position: relative;
    pointer-events: none;
}
.seat-plan-course-badge__sort-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 12px;
    border-left: 2px solid #64748b;
    border-right: 2px solid #64748b;
    box-sizing: content-box;
    opacity: 0.85;
}
.seat-plan-course-badge--reorder-source {
    opacity: 0.55;
    outline: 2px dashed var(--primary-color, #2563eb);
    outline-offset: 1px;
    z-index: 2;
    transform: scale(0.97);
}
/* Insert-before: a bold colored bar at the top + extra top padding to open a visible gap */
.seat-plan-course-badge--insert-before {
    box-shadow: inset 0 4px 0 0 var(--primary-color, #2563eb);
    padding-top: 14px;
}
/* Insert at end: bold bar at bottom of last badge */
.seat-plan-course-badge--insert-slot-end {
    box-shadow: inset 0 -4px 0 0 var(--primary-color, #2563eb);
    padding-bottom: 10px;
}
@keyframes seat-plan-badge-land {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color, #2563eb) 30%, transparent); }
    45%  { transform: scale(1.03); }
    100% { transform: scale(1); box-shadow: none; }
}
.seat-plan-course-badge--landed {
    animation: seat-plan-badge-land 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}
/* Completion: same border/background as roster badges; indicator is only ::after tick */
.seat-plan-course-badge--complete::after {
    content: "✓";
    position: absolute;
    top: 3px;
    right: 4px;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: #16a34a;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
}
/* Read-only badges: no grip column */
.seat-plan-course-badge:not(:has(.seat-plan-course-badge__sort-handle)) {
    padding: 6px 8px 7px 8px;
}
.seat-plan-course-badge__code {
    flex: 1 1 auto;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    /* Equal spacing on the right side — mirrors the margin-right on __meta */
    margin-right: 9px;
}
.seat-plan-course-badge--complete .seat-plan-course-badge__code {
    max-width: calc(100% - 1.15rem);
}
.seat-plan-course-badge__count {
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    color: #334155;
    white-space: nowrap;
}
/* ── Course-badge drag placeholders ─────────────────────────────────────── */

/* Source slot: hollow ghost so the list doesn't collapse while dragging */
.seat-plan-drag-source-ph {
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
    border: 2px dashed var(--border-color, #e2e8f0);
    background: transparent;
    opacity: 0.55;
    flex-shrink: 0;
}

/* Target slot: vivid drop-zone showing exactly where the badge will land */
@keyframes target-ph-in {
    from { opacity: 0; transform: scaleY(0.65); }
    to   { opacity: 1; transform: scaleY(1); }
}
.seat-plan-drag-target-ph {
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
    border: 2px dashed var(--primary-color, #2563eb);
    background: color-mix(in srgb, var(--primary-color, #2563eb) 9%, #fff);
    flex-shrink: 0;
    transform-origin: top center;
    animation: target-ph-in 0.14s ease;
}

/* Dragging badge: visually collapsed and removed from flow so only placeholders fill space */
.seat-plan-course-badge--dragging {
    /* Keep in DOM for dragend cleanup but make invisible and size-less */
    visibility: hidden;
    height: 0 !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    border-width: 0 !important;
    overflow: hidden;
    pointer-events: none;
}

/* ── Seat: active drop target — glow + scale up so user feels it "clicks in" */
.seat-plan-seat--drop-over {
    outline: 2.5px solid var(--primary-color, #2563eb) !important;
    outline-offset: 2px;
    background: color-mix(in srgb, var(--primary-color, #2563eb) 9%, var(--card-bg)) !important;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary-color, #2563eb) 18%, transparent) !important;
    transform: scale(1.06);
    z-index: 10;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}
/* Seat: bounce-in after student lands */
@keyframes seat-drop-land {
    0%   { transform: scale(1.08); box-shadow: 0 0 0 7px color-mix(in srgb, var(--primary-color, #2563eb) 28%, transparent); }
    55%  { transform: scale(0.97); }
    100% { transform: scale(1); box-shadow: none; }
}
.seat-plan-seat--drop-landed {
    animation: seat-drop-land 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.seat-plan-pool {
    min-height: 120px;
    padding: 0.5rem;
    border: 2px dashed var(--border-color, #e2e8f0);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.65);
    transition: border-color 0.12s ease, background 0.12s ease;
}
/* Pool: active drop target */
.seat-plan-pool--drop-over {
    border-color: var(--primary-color, #2563eb);
    background: color-mix(in srgb, var(--primary-color, #2563eb) 6%, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #2563eb) 15%, transparent);
}
.seat-plan-workspace__main {
    overflow-x: auto;
    overflow-y: auto;
    min-width: 0;
    max-height: calc(100vh - 196px);
    padding: 1rem 1.25rem 1.25rem;
    background: #fff;
    /* Restore the bottom-right corner that overflow:visible on the panel loses */
    border-bottom-right-radius: var(--radius-xl);
}
/* Two-column layout: sidebar takes bottom-left, main takes bottom-right */
.seat-plan-workspace__sidebar {
    border-bottom-left-radius: var(--radius-xl);
}
@media (max-width: 900px) {
    .seat-plan-layout {
        grid-template-columns: 1fr;
    }
    .seat-plan-workspace__sidebar {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        /* Single-column: sidebar is no longer at the bottom */
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    /* Single-column: main area is now the bottom element, gets both corners */
    .seat-plan-workspace__main {
        border-bottom-left-radius: var(--radius-xl);
    }
}

/* Seat cell: seat no. (fixture) vs register (session allotment)
   Fixed height so empty and occupied cells match (column_layout stacks seats
   on the main axis, so intrinsic heights would otherwise shrink empty seats). */
.seat-plan-seat {
    box-sizing: border-box;
    width: 4.35rem;
    min-width: 4.35rem;
    height: 5.65rem;
    min-height: 5.65rem;
    flex-shrink: 0;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    font-size: 0.65rem;
    padding: 0;
    background: var(--card-bg);
    overflow: hidden;
    gap: 0;
}
/* Allotted seats: light, course-tinted card (accent from --seat-accent set in JS) */
.seat-plan-seat.occupied {
    position: relative;
    overflow: visible;
    border-width: 1.5px;
    background: linear-gradient(
        168deg,
        #ffffff 0%,
        color-mix(in srgb, var(--seat-accent, #64748b) 11%, #f8fafc) 42%,
        color-mix(in srgb, var(--seat-accent, #64748b) 16%, #f1f5f9) 100%
    );
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.92) inset,
        0 2px 8px rgba(15, 23, 42, 0.07);
}
.seat-plan-seat.occupied:hover {
    z-index: 30;
}
/* Match course badges: show draggable affordance (only when JS sets draggable on edit mode) */
.seat-plan-seat.occupied[draggable="true"] {
    cursor: grab;
}
.seat-plan-seat.occupied[draggable="true"]:active {
    cursor: grabbing;
}
/* Empty seats: same hover tooltip as allotted (needs overflow + stacking like .occupied) */
.seat-plan-seat:not(.occupied) {
    position: relative;
    overflow: visible;
}
.seat-plan-seat:not(.occupied):hover {
    z-index: 30;
}
.seat-plan-seat:not(.occupied):hover .seat-plan-seat__tip {
    display: block;
}
/* Multi-line hover detail — below seat so top-row tooltips are not clipped by room strip / overflow */
.seat-plan-seat__tip {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    bottom: auto;
    transform: translateX(-50%);
    box-sizing: border-box;
    min-width: 9.5rem;
    max-width: min(16rem, 70vw);
    padding: 0.4rem 0.5rem 0.45rem;
    border-radius: 7px;
    border: 1px solid color-mix(in srgb, var(--seat-accent, #64748b) 45%, #e2e8f0);
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    font-size: 0.66rem;
    line-height: 1.35;
    font-weight: 500;
    text-align: center;
    color: #0f172a;
    pointer-events: none;
    z-index: 40;
}
.seat-plan-seat__tip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -5px;
    bottom: auto;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #fff;
    border-top-color: transparent;
}
.seat-plan-seat__tip-line {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.seat-plan-seat__tip-line--name {
    font-weight: 700;
    font-size: 0.68rem;
    margin-bottom: 0.12rem;
}
.seat-plan-seat__tip-line--reg {
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #334155;
}
.seat-plan-seat__tip-line--course {
    margin-top: 0.12rem;
    font-weight: 700;
    font-size: 0.64rem;
    color: color-mix(in srgb, var(--seat-accent, #64748b) 35%, #0f172a);
}
.seat-plan-seat.occupied:hover .seat-plan-seat__tip {
    display: block;
}
.seat-plan-seat__tip--empty .seat-plan-seat__tip-line--name {
    color: var(--text-muted, #64748b);
    font-weight: 700;
}
.seat-plan-seat__tip--empty .seat-plan-seat__tip-line--course {
    color: #475569;
}
.seat-plan-seat__phy,
.seat-plan-seat__cad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}
.seat-plan-seat__phy {
    padding: 3px 2px 4px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.seat-da-icon {
    flex-shrink: 0;
    color: #3b82f6;
    vertical-align: middle;
}
.seat-plan-seat.occupied .seat-plan-seat__phy {
    border-bottom-color: color-mix(in srgb, var(--seat-accent, #64748b) 32%, #e2e8f0);
}
.seat-plan-seat__phy-label,
.seat-plan-seat__cad-label {
    font-size: 0.52rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 3px;
    color: var(--text-muted, #64748b);
    max-width: 100%;
    padding: 0 1px;
}
.seat-plan-seat__phy-label {
    color: #3d5a80;
}
.seat-plan-seat__phy-num-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.seat-plan-seat__cad-label {
    color: #5b6f8f;
    font-style: italic;
}
.seat-plan-seat__phy-num {
    display: inline-block;
    min-width: 1.35rem;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #0f172a;
    background: #e8edf5;
    border: 1px solid #c8d4e8;
}
.seat-plan-seat.occupied .seat-plan-seat__phy-num {
    color: #1e293b;
    background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--seat-accent, #64748b) 7%, #f1f5f9) 100%);
    border-color: color-mix(in srgb, var(--seat-accent, #64748b) 40%, #cbd5e1);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--seat-accent, #64748b) 12%, transparent);
}
.seat-plan-seat__cad {
    flex: 1;
    padding: 4px 2px 3px;
    min-height: 1.5rem;
}
.seat-plan-seat__cad-label {
    color: #64748b;
    margin-bottom: 2px;
}
.seat-plan-seat__cad-num {
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: #3d5a80;
}
/* Allotted: brighter register strip */
.seat-plan-seat.occupied .seat-plan-seat__cad {
    padding: 5px 3px 4px;
    background: color-mix(in srgb, var(--seat-accent, #64748b) 9%, rgba(255, 255, 255, 0.55));
    border-radius: 0 0 6px 6px;
}
.seat-plan-seat.occupied .seat-plan-seat__cad-label {
    font-style: normal;
    font-weight: 700;
    font-size: 0.48rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: color-mix(in srgb, var(--seat-accent, #64748b) 48%, #3d5a80);
    margin-bottom: 3px;
}
.seat-plan-seat.occupied .seat-plan-seat__cad-num {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: color-mix(in srgb, var(--seat-accent, #64748b) 22%, #0f172a);
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid color-mix(in srgb, var(--seat-accent, #64748b) 35%, #e2e8f0);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset;
}
.seat-plan-seat__cad--empty {
    flex: 1;
    padding: 5px 2px;
    min-height: 0;
    justify-content: center;
}
.seat-plan-seat__cad-empty {
    font-size: 0.52rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-muted, #94a3b8);
    letter-spacing: 0.02em;
}

/* Alternate seat map: horizontal tile (seat no. left; name + full register right)
   Inner .seat-plan-seat__wide-row clips with border-radius so left/right panes meet
   with a clean vertical seam (no double-rounded “notch” at the junction). Tooltip
   stays a sibling of .wide-row so it is not clipped. */
/* Extended (wide) cards: fixed height so every seat in a visual row matches — including
   column_layout where each column stack sizes independently without a shared row wrapper. */
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat {
    width: 10.35rem;
    min-width: 9.5rem;
    max-width: min(11.75rem, 100%);
    height: 4.55rem;
    min-height: 4.55rem;
    max-height: 4.55rem;
    flex-direction: column;
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__wide-row {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    align-items: stretch;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__phy--side {
    flex: 0 0 3.2rem;
    min-width: 3.2rem;
    max-width: 3.2rem;
    padding: 4px 2px 4px 3px;
    border-bottom: none;
    border-right: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0;
    justify-content: center;
    background: linear-gradient(
        180deg,
        #f1f5f9 0%,
        #e8edf5 100%
    );
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat.occupied .seat-plan-seat__phy--side {
    border-right-color: color-mix(in srgb, var(--seat-accent, #64748b) 35%, #e2e8f0);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--seat-accent, #64748b) 12%, #ffffff) 0%,
        color-mix(in srgb, var(--seat-accent, #64748b) 18%, #f1f5f9) 100%
    );
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__phy--side .seat-plan-seat__phy-label {
    margin-bottom: 3px;
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__phy--side .seat-plan-seat__phy-num {
    border-radius: 4px;
    padding: 1px 4px;
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__detail {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: 0.32rem 0.38rem 0.35rem 0.42rem;
    gap: 0.15rem;
    border-radius: 0;
    background: color-mix(in srgb, var(--seat-accent, #64748b) 8%, rgba(255, 255, 255, 0.72));
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat.occupied .seat-plan-seat__detail {
    background: color-mix(in srgb, var(--seat-accent, #64748b) 10%, rgba(255, 255, 255, 0.55));
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__detail-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    width: 100%;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    word-break: break-word;
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__detail-reg {
    display: block;
    width: 100%;
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: #334155;
    word-break: break-all;
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__detail--empty {
    justify-content: center;
    gap: 0.15rem;
    background: rgba(248, 250, 252, 0.95);
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat:not(.occupied) .seat-plan-seat__detail--empty {
    background: #f8fafc;
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__detail-empty-main {
    font-size: 0.62rem;
    font-weight: 600;
    font-style: italic;
    color: var(--text-muted, #94a3b8);
}
.seat-plan-grid.seat-plan-grid--wide-cards .seat-plan-seat__detail-hint {
    display: block;
    width: 100%;
    font-size: 0.55rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-muted, #64748b);
}

/* ── Exam manage tab empty states (match allocations/seat-plan card) ─ */
.exam-tab-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    max-width: 24rem;
    margin: 0 auto;
    box-sizing: border-box;
    color: var(--text-muted);
}
.exam-tab-empty--in-panel {
    max-width: none;
    padding: 3rem 1.75rem;
}
.exam-tab-empty--compact {
    padding: 1.75rem 1rem;
    max-width: none;
    margin: 0;
}
.exam-tab-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
    color: inherit;
}
.exam-tab-empty--compact .exam-tab-empty__icon {
    margin-bottom: 0.75rem;
}
.exam-tab-empty__icon svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
    display: block;
}
.exam-tab-empty--compact .exam-tab-empty__icon svg {
    width: 32px;
    height: 32px;
}
.exam-tab-empty__title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
}
.exam-tab-empty--compact .exam-tab-empty__title {
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}
.exam-tab-empty__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: inherit;
    max-width: 22rem;
}
.exam-tab-empty--in-panel .exam-tab-empty__text {
    max-width: 26rem;
}
.exam-tab-empty--compact .exam-tab-empty__text {
    font-size: 0.875rem;
    max-width: 36rem;
}
.exam-tab-empty__actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

/* ── Content Header (complex pages only) ────────────────────────────── */
.content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.content-header-left { display: flex; flex-direction: column; gap: 0.25rem; }
.content-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.content-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}
.content-header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* ── Fixed bottom action bar (opt-in) ───────────────────────────────── */
.page-actions {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width, 260px);
    right: 0;
    z-index: 50;
    box-sizing: border-box;
    height: var(--page-actions-height);
    min-height: var(--page-actions-height);
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
}
body.sidebar-collapsed .page-actions { left: 70px; }

/* Global toast stack (see showToast in main layout) — right-aligned, narrow, sits above .page-actions */
#toast-container {
    position: fixed;
    right: 1.25rem;
    z-index: 10060;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: min(20rem, calc(100vw - 2.5rem));
    pointer-events: none;
    bottom: 2rem;
    box-sizing: border-box;
}
body:has(.page-actions:not([hidden])) #toast-container {
    bottom: calc(var(--page-actions-height) + 0.75rem);
}
#toast-container .app-toast {
    pointer-events: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

/* Reserve layout space for fixed bottom bars so .page-content's scrollbar ends above them (padding inside scroll does not shorten the track) */
body:has(.page-actions:not([hidden])) .main-content,
body:has(.hp-actions) .main-content,
body:has(.lps-actions) .main-content,
body:has(.cap-actions) .main-content {
    padding-bottom: var(--page-actions-height);
}

/* ── Form components ─────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.form-group:last-child { margin-bottom: 0; }
.form-group label,
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}
.form-group .required { color: var(--danger); margin-left: 2px; }
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.form-row .form-group { flex: 1; min-width: 160px; margin-bottom: 0; }
.form-hint { font-size: 0.78rem; color: #94a3b8; margin-top: 0.2rem; }

/* ── Badge system ────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #e2e8f0; color: #334155; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-cyan   { background: #e0f2fe; color: #0369a1; }
.badge-pink   { background: #fce7f3; color: #be185d; }
.badge-op { text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.68rem; font-weight: 700; }
/* Single-letter P/G faculty type on duty tables — fixed box so pills stay circular */
.badge.badge-faculty-type {
    width: 1.375rem;
    height: 1.375rem;
    min-width: 1.375rem;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1;
    flex-shrink: 0;
}
.badge-lg { font-size: 0.8rem; padding: 0.25rem 0.75rem; }

/* ── Table wrapper ───────────────────────────────────────────────────── */
.table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
}
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem; /* 14px — body cells (Hall Allotment / list tables) */
    background: #fff;
}
.table-wrap thead th {
    padding: 0.875rem 1.25rem;
    background: var(--panel-header-bg);
    font-size: 0.6875rem; /* ~11px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888888;
    border-bottom: 1px solid #eeeeee;
    white-space: nowrap;
    text-align: left;
}
.table-wrap tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eeeeee;
    color: #333333;
    vertical-align: middle;
    line-height: 1.45;
}
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody tr:hover { background: #f8fafc; }
.table-wrap.table-sm thead th { padding: 0.625rem 1rem; font-size: 0.625rem; }
.table-wrap.table-sm tbody td { padding: 0.5rem 1rem; font-size: 0.8125rem; }

/* Column tones — Hall Allotment pattern (serial vs block vs numeric cells) */
.table-wrap thead th.table-cell-sl,
.table-wrap thead th.table-cell-num {
    text-align: center;
}
.table-wrap tbody td.table-cell-sl {
    font-size: 0.75rem;
    color: #888888;
    text-align: center;
    font-weight: 500;
}
.table-wrap tbody td.table-cell-block {
    font-weight: 500;
    color: #333333;
}
.table-wrap tbody td.table-cell-num {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 400;
    color: #555555;
    font-variant-numeric: tabular-nums;
}

/* Row allotment / type pill — bordered, inline with table body scale */
.badge-table-type {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #333333;
    background: #fff;
    border: 1px solid #e5e7eb;
    line-height: 1.2;
}
.badge-table-type svg {
    flex-shrink: 0;
    color: #64748b;
}

/* Action column — design preview (settings/design-preview) §7 · Table */
.table-wrap thead th.table-col-actions {
    text-align: right;
}
.table-wrap tbody td.table-col-actions {
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}
.table-wrap tbody td.table-col-actions > .table-col-actions-inner {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

/* QP Repository — same column grid in every department panel (fixed layout + colgroup) */
.table-wrap.qp-repo-table table {
    table-layout: fixed;
    width: 100%;
}
.table-wrap.qp-repo-table col.qp-col-sl { width: 2.6rem; }
/* All non-course columns have fixed rem widths; course is the only auto column
   and absorbs remaining width (aligned across panels, generous for long titles). */
.table-wrap.qp-repo-table col.qp-col-course { width: auto; }
.table-wrap.qp-repo-table col.qp-col-year { width: 3.4rem; }
.table-wrap.qp-repo-table col.qp-col-code { width: 5.5rem; }
.table-wrap.qp-repo-table col.qp-col-date { width: 9.5rem; }
.table-wrap.qp-repo-table col.qp-col-session { width: 3.5rem; }
.table-wrap.qp-repo-table col.qp-col-status { width: 6.5rem; }
.table-wrap.qp-repo-table col.qp-col-actions { width: 5.5rem; }
.table-wrap.qp-repo-table .qp-th-sl { text-align: center; }
.table-wrap.qp-repo-table .qp-th-narrow { white-space: nowrap; }
.table-wrap.qp-repo-table tbody td.qp-cell-course {
    min-width: 0;
    word-break: break-word;
}
.table-wrap.qp-repo-table .qp-th-year,
.table-wrap.qp-repo-table .qp-cell-year {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-size: 0.8125rem;
}
.table-wrap.qp-repo-table .qp-th-date,
.table-wrap.qp-repo-table .qp-cell-date {
    font-size: 0.82rem;
    white-space: nowrap;
}

/* ── Modal system ────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-overlay, 6000);
    padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-card {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-card.modal-sm  { max-width: 400px; }
.modal-card.modal-lg  { max-width: 720px; }
.modal-card.modal-xl  { max-width: 960px; }
/* When body+footer are wrapped in <form>, the form must be a flex column so .modal-body
   scrolls within max-height and .modal-footer stays visible (not clipped by overflow). */
.modal-card > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 0%;
    overflow: hidden;
}
.modal-header {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--panel-header-bg);
}
.modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}
.modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    background: var(--panel-header-bg);
}

/* ── Button additions ────────────────────────────────────────────────── */
.btn-sm {
    height: 30px;
    padding: 0 0.625rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}
.btn-md {
    height: 34px;
    padding: 0 0.875rem;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
}
.btn-lg {
    height: 40px;
    padding: 0 1.25rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
}
.btn-white {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
}
.btn-white:hover { background: #f8fafc; border-color: #94a3b8; color: #1e293b; }
.btn-warning { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.btn-warning:hover { background: #d97706; }
.btn svg { flex-shrink: 0; }

/* ── Form-control / form-select aliases ─────────────────────────────── */
.form-control,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    display: block;
    min-height: 38px;
}

/* .form-control + date: restore native picker (overrides appearance:none above) */
input.form-control[type="date"],
input.form-control[type="datetime-local"] {
    appearance: auto;
    -webkit-appearance: auto;
    min-height: 38px;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
}

/* ── Textarea base style ─────────────────────────────────────────────── */
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    display: block;
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* ── Unified blue focus ring for all form elements ───────────────────── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
}

.sidebar-search-container input[type="text"]:focus {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: none;
}

body.light-mode .sidebar-search-container input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

/* ── Dark button variant (Reports page) ──────────────────────────────── */
.btn-dark {
    background-color: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
}
.btn-dark:hover {
    background-color: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

/* ── View toggle (Calendar / List switcher) ──────────────────────────── */
.view-toggle {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0 0.75rem;
    height: 34px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    border: none;
    border-radius: 0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.view-toggle-btn + .view-toggle-btn {
    border-left: 1px solid #e2e8f0;
}
.view-toggle-btn.active {
    background: var(--primary-button-bg);
    color: #fff;
}
.view-toggle-btn.active:hover {
    background: var(--primary-button-hover);
    color: #fff;
}
.view-toggle-btn:not(.active):hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ── Custom date picker ──────────────────────────────────────────────── */
.dp-wrap { position: relative; display: inline-block; }
/* Inline (always-visible) calendar — no toggle button */
.dp-inline { display: inline-block; }
.dp-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    color: #1e293b;
    user-select: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 160px;
}
.dp-input:focus-within,
.dp-input.open {
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
}
.dp-input-placeholder { color: #94a3b8; flex: 1; }
.dp-input-value { color: #1e293b; flex: 1; }
.dp-icon { color: #94a3b8; flex-shrink: 0; transition: color 0.15s; }
.dp-input.open .dp-icon,
.dp-input.has-value .dp-icon { color: var(--primary-color); }

/* ── Calendar panel ── */
.dp-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 32px -4px rgba(0, 0, 0, 0.14), 0 2px 8px -2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: none;
    width: 308px;
}
.dp-panel.open { display: block; }
.dp-panel.flip-up { top: auto; bottom: calc(100% + 6px); }

/* Two-calendar range (fixed or absolute): above .top-header, sticky toolbars, and table chrome */
.dp-panel.dp-exam-range-panel.open {
    z-index: 10050;
}

/* ── Calendar header (nav + month/year selects) ── */
.dp-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    background: var(--panel-header-bg);
    border-bottom: 1px solid #e2e8f0;
    gap: 0.375rem;
}
.dp-cal-selects {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    justify-content: center;
}
/* .dp-cal-nav scoping gives higher specificity than single-class page rules;
   min-width: 0 cancels any page-level min-width (e.g. .rs-toolbar-group select) */
.dp-cal-nav .dp-cal-select {
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #e8edf3;
    color: #1e293b;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.2rem 0.5rem;
    height: 30px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
    text-align: center;
}
.dp-cal-nav .dp-cal-select:hover { background: #dde3ec; }
.dp-cal-nav .dp-cal-select:focus {
    outline: none;
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.dp-cal-nav .dp-cal-select.dp-month-sel { width: 108px; }
.dp-cal-nav .dp-cal-select.dp-year-sel  { width: 72px; }
.dp-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dp-cal-nav-btn:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; }
.dp-cal-nav-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ── Day grid ── */
.dp-cal-grid { padding: 0.5rem 0.625rem 0.375rem; }
.dp-cal-grid table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: fixed;
}
.dp-cal-grid th {
    padding: 0.3rem 0;
    background: var(--panel-header-bg);
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.67rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}
.dp-cal-grid td {
    padding: 0.175rem;
    border-bottom: 1px solid #e8edf3;
}
.dp-cal-grid tbody tr:last-child td { border-bottom: none; }

/* Override .table-wrap global rules that bleed into the calendar's internal table
   (.table-wrap thead th / tbody td win at specificity 0,2,1 over .dp-cal-grid at 0,1,1;
   these 0,2,2 selectors restore the correct compact calendar padding and alignment) */
.dp-panel .dp-cal-grid thead th,
.dp-inline .dp-cal-grid thead th {
    padding: 0.3rem 0;
    background: var(--panel-header-bg) !important;
    font-size: 0.67rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    white-space: normal;
    border-bottom: 1px solid #e2e8f0;
}
.dp-panel .dp-cal-grid tbody td,
.dp-inline .dp-cal-grid tbody td {
    padding: 0.175rem;
    border-bottom: 1px solid #e8edf3 !important;
}
.dp-panel .dp-cal-grid tbody tr:last-child td,
.dp-inline .dp-cal-grid tbody tr:last-child td {
    border-bottom: none !important;
}
.dp-panel .dp-cal-grid tbody tr:hover,
.dp-inline .dp-cal-grid tbody tr:hover {
    background: transparent !important;
}
.dp-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 32px;
    border-radius: 7px;
    cursor: pointer;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 400;
    position: relative;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}
/* cell-only hover — no row highlight */
.dp-day:hover:not(.selected):not(.range-start):not(.range-end):not(.disabled):not(.other-month) {
    background: #dde4ef;
}
.dp-day.other-month { color: #d1d5db; cursor: default; }
.dp-day.disabled { color: #e5e7eb; pointer-events: none; }

/* Today — dot below number (always rendered) */
.dp-day.today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color);
}
.dp-day.today { font-weight: 700; }

/* Selected / range */
.dp-day.selected,
.dp-day.range-start,
.dp-day.range-end {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    border-radius: 7px;
}
.dp-day.in-range {
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 7px;
}

/* Today dot turns white when day is selected */
.dp-day.today.selected::after,
.dp-day.today.range-start::after,
.dp-day.today.range-end::after {
    background: #fff;
}

/* Exam date highlights */
.dp-day.exam-complete:not(.selected):not(.range-start):not(.range-end) {
    background: #dcfce7;
    color: #15803d;
    font-weight: 600;
}
.dp-day.exam-upcoming:not(.selected):not(.range-start):not(.range-end) {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}
.dp-day.exam-complete:hover:not(.selected) { filter: brightness(0.95); }
.dp-day.exam-upcoming:hover:not(.selected) { filter: brightness(0.95); }

/* ── Calendar footer (single date: Clear | Today — layout/styles aligned with range picker) ── */
.dp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0;
    background: var(--panel-header-bg, #f8fafc);
}
.dp-footer-btn {
    border-radius: 6px;
    padding: 7px 22px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.dp-footer-clear {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fca5a5;
}
.dp-footer-clear:hover { background: #fee2e2; }
.dp-footer-today {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #93c5fd;
}
.dp-footer-today:hover { background: #dbeafe; }

/* Date range picker footer (Clear / Today / Apply) — rules must live in CSS, not inline
   attributes, or inline background wins and :hover has no visible effect. */
.dp-range-footer-btn {
    border-radius: 6px;
    padding: 7px 22px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.dp-range-footer-btn.dp-footer-clear {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fca5a5;
}
.dp-range-footer-btn.dp-footer-clear:hover {
    background: #fee2e2;
}
.dp-range-footer-btn.dp-footer-today,
.dp-range-footer-btn.dp-footer-apply {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #93c5fd;
}
.dp-range-footer-btn.dp-footer-today:hover,
.dp-range-footer-btn.dp-footer-apply:hover {
    background: #dbeafe;
}

/* ── Page container ──────────────────────────────────────────────────── */
.page-container     { max-width: 960px;  margin: 0 auto; padding: 0.5rem 1rem 5rem; }
.page-container-lg  { max-width: 1200px; margin: 0 auto; padding: 0.5rem 1rem 5rem; }

/* ── Utility classes ─────────────────────────────────────────────────── */
.d-flex           { display: flex; }
.d-grid           { display: grid; }
.d-none           { display: none !important; }
.d-inline-flex    { display: inline-flex; }
.flex-column      { flex-direction: column; }
.align-items-center   { align-items: center; }
.align-items-start    { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-end     { justify-content: flex-end; }
.flex-wrap        { flex-wrap: wrap; }
.flex-1           { flex: 1; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.5rem; }
.p-0  { padding: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.p-1  { padding: 0.5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }
.m-0  { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.ms-auto { margin-left: auto; }
.text-muted   { color: #64748b; }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-center  { text-align: center; }
.text-end     { text-align: right; }
.fw-bold      { font-weight: 700; }
.fw-600       { font-weight: 600; }
.w-100        { width: 100%; }
.w-auto       { width: auto; }
.overflow-hidden  { overflow: hidden; }
.align-middle     { vertical-align: middle; }
.no-wrap          { white-space: nowrap; }
.h-full           { height: 100%; }

@media print { .no-print { display: none !important; } }

/* ── Hamburger / mobile menu toggle ─────────────────────────────────────── */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 0.35rem;
    flex-shrink: 0;
    color: var(--text-main);
    border-radius: 6px;
    transition: background 0.15s;
}
.mobile-menu-toggle:hover { background: var(--hover-bg, #f1f5f9); }

/* ── Sidebar close button (mobile only) ──────────────────────────────────── */
.sidebar-close-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--sidebar-item-text);
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.sidebar-close-mobile:hover { background: rgba(0,0,0,0.1); }

/* ── Mobile header right (••• dropdown) ──────────────────────────────────── */
.header-right-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.mobile-more-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-main);
    border-radius: 6px;
    transition: background 0.15s;
}
.mobile-more-btn:hover { background: var(--hover-bg, #f1f5f9); }
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Sidebar overlay (mobile) ────────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* ── Responsive: Tablet (≤ 900px) ───────────────────────────────────────── */
@media (max-width: 900px) {
    :root {
        --sidebar-width: 220px;
    }
}

/* ── Responsive: Mobile (≤ 768px) ───────────────────────────────────────── */
@media (max-width: 768px) {
    /* Show hamburger */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Show sidebar close button */
    .sidebar-close-mobile {
        display: flex;
    }

    /* Show ••• button, hide full right toolbar */
    .mobile-more-btn {
        display: flex;
    }
    .mobile-header-right {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        right: 0;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 0.5rem 0.75rem;
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
        z-index: 500;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }
    .mobile-header-right--open {
        display: flex !important;
    }

    /* Sidebar slides off-screen by default */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease, background-color 0.3s, border-color 0.3s;
        width: 260px !important; /* always full-width on mobile regardless of collapsed state */
    }

    /* Collapsed-mode overrides must not interfere on mobile */
    body.sidebar-collapsed .sidebar {
        width: 260px !important;
        transform: translateX(-100%);
    }

    /* Open state */
    body.sidebar-mobile-open .sidebar,
    body.sidebar-mobile-open.sidebar-collapsed .sidebar {
        transform: translateX(0);
    }

    /* Restore hidden items that collapsed mode hides */
    body.sidebar-mobile-open.sidebar-collapsed .logo-text,
    body.sidebar-mobile-open.sidebar-collapsed .version-badge,
    body.sidebar-mobile-open.sidebar-collapsed .nav-group-header,
    body.sidebar-mobile-open.sidebar-collapsed #theme-text {
        display: block !important;
        opacity: 1 !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .nav-section-toggle {
        display: grid !important;
        opacity: 1 !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .sidebar-search-container {
        display: block !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .nav-item,
    body.sidebar-mobile-open.sidebar-collapsed .nav-sub-item {
        justify-content: flex-start !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .nav-item {
        font-size: 1rem !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .nav-sub-item {
        font-size: 0.95rem !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .nav-item svg,
    body.sidebar-mobile-open.sidebar-collapsed .nav-sub-item svg {
        margin-right: 0.75rem !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .nav-section-panel {
        grid-template-rows: 0fr;
    }
    body.sidebar-mobile-open.sidebar-collapsed .nav-section.open > .nav-section-panel,
    body.sidebar-mobile-open.sidebar-collapsed .nav-section.search-match > .nav-section-panel {
        grid-template-rows: 1fr;
    }

    /* Overlay */
    .sidebar-overlay {
        display: block;
    }
    body.sidebar-mobile-open .sidebar-overlay {
        opacity: 1;
        pointer-events: all;
    }

    /* Main content takes full width */
    .main-content {
        width: 100%;
        overflow-x: hidden;
    }

    /* Hide desktop collapse button on mobile */
    #sidebar-collapse-btn {
        display: none !important;
    }

    /* Reduced padding */
    .top-header {
        padding: 0 1rem;
    }
    .page-content {
        padding: 1rem;
    }

    /* Tables: horizontal scroll */
    .table-wrap,
    .table-container {
        overflow-x: auto !important;
    }
    .table-wrap table,
    .table-container table {
        min-width: 520px;
    }

    /* Cards stack vertically */
    .stat-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Modals fit the screen */
    .modal-box {
        width: 95vw !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Fixed bottom bars span full width */
    .page-actions,
    .hp-actions,
    .lps-actions,
    .cap-actions {
        left: 0 !important;
    }
}

/* ── Responsive: Small phones (≤ 480px) ─────────────────────────────────── */
@media (max-width: 480px) {
    .page-content {
        padding: 0.75rem;
    }
    .top-header h3 {
        font-size: 0.8rem;
    }
    .card {
        padding: 1rem;
    }
    .stat-grid {
        grid-template-columns: 1fr !important;
    }
    .modal-box {
        width: 98vw !important;
        padding: 1rem;
    }
    .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
}

/* Settings → Dashboard: four summary widget cards in a 2x2 grid */
.dashboard-settings-widgets-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .dashboard-settings-widgets-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Hall allotment: manage_date allocation tables (alignment only)
   Avoid table-layout:fixed + explicit widths here: the page inline styles use
   width:1% !important on type/action/remove columns; fixed layout fights that
   and collapses or misaligns columns. ── */
.alloc-table-h-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}
.alloc-table-hall {
    width: 100%;
    /* Match body cell scale (14px) so children can inherit consistently */
    font-size: 0.875rem;
}
/* Exam: flexible width so extra table space goes here (long titles), not Block. */
.alloc-table-hall th.exam-col,
.alloc-table-hall td.exam-cell {
    min-width: 11rem;
    width: auto;
    max-width: 36rem;
    text-align: left;
    vertical-align: middle;
    word-break: break-word;
}
.alloc-table-hall td.exam-cell .form-control,
.alloc-table-hall td.exam-cell select {
    max-width: 100%;
    box-sizing: border-box;
}
/* Inputs / selects: same font size and line rhythm as table cells (not browser-default larger) */
.alloc-table-hall .form-control,
.alloc-table-hall select.form-control {
    font-size: 0.875rem;
    line-height: 1.45;
    font-family: inherit;
}
.alloc-table-hall input.form-control[type="number"] {
    font-size: 0.875rem;
    line-height: 1.45;
    font-family: inherit;
}
.alloc-table-hall thead tr > th:nth-child(1),
.alloc-table-hall td.sno-col {
    text-align: center;
}
.alloc-table-hall thead tr > th:nth-child(2),
.alloc-table-hall tbody tr.alloc-row > td:nth-child(2),
.alloc-table-hall tbody tr.reserve-row > td:nth-child(2) {
    text-align: left;
    min-width: 7.5rem;
    max-width: 12rem;
    word-break: break-word;
}
.alloc-table-hall thead tr > th:nth-child(3),
.alloc-table-hall td.room-cell,
.alloc-table-hall tbody tr.reserve-row > td:nth-child(3) {
    text-align: left;
    min-width: 8.75rem;
    width: 10.5rem;
    max-width: 14rem;
}
/* Capacity: stay content-sized so Block/Exam keep a better share of slack. */
.alloc-table-hall thead tr > th:nth-child(4),
.alloc-table-hall td.capacity-cell,
.alloc-table-hall .total-cap {
    text-align: center;
    width: 1%;
    white-space: nowrap;
}
/* Count / allocated qty: content-width so slack goes to Exam (flexible), not a dead gap. */
.alloc-table-hall thead tr > th:nth-child(5),
.alloc-table-hall td.count-cell,
.alloc-table-hall .total-alloc {
    text-align: left;
    vertical-align: middle;
    width: 1%;
    white-space: nowrap;
}
.alloc-table-hall .type-col,
.alloc-table-hall .action-col {
    text-align: center;
}
.alloc-table-hall td.room-cell select.form-control,
.alloc-table-hall .reserve-room-cell select.form-control {
    min-width: 8.25rem;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 0.5rem;
    padding-right: 1.85rem; /* native select arrow */
}
/* Count cell: flex must be on inner div, not on <td> (breaks table column grid). */
.alloc-table-hall td.count-cell > .alloc-count-cell-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* ── Hall allotment: special-allocation hint (injected in manage_date.php) ── */
.special-allocation-hint {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.75rem;
    box-sizing: border-box;
    /* Breathing room on all sides (status bar above is flush; table below needs gap too) */
    margin: 0.75rem 1.5rem;
}
.special-allocation-hint__text {
    margin: 0;
    padding: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #5b21b6;
}
.special-allocation-hint__text strong {
    font-weight: 700;
    color: #4c1d95;
}
.special-allocation-hint__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.special-allocation-hint__actions .btn {
    margin: 0;
    line-height: 1.2;
}
@media (max-width: 720px) {
    .special-allocation-hint {
        grid-template-columns: 1fr;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    .special-allocation-hint__actions {
        justify-content: flex-start;
    }
}

/* ── Design standard: section TOC (main column, directly under .top-header) ── */
.ds-toc-main {
    flex-shrink: 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    background: var(--panel-header-bg, #f1f5f9);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
body.light-mode .ds-toc-main {
    background: #f8fafc;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.ds-toc-main .ds-toc {
    width: 100%;
    box-sizing: border-box;
}
.ds-toc-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 2.35rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.ds-toc-track::-webkit-scrollbar {
    height: 5px;
}
.ds-toc-track::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.ds-toc-prefix {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    background: rgba(15, 23, 42, 0.04);
    border-right: 1px solid var(--border-color, #e2e8f0);
    white-space: nowrap;
}
body.light-mode .ds-toc-prefix {
    background: rgba(15, 23, 42, 0.03);
}
.ds-toc-track a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    color: #475569;
    padding: 0 0.65rem;
    white-space: nowrap;
    border-right: 1px solid #e8ecf1;
    line-height: 1.2;
    transition: background 0.12s, color 0.12s;
}
.ds-toc-track a:last-child {
    border-right: none;
}
.ds-toc-track a:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary-color, #2563eb);
}

/* ── Tab content pane toggle (shared by page-level .tabs and panel .panel-tabs) ── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Panel header tabs ───────────────────────────────────────────────────
   Compact tab row that lives inside .panel-header. Two variants:
   1. Plain:  .panel-tabs > .panel-tab
   2. Stepped: .panel-tabs.panel-tabs--steps > .panel-tab (with .panel-tab-num badge)
   ─────────────────────────────────────────────────────────────────────── */
.panel-tabs {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}
.panel-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-muted, #6b7280);
    background: transparent;
    border: none;
    border-radius: var(--radius-md, 0.5rem);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.panel-tab:hover {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary-color, #2563eb);
}
.panel-tab.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color, #2563eb);
}

/* Step number badge inside stepped panel tabs */
.panel-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 700;
    flex-shrink: 0;
    background: transparent;
    border: 1.5px solid var(--border-color, #e5e7eb);
    color: var(--text-muted, #6b7280);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.panel-tab.active .panel-tab-num {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}
.panel-tab.completed .panel-tab-num {
    background: var(--success, #10b981);
    border-color: var(--success, #10b981);
    color: #fff;
}
.panel-tab.completed {
    color: var(--text-muted, #6b7280);
}

/* Connector line between step badges */
.panel-tabs--steps {
    gap: 0;
}
.panel-tabs--steps .panel-tab {
    position: relative;
}
.panel-tabs--steps .panel-tab:not(:last-child)::after {
    content: '';
    display: block;
    width: 1.5rem;
    height: 1px;
    background: var(--border-color, #e5e7eb);
    flex-shrink: 0;
    margin: 0 0.125rem;
    align-self: center;
}
.panel-tabs--steps .panel-tab.completed:not(:last-child)::after {
    background: var(--success, #10b981);
    opacity: 0.5;
}
.panel-tabs--steps .panel-tab {
    display: inline-flex;
    flex-direction: row;
    gap: 0.4rem;
    padding-left: 0.5rem;
    padding-right: 0;
}
.panel-tabs--steps .panel-tab:last-child {
    padding-right: 0.5rem;
}
