/* =============================================================================
   Carpathica client portal - design system
   One tonal scale built from the brand colour #01579b (10% tint and shade
   steps), blue-tinted neutrals, layered surfaces and soft two-part shadows.
   ============================================================================= */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    /* Brand scale - anchor 700 = #01579b */
    --b-25: #f7fafc;
    --b-50: #f0f5fa;
    --b-100: #e6eef5;
    --b-200: #ccddeb;
    --b-300: #b3cde1;
    --b-400: #80abcd;
    --b-500: #4d89b9;
    --b-600: #1a68a5;
    --b-700: #01579b;
    --b-800: #01467c;
    --b-900: #01345d;
    --b-950: #00233e;
    --b-975: #001a2f;
    --b-990: #00111f;
    --brand-rgb: 1, 87, 155;
    --deep-rgb: 0, 26, 47;

    /* Gold accent from the website, used sparingly */
    --gold: #c9a227;
    --gold-soft: #f5e6b3;

    /* Blue-tinted neutrals */
    --ink-900: #0c2236;
    --ink-700: #2d4459;
    --ink-500: #5a7084;
    --ink-400: #8195a7;
    --line: rgba(var(--brand-rgb), .10);
    --line-strong: rgba(var(--brand-rgb), .18);
    --canvas: var(--b-50);
    --surface: #ffffff;

    /* Status - muted so they sit calmly on the canvas */
    --ok: #0f7f63;
    --ok-bg: rgba(15, 127, 99, .09);
    --warn: #a86b12;
    --warn-bg: rgba(201, 162, 39, .14);
    --err: #b8403a;
    --err-bg: rgba(184, 64, 58, .08);

    /* Gradients */
    --g-brand: linear-gradient(135deg, var(--b-600) 0%, var(--b-700) 48%, var(--b-900) 100%);
    --g-deep: linear-gradient(160deg, var(--b-950) 0%, var(--b-975) 55%, var(--b-990) 100%);
    --g-avatar: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 100%);

    /* Radii */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;

    /* Two-part shadows: a tight contact shadow plus a wide ambient one */
    --sh-1: 0 1px 2px rgba(var(--deep-rgb), .05), 0 1px 1px rgba(var(--deep-rgb), .03);
    --sh-2: 0 1px 2px rgba(var(--deep-rgb), .04), 0 10px 28px -10px rgba(var(--deep-rgb), .14);
    --sh-3: 0 2px 6px rgba(var(--deep-rgb), .05), 0 28px 56px -20px rgba(var(--deep-rgb), .24);
    --sh-brand: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 10px 24px -10px rgba(var(--brand-rgb), .65);
    --highlight: inset 0 1px 0 rgba(255, 255, 255, .9);
    --ring: 0 0 0 4px rgba(var(--brand-rgb), .16);

    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Inter Display", "Inter", ui-sans-serif, system-ui, sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --side-w: 272px;
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.portal {
    margin: 0;
    min-height: 100vh;
    font: 400 15px/1.55 var(--font);
    color: var(--ink-900);
    background:
        radial-gradient(1100px 520px at 100% -8%, rgba(var(--brand-rgb), .07), transparent 62%),
        radial-gradient(800px 420px at -6% 108%, rgba(201, 162, 39, .05), transparent 60%),
        var(--canvas);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

a { color: var(--b-700); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--b-900); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

.skip-link {
    position: absolute; left: 16px; top: -48px; z-index: 100;
    padding: 10px 16px; border-radius: var(--r-sm);
    background: var(--b-900); color: #fff; font-weight: 600;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; color: #fff; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.tabular { font-variant-numeric: tabular-nums; }
.text-gold { color: var(--gold); }

/* ---------------------------------------------------------------- Type */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0 0 10px;
    font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--b-600);
}
.eyebrow::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .18);
}

.display {
    margin: 0;
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.028em;
    color: var(--b-975);
}

.lead { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-500); max-width: 60ch; }

.muted { color: var(--ink-500); }

/* ---------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 46px; padding: 0 20px;
    border: 1px solid transparent; border-radius: var(--r-md);
    font: 600 15px/1 var(--font); letter-spacing: -.005em;
    cursor: pointer; white-space: nowrap;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn i { font-size: 16px; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { pointer-events: none; opacity: .72; }

/* Primary - same hover as the website's "Start Your Project" button: 2px lift, soft glow, sweeping shine */
.btn-primary {
    position: relative; overflow: hidden;
    height: auto; padding: 16px 24px;
    color: #fff; background: var(--g-brand); box-shadow: var(--sh-brand);
    transition: all 300ms ease;
}
.btn-primary::before {
    content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left 500ms ease;
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 0 20px rgba(var(--brand-rgb), .3); }
.btn-primary:hover::before { left: 100%; }

.btn-quiet {
    color: var(--b-800); background: var(--surface);
    border-color: var(--line-strong); box-shadow: var(--sh-1), var(--highlight);
}
.btn-quiet:hover { color: var(--b-900); border-color: rgba(var(--brand-rgb), .32); background: var(--b-25); }

.btn-glass {
    color: #fff; background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-glass:hover { color: #fff; background: rgba(255, 255, 255, .2); }

.btn-block { width: 100%; }

.btn .spinner {
    display: none; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: 600 14px/1.4 var(--font); color: var(--b-700);
}
.link-btn:hover { color: var(--b-900); }
.link-btn[disabled] { color: var(--ink-400); cursor: default; }

/* ---------------------------------------------------------------- Forms */
.field { margin-bottom: 18px; }
.field-label {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-700);
}
.field-label a { font-weight: 500; font-size: 13px; }
.field-wrap { position: relative; }

.field-input {
    width: 100%; height: 48px; padding: 0 16px;
    font: 400 15px/1 var(--font); color: var(--ink-900);
    background: var(--surface);
    border: 1px solid var(--line-strong); border-radius: var(--r-md);
    box-shadow: inset 0 1px 2px rgba(var(--deep-rgb), .04);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
    -webkit-appearance: none; appearance: none;
}
.field-input::placeholder { color: var(--ink-400); }
.field-input:hover { border-color: rgba(var(--brand-rgb), .3); }
.field-input:focus { outline: none; border-color: var(--b-600); box-shadow: var(--ring), inset 0 1px 2px rgba(var(--deep-rgb), .04); }
.field-wrap .field-input[data-password] { padding-right: 52px; }

.field-code {
    height: 64px; text-align: center;
    font: 600 28px/1 var(--font); letter-spacing: .42em; text-indent: .42em;
    font-variant-numeric: tabular-nums;
}
.field-code::placeholder { color: var(--b-200); }

.field-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 38px; height: 38px;
    border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-400);
    cursor: pointer; transition: color .2s var(--ease), background .2s var(--ease);
}
.field-toggle:hover { color: var(--b-700); background: var(--b-50); }

.field-error { margin: 8px 0 0; font-size: 13.5px; color: var(--err); }
.field-help { margin: 8px 0 0; font-size: 13px; color: var(--ink-500); }
.field-help ul { margin: 6px 0 0; padding-left: 18px; }
.has-error .field-input { border-color: rgba(184, 64, 58, .55); }

/* ---------------------------------------------------------------- Notices */
.notice {
    display: flex; gap: 12px; align-items: flex-start;
    margin-bottom: 20px; padding: 12px 14px;
    font-size: 14px; line-height: 1.5;
    border-radius: var(--r-md); border: 1px solid transparent;
}
.notice i { font-size: 16px; line-height: 1.35; }
.notice-error { color: var(--err); background: var(--err-bg); border-color: rgba(184, 64, 58, .16); }
.notice-success { color: var(--ok); background: var(--ok-bg); border-color: rgba(15, 127, 99, .16); }
.notice-info { color: var(--b-800); background: var(--b-100); border-color: var(--line); }
.notice-warning { color: var(--warn); background: var(--warn-bg); border-color: rgba(201, 162, 39, .24); }

/* =============================================================================
   Sign-in layout - brand panel + form
   ============================================================================= */
.auth { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; min-height: 100vh; }

.auth-panel {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 44px 56px; color: #fff; background: var(--g-deep);
}
.auth-panel::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(640px 420px at 12% -6%, rgba(26, 104, 165, .55), transparent 64%),
        radial-gradient(520px 380px at 104% 38%, rgba(1, 87, 155, .38), transparent 62%),
        radial-gradient(420px 300px at 30% 112%, rgba(201, 162, 39, .14), transparent 66%);
}
/* Architecture blueprint - full panel, with a soft reading zone behind the copy */
.auth-panel::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    /* Spans from just below the logo block to just above the Panthero badge */
    background: url("../img/blueprint-architecture.svg") center top 108px / auto calc(100% - 216px) no-repeat;
    opacity: .237;
    -webkit-mask-image: radial-gradient(ellipse 52% 30% at 34% 50%, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .34) 55%, #000 100%);
    mask-image: radial-gradient(ellipse 52% 30% at 34% 50%, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .34) 55%, #000 100%);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
    display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: 12px; background: #fff;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5), inset 0 -1px 0 rgba(var(--brand-rgb), .12);
}
.brand-mark img { width: 26px; height: 26px; display: block; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -.01em; line-height: 1.15; }
.brand-name small { display: block; font-weight: 500; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .58); }

.auth-pitch { max-width: 400px; }
.auth-pitch h2 {
    margin: 0 0 16px;
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(32px, 3vw, 44px); line-height: 1.06; letter-spacing: -.03em;
}
.auth-pitch h2 span {
    background: linear-gradient(120deg, var(--gold-soft) 0%, var(--gold) 60%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-pitch p { margin: 0; font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, .72); }

.auth-features { display: grid; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.auth-features li {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(1, 52, 93, .58) 0%, rgba(0, 35, 62, .66) 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 24px -14px rgba(0, 0, 0, .6);
    font-size: 14.5px; color: rgba(255, 255, 255, .88);
}
.auth-features i {
    display: grid; place-items: center; flex: none; width: 34px; height: 34px;
    border-radius: 10px; font-size: 16px; color: #fff;
    background: linear-gradient(135deg, rgba(26, 104, 165, .9), rgba(1, 52, 93, .9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 14px -6px rgba(0, 0, 0, .5);
}

.protected {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 8px 14px 8px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .62);
    background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
    transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.protected:hover { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
.protected > i:first-child { color: var(--gold); }
.protected img { width: 22px; height: 22px; border-radius: 6px; opacity: .9; transition: opacity .2s var(--ease); }
.protected:hover img { opacity: 1; }
.protected-name { font-weight: 600; color: #fff; }
.protected-ext { font-size: 11px; opacity: .6; }
.auth-protected-mobile { display: none; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .display { font-size: clamp(30px, 3vw, 38px); }
.auth-card .lead { font-size: 15px; margin-bottom: 30px; }
.auth-mobile-brand { display: none; }

.auth-alt { margin: 26px 0 0; font-size: 14px; color: var(--ink-500); text-align: center; }

.auth-resend {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 22px; padding: 14px 16px;
    border-radius: var(--r-md); background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--sh-1), var(--highlight);
    font-size: 14px; color: var(--ink-500);
}

.icon-badge {
    display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px;
    border-radius: 16px; font-size: 22px; color: var(--b-700);
    background: linear-gradient(145deg, #fff 0%, var(--b-100) 100%);
    border: 1px solid var(--line); box-shadow: var(--sh-2), var(--highlight);
}

/* =============================================================================
   App layout - sidebar + topbar + content
   ============================================================================= */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

.side {
    position: sticky; top: 0; height: 100vh; z-index: 40;
    display: flex; flex-direction: column;
    padding: 22px 16px 16px; color: #fff; overflow: hidden; isolation: isolate;
    background: var(--g-deep);
    border-right: 1px solid rgba(255, 255, 255, .05);
}
.side::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(420px 300px at 0% 0%, rgba(26, 104, 165, .42), transparent 68%),
        radial-gradient(320px 260px at 100% 100%, rgba(201, 162, 39, .08), transparent 70%);
}
.side .brand { padding: 4px 8px 22px; }

.side-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.side-group { margin-bottom: 18px; }
.side-group-label {
    margin: 0 0 8px; padding: 0 12px;
    font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
}
.side-link {
    position: relative; display: flex; align-items: center; gap: 12px;
    height: 42px; padding: 0 12px; margin-bottom: 2px;
    border-radius: var(--r-sm); border: 1px solid transparent;
    font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, .7);
    transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.side-link i { font-size: 17px; width: 20px; text-align: center; opacity: .9; }
.side-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-link[aria-current="page"] {
    color: #fff;
    background: linear-gradient(90deg, rgba(26, 104, 165, .62) 0%, rgba(26, 104, 165, .16) 100%);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 18px -12px rgba(0, 0, 0, .6);
}
.side-link[aria-current="page"]::before {
    content: ""; position: absolute; left: -4px; top: 11px; bottom: 11px; width: 3px;
    border-radius: 3px; background: var(--gold); box-shadow: 0 0 12px rgba(201, 162, 39, .6);
}
.side-link.is-soon { color: rgba(255, 255, 255, .42); cursor: default; }
.side-link.is-soon:hover { background: none; }
.side-soon {
    margin-left: auto; padding: 2px 8px; border-radius: 999px;
    font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .08);
}

.side-user {
    display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.avatar {
    display: grid; place-items: center; flex: none; width: 38px; height: 38px;
    border-radius: 12px; background: var(--g-avatar);
    font-weight: 600; font-size: 14px; color: var(--b-975);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 14px -6px rgba(0, 0, 0, .45);
}
.side-user-text { min-width: 0; flex: 1; line-height: 1.3; }
.side-user-text strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin: 0; }
.icon-btn {
    display: grid; place-items: center; width: 36px; height: 36px;
    border-radius: var(--r-sm); border: 1px solid transparent;
    background: transparent; color: inherit; cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.side .icon-btn { color: rgba(255, 255, 255, .6); }
.side .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

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

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    height: 64px; padding: 0 40px;
    background: rgba(240, 245, 250, .74);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; color: var(--b-900); }
.topbar .menu-btn:hover { background: var(--b-100); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-500); }
.crumbs strong { color: var(--ink-900); font-weight: 600; }
.crumbs i { font-size: 12px; color: var(--ink-400); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
    border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-700);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1), var(--highlight);
}
.chip i { color: var(--b-600); }
.chip-staff { color: var(--warn); }
.chip-staff i { color: var(--gold); }

.page { width: 100%; max-width: 1280px; padding: 36px 40px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }

/* ---------------------------------------------------------------- Surfaces */
.card {
    position: relative; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-2), var(--highlight);
}

.hero-card {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center; min-height: 236px;
    padding: 36px 40px; margin-bottom: 24px;
    border-radius: var(--r-xl); color: #fff; background: var(--g-brand);
    box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.hero-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(520px 320px at 88% 10%, rgba(255, 255, 255, .16), transparent 62%),
        radial-gradient(420px 280px at 6% 120%, rgba(0, 17, 31, .45), transparent 66%),
        radial-gradient(300px 220px at 70% 120%, rgba(201, 162, 39, .18), transparent 70%);
}
/* Delivery-lifecycle blueprint on the right, clear of the copy */
.hero-card::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: url("../img/blueprint-lifecycle.svg") right center / auto 100% no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent 28%, rgba(0, 0, 0, .6) 46%, #000 62%);
    mask-image: linear-gradient(90deg, transparent 28%, rgba(0, 0, 0, .6) 46%, #000 62%);
}
.hero-card > div { position: relative; max-width: 52%; }
.hero-card h2 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.hero-card p { margin: 0; max-width: 52ch; color: rgba(255, 255, 255, .78); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.grid-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.stat-icon {
    display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: 12px; font-size: 18px; color: var(--b-700);
    background: linear-gradient(145deg, var(--b-50) 0%, var(--b-100) 100%);
    border: 1px solid var(--line); box-shadow: var(--highlight);
}
.stat-label { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--ink-500); }
.stat-value { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; color: var(--b-975); font-variant-numeric: tabular-nums; }
.stat-value.is-empty { font-family: var(--font); font-weight: 400; color: var(--b-300); }
.stat-foot { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-400); }
.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
    border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
    color: var(--b-700); background: var(--b-50); border: 1px solid var(--line);
}

.grid-panels { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.panel { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-900); }
.panel-sub { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-500); }

.empty {
    display: grid; place-items: center; text-align: center;
    padding: 36px 24px; border-radius: var(--r-md);
    border: 1.5px dashed rgba(var(--brand-rgb), .16);
    background: linear-gradient(180deg, var(--b-25) 0%, rgba(247, 250, 252, 0) 100%);
}
.empty .icon-badge { margin-bottom: 14px; width: 46px; height: 46px; font-size: 19px; }
.empty h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ink-900); }
.empty p { margin: 0; max-width: 38ch; font-size: 14px; color: var(--ink-500); }

.staff-card { margin-top: 16px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; overflow: hidden; }
.staff-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
.staff-card .panel-title { display: flex; align-items: center; gap: 10px; }

.scrim { display: none; }

/* ---------------------------------------------------------------- Motion */
.rise { animation: rise .6s var(--ease) both; }
.rise-2 { animation-delay: .06s; }
.rise-3 { animation-delay: .12s; }
.rise-4 { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Responsive */
/* Blueprints step aside when their containers narrow */
@media (max-width: 1400px) {
    .hero-card { padding-bottom: 168px; min-height: 0; }
    .hero-card > div { max-width: 640px; }
    .hero-card::after {
        background-position: right 12px bottom 8px; background-size: auto 156px;
        -webkit-mask-image: none; mask-image: none;
    }
}

@media (max-width: 1220px) {
    .auth-panel::after { opacity: .177; }
}

@media (max-width: 1180px) {
    .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-panels { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .app { grid-template-columns: 1fr; }
    .side {
        position: fixed; left: 0; top: 0; bottom: 0; width: min(var(--side-w), 86vw);
        transform: translateX(-102%); visibility: hidden;
        transition: transform .35s var(--ease), visibility 0s linear .35s;
    }
    .side.is-open {
        transform: none; visibility: visible; transition: transform .35s var(--ease);
        box-shadow: 24px 0 48px -24px rgba(0, 0, 0, .5);
    }
    .scrim {
        display: block; position: fixed; inset: 0; z-index: 35;
        background: rgba(0, 17, 31, .42);
        -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
        opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
    }
    .scrim.is-open { opacity: 1; pointer-events: auto; }
    .topbar { padding: 0 20px; }
    .topbar .menu-btn { display: grid; }
    .page { padding: 28px 20px 48px; }
}

@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-main { align-items: flex-start; padding: 32px 20px 48px; }
    .auth-mobile-brand {
        display: flex; align-items: center; justify-content: space-between;
        margin: -32px -20px 32px; padding: 18px 20px;
        background: var(--g-deep); position: relative; overflow: hidden;
    }
    .auth-mobile-brand::before {
        content: ""; position: absolute; inset: 0;
        background: radial-gradient(360px 180px at 0% 0%, rgba(26, 104, 165, .55), transparent 70%);
    }
    .auth-mobile-brand::after {
        content: ""; position: absolute; inset: 0; pointer-events: none;
        background: url("../img/blueprint-architecture.svg") right -40px top -70px / 300px auto no-repeat;
        opacity: .184;
    }
    .auth-mobile-brand .brand { position: relative; }
    .auth-protected-mobile { display: flex; justify-content: center; margin-top: 28px; }
    .auth-protected-mobile .protected { color: var(--ink-500); background: var(--surface); border-color: var(--line); box-shadow: var(--sh-1), var(--highlight); }
    .auth-protected-mobile .protected:hover { color: var(--ink-900); border-color: var(--line-strong); }
    .auth-protected-mobile .protected-name { color: var(--b-900); }
    .auth-protected-mobile .protected img { padding: 3px; background: var(--g-deep); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
}

@media (max-width: 720px) {
    .hero-card { padding: 28px 24px 150px; }
    .hero-card > div { max-width: none; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .topbar-end .chip-date { display: none; }
    .staff-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
    .grid-stats { gap: 12px; }
    .stat { padding: 16px; }
    .stat-top { margin-bottom: 14px; }
    .stat-top .pill { display: none; }
    .stat-value { font-size: 24px; }
}

@media (max-width: 340px) {
    .grid-stats { grid-template-columns: 1fr; }
}

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