/* ============================================================
   Vertali Time Off — Modern Design System v2
   Glassmorphism · Mesh gradients · Micro-animations · Depth
   ============================================================ */

/* ---------- Thin scrollbars (match design system) ---------- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-3);
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-corner {
    background: transparent;
}

/* ---------- Design tokens ---------- */
:root {
    /* Brand — warm violet to electric blue */
    --brand: #7c3aed;
    --brand-600: #6d28d9;
    --brand-700: #5b21b6;
    --brand-soft: rgba(124, 58, 237, 0.08);
    --brand-glow: rgba(124, 58, 237, 0.25);

    /* Accent */
    --accent: #06b6d4;
    --accent-soft: rgba(6, 182, 212, 0.1);

    /* Neutrals (light) */
    --bg: #f0f2f8;
    --bg-mesh: radial-gradient(ellipse at 20% 0%, rgba(124, 58, 237, 0.04) 0%, transparent 50%),
               radial-gradient(ellipse at 80% 100%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #ffffff;
    --surface-2: rgba(248, 250, 252, 0.9);
    --border: rgba(148, 163, 184, 0.2);
    --border-strong: rgba(148, 163, 184, 0.35);
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;

    /* Status */
    --green: #10b981;
    --green-soft: rgba(16, 185, 129, 0.1);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.1);
    --red: #ef4444;
    --red-soft: rgba(239, 68, 68, 0.08);
    --blue: #3b82f6;
    --blue-soft: rgba(59, 130, 246, 0.1);
    --slate-soft: rgba(148, 163, 184, 0.08);

    /* Elevation — layered with blur */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 16px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.15);

    /* Glass */
    --glass-blur: 16px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);

    /* Geometry */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #0a0e1a;
    --bg-mesh: radial-gradient(ellipse at 20% 0%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
               radial-gradient(ellipse at 80% 100%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    --surface: rgba(30, 41, 59, 0.7);
    --surface-solid: #1e293b;
    --surface-2: rgba(30, 41, 59, 0.5);
    --border: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.2);
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --text-3: #64748b;

    --brand-soft: rgba(124, 58, 237, 0.15);
    --brand-glow: rgba(124, 58, 237, 0.3);
    --green-soft: rgba(16, 185, 129, 0.12);
    --amber-soft: rgba(245, 158, 11, 0.12);
    --red-soft: rgba(239, 68, 68, 0.12);
    --blue-soft: rgba(59, 130, 246, 0.12);
    --slate-soft: rgba(148, 163, 184, 0.06);
    --accent-soft: rgba(6, 182, 212, 0.12);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.2);

    --glass-border: 1px solid rgba(148, 163, 184, 0.1);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; transition: var(--transition); }
a:hover { text-decoration: underline; color: var(--brand-600); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 224px;
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    transition: var(--transition-slow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 18px;
}
.brand .logo {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 0.95rem;
    box-shadow: var(--shadow-sm), 0 0 12px var(--brand-glow);
}
.brand-logo {
    height: 30px; width: auto; max-width: 100%;
    display: block; object-fit: contain;
}

.nav-label {
    display: block;
    font-size: 0.66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3);
    padding: 0 12px 8px;
    margin-top: 4px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--text-2);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.active {
    color: var(--brand);
    font-weight: 600;
    background: var(--brand-soft);
}
/* slim left accent bar on the active item */
.nav a.active::before {
    content: '';
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--brand), var(--accent));
}
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 62px;
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 1.1rem; font-weight: 650; }

.content { padding: 28px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ---------- User menu / avatar ---------- */
.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.user-chip:hover { box-shadow: var(--shadow-sm); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff; display: grid; place-items: center;
    font-weight: 650; font-size: 0.8rem;
    position: relative; overflow: hidden;
    box-shadow: 0 0 0 2px var(--surface-solid), 0 0 8px var(--brand-glow);
}
.avatar .avatar-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: inherit; z-index: 1;
}
.avatar .avatar-img[data-failed] { display: none; }
.avatar .avatar-initials { position: relative; z-index: 0; }
.user-chip .name { font-size: 0.88rem; font-weight: 550; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-600));
    color: #fff;
    box-shadow: var(--shadow-sm), 0 4px 12px var(--brand-glow);
}
/* Pin the text colour on every interactive state — the base `a:hover` rule has
   higher specificity than `.btn-primary` and would otherwise recolour the label
   (dark on a dark gradient), making it vanish on hover. */
.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active { color: #fff; }
.btn-primary:hover {
    box-shadow: var(--shadow-md), 0 8px 20px var(--brand-glow);
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: var(--border-strong);
}
.btn-ghost:hover, .btn-ghost:focus { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

.btn-danger, .btn-danger:hover, .btn-danger:focus, .btn-danger:active { color: #fff; }
.btn-danger { background: linear-gradient(135deg, var(--red), #dc2626); }
.btn-danger:hover { box-shadow: var(--shadow-md), 0 4px 12px rgba(239, 68, 68, 0.3); }

.btn-sm { padding: 7px 12px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-icon { padding: 9px; width: 38px; height: 38px; border-radius: var(--radius); }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 24px; }
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 1rem; font-weight: 650; }

/* ---------- Stat cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}
.stat {
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: 0;
    transition: var(--transition);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat:hover::after { opacity: 1; }

.stat .stat-label {
    font-size: 0.75rem; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 650;
}
.stat .stat-value {
    font-size: 2.2rem; font-weight: 800; margin-top: 6px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text), var(--text-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat .stat-icon {
    position: absolute; top: 18px; right: 18px;
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    transition: var(--transition-spring);
}
.stat:hover .stat-icon { transform: scale(1.1) rotate(-5deg); }
.stat .stat-icon svg { width: 20px; height: 20px; }
.stat.accent-green .stat-icon { background: var(--green-soft); color: var(--green); }
.stat.accent-blue .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat.accent-amber .stat-icon { background: var(--amber-soft); color: var(--amber); }
.stat.accent-brand .stat-icon { background: var(--brand-soft); color: var(--brand); }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1.4fr 1fr; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.74rem; font-weight: 650;
    line-height: 1.5;
    letter-spacing: 0.01em;
}
.badge::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    animation: pulse-dot 2s infinite;
}
.badge-available { background: var(--slate-soft); color: var(--text-2); }
.badge-available::before { animation: none; }
.badge-booked, .badge-approved { background: var(--green-soft); color: var(--green); }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-unavailable, .badge-cancelled { background: var(--red-soft); color: var(--red); }
.badge-cancelled::before { animation: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
    text-align: left; padding: 12px 18px;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-3); font-weight: 650;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.data td { padding: 14px 18px; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: var(--transition); }
table.data tbody tr:hover { background: var(--brand-soft); }
.text-muted { color: var(--text-3); }

/* ---------- Calendar ---------- */
.calendar { user-select: none; }
.calendar-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.calendar-head .month-label { font-size: 1.05rem; font-weight: 650; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal-dow {
    text-align: center; font-size: 0.7rem; font-weight: 700;
    color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em;
    padding-bottom: 8px;
}
.cal-cell {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-size: 0.88rem; font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--surface);
}
.cal-cell.empty { border: none; background: transparent; cursor: default; }
.cal-cell.available:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: scale(1.08);
    box-shadow: 0 0 12px var(--brand-glow);
    z-index: 2;
}
.cal-cell.unavailable {
    background: var(--surface-2); color: var(--text-3);
    cursor: not-allowed; border-style: dashed;
    opacity: 0.6;
}
.cal-cell.approved, .cal-cell.booked {
    background: var(--green-soft); color: var(--green);
    border-color: transparent; cursor: default; font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}
.cal-cell.pending {
    background: var(--amber-soft); color: var(--amber); border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}
.cal-cell.today {
    box-shadow: 0 0 0 2px var(--brand) inset, var(--shadow-glow);
}
.cal-cell.selected {
    background: linear-gradient(135deg, var(--brand), var(--brand-600));
    color: #fff; border-color: var(--brand);
    box-shadow: var(--shadow-md), 0 4px 12px var(--brand-glow);
    transform: scale(1.05);
    z-index: 2;
}
.cal-cell .dot {
    position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%;
}
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.cal-legend .item { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-2); }
.cal-legend .swatch { width: 14px; height: 14px; border-radius: 5px; }

/* ---------- Booking tray ---------- */
.booking-tray {
    margin-top: 20px; padding: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: none;
    backdrop-filter: blur(8px);
}
.booking-tray.active { display: block; animation: slideUp var(--transition); }
.selected-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px 5px 14px;
    background: var(--surface-solid); border: 1px solid var(--border);
    border-radius: 999px; font-size: 0.82rem; font-weight: 550;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.chip:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.chip button {
    border: none; background: none; cursor: pointer; color: var(--text-3);
    font-size: 1rem; line-height: 1; padding: 0 2px; display: grid; place-items: center;
    transition: var(--transition);
}
.chip button:hover { color: var(--red); transform: scale(1.2); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.input, textarea.input, select.input {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-solid); color: var(--text);
    font-family: inherit; font-size: 0.9rem;
    transition: var(--transition);
}
.input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-glow);
}
.search-box { position: relative; max-width: 340px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.search-box .input { padding-left: 38px; }

/* ---------- Toasts ---------- */
.toast-container {
    position: fixed; top: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 12px;
    max-width: 400px;
}
.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 15px 18px;
    background: var(--surface-solid);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: toastIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.leaving { animation: toastOut 250ms ease forwards; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast .toast-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast.success .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--red); }
.toast.info .toast-icon { color: var(--blue); }
.toast .toast-body { flex: 1; font-size: 0.88rem; }
.toast .toast-title { font-weight: 700; margin-bottom: 2px; }
.toast .toast-msg { color: var(--text-2); font-size: 0.84rem; }
.toast .toast-close {
    background: none; border: none; cursor: pointer; color: var(--text-3);
    padding: 2px; border-radius: 6px; transition: var(--transition);
}
.toast .toast-close:hover { background: var(--red-soft); color: var(--red); }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; animation: fadeIn 200ms ease; }
.modal {
    background: var(--surface-solid);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    width: 100%; max-width: 480px;
    animation: modalIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-header { padding: 24px 26px 0; }
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-body { padding: 16px 26px; color: var(--text-2); font-size: 0.92rem; }
.modal-footer { padding: 18px 26px 26px; display: flex; gap: 10px; justify-content: flex-end; }
.confirm-list { margin: 14px 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: 0.85rem; } .text-xs { font-size: 0.78rem; }
.font-semibold { font-weight: 600; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.page-header p { color: var(--text-2); font-size: 0.92rem; margin-top: 3px; }

.empty-state { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty-state svg { width: 44px; height: 44px; margin-bottom: 12px; opacity: 0.4; }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 22px; }
.pagination a, .pagination span {
    padding: 7px 14px; border-radius: var(--radius-sm); font-size: 0.85rem;
    border: 1px solid var(--border); color: var(--text-2);
    transition: var(--transition);
}
.pagination a:hover { background: var(--brand-soft); border-color: var(--brand-glow); text-decoration: none; color: var(--brand); }
.pagination .current {
    background: linear-gradient(135deg, var(--brand), var(--brand-600));
    color: #fff; border-color: var(--brand);
    box-shadow: 0 2px 8px var(--brand-glow);
}

/* ---------- Animations ---------- */
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(30px) scale(0.95); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}
@keyframes shimmer {
    from { background-position: -200% center; }
    to { background-position: 200% center; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .sidebar {
        position: fixed; left: 0; top: 0; z-index: 100;
        transform: translateX(-100%); transition: transform var(--transition-slow);
        box-shadow: var(--shadow-lg);
        width: 280px;
    }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: grid !important; }
    .content { padding: 20px; }
    .topbar { padding: 0 18px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat .stat-value { font-size: 1.7rem; }
}
.menu-toggle { display: none; }

/* ---------- Auth / login (horizontal split) ---------- */
.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}
.auth-brand-panel {
    position: relative;
    display: flex; flex-direction: column;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(6, 182, 212, 0.2), transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(124, 58, 237, 0.15), transparent 50%),
        linear-gradient(160deg, var(--brand-700) 0%, var(--brand) 50%, #4338ca 100%);
    overflow: hidden;
}
.auth-brand-panel::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
    opacity: 0.5;
}
.auth-brand-top { display: flex; position: relative; z-index: 1; }
.auth-logo {
    height: 46px; width: auto; max-width: 220px;
    object-fit: contain; display: block;
    filter: brightness(0) invert(1);
}
.auth-brand-mid { margin-top: auto; margin-bottom: auto; max-width: 460px; position: relative; z-index: 1; }
.auth-brand-mid h2 {
    font-size: 2.2rem; line-height: 1.12; letter-spacing: -0.03em;
    margin-bottom: 16px; color: #fff;
}
.auth-brand-mid p { font-size: 1.05rem; color: rgba(255,255,255,0.85); margin-bottom: 30px; line-height: 1.6; }
.auth-points { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.auth-points li {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.95rem; font-weight: 500; color: rgba(255,255,255,0.95);
}
.auth-points svg {
    width: 22px; height: 22px; flex-shrink: 0;
    padding: 4px; border-radius: 50%;
    background: rgba(255,255,255,0.15); color: #fff;
    backdrop-filter: blur(4px);
}
.auth-brand-foot {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 0.78rem; color: rgba(255,255,255,0.6);
    position: relative; z-index: 1;
}

.auth-form-panel {
    display: grid; place-items: center; padding: 44px;
    background: var(--bg);
    background-image: var(--bg-mesh);
}
.auth-form-inner { width: 100%; max-width: 380px; text-align: center; }
.auth-form-inner h1 { font-size: 1.8rem; margin-bottom: 10px; letter-spacing: -0.03em; }
.auth-form-inner .sub { color: var(--text-2); margin-bottom: 34px; font-size: 0.95rem; }
.auth-form-inner .btn {
    width: 100%; padding: 14px; font-size: 0.95rem;
    border-radius: var(--radius-lg);
}
.auth-form-inner .foot { margin-top: 22px; font-size: 0.82rem; color: var(--text-3); }
.auth-form-copyright { margin-top: 44px; font-size: 0.76rem; color: var(--text-3); }
.auth-disclaimer {
    margin-top: 24px;
    font-size: 0.76rem;
    line-height: 1.6;
    color: var(--text-3);
    text-align: center;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.auth-disclaimer a { color: var(--brand); font-weight: 600; }
.auth-legal-links {
    margin-top: 10px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 0.76rem;
}
.auth-legal-links a { color: var(--text-2); font-weight: 550; }
.auth-legal-links a:hover { color: var(--brand); }
.mm-icon { width: 20px; height: 20px; }

.auth-footer {
    margin-top: 24px; text-align: center;
    display: flex; flex-direction: column; gap: 4px;
    font-size: 0.78rem; color: var(--text-3);
}

@media (max-width: 860px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100vh; }
}

/* ---------- Logo (dark mode inversion) ---------- */
[data-theme="dark"] .brand-logo,
[data-theme="dark"] .footer-logo,
[data-theme="dark"] .auth-logo {
    filter: brightness(0) invert(1);
}

/* ---------- Modern footer ---------- */
.main { min-height: 100vh; }
.app-footer {
    margin-top: auto;
    position: relative;
    background:
        radial-gradient(700px 240px at 100% 0%, var(--brand-soft), transparent 70%),
        var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid var(--border);
}
.app-footer::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--accent), transparent);
}
.footer-inner {
    max-width: 1240px; margin: 0 auto;
    padding: 40px 28px 28px;
    display: grid; grid-template-columns: 1.5fr 2fr; gap: 48px; align-items: start;
}
.footer-logo { height: 28px; width: auto; object-fit: contain; margin-bottom: 14px; display: block; }
.footer-tagline { color: var(--text-2); font-size: 0.88rem; max-width: 320px; margin-bottom: 16px; line-height: 1.6; }
.footer-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 13px; border-radius: 999px;
    background: var(--green-soft); color: var(--green);
    font-size: 0.76rem; font-weight: 650;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}
.footer-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-heading {
    display: block; font-size: 0.68rem; font-weight: 750;
    text-transform: uppercase; letter-spacing: 0.09em;
    color: var(--text-3); margin-bottom: 12px;
}
.footer-col address, .footer-col p { font-style: normal; color: var(--text-2); font-size: 0.86rem; line-height: 1.7; }
.footer-col strong { color: var(--text); }
.footer-col a {
    display: flex; align-items: center; gap: 9px;
    color: var(--text-2); font-size: 0.86rem;
    line-height: 1; padding: 6px 0; transition: var(--transition);
}
.footer-col a i { color: var(--text-3); font-size: 0.8rem; transition: var(--transition); }
.footer-col a:hover { color: var(--brand); text-decoration: none; transform: translateX(3px); }
.footer-col a:hover i { color: var(--brand); }

.footer-bar {
    border-top: 1px solid var(--border);
    padding: 18px 28px;
    max-width: 1240px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.78rem; color: var(--text-3);
    flex-wrap: wrap; gap: 14px;
}
.footer-legalese { display: flex; flex-direction: column; gap: 2px; }
.footer-sep { font-weight: 600; letter-spacing: 0.02em; color: var(--text-3); }

/* "Intrasure — provided by [Ingenious Minds]" credit */
.footer-credit {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 8px 16px; border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-3); font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    transition: var(--transition);
}
.footer-credit:hover {
    text-decoration: none; color: var(--text-2);
    border-color: var(--brand-glow);
    box-shadow: var(--shadow-sm), 0 0 0 3px var(--brand-soft);
}
.footer-credit-logo { height: 26px; width: auto; object-fit: contain; display: block; }

@media (max-width: 860px) {
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 640px) {
    .footer-meta { grid-template-columns: 1fr 1fr; }
    .footer-bar { flex-direction: column; align-items: flex-start; }
}

/* ---------- Legal pages (Terms, Privacy) ---------- */
.legal-body { background: var(--bg); background-image: var(--bg-mesh); background-attachment: fixed; display: flex; flex-direction: column; min-height: 100vh; }

/* Reading progress bar */
.legal-progress {
    position: fixed; top: 0; left: 0; z-index: 50;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    box-shadow: 0 0 8px var(--brand-glow);
    transition: width 80ms linear;
}

.legal-topbar {
    position: sticky; top: 0; z-index: 20;
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: var(--glass-border);
}
.legal-topbar-inner {
    max-width: 1180px; margin: 0 auto;
    padding: 14px 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.legal-back {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.9rem; font-weight: 600; color: var(--text-2);
    transition: var(--transition);
}
.legal-back:hover { color: var(--brand); text-decoration: none; transform: translateX(-2px); }
.legal-print-btn { font-size: 0.82rem; }

/* Two-column shell: sticky TOC + document */
.legal-shell {
    max-width: 1180px; margin: 0 auto; padding: 40px 28px 70px;
    display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px;
    align-items: start; flex: 1; width: 100%;
}

/* ---------- Table of contents sidebar ---------- */
.legal-toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; }
.legal-toc-heading {
    display: block; font-size: 0.7rem; font-weight: 750;
    text-transform: uppercase; letter-spacing: 0.09em;
    color: var(--text-3); margin-bottom: 12px; padding-left: 2px;
}
.legal-toc-nav { display: flex; flex-direction: column; }
.legal-toc-part {
    font-size: 0.68rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--brand); margin: 16px 0 6px; padding-left: 2px;
}
.legal-toc-part:first-child { margin-top: 0; }
.legal-toc-link {
    display: block; padding: 6px 10px; margin: 1px 0;
    border-radius: 8px; font-size: 0.84rem; line-height: 1.4;
    color: var(--text-2); border-left: 2px solid transparent;
    transition: var(--transition);
}
.legal-toc-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.legal-toc-link.active {
    color: var(--brand); font-weight: 650;
    background: var(--brand-soft); border-left-color: var(--brand);
}

/* ---------- Document card ---------- */
.legal-doc {
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 48px 52px;
    max-width: 820px;
}
.legal-header { text-align: center; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.legal-logo { height: 40px; width: auto; object-fit: contain; margin: 0 auto 20px; display: block; }
.legal-header h1 {
    font-size: 2rem; letter-spacing: -0.02em; font-weight: 700; color: var(--text);
}
.legal-updated {
    margin-top: 14px; font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--text-3); font-weight: 500;
}

/* Part dividers */
.legal-part {
    display: flex; align-items: center; gap: 12px;
    margin: 44px 0 22px; padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
    font-size: 0.78rem; font-weight: 750;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--brand);
}
.legal-doc > .legal-part:first-of-type { margin-top: 8px; }
.legal-part i {
    width: 30px; height: 30px; flex-shrink: 0;
    display: grid; place-items: center; border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff; font-size: 0.85rem;
}

/* Numbered section headings */
.legal-doc h2 {
    display: flex; align-items: baseline; gap: 14px;
    font-size: 1.1rem; margin-top: 32px; margin-bottom: 14px;
    color: var(--text); letter-spacing: -0.01em;
    scroll-margin-top: 90px;
}
.legal-doc h2:first-of-type { margin-top: 0; }
.legal-num {
    flex-shrink: 0; font-size: 0.72rem; font-weight: 700;
    color: var(--brand); background: var(--brand-soft);
    padding: 3px 8px; border-radius: 6px; letter-spacing: 0.03em;
    font-family: 'Courier New', monospace;
}
.legal-title { line-height: 1.3; }

.legal-doc h3 { font-size: 1rem; margin-top: 24px; margin-bottom: 8px; color: var(--text); }
.legal-doc p { margin-bottom: 14px; color: var(--text-2); font-size: 0.94rem; line-height: 1.75; }
.legal-doc ul, .legal-doc ol { margin: 0 0 14px 22px; color: var(--text-2); font-size: 0.94rem; line-height: 1.75; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc strong { color: var(--text); font-weight: 650; }
.legal-doc a { color: var(--brand); font-weight: 550; }

.legal-lead {
    font-size: 1rem; color: var(--text-2); line-height: 1.8;
    padding: 18px 20px; margin-bottom: 32px;
    background: var(--brand-soft); border-radius: var(--radius-lg);
    border: 1px solid var(--brand-glow);
}

.legal-footer {
    margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border);
    text-align: center; font-size: 0.82rem; color: var(--text-3); line-height: 1.7;
}
.legal-footer-links { margin-top: 12px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.legal-footer-links a { color: var(--text-2); font-weight: 550; }
.legal-footer-links a:hover { color: var(--brand); }

/* Back-to-top floating button */
.legal-top-btn {
    position: fixed; bottom: 28px; right: 28px; z-index: 40;
    width: 46px; height: 46px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-600));
    color: #fff; border: none; display: grid; place-items: center;
    font-size: 1rem; cursor: pointer;
    box-shadow: var(--shadow-md), 0 4px 16px var(--brand-glow);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: var(--transition-spring), opacity 200ms ease;
}
.legal-top-btn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.legal-top-btn:hover { transform: translateY(-3px) scale(1.06); }

@media (max-width: 960px) {
    .legal-shell { grid-template-columns: 1fr; }
    .legal-toc { display: none; }
    .legal-doc { max-width: none; }
}
@media (max-width: 640px) {
    .legal-doc { padding: 32px 24px; }
    .legal-shell { padding: 24px 16px 60px; }
    .legal-topbar-inner { padding: 12px 16px; }
    .legal-header h1 { font-size: 1.6rem; }
    .legal-doc h2 { flex-direction: column; gap: 4px; align-items: flex-start; }
    .legal-top-btn { bottom: 18px; right: 18px; }
}

/* ---------- Print styles ---------- */
@media print {
    .legal-progress, .legal-topbar, .legal-toc, .legal-top-btn, .app-footer { display: none !important; }
    .legal-body { background: #fff !important; display: block; }
    .legal-shell { display: block; padding: 0; max-width: none; }
    .legal-doc {
        box-shadow: none; border: none; backdrop-filter: none;
        background: #fff !important; padding: 0; max-width: none;
    }
    .legal-doc, .legal-doc p, .legal-doc li, .legal-title, .legal-header h1 { color: #000 !important; -webkit-text-fill-color: #000 !important; }
    .legal-num { background: #eee !important; color: #000 !important; }
    .legal-part { color: #000 !important; border-bottom-color: #ccc; }
    .legal-part i { background: #333 !important; -webkit-print-color-adjust: exact; }
    .legal-doc a { color: #000 !important; text-decoration: underline; }
    .legal-header { border-bottom-color: #ccc; }
    body { font-size: 11pt; }
}

/* ============================================================
   Font Awesome icon integration + dashboard extras
   ============================================================ */
.nav a i { font-size: 0.95rem; color: currentColor; }
.btn i { font-size: 0.9em; line-height: 1; }
.btn-icon i { font-size: 1rem; }
.stat .stat-icon i { font-size: 1.1rem; }
.toast .toast-icon { font-size: 1.05rem; width: auto; height: auto; }
.footer-badge i { font-size: 0.85rem; }
.legal-back i { font-size: 0.9rem; }
.mm-icon { font-size: 1.05rem; }

/* search box icon (was an inline svg) */
.search-box i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); font-size: 0.9rem; pointer-events: none;
}

/* login feature bullets */
.auth-points i {
    width: 26px; height: 26px; flex-shrink: 0;
    display: grid; place-items: center; border-radius: 50%;
    background: rgba(255, 255, 255, 0.16); color: #fff;
    font-size: 0.78rem; backdrop-filter: blur(4px);
}

/* empty-state icon */
.empty-state .empty-icon { font-size: 2rem; opacity: 0.35; margin-bottom: 12px; display: block; }

/* ---------- Dashboard extras ---------- */
.card-subtitle { color: var(--text-3); font-size: 0.8rem; margin-top: 3px; font-weight: 400; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav .month-label { min-width: 132px; text-align: center; font-weight: 650; font-size: 0.95rem; }
.tray-hint {
    display: flex; gap: 10px; align-items: baseline;
    margin-top: 14px; padding: 12px 14px;
    background: var(--brand-soft); border-radius: var(--radius);
    font-size: 0.8rem; color: var(--text-2); line-height: 1.7;
}
.tray-hint i { color: var(--brand); flex-shrink: 0; position: relative; top: 1px; }
.tray-hint span { flex: 1; }
.page-header h1 { font-size: 1.5rem; }

/* ---------- User chip as link ---------- */
a.user-chip { text-decoration: none; color: inherit; cursor: pointer; }
a.user-chip:hover { text-decoration: none; border-color: var(--brand-glow); box-shadow: var(--shadow-sm), 0 0 0 3px var(--brand-soft); }
a.user-chip .name { color: var(--text); }

/* ---------- Profile page ---------- */
.profile-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(600px 200px at 0% 0%, var(--brand-soft), transparent 70%),
        var(--surface);
}
.profile-hero::before {
    content: '';
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}
.profile-id { display: flex; align-items: center; gap: 18px; }
.profile-avatar {
    width: 68px; height: 68px; font-size: 1.4rem;
    box-shadow: 0 0 0 3px var(--surface-solid), 0 0 18px var(--brand-glow);
    flex-shrink: 0;
}
.profile-name { font-size: 1.5rem; letter-spacing: -0.02em; }
.profile-handle { color: var(--text-3); font-size: 0.92rem; margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.profile-handle .badge { vertical-align: middle; }

/* ---------- Error pages (403 / 404 / 500) ---------- */
.error-body {
    background: var(--bg); background-image: var(--bg-mesh); background-attachment: fixed;
    display: flex; flex-direction: column; min-height: 100vh;
}
.error-shell { flex: 1; display: grid; place-items: center; padding: 48px 24px; width: 100%; }
.error-card {
    text-align: center; max-width: 540px; width: 100%;
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 48px 44px;
    animation: modalIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.error-icon {
    width: 72px; height: 72px; margin: 0 auto 8px;
    border-radius: 20px; display: grid; place-items: center;
    font-size: 1.8rem;
}
.error-icon-red { background: var(--red-soft); color: var(--red); }
.error-icon-amber { background: var(--amber-soft); color: var(--amber); }
.error-icon-brand { background: var(--brand-soft); color: var(--brand); }
.error-code {
    font-size: 4rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
    margin: 10px 0 4px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.error-title { font-size: 1.5rem; margin-bottom: 12px; letter-spacing: -0.02em; }
.error-text { color: var(--text-2); font-size: 0.95rem; line-height: 1.7; margin-bottom: 28px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 520px) {
    .error-card { padding: 36px 24px; }
    .error-code { font-size: 3rem; }
}

/* ---------- Audit log ---------- */
.audit-card { overflow: hidden; }
.audit-table-wrap { overflow-x: auto; }
.audit-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.audit-table thead th {
    padding: 14px 18px;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-3); text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap; background: var(--surface-2);
}
.audit-table tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
.audit-table tbody tr:last-child { border-bottom: none; }
.audit-table tbody tr:hover { background: var(--brand-soft); }
.audit-table td { padding: 14px 18px; vertical-align: middle; }

.audit-cell-when { white-space: nowrap; min-width: 160px; }
.audit-time-relative { display: block; font-weight: 600; color: var(--text); font-size: 0.85rem; }
.audit-time-full { display: block; font-size: 0.74rem; color: var(--text-3); margin-top: 2px; }

.audit-cell-who { white-space: nowrap; }
.audit-actor-row { display: flex; align-items: center; gap: 9px; }
.audit-actor-name { font-weight: 600; color: var(--text); }

.audit-cell-what { white-space: nowrap; }
.audit-action {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 4px 11px; border-radius: 999px;
    font-size: 0.78rem; font-weight: 600;
}
.audit-action i { font-size: 0.75rem; }
.audit-type-neutral { background: var(--slate-soft); color: var(--text-2); }
.audit-type-success { background: var(--green-soft); color: var(--green); }
.audit-type-info { background: var(--blue-soft); color: var(--blue); }
.audit-type-warning { background: var(--amber-soft); color: var(--amber); }
.audit-type-danger { background: var(--red-soft); color: var(--red); }

.audit-cell-details { color: var(--text-2); font-size: 0.84rem; max-width: 280px; }
.audit-cell-ip { color: var(--text-3); font-size: 0.8rem; font-family: 'Courier New', monospace; white-space: nowrap; }

@media (max-width: 900px) {
    .audit-table { font-size: 0.82rem; }
    .audit-table td, .audit-table thead th { padding: 10px 12px; }
    .audit-cell-details { max-width: 180px; }
}
