/* ============================================================
   PMS — Premium 2026 SaaS design system (Bootstrap 5 base)
   Inspired by Linear / Stripe / Vercel / Untitled UI.
   Token names kept stable (--g-*) so existing views inherit.
   ============================================================ */

:root {
    /* ---- Brand (Humn emerald) ---- */
    --g-primary:        #0d7a4f;
    --g-primary-rgb:    13,122,79;
    --g-primary-dark:   #0a6341;
    --g-primary-soft:   #e7f5ee;
    --g-primary-border: #bfe3d1;

    /* ---- Status ---- */
    --g-success:        #067647;
    --g-danger:         #b42318;
    --g-warning:        #b54708;
    --g-info:           #0e7490;

    /* ---- Neutrals / surfaces (mint-tinted) ---- */
    --g-bg:             #f1f8f4;
    --g-surface:        #ffffff;
    --g-surface-2:      #f5faf7;
    --g-border:         #dbe8e1;
    --g-border-soft:    #e9f2ec;
    --g-border-strong:  #caded4;
    --g-text:           #10241c;
    --g-text-2:         #3a544a;
    --g-text-muted:     #5f7f74;

    /* ---- Radius ---- */
    --g-radius:         14px;
    --g-radius-sm:      10px;
    --g-radius-btn:     9px;
    --g-radius-pill:    999px;

    /* ---- Shadows (soft, layered) ---- */
    --g-shadow-xs:      0 1px 2px rgba(16,24,40,.05);
    --g-shadow-1:       0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
    --g-shadow-2:       0 12px 28px -8px rgba(16,24,40,.16), 0 4px 10px -4px rgba(16,24,40,.06);
    --g-shadow-pop:     0 16px 40px -12px rgba(16,24,40,.22);
    --g-ring:           0 0 0 4px rgba(var(--g-primary-rgb), .14);

    /* ---- Spacing scale (4px base) ---- */
    --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
    --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;

    /* ---- Nav metrics ---- */
    --g-nav-h:          58px;
    --g-subnav-h:       46px;

    /* ---- Bootstrap overrides ---- */
    --bs-primary:       #0d7a4f;
    --bs-primary-rgb:   37,99,235;
    --bs-body-bg:       var(--g-bg);
    --bs-body-color:    var(--g-text);
    --bs-border-color:  var(--g-border);
    --bs-link-color:    var(--g-primary);
    --bs-link-hover-color: var(--g-primary-dark);
    --bs-border-radius: var(--g-radius-sm);
    --bs-font-sans-serif: 'Hanken Grotesk','Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    --bs-body-font-size: .875rem;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    background: var(--g-bg);
    color: var(--g-text);
    font-family: var(--bs-font-sans-serif);
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: -0.005em;
    padding-top: var(--g-nav-h);
}

h1,h2,h3,h4,h5,h6 { letter-spacing: -0.02em; font-weight: 600; color: var(--g-text); }
.text-muted { color: var(--g-text-muted) !important; }
a { text-underline-offset: 2px; }

/* numerals align in data-heavy UI */
.table, .stat-val, .chip, .badge, .cal-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============================================================
   TOP NAVIGATION — glassy, premium, 2-layer
   ============================================================ */
.app-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.app-nav.is-hidden { transform: translateY(calc(-1 * var(--g-subnav-h))); }
.app-nav--single.is-hidden { transform: none; } /* single-row nav stays put */

.app-nav__primary {
    height: var(--g-nav-h);
    background: rgba(255,255,255,.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--g-border-soft);
    display: flex; align-items: center;
    padding: 0 22px; gap: 8px;
}
.app-nav__brand {
    font-size: 16px; font-weight: 700; color: var(--g-text);
    text-decoration: none; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px;
    padding-right: 8px; margin-right: 6px;
}
.app-nav__brand .logo-dot {
    width: 30px; height: 30px; border-radius: 9px;
    background: var(--g-primary);
    box-shadow: 0 2px 6px rgba(var(--g-primary-rgb), .35), inset 0 1px 0 rgba(255,255,255,.25);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px;
}

/* keep brand + actions fixed; module row must NOT use overflow (it would clip
   the dropdown menus). It stays a plain flex row; items go icon-only on
   narrower screens (media query below) so all modules fit without clipping. */
.app-nav__brand { flex-shrink: 0; }
.app-nav__actions { flex-shrink: 0; }
.app-nav__modules { flex-wrap: nowrap; }

/* Layer-1 module links — centered pills */
.app-nav__primary nav { gap: 2px; }
.app-nav__primary .app-nav__link {
    height: 36px !important; padding: 0 12px; border-radius: var(--g-radius-btn);
    color: var(--g-text-2); font-weight: 500; font-size: 13.5px;
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    border: 0 !important; transition: background .14s, color .14s;
}
.app-nav__primary .app-nav__link i { font-size: 16px; opacity: .85; }
.app-nav__primary .app-nav__link:hover { background: var(--g-border-soft); color: var(--g-text); }
.app-nav__primary .app-nav__link.active { background: var(--g-primary-soft); color: var(--g-primary-dark); }
.app-nav__primary .app-nav__link.active i { opacity: 1; }

/* Module dropdowns (single-row nav) */
.app-nav__modules .dropdown-toggle::after {
    margin-left: 5px; border: 0; content: '\F282'; font-family: 'bootstrap-icons';
    font-size: 9px; vertical-align: 0; opacity: .55; transition: transform .15s;
}
.app-nav__modules .dropdown-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.app-nav__dropdown { margin-top: 8px !important; min-width: 230px; }
.app-nav__dropdown .dropdown-header {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
    color: var(--g-text-muted); padding: 6px 12px 4px;
}
.app-nav__dropdown .dropdown-item { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 13.5px; color: var(--g-text-2); }
.app-nav__dropdown .dropdown-item i { font-size: 16px; color: var(--g-text-muted); width: 18px; text-align: center; }
.app-nav__dropdown .dropdown-item:hover { background: var(--g-border-soft); color: var(--g-text); }
.app-nav__dropdown .dropdown-item.active { background: var(--g-primary-soft); color: var(--g-primary-dark); }
.app-nav__dropdown .dropdown-item.active i { color: var(--g-primary); }

/* Search — primary, prominent */
.app-nav__search { flex: 1; max-width: 460px; margin: 0 4px; }
.app-nav__search .form-control {
    background: var(--g-bg); border: 1px solid var(--g-border);
    border-radius: var(--g-radius-btn); padding: 8px 14px; height: 38px; font-size: 13.5px;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.app-nav__search .form-control:focus {
    background: var(--g-surface); border-color: var(--g-primary); box-shadow: var(--g-ring);
}
.app-nav__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

/* Layer-2 sub-nav */
.app-nav__secondary {
    height: var(--g-subnav-h);
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--g-border);
    display: flex; align-items: center;
    padding: 0 18px; gap: 2px; overflow-x: auto;
}
.app-nav__secondary::-webkit-scrollbar { height: 0; }
.app-nav__secondary .app-nav__link {
    color: var(--g-text-muted); text-decoration: none;
    padding: 0 12px; height: var(--g-subnav-h); display: inline-flex; align-items: center; gap: 7px;
    font-weight: 500; font-size: 13px; white-space: nowrap; position: relative;
    border-bottom: 2px solid transparent; transition: color .15s;
}
.app-nav__secondary .app-nav__link:hover { color: var(--g-text); }
.app-nav__secondary .app-nav__link.active { color: var(--g-primary); border-bottom-color: var(--g-primary); }
.app-nav__secondary .app-nav__link i { font-size: 15px; }

/* Icon buttons + avatar */
.icon-btn {
    width: 38px; height: 38px; border-radius: var(--g-radius-btn); border: 0; background: transparent;
    color: var(--g-text-muted); display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; position: relative; transition: background .14s, color .14s;
}
.icon-btn:hover { background: var(--g-border-soft); color: var(--g-text); }
.icon-btn .badge {
    position: absolute; top: 3px; right: 3px; font-size: 9.5px; padding: 2px 5px; min-width: 16px;
    border: 2px solid var(--g-surface);
}
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(180deg, #34d399, var(--g-primary));
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 13px; text-transform: uppercase; box-shadow: var(--g-shadow-xs);
}

/* ============================================================
   PAGE SHELL
   ============================================================ */
.page { padding: 22px 28px 64px; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.page-title { font-size: 21px; font-weight: 650; margin: 0; letter-spacing: -.025em; }
.page-head .spacer { flex: 1; }

.breadcrumb { --bs-breadcrumb-divider: '/'; font-size: 12.5px; margin: 0 0 12px; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--g-border-strong); }
.breadcrumb a { color: var(--g-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--g-primary); }
.breadcrumb .active { color: var(--g-text-2); font-weight: 500; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    box-shadow: var(--g-shadow-xs);
    background: var(--g-surface);
    transition: box-shadow .18s, border-color .18s;
}
.card-header {
    background: transparent; border-bottom: 1px solid var(--g-border-soft);
    font-weight: 600; font-size: 14px; padding: 16px 20px; letter-spacing: -.01em;
}
.card-body { padding: 20px; }

/* KPI / stat cards */
.stat-card { padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
a:hover > .stat-card { box-shadow: var(--g-shadow-1); border-color: var(--g-border-strong); }
.stat-card .stat-ico {
    width: 44px; height: 44px; border-radius: 11px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 21px;
    background: var(--g-primary-soft); color: var(--g-primary); flex-shrink: 0;
}
.stat-card .stat-val { font-size: 25px; font-weight: 680; line-height: 1.1; letter-spacing: -.02em; }
.stat-card .stat-lbl { color: var(--g-text-muted); font-size: 12.5px; margin-top: 3px; font-weight: 500; }

/* ============================================================
   BUTTONS — crisp enterprise (not pills)
   ============================================================ */
.btn {
    border-radius: var(--g-radius-btn); font-weight: 550; font-size: 13.5px;
    padding: 8px 15px; letter-spacing: -.01em;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .14s, border-color .14s, box-shadow .14s, transform .04s;
}
.btn:active { transform: translateY(.5px); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.btn-primary { background: var(--g-primary); border-color: var(--g-primary); box-shadow: var(--g-shadow-xs); }
.btn-primary:hover, .btn-primary:focus { background: var(--g-primary-dark); border-color: var(--g-primary-dark); }
.btn-light {
    background: var(--g-surface); border: 1px solid var(--g-border); color: var(--g-text-2);
    box-shadow: var(--g-shadow-xs);
}
.btn-light:hover { background: var(--g-surface-2); border-color: var(--g-border-strong); color: var(--g-text); }
.btn-danger { background: #d92d20; border-color: #d92d20; }
.btn-icon { border-radius: var(--g-radius-btn); width: 34px; height: 34px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }

/* ============================================================
   TABLES — enterprise data grid w/ sticky header
   ============================================================ */
.table-card {
    background: var(--g-surface); border: 1px solid var(--g-border);
    border-radius: var(--g-radius); overflow: hidden; box-shadow: var(--g-shadow-xs);
}
.table-card .table-responsive { max-height: calc(100vh - 320px); }
.table { margin: 0; --bs-table-bg: transparent; }
.table > thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--g-surface-2); color: var(--g-text-muted);
    font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 1px solid var(--g-border); padding: 11px 18px; white-space: nowrap;
}
.table > tbody td { padding: 13px 18px; vertical-align: middle; border-bottom: 1px solid var(--g-border-soft); font-size: 13.5px; }
.table > tbody tr { transition: background .12s; }
.table > tbody tr:hover { background: var(--g-surface-2); }
.table > tbody tr:last-child td { border-bottom: 0; }
.table a.fw-semibold { color: var(--g-text); }
.table a.fw-semibold:hover { color: var(--g-primary); }

/* ============================================================
   FORMS — compact + clean
   ============================================================ */
.form-label { font-weight: 500; font-size: 12.5px; color: var(--g-text-2); margin-bottom: 5px; }
.form-control, .form-select {
    border: 1px solid var(--g-border); border-radius: var(--g-radius-sm);
    padding: 8px 12px; font-size: 13.5px; color: var(--g-text); background: var(--g-surface);
    transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #98a2b3; }
.form-control:focus, .form-select:focus { border-color: var(--g-primary); box-shadow: var(--g-ring); }
.form-control:hover:not(:focus), .form-select:hover:not(:focus) { border-color: var(--g-border-strong); }

/* ============================================================
   BADGES / CHIPS — soft, Untitled-UI style
   ============================================================ */
.badge { font-weight: 600; padding: 4px 9px; border-radius: var(--g-radius-pill); font-size: 11px; }
.chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 8px;
    border-radius: var(--g-radius-pill); font-size: 11.5px; font-weight: 550; line-height: 1.4;
    background: var(--g-border-soft); color: var(--g-text-2); border: 1px solid transparent;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip-success { background: #ecfdf3; color: var(--g-success); }
.chip-danger  { background: #fef3f2; color: var(--g-danger); }
.chip-warning { background: #fffaeb; color: var(--g-warning); }
.chip-info    { background: var(--g-primary-soft); color: var(--g-info); }
.chip-muted   { background: #f2f4f7; color: var(--g-text-2); }

/* ============================================================
   TABS
   ============================================================ */
.nav-tabs { border-bottom: 1px solid var(--g-border); gap: 2px; }
.nav-tabs .nav-link {
    border: 0; border-bottom: 2px solid transparent; border-radius: 0;
    color: var(--g-text-muted); font-weight: 550; font-size: 13.5px; padding: 10px 14px;
}
.nav-tabs .nav-link:hover { color: var(--g-text); border-color: transparent; background: transparent; }
.nav-tabs .nav-link.active { color: var(--g-primary); border-bottom-color: var(--g-primary); background: transparent; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-content { border: 1px solid var(--g-border); border-radius: var(--g-radius); box-shadow: var(--g-shadow-pop); }
.modal-header { border-bottom: 1px solid var(--g-border-soft); padding: 18px 22px; }
.modal-title { font-weight: 650; font-size: 16px; letter-spacing: -.02em; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--g-border-soft); padding: 14px 22px; }
.modal-backdrop.show { opacity: .35; }

/* Dropdowns */
.dropdown-menu { border: 1px solid var(--g-border); border-radius: var(--g-radius-sm); box-shadow: var(--g-shadow-2); padding: 6px; font-size: 13.5px; }
.dropdown-item { border-radius: 7px; padding: 7px 10px; }
.dropdown-item:hover { background: var(--g-border-soft); }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; }
.app-toast {
    background: #11161d; color: #fff; border-radius: var(--g-radius-sm);
    padding: 13px 16px; box-shadow: var(--g-shadow-pop); display: flex; align-items: center; gap: 10px;
    min-width: 290px; max-width: 420px; font-size: 13.5px; font-weight: 500; animation: toastIn .26s cubic-bezier(.4,0,.2,1);
}
.app-toast.success { background: #05603a; }
.app-toast.error   { background: #912018; }
.app-toast .btn-close { filter: invert(1); opacity: .7; margin-left: auto; font-size: 10px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--g-text-muted); }
.empty-state i { font-size: 40px; opacity: .35; display: block; margin-bottom: 14px; color: var(--g-text-2); }

/* ============================================================
   FILTER BAR — compact, search-led
   ============================================================ */
.filter-bar {
    background: var(--g-surface); border: 1px solid var(--g-border); border-radius: var(--g-radius);
    padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--g-shadow-xs);
}
.filter-bar .form-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--g-text-muted); margin-bottom: 4px; }
.filter-bar .form-control, .filter-bar .form-select { height: 38px; }

/* Pagination */
.pagination { --bs-pagination-color: var(--g-text-2); --bs-pagination-border-color: var(--g-border);
    --bs-pagination-hover-bg: var(--g-surface-2); --bs-pagination-hover-border-color: var(--g-border-strong);
    --bs-pagination-active-bg: var(--g-primary); --bs-pagination-active-border-color: var(--g-primary);
    --bs-pagination-border-radius: var(--g-radius-btn); gap: 4px; }
.page-link { border-radius: var(--g-radius-btn) !important; font-size: 13px; }

/* Progress */
.progress { background: var(--g-border-soft); border-radius: var(--g-radius-pill); }
.progress-bar { background: var(--g-primary); border-radius: var(--g-radius-pill); }

/* ============================================================
   AUTH
   ============================================================ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 50% -10%, #eef3ff 0%, var(--g-bg) 55%); }
.auth-card { width: 100%; max-width: 410px; background: var(--g-surface); border: 1px solid var(--g-border);
    border-radius: 18px; box-shadow: var(--g-shadow-2); padding: 38px 34px; }

/* HTMX loading */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 8px; border: 3px solid var(--g-bg); }
::-webkit-scrollbar-thumb:hover { background: #b9c0cc; }

/* ============================================================
   CHAT
   ============================================================ */
.chat-wrap { display: flex; height: calc(100vh - var(--g-nav-h) - var(--g-subnav-h) - 96px); min-height: 460px;
    background: var(--g-surface); border: 1px solid var(--g-border); border-radius: var(--g-radius); overflow: hidden; box-shadow: var(--g-shadow-xs); }
.chat-list { width: 320px; border-right: 1px solid var(--g-border); display: flex; flex-direction: column; }
.chat-list__head { padding: 14px 16px; border-bottom: 1px solid var(--g-border-soft); display: flex; gap: 8px; align-items: center; }
.chat-list__items { overflow-y: auto; flex: 1; }
.chat-conv { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--g-border-soft); text-decoration: none; color: inherit; }
.chat-conv:hover { background: var(--g-surface-2); }
.chat-conv.active { background: var(--g-primary-soft); }
.chat-conv__name { font-weight: 600; font-size: 14px; }
.chat-conv__last { color: var(--g-text-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-main__head { padding: 14px 18px; border-bottom: 1px solid var(--g-border); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; background: var(--g-bg); display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 72%; padding: 9px 14px; border-radius: 14px; background: var(--g-surface); box-shadow: var(--g-shadow-xs); border: 1px solid var(--g-border-soft); font-size: 13.5px; }
.chat-msg__meta { font-size: 11px; color: var(--g-text-muted); margin-bottom: 2px; }
.chat-msg.me { align-self: flex-end; background: var(--g-primary); color: #fff; border-color: transparent; }
.chat-msg.me .chat-msg__meta { color: rgba(255,255,255,.8); }
.chat-msg__time { font-size: 10px; opacity: .7; margin-left: 6px; }
.chat-composer { padding: 12px 16px; border-top: 1px solid var(--g-border); display: flex; gap: 10px; background: var(--g-surface); }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--g-text-muted); }
.chat-empty i { font-size: 50px; opacity: .35; margin-bottom: 10px; }

/* Tom Select alignment with our inputs */
.ts-control { border-radius: var(--g-radius-sm) !important; border-color: var(--g-border) !important; min-height: 38px; padding: 5px 12px !important; box-shadow: none !important; }
.ts-control.focus { border-color: var(--g-primary) !important; box-shadow: var(--g-ring) !important; }
.ts-dropdown { border-radius: var(--g-radius-sm); border-color: var(--g-border); box-shadow: var(--g-shadow-2); }

/* ============================================================
   SPA LAYER — progress bar, transitions, skeletons, command palette
   ============================================================ */
.spa-progress {
    position: fixed; top: 0; left: 0; height: 2.5px; width: 0; z-index: 2000;
    background: linear-gradient(90deg, var(--g-primary), #a3e635);
    box-shadow: 0 0 8px rgba(var(--g-primary-rgb), .6); opacity: 0;
    transition: width .18s ease, opacity .3s ease; border-radius: 0 2px 2px 0;
}
#spa-content { transition: opacity .16s ease; }
#spa-content.spa-leaving { opacity: .45; pointer-events: none; }
#spa-content.spa-enter { animation: spaIn .32s cubic-bezier(.22,1,.36,1); }
@keyframes spaIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.skeleton { position: relative; overflow: hidden; background: #eef0f3; border-radius: 8px; }
.skeleton::after { content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
    transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-line { height: 12px; margin: 8px 0; }

.cmdk { position: fixed; inset: 0; z-index: 2100; display: none; }
.cmdk.open { display: block; }
.cmdk__backdrop { position: absolute; inset: 0; background: rgba(16,24,40,.45); backdrop-filter: blur(2px); animation: fadeIn .15s ease; }
.cmdk__panel {
    position: relative; max-width: 600px; margin: 11vh auto 0; background: var(--g-surface);
    border: 1px solid var(--g-border); border-radius: 16px; box-shadow: var(--g-shadow-pop);
    overflow: hidden; animation: cmdkIn .18s cubic-bezier(.22,1,.36,1);
}
@keyframes cmdkIn { from { opacity: 0; transform: translateY(-10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.cmdk__search { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--g-border-soft); }
.cmdk__search i { color: var(--g-text-muted); font-size: 18px; }
.cmdk__search input { flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; color: var(--g-text); }
.cmdk__search kbd, .cmdk__foot kbd { background: var(--g-border-soft); border: 1px solid var(--g-border); border-bottom-width: 2px;
    border-radius: 5px; padding: 1px 6px; font-size: 11px; color: var(--g-text-2); font-family: inherit; }
.cmdk__list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk__group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--g-text-muted); padding: 10px 10px 4px; }
.cmdk__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--g-text); cursor: pointer; }
.cmdk__item i { color: var(--g-text-muted); font-size: 16px; width: 18px; text-align: center; }
.cmdk__item.active { background: var(--g-primary-soft); }
.cmdk__item.active i { color: var(--g-primary); }
.cmdk__label { font-size: 14px; font-weight: 500; }
.cmdk__sub { margin-left: auto; font-size: 12px; color: var(--g-text-muted); }
.cmdk__empty { padding: 32px; text-align: center; color: var(--g-text-muted); font-size: 14px; }
.cmdk__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--g-border-soft); font-size: 12px; color: var(--g-text-muted); }
.cmdk__foot kbd { margin-right: 3px; }

/* ---- Access shuttle (dual-pane roles/permissions assignment) ---- */
.shuttle-list { min-height: 320px; max-height: 460px; overflow-y: auto; border: 1px solid var(--g-border-soft); border-radius: 8px; background: var(--g-surface); }
.sh-item { padding: 7px 10px; border-bottom: 1px solid var(--g-border-soft); cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 7px; user-select: none; }
.sh-item:last-child { border-bottom: 0; }
.sh-item:hover { background: var(--g-surface-2); }
.sh-item.sh-sel { background: var(--g-primary-soft); box-shadow: inset 3px 0 0 var(--g-primary); }
.sh-item .badge { font-size: 9px; letter-spacing: .03em; }
.sh-child { padding: 4px 10px 4px 30px; font-size: 11.5px; color: var(--g-text-muted); border-bottom: 1px solid var(--g-border-soft); background: #fbfcfd; }
.sh-child::before { content: '\21B3'; margin-right: 6px; opacity: .5; }
.sh-empty { padding: 28px 12px; text-align: center; color: var(--g-text-muted); font-size: 13px; }
/* grouped shuttle: roles with their permissions indented underneath */
.sh-group { border-bottom: 1px solid var(--g-border); }
.sh-group:last-child { border-bottom: 0; }
.sh-grp { display: flex; align-items: center; gap: 7px; padding: 7px 10px; font-size: 12.5px; cursor: pointer; user-select: none; background: var(--g-surface-2); border-bottom: 1px solid var(--g-border-soft); }
.sh-grp:hover { background: var(--g-primary-soft); }
.sh-grp.sh-grp-loose { background: #f6f7f9; }
.sh-grp .badge { font-size: 9px; letter-spacing: .03em; }
.sh-grp-act { font-size: 10.5px; color: var(--g-primary); text-transform: uppercase; letter-spacing: .04em; }
.sh-perm { padding-left: 26px; font-size: 12px; }
.sh-perm .sh-ind { opacity: .4; font-size: 11px; }

/* ---- Remote-work pulse / activity ---- */
.pulse-card { transition: box-shadow .2s, border-color .2s; }
.pulse-card.pulse-due { border-color: var(--g-primary); box-shadow: 0 0 0 3px var(--g-primary-soft); animation: pulseGlow 1.6s ease-in-out infinite; }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 3px var(--g-primary-soft); } 50% { box-shadow: 0 0 0 6px var(--g-primary-soft); } }
.pulse-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pulse-timeline { position: relative; padding-left: 8px; }
.pulse-timeline .pt-row { display: grid; grid-template-columns: 78px 28px 1fr; align-items: start; padding: 8px 0; border-left: 2px solid var(--g-border-soft); margin-left: 8px; }
.pulse-timeline .pt-time { font-size: 12px; color: var(--g-text-muted); padding-top: 2px; }
.pulse-timeline .pt-dot { margin-left: -15px; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1px solid var(--g-border-soft); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.pulse-timeline .pt-body { padding-left: 6px; }
.act-list { list-style: none; margin: 4px 0 0; padding: 0; }
.act-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; }
.act-list .act-note { color: var(--g-text); }
.act-list li.act-done .act-note { text-decoration: line-through; color: var(--g-text-muted); }

/* ---- Employment contract document (professional / legal) ---- */
.ct-paper { background:#fff; border:1px solid var(--g-border); border-radius:10px; padding:44px 52px; max-width:840px; box-shadow:var(--g-shadow); color:#1f2430; font-family:"Georgia","Times New Roman",serif; }
.ct-head { display:flex; justify-content:space-between; align-items:flex-start; border-bottom:3px double var(--accent); padding-bottom:14px; margin-bottom:4px; }
.ct-head-l { display:flex; gap:14px; align-items:center; }
.ct-logo { max-height:56px; max-width:160px; }
.ct-company { font-size:19px; font-weight:700; color:var(--accent); letter-spacing:.2px; }
.ct-title { text-align:center; font-size:22px; letter-spacing:3px; text-transform:uppercase; margin:22px 0 6px; color:#1f2430; font-weight:700; }
.ct-title-sub { text-align:center; color:var(--g-text-muted); font-size:12px; letter-spacing:1px; margin-bottom:20px; font-family:Inter,sans-serif; }
.ct-recital { font-size:13.5px; line-height:1.7; text-align:justify; margin:0 0 12px; }
.ct-schedule { border:1.5px solid var(--accent); border-radius:6px; margin:18px 0 22px; overflow:hidden; }
.ct-schedule-h { background:var(--accent); color:#fff; font-family:Inter,sans-serif; font-weight:600; font-size:12px; letter-spacing:1px; text-transform:uppercase; padding:8px 14px; }
.ct-terms { width:100%; border-collapse:collapse; font-size:13px; }
.ct-terms td { padding:7px 14px; border-bottom:1px solid #eef0f2; vertical-align:top; }
.ct-terms tr:last-child td { border-bottom:0; }
.ct-terms .ct-k { width:38%; color:#5b6570; font-weight:600; }
.ct-terms .ct-v { color:#1f2430; }
.ct-tc-title { text-align:center; font-size:15px; font-weight:700; letter-spacing:2px; text-transform:uppercase; margin:26px 0 14px; padding-bottom:6px; border-bottom:1px solid var(--g-border); }
.ct-clause { margin-bottom:13px; }
.ct-clause-h { font-weight:700; font-size:13.5px; margin-bottom:3px; color:#1f2430; }
.ct-clause-n { color:var(--accent); margin-right:4px; }
.ct-clause-b { font-size:13px; text-align:justify; line-height:1.65; color:#2b323c; }
.ct-clause-b p { margin:0 0 6px; }
.ct-clause-b p:last-child { margin-bottom:0; }
.ct-ul { margin:4px 0 4px; padding-left:20px; }
.ct-ul li { margin-bottom:3px; }
/* single rich-text Terms & Conditions block (Quill output) */
.ct-terms-html { font-size:13px; text-align:justify; line-height:1.65; color:#2b323c; }
.ct-terms-html h1, .ct-terms-html h2, .ct-terms-html h3, .ct-terms-html h4 {
    font-size:13.5px; font-weight:700; color:#1f2430; margin:14px 0 4px; }
.ct-terms-html p { margin:0 0 7px; }
.ct-terms-html ul, .ct-terms-html ol { margin:4px 0 8px; padding-left:22px; }
.ct-terms-html li { margin-bottom:3px; }
.ct-foot { margin-top:30px; padding-top:12px; border-top:1px solid var(--g-border-soft); text-align:center; font-size:11px; color:#98a1ac; }
.ct-foot-sep { margin:0 6px; opacity:.6; }
.ct-attest { font-size:13px; margin:24px 0 6px; font-style:italic; }
.ct-sign { display:flex; justify-content:space-between; gap:40px; margin-top:40px; page-break-inside:avoid; }
.ct-sign-box { flex:1; font-size:12px; }
.ct-sign-line { border-top:1px solid #333; height:44px; margin-bottom:6px; }
.ct-sign-cap { line-height:1.7; }
/* clause editor (contract form) */
.clause-row { border:1px solid var(--g-border-soft); border-radius:8px; padding:10px 12px; margin-bottom:10px; background:var(--g-surface); }
.clause-row-top { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.clause-move { display:flex; flex-direction:column; }
.clause-move .btn { padding:0 5px; line-height:1.1; }

/* ---- Branded invoice document ---- */
.inv-paper { background:#fff; border:1px solid var(--g-border); border-radius:12px; padding:0; max-width:900px; margin:0 auto; box-shadow:var(--g-shadow-sm); overflow:hidden; }
.inv-strip { display:flex; align-items:center; justify-content:space-between; font-size:12px; color:var(--g-text-muted); padding:4px 28px; border-bottom:1px solid var(--g-border-soft); }
.inv-strip-r { color:var(--accent); }
.inv-strip-logo { max-height:32px; max-width:130px; }
.inv-head { display:flex; justify-content:space-between; align-items:flex-start; padding:14px 28px 16px; }
.inv-seller { display:flex; gap:14px; align-items:flex-start; }
.inv-logo { max-height:84px; max-width:200px; display:block; }
.inv-seller-text { font-size:12.5px; line-height:1.5; color:var(--g-text); }
.inv-seller-text strong { color:var(--accent); font-size:16px; }
.inv-title { text-align:right; }
.inv-title-word { font-size:30px; font-weight:800; letter-spacing:1px; color:#1f2937; line-height:1; }
.inv-no { display:inline-block; margin-top:6px; background:#1f2937; color:#fff; font-weight:600; font-size:12px; padding:3px 12px; border-radius:6px; letter-spacing:.5px; }
.inv-title .chip { display:block; margin-top:8px; }
.inv-meta { display:flex; gap:18px; padding:8px 28px 18px; }
.inv-meta-right { flex:1; display:flex; flex-direction:column; gap:12px; }
.inv-box { border:1px solid var(--accent); border-radius:8px; padding:10px 14px; font-size:12.5px; }
.inv-bank { flex:1; background:color-mix(in srgb, var(--accent) 5%, #fff); align-self:flex-start; }
.inv-box-head { color:var(--accent); font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.04em; margin-bottom:6px; }
.inv-box-body { line-height:1.5; }
/* rich-text blocks output <p> per line — keep them tight inside the doc */
.inv-box-body p, .inv-seller-text p, .inv-notes p, .inv-footer p, .inv-billto p { margin:0 0 2px; }
.inv-box-body ul, .inv-seller-text ul, .inv-notes ul { margin:2px 0; padding-left:18px; }
.inv-dates { display:flex; gap:28px; padding:0 4px; font-size:12.5px; }
.inv-lbl { font-size:10.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--g-text-muted); }
.inv-items { width:100%; border-collapse:collapse; margin-top:6px; }
.inv-items thead th { border-top:2px solid var(--accent); border-bottom:2px solid var(--accent); padding:9px 28px; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--g-text-muted); text-align:left; }
.inv-items thead th.r, .inv-items tbody td.r { text-align:right; }
.inv-items tbody td { padding:10px 28px; border-bottom:1px solid var(--g-border-soft); font-size:13px; vertical-align:top; }
.inv-items thead th:first-child, .inv-items tbody td:first-child { padding-left:28px; }
.inv-totals { width:320px; margin-left:auto; padding:14px 28px 4px; }
.inv-tot-row { display:flex; justify-content:space-between; padding:5px 0; font-size:13px; }
.inv-tot-due { display:flex; justify-content:space-between; align-items:center; background:var(--accent); color:#fff; font-weight:700; padding:10px 14px; border-radius:6px; margin:8px 0; font-size:15px; }
.inv-notes { padding:14px 28px; font-size:12.5px; color:var(--g-text); border-top:1px solid var(--g-border-soft); }
.inv-footer { margin-top:8px; padding:16px 28px; border-top:2px solid var(--accent); text-align:center; font-size:12px; color:var(--accent); }
.inv-footer-thanks { margin-top:8px; color:var(--g-text-muted); font-size:10.5px; letter-spacing:.04em; text-transform:uppercase; }
.quill-ed { background:#fff; min-height:90px; }
#editModal .quill-ed .ql-editor { max-height:150px; }
.quill-ed.ql-container { font-size:13px; }
.ed-disabled { opacity:.55; }
@media (max-width:640px){ .inv-head,.inv-meta{flex-direction:column;gap:12px} .inv-totals{width:100%} }
.act-rows .act-row .form-control-sm, .act-rows .act-row .ts-wrapper { min-width: 0; }

/* ---- Holiday calendar (moved here so it survives SPA navigation) ---- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-weight: 600; color: var(--g-text-muted); font-size: 12px; text-transform: uppercase; padding-bottom: 6px; }
.cal-cell { min-height: 92px; border: 1px solid var(--g-border-soft); border-radius: 8px; padding: 6px 8px; background: #fff; }
.cal-empty { background: transparent; border: 0; }
.cal-weekend { background: #fafbfc; }
.cal-today { border-color: var(--g-primary); box-shadow: 0 0 0 2px rgba(var(--g-primary-rgb), .15); }
.cal-holiday { background: #fff8e1; }
.cal-num { font-weight: 600; font-size: 13px; color: var(--g-text-muted); }
.cal-event { display: block; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }

/* ---- Responsive nav: below 1200px go icon-only so all 8 modules fit on one
       row without clipping (labels return at >=1200px). Dropdowns still open. ---- */
@media (max-width: 1199.98px) {
    .app-nav__modules .app-nav__label { display: none; }
    .app-nav__modules .app-nav__link { padding: 0 9px; }
    .app-nav__modules .app-nav__link i { font-size: 17px; }
    .app-nav__primary { padding: 0 12px; }
}

/* ============================================================
   EMPLOYEE PROFILE — hero, stat tiles, info cards
   ============================================================ */
.emp-hero { position: relative; overflow: hidden; }
.emp-hero::after {
    content: ''; position: absolute; right: -80px; top: -120px; width: 520px; height: 420px;
    background: radial-gradient(closest-side, rgba(16,185,129,.12), transparent 70%);
    pointer-events: none;
}
.emp-avatar {
    position: relative; width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #0f9d68, #57b95a);
    color: #fff; font-size: 34px; font-weight: 650; text-transform: uppercase;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(13,122,79,.25);
}
.emp-avatar .emp-dot {
    position: absolute; right: 5px; bottom: 7px; width: 14px; height: 14px;
    border-radius: 50%; background: #22c55e; border: 2.5px solid var(--g-surface, #fff);
}
.emp-avatar .emp-dot.off { background: #9ca3af; }
.emp-name { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.emp-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--g-text-muted); font-size: 13.5px; margin-top: 8px; }
.emp-meta span { display: inline-flex; align-items: center; }
.emp-meta i { margin-right: 6px; opacity: .75; }

.tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; height: 100%; }
.tile-ico {
    width: 42px; height: 42px; border-radius: 12px; font-size: 19px;
    display: inline-flex; align-items: center; justify-content: center;
}
.tile-val { font-size: 24px; font-weight: 680; line-height: 1; letter-spacing: -.02em; }
.tile-lbl { font-size: 12.5px; color: var(--g-text-muted); font-weight: 500; margin-top: 3px; }
.t-green  { background: #e6f7ed; color: #16a34a; }
.t-red    { background: #fdeaea; color: #dc2626; }
.t-blue   { background: #e8f0fe; color: #2563eb; }
.t-purple { background: #f1ecfe; color: #7c3aed; }
.t-teal   { background: #e3f6f5; color: #0d9488; }
.t-pink   { background: #fdeaf4; color: #db2777; }
.t-amber  { background: #fdf3e2; color: #d97706; }

.icon-head { display: flex; align-items: center; gap: 11px; font-weight: 650; font-size: 14.5px; }
.icon-head .ih-ico {
    width: 34px; height: 34px; border-radius: 10px; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center;
}
.info-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid var(--g-border-soft); font-size: 13.5px;
}
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--g-text-muted); flex-shrink: 0; }
.info-row .v { font-weight: 560; text-align: right; }
.info-row .v > i { color: var(--g-text-2); margin-left: 9px; }

.asg-row {
    display: flex; align-items: center; gap: 10px; padding: 13px 0;
    border-bottom: 1px solid var(--g-border-soft); text-decoration: none; color: var(--g-text);
    font-size: 13.5px;
}
.asg-row:last-child { border-bottom: 0; }
.asg-row:hover { color: var(--g-primary); }
.asg-row .bi-chevron-right { margin-left: auto; color: var(--g-text-2); font-size: 12px; }

.act-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--g-border-soft); }
.act-item:last-child { border-bottom: 0; }
.act-ico {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center;
}
.act-txt { font-size: 13.5px; font-weight: 550; }
.act-sub { font-size: 12px; color: var(--g-text-muted); margin-top: 1px; }

.form-sec {
    font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em;
    color: var(--g-text-muted); border-bottom: 1px solid var(--g-border-soft);
    padding-bottom: 7px; margin-bottom: 4px;
}
.profile-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tabs .nav-link { white-space: nowrap; }

/* ============================================================
   MATERIAL EXPRESSIVE REFRESH — Google-inspired 2026 skin.
   Appended last so it overrides the base system cleanly.
   ============================================================ */
:root {
    --g-bg: #f1f8f4;
    --g-radius: 20px;
    --g-radius-sm: 14px;
    --g-radius-btn: 999px;
    --g-nav-h: 68px;
    --g-border: #dbe8e1;
    --g-border-soft: #e9f2ec;
    --g-font-display: 'Poppins', 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    /* flowing wave line-art (indigo, very subtle) used on hero + tiles */
    --g-waves: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 220' fill='none'><path d='M0 170 C 90 120, 180 205, 300 150 S 420 110, 420 110' stroke='%230d7a4f' stroke-opacity='.10' stroke-width='1.3'/><path d='M0 150 C 95 105, 190 190, 305 135 S 420 92, 420 92' stroke='%230d7a4f' stroke-opacity='.085' stroke-width='1.3'/><path d='M0 130 C 100 90, 200 175, 310 120 S 420 74, 420 74' stroke='%2357b95a' stroke-opacity='.07' stroke-width='1.3'/><path d='M0 110 C 105 75, 210 160, 315 105 S 420 56, 420 56' stroke='%2357b95a' stroke-opacity='.06' stroke-width='1.3'/><path d='M0 90 C 110 60, 220 145, 320 90 S 420 38, 420 38' stroke='%2310b981' stroke-opacity='.05' stroke-width='1.3'/><path d='M0 70 C 115 45, 230 130, 325 75 S 420 20, 420 20' stroke='%2310b981' stroke-opacity='.04' stroke-width='1.3'/></svg>");
}

/* Ambient mesh page background — two soft color blobs, fixed */
body {
    background:
        radial-gradient(900px 480px at 88% -8%, rgba(87,185,90,.12), transparent 60%),
        radial-gradient(760px 420px at -6% 30%, rgba(13,148,136,.06), transparent 60%),
        radial-gradient(700px 420px at 55% 115%, rgba(16,185,129,.05), transparent 60%),
        var(--g-bg);
    background-attachment: fixed;
}

/* Display typeface for identity moments */
h1, h2, h3, h4, h5, h6, .page-title, .emp-name, .app-nav__brand,
.stat-val, .tile-val, .modal-title, .brand {
    font-family: var(--g-font-display);
}

/* ============================================================
   NAV — Google Meet style: icon pill with small label underneath
   ============================================================ */
.app-nav__primary {
    height: var(--g-nav-h);
    background: rgba(244, 251, 247, .88);
    padding: 0 20px;
}
.app-nav__modules { gap: 2px; }
.app-nav__primary .app-nav__link {
    flex-direction: column; gap: 2px;
    height: auto !important; padding: 5px 7px;
    background: transparent !important; border-radius: 14px;
}
.gnav-pill {
    width: 54px; height: 30px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px; color: var(--g-text-2);
    transition: background .16s, color .16s, transform .16s;
}
.app-nav__primary .app-nav__link i { font-size: inherit; opacity: 1; }
.app-nav__primary .app-nav__link .app-nav__label {
    display: block; font-size: 10.5px; font-weight: 600;
    color: var(--g-text-muted); letter-spacing: .015em; line-height: 1;
}
.app-nav__primary .app-nav__link:hover .gnav-pill { background: #e2f1e9; color: var(--g-text); }
.app-nav__primary .app-nav__link.active .gnav-pill {
    background: var(--g-primary-soft); color: var(--g-primary-dark);
    box-shadow: inset 0 0 0 1px var(--g-primary-border);
}
.app-nav__primary .app-nav__link.active .app-nav__label { color: var(--g-primary-dark); }
.app-nav__modules .dropdown-toggle::after { display: none; }
.app-nav__dropdown { border-radius: 18px; padding: 8px; margin-top: 4px !important; }
.app-nav__dropdown .dropdown-item { border-radius: 12px; padding: 8px 12px; }

/* round icon buttons + avatar ring (Google style) */
.icon-btn { border-radius: 50%; width: 40px; height: 40px; }
.avatar { box-shadow: 0 0 0 2px var(--g-surface), 0 0 0 3.5px var(--g-primary-border); }

/* keep labels visible at every desktop width (overrides old icon-only rule) */
.app-nav__modules .app-nav__label { display: block; }
@media (max-width: 1280px) {
    .gnav-pill { width: 44px; height: 28px; font-size: 16px; }
    .app-nav__primary .app-nav__link { padding: 4px 4px; }
    .app-nav__primary .app-nav__link .app-nav__label { font-size: 9.5px; }
    .app-nav__primary { padding: 0 10px; }
}

/* ============================================================
   SURFACES — bigger radius, softer borders, wave art accents
   ============================================================ */
.card { border-radius: var(--g-radius); border-color: var(--g-border-soft); }
.card-header { padding: 15px 22px; }
.table-card { border-radius: var(--g-radius); border-color: var(--g-border-soft); }
.modal-content { border-radius: 24px; }
.modal-header { padding: 18px 24px 14px; }
.filter-bar { border-radius: var(--g-radius); border-color: var(--g-border-soft); }
.dropdown-menu { border-radius: 18px; padding: 8px; border-color: var(--g-border-soft); box-shadow: var(--g-shadow-pop); }
.dropdown-menu .dropdown-item { border-radius: 12px; }
.toast, .app-toast { border-radius: 16px; }

/* Flowing wave line-art on hero + stat surfaces (like the reference design) */
.emp-hero, .tile, .stat-card, .auth-card {
    background-image: var(--g-waves);
    background-repeat: no-repeat;
    background-position: right -30px top -40px;
    background-size: 420px 220px;
}
.tile, .stat-card { background-position: right -60px bottom -90px; }
.emp-hero { background-position: right -20px top -30px, right 30% top -80px; background-image: var(--g-waves), var(--g-waves); }

/* ============================================================
   CONTROLS — M3 pill buttons, rounded fields
   ============================================================ */
.btn { border-radius: 999px; padding: 8px 18px; }
.btn-sm { padding: 5px 14px; }
.btn-lg { padding: 11px 26px; }
.btn-primary {
    background: var(--g-primary); border-color: var(--g-primary);
    box-shadow: 0 1px 3px rgba(var(--g-primary-rgb), .35);
}
.btn-primary:hover {
    background: var(--g-primary-dark); border-color: var(--g-primary-dark);
    box-shadow: 0 4px 12px rgba(var(--g-primary-rgb), .35);
    transform: translateY(-1px);
}
.btn-light {
    background: #e9f2ec; border-color: transparent; color: var(--g-text-2);
}
.btn-light:hover { background: #e3e8f3; color: var(--g-text); border-color: transparent; }
.btn-icon { border-radius: 50% !important; }
.btn:active { transform: translateY(0) scale(.98); }

.form-control, .form-select, .ts-wrapper .ts-control {
    border-radius: 12px; border-color: var(--g-border);
}
.form-control:focus, .form-select:focus { border-color: var(--g-primary); box-shadow: var(--g-ring); }
.form-control-sm, .form-select-sm { border-radius: 10px; }
.input-group .form-control, .input-group .form-select { border-radius: 12px; }

/* ============================================================
   DATA — tinted table heads, gentle hover, rounded pagination
   ============================================================ */
.table > thead th { background: #f5f7fc; }
.table > tbody tr { transition: background .12s; }
.table > tbody tr:hover { background: rgba(var(--g-primary-rgb), .028); }
.pagination .page-link { border-radius: 999px !important; margin: 0 2px; border: 0; color: var(--g-text-2); }
.pagination .page-item.active .page-link { background: var(--g-primary); color: #fff; }

/* Tabs — M3 pill underline hybrid */
.nav-tabs { border-bottom: 0; gap: 4px; background: #e7f2ec; border-radius: 999px; padding: 5px; width: max-content; max-width: 100%; }
.nav-tabs .nav-link {
    border-radius: 999px; border-bottom: 0; padding: 8px 16px;
    font-weight: 550; color: var(--g-text-2);
}
.nav-tabs .nav-link:hover { background: rgba(255,255,255,.7); color: var(--g-text); }
.nav-tabs .nav-link.active {
    background: var(--g-surface); color: var(--g-primary-dark);
    border-bottom: 0; box-shadow: var(--g-shadow-1);
}

/* Employee hero polish on the new canvas */
.emp-hero::after {
    background: radial-gradient(closest-side, rgba(16,185,129,.09), transparent 70%);
}
.emp-avatar { border-radius: 28px; }
.tile-ico, .icon-head .ih-ico, .act-ico { border-radius: 999px; }
.shuttle-list { border-radius: 14px; }

/* ============================================================
   TOM SELECT — match the Material controls (account pickers etc.)
   ============================================================ */
.ts-wrapper.form-select { padding: 0; border: 0; background-image: none; box-shadow: none; }
.ts-control {
    border: 1px solid var(--g-border) !important; border-radius: 12px !important;
    padding: 8px 34px 8px 13px !important; font-size: 13.5px; line-height: 1.45;
    background: var(--g-surface) !important; min-height: 38px;
    transition: border-color .15s, box-shadow .15s;
}
.ts-wrapper.focus .ts-control { border-color: var(--g-primary) !important; box-shadow: var(--g-ring) !important; }
.ts-wrapper.single .ts-control::after {
    content: ''; position: absolute; right: 14px; top: 50%; margin-top: -2px;
    border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
    border-top: 5px solid var(--g-text-muted);
}
.ts-control input { font-size: 13.5px !important; }
.ts-dropdown {
    border: 1px solid var(--g-border-soft) !important; border-radius: 14px;
    box-shadow: var(--g-shadow-pop); margin-top: 6px; overflow: hidden; z-index: 2100;
    font-size: 13.5px;
}
.ts-dropdown .option { padding: 8px 12px; border-radius: 9px; margin: 2px 6px; }
.ts-dropdown .active { background: var(--g-primary-soft); color: var(--g-primary-dark); }
.ts-dropdown .selected { background: var(--g-primary); color: #fff; }
.ts-dropdown .optgroup-header {
    font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
    color: var(--g-text-muted); padding: 9px 12px 3px; background: transparent;
}
.ts-dropdown .optgroup { border-top: 1px solid var(--g-border-soft); }
.ts-dropdown .optgroup:first-child { border-top: 0; }

/* ============================================================
   AUTH — split brand panel + form
   ============================================================ */
/* Humn emerald auth — a page OF the site, not a separate login screen */
body:has(.auth-wrap) { padding: 0 !important; margin: 0 !important; }
.auth-wrap {
    width: 100%; min-height: 100vh; display: flex; flex-direction: column;
    font-family: 'Hanken Grotesk', system-ui, sans-serif; color: #0e2e26;
    background:
        radial-gradient(1100px 640px at 82% -6%, rgba(163,230,53,.20), transparent 58%),
        radial-gradient(880px 600px at 4% 8%, rgba(45,212,191,.14), transparent 60%),
        radial-gradient(700px 520px at 60% 4%, rgba(196,181,253,.10), transparent 62%),
        #f1f9f4;
}
.auth-wrap > .auth-card { margin: auto; }  /* centre single-card pages (OTP, reset) */

/* site-style top bar */
.auth-topbar { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 1040px;
    margin: 0 auto; padding: 20px 24px; }
.auth-topbrand { display: flex; align-items: center; gap: 10px; font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 800; letter-spacing: -.02em; font-size: 20px; color: #0e2e26; text-decoration: none; }
.auth-topbrand img { height: 30px; width: auto; display: block; }
.auth-topbrand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    color: #a3e635; font-size: 16px; font-weight: 800; background: #0e2e26;
    box-shadow: 0 6px 16px rgba(14,46,38,.32), inset 0 1px 0 rgba(255,255,255,.12); }
.auth-topnav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.auth-topnav a { font-size: 13.5px; color: #2c5248; text-decoration: none; padding: 9px 15px; border-radius: 999px; transition: .15s; }
.auth-topnav a:hover { color: #0e2e26; background: rgba(16,185,129,.10); }
.auth-topnav .tn-cta { background: #0e2e26; color: #fff; font-weight: 600; }
.auth-topnav .tn-cta:hover { background: #12382d; color: #fff; }

/* centred body */
.auth-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; padding: 16px 20px 52px; }
.auth-lede { text-align: center; max-width: 480px; }
.auth-lede h1 { font-family: 'Poppins', system-ui, sans-serif; font-weight: 800; font-size: clamp(24px,4vw,31px);
    letter-spacing: -.025em; color: #0e2e26; margin: 0 0 9px; line-height: 1.12; }
.auth-lede p { color: #5b7d72; font-size: 14.5px; line-height: 1.55; margin: 0 auto; max-width: 400px; }

/* the card */
.auth-card2 { width: 100%; max-width: 440px; background: #ffffff; border: 1px solid #d8ebe1;
    border-radius: 22px; box-shadow: 0 40px 90px -44px rgba(14,46,38,.4); padding: 32px 32px; }
.auth-card2 .form-label { color: #234b41; font-weight: 600; font-size: 13px; }
.auth-card2 .text-muted, .auth-lede p { color: #5b7d72 !important; }
.auth-wrap .form-control { border-color: #d3e7dc; background: #fbfffd; }
.auth-wrap .form-control:focus { border-color: #10b981; box-shadow: 0 0 0 .18rem rgba(16,185,129,.16); }
.auth-wrap .btn-primary { background: #0e2e26; border: 0; font-weight: 600;
    box-shadow: 0 10px 24px -10px rgba(14,46,38,.5); }
.auth-wrap .btn-primary:hover, .auth-wrap .btn-primary:focus { background: #12382d;
    box-shadow: 0 14px 30px -10px rgba(14,46,38,.6); }
.auth-wrap .form-check-input:checked { background-color: #10b981; border-color: #10b981; }
.auth-card2 a, .auth-card a { color: #0f9d68; }
.auth-card2 a:hover, .auth-card a:hover { color: #0b7a51; }
.auth-card2 h1 { font-family: 'Poppins', system-ui, sans-serif; letter-spacing: -.02em; color: #0e2e26; }
.auth-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
    font-size: 24px; background: #e7f5ee; color: #0d7a4f; border: 1px solid #cdeadd; }

/* Legal / content pages (Terms, Privacy) */
.content-card { max-width: 820px; margin: 8px auto 0; background: #ffffff; border: 1px solid #d8ebe1;
    border-radius: 20px; padding: 40px 46px; box-shadow: 0 30px 70px -46px rgba(14,46,38,.32); }
.content-title { font-family: 'Poppins', system-ui, sans-serif; font-weight: 800; letter-spacing: -.02em; color: #0e2e26; margin: 6px 0 2px; }
.content-body { color: #33544a; line-height: 1.72; font-size: 15px; }
.content-body h2, .content-body h3, .content-body h4 { font-family: 'Poppins', system-ui, sans-serif; color: #0e2e26; letter-spacing: -.01em; margin: 26px 0 10px; }
.content-body h2 { font-size: 20px; } .content-body h3 { font-size: 17px; } .content-body h4 { font-size: 15px; }
.content-body p { margin: 0 0 14px; }
.content-body ul, .content-body ol { margin: 0 0 14px; padding-left: 22px; }
.content-body li { margin-bottom: 6px; }
.content-body a { color: #0f9d68; }
.content-body strong { color: #0e2e26; }
.content-body hr { border: 0; border-top: 1px solid #e6f0ea; margin: 22px 0; }
@media (max-width: 575.98px) { .content-card { padding: 28px 22px; border-radius: 16px; } }

/* Error page (404 / 500) */
.err-page { min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.err-card { max-width: 520px; }
.err-code { font-family: 'Poppins', system-ui, sans-serif; font-weight: 800; font-size: clamp(72px, 14vw, 104px);
    line-height: 1; letter-spacing: -.04em; color: #0d7a4f; }
.err-title { font-family: 'Poppins', system-ui, sans-serif; font-weight: 700; font-size: 24px; color: #0e2e26; margin: 8px 0 10px; }
.err-text { color: #5f7f74; font-size: 15px; line-height: 1.6; margin: 0 auto 24px; max-width: 420px; }

/* trust strip + benefits under the card — echoes the landing */
.auth-mods { display: flex; flex-wrap: wrap; gap: 9px 15px; justify-content: center; max-width: 520px;
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: #5b7d72; letter-spacing: .02em; }
.auth-mods span { display: inline-flex; align-items: center; gap: 6px; }
.auth-mods span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #10b981; opacity: .8; }
.auth-benefits { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-bottom: 4px;
    font-size: 13px; color: #2c5248; }
.auth-benefits span { display: inline-flex; align-items: center; gap: 7px; }
.auth-benefits i { color: #10b981; }
.auth-foot { color: #5b7d72; font-size: 12.5px; text-align: center; }

/* single-card pages (OTP, reset) */
.auth-wrap .auth-card { border-color: #d8ebe1; box-shadow: 0 30px 70px -40px rgba(14,46,38,.35); background: #ffffff; }
.auth-wrap .auth-card h1, .auth-wrap .auth-card h2, .auth-wrap .auth-card .h4 { font-family: 'Poppins', system-ui, sans-serif; color: #0e2e26; }

@media (max-width: 575.98px) {
    .auth-card2 { padding: 26px 20px; }
    .auth-topnav a:not(.tn-cta) { display: none; }
}

/* ============================================================
   DASHBOARD — quick action buttons (icon pill + label, Meet-style)
   ============================================================ */
.qa-btn {
    display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
    background: transparent; border: 0; padding: 6px 8px; border-radius: 16px;
}
.qa-btn:hover { background: rgba(255,255,255,.65); transform: none; box-shadow: none; }
.qa-btn .tile-ico { width: 46px; height: 46px; font-size: 20px; transition: transform .15s; }
.qa-btn:hover .tile-ico { transform: translateY(-2px); }
.qa-btn .qa-lbl { font-size: 11px; font-weight: 600; color: var(--g-text-2); letter-spacing: .01em; }

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.pal-overlay {
    position: fixed; inset: 0; z-index: 3000; display: none;
    background: rgba(13, 18, 30, .38);
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    padding: 12vh 16px 16px; justify-content: center; align-items: flex-start;
}
.pal-overlay.show { display: flex; }
.pal-box {
    width: 640px; max-width: 100%; background: var(--g-surface);
    border-radius: 22px; box-shadow: var(--g-shadow-pop); overflow: hidden;
    animation: palIn .16s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes palIn { from { opacity: 0; transform: scale(.97) translateY(-8px); } to { opacity: 1; transform: none; } }
.pal-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--g-border-soft); }
.pal-head > i { color: var(--g-text-muted); font-size: 17px; }
.pal-head kbd {
    background: var(--g-surface-2); border: 1px solid var(--g-border); border-radius: 7px;
    padding: 2px 8px; font-size: 11px; color: var(--g-text-muted);
}
.pal-input { border: 0; outline: none; flex: 1; font-size: 15.5px; background: transparent; color: var(--g-text); }
.pal-results { max-height: 54vh; overflow-y: auto; padding: 8px; }
.pal-group {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--g-text-muted); padding: 10px 12px 4px;
}
.pal-item {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px;
    border-radius: 13px; cursor: pointer;
}
.pal-item:hover, .pal-item.sel { background: var(--g-primary-soft); }
.pal-item.sel .pal-ico { color: var(--g-primary); }
.pal-ico {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: var(--g-surface-2); color: var(--g-text-2);
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.pal-txt { display: flex; flex-direction: column; min-width: 0; }
.pal-txt > .pal-sub { font-size: 12px; color: var(--g-text-muted); }
.pal-txt { font-size: 13.5px; font-weight: 550; }
.pal-enter { margin-left: auto; color: var(--g-text-2); font-size: 13px; opacity: 0; }
.pal-item.sel .pal-enter { opacity: .7; }
.pal-empty { text-align: center; color: var(--g-text-muted); padding: 40px 0; }
.pal-empty i { display: block; font-size: 26px; opacity: .4; margin-bottom: 8px; }

/* ============================================================
   SIDEBAR LAYOUT — modern SaaS shell (replaces the top module nav)
   ============================================================ */
:root { --g-tb-h: 60px; }

body { padding-top: var(--g-tb-h); }

/* ---- Sidebar (removed — now a top nav; kept hidden for safety) ---- */
.sb { display: none !important; }
.sb-legacy {
    position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 1040;
    background: rgba(252, 253, 255, .92);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-right: 1px solid var(--g-border-soft);
    display: flex; flex-direction: column;
}
.sb-brand {
    display: flex; align-items: center; gap: 11px; padding: 18px 20px 14px;
    text-decoration: none; color: var(--g-text); flex-shrink: 0;
}
.sb-brand img { height: 30px; max-width: 150px; object-fit: contain; }
.sb-brand .logo-dot {
    width: 34px; height: 34px; border-radius: 11px; background: var(--g-primary);
    display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px;
}
.sb-brand-name {
    font-family: var(--g-font-display); font-weight: 800; font-size: 15px;
    letter-spacing: -.02em; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; scrollbar-width: thin; }
.sb-nav::-webkit-scrollbar { width: 5px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--g-border); border-radius: 99px; }

.sb-sec {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--g-text-muted); padding: 16px 10px 5px;
}
.sb-item {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; margin: 1px 0; border-radius: 11px;
    color: var(--g-text-2); text-decoration: none; font-size: 13.5px; font-weight: 530;
    position: relative; transition: background .13s, color .13s;
}
.sb-item i { font-size: 16px; width: 20px; text-align: center; color: var(--g-text-muted); transition: color .13s; }
.sb-item:hover { background: #e9f2ec; color: var(--g-text); }
.sb-item:hover i { color: var(--g-text-2); }
.sb-item.active {
    background: var(--g-primary-soft); color: var(--g-primary-dark); font-weight: 620;
}
.sb-item.active i { color: var(--g-primary); }
.sb-item.active::before {
    content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3.5px;
    border-radius: 0 4px 4px 0; background: var(--g-primary);
}
.sb-foot { border-top: 1px solid var(--g-border-soft); padding: 10px 12px; flex-shrink: 0; }
.sb-user {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px;
    text-decoration: none; transition: background .13s;
}
.sb-user:hover { background: #e9f2ec; }
.sb-user-txt { display: flex; flex-direction: column; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 620; color: var(--g-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-sub { font-size: 11px; color: var(--g-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Top bar ---- */
.tb {
    position: fixed; top: 0; left: 0; right: 0; height: var(--g-tb-h); z-index: 1030;
    background: rgba(244, 251, 247, .88);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--g-border-soft);
    display: flex; align-items: center; gap: 12px; padding: 0 18px;
}
.tb-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--g-text); flex-shrink: 0; }
.tb-logo { height: 27px; width: auto; display: block; }
.tb-brand .logo-dot { width: 32px; height: 32px; border-radius: 9px; background: var(--g-primary); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; }
.tb-brand-name { font-family: var(--g-font-display); font-weight: 800; font-size: 16px; letter-spacing: -.02em;
    color: var(--g-text); white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

/* ---- Top module nav ---- */
/* NOTE: no overflow here — an overflow value clips the dropdown menus that pop below the bar */
.topnav { display: flex; align-items: center; gap: 2px; margin-left: 6px; flex: 0 1 auto; flex-wrap: nowrap; }
.topnav-item { flex-shrink: 0; }
.topnav-link {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    border: 0; background: transparent; cursor: pointer; border-radius: 999px;
    color: var(--g-text-2); font-family: inherit; font-weight: 550; font-size: 13.5px;
    text-decoration: none; white-space: nowrap; transition: background .13s, color .13s;
}
.topnav-link i { font-size: 16px; color: var(--g-text-muted); transition: color .13s; }
.topnav-link:hover { background: var(--g-primary-soft); color: var(--g-primary-dark); }
.topnav-link:hover i { color: var(--g-primary); }
/* selected top-level module: solid emerald pill so the current section is unmistakable */
.topnav-link.active,
.topnav-link.active:hover { background: var(--g-primary); color: #fff; font-weight: 600;
    box-shadow: 0 6px 14px -6px rgba(var(--g-primary-rgb), .55); }
.topnav-link.active i { color: #fff; }
.topnav .dropdown-toggle::after {
    margin-left: 3px; border: 0; content: '\F282'; font-family: 'bootstrap-icons';
    font-size: 10px; line-height: 1; vertical-align: 0; transition: transform .15s;
}
.topnav .dropdown-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.topnav-menu { border-radius: 16px; padding: 8px; min-width: 224px; border: 1px solid var(--g-border);
    box-shadow: var(--g-shadow-2); margin-top: 8px !important; }
.topnav-menu .dropdown-item { display: flex; align-items: center; gap: 10px; border-radius: 11px;
    padding: 8px 12px; font-size: 13.5px; font-weight: 500; color: var(--g-text-2); }
.topnav-menu .dropdown-item i { font-size: 16px; color: var(--g-text-muted); width: 18px; text-align: center; }
.topnav-menu .dropdown-item:hover { background: var(--g-border-soft); color: var(--g-text); }
.topnav-menu .dropdown-item.active { background: var(--g-primary-soft); color: var(--g-primary-dark); font-weight: 600; }
.topnav-menu .dropdown-item.active i { color: var(--g-primary); }
.topnav-menu .dropdown-item.active::after { content: '\2713'; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--g-primary); }
.tb-search {
    display: flex; align-items: center; gap: 10px;
    background: #e7f2ec; border: 1px solid transparent; border-radius: 999px;
    padding: 8px 16px; min-width: 300px; max-width: 460px; flex: 0 1 auto;
    color: var(--g-text-muted); font-size: 13.5px; cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.tb-search:hover { background: var(--g-surface); border-color: var(--g-border); box-shadow: var(--g-shadow-1); }
.tb-search kbd {
    margin-left: auto; background: var(--g-surface); border: 1px solid var(--g-border);
    border-radius: 7px; padding: 1px 7px; font-size: 10.5px; color: var(--g-text-muted);
}
.tb-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

/* the old top-module-nav styles no longer apply (markup removed);
   keep .page comfortable inside the new shell */
.page { padding: 24px 28px 64px; max-width: 1380px; }
@media (max-width: 991.98px) { .page { padding: 18px 14px 56px; } }

/* offcanvas mobile menu inherits sidebar item styles */
.offcanvas .sb-item { color: var(--g-text-2); }

/* top nav spans full width (no sidebar offset) */

/* ============================================================
   INDEX-PAGE SYSTEM — subtitle, KPI band, search field, row icons
   ============================================================ */
.page-sub { color: var(--g-text-muted); font-size: 13px; margin-top: 3px; }

.filter-search { position: relative; }
.filter-search > i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--g-text-muted); font-size: 14px; pointer-events: none;
}
.filter-search .form-control { padding-left: 34px; }

.stat-band { overflow: hidden; }
.stat-band-row { display: flex; flex-wrap: wrap; }
.stb-seg {
    flex: 1 1 0; min-width: 190px; display: flex; align-items: center; gap: 13px;
    padding: 18px 22px; position: relative;
}
.stb-seg + .stb-seg::before {
    content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
    width: 1px; background: var(--g-border-soft);
}
.stb-lbl { font-size: 11.5px; color: var(--g-text-muted); font-weight: 550; }
.stb-val { font-family: var(--g-font-display); font-size: 20px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; }
.stb-sub { font-size: 11px; color: var(--g-success); font-weight: 550; }
@media (max-width: 767.98px) {
    .stb-seg { min-width: 46%; padding: 13px 16px; }
    .stb-seg .tile-ico { width: 36px; height: 36px; font-size: 16px; }
    .stb-val { font-size: 17px; }
}

.row-ico {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}

/* status chips get a leading dot (mock style) unless they carry an icon */
.chip:not(:has(i))::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; margin-right: 6px; flex-shrink: 0; display: inline-block;
}
.chip { display: inline-flex; align-items: center; }

/* ============================================================
   COMPOSITE TABLE CELLS — stacked titles, icon lines, mini donuts
   ============================================================ */
.cl-main { font-weight: 640; font-size: 13.5px; color: var(--g-text); line-height: 1.35; }
.cl-sub { font-size: 12px; color: var(--g-text-muted); margin-top: 1px; }
.cl-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.cl-chips .chip { font-size: 10px; padding: 2px 8px; }

.cl-line { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--g-text-2); padding: 2px 0; }
.cl-line i { font-size: 13px; color: var(--g-text-muted); width: 15px; text-align: center; flex-shrink: 0; }
.cl-line-txt { min-width: 0; }
.cl-linesub { color: var(--g-text-muted); font-size: 11.5px; }
.cl-line.ok, .cl-line.ok i { color: var(--g-success); }
.cl-line.warn, .cl-line.warn i { color: #d97706; }
.cl-line.bad, .cl-line.bad i { color: var(--g-danger); }

.mini-donut { position: relative; width: 40px; height: 40px; display: inline-flex; flex-shrink: 0; }
.mini-donut svg { width: 100%; height: 100%; }
.mini-donut-txt {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 9.5px; font-weight: 700; color: var(--g-text-2); letter-spacing: -.02em;
}

.fin-cell { display: flex; align-items: center; gap: 14px; }
.fin-left { min-width: 0; }
.fin-left .fin-amt { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fin-left .fin-amt-sub { font-size: 11px; color: var(--g-text-muted); }
.fin-right { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }

/* composite first-column links keep dark titles, hover tints them */
.table a.text-decoration-none .cl-main { color: var(--g-text); transition: color .12s; }
.table a.text-decoration-none:hover .cl-main { color: var(--g-primary); }
.table a.text-decoration-none .cl-sub { color: var(--g-text-muted); font-weight: 400; }
.table > tbody td { vertical-align: middle; }

/* ============================================================
   COLLAPSED SIDEBAR — icon rail (html.sbc, persisted in localStorage)
   ============================================================ */
html.sbc { --g-sb-w: 76px; }
html.sbc .sb-brand { justify-content: center; padding: 16px 8px 12px; }
html.sbc .sb-brand-name { display: none; }
html.sbc .sb-brand img { max-width: 44px; }
html.sbc .sb-sec {
    padding: 0; margin: 10px 12px; height: 1px; overflow: hidden;
    background: var(--g-border-soft); text-indent: -999px;
}
html.sbc .sb-item { justify-content: center; padding: 10px 0; }
html.sbc .sb-item span { display: none; }
html.sbc .sb-item i { width: auto; font-size: 18px; }
html.sbc .sb-item.active::before { left: -12px; }
html.sbc .sb-nav { padding: 4px 12px 12px; }
html.sbc .sb-foot { padding: 10px 8px; }
html.sbc .sb-user { justify-content: center; padding: 8px 0; }
html.sbc .sb-user-txt { display: none; }

/* attendance: divider between marked (top) and not-marked (bottom) */
.att-divider td {
    background: #fdf1f1 !important; color: #b91c1c; font-size: 11px;
    font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 7px 18px !important;
}
