/* ============================================================
   PersonalListe — modern SaaS design system
   Light + dark theme via [data-theme] on <html>.
   Brand: #019e48 (green)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&display=swap');

/* ============================================================
   1. DESIGN TOKENS
============================================================ */
:root {
    /* Brand */
    --brand:          #019e48;
    --brand-strong:   #017a38;
    --brand-darker:   #015a28;
    --brand-soft:     #e7f6ee;
    --brand-ring:     rgba(1, 158, 72, 0.20);
    --brand-grad:     linear-gradient(135deg, #02ab4f 0%, #017a38 100%);

    /* Legacy aliases (kept so older rules / inline refs still resolve) */
    --brand-green:        var(--brand);
    --brand-green-dark:   var(--brand-strong);
    --brand-green-soft:   var(--brand-soft);

    /* Surfaces */
    --bg:           #f4f5f7;
    --surface:      #ffffff;
    --surface-2:    #f5f6f8;
    --surface-3:    #eceef1;
    --surface-hover:#f7f8fa;

    /* Borders */
    --border:        #e7e9ec;
    --border-strong: #d7dae0;

    /* Text */
    --text:        #1a1d23;
    --text-muted:  #6b7280;
    --text-faint:  #9aa0a8;
    --text-invert: #ffffff;

    /* Semantic — text + soft background */
    --success-text: #0a7d3f;  --success-soft: #e7f6ee;
    --warning-text: #946312;  --warning-soft: #fbf0d8;
    --info-text:    #1d6fb8;  --info-soft:    #e6f1fb;
    --danger-text:  #c0392b;  --danger-soft:  #fcebeb;
    --neutral-text: #5b6470;  --neutral-soft: #eef0f2;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.05);
    --shadow:    0 2px 6px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.07);
    --shadow-lg: 0 10px 34px rgba(16,24,40,.14), 0 4px 12px rgba(16,24,40,.07);
    --shadow-brand: 0 6px 18px rgba(1,158,72,.30);

    /* Geometry */
    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 16px;

    /* Motion */
    --ease: cubic-bezier(.4, 0, .2, 1);

    --overlay: rgba(17, 22, 30, 0.55);
}

html[data-theme="dark"] {
    --brand:        #15ad5b;
    --brand-strong: #0f9a4f;
    --brand-darker: #0b7e40;
    --brand-soft:   rgba(21, 173, 91, 0.16);
    --brand-ring:   rgba(21, 173, 91, 0.30);
    --brand-grad:   linear-gradient(135deg, #15ad5b 0%, #0c8042 100%);

    --bg:            #0e1014;
    --surface:       #181b21;
    --surface-2:     #1f232b;
    --surface-3:     #272b34;
    --surface-hover: #21252e;

    --border:        #2b2f38;
    --border-strong: #3a404b;

    --text:        #e6e8ec;
    --text-muted:  #99a1ac;
    --text-faint:  #6b7280;

    --success-text: #46cf86;  --success-soft: rgba(21,173,91,.16);
    --warning-text: #e7b765;  --warning-soft: rgba(231,183,101,.15);
    --info-text:    #6cb6f0;  --info-soft:    rgba(108,182,240,.15);
    --danger-text:  #f08b80;  --danger-soft:  rgba(240,139,128,.15);
    --neutral-text: #aab2bd;  --neutral-soft: rgba(255,255,255,.07);

    --shadow-sm: 0 1px 2px rgba(0,0,0,.40);
    --shadow:    0 2px 8px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 14px 40px rgba(0,0,0,.60);
    --shadow-brand: 0 6px 20px rgba(21,173,91,.35);

    --overlay: rgba(0, 0, 0, 0.66);
    color-scheme: dark;
}

/* ============================================================
   2. BASE
============================================================ */
* { -webkit-tap-highlight-color: transparent; }

html, body {
    background: var(--bg);
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.006em;
    transition: background-color .25s var(--ease), color .25s var(--ease);
}

[x-cloak] { display: none !important; }

h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 {
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.018em;
}

a { color: var(--brand-strong); }
hr { border-color: var(--border); opacity: 1; }

/* Bootstrap text-colour utilities → themed */
.text-dark      { color: var(--text) !important; }
.text-body      { color: var(--text) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-muted) !important; }
.text-success   { color: var(--success-text) !important; }
.text-primary   { color: var(--info-text) !important; }
.text-warning   { color: var(--warning-text) !important; }
.text-danger    { color: var(--danger-text) !important; }
.bg-white       { background-color: var(--surface) !important; }
.border, .border-top, .border-bottom, .border-start, .border-end {
    border-color: var(--border) !important;
}
small, .small { color: inherit; }

/* Themed selection + scrollbars */
::selection { background: var(--brand-ring); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 8px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* Page content fade-in */
main > * { animation: page-in .32s var(--ease) both; }
@keyframes page-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   3. CARDS
============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card-title { font-weight: 600; font-size: 15px; color: var(--text); }

/* Rows / cards that navigate on click get a hover lift */
tr[style*="cursor: pointer"]:hover,
tr[style*="cursor:pointer"]:hover { background: var(--surface-hover); }

/* ============================================================
   4. BUTTONS
============================================================ */
.btn {
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background-color .15s var(--ease), border-color .15s var(--ease),
                box-shadow .15s var(--ease), transform .06s var(--ease), color .15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-success {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.10);
}
.btn-success:hover, .btn-success:focus {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-success:disabled { background: var(--brand); border-color: var(--brand); }

.btn-danger {
    background: #e24b4a; border-color: #e24b4a;
}
.btn-danger:hover, .btn-danger:focus { background: #c93b3a; border-color: #c93b3a; }

.btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border-strong);
    background: var(--surface);
}
.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background: var(--surface-3);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-outline-success {
    color: var(--brand-strong); border-color: var(--brand);
    background: transparent;
}
.btn-outline-success:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.btn-outline-warning {
    color: var(--warning-text); border-color: var(--warning-text);
}
.btn-outline-warning:hover { background: var(--warning-text); color: #fff; }
.btn-outline-danger { color: var(--danger-text); border-color: var(--danger-text); }
.btn-outline-danger:hover { background: var(--danger-text); border-color: var(--danger-text); color: #fff; }

.btn-link { color: var(--text-muted); text-decoration: none; }
.btn-link:hover { color: var(--brand-strong); }

/* Theme-toggle button */
.theme-toggle {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    width: 36px; height: 36px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all .15s var(--ease);
    flex-shrink: 0;
}
.theme-toggle:hover { color: var(--brand-strong); border-color: var(--brand); transform: rotate(-12deg); }
.theme-toggle i { font-size: 18px; }
.theme-icon-dark  { display: none; }
html[data-theme="dark"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark  { display: inline-block; }

/* ============================================================
   5. TABLES
============================================================ */
.table { color: var(--text); --bs-table-bg: transparent; margin-bottom: 0; }

.table.dataTable thead.thead-light th,
.table thead.thead-light th {
    background: var(--surface-2);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: none;
    letter-spacing: 0.01em;
    border-bottom: 1px solid var(--border);
    border-top: none;
    padding: 11px 14px;
}
.table.dataTable td,
.table td {
    font-size: 13px;
    padding: 11px 14px;
    vertical-align: middle;
    border-color: var(--border);
    color: var(--text);
}
.table.rounded {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
/* Soften the bordered look — outer frame only, light inner separators */
.table-bordered, .table-bordered td, .table-bordered th { border: none; }
.table-bordered tbody tr { border-top: 1px solid var(--border); }
.table.dataTable.table-hover tbody tr { transition: background-color .12s var(--ease); }
.table.dataTable.table-hover tbody tr:hover { background: var(--surface-hover); }

/* ============================================================
   6. FORMS
============================================================ */
.form-control, .form-select {
    /* background-color only — `background` shorthand would wipe the
       Bootstrap chevron SVG on <select>. */
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}
.form-control::placeholder { color: var(--text-faint); }
.form-control:focus, .form-select:focus {
    background-color: var(--surface);
    border-color: var(--brand);
    color: var(--text);
    box-shadow: 0 0 0 3.5px var(--brand-ring);
}
.form-control:disabled, .form-select:disabled { background-color: var(--surface-3); }
.form-label { color: var(--text-muted); font-weight: 500; font-size: 12.5px; }
.form-check-input { background-color: var(--surface); border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--brand-ring); border-color: var(--brand); }
.invalid-feedback { color: var(--danger-text); font-size: 11.5px; }
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"] { color-scheme: dark; }
/* Light dropdown chevron for <select> in dark mode */
html[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2399a1ac' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* ============================================================
   7. BADGES + SOFT BACKGROUNDS
============================================================ */
.badge {
    font-weight: 600;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.005em;
}
.bg-success-soft   { background-color: var(--success-soft) !important; }
.bg-secondary-soft { background-color: var(--neutral-soft) !important; }
.bg-warning-soft   { background-color: var(--warning-soft) !important; }
.bg-info-soft      { background-color: var(--info-soft) !important; }
.bg-danger-soft    { background-color: var(--danger-soft) !important; }
.text-success.bg-success-soft, .bg-success-soft.text-success { color: var(--success-text) !important; }

/* ============================================================
   8. ALERTS
============================================================ */
.alert { border-radius: var(--radius); border: 1px solid transparent; font-size: 13px; }
.alert-warning {
    background: var(--warning-soft); color: var(--warning-text);
    border-color: color-mix(in srgb, var(--warning-text) 26%, transparent);
}
.alert-success {
    background: var(--success-soft); color: var(--success-text);
    border-color: color-mix(in srgb, var(--success-text) 26%, transparent);
}
.alert-info {
    background: var(--info-soft); color: var(--info-text);
    border-color: color-mix(in srgb, var(--info-text) 26%, transparent);
}
.alert-danger {
    background: var(--danger-soft); color: var(--danger-text);
    border-color: color-mix(in srgb, var(--danger-text) 26%, transparent);
}
.alert strong { color: inherit; }

/* ============================================================
   9. DROPDOWN MENUS
============================================================ */
.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    font-size: 13px;
    animation: dropdown-in .14s var(--ease);
}
@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
    color: var(--text);
    border-radius: 7px;
    padding: 7px 10px;
    font-weight: 450;
    transition: background-color .1s var(--ease);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3); color: var(--text); }
.dropdown-item.text-danger:hover { background: var(--danger-soft); color: var(--danger-text); }
.dropdown-item i { width: 18px; }
.dropdown-divider { border-color: var(--border); margin: 5px 2px; }

/* ============================================================
   10. ADMIN SHELL — sidebar + topbar
============================================================ */
.admin-shell { background: var(--bg); }

/* Comfortable, responsive breathing room around page content.
   Caps very wide screens and keeps content off the edges. */
.app-content > .container-fluid {
    max-width: 1800px;
    margin-inline: auto;
    padding-left: 32px;
    padding-right: 32px;
}
@media (max-width: 991.98px) {
    .app-content > .container-fluid { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 575.98px) {
    .app-content > .container-fluid { padding-left: 14px; padding-right: 14px; }
}

.admin-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
}
.brand-dot {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--brand-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    box-shadow: var(--shadow-brand);
}
.brand-name { font-weight: 600; font-size: 14.5px; line-height: 1.15; color: var(--text); }
.brand-sub  { font-size: 11.5px; color: var(--text-muted); line-height: 1.15; }
.nav-group-label { color: var(--text-faint) !important; font-weight: 600; letter-spacing: .06em; }

.admin-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.admin-topbar .fw-medium { color: var(--text); }

.admin-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 3px;
    position: relative;
    transition: background-color .13s var(--ease), color .13s var(--ease);
}
.admin-nav-link:hover { background: var(--surface-3); color: var(--text); }
.admin-nav-link.active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 600;
}
.admin-nav-link.active::before {
    content: ""; position: absolute; left: -2px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--brand);
    border-radius: 3px;
}
.admin-nav-link i { font-size: 17px; width: 20px; text-align: center; }
.nav-badge {
    margin-left: auto;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e5484d;
    color: #fff;
    font-size: 11px; font-weight: 700;
    border-radius: 999px;
    line-height: 1;
}
.admin-nav-link.active .nav-badge { box-shadow: 0 0 0 2px var(--brand-soft); }

/* ============================================================
   11. AVATAR + TABS
============================================================ */
.avatar-circle {
    width: 50px; height: 50px;
    border-radius: 14px;
    background: var(--brand-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 18px;
    flex-shrink: 0;
    box-shadow: var(--shadow-brand);
}

.employee-tabs.nav-tabs, .timer-tabs.nav-tabs {
    border-bottom: 1px solid var(--border);
    gap: 2px;
}
.timer-tabs.nav-tabs {
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 4px 6px 0;
}
.employee-tabs .nav-link, .timer-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: color .13s var(--ease), background-color .13s var(--ease);
}
.employee-tabs .nav-link:hover, .timer-tabs .nav-link:hover {
    color: var(--text);
    background: var(--surface-hover);
    border-color: transparent;
}
.employee-tabs .nav-link.active, .timer-tabs .nav-link.active {
    color: var(--brand-strong);
    background: transparent;
    border-bottom-color: var(--brand);
    font-weight: 600;
}

/* ============================================================
   12. PULSE
============================================================ */
.pulse-inline {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--brand);
    margin-right: 5px;
    vertical-align: middle;
    box-shadow: 0 0 0 0 var(--brand-ring);
    animation: pulse-ring 1.5s infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 var(--brand-ring); }
    70%  { box-shadow: 0 0 0 7px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* ============================================================
   13. STAT CARDS
============================================================ */
.stat-card, .stat-card-pn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.stat-card:hover, .stat-card-pn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}
.stat-card-green {
    background: var(--brand-grad);
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}
.stat-card-label, .stat-pn-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    font-weight: 600;
}
.stat-card-num, .stat-pn-num {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}
.stat-card-green .stat-card-label,
.stat-card-green .stat-card-num,
.stat-card-green .stat-card-names { color: #fff !important; }
.stat-card-green .stat-card-label { opacity: .85; }
.stat-card-names {
    margin-top: 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 11px;
    color: var(--text-muted);
}

.table-row-on-duty td, .table-success-soft td {
    background: var(--brand-soft) !important;
}

/* ============================================================
   14. VAKTPLANER — weekly grid
============================================================ */
.shifts-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.shifts-grid { min-width: 1100px; table-layout: fixed; }
.shifts-grid .employee-col {
    width: 168px; min-width: 168px;
    background: var(--surface);
    font-size: 13px;
    vertical-align: middle;
}
.shifts-grid .sticky-col {
    position: sticky; left: 0; z-index: 5;
    box-shadow: 1px 0 0 var(--border);
}
.shifts-grid .day-col {
    width: calc((100% - 168px) / 7);
    min-width: 130px;
    background: var(--surface-2);
    font-weight: 600;
    font-size: 12px;
    vertical-align: middle;
    padding: 9px 4px;
}
.shifts-grid .day-col .weekday-short {
    text-transform: capitalize;
    font-size: 11px;
    color: var(--text-faint);
}
.shifts-grid .day-col .day-label { font-size: 14px; color: var(--text); font-weight: 600; }
.shifts-grid .today-col { background: var(--brand-soft) !important; }
.shifts-grid .day-cell {
    height: 92px;
    vertical-align: top;
    padding: 5px;
    cursor: pointer;
    position: relative;
    transition: background .12s var(--ease);
}
.shifts-grid .day-cell:hover { background: var(--surface-hover); }
.shifts-grid .day-cell .empty-hint {
    height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: transparent;
    font-size: 20px;
    transition: color .12s var(--ease);
}
.shifts-grid .day-cell:hover .empty-hint { color: var(--brand); }
.shifts-grid .shift-block {
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
    border-left: 3px solid var(--brand);
    border-radius: 7px;
    padding: 5px 7px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: transform .12s var(--ease), box-shadow .12s var(--ease);
    line-height: 1.25;
}
.shifts-grid .shift-block:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.shifts-grid .shift-block .shift-time { color: var(--brand-strong); font-weight: 600; font-size: 12px; }
.shifts-grid .shift-block .shift-role {
    color: var(--text-muted); font-size: 10px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shifts-grid .shift-block.shift-cancelled {
    background: var(--surface-3);
    border-color: var(--border);
    border-left-color: var(--text-faint);
    opacity: 0.6;
    text-decoration: line-through;
}

/* Active absences on a day — tinted cell, badge, no click-to-create */
.shifts-grid .day-cell.absence-cell { cursor: not-allowed; }
.shifts-grid .day-cell.absence-cell:hover { background: inherit; }
.shifts-grid .day-cell.absence-cell .empty-hint { display: none; }

.shifts-grid .day-cell.absence-sykmelding  { background: #fde8e8; }
.shifts-grid .day-cell.absence-egenmelding { background: #fde8e8; }
.shifts-grid .day-cell.absence-ferie       { background: #e3f3e8; }
.shifts-grid .day-cell.absence-permisjon   { background: #e6eefb; }
.shifts-grid .day-cell.absence-annet       { background: #f0eee5; }

html[data-theme="dark"] .shifts-grid .day-cell.absence-sykmelding,
html[data-theme="dark"] .shifts-grid .day-cell.absence-egenmelding { background: rgba(229,72,77,.16); }
html[data-theme="dark"] .shifts-grid .day-cell.absence-ferie       { background: rgba(2,171,79,.16); }
html[data-theme="dark"] .shifts-grid .day-cell.absence-permisjon   { background: rgba(29,111,184,.18); }
html[data-theme="dark"] .shifts-grid .day-cell.absence-annet       { background: rgba(180,107,0,.18); }

.shifts-grid .day-cell .absence-block {
    height: 100%;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 2px;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-align: center;
    pointer-events: none;
}
.shifts-grid .day-cell .absence-block i { font-size: 16px; opacity: .65; }

/* Portal shift list */
.day-row.today-row { background: var(--brand-soft); }
.shift-row-block { padding: 2px 0; font-size: 14px; }

/* ============================================================
   15. DOCUMENTS — upload zone + list
============================================================ */
.upload-zone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 34px 16px;
    text-align: center;
    cursor: pointer;
    transition: all .16s var(--ease);
    background: var(--surface-2);
    color: var(--text-muted);
}
.upload-zone:hover, .upload-zone.is-dragover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-strong);
}
.upload-zone.is-dragover { border-style: solid; transform: scale(1.01); }
.upload-zone.is-uploading { border-color: var(--brand); background: var(--surface); cursor: progress; }
.upload-zone .upload-icon { font-size: 30px; color: var(--text-faint); }
.upload-zone:hover .upload-icon, .upload-zone.is-dragover .upload-icon { color: var(--brand); }

.document-list { display: flex; flex-direction: column; gap: 8px; }
.doc-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: background .12s var(--ease), border-color .12s var(--ease), transform .12s var(--ease);
}
.doc-row:hover { background: var(--surface-hover); border-color: var(--border-strong); transform: translateX(2px); }
.doc-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
    flex-shrink: 0;
}
.doc-meta { min-width: 0; }
.doc-name { font-weight: 600; font-size: 13px; color: var(--text); }
.doc-sub  { font-size: 11px; color: var(--text-muted); }
.doc-actions { display: flex; gap: 2px; flex-shrink: 0; }

/* ============================================================
   16. MODALS
============================================================ */
.modal-overlay {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: overlay-in .18s var(--ease);
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
    background: var(--surface) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text);
    animation: modal-in .22s var(--ease);
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-content .text-uppercase.small { color: var(--text-faint) !important; letter-spacing: .06em; font-weight: 600; }

/* ============================================================
   17. SWEETALERT — themed
============================================================ */
.swal2-popup {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border);
}
.swal2-title, .swal2-html-container { color: var(--text) !important; }
.swal2-input, .swal2-textarea {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-sm) !important;
}
.swal2-styled { border-radius: var(--radius-sm) !important; font-weight: 600 !important; }
.swal2-styled.swal2-confirm { box-shadow: none !important; }

/* ============================================================
   18. FOCUS-VISIBLE
============================================================ */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.admin-nav-link:focus-visible,
.dropdown-item:focus-visible,
a:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ============================================================
   19. MOBILE
============================================================ */
@media (max-width: 575.98px) {
    .avatar-circle { width: 42px; height: 42px; font-size: 15px; border-radius: 12px; }
    .h4 { font-size: 18px; }
    .employee-tabs .nav-link, .timer-tabs .nav-link { padding: 10px 12px; }
    .stat-card-num, .stat-pn-num { font-size: 24px; }
    .table-responsive { font-size: 12px; }
}

/* ============================================================
   20. SUPERADMIN DASHBOARD
============================================================ */
.sa-hero {
    background: var(--brand-grad);
    border-radius: var(--radius-lg);
    padding: 26px 30px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-brand);
    position: relative;
    overflow: hidden;
}
.sa-hero::after {
    content: "";
    position: absolute;
    right: -70px; top: -90px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
    pointer-events: none;
}
.sa-hero-title { font-size: 23px; font-weight: 700; margin: 0; color: #fff; letter-spacing: -0.02em; }
.sa-hero-sub   { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.sa-hero-badge {
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

/* Stat grid — auto-fit so it never overflows the viewport */
.sa-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 216px), 1fr));
    gap: 16px;
}
.sa-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.sa-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}
.sa-stat-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 23px;
}
.sa-stat-value {
    font-size: 32px; font-weight: 700; line-height: 1;
    color: var(--text); letter-spacing: -0.025em;
}
.sa-stat-label {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 3px;
}
.sa-stat-sub { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.sa-stat-link { font-size: 12px; font-weight: 600; color: var(--brand-strong); margin-top: 5px; }

/* Accent icon chips */
.ic-green  { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-strong); }
.ic-blue   { background: color-mix(in srgb, #2f86d6 16%, transparent);      color: #2f86d6; }
.ic-violet { background: color-mix(in srgb, #7c5cdb 17%, transparent);      color: #7c5cdb; }
.ic-amber  { background: color-mix(in srgb, #d8941f 18%, transparent);      color: #c8861a; }
html[data-theme="dark"] .ic-amber  { color: #e8b765; }
html[data-theme="dark"] .ic-blue   { color: #6cb6f0; }
html[data-theme="dark"] .ic-violet { color: #a892ec; }

/* Firma list */
.sa-firma-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 10px;
    transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s var(--ease);
}
.sa-firma-row:last-child { margin-bottom: 0; }
.sa-firma-row:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
    border-color: var(--brand);
}
.sa-firma-avatar {
    width: 46px; height: 46px;
    border-radius: 13px;
    background: var(--brand-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    flex-shrink: 0;
    box-shadow: var(--shadow-brand);
}
.sa-firma-name { font-weight: 600; font-size: 14.5px; color: var(--text); }
.sa-firma-org  { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.sa-firma-stats { display: flex; gap: 24px; }
.sa-firma-fig { text-align: center; }
.sa-firma-fig-num   { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.1; }
.sa-firma-fig-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.sa-plan {
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 4px 10px; border-radius: 999px;
}
.sa-plan-free       { background: var(--neutral-soft); color: var(--neutral-text); }
.sa-plan-pro        { background: color-mix(in srgb, #2f86d6 16%, transparent); color: #2f86d6; }
.sa-plan-enterprise { background: color-mix(in srgb, #7c5cdb 18%, transparent); color: #7c5cdb; }
html[data-theme="dark"] .sa-plan-pro        { color: #6cb6f0; }
html[data-theme="dark"] .sa-plan-enterprise { color: #a892ec; }

/* Hero avatar (firma detail) */
.sa-hero-avatar {
    width: 58px; height: 58px;
    border-radius: 16px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.24);
    color: #fff; font-weight: 700; font-size: 21px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative; z-index: 1;
}
.sa-hero-ident { position: relative; z-index: 1; min-width: 0; }
.sa-hero-actions { position: relative; z-index: 1; }

/* Light list rows — admin / employee lists on the firma detail page */
.sa-list-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    margin-bottom: 8px;
    transition: background-color .12s var(--ease), border-color .12s var(--ease);
}
.sa-list-row:last-child { margin-bottom: 0; }
.sa-list-row:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.sa-list-avatar {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.sa-list-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.sa-list-sub  { font-size: 12px; color: var(--text-muted); }

/* Pricing plan cards */
.sa-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 266px), 1fr));
    gap: 20px;
    align-items: start;
}
.sa-plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.sa-plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sa-plan-card.is-featured { border-color: var(--brand); box-shadow: var(--shadow-brand); }
.sa-plan-card.is-inactive { opacity: .55; }
.sa-plan-tag {
    position: absolute; top: -11px; left: 24px;
    background: var(--brand-grad); color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    padding: 4px 11px; border-radius: 999px;
    box-shadow: var(--shadow-brand);
}
.sa-plan-card-name { font-size: 17px; font-weight: 700; color: var(--text); }
.sa-plan-card-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.sa-plan-price { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 2px; }
.sa-plan-price-num { font-size: 33px; font-weight: 800; color: var(--text); letter-spacing: -.025em; line-height: 1; }
.sa-plan-price-per { font-size: 13px; color: var(--text-muted); }
.sa-plan-feats { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 9px; }
.sa-plan-feats li { display: flex; gap: 8px; font-size: 13px; color: var(--text); line-height: 1.35; }
.sa-plan-feats li i { color: var(--brand); font-size: 16px; flex-shrink: 0; }
.sa-plan-foot {
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sa-plan-usage { font-size: 12px; color: var(--text-muted); }
.sa-plan-usage strong { color: var(--text); font-size: 15px; }

/* Contract template cards */
.sa-tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 18px;
    align-items: start;
}
.sa-tpl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.sa-tpl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.sa-tpl-icon {
    width: 42px; height: 42px; border-radius: 11px;
    background: color-mix(in srgb, var(--brand) 15%, transparent);
    color: var(--brand-strong);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; flex-shrink: 0;
}
.sa-tpl-name { font-weight: 700; font-size: 14.5px; color: var(--text); }
.sa-tpl-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sa-tpl-excerpt {
    margin-top: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 11.5px; line-height: 1.55;
    color: var(--text-muted);
    white-space: pre-wrap;
    max-height: 132px;
    overflow: hidden;
    position: relative;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}
.sa-tpl-excerpt::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
    background: linear-gradient(transparent, var(--surface-2));
}

@media (max-width: 767.98px) {
    .sa-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px; }
    .sa-hero-badge { justify-content: center; }
    .sa-firma-row { flex-wrap: wrap; }
    .sa-firma-stats { gap: 18px; }
    .sa-stat-value { font-size: 27px; }
}

@media (max-width: 575.98px) {
    .sa-hero { padding: 20px; }
    .sa-hero-title { font-size: 20px; }
    .sa-stats { gap: 12px; }
    /* Firma row: drop the plan + key figures onto their own full-width line */
    .sa-firma-row > .ms-auto {
        margin-left: 0 !important;
        width: 100%;
        justify-content: space-between;
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }
    .sa-firma-stats { gap: 14px; }
    .sa-firma-row .ti-chevron-right { display: none; }
}

/* ============================================================
   21. FRAVÆR — årskalender
============================================================ */
.fk-toggle {
    display: inline-flex;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.fk-toggle a {
    padding: 7px 15px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--surface);
    transition: background-color .12s var(--ease), color .12s var(--ease);
}
.fk-toggle a + a { border-left: 1px solid var(--border-strong); }
.fk-toggle a:hover { background: var(--surface-3); color: var(--text); }
.fk-toggle a.active { background: var(--brand); color: #fff; }

/* Month calendar grid */
.cal-grid {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.cal-weekdays, .cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.cal-weekdays { background: var(--surface-2); }
.cal-weekday {
    padding: 9px 4px;
    text-align: center;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .03em;
}
.cal-day {
    min-height: 106px;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    padding: 6px;
    display: flex; flex-direction: column; gap: 3px;
    background: var(--surface);
}
.cal-week .cal-day:first-child { border-left: none; }
.cal-day.is-outside { background: var(--surface-2); }
.cal-day.is-outside .cal-daynum { color: var(--text-faint); }
.cal-day.is-weekend:not(.is-outside) {
    background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}
.cal-daynum {
    font-size: 12px; font-weight: 600; color: var(--text);
    align-self: flex-start;
    min-width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
}
.cal-day.is-today .cal-daynum {
    background: var(--brand); color: #fff; border-radius: 50%;
}
.cal-chip {
    font-size: 11px; font-weight: 600; color: #fff;
    padding: 2px 7px; border-radius: 5px;
    cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: filter .12s var(--ease), transform .1s var(--ease);
}
.cal-chip:hover { filter: brightness(1.1); transform: translateX(1px); }
.cal-chip-ferie       { background: var(--brand); }
.cal-chip-egenmelding { background: #d8941f; }
.cal-chip-sykmelding  { background: #d9504e; }
.cal-chip-permisjon   { background: #5b6470; }
.cal-chip-annet       { background: #8a93a0; }
.cal-chip.is-pending {
    background-image: repeating-linear-gradient(45deg,
        rgba(255,255,255,.4) 0 5px, transparent 5px 10px);
}

@media (max-width: 575.98px) {
    .cal-day { min-height: 74px; padding: 4px; gap: 2px; }
    .cal-chip { font-size: 10px; padding: 1px 5px; }
    .cal-weekday { padding: 7px 2px; font-size: 10px; }
}

/* Year overview — 12 mini-months */
.cy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
    gap: 14px;
}
.cy-month {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 13px 14px;
}
.cy-month-name {
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: 13px;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 9px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    transition: color .12s var(--ease);
}
.cy-month-name:hover { color: var(--brand-strong); }
.cy-month-name i { font-size: 15px; opacity: .45; transition: opacity .12s var(--ease); }
.cy-month-name:hover i { opacity: 1; }
.cy-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cy-wd { font-size: 9px; font-weight: 700; text-align: center; color: var(--text-faint); }
.cy-d {
    font-size: 10px; text-align: center;
    color: var(--text);
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.cy-d.is-outside { color: var(--text-faint); opacity: .35; }
.cy-d.is-today { outline: 1.5px solid var(--brand); outline-offset: -1.5px; }
.cy-d.has-abs { color: #fff; font-weight: 700; cursor: pointer; }
.cy-d.has-abs:hover { filter: brightness(1.12); transform: scale(1.12); }
.cy-d.abs-ferie       { background: var(--brand); }
.cy-d.abs-egenmelding { background: #d8941f; }
.cy-d.abs-sykmelding  { background: #d9504e; }
.cy-d.abs-permisjon   { background: #5b6470; }
.cy-d.abs-annet       { background: #8a93a0; }

.fk-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.fk-legend span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.fk-legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }

/* ============================================================
   22. NOTIFICATION BELL
============================================================ */
.notif { position: relative; }
.notif-bell {
    border: none; background: transparent;
    width: 36px; height: 36px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: background-color .12s var(--ease), color .12s var(--ease);
}
.notif-bell:hover { background: var(--surface-3); color: var(--text); }
.notif-bell i { font-size: 20px; }
.notif-badge {
    position: absolute; top: 1px; right: 1px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    background: var(--warning-text); color: #fff;
    border-radius: 999px;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
}
.notif-badge.is-danger { background: var(--danger-text); }

.notif-panel {
    position: absolute; right: 0; top: 44px;
    width: 350px; max-width: 90vw;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1080;
    max-height: 72vh; overflow-y: auto;
}
.notif-head {
    padding: 11px 15px;
    font-weight: 600; font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: var(--surface);
}
.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 15px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--text);
    transition: background-color .1s var(--ease);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item i { font-size: 17px; margin-top: 1px; flex-shrink: 0; }
.notif-warning i { color: var(--warning-text); }
.notif-danger  i { color: var(--danger-text); }
.notif-empty {
    padding: 26px 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.notif-empty i { font-size: 18px; vertical-align: -2px; margin-right: 3px; }

/* ============================================================
   23. LOGIN / AUTH PAGES
============================================================ */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    position: relative; overflow: hidden;
}
.login-page::before, .login-page::after {
    content: ""; position: fixed; border-radius: 50%;
    filter: blur(90px); opacity: .5; pointer-events: none; z-index: 0;
}
.login-page::before {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #02ab4f, transparent 70%);
    top: -160px; right: -120px;
}
.login-page::after {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #1d6fb8, transparent 70%);
    bottom: -180px; left: -120px; opacity: .28;
}
.login-wrap { width: 410px; max-width: 100%; position: relative; z-index: 1; }
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: login-rise .4s var(--ease) both;
}
@keyframes login-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.login-brandbar { background: var(--brand-grad); padding: 26px 32px 22px; color: #fff; }
.login-mark {
    width: 46px; height: 46px; border-radius: 13px;
    background: rgba(255,255,255,.18); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; margin-bottom: 14px;
}
.login-brandbar h1 { color: #fff; font-size: 21px; margin: 0; font-weight: 700; }
.login-brandbar p  { color: rgba(255,255,255,.85); font-size: 13px; margin: 2px 0 0; }
.login-body { padding: 26px 32px 30px; }
.login-body .form-control { padding: 10px 12px; }
.input-icon { position: relative; }
.input-icon i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-faint); font-size: 17px;
}
.input-icon .form-control { padding-left: 38px; }
.btn-login { width: 100%; padding: 11px; font-size: 15px; font-weight: 600; }
.login-foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--text-muted); }
.login-alt {
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center; font-size: 13px; color: var(--text-muted);
}
.demo-box {
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid var(--border); text-align: center;
}
.demo-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px; padding: 5px 12px; font-size: 12px;
    color: var(--text-muted); margin: 3px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}
@media (max-width: 575.98px) {
    .login-brandbar { padding: 22px 22px 18px; }
    .login-body { padding: 22px 22px 26px; }
}
