/* VEKTRA 3D customer portal - "Design 03" layout (approved 26.10.2026:
   docs/mockups/2026-10-26-kundenportal-sand-salbei.html in the AICAD repo)
   in the backoffice's colours (Thomas, 27.10.2026: mockup
   2026-10-27-kundenportal-backoffice-farben.html): grey-teal page, light grey
   surfaces, nothing pure white; the green primary button stays. Inter
   everywhere, no all-caps labels; header and menu read as one bar. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  /* Surfaces from internal/web/static/backoffice.css. */
  --page: #e3e7e8;      /* grey-teal page under the bar */
  --bar: #eaedee;       /* header and menu, the backoffice sidebar's tone */
  --surface: #f3f5f5;   /* cards */
  --sunken: #eceff0;    /* wells inside cards: keys, help box */
  --field: #fbfcfc;     /* inputs, a step lighter than the card */
  --soft: #dbe9e7;      /* teal tint: icons, focus ring, notices */
  --line: #d3d9db;
  --field-line: #c9d1d3;
  --accent: #246b53;
  --accent-deep: #1b5843;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --gold: #906516;
  --red: #b4433e;
  --green: #28704d;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 14px/1.6 var(--font); font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -.035em; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.mist { color: var(--ink-2); }
.wrap { max-width: 1480px; margin: 0 auto; padding-inline: var(--gutter); }
@media (min-width: 1450px) { .wrap { max-width: 1370px; } }

/* --- header + menu: one white bar ------------------------------------------- */
.top { background: var(--bar); position: relative; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { height: 34px; width: auto; display: block; }
.wm { font-size: 16px; letter-spacing: .32em; font-weight: 600; line-height: 1; color: var(--ink); }
.wm i { font-style: normal; color: var(--accent); margin-left: .06em; }
.who { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.who .co { text-align: right; line-height: 1.25; font-size: 12px; font-weight: 600; }
.who .co span { display: block; font-weight: 400; font-size: 11px; margin-top: 4px; color: var(--ink-3); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 600; font-size: 11px;
}

.menubar {
  background: var(--bar); border-bottom: 1px solid var(--line); position: relative; z-index: 10;
}
.menu { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a {
  display: flex; align-items: center; gap: 9px; padding: 21px 0 17px; white-space: nowrap; flex: none;
  font-size: 12px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent;
}
.menu a:hover { color: var(--accent); }
.menu a[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.menu svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }

main { padding-block: 0 40px; }
.content { padding-top: 48px; }

/* --- type, buttons, pills --------------------------------------------------- */
.hero { padding: 22px 0 22px; }
.hero h1 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.16; margin: 0 0 4px; }
.hero .hero-co { font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (min-width: 1450px) { .hero h1 { font-size: 36px; } }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 14px 0 26px; }
.head h1 { font-size: 32px; line-height: 1.2; }
.head p { color: var(--ink-2); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 5px; border: 1px solid transparent; background: none;
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s, border-color .18s;
}
.btn:active { transform: translateY(1px); }
.btn-teal { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 3px #173d2810; }
.btn-teal:hover { background: var(--accent-deep); box-shadow: 0 4px 10px #173d2820; }
.btn-line { background: var(--surface); border-color: var(--field-line); color: var(--ink); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); background: var(--soft); }
.btn-red { background: var(--surface); border-color: #e9c8c5; color: var(--red); }
.btn-red:hover { background: #fff1ef; }
.btn-sm { padding: 7px 11px; font-size: 11px; }
.btn-wide { width: 100%; }
.hero-actions .btn { padding: 11px 17px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12px; font-weight: 600; }
.link:hover { text-decoration: underline; }
.link.red { color: var(--red); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 10px; font-weight: 500; padding: 3px 8px; border-radius: 4px;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-ok { background: #eaf5ed; color: #28704d; }
.p-free { background: #f1f4f2; color: #64766c; }
.p-warn { background: #fff2d8; color: #8a5d11; }
.p-red { background: #fcece9; color: #b4433e; }
.p-teal { background: var(--soft); color: var(--accent); }

.banner {
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between;
  padding: 17px 21px; border-radius: 10px; border: 1px solid; margin-bottom: 18px;
}
.banner strong { display: block; font-size: 14px; }
.banner span { font-size: 12px; color: var(--ink-2); }
.banner.warn { background: #fff7e6; border-color: #ecdbb6; }
.banner.teal { background: var(--soft); border-color: #8ab9b3; }
.banner.red { background: #fff0ed; border-color: #edcfc8; }

/* --- cards and grids ----------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 27px 29px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.card h2 { font-size: 18px; font-weight: 500; letter-spacing: -.025em; margin-bottom: 18px; }
.grid { display: grid; gap: 23px; }
.g2 { grid-template-columns: 1.35fr 1fr; }

/* KPI band: four values joined in one sage strip. */
.kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 27px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.kpi { padding: 14px 22px; border-right: 1px solid var(--line); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi .label { font-size: 11px; font-weight: 500; color: var(--ink-2); }
.kpi .val { font-size: 24px; font-weight: 600; letter-spacing: -.045em; line-height: 1.2; margin-top: 4px; white-space: nowrap; }
.kpi .val .pill { font-size: 12px; padding: 2px 9px; vertical-align: middle; letter-spacing: 0; }
.kpi .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* --- forms ------------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11px; font-weight: 500; color: var(--ink-2); }
.field input, .field select {
  background: var(--field); border: 1px solid var(--field-line); border-radius: 6px;
  padding: 10px 12px; color: var(--ink); font: inherit; font-size: 13px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
.hint { font-size: 11px; color: var(--ink-3); margin: -6px 0 14px; }
.check { display: flex; gap: 9px; align-items: center; font-size: 13px; color: var(--ink-2); }

/* --- sign-in ----------------------------------------------------------------------- */
.login {
  min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px var(--gutter);
  background: radial-gradient(ellipse at 50% 20%, var(--soft), transparent 65%);
}
.login .card { width: 100%; max-width: 440px; padding: 36px; border-radius: 16px; box-shadow: 0 16px 70px #193d2910; }
.login .eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .02em; color: var(--accent); }
.login h1 { font-size: 31px; letter-spacing: -.04em; margin: 8px 0; }
.login .mist { font-size: 13px; line-height: 1.7; }
.login .small { font-size: 11px; color: var(--ink-3); margin-top: 16px; }
.login-form { margin-top: 20px; }
.check + .btn { margin-top: 18px; }
/* One field for the six digits: paste and the browser's one-time-code
   autofill work, and it reads like the mockup's six boxes. */
.code-input {
  width: 100%; margin: 18px 0; padding: 12px 0 12px .5em; text-align: center;
  font: 600 26px/1.2 var(--font); letter-spacing: .5em; font-variant-numeric: tabular-nums;
  background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
}
.code-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
.login-alt { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }

.notice, .error {
  font-size: 12.5px; border-radius: 8px; padding: 10px 13px; margin-bottom: 16px; border: 1px solid;
}
.notice { background: var(--soft); border-color: #8ab9b3; color: var(--ink); }
.error { background: #fff0ed; border-color: #edcfc8; color: var(--red); }
.flash { margin: 24px 0 0; }

/* --- shared bits ----------------------------------------------------------------- */
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.inline { display: inline; }
.card-foot { margin-top: 19px; }
.card-action { margin-top: 16px; }
.card .mist { font-size: 13.5px; }
.card p.small + .tablewrap { margin-top: 16px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 14px; }
.icon-btn { background: none; border: 0; padding: 2px; color: var(--ink-3); line-height: 0; }
.icon-btn:hover { color: var(--accent); }
.icon-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 22px 0 10px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 10.5px; color: var(--ink-3); padding: 0 10px 12px; border-bottom: 1px solid var(--line); }
td { font-size: 12.5px; padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.tablewrap { overflow-x: auto; }

/* --- overview ----------------------------------------------------------------------- */
.seat-line {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.seat-line b { font-weight: 600; }
.overview-lower { display: grid; grid-template-columns: 1.35fr 1fr; gap: 23px; margin-top: 23px; }
.quick-download { display: flex; align-items: center; gap: 16px; padding: 21px 27px; }
.quick-icon { width: 43px; height: 46px; border-radius: 5px; background: var(--soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.quick-icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.quick-download b { display: block; font-size: 12.5px; font-weight: 600; }
.quick-download p { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.quick-download .link { margin-left: auto; white-space: nowrap; font-size: 11.5px; }
.quick-help { display: flex; gap: 14px; align-items: center; padding: 22px 24px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; }
.quick-help .round { width: 31px; height: 31px; border: 1px solid var(--field-line); border-radius: 50%; display: grid; place-items: center; color: var(--accent); flex: none; }
.quick-help strong { font-size: 12.5px; font-weight: 600; }
.quick-help p { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.quick-help a { font-weight: 600; color: var(--accent); }

/* --- seats ---------------------------------------------------------------------------- */
.seats { display: flex; flex-direction: column; gap: 10px; }
.seat {
  display: grid; grid-template-columns: 40px minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) 150px;
  gap: 16px; align-items: center; padding: 19px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.seat.ended { border-style: dashed; }
.seat .ico { width: 40px; height: 40px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; }
.seat .ico svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.seat.free .ico svg, .seat.ended .ico svg { stroke: var(--ink-3); }
.seat .name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.seat .meta { margin-top: 5px; font-size: 11.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seat .key { margin-top: 8px; font-size: 11.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seat .key code {
  font: 500 12px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em;
  background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; padding: 3px 7px; user-select: all;
}
.seat .key .link { font-size: 11.5px; }
.seat .dev { font-size: 12.5px; }
.seat .dev span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.swaps { display: flex; gap: 4px; margin: 5px 0 4px; }
.swaps i { width: 25px; height: 4px; border-radius: 2px; background: var(--accent); }
.swaps i.used { background: var(--line); }
.swap-col .small { font-size: 11px; }
.seat .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.journal { margin-top: 22px; }

/* --- costs and invoices ------------------------------------------------------------- */
.cost { padding: 24px 28px; margin-bottom: 18px; }
.cost-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cost-head h2 { margin: 0; }
.cost-state { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--accent); }
.cost-grid { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.6fr) minmax(170px, .8fr); align-items: stretch; }
.cost-grid > div { padding: 4px 28px; }
.cost-grid > div:first-child { padding-left: 0; }
.cost-grid > div + div { border-left: 1px solid var(--line); }
.cost-big { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.cost-sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.cost-sub.first { margin-top: 0; }
.cost-lines { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; font-size: 13.5px; align-content: center; }
.cost-lines .r { text-align: right; white-space: nowrap; }
.cost-note { font-size: 12.5px; color: var(--ink-3); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.invoices { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; }
.devbox { display: flex; gap: 12px; align-items: center; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.devbox svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.5; flex: none; }
.devbox b { display: block; font-size: 13px; }
.devbox span { font-size: 11.5px; color: var(--ink-3); }

/* --- buying (phase 3) ----------------------------------------------------------------- */
.buy { margin-bottom: 18px; scroll-margin-top: 20px; }
.buy-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 28px; align-items: start; }
.price-lines { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; font-size: 13.5px; margin: 16px 0; }
.buy-form .btn { margin-bottom: 10px; }
.banner form, .banner .btn { flex: none; }
@media (max-width: 860px) { .buy-grid { grid-template-columns: 1fr; } }

/* --- downloads ------------------------------------------------------------------------ */
.dl { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dl:last-child { border-bottom: 0; }
.dl .ico { width: 44px; height: 44px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; }
.dl .ico svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.dl b { display: block; font-size: 13px; font-weight: 600; }
.dl span { font-size: 11px; color: var(--ink-3); word-break: break-word; }
details.notes, details.older { margin-top: 10px; }
details > summary { cursor: pointer; list-style: none; display: inline-block; }
details > summary::-webkit-details-marker { display: none; }
.notes-text { white-space: pre-line; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; padding: 14px 16px; background: var(--page); border-radius: 8px; }

/* --- account ---------------------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 10px 18px; margin: 0 0 18px; font-size: 13px; }
.facts dt { color: var(--ink-3); font-size: 12px; }
.facts dd { margin: 0; }

/* --- dialogs ------------------------------------------------------------------------------ */
dialog.modal {
  width: min(480px, calc(100vw - 32px)); padding: 30px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 25px 100px #12362033;
}
dialog.modal::backdrop { background: rgba(24, 44, 35, .28); backdrop-filter: blur(5px); }
dialog.modal h2 { font-size: 22px; margin-bottom: 12px; }
dialog.modal p { font-size: 13px; color: var(--ink-2); }
dialog.modal .row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; border-radius: 9px; padding: 11px 18px; font-size: 12.5px;
  box-shadow: 0 8px 30px #173d2825; transition: opacity .25s, transform .25s; z-index: 80;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* --- backoffice read-only view ---------------------------------------------------- */
.preview-bar { background: #fff2d8; color: #8a5d11; font-size: 12px; font-weight: 600; text-align: center; padding: 8px 16px; }
.preview form, .preview [data-dialog], .preview [download], .preview .icon-btn { display: none !important; }

/* --- footer -------------------------------------------------------------------- */
.portal-foot { display: flex; justify-content: space-between; gap: 15px; margin-top: 26px; font-size: 10px; color: var(--ink-3); }
.portal-foot a:hover { color: var(--accent); }

@media (max-width: 1150px) {
  :root { --gutter: 28px; }
  .g2, .overview-lower, .invoices { grid-template-columns: 1fr; }
  .menu { gap: 25px; }
  .seat { grid-template-columns: 40px minmax(0, 1fr); }
  .seat > div:nth-child(n+3) { grid-column: 2; }
  .seat .acts { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .content { padding-top: 26px; }
  .card { padding: 23px; }
  .cost-grid { grid-template-columns: 1fr; }
  .cost-grid > div { padding: 12px 0; }
  .cost-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 650px) {
  :root { --gutter: 20px; }
  .top .wrap { height: 70px; }
  .brand .logo { height: 28px; }
  .wm { font-size: 14px; }
  .who .co { display: none; }
  .avatar { width: 33px; height: 33px; }
  .menu { gap: 20px; }
  .menu a { font-size: 11px; }
  .menu svg { display: none; }
  .hero h1 { font-size: 27px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .card { padding: 22px; }
  .login .card { padding: 26px; }
  .dl { grid-template-columns: 34px 1fr; }
  .dl > .btn { grid-column: 2; justify-self: start; }
  .dl .ico { width: 34px; height: 36px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
