/* ══════════════════════════════════════════════════════════════════
   IVAC Slot Booking Server — Design System
   Refined dark: neutral surfaces, one accent, flat elevation.
══════════════════════════════════════════════════════════════════ */

:root {
    /* ── Surfaces ─────────────────────────────────────────────── */
    --bg:          #0c0e11;   /* app canvas                       */
    --bg2:         #101317;   /* sidebar, table head, sub-headers  */
    --bg3:         #14181d;   /* cards                             */
    --bg4:         #191e24;   /* inputs, nested cards              */
    --bg5:         #202730;   /* hover                             */
    --card2:       #191e24;   /* legacy alias                      */
    --border:      #232930;
    --border2:     #2f373f;

    /* ── Text ─────────────────────────────────────────────────── */
    --text:        #e7eaee;
    --text2:       #aab2bd;
    --dim:         #7d8795;
    --muted:       #575f6b;

    /* ── Accent (the only saturated brand colour) ─────────────── */
    --blue:        #5b8def;
    --blue-glow:   rgba(91,141,239,.16);
    --blue-dim:    rgba(91,141,239,.10);
    --blue-line:   rgba(91,141,239,.28);

    /* ── Status (used for meaning only, never decoration) ─────── */
    --green:       #4ea87c;
    --green-glow:  rgba(78,168,124,.16);
    --green-dim:   rgba(78,168,124,.10);
    --red:         #d9615c;
    --red-glow:    rgba(217,97,92,.16);
    --red-dim:     rgba(217,97,92,.10);
    --orange:      #cf8a4b;
    --orange-dim:  rgba(207,138,75,.10);
    --yellow:      #c9a227;
    --yellow-dim:  rgba(201,162,39,.10);
    --teal:        #4a9a97;
    --teal-dim:    rgba(74,154,151,.10);
    --purple:      #8b7ec8;
    --purple-dim:  rgba(139,126,200,.10);
    --pink:        #c2789e;

    /* ── Type / shape / motion ────────────────────────────────── */
    --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono:        'JetBrains Mono', 'Fira Code', monospace;
    --r:           8px;
    --r-sm:        6px;
    --r-lg:        12px;
    --r-xl:        14px;
    --shadow:      0 1px 2px rgba(0,0,0,.28);
    --shadow-lg:   0 12px 32px rgba(0,0,0,.4);
    --transition:  all .15s ease;
}

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

html, body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

#app { height: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Icons ────────────────────────────────────────────────────── */
.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: -3px;
}
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; vertical-align: -4px; }
.icon-xl { width: 28px; height: 28px; vertical-align: -6px; }

/* ══════════════════════════════════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════════════════════════════════ */
.auth-screen {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: auto;
    padding: 32px 16px;
}

/* Static grid wash — replaces the animated blur orbs */
.auth-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: .35;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: 400px;
    max-width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 44px; height: 44px;
    margin: 0 auto 14px;
    border-radius: var(--r);
    background: var(--blue);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: grid;
    place-items: center;
    letter-spacing: .5px;
}

.auth-logo h1 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.2px;
    color: var(--text);
}

.auth-logo p {
    color: var(--dim);
    font-size: 13px;
    margin-top: 4px;
}

.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
}

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; min-width: 0; }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 11px;
    z-index: 1;
    pointer-events: none;
    color: var(--muted);
    display: flex;
    transition: color .15s ease;
}

.input-wrap:focus-within .input-icon { color: var(--blue); }

.input-wrap input, .input-wrap select {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    -webkit-appearance: none;
}

.input-wrap input:focus, .input-wrap select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

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

.input-wrap select { cursor: pointer; padding-right: 30px; }

.input-toggle-pw {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    padding: 3px;
    border: none;
    background: none;
    border-radius: 4px;
    user-select: none;
    z-index: 1;
    transition: color .15s ease;
}
.input-toggle-pw:hover { color: var(--text2); }
.input-toggle-pw:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.auth-switch {
    text-align: center;
    color: var(--dim);
    font-size: 13px;
    margin-top: 4px;
}

.auth-switch a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}
.auth-switch a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
}

.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .icon { width: 15px; height: 15px; vertical-align: 0; }

.btn-full { width: 100%; }

.btn-primary {
    background: var(--blue);
    color: #fff;
}
.btn-primary:hover:not(:disabled) { background: #6d9bf2; }

/* Status buttons are tonal, not filled — keeps one loud colour on screen */
.btn-green  { background: var(--green-dim);  color: var(--green);  border-color: rgba(78,168,124,.25); }
.btn-green:hover:not(:disabled)  { background: rgba(78,168,124,.18); }

.btn-red    { background: var(--red-dim);    color: var(--red);    border-color: rgba(217,97,92,.25); }
.btn-red:hover:not(:disabled)    { background: rgba(217,97,92,.18); }

.btn-orange { background: var(--orange-dim); color: var(--orange); border-color: rgba(207,138,75,.25); }
.btn-orange:hover:not(:disabled) { background: rgba(207,138,75,.18); }

.btn-teal   { background: var(--teal-dim);   color: var(--teal);   border-color: rgba(74,154,151,.25); }
.btn-teal:hover:not(:disabled)   { background: rgba(74,154,151,.18); }

.btn-ghost {
    background: var(--bg4);
    color: var(--text2);
    border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
    color: var(--text);
    background: var(--bg5);
    border-color: var(--border2);
}

.btn-ghost.danger:hover:not(:disabled) {
    color: var(--red);
    background: var(--red-dim);
    border-color: rgba(217,97,92,.3);
}

.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-xs { padding: 4px 9px; font-size: 12px; }

.btn-arrow { display: inline-flex; transition: transform .15s ease; }
.btn:hover .btn-arrow { transform: translateX(2px); }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════════════════════════════ */
.dashboard-screen { display: flex; height: 100%; }

.hidden { display: none !important; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
    width: 232px;
    height: 100%;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width .2s ease;
    z-index: 100;
}

.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .user-details,
.sidebar.collapsed .sidebar-sub { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 9px; }
.sidebar.collapsed .sidebar-header { justify-content: center; }
.sidebar.collapsed .sidebar-toggle { display: none; }
.sidebar.collapsed .sidebar-footer { justify-content: center; }

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    width: 30px; height: 30px;
    border-radius: var(--r-sm);
    background: var(--blue);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
    letter-spacing: .5px;
    flex-shrink: 0;
}

.sidebar-brand { flex: 1; min-width: 0; }
.sidebar-title { font-size: 13.5px; font-weight: 600; display: block; letter-spacing: -.1px; }
.sidebar-sub { font-size: 11px; color: var(--muted); font-family: var(--mono); }

.sidebar-toggle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    width: 26px; height: 26px;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text); background: var(--bg4); }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Rendered as <button> so the sidebar is reachable by keyboard */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: var(--r-sm);
    color: var(--dim);
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.nav-item:hover { background: var(--bg4); color: var(--text); }
.nav-item:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

.nav-item.active {
    background: var(--bg4);
    color: var(--text);
}
.nav-item.active .nav-icon { color: var(--blue); }

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    flex-shrink: 0;
    transition: color .15s ease;
}
.nav-item:hover .nav-icon { color: var(--text2); }

.nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 10px;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
}

.user-info { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }

.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    background: var(--blue);
}

.user-details { min-width: 0; }
.user-name { font-size: 12.5px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-country { font-size: 11px; color: var(--muted); display: block; }

.btn-logout {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    width: 28px; height: 28px;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.btn-logout:hover { background: var(--red-dim); color: var(--red); }

/* ── Main content ─────────────────────────────────────────────── */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg);
    min-width: 0;
}

.content-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    padding: 32px;
}

/* ── Page header ──────────────────────────────────────────────── */
.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.2px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.page-title-icon {
    display: flex;
    align-items: center;
    color: var(--dim);
}
.page-title-icon .icon { width: 19px; height: 19px; }

.page-subtitle {
    color: var(--dim);
    font-size: 13px;
    margin-top: 3px;
}

/* ── Stat cards ───────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px 18px;
    transition: border-color .15s ease;
}

.stat-card:hover { border-color: var(--border2); }

.stat-icon {
    display: flex;
    color: var(--muted);
    margin-bottom: 12px;
}
.stat-icon .icon { width: 18px; height: 18px; }

/* Colour classes now tint only the icon, not the whole card */
.stat-card.blue   .stat-icon { color: var(--blue); }
.stat-card.green  .stat-icon { color: var(--green); }
.stat-card.orange .stat-icon { color: var(--orange); }
.stat-card.teal   .stat-icon { color: var(--teal); }
.stat-card.purple .stat-icon { color: var(--purple); }
.stat-card.red    .stat-icon { color: var(--red); }

.stat-value {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.6px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--dim);
    font-size: 12.5px;
    margin-top: 4px;
}

/* ── Section card ─────────────────────────────────────────────── */
.section-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 16px;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.section-title .icon { color: var(--muted); }

.section-body { padding: 18px; }

/* ── Fields ───────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.field-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
}

.field-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.field-input:disabled { color: var(--muted); cursor: not-allowed; }
.field-input::placeholder { color: var(--muted); }

textarea.field-input { resize: vertical; min-height: 80px; }
select.field-input { cursor: pointer; -webkit-appearance: none; }

.field-row { display: flex; gap: 12px; }
.field-row .field-group { flex: 1; min-width: 0; }

/* ── Table ────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
    text-align: left;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--dim);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 11px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: var(--bg4); }

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.6;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; vertical-align: 0; }

.badge-green  { background: var(--green-dim);  color: var(--green);  border-color: rgba(78,168,124,.22); }
.badge-blue   { background: var(--blue-dim);   color: var(--blue);   border-color: var(--blue-line); }
.badge-red    { background: var(--red-dim);    color: var(--red);    border-color: rgba(217,97,92,.22); }
.badge-orange { background: var(--orange-dim); color: var(--orange); border-color: rgba(207,138,75,.22); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(201,162,39,.22); }
.badge-purple { background: var(--purple-dim); color: var(--purple); border-color: rgba(139,126,200,.22); }
.badge-teal   { background: var(--teal-dim);   color: var(--teal);   border-color: rgba(74,154,151,.22); }
.badge-gray   { background: var(--bg4);        color: var(--dim);    border-color: var(--border); }

/* ── Toggle switch ────────────────────────────────────────────── */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.toggle-label { font-size: 13px; color: var(--text2); }

.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }

.switch-track {
    position: absolute; inset: 0;
    background: var(--bg5);
    border: 1px solid var(--border2);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.switch-track::before {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    top: 3px; left: 3px;
    background: var(--dim);
    border-radius: 50%;
    transition: var(--transition);
}

.switch input:checked + .switch-track { background: var(--blue); border-color: var(--blue); }
.switch input:checked + .switch-track::before { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--blue-glow); }

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 44px 24px;
    color: var(--dim);
}

.empty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--muted);
}
.empty-icon .icon { width: 30px; height: 30px; stroke-width: 1.4; }

.empty-title { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.empty-text { font-size: 13px; color: var(--dim); margin-bottom: 18px; }
.empty-state p:last-child { margin-bottom: 0; }

/* ── Activity log ─────────────────────────────────────────────── */
.log-list { display: flex; flex-direction: column; max-height: 500px; overflow-y: auto; }

.log-entry {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    font-family: var(--mono);
    font-size: 12px;
    transition: background .12s;
}

.log-entry:hover { background: var(--bg4); }

.log-ts { color: var(--muted); font-size: 11px; flex-shrink: 0; min-width: 66px; }

.log-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    min-width: 42px;
    text-align: center;
    font-family: var(--font);
    letter-spacing: .3px;
}

.log-badge.ok   { background: var(--green-dim);  color: var(--green); }
.log-badge.err  { background: var(--red-dim);    color: var(--red); }
.log-badge.warn { background: var(--yellow-dim); color: var(--yellow); }
.log-badge.info { background: var(--blue-dim);   color: var(--blue); }

.log-msg { color: var(--text2); word-break: break-word; line-height: 1.55; }
.log-msg.ok   { color: var(--text2); }
.log-msg.err  { color: var(--red); }
.log-msg.warn { color: var(--yellow); }

/* ── Upload zone ──────────────────────────────────────────────── */
.upload-zone {
    border: 1px dashed var(--border2);
    border-radius: var(--r);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg4);
}

.upload-zone:hover, .upload-zone.dragover, .upload-zone:focus-visible {
    border-color: var(--blue);
    background: var(--blue-dim);
}
.upload-zone:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.upload-zone-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--muted);
}
.upload-zone-icon .icon { width: 24px; height: 24px; stroke-width: 1.5; }
.upload-zone:hover .upload-zone-icon { color: var(--blue); }

.upload-zone-text { color: var(--dim); font-size: 13px; }
.upload-zone-text strong { color: var(--text); font-weight: 500; }

/* ── File card ────────────────────────────────────────────────── */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }

.file-card {
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color .15s ease;
}

.file-card:hover { border-color: var(--border2); }

.file-icon {
    width: 34px; height: 34px;
    border-radius: var(--r-sm);
    background: var(--bg5);
    color: var(--dim);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta {
    font-size: 12px;
    color: var(--dim);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.file-meta .icon { width: 12px; height: 12px; vertical-align: 0; }

.file-actions { display: flex; gap: 4px; }

.file-action-btn {
    width: 28px; height: 28px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
}
.file-action-btn:hover { color: var(--text); background: var(--bg5); border-color: var(--border); }
.file-action-btn.danger:hover { color: var(--red); background: var(--red-dim); border-color: rgba(217,97,92,.25); }

/* ── Account card ─────────────────────────────────────────────── */
.account-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px;
    margin-bottom: 12px;
    transition: border-color .15s ease;
}

.account-card:hover { border-color: var(--border2); }

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.account-info { display: flex; align-items: center; gap: 11px; min-width: 0; }

.account-avatar {
    width: 34px; height: 34px;
    border-radius: var(--r-sm);
    background: var(--bg5);
    color: var(--dim);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.account-name { font-size: 13.5px; font-weight: 600; }
.account-phone { font-size: 12px; color: var(--dim); font-family: var(--mono); }

.account-body { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.account-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 12px;
    color: var(--text2);
}

.account-tag-icon { display: flex; color: var(--muted); }
.account-tag-icon .icon { width: 13px; height: 13px; vertical-align: 0; }

.account-actions { display: flex; gap: 8px; align-items: center; }

/* ── Monitor card ─────────────────────────────────────────────── */
.monitor-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px;
    margin-bottom: 12px;
    transition: border-color .15s ease;
}

.monitor-card:hover { border-color: var(--border2); }
.monitor-card.running { border-color: rgba(78,168,124,.35); }

.monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.monitor-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
}

.monitor-card.running .monitor-status-dot {
    background: var(--green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.monitor-stats {
    display: flex;
    gap: 28px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.monitor-stat-value {
    font-size: 17px;
    font-weight: 600;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    min-height: 24px;
}
.monitor-stat-value .icon { width: 16px; height: 16px; }
.monitor-stat-label { font-size: 11.5px; color: var(--dim); margin-top: 2px; }

/* ── Booking card ─────────────────────────────────────────────── */
.booking-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px;
    margin-bottom: 12px;
    transition: border-color .15s ease;
}

.booking-card:hover { border-color: var(--border2); }

.booking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.booking-ref {
    font-family: var(--mono);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.booking-detail-label { font-size: 11.5px; color: var(--dim); margin-bottom: 2px; }
.booking-detail-value { font-size: 13px; font-weight: 500; }

/* ── Payment method picker ────────────────────────────────────── */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.payment-method {
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover { border-color: var(--border2); background: var(--bg5); }
.payment-method:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.payment-method.selected { border-color: var(--blue); background: var(--blue-dim); }

.payment-method-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--dim);
}
.payment-method-icon .icon { width: 20px; height: 20px; }
.payment-method.selected .payment-method-icon { color: var(--blue); }

.payment-method-name { font-size: 13px; font-weight: 500; }

/* ── Toast ────────────────────────────────────────────────────── */
#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r);
    font-size: 13px;
    min-width: 260px;
    max-width: 400px;
    background: var(--bg4);
    border: 1px solid var(--border2);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    animation: toastIn .18s ease;
    cursor: pointer;
}

.toast.removing { animation: toastOut .15s ease forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(12px); }
}

.toast-icon { display: flex; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--green); }
.toast-error   .toast-icon { color: var(--red); }
.toast-info    .toast-icon { color: var(--blue); }
.toast-warning .toast-icon { color: var(--yellow); }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalBgIn .15s ease;
}

@keyframes modalBgIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--r-lg);
    width: 480px;
    max-width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn .18s ease;
}

.modal:focus { outline: none; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 15px; font-weight: 600; }

.modal-close {
    width: 26px; height: 26px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--bg5); }

.modal-body { padding: 20px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-brand, .nav-text, .user-details, .sidebar-sub, .sidebar-toggle { display: none; }
    .nav-item { justify-content: center; padding: 9px; }
    .sidebar-header, .sidebar-footer { justify-content: center; }
    .content-wrapper { padding: 20px 16px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row, .field-row { flex-direction: column; }
    .file-grid { grid-template-columns: 1fr; }
    .booking-details { grid-template-columns: repeat(2, 1fr); }
    .payment-methods { grid-template-columns: repeat(2, 1fr); }
    .monitor-stats { gap: 18px; flex-wrap: wrap; }
    #toast-container { left: 16px; right: 16px; }
    .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
