/* VTP GO — operator cockpit. The customer app's look (web/css/shared.css §sidebar, tokens.css),
   on purpose: an operator moves between the two all day. Colours come from tokens.css or the
   aliases below; do not hard-code a hex outside :root. */
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url('./fonts/nunito-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-0101, U+0103-0130, U+0132-0151, U+0154-02BA, U+02BD-02C5, U+02C7-02CC, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url('./fonts/nunito-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0102, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0309, U+0323, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }

:root {
  --navy: var(--vtp-color-brand-navy); --navy-dark: var(--vtp-color-brand-navy-dark);
  --tint: var(--vtp-color-brand-tint); --muted: var(--vtp-color-brand-muted); --nav-text: var(--vtp-color-brand-nav-text);
  --page: #f4f6fb; --surface: #ffffff; --rule: var(--vtp-color-neutral-border); --rule-soft: #f1f3f7;
  --text: var(--vtp-color-text-primary); --text-body: var(--vtp-color-text-body); --text-dim: var(--vtp-color-text-label-small);
  --text-faint: var(--vtp-color-text-caption);
  /* Status tones — the deeper set from palette round 2 (2026-09-23). */
  --ok: #2f7a57; --ok-bg: #e8f2ec; --warn-t: #a2621a; --warn-bg: #f7eedf; --bad-t: #b0383a; --bad-bg: #f6e5e5;
  --info: #1e40af; --info-bg: #e6ecfa; --neutral: #6b7280; --neutral-bg: #eef0f4;
  --shadow: 0 2px 8px rgba(26, 60, 143, 0.07); --r: 12px; --r-sm: 8px;
  /* Aliases so the component rules carried over from the old stylesheet keep working. */
  --ground: var(--page); --panel: var(--surface); --sunken: #f7f9fe; --chip: #eaeffb; --line: var(--rule);
  --line-soft: var(--rule-soft); --ink: var(--text); --ink-dim: var(--text-dim); --accent: var(--navy);
  --accent-deep: var(--navy-dark); --accent-ink: #ffffff; --accent-wash: #e0e7ff;
  --bad: var(--bad-t); --bad-soft: var(--bad-bg); --bad-line: #eccaca; --bad-line-strong: #dfa39b;
  --good: var(--ok); --good-soft: var(--ok-bg); --good-line: #bcdcc9; --warn: var(--warn-t); --warn-soft: var(--warn-bg);
  --warn-line: #ead3ae; --lift: var(--shadow);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text-body); font: 14px/1.5 'Nunito Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--muted); outline-offset: 2px; border-radius: 6px; }
a { color: var(--navy); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
.num, td.n, .kpi b { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ── login ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px; display: grid; gap: 14px; }
.login-card .logo { padding: 0; border: 0; }
.login-card .logo small { color: var(--text-dim); }
.login-card .logo-mark { height: 56px; }
.login-card h1 { margin: 6px 0 0; font-size: 20px; color: var(--navy); }

/* ── shell ── */
.shell { display: flex; min-height: 100vh; }
/* 2026-10-08 — the app's sidebar (web/css/brand.css §2, Andrei's 2026-10-04 reference): a deep navy gradient with one
   soft light top-right, each section in a translucent panel, the active item lit with a cyan edge, the operator and
   „Ieși" as soft panels. Phones keep the one-row menu (the @media block below). */
.side { width: 248px; flex: 0 0 248px; color: var(--nav-text); display: flex; flex-direction: column;
  background: radial-gradient(140% 55% at 108% -8%, rgba(110, 160, 255, .26), transparent 52%), linear-gradient(180deg, #1c3d9c 0%, #17348b 42%, #132c76 100%);
  position: sticky; top: 0; height: 100vh; }
.logo { display: flex; gap: 14px; align-items: center; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
/* 2026-10-08 — the VTP GO mark (img/, the app's own files): bright on the navy menu, blue on the white sign-in card */
.logo-mark { display: block; height: 40px; width: auto; flex: none; }
.side .logo-mark { height: 52px; }
.logo small { color: #c9d8fb; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.menu { flex: 1; padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.menu-group { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px 8px;
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 16px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.menu .lbl { padding: 0 10px 8px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #8fb0ff; }
.menu a { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px;
  color: #dde6fb; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.menu a svg { color: #c4d3f7; }
.menu a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.menu a[aria-current='page'] { background: linear-gradient(90deg, rgba(86, 136, 255, .34), rgba(86, 136, 255, .18)); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(150, 185, 255, .16); }
.menu a[aria-current='page'] svg { color: #fff; }
.menu a[aria-current='page']::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px;
  background: #3fb8ff; box-shadow: 0 0 10px rgba(63, 184, 255, .7); }
.menu a:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 1px; }
.menu svg { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.menu .count { margin-left: auto; background: rgba(255, 255, 255, 0.16); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.side-bottom { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.op { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.op-i { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: 0 0 40px; }
.op-t { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.op-t b { color: #fff; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-t small { color: #8fb0ff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-out { min-height: 46px; width: 100%; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .08);
  color: #e3eafb; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.op-out:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.op-out:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 2px; }
.view { flex: 1; min-width: 0; padding: 0 28px 48px; outline: none; }

/* ── page furniture ── */
.top { display: flex; align-items: center; gap: 12px 16px; padding: 22px 0 18px; flex-wrap: wrap; }
.top h1 { margin: 0; color: var(--navy); font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.top .actions { margin-left: auto; flex: 1 1 auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.top .actions > button, .top .actions > .btn { white-space: nowrap; }
@media (min-width: 901px) { .top .actions { flex-wrap: nowrap; } }
.crumb { color: var(--text-dim); font-size: 13px; } .crumb a { font-weight: 700; text-decoration: none; }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--rule-soft); flex-wrap: wrap; }
.card-h h2 { margin: 0; font-size: 15px; color: var(--text); font-weight: 700; }
.card-h .aside { margin-left: auto; color: var(--text-dim); font-size: 12px; }
.card-b { padding: 16px 20px; }
.grid { display: grid; gap: 16px; margin-top: 16px; grid-template-columns: minmax(0, 1fr); }
/* A grid item's min-width is its content by default — a wide table would widen the page instead of scrolling in its wrapper. */
.grid > * { min-width: 0; }
/* Spacing inside a grid is the gap; the stacked-card margin below must not add to it. */
.grid > .card + .card { margin-top: 0; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.g-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.kpi { padding: 14px 16px; }
.kpi span { color: var(--text-dim); font-size: 12px; font-weight: 600; display: block; }
.kpi b { display: block; font-size: 24px; color: var(--text); font-weight: 800; line-height: 1.2; margin-top: 2px; }
.kpi small { color: var(--text-dim); font-size: 12px; }
.kpi.bad b { color: var(--bad-t); } .kpi.warn b { color: var(--warn-t); }
.kpi-link { color: inherit; text-decoration: none; display: block; }
.kpi-link > .kpi { height: 100%; } .kpi-link:hover .kpi { box-shadow: 0 4px 14px rgba(26, 60, 143, 0.12); }
.btn { border: 1px solid var(--rule); background: var(--surface); color: var(--text); border-radius: var(--r-sm); padding: 7px 13px; font-weight: 700; font-size: 13px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 6px 12px; min-width: min(300px, 100%); }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-ok { background: var(--ok-bg); color: var(--ok); } .p-warn { background: var(--warn-bg); color: var(--warn-t); }
.p-bad { background: var(--bad-bg); color: var(--bad-t); } .p-info { background: var(--info-bg); color: var(--info); }
.p-neutral { background: var(--neutral-bg); color: var(--neutral); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { border: 1px solid var(--rule); background: var(--surface); color: var(--text-body); border-radius: 20px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.chip b { color: var(--text-dim); margin-left: 6px; }
.chip[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: #fff; } .chip[aria-pressed='true'] b { color: var(--muted); }
.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data th { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); text-align: left; font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--rule); background: #fbfcfe; white-space: nowrap; }
table.data th button { all: unset; cursor: pointer; } table.data th[aria-sort] button::after { content: ' ↓'; } table.data th[aria-sort='ascending'] button::after { content: ' ↑'; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
table.data tbody tr.link { cursor: pointer; } table.data tbody tr.link:hover { background: var(--vtp-color-neutral-bg-hover); }
table.data .n { text-align: right; }
.firm b { display: block; color: var(--text); } .firm a { display: block; color: var(--text); font-weight: 700; text-decoration: none; }
.firm .mono { display: block; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; color: var(--text-dim); }
.sub { display: block; color: var(--text-dim); font-size: 12px; }
.zero { color: var(--text-faint); }
.table-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; color: var(--text-dim); font-size: 12.5px; }
.empty-state { padding: 28px 20px; color: var(--text-dim); text-align: center; }
.head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 18px 20px; }
.head .mono-badge { width: 52px; height: 52px; border-radius: 12px; background: var(--tint); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: 0 0 52px; }
.head h1 { margin: 0 0 2px; font-size: 20px; color: var(--text); font-weight: 800; text-wrap: balance; }
.head .meta { color: var(--text-dim); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.head .pills { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-top: 1px solid var(--rule-soft); overflow-x: auto; }
.tabs a { padding: 12px; color: var(--text-dim); font-weight: 700; font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a[aria-current='page'] { color: var(--navy); border-bottom-color: var(--navy); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
dl.kv dt { color: var(--text-dim); } dl.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; } dl.kv dd.empty { color: var(--text-faint); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); font-size: 13.5px; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--text-dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.feed .who2 { color: var(--text-dim); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--text-dim); font-size: 11px; } .chart .grid-l { stroke: var(--rule-soft); }
.chart .bar { fill: var(--navy); } .chart .bar.cur { fill: var(--muted); } .chart .val { fill: var(--text); font-size: 11px; font-weight: 700; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 6px 10px; background: var(--surface); }
.loading { color: var(--text-dim); padding: 28px 0; }
.errbox { margin-top: 22px; padding: 14px 18px; border-radius: var(--r-sm); background: var(--bad-bg); color: var(--bad-t); }
.toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: min(420px, calc(100vw - 32px)); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow); background: var(--surface); z-index: 50; }
.toast.good { color: var(--ok); } .toast.bad { color: var(--bad-t); }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { position: static; width: auto; height: auto; flex: none; }
  .logo { padding: 14px 16px; }
  .menu { flex-direction: row; overflow-x: auto; padding: 0 8px 8px; gap: 0; }
  .menu-group { display: contents; }
  .menu .lbl { display: none; }
  .menu a { border-radius: 0; border-bottom: 3px solid transparent; padding: 10px 12px; white-space: nowrap; }
  .menu a[aria-current='page'] { background: rgba(255, 255, 255, .1); box-shadow: none; border-bottom-color: #3fb8ff; }
  .menu a[aria-current='page']::before { content: none; }
  .side-bottom { flex-direction: row; align-items: center; gap: 10px; padding: 8px 16px; }
  .op { flex: 1; min-width: 0; padding: 6px 8px; }
  .op-i { width: 32px; height: 32px; flex-basis: 32px; font-size: 13px; }
  .op-out { width: auto; min-height: 40px; padding: 0 14px; }
  .view { padding: 0 16px 40px; }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
  .feed li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── carried over from the first cockpit (fe3af5c); restyled through the aliases in :root ──
   The old stylesheet styled every <input> and <button> globally. Those rules now apply only
   inside the components that were carried over — panels (trial, create-company), the confirm
   dialog, and the .legacy wrapper the ticket and enquiry screens render into — so they cannot
   restyle the new chrome (.btn, .chip, the sidebar, the search box). */
:is(.legacy, .panel, .ops-confirm) input:not([type='checkbox']):not([type='radio']) {
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; width: 100%;
}
:is(.legacy, .panel, .ops-confirm) input:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
:is(.legacy, .panel, .ops-confirm) button:not(.btn):not(.chip) {
  font: inherit; font-weight: 600; margin-top: 14px; padding: 11px 14px; border: none;
  border-radius: 8px; background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
:is(.legacy, .panel, .ops-confirm) button:not(.btn):not(.chip):hover:not(:disabled) { filter: brightness(1.08); }
:is(.legacy, .panel, .ops-confirm) button:not(.btn):not(.chip):disabled { opacity: 0.55; cursor: progress; }
:is(.legacy, .panel, .ops-confirm) button.secondary { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); }
/* The „Adaugă o companie" toggle (create-company.js) sits in the page's top bar. */
.top .actions > button.secondary {
  border: 1px solid var(--rule); background: var(--surface); color: var(--text); border-radius: var(--r-sm);
  padding: 7px 13px; font-weight: 700; font-size: 13px;
}
.top .actions > .panel { flex-basis: 100%; }

.note {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-dim);
}

.msg {
  margin: 0;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  border: 1px solid;
}
.msg[hidden] {
  display: none;
}
.msg.bad {
  background: var(--bad-soft);
  border-color: var(--bad-line);
  color: var(--bad);
}
.msg.good {
  background: var(--good-soft);
  border-color: var(--good-line);
  color: var(--good);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.toggle input {
  width: auto;
  accent-color: var(--accent);
  cursor: pointer;
}

#accounts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


/* The honesty notes. Small, always present, never dismissible — the numbers
   they qualify are the ones an operator is most likely to over-read. */
.fine {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fine p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-dim);
  max-width: 78ch;
}
.fine strong {
  color: var(--ink);
  font-weight: 600;
}


.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--lift);
  padding: 16px 20px 18px;
}
.panel h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 650;
}
.panel-note {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-dim);
  max-width: 78ch;
}
/* The blocking checklist earns colour only when something is actually wrong. */
.panel.stop {
  border-color: var(--bad-line-strong);
}
.panel.stop h4 {
  color: var(--bad);
}
.panel.good h4 {
  color: var(--good);
}

.check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.check li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.tick {
  width: 1em;
  flex: none;
  font-weight: 700;
}
.check li.ok .tick {
  color: var(--good);
}
.check li.missing .tick {
  color: var(--bad);
}
.check li.off .tick,
.check li.off .check-l {
  color: var(--ink-dim);
}
.check-v {
  color: var(--ink-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 7px;
}
.check-cost {
  color: var(--bad);
  font-size: 12.5px;
  flex-basis: 100%;
  padding-left: calc(1em + 9px);
}

.ident-list {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  font-size: 13.5px;
}
.ident-list dt {
  color: var(--ink-dim);
  font-size: 12.5px;
}
.ident-list dd {
  margin: 0;
}
.ident-list dd.empty {
  color: var(--ink-dim);
  font-style: italic;
}

.cert {
  display: block;
  font-size: 12px;
  white-space: nowrap;
}
.cert.expired {
  color: var(--bad);
}


/* ---------------------------------------------------------------------------
 * Adding a customer — the first thing in this panel that writes anything.
 * ------------------------------------------------------------------------- */

.maker[hidden] {
  display: none;
}
.maker-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
  margin-top: 4px;
}
.maker-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.maker-field label {
  margin-top: 0;
}
.maker-help {
  font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.45;
}
.maker-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.maker-actions button {
  margin-top: 0;
}
.maker .msg {
  grid-column: 1 / -1;
  margin: 0;
}

/* The invitation link. Deliberately loud: it exists once and there is no
   second copy anywhere, so it must not look like an incidental detail. */
.invite-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--accent-wash);
  border: 1px solid var(--accent);
  border-radius: 9px;
  flex-wrap: wrap;
}
.invite-link code {
  flex: 1 1 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  word-break: break-all;
  user-select: all;
  color: var(--ink);
}
.invite-link button {
  margin-top: 0;
  flex: none;
}

/* ---------------------------------------------------------------------------
 * Support tickets.
 *
 * ⚠ The one screen here that shows customer-written content. Everywhere else
 * the panel shows shapes; a ticket cannot be answered unseen.
 * ------------------------------------------------------------------------- */

#step-support {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#step-support[hidden] {
  display: none;
}
#support-list,
#support-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 0;
  padding: 12px 16px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--lift);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.ticket-row:hover {
  border-color: var(--accent);
  filter: none;
}
/* Waiting on us reads at a glance; answered does not compete with it. */
.ticket-row.waiting {
  border-left: 3px solid var(--bad);
}
.ticket-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-dim);
  flex: none;
}
.ticket-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ticket-subject {
  font-weight: 600;
}
.ticket-who {
  font-size: 12px;
  color: var(--ink-dim);
}
.ticket-state {
  font-size: 11.5px;
  font-weight: 650;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.ticket-state.open {
  color: var(--bad);
  border-color: var(--bad-line);
  background: var(--bad-soft);
}
.ticket-when {
  font-size: 12px;
  color: var(--ink-dim);
  white-space: nowrap;
}

.tmsg {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--sunken);
  margin-bottom: 8px;
}
.tmsg.ours {
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
}
.tmsg-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.tmsg-when {
  color: var(--ink-dim);
}
.tmsg-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  /* A person typed this with line breaks; keep them. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tmsg-file {
  display: inline-block;
  margin: 6px 10px 0 0;
  font-size: 12.5px;
  color: var(--accent);
}

.ticket-reply {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ticket-reply textarea {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  resize: vertical;
}
.ticket-reply textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.ops-confirm {
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--lift);
  padding: 0;
}
.ops-confirm::backdrop {
  background: rgba(17, 24, 39, 0.45);
}
.ops-confirm form {
  padding: 20px;
}
.ops-confirm h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
}
.ops-confirm p {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.5;
}


/* The third live box carries a second line the other two do not. */
.live-x {
  font-size: 12px;
  color: var(--ink-dim);
}
.live-box.cold .live-x {
  color: var(--warn);
}
/* Already past, not merely close. Paints the date itself, like .cold does. */
.live-box.gone .live-v,
.live-box.gone .live-x {
  color: var(--bad);
}

.trial-state {
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.trial-date {
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.trial-left {
  font-size: 12.5px;
  color: var(--ink-dim);
}
.trial-gone {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--bad);
}

/*
 * A warning inside a panel, for the two things the trial controls cannot do
 * anything about: a missing date means free forever, and changing the default
 * period does not touch a word of vtpgo.ro. Loud enough to be read, quiet
 * enough not to look like an error the operator caused.
 */
.panel-warn {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 78ch;
}
.panel-warn strong {
  font-weight: 700;
}
.maker .panel-warn {
  grid-column: 1 / -1;
}

/* ---------------------------------------------------------------------------
 * Solicitări — enquiries from the public site.
 *
 * ⚠ Like the ticket screen, this shows what a person wrote. Unlike it, that
 * person is not a customer: they filled in a form and left their name, their
 * firm and their address so someone would ring back. There is no `ip` here and
 * there must not be — the service never sends it.
 * ------------------------------------------------------------------------- */

#step-enquiries {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#step-enquiries[hidden] {
  display: none;
}
#enquiries-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.enq {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bad);
  border-radius: 10px;
  box-shadow: var(--lift);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Handled ones stay visible when the toggle is on, and stop competing. */
.enq.done {
  border-left-color: var(--line);
  background: var(--sunken);
}

.enq-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.enq-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-dim);
  flex: none;
}
.enq-who {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.enq-co {
  font-size: 12.5px;
  color: var(--ink-dim);
}

.enq-meta {
  display: flex;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-dim);
}
/* The reply is the point of the screen, so the address is the one link. */
.enq-mail {
  color: var(--accent);
  font-weight: 600;
  word-break: break-all;
}
.enq-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--line);
  font-size: 11.5px;
}

.enq-msg {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--sunken);
  font-size: 13.5px;
  line-height: 1.55;
  /* A person typed this with line breaks; keep them. Same rule as a ticket. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.enq.done .enq-msg {
  background: var(--panel);
}

.enq-foot {
  margin: 0;
  font-size: 12px;
  color: var(--ink-dim);
}
.enq .maker-actions {
  justify-content: flex-start;
}
.enq .msg {
  margin: 0;
}


/* ── Firme, 2026-10-08 (direction B): the health strip, „De rezolvat" as a work list, the problem edge on rows ── */
.health { margin: 0 0 16px; }
.todo-box { margin-bottom: 16px; }
.todo { list-style: none; margin: 0; padding: 4px 0; }
.todo li { display: grid; grid-template-columns: 8px minmax(190px, 1.1fr) minmax(170px, 1fr) minmax(240px, 2fr) auto; gap: 14px; align-items: center;
  padding: 9px 20px; border-top: 1px solid var(--rule-soft); }
.todo li:first-child { border-top: 0; }
.todo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); }
.todo .bad .dot { background: var(--bad-t); } .todo .warn .dot { background: var(--warn-t); }
.todo .what b { font-size: 13px; color: var(--text); }
.todo .what em { font-style: normal; color: var(--text-dim); font-weight: 600; font-size: 12.5px; margin-left: 6px; }
.todo .who { color: var(--text); font-weight: 700; text-decoration: none; } .todo .who:hover { text-decoration: underline; }
.todo .fix { color: var(--text-dim); font-size: 12.5px; }
.todo.no-firm li { grid-template-columns: 8px minmax(200px, 1fr) minmax(260px, 2.4fr) auto; }
.btn.sm { padding: 4px 10px; font-size: 12px; color: var(--navy); }
.todo-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--rule-soft); background: var(--sunken); color: var(--navy);
  font: inherit; font-weight: 700; font-size: 13px; padding: 10px; cursor: pointer; border-radius: 0 0 var(--r) var(--r); }
@media (max-width: 900px) {
  .todo li { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 16px; }
  .todo .dot { grid-row: 1; } .todo .what { grid-column: 2; } .todo li .btn { grid-column: 3; grid-row: 1; }
  .todo .who, .todo .fix { grid-column: 2 / 4; }
}
table.data tr.edge-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad-t); }
table.data tr.edge-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn-t); }
.probs { font-weight: 700; font-size: 12.5px; white-space: nowrap; } .probs.bad { color: var(--bad-t); } .probs.warn { color: var(--warn-t); }
.gate { margin: 0 0 12px; font-size: 13.5px; }

/* 2026-09-28 — the manual status switch on Facturare */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.seg button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: var(--r-sm); padding: 7px 12px; font: inherit; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg button:disabled { opacity: .55; cursor: default; }
.err-t { color: var(--bad-t); }
