/* ═══════════════════════════════════════════════════════════════════════════
   Marlink FieldOps  ·  Enterprise Cybersecurity Backoffice 2026
   ═══════════════════════════════════════════════════════════════════════════ */

/* Remove focus outline on headings focused by Blazor FocusOnNavigate */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
    outline: none;
}

/* ─── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
    /* Marlink Brand — deep navy to bright cyan (pure blue, no violet) */
    --brand-navy: #001c39;
    --brand-navy-mid: #003366;
    --brand-blue: #075EBB;
    --brand-cyan: #00B4EF;
    --brand-gradient: linear-gradient(135deg, #075EBB 0%, #00B4EF 100%);

    /* Surface palette — Light enterprise */
    --bg-root: #f0f4f8;
    --bg-sidebar: #001c39;
    --bg-sidebar-hover: rgba(0, 180, 239, .08);
    --bg-sidebar-active: rgba(0, 180, 239, .14);
    --bg-topbar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafd;
    --bg-surface: #f5f7fb;
    --bg-input: #ffffff;
    --bg-modal-overlay: rgba(0, 28, 57, .5);

    /* Borders */
    --border-subtle: #e4e9f1;
    --border-default: #d8dfea;
    --border-strong: #c0c9d9;
    --border-accent: rgba(7, 94, 187, .3);

    /* Text */
    --text-primary: #0f1b2d;
    --text-secondary: #475569;
    --text-muted: #8896a8;
    --text-inverse: #ffffff;
    --text-sidebar: rgba(255,255,255,.6);
    --text-sidebar-active: #ffffff;

    /* Accent */
    --accent: #075EBB;
    --accent-hover: #0a6fd4;
    --accent-subtle: rgba(7, 94, 187, .08);
    --accent-gradient: var(--brand-gradient);

    /* Semantic */
    --success: #059669;
    --success-subtle: rgba(5, 150, 105, .08);
    --warning: #d97706;
    --warning-subtle: rgba(217, 119, 6, .08);
    --danger: #dc2626;
    --danger-subtle: rgba(220, 38, 38, .08);
    --info: #0284c7;
    --info-subtle: rgba(2, 132, 199, .08);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Sizing */
    --sidebar-w: 250px;
    --topbar-h: 52px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.03);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.08);
    --shadow-card: 0 1px 3px rgba(0,28,57,.05), 0 0 0 1px rgba(0,28,57,.03);
}

/* ─── Global Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); background: var(--bg-root); color: var(--text-primary); line-height: 1.6; min-height: 100vh; }
a { text-decoration: none; color: var(--accent); }
a:hover { color: var(--accent-hover); }
code { font-family: var(--font-mono); font-size: .85em; }
img, svg { display: inline-block; max-width: 100%; }
hr { border: none; border-top: 1px solid var(--border-subtle); margin: 16px 0; }

/* ─── Premium Scrollbar (global) ─────────────────────────────────────── */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }
::-webkit-scrollbar-thumb:active { background: var(--accent); }
::-webkit-scrollbar-corner { background: transparent; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — Full-width topbar above sidebar + content
   ═══════════════════════════════════════════════════════════════════════════ */

.app-shell {
    display: flex; flex-direction: column; min-height: 100vh;
}

/* ─── Topbar (fixed full width, always on top) ───────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; gap: 16px;
    padding: 0 24px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    box-shadow: var(--shadow-sm);
    width: 100%;
    flex-shrink: 0;
}

.topbar-left {
    display: flex; align-items: center; gap: 12px;
    width: var(--sidebar-w);
    flex-shrink: 0;
    padding-right: 20px;
}

.topbar-brand {
    display: flex; align-items: center; gap: 10px;
}
.topbar-logo { height: 22px; width: auto; }
.topbar-brand-sep {
    width: 1px; height: 20px;
    background: var(--border-default);
}
.topbar-brand-label {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--text-muted);
}

.mobile-menu-btn {
    display: none;
    width: 36px; height: 36px;
    border: none; border-radius: var(--radius-md);
    background: none; cursor: pointer;
    color: var(--text-secondary);
    align-items: center; justify-content: center;
    transition: all .15s;
}
.mobile-menu-btn:hover { background: var(--bg-surface); color: var(--text-primary); }

.topbar-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.topbar-breadcrumb a { color: var(--text-muted); font-weight: 400; }
.topbar-breadcrumb a:hover { color: var(--accent); }
.topbar-breadcrumb-sep { color: var(--border-strong); }
.topbar-breadcrumb-current { color: var(--text-primary); font-weight: 600; }
.topbar-spacer { flex: 1; }

.topbar-search {
    position: relative; display: flex; align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0 12px; height: 36px;
    min-width: 260px; max-width: 360px;
    transition: border-color .15s, box-shadow .15s;
}
.topbar-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.topbar-search-icon { color: var(--text-muted); margin-right: 8px; display: flex; align-items: center; }
.topbar-search input {
    border: none; background: none; outline: none;
    font-size: .8rem; color: var(--text-primary);
    flex: 1; font-family: var(--font-sans);
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search-shortcut {
    font-size: .62rem; color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 4px; padding: 1px 6px;
    font-family: var(--font-mono);
}

.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: 16px; }
.topbar-btn {
    position: relative;
    width: 36px; height: 36px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: none; cursor: pointer;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.topbar-btn:hover { background: var(--bg-surface); border-color: var(--border-subtle); color: var(--text-primary); }
/* legacy dot removed — replaced by NotificationBell component */
.topbar-divider { width: 1px; height: 22px; background: var(--border-subtle); margin: 0 8px; }

/* ─── App Body (sidebar + content side-by-side below fixed topbar) ──── */
.app-body {
    display: flex; flex: 1; min-height: 0;
    padding-top: var(--topbar-h);
}

/* ─── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--brand-navy);
    background-image: linear-gradient(180deg, #0a2a4a 0%, #0d3b66 40%, #115e8c 100%);
    display: flex; flex-direction: column;
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0; z-index: 100;
    overflow: hidden;
    flex-shrink: 0;
    border-right: 1px solid rgba(0,51,102,.3);
    overscroll-behavior: contain;
}

.sidebar-brand {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo { height: 22px; width: auto; flex-shrink: 0; }
.sidebar-brand-text {}
.sidebar-brand-name {
    font-size: .62rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.8px;
    color: rgba(255,255,255,.3);
}

.sidebar-nav {
    flex: 1; padding: 8px 0; overflow-y: auto; min-height: 0; overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.1);
    border-radius: 100px;
    transition: background .2s;
}
.sidebar-nav:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.sidebar-nav::-webkit-scrollbar-thumb:active { background: rgba(0,180,239,.5); }

.nav-section { margin-bottom: 2px; }
.nav-section-title {
    padding: 10px 20px 5px;
    font-size: .6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.4px;
    color: rgba(255,255,255,.22);
}

.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 20px;
    color: var(--text-sidebar);
    font-size: .82rem; font-weight: 450;
    transition: all .15s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}
.nav-item:hover {
    color: rgba(255,255,255,.9);
    background: var(--bg-sidebar-hover);
}
.nav-item.active, .nav-item[aria-current="page"] {
    color: #fff;
    background: var(--bg-sidebar-active);
    border-left-color: var(--brand-cyan);
    font-weight: 550;
}
.nav-item.active .nav-icon svg, .nav-item[aria-current="page"] .nav-icon svg {
    color: var(--brand-cyan);
}
.nav-icon { width: 20px; text-align: center; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { color: inherit; }

.sidebar-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand-gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 600; color: #fff;
    flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: .76rem; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .66rem; color: rgba(255,255,255,.3); }

.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 99;
    background: rgba(0,0,0,.4);
}

/* ─── Main Content ────────────────────────────────────────────────────── */
.main-content {
    flex: 1; min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex; flex-direction: column;
    background: var(--bg-root);
}

/* ─── Page Content ────────────────────────────────────────────────────── */
.page-content {
    flex: 1; padding: 24px 28px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

/* ─── Page Header ─────────────────────────────────────────────────────── */
.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 24px; gap: 16px;
}
.page-header-info {}
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.page-header-description { color: var(--text-secondary); font-size: .875rem; margin-top: 4px; }
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ─── Detail Header ───────────────────────────────────────────────────── */
.detail-header {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 24px; padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.detail-avatar {
    width: 52px; height: 52px; border-radius: var(--radius-lg);
    background: var(--brand-gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700; color: #fff; flex-shrink: 0;
    letter-spacing: .5px;
}
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { font-size: 1.25rem; font-weight: 700; }
.detail-meta { display: flex; align-items: center; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.detail-meta-item { font-size: .8rem; }

/* ─── Cards ───────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.card-header h3 { font-size: .92rem; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 20px; }
.card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ─── Stat Cards (stat-cards and stat-grid both supported) ───────────── */
.stat-cards, .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
    display: flex; align-items: flex-start; gap: 14px;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--brand-gradient);
    opacity: 0; transition: opacity .2s;
}
.stat-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
    width: 38px; height: 38px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.stat-icon.accent { background: var(--accent-subtle); color: var(--accent); }
.stat-icon.success { background: var(--success-subtle); color: var(--success); }
.stat-icon.info { background: var(--info-subtle); color: var(--info); }
.stat-icon.warning { background: var(--warning-subtle); color: var(--warning); }
.stat-icon.danger { background: var(--danger-subtle); color: var(--danger); }
.stat-content { min-width: 0; }
.stat-label { font-size: .7rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); margin-top: 2px; line-height: 1.2; }

/* ─── Data Tables ─────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { position: sticky; top: 0; z-index: 2; }
.data-table th {
    padding: 10px 16px;
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
    text-align: left; white-space: nowrap;
}
.data-table td {
    padding: 11px 16px;
    font-size: .85rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: var(--accent-subtle); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .cursor-pointer { cursor: pointer; }
.cell-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 18px; border: 1px solid transparent;
    border-radius: var(--radius-md); font-size: .85rem; font-weight: 500;
    cursor: pointer; font-family: var(--font-sans);
    transition: all .15s ease; white-space: nowrap; line-height: 1;
}
.btn:disabled { opacity: .55; pointer-events: none; }

.btn-primary {
    background: var(--brand-gradient); color: #fff; border-color: transparent;
    box-shadow: 0 1px 3px rgba(7,94,187,.25);
}
.btn-primary:hover { box-shadow: 0 2px 8px rgba(7,94,187,.35); filter: brightness(1.08); }

.btn-secondary { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-default); }
.btn-secondary:hover { background: var(--bg-surface); border-color: var(--border-strong); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }

.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger-subtle); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost { background: none; color: var(--text-secondary); border-color: transparent; padding: 6px 10px; }
.btn-ghost:hover { background: var(--bg-surface); color: var(--text-primary); }

.btn-sm { height: 30px; padding: 0 12px; font-size: .8rem; }
.btn-icon { padding: 5px 8px; }

/* ─── Badges ──────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 100px;
    font-size: .72rem; font-weight: 600; white-space: nowrap;
    line-height: 1.4;
}
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge-accent { background: var(--accent-subtle); color: var(--accent); }
.badge-accent.badge-dot::before { background: var(--accent); }
.badge-success { background: var(--success-subtle); color: var(--success); }
.badge-success.badge-dot::before { background: var(--success); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); }
.badge-warning.badge-dot::before { background: var(--warning); }
.badge-danger { background: var(--danger-subtle); color: var(--danger); }
.badge-danger.badge-dot::before { background: var(--danger); }
.badge-info { background: var(--info-subtle); color: var(--info); }
.badge-info.badge-dot::before { background: var(--info); }
.badge-muted { background: rgba(148,163,184,.1); color: var(--text-muted); }
.badge-muted.badge-dot::before { background: var(--text-muted); }

/* ─── Tabs ────────────────────────────────────────────────────────────── */
.tab-bar {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0 8px;
    box-shadow: var(--shadow-card);
}
.tab-item {
    padding: 12px 20px;
    font-size: .85rem; font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .15s;
    white-space: nowrap;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ─── Forms ───────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .76rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .3px; }
.form-control {
    width: 100%; padding: 9px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: .85rem; color: var(--text-primary);
    font-family: var(--font-sans);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 80px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.filter-select {
    height: 36px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: .82rem; color: var(--text-primary);
    cursor: pointer; font-family: var(--font-sans);
}

/* ─── Toolbar ─────────────────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Search — premium inset field with subtle depth */
.toolbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 14px;
    min-width: 220px;
    flex: 1;
    max-width: 380px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.toolbar-search:focus-within {
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle), inset 0 1px 2px rgba(0,0,0,.04);
}
.toolbar-search span {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.toolbar-search input {
    border: none;
    background: none;
    outline: none;
    font-size: .82rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    flex: 1;
    height: 100%;
    min-width: 0;
}
.toolbar-search input::placeholder {
    color: var(--text-muted);
    font-size: .82rem;
}

/* Filter group — dropdown triggers styled to match search */
.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.filter-group .custom-select.compact {
    min-width: 130px;
}
.filter-group .custom-select-trigger {
    background: var(--bg-surface);
    border-color: var(--border-subtle);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
    height: 36px;
    font-size: .82rem;
    padding: 0 12px;
}
.filter-group .custom-select-trigger:hover {
    background: var(--bg-card);
    border-color: var(--border-default);
}
.filter-group .custom-select.open .custom-select-trigger,
.filter-group .custom-select-trigger:focus {
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle), inset 0 1px 2px rgba(0,0,0,.04);
}

/* Toolbar divider */
.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-default);
    flex-shrink: 0;
}

/* ─── Modals ──────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: var(--bg-modal-overlay);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
    animation: fadeIn .15s ease;
}
.modal-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    width: 100%; max-width: 480px;
    animation: slideUp .2s ease;
}
.modal-lg { max-width: 640px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px; border: none;
    border-radius: var(--radius-md);
    background: none; cursor: pointer;
    font-size: 1rem; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.modal-close:hover { background: var(--bg-surface); color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
}
.modal-sm { max-width: 380px; }
.modal-detail-bar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; padding: 10px 14px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}
.modal-danger-icon {
    width: 56px; height: 56px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--danger-subtle); color: var(--danger);
}

/* ─── Clickable Table Rows ───────────────────────────────────────────── */
.data-table tbody tr.cursor-pointer:hover {
    background: var(--accent-subtle);
    box-shadow: inset 3px 0 0 var(--accent);
}
/* ─── Pagination ──────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination-btn {
    min-width: 34px; height: 34px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-card); color: var(--text-secondary);
    cursor: pointer; font-size: .8rem; font-weight: 500;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.pagination-btn:hover:not(:disabled) { background: var(--bg-surface); border-color: var(--border-strong); color: var(--text-primary); }
.pagination-btn:disabled { opacity: .4; cursor: not-allowed; }
.pagination-btn.active {
    background: var(--accent); color: #fff;
    border-color: var(--accent);
}
.pagination-info { font-size: .8rem; color: var(--text-muted); }

/* ─── KV Grid ─────────────────────────────────────────────────────────── */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv-item {}
.kv-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 4px; }
.kv-value { font-size: .9rem; color: var(--text-primary); font-weight: 500; }

/* ─── Empty State ─────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .4; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }
.empty-state p { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Loading ─────────────────────────────────────────────────────────── */
.loading-spinner { display: flex; justify-content: center; padding: 48px; }
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border-default);
    border-top-color: var(--brand-cyan);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* ─── Toast ───────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed; top: 16px; right: 16px;
    z-index: 1000;
    display: flex; flex-direction: column; gap: 8px;
    max-width: 400px;
}
.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    animation: slideInRight .25s ease;
    min-width: 320px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: .8rem; font-weight: 700; color: var(--text-primary); }
.toast-message { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.toast-dismiss { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: .9rem; padding: 0; line-height: 1; }
.toast-dismiss:hover { color: var(--text-primary); }

/* ─── Matrix Cells (Planning) ─────────────────────────────────────────── */
.matrix-cell { padding: 6px 10px; text-align: center; font-size: .72rem; font-weight: 600; border-radius: var(--radius-sm); min-width: 48px; }
.matrix-cell.field { background: var(--accent-subtle); color: var(--accent); }
.matrix-cell.office { background: var(--info-subtle); color: var(--info); }
.matrix-cell.leave { background: var(--warning-subtle); color: var(--warning); }
.matrix-cell.blank { background: rgba(148,163,184,.06); color: var(--text-muted); }
.matrix-legend { display: flex; gap: 16px; align-items: center; font-size: .75rem; color: var(--text-secondary); }
.matrix-legend-item { display: flex; align-items: center; gap: 6px; }
.matrix-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

/* ─── Alert ───────────────────────────────────────────────────────────── */
.alert-danger {
    padding: 12px 16px; border-radius: var(--radius-md);
    background: var(--danger-subtle); color: var(--danger);
    border: 1px solid rgba(220,38,38,.15);
    font-size: .85rem; margin-bottom: 12px;
}

/* ─── Login Page ──────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-navy);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(7,94,187,.25) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(0,180,239,.15) 0%, transparent 50%),
        linear-gradient(160deg, #001c39 0%, #003366 40%, #075EBB 100%);
    position: relative; overflow: hidden;
}
.login-page::before {
    content: ''; position: absolute; top: -30%; right: -15%;
    width: 50%; height: 100%;
    background: radial-gradient(circle, rgba(0,180,239,.12), transparent 70%);
}
.login-page::after {
    content: ''; position: absolute; bottom: -20%; left: -5%;
    width: 40%; height: 80%;
    background: radial-gradient(circle, rgba(7,94,187,.1), transparent 70%);
}
.login-card {
    position: relative; z-index: 1;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-xl);
    padding: 0; width: 100%; max-width: 420px;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.login-header { text-align: center; padding: 36px 32px 20px; }
.login-logo {
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.login-logo img { height: 36px; }
.login-header h1 { font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.login-header p { font-size: .85rem; color: rgba(255,255,255,.4); }
.login-body { padding: 8px 32px 36px; }
.login-body .form-label { color: rgba(255,255,255,.5); }
/* Override Premium Form Controls for login — match production exactly */
.login-body .form-control,
.login-body input[type="email"].form-control,
.login-body input[type="password"].form-control,
.login-body input[type="text"].form-control {
    height: auto !important;
    padding: 9px 14px !important;
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    color: #fff !important;
    transition: border-color .15s, box-shadow .15s !important;
}
.login-body .form-control:hover,
.login-body input[type="email"].form-control:hover,
.login-body input[type="password"].form-control:hover,
.login-body input[type="text"].form-control:hover {
    border-color: rgba(255,255,255,.12) !important;
}
.login-body .form-control:focus,
.login-body input[type="email"].form-control:focus,
.login-body input[type="password"].form-control:focus,
.login-body input[type="text"].form-control:focus {
    outline: none;
    background: rgba(255,255,255,.06) !important;
    border-color: var(--brand-cyan) !important;
    box-shadow: 0 0 0 3px rgba(0,180,239,.15) !important;
    color: #fff !important;
}
.login-body .form-control::placeholder { color: rgba(255,255,255,.3); }
.login-body .password-wrapper .form-control { padding-right: 40px !important; }
/* Chrome autofill fix — must combine inset shadow with focus glow */
.login-body input.form-control:-webkit-autofill,
.login-body input.form-control:-webkit-autofill:hover,
.login-body input.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1c4977 inset !important;
    box-shadow: 0 0 0 30px #1c4977 inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s !important;
    border-color: rgba(255,255,255,.12) !important;
    caret-color: #fff;
    color: #fff !important;
}
/* Autofill + focus — COMBINE cyan glow ring + inset background cover */
.login-body input.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 3px rgba(0,180,239,.15), 0 0 0 30px #1c4977 inset !important;
    box-shadow: 0 0 0 3px rgba(0,180,239,.15), 0 0 0 30px #1c4977 inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s !important;
    border-color: var(--brand-cyan) !important;
    caret-color: #fff;
    color: #fff !important;
}
.login-body .form-control.is-invalid,
.login-body input[type="email"].form-control.is-invalid,
.login-body input[type="password"].form-control.is-invalid {
    border-color: rgba(239,68,68,.5) !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}
.login-body .form-control.is-invalid:focus,
.login-body input[type="email"].form-control.is-invalid:focus,
.login-body input[type="password"].form-control.is-invalid:focus {
    border-color: rgba(239,68,68,.6) !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.2) !important;
    background: rgba(255,255,255,.06) !important;
}
.login-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; margin-top: 12px; height: 48px; font-size: .95rem; font-weight: 600;
    border: none; border-radius: 10px; color: #fff; cursor: pointer;
    background: linear-gradient(135deg, #00B4EF 0%, #075EBB 50%, #003366 100%);
    background-size: 200% 200%; background-position: 0% 50%;
    box-shadow: 0 2px 12px rgba(0,180,239,.3), inset 0 1px 0 rgba(255,255,255,.15);
    transition: background-position .4s ease, box-shadow .3s ease, transform .15s ease;
    letter-spacing: .3px;
}
.login-btn:hover {
    background-position: 100% 50%;
    box-shadow: 0 4px 20px rgba(0,180,239,.4), inset 0 1px 0 rgba(255,255,255,.2);
    transform: translateY(-1px);
}
.login-btn:active { transform: translateY(0); box-shadow: 0 1px 6px rgba(0,180,239,.25); }
.login-btn:disabled { opacity: .55; pointer-events: none; transform: none; }
.login-error {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 10px; margin-bottom: 14px;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.25);
    backdrop-filter: blur(4px);
    font-size: .82rem; line-height: 1.5; color: #fca5a5;
    animation: loginErrorFadeIn .3s ease-out;
}
.login-error-icon {
    flex-shrink: 0; margin-top: 1px; color: #f87171;
}
.login-error-dismiss {
    flex-shrink: 0; margin-left: auto;
    background: none; border: none; cursor: pointer;
    color: rgba(252,165,165,.5); padding: 0; display: flex;
    transition: color .15s;
}
.login-error-dismiss:hover { color: #fca5a5; }
.login-footer {
    text-align: center; padding: 16px 32px 28px;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .85rem; color: rgba(255,255,255,.4);
}
.login-footer a {
    color: var(--brand-cyan); font-weight: 600;
    margin-left: 4px;
}
.login-footer a:hover { text-decoration: underline; }
@keyframes loginErrorFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Sidebar Logout ─────────────────────────────────────────────────── */
.sidebar-logout-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; margin-left: auto;
    border: none; border-radius: var(--radius-md);
    background: rgba(255,255,255,.08); cursor: pointer;
    color: rgba(255,255,255,.5); transition: all .15s;
    flex-shrink: 0;
}
.sidebar-logout-btn:hover { background: rgba(239,68,68,.25); color: #ef4444; }

/* ─── Utilities ───────────────────────────────────────────────────────── */
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .8rem; }
.text-xs { font-size: .72rem; }
.text-center { text-align: center; }
.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-weight: 600; color: #fff;
    background: var(--brand-gradient);
}
.avatar-sm { width: 32px; height: 32px; font-size: .7rem; flex-shrink: 0; }

/* ─── Dropdown Backdrop ────────────────────────────────────────────── */
.dropdown-backdrop { position: fixed; inset: 0; z-index: 999; }

/* ─── Language Selector ──────────────────────────────────────────────── */
.language-selector { position: relative; }
.language-btn { font-weight: 600; letter-spacing: .5px; font-size: .8rem; min-width: 40px; }
.language-flag { font-size: .8rem; }
.language-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 1000;
    background: var(--bg-card); border: 1px solid var(--border-default);
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 160px; padding: 4px; animation: fadeIn .15s ease;
}
.language-option {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 6px; cursor: pointer;
    font-size: .85rem; color: var(--text-primary); transition: background .15s;
}
.language-option:hover { background: var(--bg-surface); }
.language-option.active { background: var(--accent-subtle); color: var(--accent); font-weight: 600; }
.language-option .language-flag { font-weight: 700; min-width: 24px; }

/* ─── Settings Dropdown ───────────────────────────────────────────────── */
.settings-selector { position: relative; }
.settings-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 1000;
    background: var(--bg-card); border: 1px solid var(--border-default);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 260px; padding: 6px; animation: fadeIn .15s ease;
}
.settings-dropdown-header {
    padding: 10px 12px 6px; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted);
}
.settings-option {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: 8px; cursor: pointer;
    text-decoration: none; color: var(--text-primary); transition: background .15s;
}
.settings-option:hover { background: var(--bg-surface); }
.settings-option-icon {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--bg-surface); color: var(--text-secondary); flex-shrink: 0;
    margin-top: 1px;
}
.settings-option:hover .settings-option-icon { background: var(--accent-subtle); color: var(--accent); }
.settings-option-label { font-size: .85rem; font-weight: 500; line-height: 1.3; }
.settings-option-desc { font-size: .75rem; color: var(--text-muted); line-height: 1.3; margin-top: 1px; }
.settings-dropdown-divider { height: 1px; background: var(--border-default); margin: 4px 8px; }
.settings-about { cursor: default; opacity: .7; }
.settings-about:hover { background: transparent; }
.settings-about:hover .settings-option-icon { background: var(--bg-surface); color: var(--text-secondary); }

/* ─── Blazor Error UI ─────────────────────────────────────────────────── */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--danger); color: #fff;
    padding: 12px 24px; z-index: 9999; text-align: center;
    font-size: .85rem;
}
#blazor-error-ui a { color: #fff; text-decoration: underline; margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; margin-left: 16px; }

/* ─── Animations ──────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.2); }
    .sidebar-backdrop { display: block; }
    .main-content { margin-left: 0; }
    .mobile-menu-btn { display: flex; }
    .topbar-left { width: auto; padding-right: 12px; }
    .page-content { padding: 20px; }
    .kv-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .page-header { flex-direction: column; }
    .topbar { padding: 0 12px; gap: 10px; }
    .topbar-search { display: none; }
    .topbar-brand-label { display: none; }
    .topbar-brand-sep { display: none; }
    .topbar-breadcrumb a { display: none; }
    .topbar-breadcrumb-sep { display: none; }
    .stat-cards, .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CustomSelect Component
   ═══════════════════════════════════════════════════════════════════════════ */
.custom-select { position: relative; display: inline-block; min-width: 180px; }
.custom-select.compact { min-width: 0; }

.custom-select-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; height: 36px; padding: 0 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: .85rem; color: var(--text-primary);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    text-align: left; line-height: 1.4;
}
.custom-select.compact .custom-select-trigger {
    height: 36px; padding: 0 12px; font-size: .82rem;
}
.custom-select-trigger:hover { border-color: var(--border-strong); }
.custom-select-trigger:focus, .custom-select.open .custom-select-trigger {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.custom-select-trigger:disabled { opacity: .55; cursor: not-allowed; }
.custom-select-trigger.placeholder .custom-select-text { color: var(--text-muted); }
.custom-select-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-chevron {
    flex-shrink: 0; color: var(--text-muted);
    transition: transform .2s;
}
.custom-select.open .custom-select-chevron { transform: rotate(180deg); }

.custom-select-panel {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 100%; max-width: 360px;
    animation: fadeIn .12s ease;
    overflow: hidden;
}
.custom-select.compact .custom-select-panel { min-width: 220px; }

.custom-select-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
}
.custom-select-search input {
    width: 100%; padding: 7px 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: .82rem; color: var(--text-primary);
    font-family: var(--font-sans);
    background: var(--bg-surface);
    outline: none;
    transition: border-color .15s;
}
.custom-select-search input:focus {
    border-color: var(--accent);
}
.custom-select-search input::placeholder { color: var(--text-muted); }

.custom-select-options {
    max-height: 240px; overflow-y: auto;
    padding: 4px;
}
.custom-select-option {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: .85rem; color: var(--text-primary);
    cursor: pointer;
    transition: background .1s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.custom-select-option:hover, .custom-select-option.highlighted {
    background: var(--accent-subtle);
}
.custom-select-option.active {
    background: var(--accent-subtle); color: var(--accent); font-weight: 600;
}
.custom-select-option.disabled { opacity: .4; cursor: not-allowed; }
.custom-select-empty {
    padding: 16px 12px; text-align: center;
    font-size: .82rem; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HRIS Hub — Tabs, Stat Cards, Sections, Empty States
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Pill-style Tabs ────────────────────────────────────────────────── */
.hris-tabs {
    display: flex; gap: 4px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.hris-tabs::-webkit-scrollbar { display: none; }

.hris-tab {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: .82rem; font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    text-decoration: none;
}
.hris-tab:hover { background: var(--bg-surface); color: var(--text-primary); }
.hris-tab.active {
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(7,94,187,.25);
}
.hris-tab.active svg { color: #fff; }
.hris-tab svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── Stat Cards ─────────────────────────────────────────────────────── */
.hris-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.hris-stat-card {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 18px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    position: relative; overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    text-align: center;
}
.hris-stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--brand-gradient);
    opacity: 0; transition: opacity .2s;
}
.hris-stat-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.hris-stat-card:hover::before { opacity: 1; }

.hris-stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-subtle); color: var(--accent);
}
.hris-stat-icon.cyan { background: rgba(0,180,239,.1); color: var(--brand-cyan); }
.hris-stat-icon.success { background: var(--success-subtle); color: var(--success); }
.hris-stat-icon.warning { background: var(--warning-subtle); color: var(--warning); }
.hris-stat-icon.danger { background: var(--danger-subtle); color: var(--danger); }

.hris-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.hris-stat-label { font-size: .7rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }

/* ─── Section Titles ─────────────────────────────────────────────────── */
.hris-section-title {
    font-size: .92rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 12px; margin-top: 8px;
    padding-left: 12px;
    border-left: 3px solid var(--brand-cyan);
    line-height: 1.3;
}

/* ─── Empty States ───────────────────────────────────────────────────── */
.hris-empty {
    text-align: center; padding: 48px 24px;
}
.hris-empty-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--text-muted);
}
.hris-empty h3 { font-size: .95rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.hris-empty p { font-size: .82rem; color: var(--text-muted); }

/* ─── Table Hover Glow ───────────────────────────────────────────────── */
.hris-content .data-table tbody tr { transition: background .1s, box-shadow .1s; }
.hris-content .data-table tbody tr:hover {
    background: var(--accent-subtle);
    box-shadow: inset 3px 0 0 var(--brand-cyan);
}

/* ─── Module Content Animation ───────────────────────────────────────── */
.hris-content { animation: hrisFadeIn .25s ease; }
@keyframes hrisFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Progress Bars (used by Goals) ──────────────────────────────────── */
.progress-track {
    width: 100%; height: 8px;
    background: var(--bg-surface);
    border-radius: 100px; overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 100px;
    transition: width .4s ease;
}

/* ─── HRIS Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hris-tabs { gap: 2px; padding: 4px; }
    .hris-tab { padding: 8px 12px; font-size: .78rem; }
    .hris-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
}
@media (max-width: 640px) {
    .hris-stats { grid-template-columns: 1fr 1fr; }
    .hris-tab svg { display: none; }
    .hris-tab { padding: 7px 10px; font-size: .76rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Planning Timeline (Gantt Year View)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tab badge for counts */
.tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; font-size: .65rem; font-weight: 600;
    background: var(--danger); color: #fff; margin-left: 6px;
}

/* Timeline controls */
.timeline-controls {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; gap: 12px; flex-wrap: wrap;
}
.timeline-zoom { display: flex; gap: 4px; }
.timeline-legend { display: flex; gap: 12px; font-size: .78rem; color: var(--text-secondary); align-items: center; }

/* Timeline container */
.timeline-container {
    overflow-x: auto; overflow-y: auto; max-height: 600px;
    border: 1px solid var(--border-subtle); border-radius: 8px;
    background: var(--bg-card);
}
.timeline-table {
    border-collapse: collapse; width: 100%;
}
.timeline-table th, .timeline-table td {
    border: 1px solid var(--border-subtle); padding: 0; text-align: center;
    font-size: .72rem;
}

/* Sticky employee name column */
.timeline-sticky-col {
    position: sticky; left: 0; z-index: 3;
    background: var(--bg-card); border-right: 2px solid var(--border-default) !important;
    min-width: 130px; max-width: 200px; text-align: left !important; padding: 4px 10px !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timeline-name-col { font-size: .78rem; }

/* Month header */
.timeline-month-row th {
    background: var(--brand-navy); color: #fff; padding: 6px 4px !important;
    font-weight: 600; font-size: .72rem; letter-spacing: .02em;
}
.timeline-month-row .timeline-sticky-col { background: var(--brand-navy); color: #fff; }
.timeline-month-header { border-left: 2px solid rgba(255,255,255,.15) !important; }
.timeline-month-header.even { background: var(--brand-navy-mid); }

/* Week number header */
.timeline-week-row th {
    background: var(--bg-surface); padding: 3px 2px !important;
    font-weight: 500; font-size: .65rem; color: var(--text-secondary);
}
.timeline-week-row .timeline-sticky-col { background: var(--bg-surface); }
.timeline-week-header { min-width: 32px; }

/* Group rows (OT Team / IT Team) */
.timeline-group-row td {
    background: var(--bg-surface); font-weight: 600; font-size: .72rem;
    color: var(--text-secondary); padding: 4px 10px !important; text-align: left !important;
    letter-spacing: .03em; text-transform: uppercase;
}
.timeline-group-label { border-bottom: 2px solid var(--border-default) !important; }

/* Data rows */
.timeline-row td { padding: 0 !important; }
.timeline-row .timeline-sticky-col { padding: 5px 10px !important; }

/* Timeline cell (colored week block) */
.timeline-cell {
    height: 30px; line-height: 30px; text-align: center;
    font-size: .72rem; font-weight: 600; cursor: default; transition: filter .15s;
}
.timeline-cell:hover { filter: brightness(1.1); }
.timeline-cell.field { background: var(--accent); color: #fff; }
.timeline-cell.office { background: #bbdefb; color: var(--brand-blue); }
.timeline-cell.leave { background: #ffe0b2; color: #e65100; }
.timeline-cell.blank { background: var(--bg-surface); color: var(--text-muted); border: 1px dashed var(--border-subtle); }

/* Navigation */
.timeline-nav {
    display: flex; align-items: center; gap: 6px;
}
.timeline-nav-label {
    font-size: .8rem; font-weight: 600; color: var(--text-primary);
    min-width: 120px; text-align: center;
}

/* Day view - weekend cells */
.timeline-cell.weekend { opacity: .6; }
.timeline-cell.weekend.blank { background: var(--bg-page); }

/* Current week highlight */
.timeline-week-header.current-week {
    background: var(--accent) !important; color: #fff !important;
    font-weight: 700 !important; border-radius: 4px;
}
.timeline-cell.current-week { box-shadow: inset 0 0 0 2px var(--accent); }
.timeline-coverage-cell.current-week { box-shadow: inset 0 0 0 2px var(--accent); }

/* Coverage summary footer */
.timeline-coverage-row td {
    background: var(--bg-surface) !important;
    font-size: .7rem !important; font-weight: 600 !important;
    padding: 4px 2px !important; text-align: center !important;
    color: var(--text-secondary);
    border-top: 2px solid var(--border-default) !important;
}
.timeline-coverage-label {
    font-size: .7rem !important; text-align: left !important;
    padding: 4px 10px !important; white-space: nowrap;
    background: var(--bg-surface) !important;
    min-width: 130px; max-width: 200px;
    border-right: 2px solid var(--border-default) !important;
}
.timeline-coverage-cell { min-width: 24px; }
.timeline-coverage-cell.coverage-ok { color: var(--success); }
.timeline-coverage-cell.coverage-gap { color: var(--danger); background: var(--danger-subtle) !important; }
.timeline-coverage-status-row td { border-top: 1px solid var(--border-subtle) !important; }

/* Stats bar */
.timeline-stats {
    display: flex; gap: 8px; padding: 10px 0; flex-wrap: wrap;
}
.stat-chip {
    font-size: .72rem; padding: 3px 10px; border-radius: 12px;
    background: var(--bg-surface); color: var(--text-secondary); font-weight: 500;
    border: 1px solid var(--border-subtle);
}
.stat-chip.warning { background: var(--warning-subtle); color: var(--warning); border-color: var(--warning); }

/* ─── Availability Pipeline ──────────────────────────────────────────────── */
.avail-chart {
    display: flex; gap: 2px; align-items: flex-end; padding: 8px 4px;
    overflow-x: auto; min-height: 130px;
}
.avail-bar-group {
    display: flex; flex-direction: column; align-items: center; min-width: 16px; flex: 1;
}
.avail-bar-stack {
    display: flex; flex-direction: column-reverse; width: 100%; border-radius: 3px 3px 0 0;
    overflow: hidden;
}
.avail-bar {
    width: 100%; transition: height .3s ease;
}
.avail-bar.field { background: var(--accent); }
.avail-bar.office { background: #90caf9; }
.avail-bar.leave { background: var(--warning); opacity: .7; }

.avail-gap-indicator {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--danger); color: #fff;
    font-size: .6rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}
.avail-week-label {
    font-size: .55rem; color: var(--text-muted); margin-top: 2px;
    writing-mode: vertical-lr; text-orientation: mixed;
}

/* Availability legend */
.avail-chart-legend {
    display: flex; gap: 16px; padding: 8px 12px;
    border-top: 1px solid var(--border-subtle);
    font-size: .78rem; color: var(--text-secondary);
}
.avail-legend-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 2px;
    margin-right: 4px; vertical-align: -1px;
}
.avail-legend-dot.field { background: var(--accent); }
.avail-legend-dot.office { background: #90caf9; }
.avail-legend-dot.leave { background: var(--warning); }
.avail-legend-dot.gap { background: var(--danger); border-radius: 50%; }

/* ─── Project Hub ────────────────────────────────────────────────────── */

/* Project cards grid */
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.project-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 20px; cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.project-card:hover { border-color: var(--brand-blue); box-shadow: var(--shadow-card); }
.project-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.project-card-desc {
    font-size: .8rem; color: var(--text-secondary); margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-stats { display: flex; gap: 16px; font-size: .75rem; color: var(--text-muted); }

/* Work Item Type badges */
.wit-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .65rem; font-weight: 600; text-transform: uppercase;
    padding: 2px 6px; border-radius: 3px; letter-spacing: .3px;
}
.wit-epic { background: rgba(124,58,237,.1); color: #7c3aed; }
.wit-feature { background: rgba(234,88,12,.1); color: #ea580c; }
.wit-story { background: rgba(5,150,105,.1); color: #059669; }
.wit-task { background: rgba(7,94,187,.1); color: var(--brand-blue); }
.wit-bug { background: rgba(220,38,38,.1); color: var(--danger); }
.wit-improvement { background: rgba(2,132,199,.1); color: var(--info); }

/* Board */
.board-container { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; min-height: 400px; }
.board-column {
    min-width: 300px; max-width: 340px; flex-shrink: 0;
    background: var(--bg-surface); border-radius: var(--radius-lg);
    display: flex; flex-direction: column;
}
.board-column-header {
    padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}
.board-column-title { font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.board-column-body {
    padding: 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
    max-height: calc(100vh - 300px);
}
.board-column-wip-warn { border: 2px solid var(--warning); }

/* Board cards */
.board-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: 12px; cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.board-card:hover { border-color: var(--brand-blue); box-shadow: var(--shadow-sm); }
.board-card-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.board-card-title { font-size: .82rem; font-weight: 500; line-height: 1.35; margin-bottom: 8px; }
.board-card-meta { display: flex; align-items: center; justify-content: space-between; }
.board-card-labels { display: flex; gap: 3px; }
.board-card-label-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.board-card-footer { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--text-muted); }
.board-card-points {
    background: rgba(7,94,187,.1); color: var(--brand-blue);
    padding: 1px 6px; border-radius: 10px; font-size: .65rem; font-weight: 600;
}
.board-card-subtasks { font-size: .7rem; color: var(--text-muted); }

/* Hierarchy list indentation */
.task-row-indent-1 { padding-left: 28px; }
.task-row-indent-2 { padding-left: 56px; }
.task-row-indent-3 { padding-left: 84px; }
.task-row-indent-4 { padding-left: 112px; }
.hierarchy-toggle {
    cursor: pointer; color: var(--text-muted); margin-right: 6px;
    display: inline-flex; align-items: center; transition: transform .15s;
}
.hierarchy-toggle.expanded { transform: rotate(90deg); }

/* Checklist progress */
.checklist-progress {
    height: 4px; background: var(--border-subtle); border-radius: 2px;
    overflow: hidden; margin-bottom: 12px;
}
.checklist-progress-bar { height: 100%; background: var(--success); border-radius: 2px; transition: width .2s; }

/* Activity timeline */
.activity-item {
    display: flex; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7,94,187,.1); color: var(--brand-blue); font-size: .75rem; flex-shrink: 0;
}
.activity-content { flex: 1; }
.activity-action { font-size: .82rem; }
.activity-time { font-size: .72rem; color: var(--text-muted); }

/* Attachment list */
.attachment-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.attachment-item:last-child { border-bottom: none; }
.attachment-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: rgba(2,132,199,.1); color: var(--info);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.attachment-info { flex: 1; }
.attachment-name { font-size: .85rem; font-weight: 500; }
.attachment-meta { font-size: .72rem; color: var(--text-muted); }

/* Task detail side panel */
.task-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.task-side-panel { display: flex; flex-direction: column; gap: 16px; }
.task-side-field { }
.task-side-label {
    font-size: .72rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px;
}
.task-side-value { font-size: .85rem; }

/* Label chips */
.label-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 10px; font-size: .7rem; font-weight: 500;
}

/* Sprint mini stats */
.stat-mini { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-mini-value { font-size: .95rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-mini-label { font-size: .65rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .3px; }
.stats-grid { display: grid; gap: 12px; }

/* Sprint info bar */
.sprint-info-bar {
    background: rgba(7,94,187,.06); border: 1px solid rgba(7,94,187,.2);
    border-radius: var(--radius-md); padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    margin-bottom: 16px;
}
.sprint-info-name { font-weight: 600; font-size: .9rem; }
.sprint-info-meta { display: flex; gap: 16px; font-size: .78rem; color: var(--text-secondary); }

/* Backlog layout */
.backlog-container { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.backlog-sprint-panel {
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 16px; position: sticky; top: 16px; align-self: start;
}

/* Comment thread */
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand-gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem; font-weight: 600; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-author { font-size: .82rem; font-weight: 600; }
.comment-time { font-size: .72rem; color: var(--text-muted); margin-left: 8px; font-weight: 400; }
.comment-text { font-size: .85rem; margin-top: 4px; line-height: 1.5; }

/* Checklist items */
.checklist-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item.completed .checklist-item-text { text-decoration: line-through; color: var(--text-muted); }
.checklist-item-text { flex: 1; font-size: .85rem; }
.checklist-item-delete { color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.checklist-item:hover .checklist-item-delete { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   Premium Form Controls — Enterprise Cybersecurity Design System 2026
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Standardized Form Control Height (36px) ────────────────────────── */
.form-control,
select.form-control,
.filter-select,
.custom-select-trigger,
input[type="text"].form-control,
input[type="email"].form-control,
input[type="password"].form-control,
input[type="number"].form-control,
input[type="date"].form-control,
input[type="time"].form-control,
input[type="search"].form-control,
input[type="url"].form-control,
input[type="tel"].form-control {
    height: 36px;
    padding: 7px 12px;
    font-size: .85rem;
    line-height: 1.4;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.form-control {
    height: auto;
    min-height: 80px;
}
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.form-control:hover {
    border-color: var(--border-strong);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-control:disabled,
.form-control[readonly] {
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: .7;
}
.form-control.form-control-sm {
    height: 30px;
    padding: 4px 10px;
    font-size: .78rem;
}
.form-control.form-control-lg {
    height: 42px;
    padding: 10px 16px;
    font-size: .92rem;
}

/* ─── Form Label Enhancements ─────────────────────────────────────────── */
.form-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.form-label .required,
.form-label .form-required {
    color: var(--danger);
    margin-left: 2px;
}
.form-hint {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}
.form-error {
    font-size: .72rem;
    color: var(--danger);
    margin-top: 4px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;
}
.form-control.is-invalid {
    border-color: var(--danger);
}
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--danger-subtle);
}

/* ─── Premium Checkbox ────────────────────────────────────────────────── */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    user-select: none;
    padding: 4px 0;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
}
/* Hide native checkbox only when a custom .check-indicator follows */
.form-check input[type="checkbox"]:has(+ .check-indicator) {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.form-check .check-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: 5px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    position: relative;
}
.form-check .check-indicator svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
    opacity: 0;
    transform: scale(.6);
    transition: all .15s cubic-bezier(.4, 0, .2, 1);
}
.form-check:hover .check-indicator {
    border-color: var(--accent);
    background: var(--accent-subtle);
}
.form-check input[type="checkbox"]:checked + .check-indicator {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 1px 3px rgba(7, 94, 187, .3);
}
.form-check input[type="checkbox"]:checked + .check-indicator svg {
    opacity: 1;
    transform: scale(1);
}
.form-check input[type="checkbox"]:focus-visible + .check-indicator {
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-check input[type="checkbox"]:disabled + .check-indicator {
    background: var(--bg-surface);
    border-color: var(--border-default);
    cursor: not-allowed;
    opacity: .5;
}
.form-check .check-label {
    font-size: .85rem;
    color: var(--text-primary);
    line-height: 1.4;
}
.form-check .check-label-muted {
    font-size: .78rem;
    color: var(--text-muted);
}

/* Checkbox - Success Variant */
.form-check.check-success input[type="checkbox"]:checked + .check-indicator {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 1px 3px rgba(5, 150, 105, .3);
}

/* Checkbox - Danger Variant */
.form-check.check-danger input[type="checkbox"]:checked + .check-indicator {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 1px 3px rgba(220, 38, 38, .3);
}

/* ─── Premium Radio Button ────────────────────────────────────────────── */
.form-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    user-select: none;
    padding: 4px 0;
}
.form-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.form-radio .radio-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
}
.form-radio .radio-indicator::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transform: scale(0);
    transition: all .15s cubic-bezier(.4, 0, .2, 1);
}
.form-radio:hover .radio-indicator {
    border-color: var(--accent);
    background: var(--accent-subtle);
}
.form-radio input[type="radio"]:checked + .radio-indicator {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 1px 3px rgba(7, 94, 187, .3);
}
.form-radio input[type="radio"]:checked + .radio-indicator::after {
    opacity: 1;
    transform: scale(1);
}
.form-radio input[type="radio"]:focus-visible + .radio-indicator {
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-radio input[type="radio"]:disabled + .radio-indicator {
    background: var(--bg-surface);
    border-color: var(--border-default);
    cursor: not-allowed;
    opacity: .5;
}
.form-radio .radio-label {
    font-size: .85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Radio Group — Horizontal / Vertical */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-group.radio-group-vertical { flex-direction: column; gap: 8px; }

/* ─── Premium Toggle Switch ───────────────────────────────────────────── */
.form-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    user-select: none;
    padding: 4px 0;
}
.form-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.form-switch .switch-track {
    width: 40px;
    height: 22px;
    border-radius: 12px;
    background: var(--border-strong);
    position: relative;
    flex-shrink: 0;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
}
.form-switch .switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.06);
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
}
.form-switch:hover .switch-track {
    background: var(--text-muted);
}
.form-switch input[type="checkbox"]:checked + .switch-track {
    background: var(--accent);
}
.form-switch input[type="checkbox"]:checked + .switch-track::after {
    transform: translateX(18px);
}
.form-switch input[type="checkbox"]:focus-visible + .switch-track {
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-switch input[type="checkbox"]:disabled + .switch-track {
    opacity: .4;
    cursor: not-allowed;
}
.form-switch .switch-label {
    font-size: .85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Switch variants */
.form-switch.switch-success input[type="checkbox"]:checked + .switch-track {
    background: var(--success);
}
.form-switch.switch-danger input[type="checkbox"]:checked + .switch-track {
    background: var(--danger);
}
.form-switch.switch-sm .switch-track {
    width: 34px;
    height: 18px;
    border-radius: 10px;
}
.form-switch.switch-sm .switch-track::after {
    width: 14px;
    height: 14px;
    top: 2px;
    left: 2px;
}
.form-switch.switch-sm input[type="checkbox"]:checked + .switch-track::after {
    transform: translateX(16px);
}
.form-switch.switch-lg .switch-track {
    width: 48px;
    height: 26px;
    border-radius: 14px;
}
.form-switch.switch-lg .switch-track::after {
    width: 22px;
    height: 22px;
}
.form-switch.switch-lg input[type="checkbox"]:checked + .switch-track::after {
    transform: translateX(22px);
}

/* ─── Form Input Group (with prefix/suffix icons) ─────────────────────── */
.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}
.input-group .form-control {
    flex: 1;
    min-width: 0;
}
.input-group .input-group-prefix,
.input-group .input-group-suffix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    font-size: .82rem;
    white-space: nowrap;
}
.input-group .input-group-prefix {
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.input-group .input-group-prefix + .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group .input-group-suffix {
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.input-group .form-control:has(+ .input-group-suffix) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-icon-wrapper {
    position: relative;
}
.input-icon-wrapper .form-control {
    padding-left: 38px;
}
.input-icon-wrapper .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* ─── Enhanced Button States ──────────────────────────────────────────── */
.btn { position: relative; overflow: hidden; }
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(1px); }
.btn:active::after { opacity: 0; }

/* ─── Badge Enhancements ──────────────────────────────────────────────── */
.badge-outline {
    background: transparent;
    border: 1px solid currentColor;
}
.badge-pill {
    border-radius: 100px;
    padding: 3px 12px;
}

/* ─── Enhanced Card Styles ────────────────────────────────────────────── */
.card {
    transition: box-shadow .2s ease, border-color .2s ease;
}
.card-interactive:hover {
    border-color: var(--border-accent);
    box-shadow: 0 4px 12px rgba(7, 94, 187, .08);
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header-title {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ─── Enhanced Data Table ─────────────────────────────────────────────── */
.data-table th {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.data-table td {
    font-size: .85rem;
    vertical-align: middle;
}
.data-table tbody tr {
    transition: background .15s ease;
}
.data-table tbody tr:hover {
    background: var(--accent-subtle);
}
.data-table .table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}
.table-status-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── Modal Enhancements ──────────────────────────────────────────────── */
.modal-overlay,
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--bg-modal-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    animation: fadeIn .15s ease;
}
.modal-panel,
.modal-dialog {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,.15), 0 0 0 1px rgba(0,28,57,.05);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp .2s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
}
.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.modal-header h3,
.modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.modal-close:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* (toolbar rules consolidated above — duplicate removed) */

/* ─── Dropdown Menu ───────────────────────────────────────────────────── */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 5000;
    padding: 4px;
    animation: fadeIn .1s ease;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: .85rem;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-sans);
}
.dropdown-item:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}
.dropdown-item.dropdown-item-danger:hover {
    background: var(--danger-subtle);
    color: var(--danger);
}
.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 8px;
}

/* ─── Tooltip ─────────────────────────────────────────────────────────── */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 10px;
    background: var(--brand-navy);
    color: #fff;
    font-size: .72rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    z-index: 9999;
}
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── Skeleton Loading ────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, rgba(255,255,255,.5) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card { height: 120px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ─── Status Indicator Dot (animated) ─────────────────────────────────── */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.status-dot-active {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, .4);
    animation: pulse-dot 2s infinite;
}
.status-dot-warning {
    background: var(--warning);
}
.status-dot-danger {
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, .4);
    animation: pulse-dot 2s infinite;
}
.status-dot-muted {
    background: var(--text-muted);
}
@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .4); }
    70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* ─── Progress Bar (enhanced) ─────────────────────────────────────────── */
.progress-bar {
    height: 6px;
    background: var(--bg-surface);
    border-radius: 100px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 100px;
    transition: width .4s cubic-bezier(.4, 0, .2, 1);
}
.progress-bar-success .progress-bar-fill { background: var(--success); }
.progress-bar-warning .progress-bar-fill { background: var(--warning); }
.progress-bar-danger .progress-bar-fill { background: var(--danger); }

/* ─── Chip / Tag Component ────────────────────────────────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 100px;
    font-size: .78rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
    transition: all .15s;
}
.chip-interactive { cursor: pointer; }
.chip-interactive:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}
.chip-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.chip-close {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: currentColor;
    opacity: .6;
    transition: opacity .15s;
}
.chip-close:hover { opacity: 1; }

/* ─── Avatar Enhancements ─────────────────────────────────────────────── */
.avatar-group {
    display: flex;
    flex-direction: row-reverse;
}
.avatar-group .avatar {
    margin-left: -8px;
    border: 2px solid var(--bg-card);
}
.avatar-group .avatar:last-child { margin-left: 0; }
.avatar-xs { width: 24px; height: 24px; font-size: .55rem; }
.avatar-sm { width: 28px; height: 28px; font-size: .6rem; }
.avatar-md { width: 36px; height: 36px; font-size: .7rem; }
.avatar-lg { width: 48px; height: 48px; font-size: .85rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.1rem; }

/* ─── Divider ─────────────────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: .78rem;
    margin: 16px 0;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

/* ─── Notification Badge ──────────────────────────────────────────────── */
.notification-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-topbar);
}

/* ─── Step / Wizard ───────────────────────────────────────────────────── */
.steps {
    display: flex;
    align-items: center;
    gap: 0;
    counter-reset: step;
}
.step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}
.step::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border-default);
}
.step:last-child::after { display: none; }
.step-number {
    counter-increment: step;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all .2s;
}
.step-number::before { content: counter(step); }
.step.step-active .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.step.step-active::after {
    background: var(--accent);
}
.step.step-completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.step.step-completed::after {
    background: var(--success);
}
.step-label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}
.step.step-active .step-label,
.step.step-completed .step-label {
    color: var(--text-primary);
}

/* ─── Section Header ──────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.section-subtitle {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Native Checkbox & Radio Override (global) ───────────────────────── */
input[type="checkbox"]:not(.form-check input):not(.form-switch input):not(.checklist-checkbox) {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    border-radius: 4px;
}
input[type="radio"]:not(.form-radio input) {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ─── Responsive Utilities ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .toolbar { gap: 8px; }
    .toolbar-search { max-width: 100%; }
    .modal-panel,
    .modal-dialog { width: 95%; max-height: 90vh; }
    .steps { flex-direction: column; align-items: flex-start; }
    .step::after { display: none; }
}

/* ─── Team Planner ────────────────────────────────────────────────────── */
.team-planner-controls { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; gap: 12px; flex-wrap: wrap; }
.team-planner-range { font-weight: 600; font-size: .85rem; min-width: 120px; text-align: center; }
.team-planner-legend { display: flex; gap: 12px; font-size: .75rem; color: var(--text-muted); align-items: center; }
.team-planner-legend > span { display: flex; align-items: center; gap: 4px; }

.team-planner-wrapper { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.team-planner-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.team-planner-table th,
.team-planner-table td { padding: 6px 8px; border: 1px solid var(--border-subtle); white-space: nowrap; }
.team-planner-table thead th { background: var(--bg-surface); font-weight: 600; text-align: center; position: sticky; top: 0; z-index: 2; }

.tp-name-col { text-align: left; min-width: 140px; }
.tp-sticky { position: sticky; left: 0; background: var(--bg-card); z-index: 1; }
thead .tp-sticky { z-index: 3; }

.tp-employee-name { font-weight: 500; }
.tp-skills { font-size: .7rem; color: var(--text-muted); }

.tp-week-header { min-width: 52px; text-align: center; }
.tp-week-header .tp-week-dates { font-size: .65rem; font-weight: 400; color: var(--text-muted); }
.tp-current-week { background: var(--accent-subtle) !important; }

.tp-cell-wrapper { text-align: center; padding: 4px !important; }
.tp-cell-wrapper.tp-editable { cursor: pointer; }
.tp-cell-wrapper.tp-editable:hover { background: rgba(99,102,241,.06); }
.tp-cell-wrapper.tp-locked { opacity: .7; cursor: default; }

.tp-cell { display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 3px 8px; border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600; min-width: 28px; }
.tp-cell.field { background: var(--accent-subtle); color: var(--accent); }
.tp-cell.office { background: var(--info-subtle); color: var(--info); }
.tp-cell.leave { background: var(--warning-subtle); color: var(--warning); }
.tp-cell.blank { background: rgba(148,163,184,.06); color: var(--text-muted); }
.tp-lock-icon { opacity: .6; }

/* Popover */
.tp-popover-backdrop { position: fixed; inset: 0; z-index: 100; background: transparent; }
.tp-popover { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 101; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 320px; max-width: 420px; }
.tp-popover-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.tp-popover-header .btn-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); padding: 0; line-height: 1; }
.tp-popover-body { padding: 12px 16px; }
.tp-popover-current { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .82rem; }
.tp-popover-actions { display: flex; gap: 6px; margin-bottom: 8px; }

/* Candidates */
.tp-candidates { border-top: 1px solid var(--border-subtle); padding-top: 8px; margin-top: 4px; }
.tp-candidates-header { font-size: .75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.tp-candidate-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; font-size: .8rem; transition: background .15s; }
.tp-candidate-row:hover { background: var(--accent-subtle); }
.tp-candidate-name { font-weight: 500; flex: 1; }
.tp-candidate-score { font-size: .72rem; font-weight: 600; color: var(--accent); }
.tp-candidate-reason { font-size: .7rem; }

/* Summary Row */
.tp-summary-row { background: var(--bg-surface); border-top: 2px solid var(--border); }
.tp-summary-row td { font-size: .72rem; padding: 6px 4px !important; }
.tp-summary-cell { text-align: center; vertical-align: middle; }
.tp-summary-counts { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
.tp-summary-item { font-weight: 600; font-size: .65rem; }
.tp-summary-item.field { color: var(--accent); }
.tp-summary-item.office { color: var(--info); }
.tp-summary-item.leave { color: var(--warning); }
tfoot .tp-sticky { z-index: 3; position: sticky; left: 0; background: var(--bg-surface); }

/* ═══════════════════════════════════════════════════════════════════════════
   Cyber Assessment Module
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Wizard Stepper ─────────────────────────────────────────────────── */
.wizard-stepper { display: flex; align-items: center; gap: 0; padding: 16px 24px; background: var(--bg-card); border-bottom: 1px solid var(--border-subtle); overflow-x: auto; }
.wizard-step { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 12px; border-radius: var(--radius); transition: background .15s; white-space: nowrap; flex-shrink: 0; }
.wizard-step:hover { background: var(--accent-subtle); }
.wizard-step-number { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; border: 2px solid var(--border-default); color: var(--text-muted); background: transparent; transition: all .2s; flex-shrink: 0; }
.wizard-step-label { font-size: .78rem; font-weight: 500; color: var(--text-muted); transition: color .2s; }
.wizard-step.active .wizard-step-number { border-color: var(--accent); background: var(--accent); color: #fff; }
.wizard-step.active .wizard-step-label { color: var(--text-primary); font-weight: 600; }
.wizard-step.completed .wizard-step-number { border-color: var(--success); background: var(--success); color: #fff; }
.wizard-step.completed .wizard-step-label { color: var(--success); }
.wizard-step-connector { width: 24px; height: 2px; background: var(--border-default); flex-shrink: 0; }
.wizard-step.completed + .wizard-step-connector { background: var(--success); }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-top: 1px solid var(--border-subtle); background: var(--bg-card); }

/* ─── Topology Canvas ────────────────────────────────────────────────── */
.topology-canvas { width: 100%; min-height: 500px; border: 1px solid var(--border-default); border-radius: var(--radius); background: #fafbfc; position: relative; overflow: hidden; }
.topology-canvas svg { width: 100%; height: 100%; min-height: 500px; }
.topology-toolbar { display: flex; gap: 4px; padding: 8px; background: var(--bg-card); border-bottom: 1px solid var(--border-subtle); border-radius: var(--radius) var(--radius) 0 0; }
.topology-toolbar .btn { padding: 6px 10px; font-size: .75rem; }
.device-node { cursor: grab; }
.device-node:active { cursor: grabbing; }
.device-node.selected rect, .device-node.selected circle, .device-node.selected polygon { stroke: var(--accent); stroke-width: 2.5; }

/* ─── Zone Cards ─────────────────────────────────────────────────────── */
.zone-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px; transition: box-shadow .15s, border-color .15s; }
.zone-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow); }
.zone-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.zone-card-title { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.zone-card-purdue { font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.zone-card-description { font-size: .8rem; color: var(--text-secondary); margin-bottom: 8px; }
.zone-card-meta { display: flex; gap: 12px; font-size: .75rem; color: var(--text-muted); }

/* ─── Severity Badges ────────────────────────────────────────────────── */
.severity-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.severity-badge-critical { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.severity-badge-high { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.severity-badge-medium { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.severity-badge-low { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.severity-badge-informational, .severity-badge-info { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }

/* ─── Risk Matrix ────────────────────────────────────────────────────── */
.risk-matrix { display: grid; grid-template-columns: auto repeat(5, 1fr); grid-template-rows: repeat(5, 48px) auto; gap: 2px; font-size: .72rem; }
.risk-matrix-label { display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--text-secondary); padding: 4px; }
.risk-matrix-label-y { writing-mode: vertical-lr; transform: rotate(180deg); }
.risk-cell { display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: default; position: relative; min-width: 48px; }
.risk-cell-low { background: #dcfce7; }
.risk-cell-medium { background: #fef9c3; }
.risk-cell-high { background: #fed7aa; }
.risk-cell-critical { background: #fecaca; }
.risk-cell .finding-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-primary); margin: 1px; }

/* ─── Asset Table ────────────────────────────────────────────────────── */
.asset-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.asset-table th { text-align: left; padding: 8px 12px; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border-default); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.asset-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.asset-table tr:hover td { background: var(--bg-card-hover); }
.asset-category-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; font-size: .65rem; font-weight: 700; margin-right: 6px; }
.asset-category-it { background: #dbeafe; color: #1e40af; }
.asset-category-ot { background: #fef3c7; color: #92400e; }
.asset-category-ics { background: #fce7f3; color: #9d174d; }
.asset-category-network { background: #d1fae5; color: #065f46; }
.asset-category-comm { background: #e0e7ff; color: #3730a3; }

/* ─── Finding Cards ──────────────────────────────────────────────────── */
.finding-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; transition: box-shadow .15s; }
.finding-card:hover { box-shadow: var(--shadow); }
.finding-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.finding-card-title { font-weight: 600; font-size: .88rem; }
.finding-card-body { font-size: .82rem; color: var(--text-secondary); }
.finding-card-meta { display: flex; gap: 12px; margin-top: 8px; font-size: .75rem; color: var(--text-muted); }

/* ─── CVSS Calculator ────────────────────────────────────────────────── */
.cvss-calculator { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cvss-calculator .form-group { margin-bottom: 0; }
.cvss-score-display { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-surface); border-radius: var(--radius); margin-top: 12px; }
.cvss-score-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.cvss-score-label { font-size: .78rem; color: var(--text-secondary); }

/* ─── Image Upload Zone ──────────────────────────────────────────────── */
.image-upload-zone { border: 2px dashed var(--border-default); border-radius: var(--radius); padding: 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.image-upload-zone:hover { border-color: var(--accent); background: var(--accent-subtle); }
.image-upload-zone.drag-over { border-color: var(--accent); background: var(--accent-subtle); }
.image-upload-zone-icon { font-size: 2rem; color: var(--text-muted); margin-bottom: 8px; }
.image-upload-zone-text { font-size: .82rem; color: var(--text-secondary); }
.image-thumbnail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.image-thumbnail { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; border: 1px solid var(--border-subtle); }
.image-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.image-thumbnail-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .68rem; padding: 4px 6px; }

/* ─── Purdue Level Colors ────────────────────────────────────────────── */
.purdue-level-0 { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.purdue-level-1 { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.purdue-level-2 { background: #fefce8; color: #854d0e; border-color: #fde68a; }
.purdue-level-3 { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.purdue-level-35 { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.purdue-level-4 { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.purdue-level-5 { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }

/* ─── Assessment Cards ───────────────────────────────────────────────── */
.assessment-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .1s; }
.assessment-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.assessment-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.assessment-card-title { font-weight: 600; font-size: .95rem; color: var(--text-primary); }
.assessment-card-status { font-size: .7rem; font-weight: 600; padding: 2px 10px; border-radius: 10px; text-transform: uppercase; }
.assessment-card-status.draft { background: #f3f4f6; color: #6b7280; }
.assessment-card-status.in-progress { background: #dbeafe; color: #1d4ed8; }
.assessment-card-status.under-review { background: #fef3c7; color: #d97706; }
.assessment-card-status.completed { background: #dcfce7; color: #16a34a; }
.assessment-card-status.archived { background: #f3f4f6; color: #9ca3af; }
.assessment-card-body { font-size: .82rem; color: var(--text-secondary); }
.assessment-card-meta { display: flex; gap: 16px; margin-top: 12px; font-size: .75rem; color: var(--text-muted); }
.assessment-card-meta span { display: flex; align-items: center; gap: 4px; }

/* ─── Cyber Assessment Layout ────────────────────────────────────────── */
.cyber-step-content { padding: 24px; }
.cyber-step-content .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cyber-step-content .section-title { font-size: .88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }
.compliance-checkboxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.compliance-checkboxes label { display: flex; align-items: center; gap: 8px; font-size: .82rem; cursor: pointer; padding: 6px 8px; border-radius: var(--radius-sm); transition: background .15s; }
.compliance-checkboxes label:hover { background: var(--accent-subtle); }

/* ─── Enterprise Planning: Drag & Drop ────────────────────────────────── */
.tp-draggable { cursor: grab; }
.tp-draggable:active { cursor: grabbing; }
.tp-drag-over { outline: 2px dashed var(--accent) !important; outline-offset: -2px; background: var(--accent-subtle) !important; }
.tp-cell-wrapper[draggable="true"] { transition: opacity .15s; }
.tp-cell-wrapper[draggable="true"]:active { opacity: 0.5; }

/* ─── Enterprise Planning: Fairness Bars ─────────────────────────────── */
.fairness-bar { display: flex; height: 20px; border-radius: var(--radius-sm); overflow: hidden; min-width: 120px; background: var(--bg-secondary); }
.fairness-bar-field { background: var(--accent); transition: width .3s ease; }
.fairness-bar-office { background: var(--success); transition: width .3s ease; }
.fairness-bar-leave { background: var(--warning); transition: width .3s ease; }

/* ─── Enterprise Planning: Week Badges ───────────────────────────────── */
.week-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: .75rem; font-weight: 600; }
.week-badge.week-field { background: var(--accent-subtle); color: var(--accent); }
.week-badge.week-office { background: var(--success-subtle, #e6f9e6); color: var(--success); }
.week-badge.week-leave { background: var(--warning-subtle, #fff8e6); color: var(--warning); }
.week-badge.week-blank { background: var(--bg-secondary); color: var(--text-muted); }

/* ─── Enterprise Planning: My Schedule Grid ──────────────────────────── */
.my-schedule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; padding: 16px; }
.my-schedule-week { padding: 12px 8px; border-radius: var(--radius-sm); text-align: center; border: 1px solid var(--border); transition: transform .15s; }
.my-schedule-week:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.my-schedule-week.field { background: var(--accent-subtle); border-color: var(--accent); }
.my-schedule-week.office { background: var(--success-subtle, #e6f9e6); border-color: var(--success); }
.my-schedule-week.leave { background: var(--warning-subtle, #fff8e6); border-color: var(--warning); }
.my-schedule-week.blank { background: var(--bg-secondary); }
.my-schedule-week-num { font-size: .75rem; font-weight: 700; color: var(--text-secondary); }
.my-schedule-week-type { font-size: .85rem; font-weight: 600; margin-top: 4px; }
.my-schedule-week-status { font-size: .65rem; margin-top: 2px; }

/* ─── Enterprise Planning: Button Icon ───────────────────────────────── */
.btn-icon { background: none; border: none; cursor: pointer; padding: 2px; color: var(--text-muted); opacity: 0.6; transition: opacity .15s; }
.btn-icon:hover { opacity: 1; color: var(--accent); }
.btn-icon-xs { width: 18px; height: 18px; vertical-align: middle; margin-left: 4px; }

/* ─── Enterprise Planning: Alert Styles ──────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .85rem; }
.alert-success { background: var(--success-subtle, #e6f9e6); color: var(--success); border: 1px solid var(--success); }
.alert-warning { background: var(--warning-subtle, #fff8e6); color: var(--warning); border: 1px solid var(--warning); }

/* ─── Notification Bell ──────────────────────────────────────────────── */
.notification-bell-container { position: relative; }
.notification-bell-btn { position: relative; }
.notification-badge {
    position: absolute; top: 0; right: 0;
    min-width: 18px; height: 18px;
    background: var(--danger); color: #fff;
    font-size: .62rem; font-weight: 700;
    border-radius: 9px; padding: 0 5px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-topbar);
    pointer-events: none;
    line-height: 1;
    animation: badgePop .3s cubic-bezier(.4,0,.2,1);
}
@keyframes badgePop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.bell-ring { animation: bellRing .8s cubic-bezier(.4,0,.2,1); }
@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    15%, 45% { transform: rotate(14deg); }
    30%, 60% { transform: rotate(-14deg); }
    75% { transform: rotate(6deg); }
}

/* ─── Notification Dropdown ─────────────────────────────────────────── */
.notification-dropdown {
    position: absolute; top: calc(100% + 10px); right: -8px;
    width: 400px; max-height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0,28,57,.16), 0 0 0 1px rgba(0,28,57,.03);
    z-index: 1000;
    display: flex; flex-direction: column; overflow: hidden;
    animation: dropdownSlide .2s cubic-bezier(.4,0,.2,1);
}
@keyframes dropdownSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.notification-dropdown-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-subtle);
}
.notification-dropdown-title { font-weight: 700; font-size: .92rem; color: var(--text-primary); letter-spacing: -.01em; }
.notification-dropdown-list {
    max-height: 340px; overflow-y: auto;
    display: flex; flex-direction: column;
    scrollbar-width: thin; scrollbar-color: var(--border-default) transparent;
}
.notification-dropdown-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 40px 20px; color: var(--text-muted); font-size: .85rem;
}
.notification-dropdown-empty svg { opacity: .35; }
.notification-dropdown-item {
    display: flex; gap: 0; padding: 14px 20px; cursor: pointer;
    transition: background .15s, box-shadow .15s; position: relative;
    border-bottom: 1px solid var(--border-subtle);
}
.notification-dropdown-item:last-child { border-bottom: none; }
.notification-dropdown-item:hover { background: var(--bg-surface); }
.notification-dropdown-item.unread { background: var(--accent-subtle); }
.notification-dropdown-item.unread:hover { background: rgba(7,94,187,.1); }
.notification-priority-bar {
    width: 3px; flex-shrink: 0; border-radius: 2px; margin-right: 14px;
    align-self: stretch;
}
.notification-priority-bar.priority-normal { background: var(--border-strong); }
.notification-priority-bar.priority-important { background: var(--warning); }
.notification-priority-bar.priority-urgent { background: var(--danger); }
.notification-dropdown-item-content { flex: 1; min-width: 0; }
.notification-dropdown-item-title {
    font-size: .85rem; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notification-dropdown-item:not(.unread) .notification-dropdown-item-title { font-weight: 450; }
.notification-dropdown-item-message {
    font-size: .78rem; color: var(--text-secondary); margin-top: 3px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notification-dropdown-item-time { font-size: .68rem; color: var(--text-muted); margin-top: 5px; font-weight: 500; }
.notification-dropdown-footer {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 13px 20px; border-top: 1px solid var(--border-subtle);
    font-size: .8rem; font-weight: 600; color: var(--accent);
    text-decoration: none; transition: all .15s;
    background: var(--bg-surface);
}
.notification-dropdown-footer:hover { background: var(--accent-subtle); color: var(--accent-hover); }

/* ─── Notification Page ─────────────────────────────────────────────── */
.notification-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px; margin-bottom: 20px;
}
.notification-stat {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    transition: border-color .2s, box-shadow .2s;
    position: relative; overflow: hidden;
}
.notification-stat::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--brand-gradient); opacity: 0; transition: opacity .2s;
}
.notification-stat:hover { border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.notification-stat:hover::before { opacity: 1; }
.notification-stat-icon {
    width: 36px; height: 36px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.notification-stat-icon.accent { background: var(--accent-subtle); color: var(--accent); }
.notification-stat-icon.warning { background: var(--warning-subtle); color: var(--warning); }
.notification-stat-icon.danger { background: var(--danger-subtle); color: var(--danger); }
.notification-stat-icon.info { background: var(--info-subtle); color: var(--info); }
.notification-stat-label { font-size: .68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.notification-stat-value { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); letter-spacing: -.02em; margin-top: 1px; }

.notification-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.notification-filter-pills {
    display: flex; gap: 4px; padding: 3px;
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.notification-filter-pill {
    padding: 5px 14px; border-radius: var(--radius-sm); border: none;
    background: transparent; color: var(--text-secondary);
    font-size: .8rem; font-weight: 500; cursor: pointer;
    transition: all .15s ease;
}
.notification-filter-pill:hover { color: var(--text-primary); background: rgba(0,0,0,.03); }
.notification-filter-pill.active {
    background: var(--bg-card); color: var(--accent);
    box-shadow: var(--shadow-sm); font-weight: 600;
}

.notification-list {
    display: flex; flex-direction: column;
}
.notification-card {
    display: flex; align-items: stretch; gap: 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: all .15s ease; position: relative;
}
.notification-card:last-child { border-bottom: none; }
.notification-card:hover { background: var(--bg-card-hover); box-shadow: inset 3px 0 0 var(--accent); }
.notification-card.unread { background: var(--accent-subtle); }
.notification-card.unread:hover { background: rgba(7,94,187,.1); box-shadow: inset 3px 0 0 var(--accent); }
.notification-card-priority {
    width: 3px; flex-shrink: 0;
}
.notification-card-priority.priority-normal { background: var(--border-strong); }
.notification-card-priority.priority-important { background: var(--warning); }
.notification-card-priority.priority-urgent { background: var(--danger); }
.notification-card-body {
    flex: 1; min-width: 0; padding: 16px 20px;
}
.notification-card-header {
    display: flex; align-items: center; gap: 10px;
}
.notification-card-title {
    font-size: .88rem; color: var(--text-primary); flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: -.01em;
}
.notification-card.unread .notification-card-title { font-weight: 600; }
.notification-card.read .notification-card-title { font-weight: 450; color: var(--text-secondary); }
.notification-category-badge {
    display: inline-flex; align-items: center; gap: 0;
    font-size: .62rem; font-weight: 600; padding: 2px 8px;
    border-radius: 100px; white-space: nowrap;
    text-transform: uppercase; letter-spacing: .04em;
}
.cat-system { background: rgba(148,163,184,.1); color: var(--text-muted); }
.cat-planning { background: var(--accent-subtle); color: var(--accent); }
.cat-cyberassessment { background: rgba(190,24,93,.08); color: #be185d; }
.cat-hr { background: var(--success-subtle); color: var(--success); }
.cat-projecthub { background: rgba(109,40,217,.08); color: #6d28d9; }
.notification-card-message {
    font-size: .82rem; color: var(--text-secondary); margin-top: 6px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notification-card-meta {
    display: flex; align-items: center; gap: 12px; margin-top: 8px;
    font-size: .72rem; color: var(--text-muted); font-weight: 500;
}
.notification-card-meta svg { opacity: .5; }
.notification-card-sender { display: flex; align-items: center; gap: 4px; }
.notification-card-actions {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; padding: 8px 14px;
    opacity: 0; transition: opacity .2s ease;
}
.notification-card:hover .notification-card-actions { opacity: 1; }
.btn-icon {
    width: 30px; height: 30px; border-radius: var(--radius-sm); border: none; background: transparent;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.btn-icon:hover { background: var(--accent-subtle); color: var(--accent); }
.btn-icon-danger:hover { background: var(--danger-subtle); color: var(--danger); }

.notification-pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.pagination-btns { display: flex; gap: 6px; }

/* ─── Admin Notification Centre ─────────────────────────────────────── */
.priority-selector { display: flex; gap: 8px; }
.priority-option {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-card); color: var(--text-secondary);
    font-size: .82rem; font-weight: 500; cursor: pointer;
    transition: all .2s cubic-bezier(.4,0,.2,1);
}
.priority-option:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.priority-option.active {
    border-color: var(--accent); background: var(--accent-subtle);
    color: var(--accent); font-weight: 600;
    box-shadow: 0 0 0 3px rgba(7,94,187,.06);
}
.priority-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(0,0,0,.05);
}

.priority-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .68rem; font-weight: 600; padding: 2px 10px;
    border-radius: 100px;
}
.priority-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }
.priority-badge.priority-normal { background: rgba(148,163,184,.1); color: var(--text-muted); }
.priority-badge.priority-normal::before { background: var(--border-strong); }
.priority-badge.priority-important { background: var(--warning-subtle); color: var(--warning); }
.priority-badge.priority-important::before { background: var(--warning); }
.priority-badge.priority-urgent { background: var(--danger-subtle); color: var(--danger); }
.priority-badge.priority-urgent::before { background: var(--danger); }

.recipient-selector { display: flex; gap: 10px; flex-wrap: wrap; }
.recipient-option {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    background: var(--bg-card); cursor: pointer;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    flex: 1; min-width: 170px;
    position: relative; overflow: hidden;
}
.recipient-option::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--brand-gradient); opacity: 0; transition: opacity .2s;
}
.recipient-option:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.recipient-option:hover::before { opacity: .5; }
.recipient-option.active {
    border-color: var(--accent); background: var(--accent-subtle);
    box-shadow: 0 0 0 3px rgba(7,94,187,.06);
}
.recipient-option.active::before { opacity: 1; }
.recipient-option svg { color: var(--text-muted); flex-shrink: 0; transition: color .15s; }
.recipient-option:hover svg { color: var(--text-secondary); }
.recipient-option.active svg { color: var(--accent); }

.user-picker-list {
    max-height: 220px; overflow-y: auto;
    border: 1px solid var(--border-default); border-radius: var(--radius-md);
    padding: 4px; background: var(--bg-card);
    scrollbar-width: thin; scrollbar-color: var(--border-default) transparent;
}
.user-picker-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer;
    transition: background .1s; font-size: .85rem;
}
.user-picker-item:hover { background: var(--bg-surface); }
.user-picker-item input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.user-picker-name { flex: 1; color: var(--text-primary); font-weight: 450; }
.user-picker-role {
    font-size: .65rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .5px;
    padding: 1px 6px; background: var(--bg-surface); border-radius: 100px;
}

.compose-card-icon {
    width: 36px; height: 36px; border-radius: var(--radius-md);
    background: var(--accent-subtle); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.confirm-banner {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: var(--warning-subtle); border: 1px solid rgba(217,119,6,.2);
    border-radius: var(--radius-md);
    animation: slideUp .2s ease;
}
.confirm-banner-icon {
    width: 36px; height: 36px; border-radius: var(--radius-md);
    background: rgba(217,119,6,.12); color: var(--warning);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.spinner-sm {
    width: 16px; height: 16px; border: 2px solid var(--border-default);
    border-top-color: var(--brand-cyan); border-radius: 50%;
    animation: spin .6s linear infinite; display: inline-block;
}

/* ─── Print Styles ────────────────────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .btn, .modal-overlay, .modal-backdrop { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
