/* TriVolt portal — navy #0F2844, amber #F5B731 */
:root {
  --navy: #0f2844;
  --navy-2: #17375c;
  --amber: #f5b731;
  --amber-hover: #ffc94d;
  --amber-text: #7a5200;
  --ink: #13202f;
  --muted: #4e5d6e;
  --line: #dce2ea;
  --line-soft: #edf1f5;
  --ground: #f3f5f8;
  --tint: #f7f9fb;
  --white: #ffffff;
  --green-bg: #ddf0ec;
  --green-ink: #0b4a3f;
  --blue-bg: #e3e8ff;
  --blue-ink: #2a3a94;
  --amber-bg: #fff1cc;
  --amber-ink: #6b4500;
  --red-bg: #fde4e4;
  --red-ink: #8a1c1c;
  --grey-bg: #e6ecf4;
  --grey-ink: #22416a;
  --radius: 14px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--ground); }
a { color: var(--navy); font-weight: 600; }
a:hover { color: var(--navy-2); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
img, svg { max-width: 100%; }

h1 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.h3 { margin: 0; font-size: 19px; font-weight: 700; }
.h4 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 700; }
.mono { font-family: var(--mono); }
.pre { white-space: pre-wrap; }
.wrap { overflow-wrap: anywhere; }
.right { text-align: right; }
.eyebrow { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.eyebrow--amber { color: var(--amber); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- header ---------- */
.tv-header { background: var(--navy); }
.tv-header__inner { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.tv-header__inner.wide, .container.wide { max-width: 1320px; }
.tv-header__left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.tv-header__right { display: flex; align-items: center; gap: 16px; color: #c8d8ea; font-size: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__name { font-size: 19px; font-weight: 800; color: var(--white); }
.brand__name > span { color: var(--amber); }
.brand__name em { font-style: normal; font-weight: 500; color: #c8d8ea; }
.nav { display: flex; gap: 22px; }
.nav a { color: #c8d8ea; text-decoration: none; font-weight: 500; padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--white); }
.nav a[aria-current] { color: var(--white); font-weight: 700; border-bottom-color: var(--amber); }
.who { overflow-wrap: anywhere; }
.linkish { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 10px 0; cursor: pointer; }
.tv-header .linkish:hover { color: var(--white); }
main .linkish { color: var(--navy); }
main .linkish:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); font-size: 14px; color: var(--muted); }
.site-footer .container { padding: 20px 24px; display: block; }

/* ---------- layout ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.page-head p { margin-top: 6px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.two-col { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.two-col__main { flex: 999 1 560px; min-width: 0; }
.two-col__side { flex: 1 1 300px; min-width: 0; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ---------- cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card--pad { padding: 24px; }
.card--navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.card--navy .muted { color: #c9d6e5; }
.card__head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.card__body { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.card__body:last-child { border-bottom: 0; }
.card__body--tint { background: var(--tint); border-radius: 0 0 var(--radius) var(--radius); }
.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 18px; border-radius: 10px; border: 2px solid transparent; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn--amber { background: var(--amber); color: var(--navy); }
.btn--amber:hover { background: var(--amber-hover); color: var(--navy); }
.btn--outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: #f2f6fb; }
.btn--block { width: 100%; }
.btn--lg { font-size: 17px; padding: 14px 24px; }
.btn--small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn:disabled { background: #e7ebf0; color: #5c6878; border-color: #e7ebf0; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-soft); }

/* ---------- chips & banners ---------- */
.chip { display: inline-block; padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip--amber { background: var(--amber-bg); color: var(--amber-ink); }
.chip--green { background: var(--green-bg); color: var(--green-ink); }
.chip--blue { background: var(--blue-bg); color: var(--blue-ink); }
.chip--navy { background: var(--navy); color: var(--white); }
.chip--grey { background: var(--grey-bg); color: var(--grey-ink); }
.chip--red { background: var(--red-bg); color: var(--red-ink); }
.tag { font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--amber-bg); color: var(--amber-ink); }
.banner { padding: 14px 18px; border-radius: 12px; font-size: 15px; line-height: 1.5; border: 1px solid; }
.banner--info { background: var(--grey-bg); border-color: #b9c9dd; color: #1b365a; }
.banner--warn { background: #fff6da; border-color: #f0d27a; color: #4a3200; }
.banner--ok { background: var(--green-bg); border-color: #9fd3c7; color: var(--green-ink); }
.banner--error { background: var(--red-bg); border-color: #f0b4b4; color: var(--red-ink); }
.form-error { color: var(--red-ink); font-weight: 600; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
label { font-size: 14px; font-weight: 600; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--white); border: 1px solid #b9c4d2; border-radius: 10px; padding: 11px 14px; min-height: 46px; width: 100%; }
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--navy); flex: none; }
input[type='file'] { padding: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(245, 183, 49, 0.45); }
textarea { resize: vertical; line-height: 1.5; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.code-input { font-family: var(--mono); font-size: 28px; letter-spacing: 0.4em; text-align: center; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 15px; cursor: pointer; }
.check input { margin-top: 2px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.inline-checks label { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; cursor: pointer; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--navy); background: #f2f6fb; }
.choice > span { display: flex; flex-direction: column; gap: 4px; }
.choice__title { font-size: 16px; font-weight: 700; }
.step { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; margin-right: 6px; border-radius: 50%; background: var(--line-soft); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.price-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 22px; border-radius: 12px; background: var(--navy); color: var(--white); }
.price-box__note { margin-top: 6px; font-size: 15px; color: #c9d6e5; }
.price-box__total { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.details summary { cursor: pointer; font-weight: 700; color: var(--navy); min-height: 44px; display: flex; align-items: center; }
.details[open] summary { margin-bottom: 12px; }
.inline-form { display: inline; }
.inline-form.stack { display: flex; margin-bottom: 18px; }

/* ---------- uploads ---------- */
.uploader { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.uploader__drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 18px; border: 2px dashed #b9c4d2; border-radius: 12px; background: #f8fafc; text-align: center; cursor: pointer; font-weight: 400; }
.uploader__drop:hover { border-color: var(--navy); background: #eef3f9; }
.uploader__title { font-size: 16px; font-weight: 700; color: var(--navy); }
.uploader__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.uploader__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 10px; }
.uploader__list li .mono { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.uploader__list progress { flex: 1 1 100%; height: 8px; accent-color: var(--navy); }
.deliverable-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.deliverable-row > :first-child { flex: 1 1 220px; min-width: 0; }
.deliverable-row .uploader { flex: 1 1 260px; }
.deliverable-row .uploader__drop { padding: 12px; }

/* ---------- lists & tables ---------- */
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.file-list li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.file-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.file-list__name { font-size: 14px; overflow-wrap: anywhere; }
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.activity li { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.activity__when { color: var(--muted); font-size: 13px; min-width: 150px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data thead th { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--tint); border-bottom-color: var(--line); white-space: nowrap; }
table.data .num { text-align: right; }
table.data tr.group th { font-size: 14px; font-weight: 700; color: var(--navy); padding-top: 18px; border-bottom-color: var(--line); }
table.data tr.total th, table.data tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* ---------- quote ---------- */
.big-price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.breakdown { margin: 0 0 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; font-size: 15px; }
.breakdown dd { margin: 0; font-family: var(--mono); text-align: right; }
.breakdown .total { font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills span { font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 8px; background: #f2f6fb; border: 1px solid var(--line); }
.pdf-frame { width: 100%; height: min(80vh, 900px); border: 1px solid var(--line); border-radius: 10px; background: #e9edf2; margin-bottom: 8px; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; }
.timeline__step { display: flex; flex-direction: column; gap: 10px; }
.timeline__bar { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.timeline__step--done .timeline__bar { background: var(--navy); }
.timeline__label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.timeline__dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; background: var(--white); color: var(--muted); border: 2px solid #b9c4d2; }
.timeline__step--done .timeline__dot { background: var(--navy); color: var(--white); border-color: var(--navy); }
.timeline__step--now .timeline__dot { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.timeline__date { font-family: var(--mono); font-size: 13px; color: var(--muted); min-height: 18px; }

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.kpi--amber { border-top-color: var(--amber); }
.kpi--blue { border-top-color: #4f63d2; }
.kpi--navy { border-top-color: var(--navy); }
.kpi--red { border-top-color: #c81e1e; }
.kpi--grey { border-top-color: #b9c4d2; }
.kpi__label { font-size: 14px; font-weight: 600; color: var(--muted); }
.kpi__value { font-size: 30px; font-weight: 800; margin-top: 4px; }
.kpi__sub { font-size: 13px; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.tabs a { text-decoration: none; font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 999px; border: 1px solid #b9c4d2; color: var(--ink); }
.tabs a[aria-current] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------- sign in ---------- */
body.bare { background: var(--ground); }
.split { min-height: 100vh; display: flex; flex-wrap: wrap; }
.split__brand { flex: 1 1 420px; min-width: 0; background: var(--navy); color: var(--white); padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.split__brand a { color: var(--white); }
.split__brand .small { color: #a9bbd0; }
.split__headline { margin-top: 12px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; max-width: 460px; }
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; color: #c9d6e5; }
.ticks li::before { content: '✓'; color: var(--amber); font-weight: 800; margin-right: 10px; }
.split__form { flex: 1 1 460px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.split__form .card { width: 100%; max-width: 440px; box-shadow: 0 10px 30px rgba(15, 40, 68, 0.08); }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; color: #d6e2f0; font-size: 15px; }
.steps li { display: flex; gap: 14px; }
.steps span { font-family: var(--mono); font-weight: 600; color: var(--amber); }

/* ---------- invoice ---------- */
.invoice { display: flex; flex-direction: column; gap: 24px; max-width: 860px; }
.invoice__parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; font-size: 15px; }
@media print {
  .tv-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: 0; }
}

@media (max-width: 640px) {
  .container { padding: 20px 16px 48px; }
  .tv-header__inner { padding: 10px 16px; }
  .card--pad { padding: 18px; }
  .card__head, .card__body { padding: 16px 18px; }
  .split__brand { padding: 28px 20px; }
  .big-price, .price-box__total { font-size: 28px; }
}
