/* ==========================================================================
   FCE Bid Exchange — design system
   Brand tokens live in :root so they can be swapped for official FCE brand values.
   ========================================================================== */
:root {
    --ink: #0B1324;
    --ink-2: #111B31;
    --ink-3: #1A2742;
    --brand: #0E7C66;
    --brand-600: #0B6B58;
    --brand-bright: #2DD4A7;
    --brand-50: #E8F7F2;
    --accent: #F59E0B;
    --accent-50: #FEF5E7;
    --danger: #DC2626;
    --danger-50: #FDECEC;
    --info: #2563EB;
    --info-50: #EBF1FE;
    --violet: #7C3AED;
    --violet-50: #F2ECFE;

    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    --border: #E3E8F0;
    --border-strong: #CDD5E1;
    --text: #0F172A;
    --text-2: #334155;
    --muted: #64748B;
    --faint: #94A3B8;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 24px rgba(15, 23, 42, .06);
    --shadow-lg: 0 24px 60px rgba(2, 8, 23, .28);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Manrope", "Inter", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --bs-body-font-family: var(--font);
    --bs-primary: var(--brand);
    --bs-primary-rgb: 14, 124, 102;
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-600);
    --bs-border-color: var(--border);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.02em; color: var(--text); font-weight: 750; }
h1 { font-size: 1.75rem; margin: 0; }
h2 { font-size: 1.25rem; margin: 0; }
h3 { font-size: 1.05rem; margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-bright) 60%, transparent); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; }
.hidden { display: none !important; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: radial-gradient(120% 60% at 0% 0%, #13274A 0%, var(--ink) 55%);
    color: #CBD5E1; display: flex; flex-direction: column; padding: 18px 14px;
    border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 18px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    background: conic-gradient(from 210deg, var(--brand-bright), #22C55E, #0EA5E9, var(--brand-bright));
    -webkit-mask: radial-gradient(circle, transparent 8.5px, #000 9px); mask: radial-gradient(circle, transparent 8.5px, #000 9px);
    box-shadow: 0 0 24px rgba(45, 212, 167, .35);
}
.brand-text { line-height: 1.1; }
.brand-text b { display: block; font-family: var(--font-display); font-size: 15.5px; letter-spacing: -.01em; }
.brand-text span { font-size: 11.5px; color: #8FA3BF; letter-spacing: .08em; text-transform: uppercase; }
.nav-section { margin-top: 16px; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #64748B; padding: 0 12px 6px; }
.nav-link {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
    color: #C3CEDD; font-weight: 520; font-size: 14px; transition: background .15s, color .15s;
}
.nav-link svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgba(45, 212, 167, .18), rgba(45, 212, 167, .04)); color: #fff; box-shadow: inset 2px 0 0 var(--brand-bright); }
.nav-link .count { margin-left: auto; background: var(--accent); color: #1F1300; font-size: 11px; font-weight: 750; border-radius: 99px; padding: 1px 8px; }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 12px; color: #E2E8F0; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: linear-gradient(135deg, #1E3A8A, var(--brand)); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.user-chip .who { line-height: 1.2; min-width: 0; }
.user-chip .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { font-size: 11.5px; color: #8FA3BF; }
.signout { background: none; border: 0; color: #8FA3BF; padding: 6px; border-radius: 8px; margin-left: auto; cursor: pointer; }
.signout:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 28px 36px 60px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 50; width: 270px; transform: translateX(-100%); transition: transform .2s; }
    .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
    .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: var(--ink); color: #fff; padding: 10px 16px; }
    .topbar .brand { padding: 0; }
    .content { padding: 20px 16px 48px; }
}

/* ---------- Cards / surfaces ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; }
.card-body { padding: 18px 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 18px; }
.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)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sticky { position: sticky; top: 20px; }

/* KPI tiles */
.kpi { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.kpi .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .icon svg { width: 22px; height: 22px; }
.kpi .val { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi .lbl { color: var(--muted); font-size: 13px; }
.tone-brand { background: var(--brand-50); color: var(--brand); }
.tone-accent { background: var(--accent-50); color: #B45309; }
.tone-info { background: var(--info-50); color: var(--info); }
.tone-violet { background: var(--violet-50); color: var(--violet); }
.tone-danger { background: var(--danger-50); color: var(--danger); }

/* ---------- Buttons ---------- */
.btn {
    --h: 40px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 16px;
    border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 620; font-size: 14px; line-height: 1;
    cursor: pointer; transition: all .15s; white-space: nowrap; text-decoration: none;
}
.btn svg { width: 17px; height: 17px; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 14px rgba(14, 124, 102, .28); border-color: var(--brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover:not(:disabled) { background: var(--ink-3); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); border-color: var(--faint); }
.btn-soft { background: var(--brand-50); color: var(--brand); }
.btn-soft:hover:not(:disabled) { background: #D5F1E7; color: var(--brand-600); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #F3C2C2; }
.btn-danger:hover:not(:disabled) { background: var(--danger-50); color: var(--danger); }
.btn-accent { background: var(--accent); color: #261800; border-color: var(--accent); }
.btn-accent:hover:not(:disabled) { background: #E08E06; color: #261800; }
.btn-sm { --h: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { --h: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
    width: 100%; height: 42px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s;
}
.textarea, .field textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus, .field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14, 124, 102, .14);
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix { position: absolute; left: 13px; color: var(--muted); font-weight: 600; pointer-events: none; }
.input-group .input { padding-left: 28px; }
.input-icon { position: relative; }

.input-icon .input { padding-left: 38px; }
.validation-message, .field-error { color: var(--danger); font-size: 12.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface); padding: 7px 12px; border-radius: 99px; cursor: pointer; font-size: 13.5px; font-weight: 550; color: var(--text-2); transition: all .15s; }
.chip-toggle:hover { border-color: var(--faint); }
.chip-toggle.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }
.chip-toggle input { display: none; }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 3px; }
.segmented button, .segmented label { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.segmented .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.option-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: all .15s; background: var(--surface); }
.option-card:hover { border-color: var(--border-strong); }
.option-card.on { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-50), #fff); box-shadow: 0 0 0 3px rgba(14, 124, 102, .08); }
.option-card b { display: block; font-size: 14px; }
.option-card span { font-size: 12.5px; color: var(--muted); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.live { background: #DCFCE7; color: #15803D; }
.badge.live .dot { animation: pulse 1.6s infinite; }
.badge.soon { background: var(--info-50); color: var(--info); }
.badge.closing { background: #FEF3C7; color: #B45309; }
.badge.closed { background: #EDE9FE; color: #6D28D9; }
.badge.awarded { background: var(--brand-50); color: var(--brand-600); }
.badge.draft, .badge.neutral { background: #EEF2F6; color: #475569; }
.badge.cancelled, .badge.danger { background: var(--danger-50); color: var(--danger); }
.badge.nosale { background: #F1F5F9; color: #64748B; }
.badge.outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, .5); } 70% { box-shadow: 0 0 0 7px rgba(21, 128, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); } }

/* ---------- Alerts / toasts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert-error { background: var(--danger-50); border-color: #FBCACA; color: #991B1B; }
.alert-info { background: var(--info-50); border-color: #C7D7FB; color: #1E40AF; }
.alert-warn { background: var(--accent-50); border-color: #FBD9A0; color: #92400E; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.data th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: #FAFBFD; }
table.data tr.clickable { cursor: pointer; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.selected { background: var(--brand-50); }
table.data tr.win td { background: linear-gradient(90deg, rgba(45, 212, 167, .12), transparent 60%); }
table.data input.input { height: 34px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---------- Auction cards (marketplace) ---------- */
.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.a-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; color: inherit; }
.a-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(15, 23, 42, .10); border-color: var(--border-strong); color: inherit; }
.a-media { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden; }
.a-media img { width: 100%; height: 100%; object-fit: cover; }
.a-media .glyph { width: 64px; height: 64px; color: rgba(255,255,255,.92); filter: drop-shadow(0 6px 18px rgba(0,0,0,.25)); }
.a-media .badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 6px; }
.a-media .badges .badge { backdrop-filter: blur(8px); }
.a-media .glass { background: rgba(255, 255, 255, .88); color: var(--text); }
.a-body { padding: 16px 18px 6px; flex: 1; }
.a-body .cat { font-size: 12px; font-weight: 650; color: var(--brand); letter-spacing: .03em; }
.a-body h3 { font-size: 16px; margin: 4px 0 8px; line-height: 1.3; }
.a-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.a-meta span { display: inline-flex; align-items: center; gap: 5px; }
.a-meta svg { width: 14px; height: 14px; }
.a-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; margin-top: 10px; border-top: 1px dashed var(--border); }
.a-foot .lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.a-foot .big { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; }
.countdown.urgent { color: #C2410C; }

/* Category gradients for card headers */
.g-laptop { background: linear-gradient(135deg, #0F3D57, #0E7C66); }
.g-desktop { background: linear-gradient(135deg, #1E293B, #334E68); }
.g-server { background: linear-gradient(135deg, #0B1324, #1D4ED8); }
.g-network { background: linear-gradient(135deg, #0C4A6E, #0891B2); }
.g-storage { background: linear-gradient(135deg, #312E81, #6D28D9); }
.g-drive { background: linear-gradient(135deg, #3F3F46, #71717A); }
.g-phone { background: linear-gradient(135deg, #831843, #DB2777); }
.g-monitor { background: linear-gradient(135deg, #134E4A, #14B8A6); }
.g-pos { background: linear-gradient(135deg, #7C2D12, #EA580C); }
.g-printer { background: linear-gradient(135deg, #1E3A8A, #3B82F6); }
.g-power { background: linear-gradient(135deg, #713F12, #CA8A04); }
.g-box { background: linear-gradient(135deg, #374151, #6B7280); }
.a-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 85% 0%, rgba(255,255,255,.22), transparent 60%), repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 22px); pointer-events: none; }

/* Filters */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.filter-bar .input-icon { min-width: 260px; flex: 1 1 260px; max-width: 420px; }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--border); background: var(--surface); padding: 7px 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.pill:hover { border-color: var(--border-strong); }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill .n { font-size: 11px; background: rgba(100,116,139,.15); padding: 0 7px; border-radius: 99px; }
.pill.on .n { background: rgba(255,255,255,.18); }

/* Auction detail */
.hero-band { border-radius: 20px; overflow: hidden; position: relative; color: #fff; padding: 26px 28px; margin-bottom: 22px; }
.hero-band h1 { color: #fff; font-size: 1.65rem; }
.hero-band .sub { color: rgba(255,255,255,.78); margin-top: 6px; }
.hero-band .meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 13.5px; color: rgba(255,255,255,.88); }
.hero-band .meta-row span { display: inline-flex; gap: 7px; align-items: center; }
.hero-band .meta-row svg { width: 16px; height: 16px; opacity: .85; }
.hero-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 100% 0%, rgba(255,255,255,.18), transparent 60%), repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 26px); pointer-events: none; }
.hero-band > * { position: relative; z-index: 1; }
.bid-panel .price { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.bid-panel .timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.bid-panel .timer div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 4px; }
.bid-panel .timer b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bid-panel .timer span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bid-panel .timer.urgent div { background: #FFF7ED; border-color: #FED7AA; }
.bid-panel .timer.urgent b { color: #C2410C; }
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.stat-list .k { font-size: 12px; color: var(--muted); }
.stat-list .v { font-weight: 650; }
.reserve { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; }
.reserve.met { color: #15803D; }
.reserve.notmet { color: #B45309; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(2, 6, 23, .86); z-index: 100; display: grid; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.spec { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.spec .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.spec .v { font-weight: 650; margin-top: 2px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.timeline li:last-child { border-bottom: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; font-weight: 620; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--brand); }
.tab .n { font-size: 11px; background: #EEF2F6; padding: 1px 7px; border-radius: 99px; color: var(--muted); }

/* Steps */
.steps { display: flex; gap: 0; margin-bottom: 22px; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 620; color: var(--muted); font-size: 13.5px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #E8EDF3; color: var(--muted); font-size: 13px; font-weight: 750; flex: none; }
.step.on .n { background: var(--brand); color: #fff; }
.step.done .n { background: var(--brand-50); color: var(--brand); }
.step.on { color: var(--text); }
.step::after { content: ""; flex: 1; height: 2px; background: var(--border); margin: 0 12px; }
.step:last-child::after { display: none; }

/* Source picker */
.source-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { .source-cards { grid-template-columns: 1fr; } }
.source-card { padding: 26px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); transition: all .18s; color: inherit; display: flex; flex-direction: column; gap: 12px; }
.source-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(14, 124, 102, .12); color: inherit; }
.source-card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.source-card .ic svg { width: 26px; height: 26px; }
.source-card h3 { font-size: 17px; }
.source-card p { color: var(--muted); margin: 0; }
.source-card .go { margin-top: auto; font-weight: 650; color: var(--brand); display: inline-flex; gap: 6px; align-items: center; }

/* Dropzone */
.dropzone { position: relative; border: 2px dashed var(--border-strong); border-radius: 16px; padding: 34px 20px; text-align: center; background: var(--surface-2); transition: all .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone svg { width: 38px; height: 38px; color: var(--brand); }
.dropzone b { display: block; margin-top: 8px; font-size: 15px; }

/* AI shimmer */
.ai-working { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; background: linear-gradient(110deg, #F0FDF9 8%, #E0F7EF 18%, #F0FDF9 33%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border: 1px solid #BFEBDD; }
@keyframes shimmer { to { background-position-x: -200%; } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(14,124,102,.25); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
.spinner.light { border-color: rgba(255,255,255,.3); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.conf { display: inline-block; width: 38px; height: 6px; border-radius: 99px; background: #E5E7EB; overflow: hidden; vertical-align: middle; }
.conf i { display: block; height: 100%; background: var(--brand); }
.conf.low i { background: var(--accent); }
tr.lowconf td { background: #FFFBEB; }

/* Modal */
.modal-backdrop-x { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); backdrop-filter: blur(3px); z-index: 90; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal-x { width: 100%; max-width: 520px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal-x.wide { max-width: 760px; }
.modal-x .mh { padding: 20px 22px 0; display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.modal-x .mb { padding: 16px 22px; }
.modal-x .mf { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

/* ==========================================================================
   Public / auth pages — full-screen video landing
   ========================================================================== */
.auth-root { position: relative; min-height: 100vh; overflow: hidden; background: var(--ink); color: #fff; }
.auth-video, .auth-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-video { opacity: 0; transition: opacity 1.4s ease; }
.auth-video.on { opacity: 1; }
.auth-fallback {
    background:
        radial-gradient(60% 50% at 80% 20%, rgba(45, 212, 167, .18), transparent 60%),
        radial-gradient(50% 60% at 10% 90%, rgba(37, 99, 235, .22), transparent 60%),
        linear-gradient(180deg, #0B1324, #08101F);
}
.auth-fallback::before {
    content: ""; position: absolute; inset: -50%;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 48px 48px; transform: perspective(700px) rotateX(58deg) translateY(-10%); animation: gridmove 18s linear infinite;
    mask-image: radial-gradient(60% 60% at 50% 40%, #000, transparent 75%);
}
@keyframes gridmove { to { background-position: 0 480px; } }
.auth-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(5, 10, 22, .92) 0%, rgba(5, 10, 22, .74) 42%, rgba(5, 10, 22, .38) 100%); }
.auth-inner { position: relative; z-index: 2; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 460px); gap: 48px; align-items: center; padding: 40px clamp(20px, 5vw, 80px); max-width: 1440px; margin: 0 auto; }
.auth-inner.single { grid-template-columns: minmax(0, 640px); justify-content: center; }
.auth-top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(20px, 5vw, 80px); }
.auth-top .brand { padding: 0; }
.auth-top a.link { color: rgba(255,255,255,.85); font-weight: 600; }
.auth-top a.link:hover { color: #fff; }
.hero-copy .kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(45, 212, 167, .12); border: 1px solid rgba(45, 212, 167, .35); color: #A7F3D0; font-size: 12.5px; font-weight: 650; letter-spacing: .04em; }
.hero-copy h1 { color: #fff; font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; margin: 18px 0 16px; font-weight: 800; }
.hero-copy h1 em { font-style: normal; background: linear-gradient(90deg, #2DD4A7, #38BDF8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p.lead { font-size: 1.12rem; color: rgba(226, 232, 240, .86); max-width: 560px; margin: 0; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-stat { padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); min-width: 140px; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.hero-stat span { font-size: 12.5px; color: rgba(226, 232, 240, .7); }
.hero-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-cats span { font-size: 12.5px; padding: 5px 11px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); color: rgba(226,232,240,.85); background: rgba(255,255,255,.03); }
.glass-card {
    background: rgba(255, 255, 255, .97); color: var(--text); border-radius: 22px; padding: 30px 30px 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}
.glass-card h2 { font-size: 1.45rem; }
.glass-card .sub { color: var(--muted); margin: 6px 0 22px; }
.glass-card .divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 18px 0; }
.glass-card .divider::before, .glass-card .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-foot { position: absolute; z-index: 3; bottom: 0; left: 0; right: 0; padding: 16px clamp(20px, 5vw, 80px); display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; color: rgba(226,232,240,.55); flex-wrap: wrap; }
.trust { display: flex; gap: 16px; align-items: center; }
.trust span { display: inline-flex; gap: 6px; align-items: center; }
.trust svg { width: 15px; height: 15px; color: #2DD4A7; }
@media (max-width: 980px) {
    .auth-inner { grid-template-columns: 1fr; padding-top: 96px; padding-bottom: 80px; }
    .hero-copy h1 { font-size: 2.2rem; }
    .hero-stats, .hero-cats { display: none; }
}
.auth-scroll { overflow-y: auto; }
.register-card { max-width: 860px; margin: 110px auto 80px; }
.register-card .form-section { padding: 18px 0; border-top: 1px solid var(--border); }
.register-card .form-section:first-of-type { border-top: 0; padding-top: 0; }
.register-card .form-section h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 14px; }

/* Code input */
.code-input { letter-spacing: .5em; text-align: center; font-family: var(--mono); font-size: 22px !important; height: 54px !important; }

/* Identity manage pages — light touch on bootstrap */
.manage-wrap .nav-pills .nav-link { color: var(--text-2); }
.manage-wrap .nav-pills .nav-link.active { background: var(--brand); color: #fff; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--border-strong); }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14, 124, 102, .14); }

/* Blazor error UI */
#blazor-error-ui { background: #FEF3C7; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: var(--danger-50); padding: 1rem; color: #991B1B; border-radius: 12px; }
.blazor-error-boundary::after { content: "An error has occurred."; }
.valid.modified:not([type=checkbox]) { outline: none; }
.invalid { border-color: var(--danger) !important; }
.chip-toggle:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }
.option-card:has(input:checked) { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-50), #fff); }
h1:focus, h1:focus-visible { outline: none; }
.hero-copy .kicker svg { width: 15px; height: 15px; }
.badge svg { width: 13px; height: 13px; }
.alert svg, .kpi .icon svg { flex: none; }
.input-icon > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); pointer-events: none; }
.input-icon input.input, .input-icon select.input { padding-left: 40px !important; }
.input-icon .icon-btn svg { position: static; transform: none; width: 18px; height: 18px; }
.field .input-icon input.input { padding-left: 40px; }
/* Default icon size — any more specific rule overrides */
svg { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.crumbs svg { width: 14px; height: 14px; }
.card.kpi { flex-direction: row; }
.card { --bs-card-border-color: var(--border); }
.timeline li > svg { margin-top: 2px; color: var(--muted); }
.reserve svg { width: 14px; height: 14px; }
.input-group input.input, .field .input-group input.input { padding-left: 28px !important; }

.g-boxes { background: linear-gradient(135deg, #4C1D95, #DB2777); }
.g-recycle { background: linear-gradient(135deg, #14532D, #65A30D); }
