/* =========================================================================
   CoreForensics Design System
   Dark navy · electric blue · cyan · glassmorphism
   Single stylesheet shared by the public site, client portal and admin panel.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
    --navy-950: #050b14;
    --navy-900: #070e1b;
    --navy-850: #0a1424;
    --navy-800: #0c1a2e;
    --navy-750: #0f2138;
    --navy-700: #132a45;
    --navy-600: #1a374f;
    --line: #1b2f47;
    --line-soft: #16263a;

    --blue-600: #1b6fe0;
    --blue-500: #2683f0;
    --blue-400: #3d9bfa;
    --cyan-500: #22d3ee;
    --cyan-400: #57e3f5;
    --cyan-300: #8ceefb;

    --text: #eaf1fb;
    --text-soft: #b3c6dd;
    --text-mute: #7e94b0;
    --text-dim: #5d7390;

    --success: #22c98a;
    --success-bg: rgba(34, 201, 138, .12);
    --warning: #f4b740;
    --warning-bg: rgba(244, 183, 64, .12);
    --danger: #f2555a;
    --danger-bg: rgba(242, 85, 90, .12);
    --info: #4aa8f0;
    --info-bg: rgba(74, 168, 240, .12);

    --radius-xs: 6px;
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 10px 30px -12px rgba(2, 8, 20, .7);
    --shadow-lg: 0 30px 70px -30px rgba(2, 8, 20, .85);
    --glow: 0 0 0 1px rgba(34, 211, 238, .18), 0 18px 50px -20px rgba(34, 211, 238, .35);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

    --sidebar-w: 268px;
    --topbar-h: 66px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--navy-950);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 650; line-height: 1.22; letter-spacing: -.015em; margin: 0 0 .5em; color: #fff; }
h1 { font-size: clamp(1.9rem, 4vw, 3.15rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
h4 { font-size: 1.06rem; }
p { margin: 0 0 1rem; color: var(--text-soft); }
a { color: var(--cyan-400); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--cyan-300); }
img, svg { max-width: 100%; }
small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 2px solid var(--cyan-500); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(34, 211, 238, .28); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--navy-900); }
::-webkit-scrollbar-thumb { background: #1d3552; border-radius: 8px; border: 2px solid var(--navy-900); }
::-webkit-scrollbar-thumb:hover { background: #27476b; }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; }
.container-wide { max-width: 1440px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.row > * { flex: 1 1 0; min-width: 0; }
.g-0 { gap: 0; } .g-8 { gap: 8px; } .g-12 { gap: 12px; } .g-24 { gap: 24px; } .g-32 { gap: 32px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex { display: flex; } .flex-col { flex-direction: column; } .flex-1 { flex: 1; min-width: 0; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-mute { color: var(--text-mute); } .text-soft { color: var(--text-soft); } .text-dim { color: var(--text-dim); }
.text-cyan { color: var(--cyan-400); } .text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); }
.mono { font-family: var(--font-mono); font-size: .86em; letter-spacing: -.02em; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mt-4 { margin-top: 32px } .mt-5 { margin-top: 48px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px } .mb-4 { margin-bottom: 32px } .mb-5 { margin-bottom: 48px }
.w-full { width: 100%; } .h-full { height: 100%; }
.hidden { display: none !important; } .block { display: block; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.relative { position: relative; }
.opacity-60 { opacity: .6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Typography helpers ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .72rem; font-weight: 650; letter-spacing: .18em; text-transform: uppercase;
    color: var(--cyan-400); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--cyan-500), transparent); }
.lead { font-size: 1.06rem; color: var(--text-soft); line-height: 1.72; }
.gradient-text {
    background: linear-gradient(100deg, #ffffff 0%, #a9dcff 45%, var(--cyan-400) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title { max-width: 760px; }
.section-title.center { margin-inline: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 11px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-family: var(--font-sans); font-size: .9rem; font-weight: 600; letter-spacing: .01em;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
    background: transparent; color: var(--text); line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 45%, var(--cyan-500) 130%);
    color: #04121f; box-shadow: 0 10px 28px -12px rgba(34, 160, 238, .75);
}
.btn-primary:hover { color: #04121f; box-shadow: 0 14px 34px -12px rgba(34, 211, 238, .8); }
.btn-outline { border-color: rgba(120, 170, 220, .34); color: var(--text); background: rgba(18, 34, 54, .4); }
.btn-outline:hover { border-color: var(--cyan-500); color: #fff; background: rgba(34, 211, 238, .1); }
.btn-ghost { color: var(--text-soft); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.btn-success { background: linear-gradient(135deg, #16a06b, #22c98a); color: #04150e; }
.btn-danger { background: linear-gradient(135deg, #c93b45, #f2555a); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #d99a2b, #f4b740); color: #1c1206; }
.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: var(--radius-xs); }
.btn-lg { padding: 15px 32px; font-size: .97rem; border-radius: 12px; }
.btn-icon { padding: 8px 10px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Glass / cards ---------- */
.glass, .card {
    background: linear-gradient(160deg, rgba(20, 38, 62, .72) 0%, rgba(10, 20, 36, .82) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.card { padding: 24px; box-shadow: var(--shadow); }
.card-sm { padding: 16px; border-radius: var(--radius-sm); }
.card-hover { transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease); }
.card-hover:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, .34); box-shadow: var(--glow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h3, .card-head h2 { margin: 0; font-size: 1.06rem; }
.card-title { font-family: var(--font-display); font-size: 1.02rem; font-weight: 640; color: #fff; margin: 0; }
.card-sub { font-size: .84rem; color: var(--text-mute); margin-top: 3px; }

/* stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px; }
.stat {
    position: relative; padding: 20px; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(155deg, rgba(22, 42, 68, .78), rgba(9, 18, 32, .9));
    border: 1px solid var(--line);
    transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.stat::after {
    content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--cyan-500), transparent 70%); opacity: .55;
}
.stat:hover { transform: translateY(-2px); border-color: rgba(34, 211, 238, .3); }
.stat-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-mute); font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: 1.85rem; font-weight: 680; color: #fff; line-height: 1.2; margin-top: 8px; letter-spacing: -.02em; }
.stat-value.sm { font-size: 1.42rem; }
.stat-meta { font-size: .8rem; color: var(--text-dim); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.stat-icon {
    position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center; font-size: 1rem; color: var(--cyan-400);
    background: rgba(34, 211, 238, .09); border: 1px solid rgba(34, 211, 238, .18);
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3.5px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600;
    letter-spacing: .01em; line-height: 1.5; border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.badge-success { color: var(--success); background: var(--success-bg); border-color: rgba(34, 201, 138, .25); }
.badge-warning { color: var(--warning); background: var(--warning-bg); border-color: rgba(244, 183, 64, .25); }
.badge-danger { color: var(--danger); background: var(--danger-bg); border-color: rgba(242, 85, 90, .25); }
.badge-info { color: var(--info); background: var(--info-bg); border-color: rgba(74, 168, 240, .25); }
.badge-secondary { color: var(--text-mute); background: rgba(126, 148, 176, .1); border-color: rgba(126, 148, 176, .22); }
.badge-cyan { color: var(--cyan-400); background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .25); }
.badge-demo { color: #ffcf5e; background: rgba(255, 207, 94, .1); border-color: rgba(255, 207, 94, .3); font-size: .66rem; letter-spacing: .1em; }
.badge-plain::before { display: none; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label, label.form-label {
    display: block; font-size: .82rem; font-weight: 600; color: var(--text-soft);
    margin-bottom: 7px; letter-spacing: .01em;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-hint { font-size: .78rem; color: var(--text-dim); margin-top: 6px; line-height: 1.55; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.input, .form-control, select, textarea {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
    background: rgba(7, 15, 27, .72); border: 1px solid var(--line);
    color: var(--text); font-family: var(--font-sans); font-size: .9rem; line-height: 1.5;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
    appearance: none;
}
.input::placeholder, textarea::placeholder { color: var(--text-dim); }
.input:hover, select:hover, textarea:hover { border-color: #23405f; }
.input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--cyan-500); background: rgba(9, 20, 34, .9);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .13);
}
.input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
textarea { min-height: 110px; resize: vertical; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237e94b0' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
select option { background: var(--navy-800); color: var(--text); }
.input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(242, 85, 90, .1); }
.input-group { display: flex; gap: 0; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group-text {
    display: flex; align-items: center; padding: 0 14px; background: rgba(13, 26, 43, .8);
    border: 1px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--text-mute); font-size: .86rem;
}
.checkbox, .radio { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .88rem; color: var(--text-soft); }
.checkbox input, .radio input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--blue-500); cursor: pointer; flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 44px; height: 24px; border-radius: 999px; background: #1d3552; border: 1px solid var(--line); position: relative; transition: background .2s var(--ease); flex: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-mute); transition: transform .2s var(--ease), background .2s var(--ease); }
.switch input:checked + .switch-track { background: linear-gradient(135deg, var(--blue-600), var(--cyan-500)); border-color: transparent; }
.switch input:checked + .switch-track::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(34, 211, 238, .25); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 24px; }
legend { padding: 0 10px; font-size: .82rem; font-weight: 650; color: var(--cyan-400); letter-spacing: .06em; text-transform: uppercase; }

/* file upload */
.file-drop {
    border: 1.5px dashed #27476b; border-radius: var(--radius); padding: 28px 20px; text-align: center;
    background: rgba(10, 22, 38, .5); transition: border-color .2s var(--ease), background .2s var(--ease);
    cursor: pointer; position: relative;
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--cyan-500); background: rgba(34, 211, 238, .06); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-drop-icon { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 13px; display: grid; place-items: center; background: rgba(34, 211, 238, .1); color: var(--cyan-400); font-size: 1.15rem; }
.file-list { margin-top: 12px; display: grid; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-xs); background: rgba(12, 26, 44, .8); border: 1px solid var(--line); font-size: .84rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(9, 18, 32, .55); }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.table th {
    text-align: left; padding: 12px 16px; font-size: .73rem; text-transform: uppercase; letter-spacing: .1em;
    color: var(--text-mute); font-weight: 650; background: rgba(15, 30, 50, .75); border-bottom: 1px solid var(--line);
    white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-soft); vertical-align: middle; }
table.table tbody tr { transition: background .14s var(--ease); }
table.table tbody tr:hover { background: rgba(34, 211, 238, .04); }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table td strong, table.table td b { color: var(--text); font-weight: 600; }
.table-compact th, .table-compact td { padding: 9px 12px; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cell-main { display: flex; align-items: center; gap: 11px; }
.avatar {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
    background: linear-gradient(140deg, #1b3f66, #124e78); color: var(--cyan-300);
    font-size: .78rem; font-weight: 700; letter-spacing: .03em; border: 1px solid #245478;
}
.avatar-lg { width: 56px; height: 56px; border-radius: 15px; font-size: 1.05rem; }
.avatar-sm { width: 27px; height: 27px; border-radius: 8px; font-size: .68rem; }

/* ---------- Alerts ---------- */
.alert {
    display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: rgba(16, 31, 50, .7); font-size: .88rem; margin-bottom: 18px;
    align-items: flex-start; line-height: 1.6;
}
.alert i, .alert .alert-icon { flex: none; margin-top: 2px; font-size: .95rem; }
.alert-success { border-color: rgba(34, 201, 138, .32); background: rgba(34, 201, 138, .09); color: #a8f0cf; }
.alert-success i { color: var(--success); }
.alert-danger { border-color: rgba(242, 85, 90, .32); background: rgba(242, 85, 90, .09); color: #ffc4c6; }
.alert-danger i { color: var(--danger); }
.alert-warning { border-color: rgba(244, 183, 64, .3); background: rgba(244, 183, 64, .08); color: #ffe3a8; }
.alert-warning i { color: var(--warning); }
.alert-info { border-color: rgba(74, 168, 240, .3); background: rgba(74, 168, 240, .08); color: #bfe0ff; }
.alert-info i { color: var(--info); }
.alert strong { color: #fff; }
.alert-close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 1rem; padding: 0 2px; }
.alert-close:hover { opacity: 1; }

/* ---------- Public navigation ---------- */
.site-header {
    position: sticky; top: 0; z-index: 900;
    background: rgba(5, 11, 20, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(27, 47, 71, .8);
}
.nav { display: flex; align-items: center; gap: 26px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.brand:hover { color: inherit; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; letter-spacing: .05em; color: #fff; }
.brand-name span { color: var(--cyan-400); }
.brand-tag { font-size: .58rem; letter-spacing: .21em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
    padding: 8px 12px; border-radius: 8px; font-size: .86rem; font-weight: 500;
    color: var(--text-soft); white-space: nowrap; transition: color .16s var(--ease), background .16s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255, 255, 255, .055); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 20, 34, .7); }
.lang-switch a {
    padding: 4px 11px; border-radius: 999px; font-size: .75rem; font-weight: 650; color: var(--text-mute);
    letter-spacing: .05em; text-transform: uppercase; transition: all .16s var(--ease);
}
.lang-switch a.active { background: linear-gradient(135deg, var(--blue-600), var(--cyan-500)); color: #04121f; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.active:hover { color: #04121f; }

/* mobile drawer */
.mobile-drawer {
    position: fixed; inset: 0; z-index: 950; background: rgba(4, 9, 17, .96);
    backdrop-filter: blur(16px); padding: 24px; overflow-y: auto; transform: translateX(100%);
    transition: transform .28s var(--ease); display: flex; flex-direction: column; gap: 6px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .nav-link { padding: 13px 14px; font-size: 1rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.drawer-close { position: absolute; top: 18px; right: 18px; background: none; border: 1px solid var(--line); color: #fff; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
body.drawer-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 96px; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -20% -10% auto -10%; height: 760px; z-index: -2;
    background:
        radial-gradient(ellipse 55% 45% at 22% 8%, rgba(27, 111, 224, .26), transparent 62%),
        radial-gradient(ellipse 42% 40% at 82% 0%, rgba(34, 211, 238, .17), transparent 60%);
    filter: blur(8px);
}
.hero-grid-bg {
    position: absolute; inset: 0; z-index: -1; opacity: .3;
    background-image: linear-gradient(rgba(45, 92, 138, .18) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(45, 92, 138, .18) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse 75% 60% at 50% 20%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 20%, #000 20%, transparent 75%);
}
.hero-inner { display: grid; grid-template-columns: 1.06fr .94fr; gap: 54px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 8px; border-radius: 999px;
    background: rgba(16, 34, 56, .8); border: 1px solid rgba(34, 211, 238, .24);
    font-size: .76rem; color: var(--text-soft); margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(34, 201, 138, .16); animation: pulse 2.4s infinite; }
.hero h1 { margin-bottom: 22px; letter-spacing: -.028em; }
.hero-sub { font-size: 1.06rem; line-height: 1.72; color: var(--text-soft); max-width: 610px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }
.hero-trust { display: flex; gap: 30px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.hero-trust-item { display: flex; flex-direction: column; }
.hero-trust-value { font-family: var(--font-display); font-size: 1.32rem; font-weight: 680; color: #fff; letter-spacing: -.02em; }
.hero-trust-label { font-size: .76rem; color: var(--text-dim); letter-spacing: .04em; }

/* hero visual — animated investigation graph */
.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 520px; margin-left: auto; }
.hero-visual-frame {
    position: absolute; inset: 0; border-radius: var(--radius-xl);
    background: linear-gradient(160deg, rgba(18, 38, 64, .8), rgba(8, 16, 28, .92));
    border: 1px solid rgba(45, 92, 138, .45); overflow: hidden;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.hero-visual-frame::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .09), transparent 62%);
}
.inv-graph { position: absolute; inset: 0; }
.inv-graph .link { stroke: rgba(64, 148, 210, .38); stroke-width: 1; fill: none; }
.inv-graph .link.flow { stroke: rgba(34, 211, 238, .62); stroke-width: 1.4; stroke-dasharray: 5 5; animation: dash 3.2s linear infinite; }
.inv-graph .node { fill: #0d2740; stroke: #2f7db3; stroke-width: 1.3; }
.inv-graph .node.alert { fill: #3a1520; stroke: #f2555a; }
.inv-graph .node.hub { fill: #0f3550; stroke: var(--cyan-500); }
.inv-graph .pulse { fill: rgba(34, 211, 238, .9); }
.glass-panel {
    position: absolute; padding: 12px 15px; border-radius: 12px; font-size: .76rem;
    background: rgba(10, 22, 38, .88); border: 1px solid rgba(45, 92, 138, .55);
    backdrop-filter: blur(10px); box-shadow: var(--shadow); z-index: 2;
}
.glass-panel .gp-label { color: var(--text-dim); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; }
.glass-panel .gp-value { color: #fff; font-weight: 650; font-family: var(--font-mono); font-size: .82rem; margin-top: 3px; }
.gp-live { position: absolute; bottom: 18px; right: 18px; display: flex; align-items: center; gap: 8px; }
.gp-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-500); animation: pulse 1.8s infinite; }

/* ---------- Sections ---------- */
.section { padding: 82px 0; position: relative; }
.section-sm { padding: 52px 0; }
.section-alt { background: linear-gradient(180deg, rgba(9, 18, 32, .85), rgba(5, 11, 20, 0)); }
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 18px; }
.feature {
    padding: 26px; border-radius: var(--radius); position: relative; overflow: hidden;
    background: linear-gradient(160deg, rgba(18, 36, 58, .66), rgba(8, 16, 28, .82));
    border: 1px solid var(--line); transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.feature:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, .3); box-shadow: var(--glow); }
.feature-icon {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
    background: linear-gradient(140deg, rgba(27, 111, 224, .22), rgba(34, 211, 238, .14));
    border: 1px solid rgba(34, 211, 238, .22); color: var(--cyan-400); font-size: 1.12rem;
}
.feature h3 { font-size: 1.04rem; margin-bottom: 9px; }
.feature p { font-size: .89rem; color: var(--text-mute); margin: 0; line-height: 1.68; }
.feature-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 7px; }
.feature-list li { font-size: .84rem; color: var(--text-mute); display: flex; gap: 9px; align-items: flex-start; }
.feature-list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan-500); margin-top: 7px; flex: none; }

/* process steps */
.process-steps { display: grid; gap: 0; counter-reset: step; }
.process-step {
    display: grid; grid-template-columns: 74px 1fr; gap: 24px; padding: 26px 0;
    border-bottom: 1px solid var(--line-soft); position: relative;
}
.process-step:last-child { border-bottom: 0; }
.process-num {
    width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--cyan-400);
    background: linear-gradient(150deg, rgba(27, 111, 224, .18), rgba(34, 211, 238, .1));
    border: 1px solid rgba(34, 211, 238, .24); position: relative;
}
.process-step:not(:last-child) .process-num::after {
    content: ""; position: absolute; top: 56px; left: 50%; width: 1px; height: calc(100% + 8px);
    background: linear-gradient(180deg, rgba(34, 211, 238, .3), transparent);
}
.process-step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.process-step p { font-size: .89rem; color: var(--text-mute); margin: 0; }

/* faq */
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12, 24, 40, .55); overflow: hidden; transition: border-color .2s var(--ease); }
.faq-item[open] { border-color: rgba(34, 211, 238, .3); }
.faq-item summary {
    padding: 17px 20px; cursor: pointer; font-weight: 600; color: var(--text); font-size: .93rem;
    display: flex; justify-content: space-between; gap: 16px; align-items: center; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--cyan-400); font-size: 1.2rem; font-weight: 400; flex: none; transition: transform .2s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 20px 18px; font-size: .89rem; color: var(--text-mute); line-height: 1.72; }

/* CTA band */
.cta-band {
    position: relative; padding: 54px; border-radius: var(--radius-lg); overflow: hidden;
    background: linear-gradient(120deg, rgba(19, 51, 88, .92), rgba(9, 34, 56, .92) 55%, rgba(10, 48, 66, .92));
    border: 1px solid rgba(45, 92, 138, .5);
}
.cta-band::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 88% 20%, rgba(34, 211, 238, .2), transparent 55%);
}
.cta-band > * { position: relative; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, rgba(7, 14, 26, .4), rgba(4, 9, 17, 1)); border-top: 1px solid var(--line); padding: 60px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .13em; color: var(--text-mute); margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { font-size: .87rem; color: var(--text-soft); }
.footer-links a:hover { color: var(--cyan-400); }
.footer-bottom {
    margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft);
    display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: var(--text-dim);
}
.footer-disclaimer { font-size: .78rem; color: var(--text-dim); line-height: 1.7; margin-top: 14px; max-width: 420px; }

/* ---------- Auth layout ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-side {
    position: relative; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(155deg, #0a1c33 0%, #071426 45%, #05101d 100%); overflow: hidden;
    border-right: 1px solid var(--line);
}
.auth-side::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 50% at 25% 15%, rgba(27, 111, 224, .3), transparent 60%),
                radial-gradient(ellipse 45% 40% at 85% 80%, rgba(34, 211, 238, .16), transparent 60%);
}
.auth-side > * { position: relative; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: radial-gradient(ellipse at 50% 0%, rgba(20, 44, 74, .5), transparent 60%); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.72rem; margin-bottom: 8px; }
.auth-card .sub { color: var(--text-mute); font-size: .9rem; margin-bottom: 28px; }
.auth-foot { margin-top: 24px; text-align: center; font-size: .86rem; color: var(--text-mute); }
.auth-features { display: grid; gap: 18px; margin-top: 34px; }
.auth-feature { display: flex; gap: 14px; align-items: flex-start; }
.auth-feature i { color: var(--cyan-400); margin-top: 3px; }
.auth-feature div { font-size: .87rem; color: var(--text-soft); line-height: 1.6; }
.auth-feature strong { display: block; color: #fff; font-size: .9rem; margin-bottom: 2px; }

/* ---------- App shell (client / admin) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); flex: none; position: fixed; inset: 0 auto 0 0; z-index: 800;
    background: linear-gradient(180deg, #081527 0%, #061020 100%);
    border-right: 1px solid var(--line); display: flex; flex-direction: column;
    transition: transform .26s var(--ease);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 19px 20px; border-bottom: 1px solid var(--line-soft); height: var(--topbar-h); }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 16px 12px 24px; }
.sidebar-section { font-size: .66rem; text-transform: uppercase; letter-spacing: .15em; color: var(--text-dim); font-weight: 700; padding: 16px 12px 8px; }
.sidebar-link {
    display: flex; align-items: center; gap: 11px; padding: 9.5px 12px; border-radius: 9px;
    color: var(--text-soft); font-size: .865rem; font-weight: 500; margin-bottom: 2px;
    transition: background .16s var(--ease), color .16s var(--ease); position: relative;
}
.sidebar-link i, .sidebar-link .si { width: 18px; text-align: center; font-size: .92rem; color: var(--text-mute); flex: none; transition: color .16s var(--ease); }
.sidebar-link:hover { background: rgba(255, 255, 255, .045); color: #fff; }
.sidebar-link:hover i { color: var(--cyan-400); }
.sidebar-link.active { background: linear-gradient(90deg, rgba(27, 111, 224, .2), rgba(34, 211, 238, .07)); color: #fff; }
.sidebar-link.active::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--cyan-500);
}
.sidebar-link.active i { color: var(--cyan-400); }
.sidebar-badge {
    margin-left: auto; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700;
    padding: 1.5px 6px; border-radius: 999px; min-width: 18px; text-align: center;
}
.sidebar-badge.info { background: rgba(34, 211, 238, .2); color: var(--cyan-400); }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--line-soft); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 10px; }
.sidebar-user:hover { background: rgba(255, 255, 255, .04); }
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: .84rem; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: .72rem; color: var(--text-dim); }

.app-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: var(--topbar-h); display: flex; align-items: center; gap: 16px; padding: 0 26px;
    border-bottom: 1px solid var(--line); background: rgba(7, 14, 26, .82);
    backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 700;
}
.topbar-title { font-family: var(--font-display); font-size: 1.02rem; font-weight: 640; color: #fff; }
.topbar-sub { font-size: .76rem; color: var(--text-dim); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    border: 1px solid var(--line); background: rgba(12, 24, 40, .7); color: var(--text-soft);
    cursor: pointer; transition: all .16s var(--ease); font-size: .92rem;
}
.icon-btn:hover { color: #fff; border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08); }
.icon-btn .ping {
    position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--danger); color: #fff; font-size: .6rem; font-weight: 700;
    display: grid; place-items: center; border: 1.5px solid var(--navy-900);
}
.content { padding: 26px; flex: 1; }
.content-narrow { max-width: 1080px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 1.62rem; margin: 0 0 5px; }
.page-head p { margin: 0; color: var(--text-mute); font-size: .89rem; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .78rem; color: var(--text-dim); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--cyan-400); }
.breadcrumb span.sep { opacity: .5; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(3, 7, 14, .7); z-index: 790; backdrop-filter: blur(2px); }
.sidebar-overlay.show { display: block; }

/* mobile topbar toggle */
.sidebar-toggle { display: none; }

/* ---------- Support mode banner ---------- */
.support-banner {
    display: flex; align-items: center; gap: 12px; padding: 10px 26px; font-size: .82rem;
    background: linear-gradient(90deg, rgba(244, 183, 64, .16), rgba(244, 183, 64, .05));
    border-bottom: 1px solid rgba(244, 183, 64, .3); color: #ffe3a8;
}
.support-banner strong { color: #fff; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tab {
    padding: 11px 16px; font-size: .87rem; font-weight: 550; color: var(--text-mute);
    border-bottom: 2px solid transparent; white-space: nowrap; transition: all .16s var(--ease);
    background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--cyan-500); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .3s var(--ease); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1.5px;
    background: linear-gradient(180deg, rgba(34, 211, 238, .5), rgba(34, 211, 238, .06));
}
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -30px; top: 3px; width: 17px; height: 17px; border-radius: 50%;
    background: var(--navy-800); border: 2px solid var(--cyan-500); display: grid; place-items: center;
}
.timeline-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-400); }
.timeline-item.is-current .timeline-dot { box-shadow: 0 0 0 4px rgba(34, 211, 238, .15); }
.timeline-item.is-muted .timeline-dot { border-color: var(--text-dim); }
.timeline-item.is-muted .timeline-dot::after { background: var(--text-dim); }
.timeline-card {
    background: rgba(13, 26, 44, .6); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 15px 17px;
}
.timeline-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.timeline-date { font-size: .76rem; color: var(--text-dim); font-family: var(--font-mono); }
.timeline-title { font-weight: 620; color: #fff; font-size: .93rem; }
.timeline-body { font-size: .86rem; color: var(--text-mute); line-height: 1.68; white-space: pre-line; }
.timeline-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: .76rem; color: var(--text-dim); }

/* ---------- Progress ---------- */
.progress { height: 7px; border-radius: 999px; background: rgba(27, 47, 71, .8); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-500), var(--cyan-500)); transition: width .8s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-mute); margin-bottom: 7px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; gap: 0; margin-bottom: 32px; overflow-x: auto; padding-bottom: 4px; }
.step { display: flex; align-items: center; gap: 10px; padding-right: 12px; flex: 1; min-width: 132px; position: relative; }
.step:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--line); margin-left: 4px; }
.step-num {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
    font-size: .78rem; font-weight: 700; background: rgba(19, 42, 69, .8); color: var(--text-mute);
    border: 1px solid var(--line); transition: all .2s var(--ease);
}
.step-label { font-size: .8rem; color: var(--text-mute); font-weight: 550; white-space: nowrap; }
.step.active .step-num { background: linear-gradient(135deg, var(--blue-600), var(--cyan-500)); color: #04121f; border-color: transparent; }
.step.active .step-label { color: #fff; }
.step.done .step-num { background: rgba(34, 201, 138, .16); color: var(--success); border-color: rgba(34, 201, 138, .3); }
.step.done .step-label { color: var(--text-soft); }

/* ---------- Chat ---------- */
.chat-shell { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 120px); min-height: 460px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(8, 17, 30, .6); }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; background: rgba(12, 24, 40, .7); }
.chat-status { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--text-mute); }
.chat-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.chat-status.online .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(34, 201, 138, .16); }
.chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 78%; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg-bubble { padding: 11px 15px; border-radius: 14px; font-size: .88rem; line-height: 1.6; background: rgba(20, 38, 60, .9); border: 1px solid var(--line); color: var(--text-soft); word-break: break-word; }
.msg.me .msg-bubble { background: linear-gradient(135deg, rgba(27, 111, 224, .28), rgba(34, 211, 238, .16)); border-color: rgba(34, 211, 238, .3); color: #eaf6ff; }
.msg-meta { font-size: .68rem; color: var(--text-dim); margin-top: 5px; display: flex; gap: 8px; }
.msg.me .msg-meta { justify-content: flex-end; }
.msg-internal .msg-bubble { background: rgba(244, 183, 64, .1); border-color: rgba(244, 183, 64, .3); color: #ffe3a8; }
.chat-input { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 10px; align-items: flex-end; background: rgba(10, 20, 34, .8); }
.chat-input textarea { min-height: 44px; max-height: 130px; resize: none; }
.typing { font-size: .74rem; color: var(--cyan-400); padding: 0 20px 8px; height: 18px; }

/* ---------- Skeletons & loaders ---------- */
.skeleton { background: linear-gradient(90deg, #12233a 25%, #1a3050 50%, #12233a 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(34, 211, 238, .25); border-top-color: var(--cyan-500); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner-lg { width: 34px; height: 34px; border-width: 3px; }
.loading-overlay {
    position: fixed; inset: 0; z-index: 2000; display: none; place-items: center;
    background: rgba(4, 9, 17, .72); backdrop-filter: blur(3px);
}
.loading-overlay.show { display: grid; }
.loading-card { padding: 26px 34px; border-radius: var(--radius); background: rgba(12, 24, 40, .95); border: 1px solid var(--line); text-align: center; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading .spinner { margin-right: 4px; }

/* ---------- Charts ---------- */
.chart-wrap { position: relative; width: 100%; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .78rem; color: var(--text-mute); }
.chart-legend-item { display: flex; align-items: center; gap: 7px; }
.chart-legend-dot { width: 9px; height: 9px; border-radius: 3px; }

/* ---------- Modal ---------- */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 1500; display: none; align-items: center; justify-content: center;
    background: rgba(3, 7, 14, .78); backdrop-filter: blur(4px); padding: 20px; overflow-y: auto;
}
.modal-backdrop.show { display: flex; }
.modal {
    width: 100%; max-width: 540px; background: linear-gradient(160deg, #0e1f34, #081524);
    border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    animation: modalIn .24s var(--ease); max-height: 90vh; display: flex; flex-direction: column;
}
.modal-lg { max-width: 760px; }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-head h3 { margin: 0; font-size: 1.06rem; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.page-link {
    min-width: 36px; height: 36px; padding: 0 11px; border-radius: 9px; display: inline-flex;
    align-items: center; justify-content: center; font-size: .84rem; font-weight: 550;
    color: var(--text-soft); border: 1px solid var(--line); background: rgba(12, 24, 40, .6);
    transition: all .16s var(--ease);
}
.page-link:hover { border-color: rgba(34, 211, 238, .4); color: #fff; }
.page-link.active { background: linear-gradient(135deg, var(--blue-600), var(--cyan-500)); color: #04121f; border-color: transparent; font-weight: 650; }
.page-link.disabled { opacity: .4; pointer-events: none; }
.page-info { font-size: .8rem; color: var(--text-dim); margin-left: auto; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 54px 24px; }
.empty-icon {
    width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center;
    background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .18); color: var(--cyan-400); font-size: 1.4rem;
}
.empty-state h3 { font-size: 1.02rem; margin-bottom: 7px; }
.empty-state p { font-size: .88rem; color: var(--text-mute); max-width: 420px; margin: 0 auto 20px; }

/* ---------- Data list (key/value) ---------- */
.kv { display: grid; gap: 0; }
.kv-row { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.kv-row:last-child { border-bottom: 0; }
.kv-key { font-size: .81rem; color: var(--text-mute); }
.kv-val { font-size: .87rem; color: var(--text); word-break: break-word; }
.kv-val.strong { font-weight: 600; color: #fff; }

/* ---------- Notification list ---------- */
.notif-item {
    display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: rgba(12, 24, 40, .5); margin-bottom: 10px;
    transition: border-color .16s var(--ease), background .16s var(--ease);
}
.notif-item:hover { border-color: rgba(34, 211, 238, .26); }
.notif-item.unread { background: rgba(27, 111, 224, .07); border-color: rgba(34, 211, 238, .26); }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(34, 211, 238, .1); color: var(--cyan-400); }
.notif-title { font-weight: 620; color: #fff; font-size: .89rem; margin-bottom: 3px; }
.notif-body { font-size: .85rem; color: var(--text-mute); line-height: 1.6; }
.notif-time { font-size: .72rem; color: var(--text-dim); white-space: nowrap; }

/* ---------- Cookie banner ---------- */
.cookie-bar {
    position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 1400; max-width: 720px; margin: 0 auto;
    padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line);
    background: rgba(9, 20, 34, .97); backdrop-filter: blur(14px); box-shadow: var(--shadow-lg);
    display: none; gap: 16px; align-items: center; flex-wrap: wrap;
}
.cookie-bar.show { display: flex; animation: fadeUp .3s var(--ease); }
.cookie-bar p { margin: 0; font-size: .82rem; color: var(--text-mute); flex: 1 1 320px; line-height: 1.6; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 1600; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
    display: flex; gap: 11px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: .86rem;
    background: rgba(12, 24, 40, .97); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    animation: toastIn .26s var(--ease); color: var(--text-soft); align-items: flex-start;
}
.toast.success { border-color: rgba(34, 201, 138, .4); }
.toast.success i { color: var(--success); }
.toast.error { border-color: rgba(242, 85, 90, .4); }
.toast.error i { color: var(--danger); }
.toast.info { border-color: rgba(74, 168, 240, .4); }
.toast.info i { color: var(--info); }

/* ---------- Invoice ---------- */
.invoice-doc { background: #fff; color: #16233a; border-radius: var(--radius); padding: 46px; max-width: 860px; margin: 0 auto; }
.invoice-doc h1, .invoice-doc h2, .invoice-doc h3 { color: #0d1b2f; }
.invoice-doc table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.invoice-doc th { text-align: left; padding: 10px 12px; background: #eef3f9; color: #40556f; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid #dbe4ee; }
.invoice-doc td { padding: 11px 12px; border-bottom: 1px solid #e8eef5; color: #2a3b52; }
.invoice-doc .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Misc components ---------- */
.divider-text { display: flex; align-items: center; gap: 14px; color: var(--text-dim); font-size: .78rem; margin: 22px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 7px; font-size: .75rem; background: rgba(34, 211, 238, .09); color: var(--cyan-400); border: 1px solid rgba(34, 211, 238, .2); }
.metric-inline { display: flex; align-items: baseline; gap: 8px; }
.metric-inline .v { font-family: var(--font-display); font-size: 1.3rem; font-weight: 680; color: #fff; }
.metric-inline .l { font-size: .78rem; color: var(--text-mute); }
.copy-field { display: flex; gap: 8px; align-items: center; background: rgba(7, 15, 27, .8); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; font-family: var(--font-mono); font-size: .82rem; color: var(--cyan-300); word-break: break-all; }
.copy-field button { margin-left: auto; background: none; border: 0; color: var(--text-mute); cursor: pointer; flex: none; }
.copy-field button:hover { color: var(--cyan-400); }
.pill-list { display: flex; gap: 8px; flex-wrap: wrap; }
.info-strip { display: flex; gap: 20px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius-sm); background: rgba(15, 30, 50, .55); border: 1px solid var(--line); font-size: .82rem; color: var(--text-mute); }
.info-strip strong { color: #fff; }
.scroll-x { overflow-x: auto; }
.mw-0 { min-width: 0; }

/* ---------- Animations ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.88); } }
@keyframes dash { to { stroke-dashoffset: -40; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .hero-inner { grid-template-columns: 1fr; gap: 42px; }
    .hero-visual { max-width: 100%; margin: 0; aspect-ratio: 16/11; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    :root { --sidebar-w: 250px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: grid; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-toggle { display: grid; place-items: center; }
    .section { padding: 60px 0; }
    .hero { padding: 56px 0 64px; }
    .cta-band { padding: 34px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .content { padding: 18px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .table-wrap { border-radius: var(--radius-sm); }
    .invoice-doc { padding: 26px; }
    .page-head { margin-bottom: 18px; }
    .page-head h1 { font-size: 1.36rem; }
    .chat-shell { height: calc(100vh - 260px); }
    .msg { max-width: 90%; }
    .row > * { flex: 1 1 100%; }
}
@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .btn { padding: 10px 18px; font-size: .86rem; }
    .btn-lg { padding: 13px 22px; font-size: .9rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
    .hero-trust { gap: 18px; }
    .card { padding: 18px; }
    .topbar { padding: 0 14px; gap: 10px; }
    .topbar-title { font-size: .92rem; }
    .stat-value { font-size: 1.5rem; }
    .kv-row { grid-template-columns: 1fr; gap: 3px; }
    .timeline { padding-left: 24px; }
    .timeline-dot { left: -24px; }
    .modal { max-width: 100%; }
    .toast-stack { left: 14px; right: 14px; max-width: none; }
    .cookie-bar { left: 12px; right: 12px; bottom: 12px; }
    .step { min-width: 110px; }
    .step-label { font-size: .74rem; }
    .process-step { grid-template-columns: 54px 1fr; gap: 16px; }
}

/* ---------- Print ---------- */
@media print {
    body { background: #fff; color: #000; }
    .sidebar, .topbar, .site-header, .site-footer, .page-actions, .btn, .cookie-bar, .support-banner, .toast-stack { display: none !important; }
    .app-main { margin: 0; }
    .card, .glass { border: 1px solid #ccc; background: #fff; box-shadow: none; }
    .invoice-doc { padding: 0; }
    h1, h2, h3, .stat-value, .kv-val, .card-title { color: #000 !important; }
    p, td, .kv-key, .text-mute { color: #333 !important; }
}
