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

:root {
    --primary-color: #f06543;
    --primary-hover: #d14d2e;
    --secondary-color: #0369A1;
    --background: #E2E8F0;
    --surface: #ffffff;
    --text-main: #020617;
    --text-muted: #475569;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --radius: 12px;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

.dark {
    --primary-color: #f06543;
    --primary-hover: #d14d2e;
    --secondary-color: #38bdf8;
    --background: #0f111a;
    --surface: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --border: #334155;
    --surface-dark: #1e293b;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar,
aside.sidebar {
    width: 240px;
    background-color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    border-right: none !important;
    font-size: 0.75rem;
}

/* Sidebar - smaller text */
aside.sidebar nav {
    padding-top: 0.35rem !important;
    padding-bottom: 0.75rem !important;
}

aside.sidebar nav a {
    font-size: 0.76rem !important;
    gap: 0.65rem !important;
    padding-top: 0.48rem !important;
    padding-bottom: 0.48rem !important;
    border-radius: 8px !important;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

aside.sidebar>a h1,
aside.sidebar h1.text-xl {
    font-size: 0.9rem !important;
}

aside.sidebar nav .material-symbols-outlined {
    font-size: 16px !important;
}

aside.sidebar nav>div {
    font-size: 8.5px !important;
    padding-top: 1.05rem !important;
    padding-bottom: 0.4rem !important;
    margin-bottom: 0.15rem !important;
    line-height: 1;
}

aside.sidebar nav>div:first-child {
    padding-top: 0.25rem !important;
}

aside.sidebar nav>div.pt-8 {
    padding-top: 1.15rem !important;
}

aside.sidebar nav>div.mt-auto {
    padding-top: 0.75rem !important;
}

.sidebar-logout-wrap {
    flex: 0 0 auto;
    padding: 0.75rem 1rem 1.25rem;
    background: inherit;
    border-top: 1px solid #E2E8F0;
    margin-top: 0.5rem;
}
.dark .sidebar-logout-wrap { border-top-color: rgba(255,255,255,0.08); }

.sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    padding: 0.48rem 1rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #dc2626;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-logout-btn:hover { background: #fef2f2; color: #b91c1c; }
.sidebar-logout-btn .material-symbols-outlined { font-size: 16px; }
.dark .sidebar-logout-btn { background: transparent; color: #f87171; }
.dark .sidebar-logout-btn:hover { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

@media (max-width: 1280px) {
    .sidebar,
    aside.sidebar {
        width: 224px;
    }

    .main-content {
        margin-left: 224px;
    }

    .header-authenticated {
        left: 224px;
    }

    aside.sidebar nav a {
        font-size: 0.74rem !important;
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }
}

@media (max-width: 1024px) {
    .sidebar,
    aside.sidebar {
        width: 208px;
    }

    .main-content {
        margin-left: 208px;
    }

    .header-authenticated {
        left: 208px;
    }

    aside.sidebar>a {
        margin-left: 0.75rem !important;
        margin-right: 0.75rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    aside.sidebar>a h1,
    aside.sidebar h1.text-xl {
        font-size: 0.82rem !important;
    }

    aside.sidebar nav {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    aside.sidebar nav a {
        font-size: 0.72rem !important;
        gap: 0.55rem !important;
    }
}

@media (max-width: 820px) {
    .sidebar,
    aside.sidebar {
        width: 188px;
    }

    .main-content {
        margin-left: 188px;
    }

    .header-authenticated {
        left: 188px;
    }

    aside.sidebar>a {
        gap: 0.55rem !important;
        margin-top: 1rem !important;
        padding-top: 0.9rem !important;
        padding-bottom: 0.9rem !important;
    }

    aside.sidebar>a div {
        width: 2rem !important;
        height: 2rem !important;
        border-radius: 10px !important;
    }

    aside.sidebar>a h1,
    aside.sidebar h1.text-xl {
        font-size: 0.76rem !important;
    }

    aside.sidebar nav a {
        font-size: 0.7rem !important;
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    aside.sidebar nav>div {
        font-size: 8px !important;
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }
}

.main-content {
    flex: 1;
    margin-left: 240px;
    min-width: 0 !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    border-left: none !important;
}

/* Keep flex content inside the viewport; wide scorecard tables scroll in their own wrapper. */
#main-page-content {
    min-width: 0;
    max-width: 100%;
}

/* Auth layout (login page) - no sidebar */
.app-container.auth-layout .main-content-auth {
    margin-left: 0;
    width: 100%;
}

.header-authenticated {
    left: 240px;
    right: 0;
    border-left: none !important;
}

.header-auth {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(12px);
}

.dark .header-auth {
    background: rgba(15, 17, 26, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.header-auth > a,
.header-auth > div {
    display: flex;
    align-items: center;
}

.header-auth > a {
    gap: 0.75rem;
}

.header-auth h1 {
    font-size: 1.25rem;
}

.header-auth #theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.header-auth #theme-toggle:hover {
    background: #f1f5f9;
}

.dark .header-auth #theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Login page - center form vertically and horizontally */
.content-auth-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 5rem);
}

.main-content-auth #main-page-content {
    padding-top: 5rem !important;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    /* rounded-full */
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 0.875rem;
}

/* Back to Dashboard (admin sub-pages) - readable in light and dark */
/* Back to Dashboard – visible button in both light and dark mode */
.btn-back-to-dashboard {
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-back-to-dashboard:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
}

.dark .btn-back-to-dashboard {
    background-color: #334155;
    color: #f8fafc;
    border-color: #475569;
}

.dark .btn-back-to-dashboard:hover {
    background-color: #475569;
    border-color: #64748b;
}

.btn-light-persist {
    background-color: #ffffff;
    color: #020617;
    border: 1px solid #E2E8F0;
}

.dark .btn-light-persist {
    background-color: #ffffff;
    color: #020617;
    border: 1px solid #E2E8F0;
}

/* Pagination - readable in light and dark mode on all pages */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.pagination-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.dark .pagination-btn {
    background-color: #334155;
    color: #f8fafc;
    border-color: #475569;
}

.dark .pagination-btn:hover {
    background-color: #475569;
    border-color: #64748b;
    color: #f8fafc;
}

.pagination-info {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.dark .pagination-info {
    background-color: #334155;
    color: #f8fafc;
    border-color: #475569;
}

/* Modal action bar & buttons - dark mode support */
.modal-actions-bar {
    background: #F8FAFC;
}

.dark .modal-actions-bar {
    background: var(--surface-dark);
    border-top-color: var(--border);
}

.modal-action-btn {
    border: 1px solid;
}

.modal-action-edit {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.modal-action-cancel {
    background: white;
    color: #EF4444;
    border-color: #EF4444;
}

.dark .modal-action-edit {
    background: var(--surface-dark);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.dark .modal-action-cancel {
    background: var(--surface-dark);
    color: #EF4444;
    border-color: #EF4444;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(240, 101, 67, 0.2);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    border: 1px solid var(--danger);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dark .btn-danger {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.dark .btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success);
    color: white;
    border: 1px solid var(--success);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dark .btn-success {
    background-color: #059669;
    color: white;
    border-color: #059669;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.35);
}

.dark .btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Candidate card action buttons (Accepted/Declined) – same look as modal, smaller size */
.candidate-card-actions .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.7rem;
}

.card {
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
}

/* Forms */
input,
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.875rem;
    border-radius: var(--radius);
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    transition: border-color 0.2s;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    color: black;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-muted);
}



.dark label {
    color: #f8fafc;
}

.dark input,
.dark select,
.dark textarea {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #94a3b8;
}

.dark .card {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

/* System Management cards */
.sys-mgmt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.sys-mgmt-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sys-mgmt-card-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
}
.sys-mgmt-card-body {
    padding: 1rem;
}
.sys-mgmt-card-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sys-mgmt-card-body li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.sys-mgmt-card-body li:last-child {
    border-bottom: none;
}
.sys-mgmt-item-title {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.8125rem;
}
.sys-mgmt-item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.sys-mgmt-item-desc code {
    font-size: 0.8em;
}
.sys-mgmt-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
}
.sys-mgmt-card-body > p {
    color: var(--text-muted);
}
.dark .sys-mgmt-card-body a,
.dark .sys-mgmt-card-header a {
    color: #818cf8;
}
.dark .sys-mgmt-card-body a:hover,
.dark .sys-mgmt-card-header a:hover {
    color: #a5b4fc;
}

/* Request modals: fully opaque container in dark mode */
.dark #request-detail-modal-card,
#request-detail-modal-card.dark {
    background-color: #1e293b !important;
    opacity: 1;
}

.dark .request-form-card,
.request-form-outer .request-form-card.dark {
    background-color: #1e293b !important;
    opacity: 1;
}

.dark .request-form-actions {
    background-color: #1e293b !important;
}

/* New Manpower Request form layout (modal + full page) */
.request-form-outer {
    padding: 1.25rem 1.5rem;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.request-form-outer .request-form-card {
    padding: 0 1.75rem 0;
    background: #ffffff;
    opacity: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.dark .request-form-outer .request-form-card {
    background: var(--slate-800, #1e293b);
    opacity: 1;
}

.request-form-title {
    margin: 0 0 0.75rem 0;
    padding-top: 1rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.request-form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.request-form-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -1.75rem;
    padding: 0 1.75rem;
}

.request-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.25rem;
    padding-bottom: 0.5rem;
}

.request-form-field {
    min-width: 0;
}

.request-form-field-full {
    grid-column: 1 / -1;
}

.request-form-label {
    display: block;
    margin-bottom: 0.15rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.request-form-help {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.05rem;
    line-height: 1.25;
}

.request-form-errors {
    color: var(--danger);
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

.request-form-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0 1.25rem;
    margin: 0 -1.75rem;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    border-top: 1px solid rgba(0, 0, 0, .1);
    background: var(--slate-100, #f1f5f9);
}

.dark .request-form-actions {
    border-top-color: rgba(255, 255, 255, .1);
    background: var(--slate-800, #1e293b);
}

.request-form-submit {
    flex: 1;
    font-size: 0.8rem !important;
}

.request-form-actions .btn,
.request-form-actions a.btn {
    font-size: 0.8rem !important;
}

.request-form-field input[type="text"],
.request-form-field input[type="number"],
.request-form-field input[type="email"],
.request-form-field input[type="date"],
.request-form-field select,
.request-form-field textarea {
    min-height: 2rem;
    font-size: 0.8rem;
    box-sizing: border-box;
}

.request-form-exec-row:has(.request-form-exec-checkbox:checked) {
    border-color: rgba(180, 83, 9, 0.6) !important;
    background: rgba(180, 83, 9, 0.12) !important;
}

.request-form-exec-checkbox {
    width: 1.2rem !important;
    height: 1.2rem !important;
    min-width: 1.2rem !important;
    min-height: 1.2rem !important;
    border: 2px solid rgba(234, 179, 8, 0.5) !important;
    border-radius: 0.3rem !important;
    cursor: pointer;
    background-color: transparent !important;
    flex-shrink: 0;
    accent-color: #b45309;
}

.request-form-exec-checkbox:checked {
    background-color: #b45309 !important;
    border-color: #b45309 !important;
    accent-color: #b45309;
}

.request-form-exec-checkbox:hover {
    border-color: #92400e !important;
}

.request-form-exec-checkbox:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.3) !important;
}

.dark .request-form-exec-row:has(.request-form-exec-checkbox:checked) {
    border-color: rgba(251, 191, 36, 0.6) !important;
    background: rgba(251, 191, 36, 0.12) !important;
}

.dark .request-form-exec-checkbox {
    border-color: rgba(251, 191, 36, 0.5) !important;
    accent-color: #f59e0b;
}

.dark .request-form-exec-checkbox:checked {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
}

.dark .request-form-exec-checkbox:hover {
    border-color: #fbbf24 !important;
}

/* Target date: input + calendar button so users can open date picker */
.request-form-date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
}

.request-form-date-input-wrapper .request-form-date-input {
    flex: 1;
    min-width: 0;
    padding-right: 0.875rem;
}

@media (max-width: 640px) {
    .request-form-grid {
        grid-template-columns: 1fr;
    }

    .request-form-field-full {
        grid-column: 1;
    }
}

.dark .card input,
.dark .card select,
.dark .card textarea {
    background-color: #ffffff;
    color: #000000;
    border-color: #cbd5e1;
}

/* Date input calendar icon visible in dark mode (New Hire Start Date, etc.) */
.dark input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.9;
    cursor: pointer;
}

.dark .request-form-date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none !important;
    opacity: 0.75;
    cursor: pointer;
}

/* All Requests page – filter bar: label above select, wrapped grid, clear spacing */
.all-requests-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.25rem 1.5rem;
    padding: 1.25rem 1.5rem;
    margin: 0 0 1.25rem 0;
    background: var(--surface, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}

.all-requests-filters .all-requests-filter-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    margin-bottom: 0;
    flex: 0 0 auto;
    min-width: 0;
}

.all-requests-filters .all-requests-filter-label span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.all-requests-filters select {
    display: block;
    width: 100%;
    min-width: 140px;
    max-width: 220px;
    margin-bottom: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--background, #fff);
    color: var(--text-main);
    box-sizing: border-box;
    cursor: pointer;
}

/* Department dropdown: wider so long names are not cut off */
.all-requests-filters select.all-requests-filter-select-department {
    min-width: 200px;
    max-width: 280px;
}

/* Order By: full option text visible */
.all-requests-filters select.all-requests-filter-select-order-by {
    min-width: 180px;
    max-width: 200px;
}

/* Clear filters button: align to end of row */
.all-requests-filters .all-requests-filter-clear {
    margin-left: auto;
    flex-shrink: 0;
}

.dark .all-requests-filters {
    background: var(--card-dark, #1e293b);
    border-color: #334155;
}

.dark .all-requests-filters select {
    background-color: #334155;
    color: #f8fafc;
    border-color: #475569;
}

.dark .all-requests-filters select option {
    background-color: #334155;
    color: #f8fafc;
}

/* Company Tabs Bar – tabbed navigation above the requests table */
#all-requests-page .company-tabs-header,
#executive-dashboard-page .company-tabs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

#all-requests-page .company-tabs-bar,
#executive-dashboard-page .company-tabs-bar {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary-color) 72%, var(--border)) transparent;
    padding: 0;
}

/* Keep the company selector scrollable without showing the browser's bulky
   default scrollbar. The thumb remains visible enough to signal that more
   companies are available horizontally. */
#all-requests-page .company-tabs-bar::-webkit-scrollbar,
#executive-dashboard-page .company-tabs-bar::-webkit-scrollbar,
#employee-database-page .company-tabs-bar::-webkit-scrollbar {
    height: 7px;
}

#all-requests-page .company-tabs-bar::-webkit-scrollbar-track,
#executive-dashboard-page .company-tabs-bar::-webkit-scrollbar-track,
#employee-database-page .company-tabs-bar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

#all-requests-page .company-tabs-bar::-webkit-scrollbar-thumb,
#executive-dashboard-page .company-tabs-bar::-webkit-scrollbar-thumb,
#employee-database-page .company-tabs-bar::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary-color) 72%, var(--border));
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

#all-requests-page .company-tabs-bar::-webkit-scrollbar-thumb:hover,
#executive-dashboard-page .company-tabs-bar::-webkit-scrollbar-thumb:hover,
#employee-database-page .company-tabs-bar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    background-clip: padding-box;
}

#all-requests-page .company-tabs-bar::-webkit-scrollbar-button,
#executive-dashboard-page .company-tabs-bar::-webkit-scrollbar-button,
#employee-database-page .company-tabs-bar::-webkit-scrollbar-button {
    display: none;
    width: 0;
}

#all-requests-page .all-requests-filter-toggle,
#executive-dashboard-page .all-requests-filter-toggle {
    flex: 0 0 auto;
    margin-left: 0;
    white-space: nowrap;
    width: auto;
    min-width: max-content;
}

#all-requests-page .company-tabs-actions,
#executive-dashboard-page .company-tabs-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.625rem;
    margin-left: auto;
    padding: 0;
    flex-shrink: 0;
}

#all-requests-page .company-tabs-actions .all-requests-filter-toggle,
#executive-dashboard-page .company-tabs-actions .all-requests-filter-toggle {
    margin-left: 0;
}

#all-requests-page .all-requests-export-button,
#executive-dashboard-page .executive-export-button {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    white-space: nowrap;
}

#executive-dashboard-page .executive-approvals-table-card {
    margin-top: 0.75rem;
}

.company-tab-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: var(--font-body);
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.company-tab-btn:hover {
    background: rgba(0, 0, 0, 0.07);
    border-color: var(--primary-color);
}

.company-tab-btn.active {
    color: var(--primary-color);
    background: rgba(240, 101, 67, 0.08);
    border-color: var(--primary-color);
    border-width: 1px;
}

.company-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    font-size: 0.6875rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 9999px;
    background: var(--primary-color);
    color: #fff;
    letter-spacing: 0.02em;
}

.company-tab-btn:not(.active) .company-tab-count {
    background: var(--primary-color);
    color: #fff;
}

.company-tab-btn.active .company-tab-count {
    background: var(--primary-color);
    color: #fff;
}

/* Dark mode – Company Tabs */
.dark #all-requests-page .company-tabs-header,
.dark #executive-dashboard-page .company-tabs-header {
    background: #1a1d27;
    border-color: #2d3348;
    border-bottom-color: #2d3348;
}

.dark .company-tab-btn {
    color: var(--primary-color);
    background: #232734;
    border-color: #2d3348;
}

.dark .company-tab-btn:hover {
    background: #2d3348;
    border-color: var(--primary-color);
}

.dark .company-tab-btn.active {
    color: var(--primary-color);
    background: rgba(240, 101, 67, 0.12);
    border-color: var(--primary-color);
}

.dark .company-tab-btn:not(.active) .company-tab-count {
    background: var(--primary-color);
    color: #fff;
}

.dark .company-tab-btn.active .company-tab-count {
    background: var(--primary-color);
    color: #fff;
}

@media (max-width: 640px) {
    #all-requests-page .company-tabs-header,
    #executive-dashboard-page .company-tabs-header {
        align-items: stretch;
        flex-wrap: wrap;
        flex-direction: column;
    }

    #all-requests-page .company-tabs-bar,
    #executive-dashboard-page .company-tabs-bar {
        flex-basis: 100%;
    }

    #all-requests-page .all-requests-filter-toggle,
    #executive-dashboard-page .all-requests-filter-toggle {
        margin-left: 0;
    }

    #all-requests-page .company-tabs-actions,
    #executive-dashboard-page .company-tabs-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    #all-requests-page .all-requests-export-button,
    #executive-dashboard-page .executive-export-button {
        min-width: 0;
    }
}

/* Request Kanban - smaller text */
.request-kanban-page .kanban-card-title-section h4 {
    font-size: 0.8rem;
}

.request-kanban-page .kanban-card-title-section p {
    font-size: 0.6rem;
}

.request-kanban-page .kanban-column h3 {
    font-size: 0.65rem;
}

.request-kanban-page .kanban-column .text-\[10px\] {
    font-size: 9px;
}

.request-kanban-page #filter-dropdown-panel .text-sm,
.request-kanban-page #sort-dropdown-panel .text-sm {
    font-size: 0.75rem;
}

.request-kanban-page #filter-dropdown-panel label,
.request-kanban-page #sort-dropdown-panel label {
    font-size: 0.7rem;
}

.request-kanban-page #filter-dropdown-panel select,
.request-kanban-page #sort-dropdown-panel select {
    font-size: 0.75rem;
}

.request-kanban-page [id^="col-menu-"] button {
    font-size: 0.75rem;
}

/* Candidate Pipeline - smaller text */
.candidate-pipeline-page .kanban-card-title-section h4 {
    font-size: 0.8rem;
}

.candidate-pipeline-page .kanban-card-title-section p {
    font-size: 0.6rem;
}

.candidate-pipeline-page .kanban-column h3 {
    font-size: 0.65rem;
}

.candidate-pipeline-page .kanban-column .text-\[10px\] {
    font-size: 9px;
}

/* Kanban Board */
/* Kanban Board */
.kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding-bottom: 2rem;
    height: calc(100vh - 160px);
}

/* Kanban Column Styles - Matching candidate_kanban */
.kanban-column {
    flex: 0 0 340px;
    background-color: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: background-color 0.2s ease;
}

.dark .kanban-column {
    background-color: #1a1d27;
}

.kanban-column:hover {
    background-color: #e2e8f0;
}

.dark .kanban-column:hover {
    background-color: #232734;
}

.kanban-column-header {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--secondary-color);
    color: var(--primary-color);
}

/* Request Card Styles - Matching candidate_card exactly */
.kanban-card {
    background-color: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: all 0.2s ease;
    cursor: grab;
    margin-bottom: 0.75rem;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.dark .kanban-card {
    background-color: #1e212a;
    border-color: rgba(255, 255, 255, 0.05);
}

.dark .kanban-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Card Header with Avatar and Title */
.kanban-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.125rem;
}

.kanban-card-avatar-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kanban-card-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: linear-gradient(to bottom right, var(--primary-color), #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.kanban-card-title-section h4 {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e293b;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.kanban-card:hover h4 {
    color: var(--primary-color);
}

.dark .kanban-card-title-section h4 {
    color: white;
}

.kanban-card-title-section p {
    font-size: 0.625rem;
    color: #64748b;
    margin-top: 0.125rem;
}

.dark .kanban-card-title-section p {
    color: #94a3b8;
}

/* Resume icon */
.kanban-card-resume-icon {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Email row */
.kanban-card-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.625rem;
    color: #64748b;
}

.kanban-card-email span:first-child {
    font-size: 0.75rem;
}

.kanban-card-email span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .kanban-card-email {
    color: #94a3b8;
}

/* Card Footer */
.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

.dark .kanban-card-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.kanban-card-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kanban-card-date span:first-child {
    font-size: 0.625rem;
    color: #94a3b8;
}

.kanban-card-date span:last-child {
    font-size: 0.5rem;
    color: #64748b;
}

.kanban-card-phone {
    font-size: 0.5rem;
    color: #94a3b8;
}

/* Priority Badge */
.kanban-card-priority-wrap {
    display: flex;
    justify-content: flex-start;
    margin: 0.15rem 0 0.35rem;
}

.kanban-card-priority-wrap + .kanban-card-email {
    margin-top: 0.75rem;
}

.kanban-card-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 1.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.kanban-card-priority.high {
    background-color: #f72f5f;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.kanban-card-priority.medium {
    background-color: #fff7ed;
    color: #f97316;
    border: 1px solid #ffedd5;
}

.kanban-card-priority.low {
    background-color: #f0fdf4;
    color: #10b981;
    border: 1px solid #dcfce7;
}

.dark .kanban-card-priority.high {
    background-color: #f72f5f;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
}

.dark .kanban-card-priority.medium {
    background-color: rgba(249, 115, 22, 0.1);
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.2);
}

.dark .kanban-card-priority.low {
    background-color: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.2);
}

/* Executive priority card highlight */
.kanban-card-priority-high {
    border-left: 3px solid #e11d48 !important;
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.dark .kanban-card-priority-high {
    border-left-color: #f87171 !important;
    box-shadow: 0 1px 3px rgba(248, 113, 113, 0.15), 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Department text */
.kanban-card-department {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.dark .kanban-card-department {
    color: #94a3b8;
}

/* Assigned info */
.kanban-card-assigned {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kanban-card-assigned-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.dark .kanban-card-assigned-avatar {
    background-color: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

.kanban-card-assigned-name {
    font-size: 0.625rem;
    font-weight: 600;
    color: #475569;
}

.dark .kanban-card-assigned-name {
    color: #94a3b8;
}

/* Time indicators */
.kanban-card-time-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.kanban-card-time-ago {
    font-size: 0.5625rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    white-space: nowrap;
}

.kanban-card-target-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.5625rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.kanban-card-target-date.overdue {
    color: #ef4444;
    font-weight: 700;
}

/* Drag and drop states */
.kanban-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Column header styles */
.kanban-column-header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.kanban-column-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.kanban-column-title {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #64748b;
}

.dark .kanban-column-title {
    color: #94a3b8;
}

.kanban-column-count {
    background-color: #e2e8f0;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #475569;
}

.dark .kanban-column-count {
    background-color: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

/* --- Consolidated Status & Stage Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-align: center;
    min-width: 140px;
    width: auto;
    white-space: nowrap;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: none;
}

/* Stage/status badges: uniform fixed width (9.5rem fits "Pending Approval" + padding), slightly taller, centered text */
table tbody td .badge,
.badge.candidate-status-pill {
    font-size: 0.7rem !important;
    padding: 0.5rem 0.75rem !important;
    min-width: 9.5rem !important;
    width: auto !important;
    justify-content: center !important;
    text-align: center !important;
}

/* Stage badges: uniform width, centered text, single line (e.g. PENDING APPROVAL on one line) */

/* Executive priority row highlight in all requests table */
.all-req-priority-high {
    background: rgba(225, 29, 72, 0.03) !important;
    border-left: 3px solid #e11d48 !important;
}
.all-req-priority-high td {
    background: transparent !important;
}
.dark .all-req-priority-high {
    background: rgba(248, 113, 113, 0.06) !important;
    border-left-color: #f87171 !important;
}
.dark .all-req-priority-high td {
    background: transparent !important;
}

table tbody td .badge[class*="badge-stage-"],
.all-requests-table tbody td .badge[class*="badge-stage-"],
#all-requests-page .badge[class*="badge-stage-"] {
    display: inline-flex !important;
    min-width: 12.5rem !important;
    width: auto !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
}

/* SLA Status column: uniform with stage badges (9.5rem) */
table td.sla-status-cell .badge {
    min-width: 9.5rem !important;
    width: 9.5rem !important;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
    justify-content: center !important;
}

/* Candidate status pill (Screening, Interviewing, Offered, Hired, Rejected, Declined) */
.candidate-status-pill {
    font-size: 0.7rem !important;
    padding: 0.45rem 0.75rem !important;
    width: 9.5rem !important;
    min-width: 9.5rem !important;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* Base Colors for Priority */
.badge-high {
    background-color: #e11d48 !important;
}

/* Vivid Red */
.badge-medium {
    background-color: #f97316 !important;
}

/* Vibrant Orange */
.badge-low {
    background-color: #10b981 !important;
}

/* Emerald Green */

/* Dynamic Mappings for Stages and Statuses */
/* PENDING APPROVAL - Deep Professional Blue */
.badge-stage-pending-approval,
.badge-status-PENDING_APPROVAL {
    background-color: #0369a1 !important;
}

/* BUDGET APPROVAL - Warm Amber */
.badge-stage-budget-approval,
.badge-status-BUDGET_APPROVAL {
    background-color: #d97706 !important;
}

/* REJECTED - Strong Crimson Maroon */
.badge-stage-rejected,
.badge-status-REJECTED,
.badge-closed {
    background-color: #991b1b !important;
}

/* IN REVIEW / HR REVIEW - Elegant Indigo */
.badge-stage-hr-review,
.badge-stage-in-review,
.badge-status-IN_REVIEW {
    background-color: #4f46e5 !important;
}

/* APPROVED / COMPLETED - Success Green */
.badge-status-APPROVED,
.badge-stage-approved,
.badge-status-COMPLETED,
.badge-stage-completed {
    background-color: #15803d !important;
}

/* JOB POSTED - Teal (posted on boards) */
.badge-stage-job-posted {
    background-color: #0d9488 !important;
}

/* CANCELLED - Neutral Slate */
.badge-stage-cancelled,
.badge-status-CANCELLED {
    background-color: #334155 !important;
}

/* ON HOLD - Mustard Yellow */
.badge-stage-on-hold,
.badge-status-ON_HOLD {
    background-color: #a16207 !important;
}

/* DRAFT - Subtle Gray */
.badge-stage-draft,
.badge-status-DRAFT {
    background-color: #64748b !important;
}

/* RETURNED FOR REVISIONS - Yellow, all caps */
.badge-stage-returned-for-revisions,
.badge-stage-return-for-revisions {
    background-color: #ca8a04 !important;
    color: #ffffff !important;
}

/* Candidate pipeline stages (All Requests list) – distinct from workflow stages */
.badge-stage-screening {
    background-color: #0891b2 !important;
    /* Cyan */
}

/* For Interview uses a pale blue background, so white badge text is not
   readable in light mode. Keep the dark-mode palette unchanged. */
.badge-stage-for-interview {
    background-color: #e0f2fe !important;
    color: #075985 !important;
    border: 1px solid #7dd3fc !important;
}

.badge-stage-interviewing {
    background-color: #7c3aed !important;
    /* Violet */
}

.badge-stage-offered {
    background-color: #ea580c !important;
    /* Orange */
}

.badge-stage-hired {
    background-color: #047857 !important;
    /* Emerald (darker green, distinct from Completed) */
}

/* Applicant/candidate status pill in modal – orange oval in light and dark mode */
.candidate-status-pill {
    background: #f06543 !important;
    border: 1px solid #e85535 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    min-width: auto;
}

.dark .candidate-status-pill {
    background: #f06543 !important;
    border-color: #e85535 !important;
    color: #ffffff !important;
}

/* SLA Status Extras */
.badge-sla-on-track {
    background-color: #0369a1 !important;
}

.badge-overdue {
    background-color: #e11d48 !important;
}

/* Global Fallback for any Stage Badge */
.badge[class*="badge-stage-"] {
    background-color: #0369a1;
}


/* Nav */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    color: #CBD5E1;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.dark .sidebar {
    background-color: #0f111a;
}

.dark .nav-link {
    color: #94A3B8;
}

.dark .nav-link:hover,
.dark .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 3rem;
}

/* Sidebar scrollbar: subtle, rounded, and theme-aware instead of the bright
   browser default that makes the fixed navigation look visually detached. */
aside.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

aside.sidebar::-webkit-scrollbar {
    width: 8px;
}

aside.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

aside.sidebar::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

aside.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    background-clip: padding-box;
}

.dark aside.sidebar {
    scrollbar-color: #475569 transparent;
}

.dark aside.sidebar::-webkit-scrollbar-thumb {
    background: #475569;
    background-clip: padding-box;
}

.dark aside.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    background-clip: padding-box;
}

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

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

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Admin pages - dark mode support */
.admin-user-name,
.admin-page-title,
.admin-modal-title,
.admin-modal-username {
    color: var(--text-main);
}

.admin-user-email,
.admin-modal-email,
.admin-modal-subtitle {
    color: var(--text-muted);
}

.dark .admin-modal-subtitle {
    color: #cbd5e1;
}

.user-role-display {
    background: #E0E7FF;
    color: #4338CA;
}

.user-dept-display {
    color: var(--text-main);
}

.admin-edit-user-info {
    background: #F8FAFC;
}

.admin-edit-modal-content {
    background: var(--surface);
}

.admin-toast {
    background: var(--surface);
    border: 1px solid var(--border);
}

.admin-toast-message {
    color: var(--text-main);
}

.dark .admin-user-name,
.dark .admin-page-title,
.dark .admin-modal-title,
.dark .admin-modal-username {
    color: #f8fafc;
}

.dark .admin-user-email,
.dark .admin-modal-email {
    color: #cbd5e1;
}

.dark .user-role-display {
    background: #3730a3;
    color: #c7d2fe;
}

.dark .user-dept-display {
    color: #f8fafc;
}

.dark .admin-edit-user-info {
    background: #334155;
}

.dark .admin-edit-modal-content {
    background: #1e293b;
}

.dark .admin-toast {
    background: #1e293b;
    border-color: #334155;
}

.dark .admin-toast-message {
    color: #f8fafc;
}

.admin-table-header {
    background: #F8FAFC;
}

.admin-table-th {
    color: #64748B;
}

.dark .admin-table-header {
    background: #334155 !important;
}

.dark .admin-table-th {
    color: #cbd5e1 !important;
}

.dark .admin-governance-page .card table tbody tr {
    border-bottom-color: #334155 !important;
}

/* Super Admin Dashboard - dark mode */
.admin-uptime-box {
    background: white;
}

.admin-workflow-item {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.admin-workflow-name,
.admin-log-action,
.admin-ref-value {
    color: var(--text-main);
}

.admin-workflow-meta,
.admin-log-object,
.admin-ref-label,
.admin-ref-icon {
    color: var(--text-muted);
}

.admin-stage-badge {
    background: white;
    border: 1px solid #CBD5E1;
    color: var(--text-muted);
}

.admin-ref-item {
    border: 1px dashed #CBD5E1;
}

.dark .admin-uptime-box {
    background: #1e293b;
}

.dark .admin-workflow-item {
    background: #334155;
    border-color: #475569;
}

.dark .admin-workflow-name,
.dark .admin-log-action,
.dark .admin-ref-value {
    color: #f8fafc;
}

.dark .admin-workflow-meta,
.dark .admin-log-object,
.dark .admin-ref-label {
    color: #cbd5e1;
}

.dark .admin-ref-icon {
    color: #94a3b8;
}

.dark .admin-stage-badge {
    background: #475569;
    border-color: #64748b;
    color: #e2e8f0;
}

.dark .admin-ref-item {
    border-color: #475569;
}

/* Audit logs page - dark mode */
.admin-audit-user,
.admin-audit-entity,
.admin-audit-details,
.admin-audit-timestamp {
    color: var(--text-muted);
}

.admin-audit-user {
    color: var(--text-main);
}

.dark .admin-audit-user,
.dark .admin-audit-entity,
.dark .admin-audit-details {
    color: #f8fafc;
}

.dark .admin-audit-timestamp {
    color: #cbd5e1;
}

.dark .admin-governance-page .card table thead tr {
    background: #334155 !important;
}

.dark .admin-governance-page .card table thead th {
    color: #cbd5e1 !important;
}

/* Analytics dashboard - "All Requests" button dark mode */
.dark .btn[style*="background: white"] {
    background: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

.dark .btn[style*="background: white"]:hover {
    background: #475569 !important;
}

/* --- Request detail page, modals, interview calendar – smaller text --- */
#request-detail-content,
#request-detail-modal-content .p-6,
.request-detail-modal-card,
#request-detail-modal-content #request-detail-content {
    font-size: 0.75rem !important;
}

#request-detail-content h2,
#request-detail-modal-content h2 {
    font-size: 1.2rem !important;
}

#request-detail-content h4,
#request-detail-modal-content h4 {
    font-size: 0.65rem !important;
}

/* Tab buttons – same size as department/company/openings (0.8rem) */
#request-detail-content button.tab-btn,
#request-detail-modal-content button.tab-btn {
    font-size: 0.8rem !important;
    font-weight: 600;
}

/* Tab content – smaller */
#request-detail-content .text-sm,
#request-detail-modal-content .text-sm,
#request-detail-content .tab-content .text-sm {
    font-size: 0.7rem !important;
}

#request-detail-content .text-base,
#request-detail-modal-content .text-base {
    font-size: 0.7rem !important;
}

#request-detail-content .text-xs,
#request-detail-modal-content .text-xs,
#request-detail-content .tab-content .text-xs {
    font-size: 0.6rem !important;
}

#request-detail-content .text-lg {
    font-size: 0.9rem !important;
}

/* Keep request metadata text vertically centered inside its value panel. */
#request-detail-content .position-qualifications-value,
#request-detail-modal-content .position-qualifications-value {
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box;
    min-height: 52px;
}

#request-detail-content .tab-content,
#request-detail-modal-content .tab-content {
    font-size: 0.7rem !important;
}

#request-detail-content .tab-content p,
#request-detail-content .tab-content div:not([class*="text-"]),
#request-detail-modal-content .tab-content p,
#request-detail-modal-content .tab-content div:not([class*="text-"]) {
    font-size: 0.7rem !important;
}

.modal-action-btn {
    font-size: 0.75rem !important;
    padding: 6px 14px !important;
}

.modal-actions-bar .btn {
    font-size: 0.75rem !important;
}

/* Request detail: cohesive hierarchy for both the full-page view and modal. */
.request-detail-shell {
    --request-detail-border: #e2e8f0;
    --request-detail-muted: #64748b;
    --request-detail-surface: #f8fafc;
    color: #172033;
    font-size: 0.875rem !important;
    line-height: 1.5;
}

/* The legacy detail rules above intentionally shrink this surface; keep the
   redesigned request view readable without changing the rest of the system. */
.request-detail-shell [class*="text-[0.65rem]"],
.request-detail-shell .text-xs,
.request-detail-shell .tab-content .text-xs {
    font-size: 0.75rem !important;
}

.request-detail-shell [class*="text-[0.8rem]"],
.request-detail-shell .text-sm,
.request-detail-shell .tab-content .text-sm {
    font-size: 0.82rem !important;
}

.request-detail-shell h4 {
    font-size: 0.75rem !important;
}

.request-detail-shell h2 {
    font-size: 1.35rem !important;
}

.request-detail-shell .request-detail-command-strip,
.request-detail-shell .request-detail-tabs,
.request-detail-shell .request-detail-overview-grid,
.request-detail-shell .tab-content {
    font-size: 0.875rem !important;
}

#request-detail-modal-content {
    padding: 0 !important;
    scrollbar-gutter: stable;
}

#request-detail-modal-card {
    border-radius: 1.25rem;
}

/* Keep the modal close control centered inside its hit area. */
#request-detail-modal-card .request-detail-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3.75rem;
    height: 3.75rem;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

/* The modal toolbar only contains navigation controls; it should not look like
   a second content panel spanning the entire request. */
#modal-expand-bar {
    background: transparent !important;
    border-bottom-color: transparent !important;
    padding: 0.75rem 1rem !important;
}

#modal-expand-bar a {
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.82);
}

#modal-expand-bar a:hover {
    background: #fff;
}

#modal-expand-bar button {
    background: rgba(255, 255, 255, 0.82);
}

.dark #modal-expand-bar a,
.dark #modal-expand-bar button {
    background: rgba(15, 23, 42, 0.78);
}

.dark #modal-expand-bar a:hover,
.dark #modal-expand-bar button:hover {
    background: #1e293b;
}

.request-detail-shell > .request-detail-command-strip {
    align-items: stretch;
}

.request-detail-shell .request-detail-command-strip > section,
.request-detail-shell .request-detail-overview-sidebar > div,
.request-detail-shell .request-detail-overview-main > div:not(.hidden) {
    border-radius: 1rem;
}

.request-detail-shell .request-detail-command-strip > section {
    padding: 1.1rem 1.25rem;
}

.request-detail-shell .request-detail-command-strip p,
.request-detail-shell .request-detail-command-strip span,
.request-detail-shell .request-detail-command-strip select,
.request-detail-shell .request-detail-command-strip button {
    font-size: 0.75rem !important;
}

/* The command strip needs readable controls and values; the small sizing above
   is reserved for metadata labels. */
.request-detail-shell .request-detail-command-strip section:first-child > div > div > p.mt-1 {
    font-size: 0.95rem !important;
}

.request-detail-shell .request-detail-command-strip select,
.request-detail-shell .request-detail-command-strip select option {
    font-size: 0.9rem !important;
}

.request-detail-shell .request-detail-command-strip select {
    min-height: 2.75rem;
}

.request-detail-shell .request-detail-command-strip section:first-child form {
    min-width: 0;
    width: 100%;
}

.request-detail-shell .request-detail-command-strip section:first-child form select {
    min-width: 0;
    width: 100%;
}

.request-detail-shell .request-detail-command-strip section:first-child form button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.request-detail-shell .request-detail-command-strip section:nth-child(2) .grid span {
    font-size: 0.84rem !important;
}

.request-detail-shell .request-detail-command-strip section:nth-child(2) .grid strong {
    font-size: 0.9rem !important;
}

.request-detail-shell .request-detail-tabs {
    gap: 0.25rem;
    margin-bottom: 1.75rem;
    padding: 0 0.25rem;
    overflow: hidden;
    scrollbar-width: none;
}

.request-detail-shell .request-detail-tabs .tab-btn {
    position: relative;
    flex: 0 0 auto;
    padding: 0.7rem 0.9rem 0.85rem;
    color: #64748b;
    border: 0;
    background: transparent;
    white-space: nowrap;
    transition: color 160ms ease, background-color 160ms ease;
}

.request-detail-shell .request-detail-tabs .tab-btn:hover {
    color: #334155;
    background: #f8fafc;
    border-radius: 0.6rem 0.6rem 0 0;
}

.request-detail-shell .request-detail-tabs .tab-btn.active {
    color: var(--primary-color, #f15a3a);
}

.request-detail-shell .request-detail-tabs .tab-btn.active::after {
    position: absolute;
    right: 0.75rem;
    bottom: -1px;
    left: 0.75rem;
    height: 3px;
    content: "";
    background: var(--primary-color, #f15a3a);
    border-radius: 999px 999px 0 0;
}

.request-detail-shell .request-detail-overview-grid {
    align-items: start;
    gap: 2.25rem;
    grid-template-columns: minmax(0, 1fr) !important;
}

.request-detail-shell .request-detail-overview-main,
.request-detail-shell .request-detail-overview-sidebar {
    min-width: 0;
}

.request-detail-shell .request-detail-overview-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.request-detail-shell .request-detail-overview-main > div:not(.hidden) {
    min-width: 0;
}

.request-detail-shell .request-detail-overview-main > div:first-child,
.request-detail-shell .request-detail-overview-main > div.job-postings-main-block,
.request-detail-shell .request-detail-overview-main > div:has(.position-qualifications-value) {
    grid-column: 1 / -1;
}

.request-detail-shell .request-detail-overview-main > div:not(.hidden) {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--request-detail-border);
    background: #fff;
}

.request-detail-shell .request-detail-overview-main > hr {
    display: none;
}

.request-detail-shell .request-detail-overview-main h4,
.request-detail-shell .request-detail-overview-sidebar h4 {
    margin-bottom: 0.65rem;
    color: #64748b;
    font-size: 0.68rem !important;
    letter-spacing: 0.09em;
}

.request-detail-shell .request-detail-overview-main > div:not(.hidden) > h4 {
    color: #334155;
    font-size: 0.76rem !important;
    letter-spacing: 0.04em;
}

.request-detail-shell .request-detail-overview-main .position-qualifications-value {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: var(--request-detail-surface);
    color: #334155;
    font-size: 0.78rem !important;
    line-height: 1.65;
}

.request-detail-shell .request-detail-overview-sidebar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.request-detail-shell .request-detail-overview-sidebar > div {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding: 0.9rem 1rem !important;
    border-top: 1px solid var(--request-detail-border);
    background: #fff;
}

.request-detail-shell .request-detail-overview-sidebar > div:first-child {
    border-top: 0;
}

.request-detail-shell .request-detail-cutoff-empty {
    display: none !important;
}

.request-detail-shell .request-detail-overview-sidebar > div > h4 {
    margin-top: 0;
}

.request-detail-shell .request-detail-overview-sidebar .rounded-xl {
    border-radius: 0.85rem;
}

/* These people/status summaries are already represented in the request header. */
.request-detail-shell .request-detail-requestor,
.request-detail-shell .request-detail-approved-by,
.request-detail-shell .request-detail-assigned-to {
    display: none !important;
}

/* Keep request actions compact and visually consistent instead of making each
   action look like a separate oversized content panel. */
.request-detail-shell .request-detail-action-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    grid-column: 1 / -1;
    min-height: 0;
    padding: 0.25rem 0 !important;
    border-top: 0 !important;
}

/* Header/footer actions are intentionally outside the overview grid. */
.request-detail-shell .request-detail-header-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    align-self: flex-start;
}

.request-detail-shell .request-detail-inline-form form {
    align-items: center;
}

.request-detail-shell .request-detail-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--request-detail-border);
}

.request-detail-shell .request-detail-action-card {
    display: none !important;
}

@media (max-width: 767px) {
    .request-detail-shell .request-detail-header-action,
    .request-detail-shell .request-detail-modal-footer {
        width: 100%;
    }

    .request-detail-shell .request-detail-header-action {
        margin-top: 0.75rem;
        justify-content: flex-start;
    }

    .request-detail-shell .request-detail-inline-form,
    .request-detail-shell .request-detail-inline-form form {
        width: 100%;
        flex-wrap: wrap;
    }

    .request-detail-shell .request-detail-modal-footer {
        justify-content: flex-start;
    }
}

.request-detail-shell .request-detail-action-card > h4 {
    margin: 0;
}

.request-detail-shell .request-detail-action-card > p {
    max-width: 34rem;
    margin: 0;
    line-height: 1.55;
}

.request-detail-shell .request-detail-action-card > form {
    margin-left: auto;
}

.request-detail-shell .request-detail-action-card > button,
.request-detail-shell .request-detail-action-card form button {
    min-height: 2.75rem;
    padding: 0.65rem 1.05rem !important;
    border-radius: 0.8rem;
    font-size: 0.78rem !important;
    font-weight: 700;
}

.request-detail-shell .request-detail-action-card form {
    width: min(100%, 34rem);
}

/* Actions form their own balanced row at the bottom of the overview sidebar. */
.request-detail-shell .request-detail-on-hold-action,
.request-detail-shell .request-detail-close-action {
    align-self: stretch;
}

.request-detail-shell .request-detail-on-hold-action > button,
.request-detail-shell .request-detail-close-action > button {
    margin-left: auto;
}

.request-detail-shell .request-detail-executive-decision {
    margin-top: 2.25rem;
    padding-top: 2rem;
}

.request-detail-shell .request-detail-executive-decision h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem !important;
    letter-spacing: -0.01em;
}

.request-detail-shell .request-detail-executive-decision > div {
    padding: 1.25rem;
    border-radius: 1rem;
}

.request-detail-shell .request-detail-executive-decision textarea {
    min-height: 7rem;
    padding: 0.85rem 1rem;
    font-size: 0.8rem !important;
    line-height: 1.5;
}

.request-detail-shell .request-detail-executive-decision button {
    min-height: 3rem;
    border-radius: 0.8rem;
    font-size: 0.8rem !important;
}

.request-detail-shell #content-clarifications,
.request-detail-shell #content-candidates,
.request-detail-shell #content-comments {
    min-width: 0;
}

.request-detail-shell #content-clarifications > div > h3,
.request-detail-shell #content-candidates h3,
.request-detail-shell #content-comments h3 {
    margin-bottom: 1.1rem;
    font-size: 1rem !important;
    letter-spacing: -0.01em;
}

@media (max-width: 767px) {
    .request-detail-shell {
        padding: 1rem !important;
    }

    .request-detail-shell .request-detail-tabs {
        gap: 0;
        margin-right: -1rem;
        margin-left: -1rem;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .request-detail-shell .request-detail-tabs .tab-btn {
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }

    .request-detail-shell .request-detail-overview-main > div:not(.hidden),
    .request-detail-shell .request-detail-overview-sidebar > div {
        padding: 0.95rem !important;
    }

    .request-detail-shell .request-detail-overview-main,
    .request-detail-shell .request-detail-overview-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .request-detail-shell .request-detail-overview-sidebar {
        gap: 0.75rem;
    }

    .request-detail-shell .request-detail-overview-main > div:first-child,
    .request-detail-shell .request-detail-overview-main > div.job-postings-main-block,
    .request-detail-shell .request-detail-overview-main > div:has(.position-qualifications-value) {
        grid-column: auto;
    }

    .request-detail-shell .request-detail-executive-decision > div {
        padding: 1rem;
    }

    .request-detail-shell .request-detail-executive-decision button {
        flex-basis: 100%;
    }
}

.dark .request-detail-shell {
    --request-detail-border: #334155;
    --request-detail-surface: rgba(30, 41, 59, 0.62);
    color: #e2e8f0;
}

.dark .request-detail-shell .request-detail-overview-main > div:not(.hidden),
.dark .request-detail-shell .request-detail-overview-sidebar > div {
    background: #0f172a;
}

.dark .request-detail-shell .request-detail-tabs .tab-btn:hover {
    color: #f8fafc;
    background: rgba(51, 65, 85, 0.45);
}

@media (min-width: 768px) and (max-width: 1100px) {
    .request-detail-shell .request-detail-overview-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .request-detail-shell .request-detail-action-card {
        grid-column: 1 / -1;
    }
}

/* Executive decision confirmation and remarks states. */
.approval-comments-wrap {
    padding: 0.9rem 1rem 1rem;
    border: 1px solid #fde68a;
    border-radius: 0.8rem;
    background: #fffbeb;
}

.approval-comments-wrap label {
    color: #92400e !important;
}

.approval-remarks-actions button:disabled,
.approval-confirmation-actions button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.approval-confirmation-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
}

.approval-confirmation-modal.is-open {
    display: flex;
}

.approval-confirmation-dialog {
    width: min(100%, 25rem);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    text-align: center;
}

.approval-confirmation-icon {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0 auto 0.9rem;
    place-items: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #059669;
    font-size: 1.35rem;
    font-weight: 800;
}

.approval-confirmation-dialog h3 {
    margin: 0;
    color: #172033;
    font-size: 1rem;
    font-weight: 700;
}

.approval-confirmation-dialog p {
    margin: 0.5rem 0 1.25rem;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.55;
}

.approval-confirmation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

@media (max-width: 767px) {
    .approval-confirmation-actions {
        flex-direction: column-reverse;
    }

    .approval-confirmation-actions button {
        width: 100%;
    }
}

.dark .approval-comments-wrap {
    border-color: #854d0e;
    background: rgba(120, 53, 15, 0.2);
}

.dark .approval-comments-wrap label {
    color: #fde68a !important;
}

.dark .approval-confirmation-dialog {
    border-color: #334155;
    background: #0f172a;
}

.dark .approval-confirmation-dialog h3 {
    color: #f8fafc;
}

.dark .approval-confirmation-dialog p {
    color: #94a3b8;
}

/* Global modal content – smaller text */
#global-modal-content,
#global-modal-content .card,
.global-modal-form-content {
    font-size: 0.8rem !important;
}

#global-modal-content h1,
#global-modal-content h2 {
    font-size: 1.1rem !important;
}

#global-modal-content h3,
#global-modal-content h4 {
    font-size: 0.9rem !important;
}

#global-modal-content label,
#global-modal-content .font-semibold {
    font-size: 0.75rem !important;
}

#global-modal-content input,
#global-modal-content select,
#global-modal-content textarea,
#global-modal-content button {
    font-size: 0.8rem !important;
}

#global-modal-content .text-sm {
    font-size: 0.75rem !important;
}

#global-modal-content .text-xs {
    font-size: 0.65rem !important;
}

/* Interview calendar – smaller text */
.interview-calendar-page {
    font-size: 0.78rem !important;
}

/* Google Calendar-inspired scheduling shell: open grid, compact controls, clear day focus. */
.calendar-toolbar {
    min-height: 2.75rem;
}

.calendar-create-button {
    min-height: 2.5rem;
    padding: 0 1rem;
    border: 1px solid #dadce0;
    border-radius: 1.25rem;
    background: #fff;
    color: #3c4043;
    box-shadow: 0 1px 2px rgba(60, 64, 67, .18);
    font-size: .8125rem;
    font-weight: 600;
    transition: box-shadow .15s ease, background .15s ease;
}

.calendar-create-button:hover {
    background: #f8fafd;
    box-shadow: 0 2px 5px rgba(60, 64, 67, .26);
}

.calendar-filter-button,
.calendar-today-button,
.calendar-nav-button {
    border: 1px solid #dadce0;
    background: #fff;
    color: #3c4043;
    border-radius: .375rem;
    font-weight: 500;
}

.calendar-filter-button:hover,
.calendar-today-button:hover,
.calendar-nav-button:hover {
    background: #f8fafd;
}

.calendar-today-button {
    padding: .48rem .8rem;
    font-size: .75rem;
}

.calendar-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.calendar-navigation-title {
    color: #3c4043;
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: -.01em;
}

.calendar-surface {
    border: 1px solid #dadce0;
    border-radius: .5rem;
}

.calendar-month-day {
    transition: background .12s ease;
}

.calendar-month-day:hover {
    background: #f8fafd;
}

.calendar-month-day.calendar-day-today {
    background: transparent;
}

.calendar-date-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
}

.calendar-day-today .calendar-date-number {
    background: #1a73e8;
    color: #fff;
}

.dark .calendar-create-button,
.dark .calendar-filter-button,
.dark .calendar-today-button,
.dark .calendar-nav-button {
    border-color: #475569;
    background: #1e293b;
    color: #e2e8f0;
}

.dark .calendar-create-button:hover,
.dark .calendar-filter-button:hover,
.dark .calendar-today-button:hover,
.dark .calendar-nav-button:hover,
.dark .calendar-month-day:hover {
    background: #334155;
}

.dark .calendar-navigation-title {
    color: #e2e8f0;
}

.dark .calendar-surface {
    border-color: #475569;
}

#calendar-month .grid-cols-7>div,
#calendar-week .grid-cols-8>div,
#calendar-day .font-semibold:not(#calendar-title-day) {
    font-size: 0.7rem !important;
}

#calendar-month .text-sm,
#calendar-week .text-sm,
#calendar-day .text-sm {
    font-size: 0.7rem !important;
}

#calendar-month .text-xs,
#calendar-week .text-xs,
#calendar-day .text-xs {
    font-size: 0.65rem !important;
}

#calendar-title,
#calendar-title-week,
#calendar-day #calendar-title-day {
    font-size: 0.9375rem !important;
}

#schedule-settings-modal h2 {
    font-size: 0.95rem !important;
}

#schedule-settings-modal label {
    font-size: 0.7rem !important;
}

#schedule-settings-modal input {
    font-size: 0.75rem !important;
}

#schedule-settings-modal p {
    font-size: 0.7rem !important;
}

/* Meeting-link toggles: the generic form rule must not stretch checkbox inputs. */
#schedule-meet-wrap input[type="checkbox"],
#interview-online-options input[type="checkbox"],
#meeting-link-wrap input[type="checkbox"] {
    display: inline-block !important;
    width: 1rem !important;
    min-width: 1rem !important;
    height: 1rem !important;
    margin: 0.15rem 0 0 !important;
    padding: 0 !important;
}

#schedule-meet-wrap label,
#interview-online-options label,
#meeting-link-wrap label {
    display: flex !important;
    margin-bottom: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

#schedule-meet-wrap .schedule-generate-toggle,
#interview-online-options .interview-generate-toggle,
#meeting-link-wrap .interview-generate-toggle {
    display: grid !important;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: start;
    column-gap: 0.5rem;
    width: 100%;
}

#schedule-meet-wrap .schedule-generate-toggle > input[type="checkbox"],
#interview-online-options .interview-generate-toggle > input[type="checkbox"],
#meeting-link-wrap .interview-generate-toggle > input[type="checkbox"] {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}

#schedule-meet-wrap .schedule-generate-toggle > span,
#interview-online-options .interview-generate-toggle > span,
#meeting-link-wrap .interview-generate-toggle > span {
    grid-column: 2;
    min-width: 0;
}

/* Applicant review modal – smaller text */
#applicant-review-modal {
    font-size: 0.8rem !important;
}

#applicant-review-modal-title {
    font-size: 1rem !important;
}

#applicant-review-modal h4 {
    font-size: 0.65rem !important;
}

#applicant-review-modal .text-base {
    font-size: 0.8rem !important;
}

#applicant-review-modal .text-sm {
    font-size: 0.75rem !important;
}

#applicant-review-modal .text-xs {
    font-size: 0.65rem !important;
}

#applicant-review-modal .btn {
    font-size: 0.75rem !important;
    padding: 6px 14px !important;
}

#noshow-password-modal h3 {
    font-size: 0.95rem !important;
}

#noshow-password-modal p {
    font-size: 0.75rem !important;
}

/* Application form configuration – dark mode (fallbacks for inline/Tailwind) */
.dark .app-form-config-section-header {
    background: #1e293b !important;
    border-color: #475569 !important;
}

.dark .app-form-config-section-header h2,
.dark .app-form-config-section-header p {
    color: #f1f5f9 !important;
}

.dark .app-form-field-form input:not([type="checkbox"]):not([type="radio"]),
.dark .app-form-field-form select,
.dark .app-form-field-form textarea {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

.dark .app-form-field-form input::placeholder,
.dark .app-form-field-form textarea::placeholder {
    color: #94a3b8 !important;
}

/* Application form – Required checkbox (high-contrast checkmark in dark mode) */
.app-form-field-form .app-form-required-checkbox {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem !important;
    min-height: 1.25rem !important;
    border: 2px solid #64748b !important;
    border-radius: 0.375rem !important;
    cursor: pointer;
    background-color: transparent !important;
    flex-shrink: 0;
    transition: background-color 0.2s, border-color 0.2s;
}

.dark .app-form-field-form .app-form-required-checkbox {
    border-color: #94a3b8 !important;
    background-color: transparent !important;
}

.app-form-field-form .app-form-required-checkbox:checked {
    background-color: #f06543 !important;
    border-color: #f06543 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") !important;
    background-size: 14px 14px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.app-form-field-form .app-form-required-checkbox:hover {
    border-color: #f06543 !important;
}

.app-form-field-form .app-form-required-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(240, 101, 67, 0.4);
}

/* Application form – Field type dropdown with chevron arrow */
.app-form-field-form .app-form-field-type-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.125rem 1.125rem;
}

.dark .app-form-field-form .app-form-field-type-select {
    background-color: #334155 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    background-size: 1.125rem 1.125rem !important;
}

/* ==========================================================================
   Employee Database – Two-Panel Layout
   ========================================================================== */

/* Company tabs header (reuses existing .company-tabs-header from All Requests) */
#employee-database-page .company-tabs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
}

#employee-database-page .company-tabs-bar {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary-color) 72%, var(--border)) transparent;
}

.dark #employee-database-page .company-tabs-header {
    background: #1a1d27;
    border-color: #2d3348;
    border-bottom-color: #2d3348;
}

/* Two-panel container */
.employee-db-two-panel {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    min-height: 600px;
    background: var(--surface);
}

.employee-db-two-panel.has-company-tabs {
    border-radius: 0;
    border-top: none;
}

.dark .employee-db-two-panel {
    background: #1a1d27;
    border-color: #2d3348;
}

/* ── Left Panel ── */
.employee-db-left-panel {
    width: 280px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.dark .employee-db-left-panel {
    background: #151821;
    border-right-color: #2d3348;
}

.employee-db-left-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.dark .employee-db-left-header {
    border-bottom-color: #2d3348;
}

.employee-db-left-header-icon {
    font-size: 18px;
    color: var(--primary-color);
}

.employee-db-left-header-text {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-main);
    flex: 1;
}

.employee-db-left-header-count {
    font-size: 0.6875rem;
    font-weight: 800;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    line-height: 1;
}

.dark .employee-db-left-header-count {
    background: #334155;
    color: #cbd5e1;
}

/* Department search */
.employee-db-dept-search-wrap {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.dark .employee-db-dept-search-wrap {
    border-bottom-color: #2d3348;
}

.employee-db-dept-search {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text-main);
    margin-bottom: 0;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.employee-db-dept-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(240, 101, 67, 0.15);
}

.dark .employee-db-dept-search {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

.dark .employee-db-dept-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(240, 101, 67, 0.25);
}

.employee-db-dept-search::placeholder {
    color: #94a3b8;
}

/* Search input wrapper and clear button */
.employee-db-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.employee-db-search-input-wrap input {
    flex: 1;
    min-width: 0;
}

.employee-db-search-clear {
    position: absolute;
    right: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}

.employee-db-search-clear:hover {
    background: #e2e8f0;
    color: #475569;
}

.dark .employee-db-search-clear {
    color: #64748b;
}

.dark .employee-db-search-clear:hover {
    background: #334155;
    color: #cbd5e1;
}

.employee-db-search-clear .material-symbols-outlined {
    font-size: 16px;
}

/* Department list */
.employee-db-dept-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 0.375rem;
}

.employee-db-dept-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    color: var(--text-main);
    margin-bottom: 0.125rem;
}

.employee-db-dept-item:hover {
    background: #f1f5f9;
}

.dark .employee-db-dept-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.employee-db-dept-item.active {
    background: rgba(240, 101, 67, 0.08);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(0.875rem - 3px);
}

.dark .employee-db-dept-item.active {
    background: rgba(240, 101, 67, 0.12);
}

.employee-db-dept-item-info {
    min-width: 0;
    flex: 1;
}

.employee-db-dept-item-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-db-dept-item.active .employee-db-dept-item-name {
    color: var(--primary-color);
    font-weight: 700;
}

.employee-db-dept-item-count {
    font-size: 0.6875rem;
    font-weight: 800;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    flex-shrink: 0;
    margin-left: 0.5rem;
    line-height: 1.3;
}

.dark .employee-db-dept-item-count {
    background: #334155;
    color: #cbd5e1;
}

.employee-db-dept-item.active .employee-db-dept-item-count {
    background: var(--primary-color);
    color: #fff;
}

.employee-db-dept-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-style: italic;
}

/* ── Right Panel ── */
.employee-db-right-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.dark .employee-db-right-panel {
    background: #1a1d27;
}

.employee-db-right-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.dark .employee-db-right-header {
    border-bottom-color: #2d3348;
}

.employee-db-right-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.employee-db-right-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
}

/* Table wrapper */
.employee-db-table-wrap {
    flex: 1;
    overflow: auto;
    scrollbar-width: thin;
}

/* Employee table */
.employee-db-table {
    font-size: 0.8125rem;
}

.employee-db-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.employee-db-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.dark .employee-db-table thead tr {
    background: #232734;
    border-bottom-color: #3d4460;
}

.employee-db-table thead th {
    padding: 0.75rem 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: #64748b;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
}

.dark .employee-db-table thead th {
    color: #94a3b8;
}

.employee-db-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.employee-db-table tbody tr:last-child {
    border-bottom: none;
}

.employee-db-table tbody tr:hover {
    background: #f8fafc;
}

.dark .employee-db-table tbody tr {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

.dark .employee-db-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.employee-db-table tbody td {
    padding: 0.75rem 1.25rem;
    color: var(--text-main);
    vertical-align: middle;
}

/* Employee avatar */
.employee-db-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Employee name and email */
.employee-db-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-main);
}

.employee-db-email {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.employee-db-eid {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

.employee-db-position {
    font-weight: 500;
    color: var(--text-main);
}

.employee-db-date {
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
}

/* Employment type badge */
.badge-employment-type {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
    white-space: nowrap;
    min-width: 0 !important;
    width: auto !important;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
}

table tbody td .badge.badge-employment-type {
    min-width: 0 !important;
    width: auto !important;
    padding: 0.3rem 0.75rem !important;
}

.dark .badge-employment-type {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.25);
}

/* Role badge */
.employee-db-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    white-space: nowrap;
}

.dark .employee-db-role-badge {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.25);
}

/* Empty state */
.employee-db-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.employee-db-empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: 1rem;
}

.employee-db-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.375rem 0;
}

.employee-db-empty-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* Filter toggle button */
.employee-db-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.employee-db-filter-toggle:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.dark .employee-db-filter-toggle {
    background: #232734;
    border-color: #475569;
    color: #e2e8f0;
}

.dark .employee-db-filter-toggle:hover {
    background: #334155;
    border-color: #64748b;
}

.employee-db-filter-active-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

/* Filter bar */
.employee-db-filters {
    display: block;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    flex-shrink: 0;
}

.dark .employee-db-filters {
    background: #151821;
    border-bottom-color: #2d3348;
}

.employee-db-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.dark .employee-db-filters-header {
    background: #1a1d27;
    border-bottom-color: #2d3348;
}

.employee-db-filters-heading,
.employee-db-filter-header-actions {
    display: flex;
    align-items: center;
}

.employee-db-filters-heading {
    gap: 0.55rem;
    min-width: 0;
}

.employee-db-filters-heading > .material-symbols-outlined {
    color: var(--primary-color);
    font-size: 1.15rem;
}

.employee-db-filters-heading div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.employee-db-filters-heading strong {
    color: var(--text-main);
    font-size: 0.78rem;
}

.employee-db-filters-heading div > span {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-db-filter-header-actions {
    flex: 0 1 410px;
    justify-content: flex-end;
    gap: 0.65rem;
}

/* Search field in filter header */
.employee-db-filter-search-wrap {
    flex: 1 1 270px;
    min-width: 210px;
    max-width: 360px;
}

.employee-db-filter-search-icon {
    position: absolute;
    left: 0.8rem;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.employee-db-filter-search {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 2.75rem;
    font-size: 0.8125rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
    margin-bottom: 0;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.employee-db-filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(240, 101, 67, 0.15);
}

.dark .employee-db-filter-search {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

.dark .employee-db-filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(240, 101, 67, 0.25);
}

.employee-db-filter-search::placeholder {
    color: #94a3b8;
}

/* Filter select grid */
.employee-db-filters-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1.25rem 1rem;
}

/* Filter field (label + select) */
.employee-db-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0;
    flex: 0 0 auto;
    min-width: 0;
}

.employee-db-filter-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0;
}

.employee-db-filter-field select {
    display: block;
    padding: 0.4375rem 2rem 0.4375rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: #ffffff;
    color: var(--text-main);
    margin-bottom: 0;
    cursor: pointer;
    min-width: 130px;
    max-width: 180px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem 1rem;
}

.employee-db-filter-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(240, 101, 67, 0.15);
}

.dark .employee-db-filter-field select {
    background-color: #1e293b;
    border-color: #475569;
    color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.dark .employee-db-filter-field select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(240, 101, 67, 0.25);
}

/* Clear filters button */
.employee-db-filter-clear {
    display: inline-flex;
    align-items: center;
    min-height: 2.3rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #b42318;
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-radius: 0.55rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
    margin-bottom: 0;
}

.employee-db-filter-clear:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.dark .employee-db-filter-clear {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.18);
    border-color: rgba(248, 113, 113, 0.3);
}

.dark .employee-db-filter-clear:hover {
    background: rgba(127, 29, 29, 0.3);
}

/* Responsive */
@media (max-width: 820px) {
    .employee-db-two-panel {
        flex-direction: column;
        min-height: auto;
    }

    .employee-db-left-panel {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 260px;
    }

    .dark .employee-db-left-panel {
        border-bottom-color: #2d3348;
    }

    .employee-db-right-panel {
        min-height: 300px;
    }

    #employee-database-page .company-tabs-header {
        align-items: stretch;
        flex-wrap: wrap;
    }

    #employee-database-page .company-tabs-bar {
        flex-basis: 100%;
    }

    .employee-db-filters-header {
        align-items: stretch;
        flex-direction: column;
        gap: 0.7rem;
        padding: 0.75rem 1rem;
    }

    .employee-db-filter-header-actions,
    .employee-db-filter-search-wrap {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
    }

    .employee-db-filter-header-actions {
        justify-content: stretch;
    }

    .employee-db-filter-header-actions .employee-db-filter-clear {
        flex-shrink: 0;
    }

    .employee-db-filters-grid {
        padding: 0.75rem 1rem 0.85rem;
        gap: 0.625rem 0.75rem;
    }

    .employee-db-filter-search-wrap {
        min-width: 0;
        max-width: none;
    }

    .employee-db-filter-field select {
        min-width: 110px;
        max-width: 160px;
    }
}

@media (max-width: 640px) {
    .employee-db-left-panel {
        max-height: 200px;
    }

    .employee-db-table {
        font-size: 0.75rem;
    }

    .employee-db-table thead th,
    .employee-db-table tbody td {
        padding: 0.625rem 0.75rem;
    }

    .employee-db-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
    }

    .employee-db-name {
        font-size: 0.75rem;
    }

    .badge-employment-type,
    .employee-db-role-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }

    .employee-db-right-header {
        padding: 0.875rem 1rem;
    }

    .employee-db-right-title {
        font-size: 1rem;
    }

    .employee-db-filters-heading div > span {
        white-space: normal;
    }

    .employee-db-filters-grid {
        padding: 0.625rem 0.875rem 0.75rem;
        gap: 0.5rem;
    }

    .employee-db-filter-field {
        flex-basis: calc(50% - 0.375rem);
    }

    .employee-db-filter-field select {
        width: 100%;
        max-width: none;
    }

    .employee-db-filter-toggle {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }
}

/* System-wide responsive safeguards: CSS only, no behavior changes */
html {
    -webkit-text-size-adjust: 100%;
}

/* Keep the candidate search glyph independent from broad SVG rules. */
#candidate-search-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    max-width: none !important;
    flex: 0 0 18px !important;
    z-index: 2 !important;
}

.candidate-search-control {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.candidate-search-control #candidate-search {
    position: relative;
    z-index: 1;
    padding-left: 40px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Login password eye toggle: neutralize global input margin so the
   absolute toggle stays vertically centered inside the field. */
.login-pwd-wrap {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

.login-pwd-wrap input {
    width: 100% !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

.login-pwd-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 0.75rem !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

table {
    max-width: 100%;
}

th,
td {
    overflow-wrap: normal;
    word-break: normal;
}

.card,
.admin-governance-page,
.request-form-outer,
.global-modal-form-content,
#request-detail-content,
#request-detail-modal-content {
    max-width: 100%;
}

@media (max-width: 1280px) {
    .sidebar,
    aside.sidebar {
        width: 224px;
    }

    .main-content {
        margin-left: 224px;
    }

    .header-authenticated {
        left: 224px;
    }

    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .sidebar,
    aside.sidebar {
        width: 208px;
    }

    .main-content {
        margin-left: 208px;
    }

    .header-authenticated {
        left: 208px;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .content-wrapper,
    .admin-governance-page {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .card {
        padding: 1.25rem;
    }

    .btn {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    table th,
    table td {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }
}

@media (max-width: 820px) {
    .sidebar,
    aside.sidebar {
        width: 188px;
    }

    .main-content {
        margin-left: 188px;
    }

    .header-authenticated {
        left: 188px;
        min-width: 0;
        gap: 0.75rem !important;
    }

    .header-authenticated .w-80 {
        width: min(18rem, 100%) !important;
    }

    .card {
        padding: 1rem;
        border-radius: 10px;
    }

    .all-requests-filters {
        gap: 0.9rem;
        padding: 1rem;
    }

    .all-requests-filters .all-requests-filter-label,
    .all-requests-filters select {
        width: 100%;
        max-width: none;
    }

    .request-form-outer {
        padding: 0.85rem;
    }

    .request-form-outer .request-form-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .request-form-scroll {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .request-form-actions {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        flex-wrap: wrap;
    }

    .kanban-board {
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .kanban-column {
        min-width: 260px;
    }
}

@media (max-width: 640px) {
    /* The desktop layout reserves the sidebar permanently, which leaves only
       ~200px for content at 390px. Stack authenticated pages on small screens. */
    .app-container:not(.auth-layout) {
        display: block;
    }

    .app-container:not(.auth-layout) aside.sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
        padding-top: 5rem;
    }

    .app-container:not(.auth-layout) .main-content {
        width: 100%;
        margin-left: 0;
    }

    .app-container:not(.auth-layout) .header-authenticated {
        left: 0;
        width: 100%;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .app-container:not(.auth-layout) #main-page-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #notif-dropdown {
        width: min(400px, calc(100vw - 1rem)) !important;
        max-width: calc(100vw - 1rem);
    }

    body {
        font-size: 0.95rem;
    }

    .sidebar,
    aside.sidebar {
        width: 172px;
    }

    .main-content {
        margin-left: 172px;
    }

    .header-authenticated {
        left: 172px;
        height: 4.5rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .header-authenticated .flex.items-center.gap-3 {
        gap: 0.4rem !important;
    }

    .btn,
    .pagination-btn,
    .pagination-info {
        font-size: 0.78rem;
    }

    .btn {
        padding: 0.55rem 0.85rem;
    }

    .card {
        padding: 0.85rem;
        overflow-x: auto;
    }

input,
select,
textarea {
        font-size: 0.9rem;
        padding: 0.7rem;
    }

    /* Keep the employee search text clear of its leading search icon on
       narrow screens, where the generic input rule above would otherwise
       override the component spacing. */
    .employee-db-filter-search {
        padding-left: 2.75rem !important;
    }

    table {
        font-size: 0.76rem !important;
        min-width: max-content;
    }

    table th,
    table td {
        padding: 0.75rem !important;
        white-space: normal;
    }

    table th {
        white-space: nowrap;
    }

    table tbody td .badge,
    table tbody td .badge[class*="badge-stage-"],
    table td.sla-status-cell .badge {
        width: auto !important;
        min-width: 7.5rem !important;
        max-width: 100%;
    }

    .admin-edit-modal-content,
    .confirm-delete-card,
    #request-detail-modal-card {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
    }

    #notif-dropdown {
        width: min(22rem, calc(100vw - 1rem)) !important;
        right: -0.5rem !important;
    }

    .pagination-wrap,
    .audit-pagination-wrap {
        gap: 0.5rem !important;
        padding: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .sidebar,
    aside.sidebar {
        width: 156px;
    }

    .main-content {
        margin-left: 156px;
    }

    .header-authenticated {
        left: 156px;
    }

    aside.sidebar nav a {
        font-size: 0.66rem !important;
        gap: 0.45rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    aside.sidebar nav .material-symbols-outlined {
        font-size: 15px !important;
    }

    aside.sidebar>a h1,
    aside.sidebar h1.text-xl {
        font-size: 0.68rem !important;
    }

    aside.sidebar>a div {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }

    .card {
        padding: 0.7rem;
    }

    .request-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions-bar,
    .request-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .modal-actions-bar .btn,
    .request-form-actions .btn,
    .request-form-actions a.btn {
        width: 100%;
    }
}

/* The employee filter search has a leading icon. Keep its placeholder and
   entered text separated from the icon at every responsive breakpoint. */
.employee-db-filter-search {
    padding-left: 2.75rem !important;
}
/* Tailwind's generated dark variants target descendants of .dark, so the
   page root needs an explicit rule for body-level theme colors. */
html.dark body {
    background-color: #0f111a;
    color: #f1f5f9;
}
