/* HR1 â€” Tri-M Global HRIS Â· Shared design foundation */

:root {
    /* Brand accent (kept) */
    --purple: #7B2CBF;
    --purple-dark: #6A0DAD;
    --purple-light: #9D4EDD;
    --purple-bg: rgba(123, 44, 191, 0.10);
    --purple-soft: rgba(123, 44, 191, 0.05);

    /* Surfaces */
    --sidebar-bg: #151521;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(123, 44, 191, 0.25);
    --sidebar-text: #A3AED0;
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --bg: #F6F8FB;
    --surface: #ffffff;
    --surface-muted: #FBFCFE;
    --surface-hover: #F9FAFB;

    /* Type & ink */
    --text: #344054;
    --text-dark: #101828;
    --muted: #667085;
    --text-muted: #667085;

    /* Lines */
    --border: #E4E7EC;
    --border-strong: #D0D5DD;

    /* Semantic status colors */
    --success: #17B26A;
    --danger: #F04438;
    --warning: #F79009;
    --info: #2E90FA;
    --teal: #0BA5B7;
    --orange: #FB6514;
    --status-success: #067647;
    --status-success-bg: rgba(23, 178, 106, 0.10);
    --status-success-border: rgba(23, 178, 106, 0.22);
    --status-danger: #B42318;
    --status-danger-bg: rgba(240, 68, 56, 0.10);
    --status-danger-border: rgba(240, 68, 56, 0.22);
    --status-warning: #B54708;
    --status-warning-bg: rgba(240, 140, 9, 0.12);
    --status-warning-border: rgba(240, 140, 9, 0.28);
    --status-info: #175CD3;
    --status-info-bg: rgba(46, 144, 250, 0.12);
    --status-info-border: rgba(46, 144, 250, 0.26);
    --status-neutral: #475467;
    --status-neutral-bg: rgba(71, 84, 103, 0.08);

    /* Typography scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --tracking-tight: -0.015em;
    --tracking-normal: 0;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Spacing scale (4px rhythm) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;

    /* Shadows â€” neutral, layered, low opacity */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 8px rgba(16, 24, 40, 0.05), 0 8px 20px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.05), 0 12px 32px rgba(16, 24, 40, 0.10);

    /* Focus */
    --focus-ring: rgba(123, 44, 191, 0.35);
    --focus-ring-offset: 2px;

    /* Layout metrics */
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 72px;
    --topbar-height: 64px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    line-height: var(--leading-normal);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { color: var(--text-dark); }
h1, h2, h3 { letter-spacing: var(--tracking-tight); }

::selection { background: var(--purple-bg); }

/* Keyboard focus: a single shared ring for every control that does not
   already declare its own more specific :focus/:focus-visible treatment. */
:where(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

.tabular-nums { font-variant-numeric: tabular-nums; }

/* All link lettering is neutral (same as body text) — including on hover.
   The brand purple is used only as a non-text accent: a hover underline.
   Sidebar/topbar links opt out of the underline; button/nav/card hover rules
   already reset text-decoration. */
a { color: var(--text-dark); text-decoration: none; }
a:hover {
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--purple);
}
.sidebar a:hover,
.topbar a:hover { color: inherit; text-decoration: none; }

/* ===== APP LAYOUT ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.app-layout.has-sidebar .main-wrapper {
    margin-left: var(--sidebar-width);
}

.dashboard-logo-bg {
    position: absolute;
    inset: var(--topbar-height) 0 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.dashboard-logo-bg img {
    width: min(72%, 760px);
    height: auto;
    max-height: 70%;
    object-fit: contain;
    opacity: 0.08;
    mix-blend-mode: multiply;
    filter: saturate(0.8);
    animation: logoBreathe 12s ease-in-out infinite;
}

@keyframes logoBreathe {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.06; }
    50% { transform: translateY(-10px) scale(1.02); opacity: 0.10; }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-logo-bg img { animation: none; }
    .fade-in-up { animation: none; opacity: 1; transform: none; }
}

/* ===== PAGE ENTRANCE =====
   Instant page transitions. Elements that used to fade/slide in (page
   headers, panels, sections and data-table rows) now appear immediately.
   No page-wide fade/slide/zoom entrance animation while navigating. */
.fade-in-up {
    opacity: 1;
    animation: none;
    transform: none;
}

.panel.fade-in-up { animation: none; }

/* Applicant-list and other data tables: rows appear immediately.
   (Also neutralizes the global transition on this page entirely.) */
.data-table tbody tr {
    opacity: 1;
    animation: none;
    transform: none;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    /* Keep the sidebar scrollable on short screens without showing a scrollbar. */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.sidebar::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: #fff;
}

.brand-logo {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-names {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.brand-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    white-space: nowrap;
}

.brand-sub {
    font-size: .68rem;
    font-weight: 500;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: .875rem 0 .625rem;
}

.nav-section {
    margin-bottom: .5rem;
}

.nav-section-label {
    display: block;
    padding: .7rem 1.25rem .3rem;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--sidebar-text);
    opacity: .65;
    text-transform: uppercase;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1.25rem;
    margin: 2px .75rem;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s, opacity .15s;
}

.nav-parent {
    width: calc(100% - 1.5rem);
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: 0;
    color: var(--sidebar-text);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.nav-chevron {
    margin-left: auto;
    font-size: .8rem;
    line-height: 1;
    transition: transform .15s ease;
}

.nav-parent[aria-expanded="true"] .nav-chevron {
    transform: rotate(90deg);
}

/* Count badge on a nav link (Recruitment Requests). margin-left:auto pushes it
   to the far edge, matching .nav-chevron so parent buttons and leaf links align
   on the same axis. */
.nav-badge {
    margin-left: auto;
    min-width: 1.35rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.35rem;
    text-align: center;
}

/* Small red dot marking new/pending work that needs HR action. margin-left:auto
   pushes it to the right edge of the row, matching .nav-badge. */
.notification-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin-left: auto;
    border-radius: 50%;
    background-color: #dc3545;
}

/* Collapsed rail: the generic rule hides every non-icon span, which would also
   hide a count. If a nav link grows a badge later, it needs its own rule here
   or it will disappear in the 72px rail. */

.nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
    text-decoration: none;
}

.nav-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

/* Slim rounded indicator: absolutely positioned inside the row's left
   padding so it never shifts the label text. */
.nav-link.active::before {
    content: '';
    position: absolute;
    left: .375rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 999px;
    background: var(--purple-light);
}

.nav-children {
    margin: -.1rem 0 .35rem;
}

.nav-link-child {
    padding-left: 2.25rem;
    font-size: .82rem;
}

.nav-icon {
    width: 20px;
    height: 20px;
    background-color: currentColor;
    opacity: .85;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    mask-mode: alpha;
    flex-shrink: 0;
    transition: opacity .15s;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon { opacity: 1; }

.nav-icon-grid { --icon: 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='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
/* Inbox/tray for Recruitment Requests. Feather's "inbox", matching the 2px
   stroke and 24px box every other icon here uses. */
.nav-icon-inbox { --icon: 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='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12'/%3E%3Cpath d='M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E"); }

.nav-icon-users { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }

.nav-icon-briefcase { --icon: 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='%23000' stroke-width='2'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E"); }

.nav-icon-checklist { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }

.nav-icon-clock { --icon: 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='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }

.nav-icon-building { --icon: 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='%23000' stroke-width='2'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M9 22v-4h6v4'/%3E%3Cpath d='M8 6h.01M16 6h.01M12 6h.01M8 10h.01M16 10h.01M12 10h.01M8 14h.01M16 14h.01M12 14h.01'/%3E%3C/svg%3E"); }

.nav-icon-user { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }

.nav-icon-folder { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }

.nav-icon-file-text { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }

.nav-icon-key { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4'/%3E%3C/svg%3E"); }

.nav-icon-bell { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E"); }

.nav-icon-settings { --icon: 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='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); }

.nav-icon-target { --icon: 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='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }

.nav-icon-activity { --icon: 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='%23000' stroke-width='2'%3E%3Cpolyline points='22 12 18 12 15 21 9 3 6 12 2 12'/%3E%3C/svg%3E"); }

.nav-icon-layers { --icon: 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='%23000' stroke-width='2'%3E%3Cpolygon points='12 2 2 7 12 12 22 7 12 2'/%3E%3Cpolyline points='2 17 12 22 22 17'/%3E%3Cpolyline points='2 12 12 17 22 12'/%3E%3C/svg%3E"); }

.nav-icon-book { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E"); }

.nav-icon-graduation-cap { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M22 10v6M2 10l10-5 10 5-10 5z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/svg%3E"); }

.nav-icon-rocket { --icon: 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='%23000' stroke-width='2'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E"); }

.nav-icon-award { --icon: 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='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='7'/%3E%3Cpolyline points='8.21 13.89 7 23 12 20 17 23 15.79 13.88'/%3E%3C/svg%3E"); }

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-version {
    font-size: .75rem;
    color: var(--sidebar-text);
    opacity: .55;
}

/* ===== TOPBAR ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-8);
    gap: 1.5rem;
    box-shadow: var(--shadow-xs);
}

/* Employee Portal (self-service): the top header scrolls normally with the
   page. Sticky behavior is removed for this scope only — HR/admin pages keep
   the shared pinned header. Appearance (height, colors, search, actions) is
   untouched. */
.ess-portal .topbar {
    position: static;
}

.topbar-search {
    flex: 1;
    max-width: 360px;
    position: relative;
}

.topbar-search input {
    width: 100%;
    padding: .55rem 1rem .55rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-muted);
    font-size: .875rem;
    font-family: inherit;
    color: var(--text);
    cursor: default;
    transition: border-color .15s, background .15s;
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--border-strong);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--surface-hover);
}

.topbar-search input::placeholder { color: var(--muted); }

.search-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left {
    display: none;
    align-items: center;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--status-success);
    background: var(--status-success-bg);
    border: 1px solid var(--status-success-border);
    padding: .3rem .7rem;
    border-radius: 999px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    border-radius: 50%;
    color: var(--text-dark);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.icon-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.user-profile {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding-left: 1.25rem;
    border-left: 1px solid var(--border);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px var(--border-strong);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-info strong {
    font-size: .875rem;
    color: var(--text-dark);
}

.user-info span {
    font-size: .75rem;
    color: var(--muted);
}

/* ===== MAIN CONTENT ===== */
.container {
    flex: 1;
    padding: var(--space-8);
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Welcome Banner */
.welcome-banner {
    background: var(--purple);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.welcome-greeting {
    color: #fff;
    font-size: .875rem;
    opacity: .9;
    margin-bottom: .25rem;
}

.welcome-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: .25rem;
}

.welcome-subtitle {
    color: #fff;
    font-size: .875rem;
    opacity: .85;
}

.welcome-status {
    text-align: right;
}

.status-label {
    display: block;
    color: #fff;
    font-size: .75rem;
    opacity: .8;
    margin-bottom: .25rem;
}

.status-value {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    padding: .4rem .85rem;
    border-radius: 999px;
}

.welcome-status .live-dot { background: #fff; }

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.dash-card:hover {
    transform: translateY(-1px);
    border-color: var(--purple-light);
    box-shadow: var(--shadow-md);
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--purple-bg);
    color: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.dash-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: .35rem;
}

.dash-card p {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.dash-card-link {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-dark);
}

.dash-card-link:hover { color: var(--text-dark); }

/* KPI Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

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

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-xs);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.kpi-card:hover {
    transform: translateY(-1px);
    border-color: var(--purple-light);
    box-shadow: var(--shadow-md);
}

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon tile is intentionally neutral across categories — color is reserved
   for actual status signals (trend chips) and primary actions. */

.kpi-trend {
    font-size: .7rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    border: 1px solid transparent;
}

.kpi-trend-up   { background: var(--status-success-bg); color: var(--status-success); border-color: var(--status-success-border); }
.kpi-trend-down { background: var(--status-warning-bg); color: var(--status-warning); border-color: var(--status-warning-border); }

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: .15rem;
    font-variant-numeric: tabular-nums;
}

.kpi-label {
    font-size: .8rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: .75rem;
}

.kpi-link {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.kpi-link:hover { color: var(--text-dark); }

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Panels */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    margin-bottom: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.panel h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.panel-desc {
    font-size: .8rem;
    color: var(--muted);
    margin-top: .15rem;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    max-width: 100%;
}

/* Module Cards */
.module-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.module-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}

.module-card:hover {
    background: var(--surface);
    border-color: var(--purple-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

.module-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--purple);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: .75rem;
    font-variant-numeric: tabular-nums;
}

.module-card h3 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: .35rem;
}

.module-card p {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Typography (module pages) */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin-bottom: .25rem;
}

.page-subtitle {
    color: var(--muted);
    font-size: .875rem;
    margin-bottom: 1.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header .page-subtitle { margin-bottom: 0; }

/* Breadcrumb navigation (module pages) */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 1rem;
}
.breadcrumb a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb a:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}
.breadcrumb-sep {
    color: var(--muted);
    opacity: .7;
}
.breadcrumb-current {
    color: var(--muted);
    font-weight: 600;
}

/* Pagination (module pages) */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.pagination-info {
    font-size: .875rem;
    color: var(--muted);
}
.pagination-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}
.pagination-links .page-btn {
    min-width: 2rem;
    text-align: center;
}
.pagination-links .page-btn.active {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
    cursor: default;
    box-shadow: var(--shadow-sm);
}

/* Back-to-dashboard link (employee ESS modules) */
.ess-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .32rem .7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-dark);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.ess-back:hover {
    border-color: var(--purple-light);
    color: var(--purple);
    text-decoration: none;
    box-shadow: var(--shadow-xs);
}
.ess-back svg { flex: 0 0 auto; }

/* My Attendance (ESS) */
.att-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.att-range {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-dark);
}
.att-range small {
    font-size: .68rem;
    font-weight: 500;
    color: var(--muted);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
    padding: .625rem .875rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--muted);
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-strong);
}

.data-table td { vertical-align: middle; }
.data-table td strong { font-weight: 600; }
.data-table td small:not(.badge) { font-size: .72rem; color: var(--muted); }

.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover td { background: var(--surface-hover); }

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th { border-bottom: 0; }

.data-table .empty {
    text-align: center;
    color: var(--muted);
    padding: 2.75rem 1rem;
    font-variant-numeric: normal;
}

/* Action cells must stay normal table-cells so the row's horizontal rules run
   continuously underneath every column. `display:flex` directly on the <td>
   makes the browser size it to its content only, so its border-bottom floats
   above the row bottom and the line visibly breaks before the Actions column.
   Text-align right-keeps the controls on the same edge as the other columns;
   flex layout lives on the inner action wrapper (.btn-group) instead. */
.data-table .actions {
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}
.data-table .actions > * {
    vertical-align: middle;
}
.data-table .actions .btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
}

/* Action-cell helpers: every "Actions" column renders its controls in a
   horizontal, nowrap flex group on one line ([View] [Start Training],
   [View Details] [Create Job Posting →] [Mark Filled]). */
.table td.actions,
.table th.actions,
.data-table td.actions,
.data-table th.actions,
td .actions-group,
td .btn-group {
    white-space: nowrap;
    vertical-align: middle;
}

.actions-group {
    display: inline-flex;
    flex-direction: row;      /* explicit — override any column leak */
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;        /* keep on one line */
}

.table th.actions,
.table td.actions,
.data-table th.actions,
.data-table td.actions {
    width: 1%;                /* shrink-to-fit, natural width */
    text-align: right;
}

/* Mobile: allow wrapping ONLY below 768px */
@media (max-width: 768px) {
    .actions-group {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .data-table tbody tr,
    .progress-fill { transition: none; }
}

/* Badges */
.badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.35;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-new       { background: var(--status-info-bg);    color: var(--status-info);    border-color: var(--status-info-border); }
.badge-info      { background: var(--status-info-bg);    color: var(--status-info);    border-color: var(--status-info-border); }
.badge-warning   { background: var(--status-warning-bg); color: var(--status-warning); border-color: var(--status-warning-border); }
.badge-primary   { background: var(--purple-bg);         color: var(--text-dark);         border-color: var(--purple-bg); }
.badge-success   { background: var(--status-success-bg); color: var(--status-success); border-color: var(--status-success-border); }
.badge-danger    { background: var(--status-danger-bg);  color: var(--status-danger);  border-color: var(--status-danger-border); }
.badge-secondary { background: var(--status-neutral-bg); color: var(--status-neutral); border-color: var(--border-strong); }
/* Quieter than badge-secondary, which is already the low-contrast neutral.
   Used for priority 'low': a real value that should recede rather than compete
   with 'normal', while staying distinguishable from it. */
.badge-muted    { background: var(--surface-muted);      color: var(--muted);         border-color: var(--border-strong); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    font-family: inherit;
    transition: background .15s, border-color .15s, box-shadow .15s, color .15s, transform .15s;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--purple-dark);
    border-color: var(--purple-dark);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--purple);
    color: var(--text-dark);
    background: var(--surface-hover);
    text-decoration: none;
}

.btn-secondary {
    background: var(--surface-muted);
    border-color: var(--border-strong);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--muted);
    color: var(--text-dark);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    color: var(--text-dark);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background: #D92D20;
    border-color: #D92D20;
    color: #fff;
    text-decoration: none;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
    padding: .3rem .6rem;
    font-size: .75rem;
    line-height: 1.3;
}
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: .875rem;
    line-height: 1.55;
}

.alert ul { margin: 0; padding-left: 1.25rem; }
.alert li + li { margin-top: .3rem; }

.alert-success { background: var(--status-success-bg); color: var(--status-success); border: 1px solid var(--status-success-border); }
.alert-danger  { background: var(--status-danger-bg);  color: var(--status-danger);  border: 1px solid var(--status-danger-border); }
.alert-warning { background: var(--status-warning-bg); color: var(--status-warning); border: 1px solid var(--status-warning-border); }
.alert-info    { background: var(--status-info-bg);    color: var(--status-info);    border: 1px solid var(--status-info-border); }

/* Forms */
.form-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.25rem;
}

.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full-width,
.form-group.form-group-full { grid-column: 1 / -1; }

.form-group label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .65rem .875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    caret-color: var(--purple);
    transition: border-color .15s, box-shadow .15s;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-group select { height: 2.625rem; }
.form-group select { color-scheme: light; }
.form-group input[type="file"] { padding: .45rem; }

/* Custom clean, professional checkbox & radio styling */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.125rem !important;
    height: 1.125rem !important;
    min-width: 1.125rem !important;
    min-height: 1.125rem !important;
    max-width: 1.125rem !important;
    max-height: 1.125rem !important;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--border-strong, #D0D5DD);
    border-radius: 4px;
    background-color: var(--surface, #ffffff);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: var(--purple, #7B2CBF);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: none;
    border-color: var(--purple, #7B2CBF);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.15);
}

input[type="checkbox"]:checked {
    background-color: var(--purple, #7B2CBF);
    border-color: var(--purple, #7B2CBF);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

input[type="radio"]:checked {
    background-color: var(--purple, #7B2CBF);
    border-color: var(--purple, #7B2CBF);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    background-color: var(--bg, #F6F8FB);
    border-color: var(--border, #E4E7EC);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Notification setting option card */
.notif-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface-muted, #FBFCFE);
    border: 1px solid var(--border, #E4E7EC);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.notif-option:hover {
    background: var(--surface-hover, #F9FAFB);
    border-color: var(--purple-light, #9D4EDD);
}

.notif-option span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark, #101828);
    line-height: 1.3;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.form-group textarea {
    line-height: 1.5;
    resize: vertical;
    color-scheme: light;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px var(--purple-bg);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled,
.form-group input[readonly] {
    background: var(--bg);
    border-color: var(--border);
    color: var(--muted);
    cursor: not-allowed;
}

.form-group input:user-invalid,
.form-group select:user-invalid,
.form-group textarea:user-invalid {
    border-color: var(--status-danger-border);
    box-shadow: 0 0 0 3px var(--status-danger-bg);
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.form-grid .form-actions { grid-column: 1 / -1; }

.inline-form {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.inline-form select,
.inline-form input:not([type="hidden"]) {
    padding: .5rem .75rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
}

.inline-form select:focus,
.inline-form input:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px var(--purple-bg);
}

.inline-form.compact select { padding: .35rem .6rem; font-size: .8rem; }

.compact-form .form-group { margin-bottom: .875rem; }
.compact-form input:not([type="file"]),
.compact-form select { height: 2.375rem; }
.compact-form .form-group input,
.compact-form .form-group select { padding-top: .45rem; padding-bottom: .45rem; }

/* Reusable Employee Search — Search Employee button beside native employee <select>
   (opt-in via data-emp-search). Opens a shared modal; results feed the existing select. */
/* Reusable Employee Search — standard HR1 control (opt-in via data-emp-search).
   The native select is kept hidden as the form's source of truth; the visible
   "[ search icon ] Search Employee" trigger replaces it and opens the search modal. */
.emp-search { display: block; position: relative; }
.emp-search select.emp-search-native { display: none; }
.emp-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    box-sizing: border-box;
    height: 2.625rem; /* matches HR1 form-control height (.form-group input/select) */
    min-width: 150px;
    padding: 0 .875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .875rem;
    line-height: 1.4;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.emp-search-trigger:hover { border-color: var(--purple); background: var(--surface-hover); }
.emp-search-trigger:focus-visible {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px var(--purple-bg);
}
.emp-search-trigger:disabled { opacity: .55; cursor: not-allowed; }
.emp-search-trigger-icon { display: inline-flex; color: var(--muted); flex: 0 0 auto; }
.emp-search-trigger.has-selection .emp-search-trigger-icon { color: var(--purple); }
.emp-search-trigger .emp-search-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 12rem;
}
.inline-form .emp-search { display: inline-block; vertical-align: middle; }
/* Inside form grids the Search Employee button fills its column like the other
   controls and left-aligns its text like the native inputs/dropdowns;
   toolbar instances keep the compact standard width. */
.form-group .emp-search-trigger {
    width: 100%;
    justify-content: flex-start;
}

/* Filter toolbars: every control (dropdowns, text/search inputs, buttons, and
   the employee-search trigger) shares one 2.5rem (40px) height and a consistent
   8px gap so the row lines up perfectly on one baseline. */
.filter-toolbar {
    gap: .5rem;
}
.filter-toolbar select,
.filter-toolbar input:not([type="hidden"]),
.filter-toolbar .btn,
.filter-toolbar .emp-search-trigger {
    height: 2.5rem;
    min-height: 2.5rem;
}
/* Icon-only button. The markup is <a class="btn btn-outline btn-icon">[svg]</a>
   and the button's accessible name comes from aria-label, since the only visible
   content is the icon — so this must never be used without one.

   The tight padding is what makes it read as a control rather than a padded
   picture of a control: the arrow is 18px inside a ~34px box, which is roughly
   the target size of the text buttons beside it. .btn sets a 2.5rem min-height,
   so overriding padding alone keeps the two button kinds the same height and
   therefore aligned in the row.

   The svg is sized here rather than with width/height attributes so an inline
   <svg> without them still lays out correctly, and stroke/fill are inherited from
   currentColor so the icon follows the button's hover and disabled states for
   free. */
.btn-icon {
    padding: .4rem .6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.filter-toolbar .btn-icon {
    width: 2.5rem;
    flex: 0 0 auto;
    padding: 0;
}
.emp-search-field { position: relative; }
.emp-search-field input {
    width: 100%;
    padding: .55rem 2rem .55rem .875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
.emp-search-field input:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px var(--purple-bg);
}
.emp-search-field input::placeholder { color: var(--muted); opacity: 1; }
.emp-search-icon {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    display: flex;
    pointer-events: none;
}
.emp-search-count { font-size: .75rem; color: var(--text-muted); margin-top: .6rem; }
.emp-search-results {
    margin-top: .6rem;
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.emp-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .5rem 1rem;
    align-items: center;
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--border);
}
.emp-search-row:last-child { border-bottom: 0; }
.emp-search-row-name {
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.emp-search-row-id {
    font-size: .75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.emp-search-empty { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: .875rem; }
.emp-search-hint { font-size: .75rem; color: var(--text-muted); margin-top: .35rem; }

/* Shared modal base (matches the inline modal styles used across HR modules) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 1rem;
}
.modal-backdrop[hidden] { display: none; }
.modal {
    background: var(--card-bg, #fff);
    border-radius: var(--radius, 8px);
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: .75rem;
}
.compact-form .form-group textarea { padding: .5rem .75rem; }

/* Detail view */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.detail-item label {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .3rem;
}

.detail-item span { font-size: .95rem; color: var(--text-dark); font-weight: 500; }
.detail-item.full-width { grid-column: 1 / -1; }

/* Two column layout */
.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Progress bar */
.progress-bar {
    background: var(--border);
    border-radius: 999px;
    height: 6px;
    width: 120px;
    display: inline-block;
    vertical-align: middle;
    margin-right: .5rem;
    overflow: hidden;
}

.progress-fill {
    background: var(--purple);
    height: 100%;
    border-radius: 999px;
    transition: width .3s ease;
}

/* Cards — reduced motion keeps hover transforms from shifting layout */
@media (prefers-reduced-motion: reduce) {
    .kpi-card, .dash-card, .module-card, .stat-card,
    .kpi-card:hover, .dash-card:hover, .module-card:hover {
        transition: none;
        transform: none;
    }
}

/* Legacy stat-card support (module pages) */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
}

.stat-label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.stat-value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--text-dark); font-variant-numeric: tabular-nums; }
.stat-link  { display: inline-block; margin-top: .5rem; font-size: .75rem; font-weight: 600; color: var(--text-dark); }

.modules-grid h2 { margin-bottom: 1rem; font-size: 1.125rem; color: var(--text-dark); }

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .module-cards { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .sidebar { width: 220px; }
    .app-layout.has-sidebar .main-wrapper { margin-left: 220px; }
    .topbar-search { max-width: 200px; }
    .user-info { display: none; }
}

@media (max-width: 640px) {
    .container { padding: 1rem; }

    .panel { padding: 1rem; }
    .table-wrap { margin: 0; }
    .data-table th,
    .data-table td { padding: .5rem .625rem; }

    .stats-grid,
    .module-cards,
    .form-grid,
    .detail-grid,
    .dashboard-grid { grid-template-columns: 1fr; }

    .welcome-banner { padding: 1.25rem; }
    .welcome-title { font-size: 1.25rem; }

    .page-header { flex-direction: column; }

    .topbar { padding: 0 1rem; }
    .topbar-search { display: none; }
}

/* ===== RESPONSIVE TABLES (compact phone cards below 768px) =====
   Every .responsive-table turns into one compact card per row on phones, so
   HR never has to scroll sideways or read one field per line:

       Title ...................................... [Status]
       meta · meta · meta              (short muted details)
       chips ................................ [Actions]

   Pages can tag cells to place them (all optional):
     .rt-title   card title (defaults to the first cell when none is tagged)
     .rt-badge   right side of line 1 (status badges)
     .rt-meta    line 2, muted, joined with "·", no label
     .rt-chip    line 3, left of the actions (scores, result badges)
     .rt-hide    hidden on phones (details that live on the record's page)
   Untagged cells go to line 2 as small "Label value" pairs (data-label).
   td.actions always sits on line 3, right-aligned. */
@media (max-width: 767px) {
    .responsive-table { min-width: 0 !important; width: 100%; }
    .table-wrap:has(> .responsive-table) { overflow-x: visible; }
    .responsive-table thead { display: none; }
    .responsive-table tbody { display: block; }

    .responsive-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: .5rem;
        row-gap: .3rem;
        margin: 0 0 .5rem;
        padding: .7rem .8rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        box-shadow: none;
    }
    .responsive-table tbody tr:last-child { margin-bottom: 0; }

    /* Line breaks between the three lines (flex items placed by `order`). */
    .responsive-table tbody tr::before,
    .responsive-table tbody tr::after {
        content: '';
        flex-basis: 100%;
        height: 0;
        margin: 0;
    }
    .responsive-table tbody tr::before { order: 3; }
    .responsive-table tbody tr::after  { order: 5; }

    .responsive-table tbody td {
        display: block;
        order: 4;
        min-width: 0;
        max-width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        text-align: left;
        font-size: .75rem;
        line-height: 1.4;
        color: var(--text);
        overflow-wrap: anywhere;
    }
    .responsive-table tbody td::before {
        content: attr(data-label);
        margin-right: .3rem;
        font-size: .625rem;
        font-weight: 600;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: var(--muted);
    }
    .responsive-table tbody td:empty,
    .responsive-table tbody td.rt-hide { display: none; }

    /* Line 1: title (explicit, or the first cell when none is tagged). */
    .responsive-table tbody td.rt-title,
    .responsive-table tbody tr:not(:has(> td.rt-title)) > td:first-child:not(.apps-check-col),
    .responsive-table tbody tr:not(:has(> td.rt-title)) > td.apps-check-col + td {
        order: 1;
        flex: 1 1 0;
        min-width: 45%;
        font-size: .875rem;
        font-weight: 600;
        color: var(--text-dark);
    }
    .responsive-table tbody td.rt-title::before,
    .responsive-table tbody tr:not(:has(> td.rt-title)) > td:first-child::before,
    .responsive-table tbody tr:not(:has(> td.rt-title)) > td.apps-check-col + td::before { content: none; }
    .responsive-table tbody td.rt-title a { font-weight: 600; }
    .responsive-table tbody td.rt-title > a:first-child,
    .responsive-table tbody td.rt-title > strong:first-child {
        display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .responsive-table tbody td.rt-title :is(div, small, span):not(.badge) { font-size: .72rem; font-weight: 400; color: var(--muted); }

    .responsive-table tbody td.rt-badge {
        order: 2;
        margin-left: auto;
        display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem;
        max-width: 55%;
    }
    .responsive-table tbody td.rt-badge::before { content: none; }

    /* Line 2: muted details joined with a dot. */
    .responsive-table tbody td.rt-meta { color: var(--muted); }
    .responsive-table tbody td.rt-meta::before { content: none; }
    .responsive-table tbody td.rt-meta:has(~ td.rt-meta)::after { content: '·'; margin-left: .5rem; color: var(--muted); }

    /* Line 3: chips + actions. */
    .responsive-table tbody td.rt-chip { order: 6; display: flex; align-items: center; gap: .35rem; font-weight: 600; }
    .responsive-table tbody td.rt-chip::before { content: none; }
    .responsive-table tbody td.actions,
    .responsive-table tbody td:is([data-label="Actions"], [data-label="Action"], [data-label="Options"]) {
        order: 7;
        margin-left: auto;
        width: auto;
        white-space: normal;
        text-align: right;
    }
    .responsive-table tbody td.actions::before,
    .responsive-table tbody td:is([data-label="Actions"], [data-label="Action"], [data-label="Options"])::before { content: none; }
    .responsive-table td .actions-group,
    .responsive-table td .btn-group {
        display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem;
    }
    .responsive-table td.actions .btn { padding: .3rem .6rem; font-size: .75rem; }
    /* Some pages pin button groups to one line with an inline style. */
    .responsive-table td.actions [style*="nowrap"] { flex-wrap: wrap !important; }
    /* The e-mail under a name lives on the record's own page. */
    .responsive-table tbody td.rt-title .applicant-sub { display: none; }

    /* Selection checkbox (Tracker / Archive): small, left of the title. */
    .responsive-table tbody td.apps-check-col { order: 0; flex: 0 0 auto; width: auto; }
    .responsive-table tbody td.apps-check-col::before { content: none; }

    /* Full-width cells (empty states, totals, colspan rows) stay plain */
    .responsive-table tbody tr:has(> td[colspan]) { display: block; }
    .responsive-table tbody tr:has(> td[colspan])::before,
    .responsive-table tbody tr:has(> td[colspan])::after { content: none; }
    .responsive-table td.empty,
    .responsive-table td[colspan] {
        display: block;
        width: 100%;
        text-align: center;
        font-size: .8125rem;
        padding: .75rem 0;
    }
    .responsive-table td.empty::before,
    .responsive-table td[colspan]::before { content: none; }
}

/* ===== TOPBAR / HEADER (mobile refinement) ===== */
@media (max-width: 640px) {
    .topbar-actions { gap: .5rem; }

    .user-profile {
        padding-left: .75rem;
        gap: .5rem;
        border-left: 1px solid var(--border);
    }

    .live-badge {
        font-size: .7rem;
        padding: .3rem .55rem;
    }
}

/* ===== AI SCREENING UI ===== */

/* Score badge in table */
.ai-score-badge {
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

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

/* Screening result card */
.screening-result-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.screening-overall {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.screening-score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(
        var(--score-color) calc(var(--pct, 0) * 3.6deg),
        var(--border) 0deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.screening-score-circle::before {
    content: '';
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--surface);
}

.screening-score-value {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.screening-rec {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

/* Score bars */
.screening-scores-detail {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.screening-score-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.screening-score-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 140px;
    flex-shrink: 0;
}

.screening-score-pct {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 40px;
    text-align: right;
}

/* Info list */
.screening-info-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.screening-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
}

.screening-info-row:last-child {
    border-bottom: none;
}

.screening-info-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.screening-info-value {
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: right;
}

/* AI Analysis text */
.screening-analysis {
    font-size: .875rem;
    line-height: 1.7;
    color: var(--text);
    padding: .5rem 0;
}

/* Requirements lists */
.screening-req-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.screening-req-list li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
    color: var(--text);
}

.screening-req-list li:last-child {
    border-bottom: none;
}

.req-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.req-icon-matched {
    background: rgba(5, 205, 153, 0.12);
    color: var(--success);
}

.req-icon-missing {
    background: rgba(238, 93, 80, 0.12);
    color: var(--danger);
}

/* Applicant view screening summary */
.screening-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.screening-summary-scores {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.screening-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
}

.screening-summary-label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.screening-summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.screening-summary-rec {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.screening-summary-date {
    font-size: .75rem;
    color: var(--muted);
}

/* Screened applicant: compact matched / potential-gaps columns */
.screening-gaps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.screening-gap-col { min-width: 0; }

.screening-gap-head {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}

.screening-gap-matched { color: var(--success); }
.screening-gap-missing { color: var(--danger); }

.screening-gap-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: .8rem;
    color: var(--text);
}

.screening-gap-list li { margin-bottom: .3rem; }

/* Responsive for screening */
@media (max-width: 640px) {
    .screening-overall { flex-direction: column; align-items: flex-start; }
    .screening-score-row { flex-wrap: wrap; }
    .screening-score-label { min-width: auto; }
    .screening-summary { flex-direction: column; align-items: flex-start; }
    .screening-summary-scores { gap: 1rem; }
}

/* ===== NOTIFICATION BELL ===== */
.notif-wrap { position: relative; }

.icon-btn { position: relative; }

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    overflow: hidden;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .8rem 1rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

.notif-count-pill {
    background: var(--purple-bg);
    color: var(--text-dark);
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .55rem;
    border-radius: 999px;
}

.notif-empty {
padding: 1.5rem 1rem;
font-size: .8rem;
color: var(--muted);
text-align: center;
}

.notif-view-all {
display: block;
padding: .75rem 1rem;
border-top: 1px solid var(--border);
font-size: .8rem;
font-weight: 600;
color: var(--text-dark);
text-align: center;
text-decoration: none;
}

.notif-view-all:hover {
text-decoration: underline;
}

.notif-remove-all-form {
    display: block;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
}
.notif-remove-all-form .notif-remove-all {
    display: block;
    width: 100%;
    padding: .75rem 1rem;
    border: 0;
    background: none;
    font-size: .8rem;
    font-weight: 600;
    color: var(--danger);
    text-align: center;
    cursor: pointer;
}
.notif-remove-all-form .notif-remove-all:hover {
    text-decoration: underline;
    background: var(--purple-soft);
}

.notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 340px;
    overflow-y: auto;
}

.notif-list li + li { border-top: 1px solid var(--border); }

.notif-list a {
    display: block;
    padding: .7rem 1rem;
    color: inherit;
    transition: background .15s ease;
}

.notif-list a:hover { background: var(--purple-soft); color: inherit; }

.notif-list form.notif-item-form {
    display: block;
    margin: 0;
    padding: 0;
}
.notif-list form.notif-item-form .notif-item-btn {
    display: block;
    width: 100%;
    padding: .7rem 1rem;
    border: 0;
    background: none;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background .15s ease;
}
.notif-list form.notif-item-form .notif-item-btn:hover {
    background: var(--purple-soft);
    color: inherit;
}

.notif-title {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-dark);
}

.notif-msg {
    display: block;
    margin-top: .15rem;
    font-size: .76rem;
    line-height: 1.45;
    color: var(--text);
}

.notif-time {
    display: block;
    margin-top: .3rem;
    font-size: .66rem;
    color: var(--muted);
}

.notif-list li.unread { background: var(--purple-bg); }
.notif-list li.unread .notif-title::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: .4rem;
    border-radius: 50%;
    background: var(--purple);
}

.notif-list li.notif-item-row {
    position: relative;
    display: flex;
    align-items: flex-start;
}
.notif-list li.notif-item-row form.notif-item-form { flex: 1; min-width: 0; }
.notif-list li.notif-item-row form.notif-item-del {
    flex: 0 0 auto;
    margin: 0;
    padding: .55rem .6rem 0 0;
}
.notif-list form.notif-item-del .notif-del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.notif-list form.notif-item-del .notif-del-btn:hover {
    background: var(--purple-bg);
    color: var(--danger);
}

/* ===== EMPLOYEE PROFILE PHOTO ===== */
.profile-photo-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.profile-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--purple-bg);
    box-shadow: var(--shadow);
}

.profile-photo-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--purple);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

/* ===== MY PROFILE — two-column Employee Profile page ===== */
.profile-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-side .panel { margin-bottom: 0; }

.profile-side .panel:nth-child(n+2) { margin-top: 0; }

.pf-summary { text-align: center; }

.pf-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto .9rem;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: .02em;
    border: 3px solid var(--purple-bg);
    box-shadow: var(--shadow-sm);
}

img.pf-avatar { object-fit: cover; }

.pf-name {
    margin: 0 0 .2rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-dark);
}

.pf-employee-no {
    margin: 0 0 .7rem;
    font-size: .8rem;
    color: var(--muted);
}

.pf-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin-bottom: .7rem;
}

.pf-status-badge { display: flex; justify-content: center; }

.pf-completion {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
}

.pf-completion-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text);
}

.pf-completion-top strong {
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.pf-completion .progress-bar {
    display: block;
    width: 100%;
    margin: 0;
}

.pf-card-title {
    margin: 0 0 .95rem;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-dark);
}

.pf-stats {
    display: flex;
    flex-direction: column;
    gap: .95rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-stat {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
}

.pf-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--muted);
}

.pf-stat-body {
    min-width: 0;
    line-height: 1.35;
}

.pf-stat-label {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    color: var(--muted);
}

.pf-stat-body strong,
.pf-stat-body .badge {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}

.pf-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.pf-actions .btn { width: 100%; }

.pf-signout-form { margin: 0; }

.pf-actions .pf-signout-form { width: 100%; }

.pf-main .tab-bar { margin-bottom: 1.5rem; }

.pf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.pf-panel-head h2 { margin: 0; }

.pf-tab-panel[hidden] { display: none; }

/* Soft bordered read-only fields (scoped to the profile page only) */
.profile-page .detail-grid { gap: 1rem; }

.profile-page .detail-item {
    min-width: 0;
    padding: .6rem .85rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.profile-page .detail-item label {
    margin: 0 0 .25rem;
    font-size: .68rem;
    letter-spacing: .05em;
}

.profile-page .detail-item span {
    display: block;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-dark);
    word-break: break-word;
}

.pf-note {
    margin-top: 1.25rem;
    font-size: .8rem;
    line-height: 1.5;
    color: var(--muted);
}

.pf-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

.pf-account-actions .pf-signout-form {
    display: inline-flex;
    width: auto;
}

.pf-account-actions .btn { width: auto; }

/* ===== RESPONSIVE SIDEBAR (BURGER MENU) ===== */
.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background .2s, border-color .2s, box-shadow .2s;
}

.sidebar-toggle:hover { background: var(--bg); border-color: var(--muted); }

.sidebar-toggle:focus-visible {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px var(--purple-bg);
}

.burger-box {
    display: block;
    width: 20px;
}

.burger-box span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .25s ease, opacity .2s ease;
}

.burger-box span + span { margin-top: 4px; }

.app-layout.nav-open .burger-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.app-layout.nav-open .burger-box span:nth-child(2) { opacity: 0; transform: scaleX(.4); }
.app-layout.nav-open .burger-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.sidebar-overlay { display: none; }

@media (max-width: 1200px) {
    .sidebar-toggle { display: inline-flex; }

    .sidebar-overlay { display: block; }

    .sidebar-brand { padding: .85rem 1rem; }

    .brand-logo { width: 34px; height: 34px; }

    .app-layout.has-sidebar .main-wrapper { margin-left: 0; }

    .sidebar {
        width: min(300px, 84vw);
        transform: translateX(-102%);
        visibility: hidden;
        transition: transform .28s cubic-bezier(.4, 0, .2, 1), visibility .28s;
    }

    .app-layout.nav-open .sidebar {
        transform: translateX(0);
        visibility: visible;
        box-shadow: 0 0 40px rgba(10, 10, 25, .35);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 95;
        background: rgba(15, 15, 30, .55);
        opacity: 0;
        visibility: hidden;
        cursor: pointer;
        transition: opacity .28s ease, visibility .28s;
    }

    .app-layout.nav-open .sidebar-overlay { opacity: 1; visibility: visible; }
}

body.nav-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .sidebar, .sidebar-overlay, .burger-box span, .sidebar-toggle,
    .nav-chevron, .nav-icon { transition: none; }
}

/* ===== 3-COLUMN KPI GRID (HR DASHBOARD VARIANT) ===== */
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1200px) {
    .stats-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* ===== SIDEBAR COLLAPSE / EXPAND ===== */
.sidebar-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: rgba(163, 174, 208, 0.9);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.sidebar-collapse-btn:hover {
    background: var(--sidebar-hover);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-collapse-btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
    border-color: transparent;
    box-shadow: none;
}

.sidebar-collapse-icon {
    width: 16px;
    height: 16px;
    transition: transform .25s ease;
}

/* Floating tooltip for hovered icons in the collapsed rail. Fixed-position so it
   is never clipped by the sidebar's overflow-y scroll. */
.sidebar-tooltip {
    position: fixed;
    z-index: 400;
    padding: .4rem .65rem;
    background: #1F1F31;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 10px 24px -8px rgba(10, 10, 25, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%);
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
}

.sidebar-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 1201px) {
    .sidebar { transition: width .25s ease; }
    .app-layout.has-sidebar .main-wrapper { transition: margin-left .25s ease; }

    /* Collapsed: narrow rail with icons only, main content expands to fill. */
    .app-layout.sidebar-collapsed .sidebar { width: var(--sidebar-width-collapsed); }
    .app-layout.sidebar-collapsed.has-sidebar .main-wrapper { margin-left: var(--sidebar-width-collapsed); }

    .app-layout.sidebar-collapsed .sidebar-brand {
        flex-direction: column;
        gap: .45rem;
        padding: .85rem .5rem .65rem;
    }
    .app-layout.sidebar-collapsed .sidebar-brand a { justify-content: center; }
    .app-layout.sidebar-collapsed .brand-names { display: none; }

    .app-layout.sidebar-collapsed .sidebar-nav { padding-top: .6rem; padding-bottom: .75rem; }
    .app-layout.sidebar-collapsed .nav-section { margin-bottom: .25rem; }
    .app-layout.sidebar-collapsed .nav-section-label { display: none; }

    .app-layout.sidebar-collapsed .nav-link {
        justify-content: center;
        gap: 0;
        padding: .7rem 0;
        margin: 2px .55rem;
    }
    .app-layout.sidebar-collapsed .nav-link > span:not(.nav-icon):not(.notification-dot) { display: none; }
    .app-layout.sidebar-collapsed .notification-dot {
        position: absolute;
        top: .5rem;
        right: .65rem;
        margin-left: 0;
    }

    .app-layout.sidebar-collapsed .sidebar-footer { padding: .75rem 0; }
    .app-layout.sidebar-collapsed .sidebar-version { display: none; }

    /* Chevron spins to point outward, signalling "expand". */
    .app-layout.sidebar-collapsed .sidebar-collapse-icon { transform: rotate(180deg); }
}

/* Collapse button is desktop/tablet-only; on small screens the existing
   off-canvas burger menu remains the sole navigation control. */
@media (max-width: 1200px) {
    .sidebar-collapse-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .app-layout.sidebar-collapsed .sidebar,
    .app-layout.has-sidebar .main-wrapper,
    .app-layout.sidebar-collapsed .sidebar-collapse-icon { transition: none; }
}

/* ===== SHARED TAB PRIMITIVE =====
   One flat, enterprise tab-bar for every module (onboarding, applicants,
   settings, ...). Hairline track + quiet purple underline for the active tab;
   no gradients, glows, or entrance animation. Counts are compact neutral chips. */
.tab-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.4rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem .1rem .7rem;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    transition: color .15s ease, border-bottom-color .15s ease;
}

.tab-link:hover {
    color: var(--text-dark);
    border-bottom-color: var(--border-strong);
    text-decoration: none;
}

.tab-link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

.tab-link.active {
    color: var(--text-dark);
    border-bottom-color: var(--purple);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 .4rem;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: .66rem;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tab-link.active .tab-count {
    background: var(--purple-bg);
    border-color: var(--purple-light);
    color: var(--text-dark);
}

/* ===== STATUS FILTER (tabs on wide screens, one dropdown on phones) =====
   Replaces rows of wrapped filter buttons (Interview Log status, Archive
   reason). Markup:
     <nav class="status-filter" aria-label="…">
       <div class="tab-bar"> …tab-link + tab-count… </div>
       <label class="status-filter-select"><span>Status</span>
         <select onchange="location.href=this.value"> …option value=URL… </select>
       </label>
     </nav>
   The tab bar scrolls sideways (no wrap) when it is wider than the panel, and
   below 768px it is swapped for the dropdown so the filter is one tidy line. */
.status-filter { margin: 0 0 1rem; }
.status-filter .tab-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 0;
    scrollbar-width: none;
}
.status-filter .tab-bar::-webkit-scrollbar { display: none; }
.status-filter .tab-link { white-space: nowrap; flex-shrink: 0; }
.status-filter .tab-link .tab-count:empty { display: none; }
.status-filter-select { display: none; }

@media (max-width: 767px) {
    .status-filter .tab-bar { display: none; }
    .status-filter-select {
        display: flex;
        align-items: center;
        gap: .625rem;
        margin: 0;
    }
    .status-filter-select > span {
        font-size: .75rem;
        font-weight: 600;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: var(--muted);
        white-space: nowrap;
    }
    .status-filter-select select {
        flex: 1;
        min-width: 0;
        height: 40px;
        padding: 0 .75rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: .875rem;
    }
    .status-filter-select select:focus {
        outline: none;
        border-color: var(--purple-light);
        box-shadow: 0 0 0 3px var(--purple-bg);
    }
}

@media (max-width: 640px) {
    .tab-bar {
        gap: 1rem;
        margin-bottom: 1rem;
    }
    .tab-link {
        font-size: .8rem;
        padding-bottom: .6rem;
    }
}

@media (max-width: 1080px) {
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .profile-page .detail-grid { grid-template-columns: 1fr; gap: 1rem; }
    .profile-side { gap: 1.25rem; }
    .pf-panel-head { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .tab-link { transition: none; }
}

/* ============================================================
   ONBOARDING — Applicant workflow view (ob-*)
   Six-step onboarding rail + step cards, built on the shared
   design tokens (purple brand, status colors, 8px radii).
   ============================================================ */

/* ---- Top action bar ---- */
.ob-topbar { align-items: center; }
.ob-topbar-left { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.ob-topbar-left .page-title { margin: 0; font-size: 1.25rem; }
.ob-topbar-left .page-subtitle { margin: 0; }
.ob-topbar-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--purple); color: #fff; font-weight: 700; font-size: .95rem;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; border: 3px solid var(--purple-bg);
    letter-spacing: .02em;
}
.ob-topbar-actions { margin-left: auto; }

/* ---- Actions kebab menu ---- */
.ob-menu { position: relative; }
.ob-menu-dropdown {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
    min-width: 224px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); padding: .35rem;
}
.ob-menu-dropdown a {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem .75rem; border-radius: 6px;
    color: var(--text); font-size: .85rem; text-decoration: none; font-weight: 500;
}
.ob-menu-dropdown a:hover { background: var(--surface-hover); color: var(--text-dark); }
.ob-menu-dropdown a i { color: var(--purple); font-size: .95rem; }

/* ---- Progress overview card ---- */
.ob-overview { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 1.5rem; }
.ob-overview-num {
    font-size: 2.35rem; font-weight: 800; line-height: 1;
    color: var(--purple); font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.ob-overview-num small { font-size: 1.05rem; font-weight: 700; color: var(--purple-light); margin-left: 1px; }
.ob-overview-body { flex: 1; min-width: 0; }
.ob-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ob-overview-head strong { color: var(--text-dark); font-size: .95rem; }
.ob-overview-desc { color: var(--muted); font-size: .8rem; margin: .2rem 0 .75rem; }
.ob-overview-bar { display: block; width: 100%; height: 8px; margin: 0; }

/* ---- Stepper rail ---- */
.ob-stepper-wrap {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-xs);
    padding: 1.35rem 1.5rem 1.1rem; margin-bottom: 1.5rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.ob-stepper { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; }
.ob-step { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.ob-step:not(:first-child)::before {
    content: ''; position: absolute; top: 19px; left: -50%; width: 100%;
    height: 3px; background: var(--border); z-index: 0;
}
.ob-step.is-complete:not(:first-child)::before,
.ob-step.is-current:not(:first-child)::before { background: var(--success); }
.ob-step-node {
    position: relative; z-index: 1;
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: .95rem; font-weight: 700;
    font-variant-numeric: tabular-nums; border: 2px solid var(--surface);
}
.ob-step.is-complete .ob-step-node { background: var(--success); box-shadow: 0 0 0 4px var(--status-success-bg); }
.ob-step.is-current .ob-step-node  { background: var(--info);    box-shadow: 0 0 0 4px var(--status-info-bg);    animation: obPulse 2s ease-out infinite; }
.ob-step.is-locked .ob-step-node   { background: var(--border-strong); box-shadow: none; }
.ob-step.is-pending .ob-step-node  { background: var(--warning); box-shadow: 0 0 0 4px var(--status-warning-bg); }
@keyframes obPulse {
    0%   { box-shadow: 0 0 0 0 rgba(46, 144, 250, .45); }
    70%  { box-shadow: 0 0 0 12px rgba(46, 144, 250, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 144, 250, 0); }
}
.ob-step-label { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.ob-step-num { font-size: .62rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.ob-step-name { font-size: .7rem; font-weight: 600; color: var(--text); text-align: center; max-width: 110px; line-height: 1.3; }
.ob-step.is-locked .ob-step-name { color: var(--muted); }

/* ---- Step cards ---- */
.ob-step-card {
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 1.7rem;
    border-left-width: 4px; border-left-style: solid;
    transition: border-color .2s ease, background .2s ease;
}
.ob-step-card.is-complete { border-left-color: var(--success); }
.ob-step-card.is-current  { border-left-color: var(--info); }
.ob-step-card.is-locked   { border-left-color: var(--border-strong); background: var(--surface-muted); }
.ob-step-card.is-pending  { border-left-color: var(--border-strong); }

.ob-card-head { display: flex; align-items: flex-start; gap: .85rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ob-card-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%; font-size: .8rem; font-weight: 700;
    color: #fff; flex-shrink: 0; margin-top: .15rem; font-variant-numeric: tabular-nums;
}
.ob-step-card.is-complete .ob-card-badge { background: var(--success); }
.ob-step-card.is-current  .ob-card-badge { background: var(--info); }
.ob-step-card.is-locked   .ob-card-badge { background: var(--status-neutral); opacity: .55; }
.ob-step-card.is-pending  .ob-card-badge { background: var(--warning); }

.ob-card-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.05rem; flex-shrink: 0; border: 1px solid transparent;
}
.ob-step-card.is-complete .ob-card-icon { background: var(--status-success-bg); color: var(--status-success); }
.ob-step-card.is-current  .ob-card-icon { background: var(--status-info-bg);    color: var(--status-info); }
.ob-step-card.is-locked   .ob-card-icon { background: var(--status-neutral-bg); color: var(--status-neutral); }
.ob-step-card.is-pending  .ob-card-icon { background: var(--status-warning-bg); color: var(--status-warning); }

.ob-card-title-wrap { flex: 1; min-width: 160px; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.ob-card-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--text-dark); letter-spacing: -.01em; }
.ob-card-title-wrap > .ob-step-status { margin-left: auto; }

.ob-card-foot { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ob-card-hint { font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: .4rem; }

/* Status pill (shared: step cards + document rows) */
.ob-step-status {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .22rem .7rem; border-radius: 999px;
    font-size: .7rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
    border: 1px solid transparent; text-transform: capitalize;
}
.ob-step-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ob-step-status.is-complete { background: var(--status-success-bg); color: var(--status-success); border-color: var(--status-success-border); }
.ob-step-status.is-current  { background: var(--status-info-bg);    color: var(--status-info);    border-color: var(--status-info-border); }
.ob-step-status.is-locked   { background: var(--status-neutral-bg); color: var(--status-neutral); border-color: var(--border-strong); }
.ob-step-status.is-pending  { background: var(--status-warning-bg); color: var(--status-warning); border-color: var(--status-warning-border); }
.ob-step-status.is-rejected { background: var(--status-danger-bg);  color: var(--status-danger);  border-color: var(--status-danger-border); }

/* Locked / empty state notes */
.ob-lock-note {
    display: flex; align-items: center; gap: .65rem;
    color: var(--muted); background: var(--status-neutral-bg);
    border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
    padding: .95rem 1.05rem; font-size: .85rem;
}
.ob-lock-note i { color: var(--status-neutral); font-size: 1.05rem; flex-shrink: 0; }

/* Success confirmation box */
.ob-success-box {
    display: flex; align-items: flex-start; gap: .95rem;
    background: var(--status-success-bg); border: 1px solid var(--status-success-border);
    color: var(--status-success); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem;
}
.ob-success-box > i { font-size: 1.7rem; line-height: 1; flex-shrink: 0; }
.ob-success-box strong { color: var(--status-success); font-size: .95rem; display: block; }
.ob-success-box p { color: var(--text); font-size: .85rem; margin: .15rem 0 0; line-height: 1.5; }
.ob-success-box p small { color: var(--muted); }

/* Orientation schedule detail grid */
.ob-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.ob-info-tile { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .85rem 1rem; }
.ob-info-tile label {
    display: flex; align-items: center; gap: .4rem;
    font-size: .66rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem;
}
.ob-info-tile label i { color: var(--purple); font-size: .8rem; }
.ob-info-tile span { font-size: .95rem; font-weight: 600; color: var(--text-dark); }
.ob-info-tile.full { grid-column: 1 / -1; }

/* Document checklist */
.ob-doc-list { list-style: none; margin: 0; padding: 0; }
.ob-doc-item { display: flex; align-items: center; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ob-doc-item:first-child { padding-top: 0; }
.ob-doc-item:last-child { border-bottom: 0; padding-bottom: .25rem; }
.ob-doc-meta { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 200px; }
.ob-doc-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--border); color: var(--purple);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.ob-doc-meta strong { color: var(--text-dark); font-size: .85rem; font-weight: 600; display: block; }
.ob-doc-meta small { color: var(--muted); font-size: .72rem; }
.ob-doc-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ob-doc-upload { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ob-file-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .65rem; border-radius: var(--radius-sm);
    font-size: .75rem; font-weight: 600; line-height: 1.3;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
    cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.ob-file-btn:hover { border-color: var(--purple); color: var(--purple); background: var(--surface-hover); }
.ob-file-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ob-doc-reject { font-size: .72rem; color: var(--status-danger); display: block; margin-top: .3rem; }

/* Upload progress mini bar */
.ob-mini-row { display: flex; align-items: center; gap: .75rem; font-size: .8rem; color: var(--muted); margin-top: 1rem; }
.ob-mini-track { flex: 1; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.ob-mini-fill { height: 100%; background: var(--purple); border-radius: 999px; transition: width .3s ease; }

/* Drag-and-drop upload */
.ob-dropzone {
    margin-top: 1.5rem; border: 2px dashed var(--border-strong); border-radius: var(--radius);
    padding: 1.4rem 1.25rem; text-align: center; background: var(--surface-muted);
    transition: border-color .15s, background .15s;
}
.ob-dropzone.drag { border-color: var(--purple); background: var(--purple-soft); }
.ob-dropzone > .bi { font-size: 1.7rem; color: var(--purple); display: block; margin-bottom: .4rem; }
.ob-dropzone p { margin: .1rem 0; color: var(--text); font-size: .85rem; font-weight: 500; }
.ob-dropzone small { color: var(--muted); }
.ob-dropzone form {
    max-width: 560px; margin: 1.1rem auto 0; text-align: left;
    display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; align-items: end;
}
.ob-dropzone form .ob-drop-submit { min-height: 2.625rem; }

/* Stepper-lite summary list (Step 6 locked state) */
.ob-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.ob-checks li { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--muted); }
.ob-checks li.ok { color: var(--status-success); }
.ob-checks li.wait { color: var(--muted); }
.ob-checks li i { font-size: .95rem; }
.ob-checks li.wait i { color: var(--border-strong); }

/* Side rail — applicant summary */
.ob-summary { text-align: center; }
.ob-summary-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem;
    margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); text-align: left;
}
.ob-summary-grid div label {
    display: block; font-size: .64rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem;
}
.ob-summary-grid div span { font-size: .85rem; font-weight: 600; color: var(--text-dark); word-break: break-word; }

/* Timeline (activity history) */
.ob-timeline { list-style: none; margin: 0; padding: 0; }
.ob-timeline-item { position: relative; display: flex; gap: .8rem; padding-bottom: 1.1rem; }
.ob-timeline-item:last-child { padding-bottom: 0; }
.ob-timeline-item:not(:last-child)::before {
    content: ''; position: absolute; left: 13px; top: 30px; bottom: 0;
    width: 2px; background: var(--border);
}
.ob-tl-icon {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--purple-bg); color: var(--purple);
    display: inline-flex; align-items: center; justify-content: center; font-size: .82rem;
    z-index: 1;
}
.ob-tl-body { min-width: 0; }
.ob-tl-body strong { display: block; font-size: .8rem; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.ob-tl-body p { font-size: .74rem; color: var(--muted); margin: .1rem 0; line-height: 1.45; }
.ob-tl-body small { font-size: .66rem; color: var(--muted); }
.ob-timeline-empty { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: .5rem; }

/* Mobile sticky progress footer */
.ob-mobile-footer { display: none; }

/* Celebration (Step 6 complete) */
.ob-celebrate { text-align: center; padding: 1rem 0; }
.ob-celebrate > .bi { font-size: 3rem; color: var(--purple); display: block; margin-bottom: .5rem; }
.ob-celebrate h3 { margin: 0 0 .3rem; font-size: 1.1rem; font-weight: 700; color: var(--text-dark); }

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .ob-mobile-footer {
        display: flex; position: sticky; bottom: 0; z-index: 60;
        align-items: center; justify-content: space-between; gap: 1rem;
        background: var(--surface); border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border-strong);
        padding: .55rem 1rem; margin-top: 1rem;
        box-shadow: 0 -4px 16px rgba(16, 24, 40, .08);
    }
    .ob-mobile-footer span { font-size: .78rem; font-weight: 600; color: var(--text); }
    .ob-mobile-footer .btn { min-height: 44px; }
}

@media (max-width: 640px) {
    .ob-hide-mobile { display: none; }
    .ob-topbar { row-gap: .75rem; }
    .ob-step-name { display: none; }
    .ob-step.is-current .ob-step-name { display: flex; }
    .ob-step.is-current .ob-step-name { max-width: 150px; }
    .ob-stepper-wrap { padding: 1rem .75rem .75rem; }
    .ob-info-grid { grid-template-columns: 1fr; }
    .ob-dropzone form { grid-template-columns: 1fr; }
    .ob-dropzone form .ob-drop-submit { width: 100%; }
    .ob-card-foot .btn { flex: 1; min-height: 44px; }
    .ob-card-foot { max-width: 100%; }
    .ob-doc-actions .btn { min-height: 44px; }
    .ob-file-btn,
    .ob-doc-upload .btn { min-height: 44px; }
    .ob-menu-dropdown { right: -8px; }
    .ob-summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .ob-step.is-current .ob-step-node { animation: none; }
    .ob-step-card, .ob-step, .ob-step-node { transition: none; }
    .ob-dropzone { transition: none; }
}

/* ===== SKELETON LOADING (perceived performance) ============================
 * Placeholders shown while a page's data is painted. Neutral (not tinted)
 * shapes that mirror the real layout: page header, filter bar, table card,
 * stat tiles and panels. Text placeholders are thin bars at text height;
 * one soft shimmer sweeps across them. On phones (< 768px) table rows become
 * cards with label / value lines, like the real stacked tables.
 * Theme-aware through --sk-* (dark values in assets/css/theme.css).
 * Only active with JS (html.js), so real content is never hidden for good.
 * -------------------------------------------------------------------------- */

.skeleton-container {
    --sk-bg:            #E8EAEE;  /* placeholder fill            */
    --sk-highlight:     #F6F7F9;  /* shimmer sweep               */
    --sk-border:        var(--border, #E4E7EC);
    --sk-subtle-border: #F0F2F5;  /* row dividers                */
    --sk-head:          var(--surface-muted, #FBFCFE);
    display: none;
}
html.js .skeleton-container.is-loading {
    display: block;
}
html.js .skeleton-container.is-loading + .real-content {
    display: none;
}

/* Shared shimmer surface (applies to every placeholder shape) */
.skeleton,
.skeleton-cell,
.skeleton-btn,
.skeleton-btn-sm,
.skeleton-title,
.skeleton-subtitle,
.skeleton-search,
.skeleton-dropdown,
.skeleton-submit,
.skeleton-info,
.skeleton-pagebtn,
.skeleton-stat-value,
.skeleton-stat-label,
.skeleton-avatar {
    background-color: var(--sk-bg);
    background-image: linear-gradient(90deg, transparent 0%, var(--sk-highlight) 50%, transparent 100%);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    background-position: -40% 0;
    background-attachment: fixed;      /* one sweep across the whole page */
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0%   { background-position: -40% 0; }
    100% { background-position: 140% 0; }
}

/* ---- Header section ---- */
.skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.skeleton-title {
    width: 240px;
    height: 22px;
    border-radius: 6px;
}
.skeleton-subtitle {
    width: 320px;
    max-width: 70vw;
    height: 12px;
    margin-top: 12px;
}
.skeleton-actions {
    display: flex;
    gap: .75rem;
    flex-shrink: 0;
}
.skeleton-btn {
    width: 112px;
    height: 38px;
    border-radius: 8px;
}

/* ---- Filter bar ---- */
.skeleton-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--surface, #fff);
    border: 1px solid var(--sk-border);
    border-radius: 12px;
}
.skeleton-search {
    width: 100%;
    height: 40px;
    border-radius: 8px;
}
.skeleton-dropdown {
    width: 160px;
    height: 40px;
    border-radius: 8px;
}
.skeleton-submit {
    width: 96px;
    height: 40px;
    border-radius: 8px;
}

/* ---- Table card ---- */
.skeleton-table {
    background: var(--surface, #fff);
    border: 1px solid var(--sk-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.skeleton-thead {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    height: 44px;
    padding: 0 1.25rem;
    background: var(--sk-head);
    border-bottom: 1px solid var(--sk-border);
}
.skeleton-thead .skeleton-cell {
    height: 8px;
}

.skeleton-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    height: 56px;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--sk-subtle-border);
}
.skeleton-row:last-child { border-bottom: none; }

.skeleton-cell {
    height: 10px;
    flex-shrink: 0;
}
.skeleton-cell.skeleton-sm { width: 64px; }
.skeleton-cell.skeleton-md { width: 120px; }
.skeleton-cell.skeleton-lg { width: 190px; }
.skeleton-cell.skeleton-xl { width: auto; flex: 1 1 auto; }
/* Vary row lengths a little so it reads like real text, not a grid of bars. */
.skeleton-row:nth-child(3n) .skeleton-cell.skeleton-lg  { width: 150px; }
.skeleton-row:nth-child(3n+1) .skeleton-cell.skeleton-md { width: 96px; }

.skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Row action button placeholders (pushed to the right edge like real actions) */
.skeleton-btn-sm {
    width: 56px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 6px;
}
.skeleton-row > :not(.skeleton-btn-sm) + .skeleton-btn-sm { margin-left: auto; }
.skeleton-row .skeleton-btn-sm + .skeleton-btn-sm { margin-left: -1rem; }

/* ---- Pagination ---- */
.skeleton-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem .25rem;
}
.skeleton-info {
    width: 180px;
    height: 10px;
}
.skeleton-pages {
    display: flex;
    gap: .5rem;
}
.skeleton-pagebtn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

/* ---- Dashboard variant (stat cards + panels) ---- */
.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.skeleton-stat {
    padding: 1.25rem;
    background: var(--surface, #fff);
    border: 1px solid var(--sk-border);
    border-radius: 12px;
}
.skeleton-stat-value {
    width: 56px;
    height: 24px;
    margin-bottom: .75rem;
    border-radius: 6px;
}
.skeleton-stat-label {
    width: 120px;
    height: 10px;
}
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1rem;
}
.skeleton-panel {
    padding: 1.25rem;
    background: var(--surface, #fff);
    border: 1px solid var(--sk-border);
    border-radius: 12px;
    min-height: 150px;
}
.skeleton-panel .skeleton-row {
    height: 52px;
    padding: 0;
    gap: 1rem;
    border-bottom: 1px solid var(--sk-subtle-border);
}
.skeleton-panel .skeleton-row:last-child { border-bottom: none; }
.skeleton-panel .skeleton-title {
    width: 160px;
    height: 14px;
    margin-bottom: .75rem;
}
.skeleton-panel .skeleton-cell.skeleton-md { margin-left: auto; width: 64px; }

/* ---- Handoff to real content ---- */
.skeleton-container.is-loaded {
    opacity: 0;
    transition: opacity .25s ease;
}
.skeleton-container.is-loading.is-loaded {
    display: block; /* keep visible long enough to fade before removal */
}
html.js .real-content {
    opacity: 0;
}
html.js .real-content.is-visible {
    opacity: 1;
    transition: opacity .25s ease;
}

/* ---- Mobile (<768px): table rows become cards (label / value lines) ---- */
@media (max-width: 767px) {
    .skeleton-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .skeleton-title { width: 70%; }
    .skeleton-subtitle { width: 90%; }
    .skeleton-actions { justify-content: flex-start; }
    .skeleton-btn {
        flex: 1;
        max-width: none;
    }
    .skeleton-dropdown {
        width: 100%;
        flex: 1 1 40%;
    }
    .skeleton-submit { flex: 1; }

    .skeleton-table {
        background: transparent;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }
    .skeleton-thead { display: none; }
    .skeleton-table .skeleton-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0;
        height: auto;
        padding: .5rem 1rem .85rem;
        margin-bottom: .75rem;
        background: var(--surface, #fff);
        border: 1px solid var(--sk-border);
        border-radius: 10px;
    }
    .skeleton-table .skeleton-row:last-child { border-bottom: 1px solid var(--sk-border); }
    .skeleton-table .skeleton-avatar { display: none; }
    /* Each cell = one card line: short label bar on the left, value bar on the right. */
    .skeleton-table .skeleton-row .skeleton-cell {
        flex: 0 0 100%;
        width: 100%;
        height: 38px;
        border-radius: 0;
        border-bottom: 1px solid var(--sk-subtle-border);
        animation: skeleton-fade 1.6s ease-in-out infinite;
        background:
            linear-gradient(var(--sk-bg), var(--sk-bg)) left center / 26% 8px no-repeat,
            linear-gradient(var(--sk-bg), var(--sk-bg)) right center / 46% 10px no-repeat;
    }
    .skeleton-table .skeleton-row .skeleton-cell:nth-of-type(2n) {
        background:
            linear-gradient(var(--sk-bg), var(--sk-bg)) left center / 22% 8px no-repeat,
            linear-gradient(var(--sk-bg), var(--sk-bg)) right center / 34% 10px no-repeat;
    }
    .skeleton-table .skeleton-row .skeleton-cell:nth-of-type(n+6) { display: none; }
    .skeleton-table .skeleton-row > :not(.skeleton-btn-sm) + .skeleton-btn-sm,
    .skeleton-table .skeleton-row .skeleton-btn-sm {
        margin: .75rem 0 0 auto;
        width: 64px;
        height: 30px;
    }
    .skeleton-table .skeleton-row .skeleton-btn-sm + .skeleton-btn-sm { margin-left: .5rem; }

    .skeleton-grid { grid-template-columns: 1fr; }
    .skeleton-pagination {
        flex-direction: column;
        align-items: flex-start;
        gap: .75rem;
    }
}

@keyframes skeleton-fade {
    0%, 100% { opacity: 1; }
    50%      { opacity: .55; }
}

/* ---- Respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .skeleton,
    .skeleton-cell,
    .skeleton-btn,
    .skeleton-btn-sm,
    .skeleton-title,
    .skeleton-subtitle,
    .skeleton-search,
    .skeleton-dropdown,
    .skeleton-submit,
    .skeleton-info,
    .skeleton-pagebtn,
    .skeleton-stat-value,
    .skeleton-stat-label,
    .skeleton-avatar {
        animation: none !important;
        background-image: none;
    }
    .skeleton-table .skeleton-row .skeleton-cell {
        animation: none !important;
    }
    .skeleton-container,
    .real-content {
        transition: none !important;
    }
}

/* ==========================================================================
   Shared dashboard cards + workspace layout (employee ESS and HR dashboards)
   Reuses the existing design tokens (surface, border, radius, shadows).
   ========================================================================== */

/* Compact top summary cards with very subtle per-card accents. */
.dash-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.dash-sum-card {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .8rem 1rem;
    box-shadow: var(--shadow-xs);
    text-decoration: none;
    color: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.dash-sum-card:hover { border-color: var(--purple-light); box-shadow: var(--shadow-md); text-decoration: none; }
.dash-sum-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.dash-sum-icon { display: inline-flex; color: var(--muted); }
.dash-sum-arrow { display: inline-flex; color: var(--muted); opacity: .45; }
.dash-sum-card:hover .dash-sum-arrow { opacity: .85; }
.dash-sum-title { font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dash-sum-value { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dash-sum-sub { font-size: .7rem; color: var(--muted); }

/* Two-column workspace: wide main column + narrow side column. */
.dash-workspace {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: .875rem;
    align-items: start;
}
/* When a section follows the workspace (HR dashboard panels), keep rhythm. */
body:not(.ess-dashboard) .dash-workspace { margin-bottom: 1.5rem; }
.dash-main-col { display: flex; flex-direction: column; gap: .875rem; min-width: 0; }
.dash-side-col { display: flex; flex-direction: column; gap: .875rem; min-width: 0; }

.dash-panel {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.05rem .95rem;
    box-shadow: var(--shadow-xs);
    min-width: 0;
}
.dash-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.dash-panel-head h2 { font-size: .9375rem; font-weight: 700; color: var(--text-dark); letter-spacing: -.01em; margin: 0; }
.dash-view-all { font-size: .75rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.dash-view-all:hover { color: var(--purple); text-decoration: none; }

/* My Time Off card — Attendance + Leave sub-sections */
.dash-subsection-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 .5rem;
}

.dash-card-divider {
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

.dash-footer-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .75rem;
    font-size: .85rem;
}

.dash-link {
    color: var(--purple);
    font-weight: 600;
    text-decoration: none;
}

.dash-link:hover { text-decoration: underline; }

.dash-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    min-height: 44px;
    padding: .55rem 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: none;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: inherit;
}
.dash-row:first-child { border-top: 0; }
.dash-row:hover { text-decoration: none; }
.dash-row-icon { display: inline-flex; flex: 0 0 auto; color: var(--purple); opacity: .5; }
.dash-row-label { flex: 1 1 auto; min-width: 0; font-size: .83rem; font-weight: 600; color: var(--text-dark); }
.dash-row-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .05rem; }
.dash-row-desc { margin: 0; font-size: .7rem; color: var(--muted); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row-meta { flex: 0 0 auto; font-size: .68rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.dash-row-chevron { flex: 0 0 auto; display: inline-flex; color: var(--text-dark); opacity: .35; transition: opacity .15s ease; }
.dash-row:hover .dash-row-chevron { opacity: .85; }
.dash-row:hover .dash-row-icon { opacity: .9; }

.dash-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem .5rem;
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .dash-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .dash-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .dash-summary-grid { grid-template-columns: 1fr; }
}

body.login-page {
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 15px;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    background:
        radial-gradient(900px 620px at 85% -8%, rgba(157,78,221,.30), rgba(157,78,221,0) 62%),
        radial-gradient(760px 560px at -6% 108%, rgba(20,6,54,.55), rgba(20,6,54,0) 64%),
        linear-gradient(128deg, #22074E 0%, #38097F 44%, #5A0FA6 76%, #7B2CBF 100%);
}
body.login-page .bg-circle { position: fixed; border-radius: 50%; pointer-events: none; }
body.login-page .bg-circle.c1 {
    width: 300px; height: 300px;
    top: -110px; left: -90px;
    background: rgba(255,255,255,.05);
}
body.login-page .bg-circle.c2 {
    width: 380px; height: 380px;
    bottom: -160px; right: -120px;
    border: 1.5px solid rgba(255,255,255,.13);
}
body.login-page .bg-ring.r1 {
    position: fixed;
    width: 180px; height: 180px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.11);
    top: 16%; right: 9%;
    pointer-events: none;
}
body.login-page .auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1060px;
    height: 100%;
    max-height: 100%;
    min-height: 640px;
    display: flex;
    background: #FFFFFF;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.28);
    box-shadow: 0 44px 96px -34px rgba(9,3,38,.6);
}
body.login-page .panel-brand {
    position: relative;
    flex: 0 0 45%;
    min-width: 0;
    display: flex;
    padding: 2.5rem 2.25rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(700px 480px at 92% -12%, rgba(157,78,221,.30), rgba(157,78,221,0) 60%),
        radial-gradient(520px 420px at -12% 112%, rgba(24,7,66,.5), rgba(24,7,66,0) 65%),
        linear-gradient(150deg, #250850 0%, #3B0B86 48%, #6210AC 100%);
}
body.login-page .brand-shape { position: absolute; border-radius: 50%; pointer-events: none; }
body.login-page .brand-shape.s1 {
    width: 260px; height: 260px;
    top: -100px; right: -70px;
    border: 1.5px solid rgba(255,255,255,.14);
}
body.login-page .brand-shape.s2 {
    width: 160px; height: 160px;
    top: -50px; right: 120px;
    background: rgba(255,255,255,.05);
}
body.login-page .brand-shape.s3 {
    width: 320px; height: 320px;
    bottom: -150px; left: -110px;
    border: 1.5px solid rgba(255,255,255,.11);
}
body.login-page .brand-shape.s4 {
    width: 200px; height: 200px;
    bottom: -60px; left: 140px;
    background: rgba(157,78,221,.17);
    filter: blur(2px);
}
body.login-page .brand-line {
    position: absolute;
    width: 420px; height: 1.5px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.17), rgba(255,255,255,0));
    transform: rotate(-24deg);
    top: 32%; right: -120px;
    pointer-events: none;
}
body.login-page .brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}
body.login-page .brand-copy h1 {
    font-size: clamp(1.65rem, 2.1vw, 2.1rem);
    color: #fff;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: .8rem;
}
body.login-page .brand-copy .lead {
    font-size: clamp(.92rem, 1.05vw, 1.02rem);
    font-weight: 500;
    color: rgba(255,255,255,.94);
    max-width: 40ch;
    margin-bottom: .9rem;
}
body.login-page .brand-copy .desc {
    font-size: .86rem;
    line-height: 1.7;
    color: rgba(255,255,255,.68);
    max-width: 42ch;
}
body.login-page .brand-tag {
    margin-top: auto;
    padding-top: 2.25rem;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .75rem;
    letter-spacing: .04em;
    color: rgba(255,255,255,.55);
}
body.login-page .brand-tag::before {
    content: '';
    width: 26px; height: 1.5px;
    background: rgba(255,255,255,.35);
    border-radius: 2px;
}
body.login-page .panel-form {
    flex: 1;
    min-width: 0;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.5rem;
}
body.login-page .form-side {
    width: 100%;
    max-width: 396px;
}
body.login-page .login-logo {
    display: block;
    width: clamp(160px, 18vw, 198px);
    height: auto;
    margin: 0 auto 1.35rem;
}
body.login-page .form-side h2 {
    font-size: 1.42rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: .8rem;
}
body.login-page .portal-badge {
    display: table;
    margin: 0 auto 1.35rem;
    padding: .42rem .9rem;
    border-radius: 999px;
    background: var(--purple-bg);
    color: var(--text-dark);
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}
body.login-page .login-inner {
    background: #F9F7FE;
    border: 1px solid #ECE9F4;
    border-radius: 16px;
    padding: 1.5rem 1.4rem 1.4rem;
    box-shadow: 0 12px 30px -22px rgba(43,22,110,.35);
}
body.login-page .login-alert { margin-bottom: 1.1rem; }
body.login-page .login-inner .form-group { margin-bottom: 1rem; }
body.login-page .login-inner .form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: .4rem;
}
body.login-page .input-wrap { position: relative; }
body.login-page .login-inner input[type="text"],
body.login-page .login-inner input[type="password"] {
    width: 100%;
    padding: .74rem .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .875rem;
    font-family: inherit;
    color: var(--text);
    background: #FFFFFF;
    transition: border-color .15s, box-shadow .15s;
}
body.login-page .login-inner .has-trailing { padding-right: 2.7rem; }
body.login-page .login-inner input:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px var(--purple-bg);
}
body.login-page .pw-toggle {
    position: absolute;
    right: .55rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
body.login-page .pw-toggle:hover { color: var(--text-dark); background: var(--purple-bg); }
body.login-page .pw-toggle svg { width: 16px; height: 16px; }
body.login-page .pw-toggle .icon-eye-off { display: none; }
body.login-page .pw-toggle.active .icon-eye { display: none; }
body.login-page .pw-toggle.active .icon-eye-off { display: block; }
body.login-page .pw-toggle:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
body.login-page .login-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin: .15rem 0 1.1rem;
}
body.login-page .login-forgot {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-dark);
}
body.login-page .login-forgot:hover { color: var(--text-dark); }
body.login-page .login-inner .btn-primary {
    width: 100%;
    padding: .78rem;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .03em;
    border-radius: 10px;
    box-shadow: 0 10px 22px -10px rgba(106,13,173,.55);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
body.login-page .login-inner .btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--purple-dark), var(--purple)) !important;
    box-shadow: 0 14px 28px -10px rgba(106,13,173,.62);
}
body.login-page .login-inner .btn-primary:focus-visible {
    outline: 2px solid var(--purple-dark);
    outline-offset: 3px;
}
body.login-page .login-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 1.25rem;
    font-size: .72rem;
    color: var(--muted);
    text-align: center;
}
body.login-page .login-footnote svg { width: 12px; height: 12px; flex-shrink: 0; opacity: .8; }
body.login-page .login-back {
    display: block;
    text-align: center;
    margin-top: 1.1rem;
    font-size: .8rem;
    font-weight: 500;
    color: var(--muted);
}
body.login-page .login-back:hover { color: var(--text-dark); }
@media (max-width: 767px) {
    body.login-page { align-items: flex-start; }
    body.login-page .auth-shell { flex-direction: column; width: min(560px, 100%); }
    body.login-page .panel-brand { flex: none; padding: 1.75rem 1.5rem; }
    body.login-page .brand-copy h1 { font-size: 1.4rem; margin-bottom: .45rem; }
    body.login-page .brand-copy .lead { font-size: .86rem; margin-bottom: .4rem; }
    body.login-page .brand-copy .desc { display: none; }
    body.login-page .brand-tag { display: none; }
    body.login-page .brand-shape.s3,
    body.login-page .brand-shape.s4,
    body.login-page .brand-line { display: none; }
    body.login-page .panel-form { padding: 1.9rem 1.4rem 2.3rem; }
}
@media (max-width: 480px) {
    body.login-page .panel-form { padding: 1.6rem 1.1rem 2rem; }
    body.login-page .login-inner { padding: 1.2rem 1rem 1.15rem; }
    body.login-page .login-row { flex-wrap: wrap; row-gap: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
    body.login-page .login-inner .btn-primary,
    body.login-page .pw-toggle { transition: none; }
}
@media (min-width: 768px) and (min-height: 550px) {
    body.login-page { padding: 15px 15px; }
    body.login-page .auth-shell { min-height: 0; }
    body.login-page .panel-form { padding: 1rem; }
    body.login-page .login-logo { width: 130px; margin-bottom: .5rem; }
    body.login-page .form-side h2 { font-size: 1.15rem; margin-bottom: .65rem; }
    body.login-page .login-inner { padding: 1rem; }
    body.login-page .login-inner .form-group { gap: .25rem; margin-bottom: .6rem; }
    body.login-page .login-inner .form-group label { margin-bottom: 0; }
    body.login-page .login-row { margin: .1rem 0 .8rem; }
    body.login-page .login-inner input[type="text"],
    body.login-page .login-inner input[type="password"] { padding: .6rem .9rem; }
    body.login-page .login-inner .btn-primary { padding: .6rem; }
    body.login-page .login-footnote { margin-top: .6rem; }
    body.login-page .login-back { margin-top: .5rem; }
    body.login-page .login-alert { margin-bottom: .4rem; padding: .35rem .6rem; font-size: .75rem; }
}
@media (max-width: 767px), (max-height: 549px) {
    body.login-page {
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
        overflow: auto;
    }
}

/* ── Peer Evaluation ──────────────────────────────────────────────────── */

/* List: peer rows */
.pe-peer-list { display: flex; flex-direction: column; }
.pe-peer-row {
    display: grid;
    grid-template-columns: 48px 1fr 260px 180px 44px;
    align-items: center; gap: 1.25rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.pe-peer-row:last-child { border-bottom: 0; }
.pe-peer-avatar {
    width: 44px; height: 44px; border-radius: 999px;
    background: var(--purple); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .85rem; letter-spacing: .02em;
}
.pe-peer-name { font-weight: 600; margin: 0; font-size: .9rem; color: var(--text); }
.pe-peer-id { font-size: .75rem; color: var(--muted); margin: .15rem 0 0; }
.pe-peer-position { font-size: .85rem; color: var(--text); margin: 0; }
.pe-star-btn {
    width: 40px; height: 40px; border-radius: 999px;
    background: var(--purple); color: #fff; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform .12s, background .12s;
    text-decoration: none;
}
.pe-star-btn:hover { transform: scale(1.06); background: #6a25a8; }

@media (max-width: 768px) {
    .pe-peer-row { grid-template-columns: 44px 1fr 44px; gap: .75rem; }
    .pe-peer-position, .pe-peer-row .badge { grid-column: 2; }
}

/* Form: header */
.pe-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.pe-header-left { display: flex; align-items: center; gap: 1rem; }
.pe-header-right { text-align: right; }
.pe-avatar {
    width: 52px; height: 52px; border-radius: 999px;
    background: var(--purple); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; flex: 0 0 auto;
}
.pe-name { font-weight: 600; margin: 0; font-size: 1.05rem; color: var(--text); }
.pe-role { font-size: .8rem; color: var(--muted); margin: .15rem 0 0; }
.pe-eid { font-size: .75rem; color: var(--muted); margin: .1rem 0 0; }
.pe-period-label { font-size: .75rem; color: var(--muted); margin: 0; }
.pe-period-value { font-weight: 600; margin: .15rem 0 0; font-size: 1rem; color: var(--text); }

/* Form: goal evidence */
.pe-goal-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; flex-wrap: wrap; }
.pe-goal-icon {
    width: 28px; height: 28px; border-radius: 999px;
    background: rgba(123, 44, 191, .12); color: var(--purple);
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.pe-goal-title { font-weight: 600; font-size: .9rem; color: var(--text); }
.pe-goal-status { margin-left: auto; font-size: .8rem; color: var(--muted); }
.pe-goal-body { font-size: .8rem; color: var(--muted); margin: .4rem 0 0; line-height: 1.5; }

/* Form: instructions */
.pe-instructions { background: rgba(123, 44, 191, .06); border-color: rgba(123, 44, 191, .12); }

/* Form: rating scale */
.pe-scale th { text-align: center; font-weight: 600; padding: .6rem; }
.pe-scale td { text-align: center; color: var(--muted); font-size: .85rem; padding: .6rem; }

/* Form: criterion table */
.pe-criterion {
    border: 1px solid var(--border); border-radius: 8px;
    margin-bottom: 1rem; overflow: hidden; background: var(--surface);
}
.pe-criterion-header {
    display: flex; align-items: center; gap: .75rem;
    padding: .85rem 1rem; background: var(--surface-muted);
}
.pe-criterion-num {
    width: 32px; height: 32px; border-radius: 999px;
    background: var(--purple); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .9rem; flex: 0 0 auto;
}
.pe-criterion-title { font-weight: 600; font-size: .9rem; color: var(--text); display: block; }
.pe-criterion-meta { font-size: .75rem; color: var(--muted); display: block; }

.pe-qtable { width: 100%; border-collapse: collapse; }
.pe-qtable th, .pe-qtable td {
    padding: .7rem 1rem; vertical-align: middle;
    border-top: 1px solid var(--border);
}
.pe-qtable thead th {
    border-top: 0; font-weight: 600; font-size: .8rem; color: var(--muted);
}
.pe-qcol { text-align: left; font-size: .85rem; line-height: 1.5; color: var(--text); }
.pe-rcol { width: 60px; text-align: center; }
.pe-qnum { color: var(--muted); margin-right: .35rem; font-variant-numeric: tabular-nums; }

.pe-radio {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 999px;
    border: 1px solid var(--border); cursor: pointer;
    transition: all .15s; position: relative;
}
.pe-radio input { position: absolute; opacity: 0; pointer-events: none; }
.pe-radio span {
    width: 14px; height: 14px; border-radius: 999px;
    background: transparent; transition: background .15s;
}
.pe-radio:hover { border-color: var(--purple); }
.pe-radio:has(input:checked) { background: var(--purple); border-color: var(--purple); }
.pe-radio:has(input:checked) span { background: #fff; }
.pe-radio:has(input:focus-visible) { outline: 2px solid var(--purple); outline-offset: 2px; }

.pe-criterion-footer {
    padding: .85rem 1rem; border-top: 1px solid var(--border);
    background: var(--surface-muted);
}
.pe-criterion-footer textarea {
    width: 100%; min-height: 80px;
    border: 1px solid var(--border); border-radius: 6px;
    padding: .55rem .7rem; font: inherit; resize: vertical;
}
.pe-criterion.is-required .pe-criterion-footer { background: rgba(123, 44, 191, .04); }
.pe-star { color: var(--danger); }

/* Form: free-text fields */
.pe-field-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .5rem; color: var(--text); }
.pe-textarea {
    width: 100%; min-height: 80px;
    border: 1px solid var(--border); border-radius: 8px;
    padding: .65rem .85rem; font: inherit; resize: vertical;
}

/* Form: sticky footer */
.pe-sticky-footer {
    position: sticky; bottom: 0; z-index: 5;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: .85rem 1rem; display: flex;
    justify-content: space-between; align-items: center;
    gap: 1rem; margin-top: 1rem;
}
.pe-progress-label { font-weight: 600; }
.pe-progress-value { font-size: .85rem; color: var(--muted); }
.pe-footer-actions { display: flex; gap: .5rem; }

@media (max-width: 640px) {
    .pe-sticky-footer { flex-direction: column; align-items: stretch; }
    .pe-sticky-footer .pe-footer-actions .btn { flex: 1; }
}

/* API Keys — collapsible cards */
.api-key-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: .75rem;
    background: var(--surface);
    overflow: hidden;
}

.api-key-summary {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .12s;
}
.api-key-summary::-webkit-details-marker { display: none; }
.api-key-summary:hover { background: var(--surface-muted); }

.api-key-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid var(--text-muted);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .15s;
    flex: 0 0 auto;
}
.api-key-card[open] .api-key-caret {
    transform: rotate(90deg);
}

.api-key-name {
    font-weight: 600;
    font-size: .95rem;
    color: var(--text);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-key-prefix {
    font-size: .8rem;
    color: var(--muted);
    background: var(--surface-muted);
    padding: .15rem .4rem;
    border-radius: 4px;
    flex: 0 0 auto;
}

.api-key-summary .badge {
    flex: 0 0 auto;
}

.api-key-body {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.api-key-row {
    margin-bottom: .85rem;
}
.api-key-row:last-of-type {
    margin-bottom: .5rem;
}

.api-key-row-inline {
    display: flex;
    gap: 2rem;
}

.api-key-label {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .35rem;
}

.api-key-scopes {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.api-key-scopes .badge {
    font-size: .72rem;
}

.api-key-actions {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--border);
}

@media (max-width: 640px) {
    .api-key-row-inline {
        flex-direction: column;
        gap: .85rem;
    }
    .api-key-summary {
        flex-wrap: wrap;
    }
    .api-key-prefix {
        order: 3;
        margin-top: .25rem;
    }
}
