/* Krazy Integrated Solutions — design foundation.
   Palette is taken from the logo: cyan, electric blue, violet and pink on deep navy. Gold is kept only for warnings. */

:root {
    --bg: #050818;
    --bg-elev: #090e26;
    --bg-card: #0d1332;
    --line: #1b2350;
    --line-strong: #2b3670;
    --text: #eaeefb;
    --text-dim: #a1abcb;
    --silver-1: #f6f8ff;
    --silver-2: #b4bddb;
    --cyan: #22d3ee;
    --violet: #7c5cff;
    --pink: #ff4fa8;
    --blue: #5b6cff;
    --blue-bright: #5fd0ff;
    --blue-glow: rgba(124, 92, 255, 0.38);
    --brand-grad: linear-gradient(135deg, #19d3ff 0%, #4f7cff 38%, #7c5cff 68%, #ff4fa8 100%);
    --grad-text: var(--brand-grad); --on-grad: #050818; /* dark text on the bright gradient: 4.5:1 or more at every stop */
    --gold: #c9a24b;
    --accent: #22d3ee;
    --danger: #ff6b8b;
    --danger-bg: rgba(255, 107, 139, 0.08);
    --info-bg: rgba(91, 108, 255, 0.1);
    --radius: 14px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --field-bg: #070b15; --card-end: #0a0f28; --surface-2: #0d1220; --surface-3: #121a2e; --surface-4: #151d33; --bar-start: #0b1130;
    --ov: 255, 255, 255; --bg-rgb: 5, 8, 24;
    --c-warn: #ffd98a; --c-warn2: #f0cf85; --c-bad: #ffadad; --c-bad2: #ff9a9a; --c-bad3: #ffc9c9; --c-ok: #8ff0b8; --c-ok2: #c8f2da; --c-info: #cfe0ff;
    color-scheme: dark;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Eurostile", "Bank Gothic", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
body.site {
    background:
        radial-gradient(900px 520px at 88% -12%, rgba(124, 92, 255, 0.22), transparent 60%),
        radial-gradient(700px 420px at -8% 28%, rgba(34, 211, 238, 0.10), transparent 60%),
        radial-gradient(600px 400px at 60% 110%, rgba(255, 79, 168, 0.08), transparent 60%),
        var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; border-radius: 4px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #3a49d8; color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container-wide { width: min(1120px, 100% - 32px); margin-inline: auto; padding-block: 40px 80px; }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: 0.01em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
.silver { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.72rem; font-weight: 600; color: var(--accent); margin: 0 0 14px; }
.lead { font-size: 1.12rem; color: var(--text-dim); max-width: 56ch; }
.muted { color: var(--text-dim); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 10px; border: 1px solid transparent;
    font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn-primary { background: var(--brand-grad); background-size: 140% 140%; color: var(--on-grad); box-shadow: 0 6px 22px var(--blue-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px var(--blue-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--silver-2); background: rgba(var(--ov), 0.03); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(var(--bg-rgb), 0.72); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
.brand-word { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: 1.05rem; line-height: 1.1; }
.brand-word small { display: block; font-size: 0.55rem; letter-spacing: 0.32em; color: var(--text-dim); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--text-dim); font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 18px; height: 2px; background: var(--text); position: relative; margin: auto; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

/* Hero & sections */
.hero { padding-block: clamp(48px, 9vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-art img { margin-inline: auto; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-elev) 20%, var(--bg-elev) 80%, transparent); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 20px; margin-top: 28px; }
.card { background: linear-gradient(180deg, var(--bg-card), var(--card-end)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform 0.25s ease, border-color 0.25s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card p { color: var(--text-dim); margin: 0; }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; max-width: 70ch; }
.check-list li { padding-left: 34px; position: relative; color: var(--text-dim); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 16px; height: 2px; background: var(--brand-grad); }

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--text-dim); font-size: 0.9rem; }

/* Auth + errors */
.auth { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(440px, 100%); background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 36px 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.8rem; }
.auth-mark { margin: 0 0 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 6px; }
.field input { width: 100%; padding: 12px 14px; background: var(--field-bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; }
.field input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-glow); }
.alert { border-radius: 10px; padding: 12px 16px; margin: 16px 0; border: 1px solid; font-size: 0.95rem; }
.alert p { margin: 0; }
.alert-error { background: var(--danger-bg); border-color: rgba(255, 107, 139, 0.4); color: var(--c-bad3); }
.alert-info { background: var(--info-bg); border-color: rgba(99, 102, 255, 0.4); color: var(--c-info); }
.trace { overflow: auto; max-height: 320px; background: var(--field-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 0.75rem; color: var(--text-dim); }

/* Portal shell */
body.portal { background: var(--bg); }
.portal-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--bg-elev); }
.portal-user { display: flex; align-items: center; gap: 16px; }
.portal-name { color: var(--text-dim); font-size: 0.95rem; }
.panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-top: 20px; }
.panel h2 { font-size: 1.1rem; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--silver-1); font-size: 0.85rem; margin: 0 6px 6px 0; }
.perm-list code { display: inline-block; background: var(--field-bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; margin: 0 6px 8px 0; color: var(--silver-2); }

/* Motion: subtle reveal, disabled for users who prefer reduced motion */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .btn, .card { transition: none; }
}

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; max-width: 300px; margin-inline: auto; }
    .nav-toggle { display: block; }
    .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 20px; background: var(--bg-elev); border-bottom: 1px solid var(--line); }
    .site-nav.is-open { display: flex; }
    .site-nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
    .site-nav .btn { margin-top: 14px; }
    .auth-card { padding: 28px 22px; }
}

/* ---- Phase 1: portal navigation, tables, forms, badges ---- */
.portal-bar { gap: 20px; flex-wrap: wrap; }
.portal-nav { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; margin-left: 16px; }
.portal-nav a { color: var(--text-dim); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.portal-nav a:hover { color: var(--text); background: rgba(var(--ov), 0.04); text-decoration: none; }
.portal-nav a[aria-current="page"] { color: var(--text); background: rgba(99, 102, 255, 0.14); }
.flash-wrap { padding-top: 16px; }
.alert-ok { background: rgba(60, 200, 120, 0.08); border-color: rgba(60, 200, 120, 0.4); color: var(--c-ok2); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 0; font-size: 0.9rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 20px 0; }
.toolbar .field { margin: 0; min-width: 160px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { color: var(--text-dim); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .detail-row td { padding-top: 0; }
.table details summary { cursor: pointer; color: var(--blue-bright); font-size: 0.85rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; border: 1px solid var(--line-strong); color: var(--silver-2); }
.badge-active { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-pending { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-deactivated, .badge-archived { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-sensitive { color: var(--gold); border-color: rgba(201, 162, 75, 0.6); margin-left: 6px; }

.form-grid { display: grid; gap: 4px; max-width: 560px; }
.form-actions { margin-top: 8px; display: flex; gap: 10px; }
.field select, .inline-form input, .inline-form select {
    width: 100%; padding: 12px 14px; background: var(--field-bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit;
}
.field input:disabled, .field select:disabled { opacity: 0.55; cursor: not-allowed; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 8px 4px 0; }
.inline-form input, .inline-form select { width: auto; padding: 8px 12px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
fieldset.field { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
fieldset legend { color: var(--text-dim); font-size: 0.85rem; padding: 0 6px; }
.check { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; cursor: pointer; }
.check input { accent-color: var(--blue); }
.check.is-disabled { opacity: 0.6; cursor: not-allowed; }
.btn-danger { background: transparent; color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.btn-danger:hover { background: var(--danger-bg); }
.plain-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
a.tile { color: inherit; text-decoration: none; display: block; }
a.tile:hover { text-decoration: none; }
.card-grid { margin-bottom: 8px; }
@media (max-width: 860px) {
    .portal-nav { order: 3; flex-basis: 100%; margin-left: 0; }
    .table th, .table td { padding: 10px 12px; }
}

/* ---- Phase 2: CRM, projects, tasks, board ---- */
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.prewrap { white-space: pre-wrap; word-break: break-word; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; align-items: start; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 12px; margin: 20px 0; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color 0.2s; }
.stat:hover { border-color: var(--blue); text-decoration: none; }
.stat-n { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.stat-l { color: var(--text-dim); font-size: 0.82rem; }
.panel-warn { border-color: rgba(201, 162, 75, 0.5); }
.panel-ok { border-color: rgba(60, 200, 120, 0.4); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0 0 14px; }
.kv dt { color: var(--text-dim); font-size: 0.85rem; }
.kv dd { margin: 0; word-break: break-word; }
.overdue { color: var(--c-bad2); font-weight: 600; }
textarea { width: 100%; padding: 12px 14px; background: var(--field-bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; resize: vertical; }
textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-glow); }
.table input:not([type=checkbox]) { width: 100%; padding: 8px 10px; background: var(--field-bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; }
.badge-stage-won { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-stage-lost { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-stage-open { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.5); }
.badge-prio-high { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-prio-urgent { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.6); }
.badge-prio-low { color: var(--text-dim); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line-strong); display: grid; gap: 16px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--bg-card); }
.timeline-item.type-note::before { background: var(--gold); }
.timeline-item.type-stage_changed::before, .timeline-item.type-project::before { background: var(--blue-bright); }
.timeline-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.timeline-body { margin: 4px 0 0; color: var(--text-dim); white-space: pre-wrap; }
.public-form { max-width: none; }
.section .panel { margin-top: 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 22px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; color: var(--text-dim); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--blue); }
.progress { display: inline-block; width: 110px; height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--brand-grad); }
.note { border-left: 3px solid var(--line-strong); padding: 4px 0 4px 12px; margin: 0 0 12px; }
.note p { margin: 0 0 4px; }
.milestone { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.milestone.is-overdue { border-color: rgba(255, 107, 139, 0.45); }
.milestone-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.milestone details { margin-top: 8px; }
.milestone summary { cursor: pointer; color: var(--blue-bright); font-size: 0.9rem; }
.badge-pstatus-completed { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-pstatus-in_progress, .badge-pstatus-ready_to_start { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.5); }
.badge-pstatus-on_hold, .badge-pstatus-awaiting_payment, .badge-pstatus-awaiting_client_approval, .badge-pstatus-awaiting_client_feedback { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-pstatus-cancelled { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-mstatus-completed { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-mstatus-proposed { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-mstatus-cancelled, .badge-mstatus-rejected { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }

/* ---- Tasks & Kanban board ---- */
.badge-tstatus-completed { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-tstatus-in_progress { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.5); }
.badge-tstatus-in_review, .badge-tstatus-changes_requested { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-tstatus-blocked, .badge-tstatus-cancelled { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min(230px, 100%), 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board-col { background: rgba(var(--ov), 0.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 140px; }
.board-col-head { font-size: 0.9rem; margin: 0 0 8px; display: flex; justify-content: space-between; }
.board-cards { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.board-card { background: var(--panel, var(--surface-2)); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.board-card[draggable="true"] { cursor: grab; }
.board-card.is-overdue { border-color: rgba(255, 107, 139, 0.55); }
.board-card.is-dragging { opacity: 0.45; }
.board-card.is-saving { opacity: 0.7; }
.board-title { font-weight: 600; color: var(--text); }
.board-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; color: var(--text-dim); }
.board-move { display: flex; gap: 6px; align-items: center; }
.board-move select { flex: 1; min-width: 0; }
.board-col.can-drop { border-color: rgba(60, 200, 120, 0.55); }
.board-col.cannot-drop { opacity: 0.55; }
.board-col.is-over { background: rgba(99, 102, 255, 0.12); border-color: var(--blue); }
.reason-input { min-width: 260px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px 18px; margin-bottom: 14px; }

/* ---- Pricing ---- */
.detail-list { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 8px 18px; margin: 0 0 12px; }
.detail-list dt { color: var(--text-dim); }
.detail-list dd { margin: 0; }
.panel-attention { border-color: rgba(201, 162, 75, 0.6); }
.badge-pr-approved { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-pr-rejected, .badge-pr-withdrawn { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-pr-superseded { color: var(--text-dim); }
@media (max-width: 640px) { .detail-list { grid-template-columns: 1fr; gap: 2px; } .detail-list dd { margin-bottom: 10px; } }
.portal-main, .container-wide { min-width: 0; }
.board { max-width: 100%; position: relative; } /* position: contains the .sr-only labels so they cannot widen the page */
.toolbar .field .check { flex-direction: row; align-items: center; min-height: 44px; }

/* ---- Deliverables, revisions, notifications ---- */
.badge-dstatus-published, .badge-vstatus-published { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-dstatus-approved_internal, .badge-vstatus-approved_internal { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.5); }
.badge-dstatus-pending_review, .badge-vstatus-pending_review, .badge-vstatus-changes_requested { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-dstatus-archived, .badge-vstatus-withdrawn, .badge-vstatus-superseded { color: var(--text-dim); }
.badge-rstatus-resolved, .badge-rstatus-approved_for_work, .badge-rstatus-included_revision { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-rstatus-potentially_chargeable, .badge-rstatus-awaiting_cost_approval, .badge-rstatus-ready_for_client_review { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-rstatus-rejected, .badge-rstatus-cancelled { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-cstate-approved { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-cstate-awaiting, .badge-cstate-revision_requested { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-cstate-rejected { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.milestone.is-current { border-color: rgba(60, 200, 120, 0.55); }
tr.diff th, tr.diff td { background: rgba(201, 162, 75, 0.1); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-strong); display: grid; gap: 12px; }
.timeline li { position: relative; }
.note.is-unread { border-left-color: var(--blue); }
.hint { color: var(--text-dim); font-size: 0.85rem; margin: 4px 0 0; }
fieldset.field { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
fieldset.field label { display: block; margin-top: 8px; }
form.is-busy { opacity: 0.7; pointer-events: none; }

/* Support Centre, tickets, warranty (Phase 5) */
.thread { display: grid; gap: 12px; margin: 12px 0 18px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: rgba(var(--ov), 0.02); max-width: 78ch; }
.msg header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 4px; }
.msg p { margin: 0 0 6px; }
.msg-client { border-left: 3px solid var(--blue); }
.msg-staff { border-left: 3px solid var(--gold); }
.file-line { margin: 2px 0; }
.badge-tk-open, .badge-tk-reopened, .badge-tk-assigned { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.5); }
.badge-tk-in_progress, .badge-tk-triaged, .badge-tk-confirmed { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-tk-need_more_information, .badge-tk-awaiting_client_response, .badge-tk-client_verification, .badge-tk-awaiting_internal_team { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-tk-fixed, .badge-tk-resolved, .badge-tk-closed { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-tk-rejected, .badge-tk-unable_to_reproduce { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-w-active { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-w-scheduled, .badge-w-pending_confirmation { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-w-expired, .badge-w-suspended { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-w-not_applicable { color: var(--text-dim); }
.field .check { display: flex; flex-direction: row; align-items: baseline; gap: 10px; color: var(--text); margin-bottom: 2px; }
.field .check input { width: auto; flex: none; }
fieldset.field { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
fieldset.field legend { color: var(--text-dim); font-size: 0.85rem; padding: 0 6px; }
/* Phase 6: referral partners, commissions, payouts */
.badge-ps-received, .badge-ps-requested, .badge-ps-pending_eligibility, .badge-ps-pending_verification, .badge-ps-under_review, .badge-ps-eligible_for_review, .badge-ps-on_hold, .badge-ps-suspended { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-ps-approved, .badge-ps-contacted, .badge-ps-qualified, .badge-ps-quote_sent, .badge-ps-processing, .badge-ps-payable, .badge-ps-payout_requested, .badge-ps-adjusted { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.5); }
.badge-ps-converted, .badge-ps-paid, .badge-ps-verified, .badge-ps-active { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-ps-rejected, .badge-ps-not_converted, .badge-ps-cancelled, .badge-ps-reversed { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.table .num, .table th.num { text-align: right; white-space: nowrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
ol.timeline > li { position: relative; }
ol.timeline > li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--bg-card); }
.note { border-left: 3px solid var(--gold); padding: 4px 12px; margin: 8px 0; }
.detail-list dd, .timeline p { overflow-wrap: anywhere; }
/* Phase 7: renewals */
.badge-rn-active, .badge-rn-renewed { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-rn-renewal_approaching, .badge-rn-awaiting_admin_review, .badge-rn-awaiting_payment, .badge-rn-on_hold { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-rn-approved_for_renewal, .badge-rn-invoice_issued, .badge-rn-payment_received, .badge-rn-renewal_in_progress { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.5); }
.badge-rn-expired, .badge-rn-cancelled { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 10px; }
.step { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-dim); }
.step-done { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.step-current { color: #9ec3ff; border-color: rgba(99, 102, 255, 0.6); font-weight: 600; }
.badge-sys-ok { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-sys-warn { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-sys-info { color: var(--text-dim); }
/* Phase 8: quotations and invoices */
.badge-bq-accepted, .badge-bi-paid { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-bq-sent, .badge-bi-issued, .badge-bi-partially_paid { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
.badge-bq-draft, .badge-bi-draft { color: var(--text-dim); }
.badge-bq-rejected, .badge-bq-expired, .badge-bq-withdrawn, .badge-bi-void { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.doc-actions { padding: 12px 24px; display: flex; gap: 10px; }
body.print-doc { background: #fff; color: #111; }
.print-doc .doc { max-width: 820px; margin: 0 auto; padding: 24px; background: #fff; color: #111; }
.print-doc .doc h1, .print-doc .doc h2, .print-doc .doc h3 { color: #111; }
.print-doc .doc .muted { color: #555; }
.print-doc .doc .table-wrap { background: #fff; border-color: #ccc; }
.print-doc .doc .table th { color: #333; }
.print-doc .doc .table th, .print-doc .doc .table td { border-color: #ddd; color: #111; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 16px; }
.doc-ref { font-size: 1.1rem; margin: 4px 0 0; }
.doc-meta { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 12px; }
.doc-tax { margin-top: 18px; font-style: italic; }
@media print { .no-print { display: none !important; } body.print-doc { background: #fff; } }

/* Phase 9: search box, two-factor codes, plain lists */
.portal-search { margin-left: auto; }
.portal-search input { width: 150px; padding: 6px 10px; font-size: 0.9rem; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
ul.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; }
ul.codes code, code.key { font-size: 1.05rem; letter-spacing: 0.08em; }

/* Phase 10: charts and report cards */
.chart { width: 100%; height: auto; max-width: 720px; display: block; }
.chart-text { fill: var(--silver-1, #b8c0cc); font-size: 11px; font-family: inherit; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-bar, .chart-s0 { fill: #35c8f2; }
.chart-s1 { fill: #7c5cff; } .chart-s2 { fill: #ff4fa8; } .chart-s3 { fill: #f5b942; } .chart-s4 { fill: #3fcf8e; } .chart-s5 { fill: #5b8cff; }
.chart-ring { stroke: #35c8f2; } .chart-r1 { stroke: #7c5cff; } .chart-r2 { stroke: #ff4fa8; } .chart-r3 { stroke: #f5b942; } .chart-r4 { stroke: #3fcf8e; } .chart-r5 { stroke: #5b8cff; }
.chart-line { stroke: #35c8f2; }
.chart-total { fill: var(--silver-1, #b8c0cc); font-size: 22px; font-weight: 700; }
.chart-panel { overflow-x: auto; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
a.report-card { text-decoration: none; color: inherit; display: block; margin-top: 0; }
a.report-card:hover { border-color: var(--line-strong); }
@media print { .chart-bar, .chart-s0 { fill: #333; } .portal-search, .no-print { display: none !important; } }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.chart-grid .panel { margin-top: 0; }
[hidden] { display: none !important; }
.form-block { border: 0; padding: 0; margin: 0; }
.field-help { color: var(--silver-3, #8a93a3); font-size: 0.85rem; display: block; margin-top: 4px; }
.field-row-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.feedback-list { padding-left: 1.2em; } .feedback-list li { margin: 8px 0; } .feedback-list li.is-done { opacity: 0.6; text-decoration: line-through; }
.timecode { font-variant-numeric: tabular-nums; color: var(--gold); }
.agreement-text { max-height: 420px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.field-block { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }

/* ---- Phase 12: website pages built from CMS blocks, the editor, AI output ---- */
.cms-block { padding: 56px 0; }
.cms-block .container.narrow { width: min(760px, 100% - 32px); }
.cms-block h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 16px; }
.cms-block h2 { margin: 0 0 16px; }
.cms-hero .container { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.cms-hero-img img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.cms-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; }
.cms-card { background: linear-gradient(180deg, var(--bg-card), var(--card-end)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cms-card h3 { margin: 0 0 8px; }
.cms-cta { text-align: center; background: var(--bg-elev); border-block: 1px solid var(--line); }
.cms-text ul { padding-left: 1.2em; }
.cms-block figure { margin: 0; }
.cms-block figure img { max-width: 100%; height: auto; border-radius: var(--radius); }
.cms-block figcaption { color: var(--text-dim); margin-top: 8px; }
.cms-faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
.cms-faq summary { cursor: pointer; font-weight: 600; }
.cms-edit-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; }
.cms-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.cms-media-item { margin: 0; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.cms-media-item img { max-width: 100%; height: auto; display: block; margin-bottom: 8px; }
.ai-output { white-space: pre-wrap; word-break: break-word; font-family: inherit; line-height: 1.55; }
.footer-inner { flex-wrap: wrap; gap: 8px 20px; }
@media (min-width: 860px) { .cms-hero .container { grid-template-columns: 1.1fr 0.9fr; } }

/* ---- UI/UX pass: sidebar shell, dashboard ---- */
.portal-bar { position: sticky; top: 0; z-index: 30; flex-wrap: nowrap; gap: 14px; padding-block: 10px; }
.portal-bar .brand { flex: none; }
.portal-search { margin-left: auto; flex: 0 1 340px; }
.portal-search input { width: 100%; padding: 8px 12px; font-size: 0.92rem; }
.portal-user { gap: 12px; flex: none; }
.portal-name { color: var(--text-dim); }
.portal-name:hover { color: var(--text); text-decoration: none; }
.bell { position: relative; font-size: 1.15rem; line-height: 1; padding: 6px 8px; border-radius: 8px; color: var(--text-dim); }
.bell:hover { background: rgba(var(--ov), 0.06); text-decoration: none; }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #c42b32; color: #fff; font-size: 0.68rem; font-weight: 700; text-align: center; }
.side-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.side-toggle .bars, .side-toggle .bars::before, .side-toggle .bars::after { display: block; width: 18px; height: 2px; background: var(--text); content: ""; position: relative; }
.side-toggle .bars::before { position: absolute; top: -6px; }
.side-toggle .bars::after { position: absolute; top: 6px; }
.portal-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
.portal-side { position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; padding: 16px 12px 40px; border-right: 1px solid var(--line); background: var(--bg-elev); scrollbar-width: thin; }
.nav-group { margin-bottom: 4px; }
.nav-group summary { cursor: pointer; list-style: none; padding: 8px 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "+"; font-size: 1rem; font-weight: 400; }
.nav-group[open] summary::after { content: "\2212"; }
.nav-group summary:hover { color: var(--text); background: rgba(var(--ov), 0.04); }
.nav-group a { display: block; padding: 7px 12px 7px 16px; margin: 1px 0; border-radius: 8px; color: var(--text-dim); font-size: 0.93rem; font-weight: 500; }
.nav-group a:hover { color: var(--text); background: rgba(var(--ov), 0.05); text-decoration: none; }
.nav-group a[aria-current="page"] { color: var(--text); background: rgba(99, 102, 255, 0.2); box-shadow: inset 3px 0 0 var(--cyan); }
.portal-main .container-wide { width: min(1180px, 100% - 40px); padding-block: 28px 80px; }
.dash-head { align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { margin: 4px 0 0; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 14px; margin: 22px 0; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; border-top: 3px solid var(--blue); transition: transform 0.15s ease, border-color 0.15s ease; }
.kpi:hover { transform: translateY(-2px); text-decoration: none; }
.kpi-n { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.kpi-l { color: var(--text-dim); font-size: 0.85rem; }
.kpi-bad { border-top-color: #e5484d; }
.kpi-bad .kpi-n { color: var(--c-bad2); }
.kpi-warn { border-top-color: #c9a24b; }
.kpi-warn .kpi-n { color: var(--c-warn2); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; margin-bottom: 20px; }
.dash-grid .panel { margin-top: 0; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo a { color: var(--text); }
.todo-when { color: var(--text-dim); font-size: 0.82rem; white-space: nowrap; }
.todo-bad .todo-when { color: var(--c-bad2); font-weight: 600; }
.empty-state { color: var(--text-dim); padding: 18px 0; margin: 0; }
details.access summary { cursor: pointer; font-weight: 600; }
.panel h2 { margin-top: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.table tbody tr:hover { background: rgba(var(--ov), 0.025); }
@media (max-width: 900px) {
    .side-toggle { display: inline-flex; }
    .portal-shell { grid-template-columns: minmax(0, 1fr); }
    .portal-side { display: none; position: fixed; inset: 62px 0 0 0; height: auto; z-index: 25; border-right: 0; }
    .portal-side.is-open { display: block; }
    .portal-name { display: none; }
    .portal-search { flex: 1 1 auto; min-width: 0; }
    .portal-main .container-wide { width: min(1180px, 100% - 28px); }
}
@media (prefers-reduced-motion: reduce) { .kpi { transition: none; } }
@media print { .portal-side, .portal-bar { display: none !important; } .portal-shell { display: block; } }
.portal-search input, .side-search input { background: var(--field-bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 0.92rem; width: 100%; }
.portal-search input:focus, .side-search input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-glow); }
.side-search { display: none; margin: 0 4px 14px; }
.kpi-grid { grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
@media (max-width: 900px) { .portal-search { display: none; } .side-search { display: block; } .portal-user { margin-left: auto; } }

/* ---- Motion pass: entrances, hover feedback, charts, loading bar. All of it is switched off for "reduce motion". ---- */
@keyframes vx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes vx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vx-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes vx-pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes vx-slide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes vx-grow { from { opacity: 0.2; transform: scaleY(0.05); } to { opacity: 1; transform: none; } }
@keyframes vx-draw { from { stroke-dashoffset: 1; opacity: 0.3; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes vx-glow { 0%, 100% { box-shadow: 0 6px 22px var(--blue-glow); } 50% { box-shadow: 0 8px 30px rgba(99, 102, 255, 0.55); } }
@keyframes vx-wiggle { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(0); } }
@keyframes vx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes vx-load { 0% { width: 0; opacity: 1; } 70% { width: 82%; } 100% { width: 92%; opacity: 1; } }
@keyframes vx-shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* page entrance */
.portal-main .container-wide > * { animation: vx-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.portal-main .container-wide > *:nth-child(2) { animation-delay: 0.05s; }
.portal-main .container-wide > *:nth-child(3) { animation-delay: 0.1s; }
.portal-main .container-wide > *:nth-child(4) { animation-delay: 0.15s; }
.portal-main .container-wide > *:nth-child(n+5) { animation-delay: 0.2s; }
.kpi-grid > .kpi { animation: vx-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.kpi-grid > .kpi:nth-child(2) { animation-delay: 0.06s; } .kpi-grid > .kpi:nth-child(3) { animation-delay: 0.12s; } .kpi-grid > .kpi:nth-child(4) { animation-delay: 0.18s; }
.kpi-grid > .kpi:nth-child(5) { animation-delay: 0.24s; } .kpi-grid > .kpi:nth-child(6) { animation-delay: 0.3s; } .kpi-grid > .kpi:nth-child(n+7) { animation-delay: 0.36s; }
.dash-grid > .panel, .chart-grid > .panel { animation: vx-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 0.25s; }
.dash-grid > .panel:nth-child(2), .chart-grid > .panel:nth-child(2) { animation-delay: 0.32s; }
.chart-grid > .panel:nth-child(3) { animation-delay: 0.39s; } .chart-grid > .panel:nth-child(4) { animation-delay: 0.46s; }
.todo-list > .todo { animation: vx-slide 0.4s ease both; }
.todo-list > .todo:nth-child(2) { animation-delay: 0.05s; } .todo-list > .todo:nth-child(3) { animation-delay: 0.1s; } .todo-list > .todo:nth-child(4) { animation-delay: 0.15s; }
.todo-list > .todo:nth-child(5) { animation-delay: 0.2s; } .todo-list > .todo:nth-child(n+6) { animation-delay: 0.25s; }
.table tbody tr { animation: vx-fade 0.4s ease both; }
.table tbody tr:nth-child(2) { animation-delay: 0.04s; } .table tbody tr:nth-child(3) { animation-delay: 0.08s; } .table tbody tr:nth-child(4) { animation-delay: 0.12s; }
.table tbody tr:nth-child(5) { animation-delay: 0.16s; } .table tbody tr:nth-child(6) { animation-delay: 0.2s; } .table tbody tr:nth-child(n+7) { animation-delay: 0.24s; }
.alert { animation: vx-drop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.card-grid > .card, .card-grid > a.tile { animation: vx-rise 0.45s ease both; }
.auth-card { animation: vx-pop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.auth-card img, .hero-art img { animation: vx-float 6s ease-in-out infinite; }

.stat-grid > .stat { animation: vx-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.stat-grid > .stat:nth-child(2) { animation-delay: 0.06s; } .stat-grid > .stat:nth-child(3) { animation-delay: 0.12s; } .stat-grid > .stat:nth-child(4) { animation-delay: 0.18s; } .stat-grid > .stat:nth-child(n+5) { animation-delay: 0.24s; }

/* sidebar */
.portal-side { animation: vx-fade 0.4s ease both; }
.nav-group[open] > a { animation: vx-slide 0.28s ease both; }
.nav-group[open] > a:nth-of-type(2) { animation-delay: 0.03s; } .nav-group[open] > a:nth-of-type(3) { animation-delay: 0.06s; } .nav-group[open] > a:nth-of-type(4) { animation-delay: 0.09s; }
.nav-group[open] > a:nth-of-type(n+5) { animation-delay: 0.12s; }
.nav-group summary::after { transition: transform 0.25s ease; }
.nav-group[open] summary::after { transform: rotate(180deg); }
.nav-group a { transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease; }
.nav-group a:hover { padding-left: 20px; }
.portal-side.is-open { animation: vx-drop 0.25s ease both; }

/* hover and press feedback */
.btn { transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary { animation: vx-glow 3.2s ease-in-out infinite; }
.btn-primary:hover { animation: none; box-shadow: 0 10px 30px rgba(99, 102, 255, 0.5); }
.btn:disabled, .is-busy .btn { animation: none; }
.kpi { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.kpi:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
.panel, .card, .cms-card { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.card:hover, .cms-card:hover { border-color: var(--line-strong); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }
.table tbody tr { transition: background-color 0.15s ease; }
input, select, textarea { transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease; }
a { transition: color 0.15s ease; }
.bell-n { animation: vx-pop 0.4s ease both; }
.bell:has(.bell-n) { animation: vx-wiggle 1.2s ease 0.6s 2; transform-origin: 50% 0; }
.chip, .badge { transition: transform 0.15s ease; }
.chip:hover, .badge:hover { transform: translateY(-1px); }

/* progress bars and charts */
.progress-bar { transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.chart-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: vx-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.chart-bar:nth-of-type(2) { animation-delay: 0.05s; } .chart-bar:nth-of-type(3) { animation-delay: 0.1s; } .chart-bar:nth-of-type(4) { animation-delay: 0.15s; }
.chart-bar:nth-of-type(5) { animation-delay: 0.2s; } .chart-bar:nth-of-type(6) { animation-delay: 0.25s; } .chart-bar:nth-of-type(n+7) { animation-delay: 0.3s; }
.chart-bar:hover { filter: brightness(1.25); }
.chart-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: vx-fade 0.9s ease both; }
.chart-ring { transform-origin: 100px 100px; animation: vx-fade 0.8s ease both; }

/* top loading bar while the next page loads (added by app.js) */
.nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100; background: linear-gradient(90deg, var(--blue), var(--blue-bright), var(--blue)); background-size: 200% 100%; box-shadow: 0 0 12px var(--blue-glow); pointer-events: none; }
.nav-progress.is-running { animation: vx-load 8s cubic-bezier(0.1, 0.8, 0.2, 1) forwards, vx-shine 1.2s linear infinite; }

/* skeleton shimmer helper for any future lazy block */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-4) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: vx-shine 1.4s linear infinite; border-radius: 8px; min-height: 1em; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .nav-progress { display: none; }
}
@media print { * { animation: none !important; transition: none !important; } }

/* ---- Krazy brand touches ---- */
html { accent-color: var(--violet); }
.portal-bar { border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, #19d3ff, #7c5cff 55%, #ff4fa8) 1; background: linear-gradient(180deg, var(--bar-start), var(--bg-elev)); }
.site-header { border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, rgba(25, 211, 255, 0.6), rgba(124, 92, 255, 0.6) 55%, rgba(255, 79, 168, 0.6)) 1; }
.brand img { filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.45)); }
.hero-art img { filter: drop-shadow(0 20px 60px rgba(124, 92, 255, 0.35)); }
.auth-card { box-shadow: var(--shadow), 0 0 80px rgba(124, 92, 255, 0.16); border-color: var(--line-strong); }
.kpi { border-top-color: var(--violet); }
.kpi:hover { border-color: var(--violet); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-primary:hover { filter: brightness(1.08); }
::selection { background: rgba(255, 79, 168, 0.35); color: #fff; }
.site-footer { background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.07)); }

/* ---- Public corporate website ---- */
.site-header { background: rgba(var(--bg-rgb), 0.82); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a { padding: 9px 12px; border-radius: 8px; color: var(--text-dim); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
.nav-item > a:hover, .nav-item.is-active > a { color: var(--text); background: rgba(var(--ov), 0.05); text-decoration: none; }
.sub-toggle { background: transparent; border: 0; color: var(--text-dim); cursor: pointer; padding: 6px 6px 6px 0; font-size: 0.8rem; }
.nav-sub { position: absolute; top: 100%; left: 0; min-width: 260px; list-style: none; margin: 6px 0 0; padding: 8px; background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s; z-index: 60; max-height: 70vh; overflow: auto; }
.nav-item.has-sub:hover > .nav-sub, .nav-item.has-sub:focus-within > .nav-sub, .nav-item.has-sub.is-open > .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text-dim); text-decoration: none; font-size: 0.93rem; }
.nav-sub a:hover { color: var(--text); background: rgba(124, 92, 255, 0.16); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.pub-hero { padding-block: clamp(44px, 8vw, 100px); }
.pub-hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); line-height: 1.06; margin: 0 0 18px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--text-dim); max-width: 62ch; }
.btn-link { background: transparent; color: var(--accent); padding-inline: 6px; }
.btn.block { display: flex; width: 100%; justify-content: center; }
.pub-page-head { padding-block: clamp(36px, 6vw, 72px) 8px; }
.pub-page-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 0 0 12px; }
.pub-section { padding-block: clamp(36px, 6vw, 76px); }
.pub-alt { background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.06) 20%, rgba(124, 92, 255, 0.06) 80%, transparent); }
.pub-head { max-width: 760px; margin-bottom: 28px; }
.pub-head h2, .pub-section h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.center { text-align: center; margin-inline: auto; }
.center-actions { justify-content: center; }
.prose p, .prose ul { max-width: 70ch; }
.prose.lead { font-size: 1.12rem; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; margin-top: 8px; }
.service-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: linear-gradient(180deg, var(--bg-card), var(--card-end)); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.service-card:hover { transform: translateY(-4px); border-color: var(--violet); box-shadow: 0 16px 40px rgba(124, 92, 255, 0.18); text-decoration: none; }
.service-card h2, .service-card h3 { font-size: 1.12rem; margin: 6px 0 0; }
.service-card p { color: var(--text-dim); margin: 0; flex: 1; }
.service-card .more { color: var(--accent); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.service-card .more .icon { width: 16px; height: 16px; }
.service-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-grad); color: var(--on-grad); }
.service-icon.big { width: 58px; height: 58px; margin-bottom: 12px; }
.service-icon .icon { width: 24px; height: 24px; }
.price { color: var(--accent); font-weight: 600; }
.principle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 16px; }
.principle { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.principle .num { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-grad); color: var(--on-grad); font-weight: 700; font-size: 0.85rem; }
.principle h3 { margin: 12px 0 6px; font-size: 1.05rem; } .principle p { color: var(--text-dim); margin: 0; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 16px; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 54px 20px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.steps li::before { content: counter(s); position: absolute; top: 16px; left: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-grad); color: var(--on-grad); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.steps h3 { font-size: 1.02rem; margin: 0 0 6px; } .steps p { color: var(--text-dim); margin: 0; font-size: 0.93rem; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.work-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: transform 0.2s ease, border-color 0.2s ease; }
.work-card:hover { transform: translateY(-4px); border-color: var(--cyan); text-decoration: none; }
.work-card img, .work-ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bar-start); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.work-body { padding: 18px; } .work-body h2, .work-body h3 { font-size: 1.1rem; margin: 8px 0 6px; } .work-body p { color: var(--text-dim); margin: 0; font-size: 0.93rem; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--accent); }
.empty-card { text-align: center; padding: 38px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(124, 92, 255, 0.05); max-width: 720px; margin-inline: auto; }
.team-grid, .partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 18px; margin-bottom: 30px; }
.team-card, .partner-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); color: var(--text); text-decoration: none; }
.team-card img, .avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.avatar { display: flex; align-items: center; justify-content: center; background: var(--brand-grad); color: var(--on-grad); font-size: 2rem; font-weight: 700; }
.team-card h3, .partner-card h3 { margin: 0; font-size: 1.1rem; } .role { color: var(--accent); margin: 2px 0 10px; font-size: 0.92rem; }
.partner-card img { max-height: 64px; width: auto; margin-bottom: 12px; object-fit: contain; }
.group-title { margin: 8px 0 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-chip { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 0.88rem; cursor: pointer; text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
.pub-chip:hover, .pub-chip.is-on { border-color: var(--violet); background: rgba(124, 92, 255, 0.18); text-decoration: none; }
.filter-row { margin-bottom: 20px; }
.check-list.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); max-width: none; }
.about-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.about-card h2 { margin-top: 0; }
.pub-cta { margin-top: 20px; padding-block: clamp(44px, 7vw, 84px); background: radial-gradient(700px 300px at 50% 0, rgba(124, 92, 255, 0.28), transparent 70%), var(--bg-elev); border-block: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.side-card { padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-card); position: sticky; top: 90px; }
.side-card h3 { margin-top: 0; }
.service-hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; }
.rounded { border-radius: var(--radius); border: 1px solid var(--line); } img.wide { width: 100%; margin-bottom: 24px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; margin-top: 18px; } .gallery img { border-radius: 12px; border: 1px solid var(--line); width: 100%; height: auto; }
.crumbs { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 14px; }
.job-list { display: grid; gap: 12px; }
.job-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); color: var(--text); text-decoration: none; transition: border-color 0.15s ease; }
.job-card:hover { border-color: var(--violet); text-decoration: none; } .job-card h3 { margin: 0 0 4px; font-size: 1.1rem; } .job-card .more { color: var(--accent); white-space: nowrap; }
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; } .faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; } .faq-item[open] summary::after { content: "\2212"; } .faq-item p, .faq-item .prose { margin: 10px 0 0; color: var(--text-dim); }
.faq-search { display: flex; gap: 10px; margin-top: 18px; max-width: 520px; } .faq-search input { flex: 1; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; } .contact-list li { display: flex; gap: 12px; align-items: flex-start; } .contact-list .icon { color: var(--accent); flex: none; margin-top: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 4px 16px; }
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 28px; } ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.social { display: flex; flex-wrap: wrap; gap: 14px; } .small { font-size: 0.85rem; } .muted.small { font-size: 0.82rem; }
.site-footer { margin-top: 40px; padding-block: 48px 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-brand p { color: var(--text-dim); max-width: 36ch; }
.footer-col h2 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .footer-col a { color: var(--text-dim); } .footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--text-dim); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; } .footer-bottom p { margin: 0; }
.public-form .check-grid .check { padding: 2px 0; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } .two-col, .contact-grid, .service-hero { grid-template-columns: 1fr; } .side-card { position: static; } }
@media (max-width: 1200px) {
    .site-nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px 20px; background: var(--bg-elev); border-bottom: 1px solid var(--line); margin: 0; display: none; max-height: calc(100vh - 68px); overflow: auto; }
    .site-nav.is-open { display: flex; }
    .nav-list { flex-direction: column; align-items: stretch; } .nav-item { flex-wrap: wrap; } .nav-item > a { flex: 1; }
    .nav-sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; margin: 0; padding: 0 0 0 14px; width: 100%; display: none; max-height: none; }
    .nav-item.has-sub.is-open > .nav-sub { display: block; }
    .nav-item.has-sub:hover > .nav-sub, .nav-item.has-sub:focus-within > .nav-sub { opacity: 1; }
    .nav-actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Header: keep every top-level link on one line; tighten at mid widths */
.nav-item > a, .nav-actions .btn { white-space: nowrap; }
.brand-word { white-space: nowrap; }

/* Header with many links: shrink before it can collide with the logo */
.site-nav { min-width: 0; }
.nav-list { flex-wrap: nowrap; }
@media (min-width: 1201px) {
    .nav-list { gap: 0; }
    .nav-item > a { padding: 9px 5px; font-size: 0.88rem; }
    .site-nav { gap: 6px; }
    .nav-actions { gap: 6px; }
    .header-inner { gap: 8px; }
    .brand-word { font-size: 0.95rem; letter-spacing: 0.14em; }
}
.team-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.team-card .bio p { margin: 0 0 10px; }

/* The brand block always reserves the room its own text needs, so the menu can never draw over the tagline */
.site-header .brand { flex: 0 0 auto; }
.site-header .brand-word { display: inline-block; }
.site-header .brand-word small { white-space: nowrap; letter-spacing: 0.24em; margin-right: -0.24em; }
.site-header .site-nav { margin-left: 18px; }

@media (max-width: 1200px) {
    .nav-toggle { display: block; }
    .site-nav a:not(.btn) { padding: 12px 4px; }
    .site-nav .btn { margin-top: 14px; }
    .site-header .site-nav { margin-left: 0; }
}

/* Hiring page */
.hire-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(25, 211, 255, 0.4); background: rgba(25, 211, 255, 0.08); color: var(--text); font-size: 0.85rem; font-weight: 600; }
.hire-pill.is-closed { border-color: var(--line-strong); background: rgba(var(--ov), 0.04); color: var(--text-dim); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #2be3a0; box-shadow: 0 0 0 0 rgba(43, 227, 160, 0.6); animation: hire-pulse 1.8s infinite; }
@keyframes hire-pulse { 70% { box-shadow: 0 0 0 10px rgba(43, 227, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 227, 160, 0); } }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 18px; }
.role-card { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); color: var(--text); font: inherit; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.role-card:hover, .role-card:focus-visible { transform: translateY(-3px); border-color: rgba(25, 211, 255, 0.55); box-shadow: 0 14px 34px rgba(25, 211, 255, 0.12); }
.role-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 14px 34px rgba(124, 92, 255, 0.25); }
.role-ico { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(135deg, rgba(25, 211, 255, 0.9), rgba(124, 92, 255, 0.9) 60%, rgba(255, 79, 168, 0.9)); color: #04101f; }
.role-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.role-sum { color: var(--text-dim); font-size: 0.93rem; line-height: 1.5; }
.role-cta { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.role-card .when-on { display: none; } .role-card.is-selected .when-on { display: inline; } .role-card.is-selected .when-off { display: none; }
.hire-terms { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: linear-gradient(135deg, rgba(25, 211, 255, 0.07), rgba(124, 92, 255, 0.07)); }
.hire-terms h2 { margin-top: 0; }
.hire-steps { grid-template-columns: 1fr; }
.hire-steps li { display: flex; gap: 16px; padding: 18px 20px; }
.hire-steps li::before { display: none; }
.hire-steps .step-n { flex: 0 0 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #04101f; background: linear-gradient(135deg, #19d3ff, #7c5cff); }
.hire-steps h3 { margin: 0 0 4px; font-size: 1.02rem; } .hire-steps p { margin: 0; color: var(--text-dim); }
.hire-progress { height: 6px; border-radius: 999px; background: rgba(var(--ov), 0.08); overflow: hidden; }
.hire-progress span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #19d3ff, #7c5cff, #ff4fa8); transition: width 0.3s ease; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field.two { grid-template-columns: 1fr; } }
.drop { display: block; padding: 18px; border: 2px dashed var(--line-strong); border-radius: 12px; text-align: center; color: var(--text-dim); cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: rgba(25, 211, 255, 0.06); color: var(--text); }
.hire-closed { text-align: center; }
.announce { background: linear-gradient(90deg, rgba(25, 211, 255, 0.16), rgba(124, 92, 255, 0.2), rgba(255, 79, 168, 0.16)); border-bottom: 1px solid var(--line); text-align: center; padding: 8px 16px; font-size: 0.92rem; }
.announce a { color: var(--text); font-weight: 600; text-decoration: none; }
.announce a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } .role-card { transition: none; } }
.hire-form-panel { position: relative; overflow: hidden; }
.hire-form-panel .field { position: relative; }
.drop:focus-within, .field:focus-within .drop { border-color: var(--accent); }

/* One visible Login: inside the menu bar on wide screens, beside the menu button on narrow ones */
.header-login { display: none; white-space: nowrap; }
@media (max-width: 1200px) {
    .header-login { display: inline-flex; margin-left: auto; }
    .nav-login { display: none; }
    .nav-toggle { margin-left: 0; }
    .header-login.header-signup { margin-left: 0; }
}
.announce .pulse-dot { display: inline-block; vertical-align: middle; margin-right: 6px; }
@media (max-width: 480px) {
    .site-header .brand-word small { display: none; }
    .site-header .brand img { width: 64px; height: auto; }
    .header-login { padding: 7px 10px; }
    .header-inner { gap: 6px; }
}
@media (max-width: 430px) {
    .site-header .brand-word { display: none; }
}

/* PhonePe payment request */
.pay-card { max-width: 440px; margin: 10px auto 18px; padding: 24px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-card); }
.pay-amount { display: grid; gap: 4px; margin-bottom: 14px; } .pay-amount strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1.1; }
.qr-box { width: min(300px, 100%); margin: 0 auto; padding: 8px; background: #fff; border-radius: 14px; }
.qr-svg { display: block; width: 100%; height: auto; }
.pay-help { margin: 14px 0 4px; } .pay-timer { margin: 0; font-weight: 600; color: var(--accent); }
.pay-done { padding: 22px 8px; } .pay-done h2 { margin: 8px 0 4px; } .pay-done.is-bad h2 { color: var(--c-bad); }
.pay-tick { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%; font-size: 2rem; color: #04101f; background: linear-gradient(135deg, #2be3a0, #19d3ff); }

/* ===== Light theme: only variables change; the dark theme above stays the default ===== */
:root[data-theme="light"] {
    --bg: #f4f6fc; --bg-elev: #ffffff; --bg-card: #ffffff; --line: #dfe5f4; --line-strong: #c3cce6;
    --text: #141b3c; --text-dim: #566187; --silver-1: #141b3c; --silver-2: #566187;
    --cyan: #0b87a8; --violet: #6a47f5; --pink: #d9358c; --blue: #4a55d6; --blue-bright: #3547d6;
    --blue-glow: rgba(106, 71, 245, 0.28);
    --grad-text: linear-gradient(135deg, #0a7a9c 0%, #3547d6 38%, #6a47f5 68%, #b8216f 100%); /* darker stops so gradient headings keep 4.5:1 on the light page */
    --gold: #9a7420; --accent: #0b7ea0; --danger: #b8264d; --danger-bg: rgba(208, 52, 94, 0.08); --info-bg: rgba(74, 85, 214, 0.08);
    --shadow: 0 18px 50px rgba(30, 40, 100, 0.14);
    --field-bg: #ffffff; --card-end: #f8f9fe; --surface-2: #eef1fa; --surface-3: #e4e9f6; --surface-4: #dce2f2; --bar-start: #ffffff;
    --ov: 20, 30, 90; --bg-rgb: 244, 246, 252;
    --c-warn: #8a5a00; --c-warn2: #9a6a00; --c-bad: #b4233f; --c-bad2: #b4233f; --c-bad3: #8f1c33; --c-ok: #12794b; --c-ok2: #0f6a42; --c-info: #2c4aa8;
    color-scheme: light;
}
:root[data-theme="light"] body.site {
    background:
        radial-gradient(900px 520px at 88% -12%, rgba(124, 92, 255, 0.14), transparent 60%),
        radial-gradient(700px 420px at -8% 28%, rgba(34, 211, 238, 0.12), transparent 60%),
        radial-gradient(600px 400px at 60% 110%, rgba(255, 79, 168, 0.08), transparent 60%),
        var(--bg);
}
:root[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.82); }
:root[data-theme="light"] .pub-alt { background: rgba(20, 30, 90, 0.035); }
:root[data-theme="light"] .alert-ok { background: rgba(18, 121, 75, 0.08); border-color: rgba(18, 121, 75, 0.4); }
:root[data-theme="light"] .alert-error { border-color: rgba(208, 52, 94, 0.4); }
:root[data-theme="light"] .btn-ghost { color: var(--text); }
:root[data-theme="light"] .nav-item > a:hover, :root[data-theme="light"] .nav-item.is-active > a { background: rgba(var(--ov), 0.07); }
:root[data-theme="light"] .portal-bar { background: linear-gradient(180deg, #ffffff, #f1f4fc); }
:root[data-theme="light"] ::selection { color: #fff; }
:root[data-theme="light"] .brand img, :root[data-theme="light"] .footer-brand img { filter: drop-shadow(0 0 0 transparent); }
:root[data-theme="light"] .kpi-bad .kpi-n { color: var(--c-bad); }
:root[data-theme="light"] .kpi-warn .kpi-n { color: var(--c-warn); }
:root[data-theme="light"] .hero-art, :root[data-theme="light"] .pub-page-head { color: var(--text); }

/* Theme switch (header of the website and top bar of the dashboard) */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; transition: transform 0.25s ease, background 0.2s ease, border-color 0.2s ease; }
.theme-toggle:hover { background: rgba(var(--ov), 0.08); border-color: var(--accent); transform: rotate(18deg); }
.theme-toggle span { font-size: 1.25rem; line-height: 1; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: inline; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* The website header is a little wider than the page body so the theme switch fits beside the menu */
@media (min-width: 1201px) { .site-header .container { width: min(1240px, 100% - 32px); } }
.site-header .theme-toggle { flex: 0 0 auto; margin-left: 8px; }
.portal-bar .theme-toggle { width: 36px; height: 36px; margin-right: 6px; }
.site-header .theme-toggle { order: 5; }
:root[data-theme="light"] .hero-art img { background: #0a1030; border-radius: 28px; padding: 18px; box-shadow: 0 24px 60px rgba(30, 40, 100, 0.25); }

/* ===== Website motion (only when the visitor has not asked for reduced motion) ===== */
@media (prefers-reduced-motion: no-preference) {
    /* a slow aurora behind every page */
    body.site::before { content: ""; position: fixed; inset: -25%; z-index: -1; pointer-events: none; opacity: 0.55;
        background: radial-gradient(40% 35% at 20% 25%, rgba(34, 211, 238, 0.16), transparent 70%), radial-gradient(35% 40% at 80% 30%, rgba(124, 92, 255, 0.18), transparent 70%), radial-gradient(40% 40% at 55% 85%, rgba(255, 79, 168, 0.12), transparent 70%);
        animation: kis-aurora 28s ease-in-out infinite alternate; }
    @keyframes kis-aurora { 0% { transform: translate3d(-3%, -2%, 0) scale(1); } 50% { transform: translate3d(3%, 2%, 0) scale(1.08); } 100% { transform: translate3d(-1%, 4%, 0) scale(1.03); } }
    /* hero and page headings arrive one after another */
    .pub-page-head .container > *, .hero-copy > * { animation: vx-rise 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .pub-page-head .container > :nth-child(2), .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
    .pub-page-head .container > :nth-child(3), .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
    .pub-page-head .container > :nth-child(4), .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
    .pub-page-head .container > :nth-child(5), .hero-copy > :nth-child(5) { animation-delay: 0.32s; }
    .hero-art { animation: vx-pop 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
    .hero-art img { animation: vx-float 7s ease-in-out 1s infinite; }
    /* scroll reveals, a few flavours */
    .js .reveal.reveal-zoom { transform: translateY(18px) scale(0.94); }
    .js .reveal.reveal-left { transform: translateX(-26px); }
    .js .reveal.is-visible { transform: none; }
    .js .reveal { transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease; }
    /* headings draw a coloured line under themselves */
    .pub-section h2::after, .pub-cta h2::after { content: ""; display: block; height: 3px; width: 0; margin-top: 10px; border-radius: 3px; background: var(--brand-grad); transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s; }
    .pub-cta h2::after { margin-inline: auto; }
    .reveal.is-visible::after, h2.reveal.is-visible::after { width: 56px; }
    /* cards: lift, glow and a light that follows the pointer */
    .service-card, .team-card, .partner-card, .job-card, .work-card, .role-card { position: relative; overflow: hidden; }
    .spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.14), transparent 65%); }
    .spot:hover::before { opacity: 1; }
    .service-card:hover, .team-card:hover, .partner-card:hover, .job-card:hover, .work-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px var(--blue-glow); border-color: rgba(34, 211, 238, 0.5); }
    .service-card:hover .service-icon, .role-card:hover .role-ico { transform: rotate(-6deg) scale(1.1); }
    .service-icon, .role-ico { transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
    /* buttons: a light sweeps across, and they press down */
    .btn-primary { position: relative; overflow: hidden; }
    .btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.6s ease; pointer-events: none; }
    .btn-primary:hover::after { transform: translateX(120%); }
    .btn:active { transform: scale(0.97); }
    /* menu links underline themselves */
    .nav-item > a { position: relative; }
    .nav-item > a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--brand-grad); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
    .nav-item > a:hover::after, .nav-item.is-active > a::after { transform: scaleX(1); }
    .scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; transform: scaleX(0); transform-origin: left; background: var(--brand-grad); pointer-events: none; }
    /* form fields glow when you are typing in them */
    .public-form input:focus, .public-form select:focus, .public-form textarea:focus { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22); transition: box-shadow 0.2s ease; }
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }

/* Form problems are shown inside the form */
.form-errors { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 107, 139, 0.5); background: var(--danger-bg); color: var(--text); }
.form-errors ul { margin: 6px 0 0; padding-left: 20px; } .form-errors li { margin: 2px 0; }
.form-errors:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
.field.is-invalid > input, .field.is-invalid > select, .field.is-invalid > textarea, .field.is-invalid select, .field.is-invalid .drop { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }

.copy-row { display: flex; gap: 8px; align-items: center; } .copy-row input { flex: 1; min-width: 0; padding: 9px 12px; background: var(--field-bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 0.9rem; }
.pay-share { max-width: 640px; }

.pay-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.pay-error[hidden] { display: none; }

/* Payment receipt (the KIS template). Always a white sheet, whatever the site theme. */
.rcpt { max-width: 794px; margin: 18px auto; background: #fff; color: #0b1220; font-family: Arial, Helvetica, sans-serif; font-size: 13px; padding: 0 0 18px; box-shadow: 0 6px 30px rgba(0, 0, 0, .25); }
.rcpt .muted { color: #6b7587; }
.rcpt-head { display: flex; align-items: center; gap: 28px; background: #050d1f; padding: 14px 24px; }
.rcpt-head img { width: 120px; height: auto; display: block; }
.rcpt-head strong { display: block; color: #fff; font-size: 20px; letter-spacing: .2px; }
.rcpt-head span { display: block; margin-top: 6px; color: #8de0f7; font-weight: 700; font-size: 16px; }
.rcpt-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 26px 24px 0; }
.rcpt-title h1 { margin: 0; font-size: 34px; letter-spacing: .3px; color: #0b1220; }
.rcpt-title h1 em { font-style: normal; color: #7333ed; }
.rcpt-sub { margin: 10px 0 0; color: #6b7587; }
.rcpt-no { display: grid; gap: 4px; min-width: 210px; font-size: 12px; color: #6b7587; }
.rcpt-no strong { color: #0b1220; font-size: 14px; }
.rcpt-no b { color: #0b1220; font-weight: 600; }
.rcpt-badge { display: inline-block; justify-self: start; margin-top: 4px; padding: 3px 10px; border-radius: 6px; background: #cc2633; color: #fff; font-weight: 700; }
.rcpt-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px 24px 0; }
.rcpt-box { border: 1px solid #dde2ec; }
.rcpt-box h2 { margin: 0; padding: 9px 12px; background: #f1f5fb; color: #0b1220; font-size: 12px; letter-spacing: .3px; }
.rcpt-box dl { margin: 0; }
.rcpt-box dl div { display: flex; gap: 8px; padding: 9px 12px; border-top: 1px solid #e4e8f0; }
.rcpt-box dt { color: #6b7587; white-space: nowrap; }
.rcpt-box dd { margin: 0; font-weight: 700; color: #0b1220; overflow-wrap: anywhere; }
.rcpt-items, .rcpt-totals { border-collapse: collapse; }
.rcpt-items { width: calc(100% - 48px); margin: 22px 24px 0; }
.rcpt-items th { background: #050d1f; color: #fff; text-align: left; padding: 10px 12px; font-size: 12px; }
.rcpt-items td { padding: 11px 12px; border: 1px solid #dde2ec; color: #0b1220; }
.rcpt-items .n { width: 44px; }
.rcpt-items .a { text-align: right; width: 150px; white-space: nowrap; }
.rcpt-totals { width: 260px; margin: 12px 24px 0 auto; }
.rcpt-totals td { padding: 8px 12px; border: 1px solid #dde2ec; color: #0b1220; }
.rcpt-totals td:last-child { text-align: right; white-space: nowrap; }
.rcpt-totals .total td { background: #1f5fe0; color: #fff; font-weight: 700; border-color: #1f5fe0; padding: 10px 12px; }
.rcpt-totals .refund td { color: #cc2633; font-weight: 700; border: 0; }
.rcpt-words { padding: 18px 28px 0; }
.rcpt-words p { margin: 6px 0 0; color: #0b1220; }
.rcpt-words p.muted { color: #6b7587; font-size: 12px; margin-top: 4px; }
.rcpt-ack { margin: 16px 24px 0; padding: 12px 16px; background: #edf7ff; border-left: 3px solid #19c7e6; color: #0b1220; }
.rcpt-ack p { margin: 5px 0 0; }
.rcpt-ack p.muted { color: #6b7587; }
.rcpt-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 24px 24px 0; }
.rcpt-thanks strong { display: block; color: #2f7bff; font-size: 26px; }
.rcpt-thanks span { display: block; margin-top: 8px; font-weight: 700; color: #0b1220; }
.rcpt-verify { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #0b1220; }
.rcpt-verify strong { display: block; font-size: 11px; margin-bottom: 4px; }
.rcpt-verify span { display: block; color: #1a59d9; overflow-wrap: anywhere; max-width: 230px; }
.rcpt-verify span:last-child { color: #0b1220; margin-top: 3px; }
.rcpt-qr { width: 84px; height: 84px; background: #fff; }
.rcpt-qr svg { width: 100%; height: 100%; display: block; }
.rcpt-sys { text-align: right; font-size: 11px; color: #6b7587; }
.rcpt-sys strong { display: block; color: #0b1220; font-size: 12px; margin-bottom: 3px; }
.rcpt-contact { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 24px 24px 0; padding: 11px 14px; background: #050d1f; color: #b8c0d4; font-size: 11px; }
@media (max-width: 640px) { .rcpt-boxes { grid-template-columns: 1fr; } .rcpt-title { flex-direction: column; } .rcpt-head { gap: 14px; padding: 12px 16px; } .rcpt-head strong { font-size: 15px; } .rcpt-head span { font-size: 12px; } .rcpt-head img { width: 84px; } .rcpt-totals { width: auto; margin: 12px 24px 0; } }
@media print { .rcpt { box-shadow: none; margin: 0 auto; } }

/* Public receipt verification page */
.verify-card { border-radius: 16px; padding: 24px 26px; margin-bottom: 24px; border: 1px solid var(--line, #263154); background: var(--card, #0e1530); }
.verify-card h2 { margin: 6px 0 8px; }
.verify-ok { border-color: #1fbf75; }
.verify-ok h2, .verify-ok .verify-mark { color: #1fbf75; }
.verify-bad { border-color: #ff6b8b; }
.verify-bad h2, .verify-bad .verify-mark { color: #ff6b8b; }
.verify-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid currentColor; font-size: 22px; font-weight: 700; }

/* About page */
.about-pair .about-card p { margin: 0; color: var(--text-dim); font-size: 1.05rem; line-height: 1.7; max-width: 68ch; }
.about-grid, .about-badges, .about-steps, .about-points { list-style: none; margin: 0; padding: 0; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 18px; }
.about-tile, .about-steps li { position: relative; padding: 22px 22px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--bg-card), var(--card-end)); transition: transform 0.2s ease, border-color 0.2s ease; }
.about-tile:hover, .about-steps li:hover { transform: translateY(-3px); border-color: var(--violet); }
.about-tile h3, .about-steps h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.about-tile p, .about-steps p { margin: 0; color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; }
.about-no { display: inline-block; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.about-badges li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-card); font-weight: 600; }
.about-dot { flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--brand-grad); }
.about-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.about-service { cursor: default; }
.about-service:hover { transform: none; }
.about-points { display: grid; gap: 8px; margin-top: 4px; }
.about-points li { position: relative; padding-left: 22px; color: var(--text-dim); font-size: 0.94rem; line-height: 1.5; }
.about-points li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 10px; height: 2px; background: var(--brand-grad); }
.about-closing { margin: 28px auto 0; max-width: 70ch; color: var(--text-dim); text-align: center; }
.about-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; counter-reset: none; }
.about-steps li { padding: 22px; }
.about-steps li::before { display: none; }
.pub-head .lead { margin-top: 10px; color: var(--text-dim); }
@media (max-width: 640px) { .about-badges li { border-radius: 16px; } }

/* Continue with Google */
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--text-dim); font-size: 0.85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }

/* Maintenance page */
.maintenance { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.maintenance-logo { display: block; margin: 0 auto 18px; height: auto; }

/* Error and offline pages */
.error-page { text-align: center; }
.error-code { margin: 0 0 4px; font-family: var(--font-display); font-size: clamp(3.5rem, 12vw, 5.5rem); font-weight: 800; line-height: 1; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0; }

/* Step-by-step requirements form */
.wizard-panel { padding: clamp(18px, 3vw, 34px); }
.req { color: var(--danger); }
.wiz-steps { display: flex; justify-content: space-between; gap: 6px; list-style: none; margin: 0 0 26px; padding: 0; position: relative; }
.wiz-steps::before { content: ""; position: absolute; left: 6%; right: 6%; top: 21px; height: 2px; background: var(--line); z-index: 0; }
.wiz-dot { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.wiz-dot-btn { all: unset; cursor: pointer; display: block; border-radius: 14px; }
.wiz-dot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wiz-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--line-strong); color: var(--text-dim); font-weight: 700; transition: background 0.2s, color 0.2s, transform 0.2s; }
.wiz-label { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; }
.wiz-dot.is-current .wiz-num { background: var(--brand-grad); color: var(--on-grad); border-color: transparent; transform: translateY(-2px); box-shadow: 0 8px 22px var(--blue-glow); }
.wiz-dot.is-current .wiz-label { color: var(--text); }
.wiz-dot.is-done .wiz-num { background: #3a49d8; color: #fff; border-color: transparent; font-size: 0; }
.wiz-dot.is-done .wiz-num::after { content: "\2713"; font-size: 1.05rem; }
.wizard.wiz-on .wiz-step[hidden] { display: none; }
.wiz-step h2 { font-size: 1.25rem; margin: 0 0 4px; }
.wiz-step > .muted { margin: 0 0 18px; }
.wiz-err { color: var(--danger); }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.wiz-nav [data-next], .wiz-nav [data-submit] { margin-left: auto; }
.wizard [hidden] { display: none !important; }
.wizard:not(.wiz-on) .wiz-steps, .wizard:not(.wiz-on) [data-prev], .wizard:not(.wiz-on) [data-next] { display: none; }
.wizard:not(.wiz-on) .wiz-step { margin-bottom: 26px; }
.wiz-review dt { font-weight: 600; }
.field select[aria-invalid="true"], .field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
@media (max-width: 600px) {
    .wiz-label { display: none; }
    .wiz-num { width: 38px; height: 38px; border-radius: 12px; }
    .wiz-steps::before { top: 18px; }
    .wiz-dot.is-current .wiz-label { display: block; }
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 16px 0; }
.filter-bar .field { margin: 0; min-width: 240px; flex: 1; max-width: 360px; }
.pub-chip.is-active { background: var(--brand-grad); color: var(--on-grad); border-color: transparent; }
.pub-chip .count { opacity: 0.75; font-size: 0.8em; margin-left: 4px; }
tr[hidden] { display: none; }

/* Wizard v2: toggle cards, repeatable rows, role cards, review document */
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 10px; }
.field .toggle-card, .toggle-card { position: relative; display: flex; margin: 0; color: var(--text); font-size: inherit; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-card); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.toggle-card input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-card .switch { display: block; flex: none; width: 40px; height: 22px; border-radius: 999px; background: rgba(120, 125, 165, 0.45); position: relative; transition: background 0.2s; }
.toggle-card .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.toggle-card input:checked + .switch { background: var(--blue); }
.toggle-card input:checked + .switch::after { transform: translateX(18px); }
.toggle-card:has(input:checked) { border-color: var(--blue); background: var(--info-bg); }
.toggle-card input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-text { font-weight: 500; font-size: 0.92rem; }
.repeat-list { display: grid; gap: 10px; margin-bottom: 12px; }
.repeat-row { display: flex; gap: 8px; align-items: center; }
.repeat-row input { flex: 1; padding: 11px 14px; background: var(--field-bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; }
.repeat-del { all: unset; cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--danger); border: 1px solid var(--danger); font-size: 1.3rem; line-height: 1; }
.repeat-del:hover { background: var(--danger-bg); }
.repeat-del:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.role-card { border: 1px solid var(--line-strong); border-radius: 14px; padding: 16px 18px 4px; background: var(--bg-card); }
.role-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.role-count { margin-top: 18px; }
.wiz-extra { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.wiz-review h3 { margin: 18px 0 6px; font-size: 1rem; color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.wiz-table { margin: 6px 0 12px; }
.wizard:not(.wiz-on) [data-repeat-add], .wizard:not(.wiz-on) .repeat-del { display: none; }
@media (max-width: 600px) { .wiz-nav { flex-wrap: wrap; } .wiz-extra { order: 3; width: 100%; } }
.wiz-nav { flex-wrap: wrap; }
.wiz-nav .btn { white-space: nowrap; }
.wiz-extra { order: 3; width: 100%; justify-content: center; margin-top: 4px; }

/* Mobile app (installed web app) */
.install-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; margin: 0 0 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--info-bg); }
.install-banner[hidden] { display: none; }
.install-actions { display: inline-flex; gap: 8px; align-items: center; }
.install-banner .small { flex-basis: 100%; margin: 0; }
.site-header, .portal-bar { padding-top: env(safe-area-inset-top); }
body { padding-bottom: env(safe-area-inset-bottom); }
@media (display-mode: standalone) {
    .install-banner[data-install-banner] { display: none; }
    html { -webkit-tap-highlight-color: transparent; }
}

/* Installed app: fixed scale. No pinch or double-tap zoom (touch-action does this without touching how the page scrolls), inputs at 16px so the phone never zooms into a focused field.
   Nothing here may create a scroll container or stop vertical scrolling: html and body keep their normal overflow. */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
    html, body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    input, select, textarea { font-size: 16px; }
}
html.pwa-app, html.pwa-app body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.pwa-app body { overflow-x: clip; } /* clip, not hidden: it hides sideways overflow without turning the body into a second scroll container */
html.pwa-app input, html.pwa-app select, html.pwa-app textarea { font-size: 16px; }
html.pwa-app img { max-width: 100%; }

/* Appointments */
.field[hidden] { display: none; }
.slot-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.slot-row .field { margin: 0; }
.slot-row input[type="number"] { width: 90px; }
.slot-row .days { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.slot-row .days legend { font-size: 0.85rem; color: var(--text-dim); padding: 0; margin-bottom: 4px; }
.slot-row .row-actions { display: flex; gap: 6px; }
.slot-row.permanent input { min-width: 260px; }

/* ---- Delivery appointments: calendar, badges, confirmation card ---- */
.cal { max-width: 560px; margin: 14px 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cal-head .is-off { opacity: 0.35; pointer-events: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.cal-dow span { text-align: center; font-size: 0.74rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.cal-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card); color: var(--text); text-decoration: none; text-align: center; }
.cal-day.is-blank { border-color: transparent; background: transparent; }
.cal-n { font-weight: 700; font-size: 0.98rem; line-height: 1; }
.cal-s, .cal-b { font-size: 0.66rem; line-height: 1.1; color: var(--text-dim); }
.cal-b { color: var(--c-warn); }
a.cal-day.is-available { border-color: rgba(60, 200, 120, 0.55); }
a.cal-day.is-available:hover { border-color: var(--blue); text-decoration: none; transform: translateY(-1px); }
a.cal-day.is-available .cal-s { color: var(--c-ok); }
.cal-day.is-selected { outline: 2px solid var(--blue); outline-offset: 1px; background: rgba(79, 124, 255, 0.14); }
.cal-day.is-full, .cal-day.is-blocked { background: rgba(255, 107, 139, 0.07); border-color: rgba(255, 107, 139, 0.35); color: var(--text-dim); cursor: not-allowed; }
.cal-day.is-full .cal-s, .cal-day.is-blocked .cal-s { color: var(--c-bad); }
.cal-day.is-before, .cal-day.is-after, .cal-day.is-past { opacity: 0.4; cursor: not-allowed; }
a.cal-day.is-full, a.cal-day.is-blocked, a.cal-day.is-before, a.cal-day.is-after, a.cal-day.is-past { cursor: pointer; }
.cal-key { font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.cal-key .key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.cal-key .key.is-available { border-color: rgba(60, 200, 120, 0.7); background: rgba(60, 200, 120, 0.2); }
.cal-key .key.is-full, .cal-key .key.is-blocked { border-color: rgba(255, 107, 139, 0.6); background: rgba(255, 107, 139, 0.2); }
.cal-key .key.is-before { opacity: 0.4; background: var(--line); }
.review { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.confirm-card { border-color: rgba(60, 200, 120, 0.5); }
.panel-note { padding: 10px 14px; border: 1px solid rgba(79, 124, 255, 0.45); border-radius: 10px; background: rgba(79, 124, 255, 0.08); }
.badge-d-confirmed, .badge-d-completed { color: var(--c-ok); border-color: rgba(60, 200, 120, 0.5); }
.badge-d-cancelled { color: var(--c-bad); border-color: rgba(255, 107, 139, 0.5); }
.badge-d-request { color: var(--c-warn); border-color: rgba(201, 162, 75, 0.6); }
code.wrap { word-break: break-all; }
@media (max-width: 480px) { .cal-grid { gap: 4px; } .cal-day { min-height: 50px; } .cal-s, .cal-b { font-size: 0.58rem; } }
:root[data-theme="light"] .cal-day { background: #fff; }
:root[data-theme="light"] .cal-day.is-selected { background: rgba(47, 95, 227, 0.1); }

/* ---- Compliance & legal: editor, legal pages ---- */
.rte { border: 1px solid var(--line); border-radius: 10px; background: var(--field-bg); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); align-items: center; }
.rte-bar select { width: auto; padding: 6px 10px; }
.rte-bar button[aria-pressed="true"] { border-color: var(--blue); }
.rte-area { min-height: 320px; max-height: 70vh; overflow: auto; padding: 14px 16px; outline: none; }
.rte-area:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.rte textarea { border: 0; border-radius: 0 0 10px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; width: 100%; min-height: 320px; }
.legal-toc { margin: 0 0 24px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); }
.legal-toc h2 { font-size: 1rem; margin: 0 0 6px; } .legal-toc ol { margin: 0; padding-left: 20px; columns: 2; }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }
.legal-body h2 { margin-top: 1.6em; scroll-margin-top: 90px; } .legal-body table { border-collapse: collapse; } .legal-body td, .legal-body th { border: 1px solid var(--line); padding: 6px 10px; }
mark.legal-missing { background: rgba(255, 217, 138, 0.25); color: var(--c-warn); padding: 0 4px; border-radius: 4px; border: 1px dashed var(--c-warn); }
:root[data-theme="light"] mark.legal-missing { background: #fff2cc; color: #6b4a00; border-color: #b07a00; }

/* ---- Cookie banner and dialog ---- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--surface-2); border-top: 1px solid var(--line); box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35); padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; gap: 18px 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-copy { flex: 1 1 420px; } .cookie-copy h2 { font-size: 1.05rem; margin: 0 0 4px; } .cookie-copy p { margin: 0; color: var(--text-dim); font-size: 0.93rem; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-dialog { max-width: min(560px, calc(100vw - 24px)); width: 100%; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--text); padding: 22px 24px; }
.cookie-dialog::backdrop { background: rgba(2, 4, 16, 0.65); }
.cookie-cat { padding: 10px 0; border-bottom: 1px solid var(--line); } .cookie-cat:last-of-type { border-bottom: 0; } .cookie-cat p { margin: 4px 0 0 28px; }
@media (max-width: 640px) { .cookie-actions .btn { flex: 1 1 100%; } .cookie-banner { max-height: 80vh; overflow: auto; } }


/* ---- Quotation / invoice sheet in the KIS template design (on-screen and print) ---- */
.kd-sheet { position: relative; box-sizing: border-box; width: 210mm; min-height: 297mm; margin: 0 auto 24px; padding: 20mm 11mm 24mm 12mm; background: #fff; color: #0a0d1a; font-family: var(--font); line-height: 1.4; overflow: hidden; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25); }
.kd-sheet h1, .kd-sheet h2, .kd-sheet p, .kd-sheet ul, .kd-sheet dl, .kd-sheet dd { margin: 0; }
.kd-swoosh { position: absolute; left: 0; top: 0; width: 70mm; height: auto; }
.kd-tab { position: absolute; right: 0; top: 0; width: 46%; height: 7mm; background: #5a80d0; border-bottom-left-radius: 5mm; }
.kd-head { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8mm; margin-top: 8mm; }
.kd-brand { display: flex; align-items: center; gap: 4mm; }
.kd-brand img { width: 30mm; height: 30mm; display: block; }
.kd-brand p { font-size: 24px; font-weight: 800; line-height: 1.02; }
.kd-title { text-align: right; }
.kd-title h1 { color: #2f6dae; font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: 0; }
.kd-badge { color: #cc2633; font-weight: 800; font-size: 16px; margin-top: 2mm; }
.kd-meta { display: flex; justify-content: space-between; gap: 8mm; margin-top: 12mm; }
.kd-meta h2 { color: #2f6dae; font-size: 17px; font-weight: 800; }
.kd-no h2 span { color: #0a0d1a; font-size: 13px; }
.kd-to { max-width: 90mm; }
.kd-to p { font-size: 14px; margin-top: 1mm; }
.kd-small { color: #555; font-size: 12px !important; }
.kd-no dl { display: grid; grid-template-columns: auto auto; gap: 1mm 4mm; justify-content: end; margin-top: 3mm; font-size: 14px; }
.kd-no dd { text-align: right; }
.kd-table { width: 100%; border-collapse: collapse; margin-top: 12mm; font-size: 13px; }
.kd-table th { color: #2f6dae; font-weight: 800; font-size: 14px; text-align: left; padding: 0 2mm 3mm; border-bottom: 2px solid #000; }
.kd-table td { padding: 3.2mm 2mm; border-bottom: 1px solid #222; height: 13mm; vertical-align: middle; }
.kd-table .kd-no-col { width: 14mm; padding-left: 4mm; }
.kd-r { text-align: right !important; white-space: nowrap; }
.kd-c { text-align: center !important; }
.kd-totals { margin: 3mm 0 0 auto; width: 100%; }
.kd-totals dl { display: grid; grid-template-columns: 1fr auto; gap: 2mm 0; width: 62%; margin-left: 38%; font-size: 14px; padding: 3mm 2mm 4mm; border-bottom: 2px solid #000; }
.kd-totals dd { text-align: right; }
.kd-sheet .kd-grand { display: flex; justify-content: space-between; width: 62%; margin-left: 38%; padding: 3mm 2mm 0; color: #2f6dae; font-weight: 800; font-size: 18px; }
.kd-totals .kd-after { border: 0; padding-top: 2mm; font-size: 14px; }
.kd-totals .kd-after .kd-strong { color: #2f6dae; font-weight: 800; }
.kd-foot { display: flex; gap: 8mm; margin-top: 10mm; }
.kd-terms { flex: 1 1 62%; }
.kd-side { flex: 1 1 34%; font-size: 12px; }
.kd-foot h2 { color: #2f6dae; font-size: 17px; font-weight: 800; margin-bottom: 2mm; }
.kd-side h2 { font-size: 14px; margin-top: 2mm; }
.kd-terms ul { list-style: none; padding: 0; font-size: 12px; }
.kd-terms li { margin: 0 0 1.4mm; }
.kd-bar { position: absolute; left: 0; right: 0; bottom: 0; background: #5a80d0; color: #14193a; text-align: center; font-size: 12px; padding: 2.6mm 4mm; }
@media (max-width: 800px) { .kd-sheet { width: 100%; min-height: 0; padding: 18px 14px 56px; } .kd-title h1 { font-size: 34px; } .kd-head, .kd-meta, .kd-foot { flex-wrap: wrap; } .kd-brand img { width: 64px; height: 64px; } .kd-table { font-size: 12px; } .kd-totals dl, .kd-grand { width: 100%; margin-left: 0; } }
@media print {
    @page { size: A4; margin: 0; }
    body.print-doc { background: #fff; }
    .kd-sheet { width: 210mm; min-height: 297mm; margin: 0; box-shadow: none; page-break-after: always; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ---- Bug support: the choice shown after free support ends ---- */
.support-popup { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: rgba(var(--bg-rgb), 0.92); backdrop-filter: blur(4px); }
.support-popup-box { width: 100%; max-width: 760px; margin: 4vh auto; padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-card); box-shadow: var(--shadow); }
.support-popup-box h2 { margin-top: 0; }
.support-popup-project { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.support-popup-foot { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-top: 14px; }
.support-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.support-option { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.support-option h3 { margin: 0 0 8px; font-size: 1.05rem; }
.support-option .check { display: flex; gap: 8px; align-items: center; margin: 4px 0; }

/* ---- Phones: the signed-in top bar must fit the screen (it was wider than a 412px phone, which made the whole page slide sideways and look zoomed out) ---- */
@media (max-width: 560px) {
    .portal-bar { gap: 8px; padding-inline: 12px; }
    .portal-bar .brand-word { display: none; }
    .portal-user { gap: 6px; min-width: 0; }
    .portal-bar .theme-toggle { margin-right: 0; width: 34px; height: 34px; }
    .portal-user .btn { padding-inline: 10px; }
    .table-wrap { max-width: 100%; }
}
