/* EasySurvey admin console, "Admin Console v3" (direction "Segnale").
 *
 * Paper background, white cards, one black band that answers "is anything
 * wrong?". Colour only where it means something: the five signals (ok,
 * attention, critical, in progress, neutral), lime for live, and the fixed
 * tenant palette in charts.js. Bricolage Grotesque for numbers and titles,
 * Geist for text, Geist Mono for IDs and amounts. Fonts are served from fonts/.
 */

/* ── Fonts ── */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/geist-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/geist-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/geist-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/geist-sans-latin-700-normal.woff2) format('woff2'); }

@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/geist-mono-latin-ext-400-normal.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;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/geist-mono-latin-400-normal.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: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/geist-mono-latin-ext-500-normal.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;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/geist-mono-latin-500-normal.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: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-ext-700-normal.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;
}
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-700-normal.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: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-ext-800-normal.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;
}
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-800-normal.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;
}

/* ── Tokens ── */

:root {
  --ink: #0E0E10;
  --ink-2: #4A4B50;
  --ink-3: #76777C;
  --faint: #A3A3A0;
  --paper: #F2F1EC;
  --surface: #FFFFFF;
  --soft: #F8F7F3;
  --line: #ECEBE5;
  --line-2: #E2E0D8;
  --line-3: #CFCDC4;

  --on-dark: #FFFFFF;
  --on-dark-2: #BDBDC1;
  --on-dark-3: #A9A9AD;
  --on-dark-4: #7E7E83;
  --on-dark-label: #8E8E93;
  --dark-line: rgba(255, 255, 255, .12);
  --dark-border: rgba(255, 255, 255, .22);

  --ok: #16A34A;      --ok-bg: #E3F5E8;
  --warn: #F5A524;    --warn-text: #C26A00;  --warn-bg: #FDF0D9;
  --crit: #E5372B;    --crit-bg: #FDE7E4;    --coral: #FF7A6E;
  --run: #2F6BFF;     --run-bg: #E6EDFF;     --run-hl: #DCE7FF;
  --neutral: #76777C; --neutral-bg: #ECEBE5;
  --live: #C8F25A;

  --display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius-card: 24px;
  --shadow-window: 0 30px 80px rgba(14, 14, 16, .16);
}

/* ── Base ── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--run); outline-offset: 2px; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 0; }
.muted { color: var(--ink-3); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.dim { color: var(--ink-3); }
.strong { font-weight: 600; }
.t-ink { color: var(--ink); }
.t-crit { color: var(--crit) !important; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.span-all { grid-column: 1 / -1; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

.only-narrow, .only-narrow-flex, .only-narrow-block { display: none; }

.icon { flex: none; vertical-align: -2px; }
.is-spinning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 14px; height: 14px; flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .7s linear infinite;
}

/* ── Buttons ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 19px; border: 0;
  font: 600 14px var(--sans);
  white-space: nowrap; text-decoration: none;
  background: var(--soft); color: var(--ink);
  transition: background-color .15s, color .15s, border-color .15s, opacity .15s;
}
.btn:disabled { cursor: not-allowed; }
.btn.is-loading { cursor: progress; opacity: .85; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #26272B; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover:not(:disabled) { background: #ECEBE5; }
.btn-ghost-dark { background: transparent; color: #fff; border: 1px solid var(--dark-border); }
.btn-ghost-dark:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.btn-dim { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-dim:hover:not(:disabled) { background: rgba(255, 255, 255, .16); }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line-3); }
.btn-outline:hover:not(:disabled) { border-color: var(--ink); }
.btn-soft { background: var(--line); color: var(--ink); }
.btn-soft:hover:not(:disabled) { background: var(--line-2); }
.btn-text { background: transparent; color: var(--ink-2); }
.btn-text:hover:not(:disabled) { color: var(--ink); background: var(--soft); }
.btn-danger { background: var(--crit); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #C92D22; }
.btn-danger:disabled { background: #F5B5AF; color: #fff; }
.btn-danger-soft { background: var(--crit-bg); color: var(--crit); }
.btn-danger-soft:hover:not(:disabled) { background: #FAD3CE; }
.btn-primary:disabled { opacity: .45; }
.btn-sm { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; gap: 6px; }
.btn-xl { height: 48px; border-radius: 24px; }
.btn-block { width: 100%; }

.btn-round {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; padding: 0;
  border-radius: 50%;
  border: 1px solid var(--dark-border);
  background: transparent; color: #fff;
}
.btn-round:hover { background: rgba(255, 255, 255, .08); }
.btn-round-light { width: 46px; height: 46px; background: #fff; color: var(--ink); border-color: var(--line-3); }
.btn-round-light:hover { background: var(--soft); }
.btn-round-dark { width: 42px; height: 42px; }
.btn-round .spinner { width: 13px; height: 13px; }

.btn-close {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  background: #fff; color: var(--ink);
}
.btn-close:hover { border-color: var(--ink); }

.copy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none;
  min-width: 26px; height: 26px; padding: 0 6px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-3);
}
.copy-btn:hover { background: var(--line); color: var(--ink); }
.copy-btn-label { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ── Signal chips: one language for every state ── */

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px 0 7px;
  border-radius: 12px;
  font-size: 12.5px; font-weight: 600; line-height: 1;
  white-space: nowrap; width: max-content;
}
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn-text); }
.chip-crit { background: var(--crit-bg); color: var(--crit); }
.chip-run { background: var(--run-bg); color: var(--run); }
.chip-neutral { background: var(--neutral-bg); color: var(--neutral); }

/* Icon in colour, text in ink: inside rows and lines. */
.sig { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.sig-ok .icon { color: var(--ok); }
.sig-warn .icon { color: var(--warn); }
.sig-crit .icon { color: var(--crit); }
.sig-run .icon { color: var(--run); }
.sig-neutral .icon { color: var(--neutral); }
a.sig:hover { text-decoration: underline; }

.badge-primary {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 7px;
  border-radius: 9px;
  background: var(--ink); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  flex: none;
}

.badge-test {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 7px;
  border-radius: 9px;
  background: var(--neutral-bg); color: var(--neutral);
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  flex: none;
}

/* ── Login ── */

.login {
  display: grid; grid-template-columns: 1.1fr 1fr;
  min-height: 100vh; min-height: 100dvh;
  background: #fff;
}
.login-art {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 48px;
  background: var(--ink); color: #fff;
  overflow: hidden;
}
.login-claim {
  font-family: var(--display); font-size: clamp(44px, 5.6vw, 80px); font-weight: 800;
  letter-spacing: -.055em; line-height: .88;
}
.login-claim-end { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.login-spark { display: inline-block; flex: none; width: auto; height: .75em; }
.login-foot { font-size: 13px; color: var(--on-dark-label); }
.login-side { display: flex; align-items: center; justify-content: center; padding: 48px clamp(24px, 7vw, 100px); }
.login-form { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 486px; }
.login-form .brand-on-light { display: none; }
.login-title { font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.logo-tile {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: #fff; color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 16px; line-height: 1;
}
.login-art .logo-tile { width: 32px; height: 32px; border-radius: 10px; font-size: 17px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.login-art .brand-name { font-size: 18px; }
.brand-tag { font-family: var(--mono); font-size: 11px; color: var(--on-dark-3); padding: 2px 7px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; }
.brand-on-light .logo-tile { background: var(--ink); color: #fff; }

/* ── Fields ── */

.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; min-width: 0; }
.field-label .opt { font-weight: 600; }
.input, .select {
  width: 100%; height: 44px; padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--soft);
  font-size: 14.5px; font-weight: 400;
  outline: none;
  transition: border-color .15s, background-color .15s;
}
.input.mono { font-size: 13.5px; }
.input.input-code { letter-spacing: .32em; font-variant-numeric: tabular-nums; }
.input:hover, .select:hover { border-color: var(--line-2); }
.input:focus, .select:focus { border-color: var(--ink); background: var(--soft); }
.input:disabled { color: var(--faint); }
.input.is-invalid { border-color: var(--crit); }
.input::placeholder { color: var(--faint); }
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2376777C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type=date].input { font-family: var(--sans); }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.hint { font-size: 12.5px; color: var(--ink-3); font-weight: 400; line-height: 1.4; }
.field-error { font-size: 12.5px; color: var(--crit); font-weight: 500; }

.note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.note .icon { margin-top: 2px; }
.note-warn { background: var(--warn-bg); color: #6B3D00; }
.note-warn .icon { color: var(--warn-text); }

/* ── Top bar ── */

.topbar {
  display: flex; align-items: center; gap: 18px;
  height: 64px; padding: 0 32px;
  background: var(--ink); color: #fff;
}
.crumb { display: block; font-size: 14px; color: var(--on-dark-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb::before { content: '/'; color: #55565B; font-size: 16px; margin: 0 18px 0 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.vat-switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--on-dark-3); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 18px; background: var(--line); flex: none; }
.seg button {
  height: 28px; padding: 0 12px;
  border: 0; border-radius: 14px;
  background: transparent; color: var(--ink-3);
  font-size: 13px; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg-dark { background: rgba(255, 255, 255, .08); }
.seg-dark button { color: var(--on-dark-3); }
.seg-dark button:hover { color: #fff; }
.seg-dark button.is-on { color: var(--ink); box-shadow: none; }

.live {
  display: flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 6px 0 12px;
  border: 0; border-radius: 17px;
  background: rgba(255, 255, 255, .08); color: #fff;
  font-size: 13px;
}
.live:hover { background: rgba(255, 255, 255, .12); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--on-dark-4); flex: none; }
.live.is-on .live-dot { background: var(--live); box-shadow: 0 0 0 4px rgba(200, 242, 90, .2); }
.live-meta { font-family: var(--mono); font-size: 11.5px; color: var(--on-dark-3); min-width: 3ch; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, .18); flex: none; transition: background-color .15s; }
.switch-knob { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.live.is-on .switch { background: var(--live); }
.live.is-on .switch-knob { transform: translateX(16px); background: var(--ink); }

.topbar-user { font-size: 13px; color: var(--on-dark-3); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user:empty { display: none; }
.btn-logout {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 0; border-radius: 17px;
  background: transparent; color: #C9C9CC;
  font: 500 13px var(--sans);
}
.btn-logout:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* ── Overview band ── */

.band {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px;
  padding: 40px 40px 36px;
  background: var(--ink); color: #fff;
}
.band-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.band-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.band-date { font-size: 13.5px; color: var(--on-dark-3); }
.band-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.headline-wrap { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.headline {
  font-family: var(--display); font-size: 64px; font-weight: 800;
  letter-spacing: -.045em; line-height: .95;
  text-wrap: balance;
}
.headline .hl { color: var(--coral); }
.headline-sub { font-size: 14px; color: var(--on-dark-3); margin-top: -12px; }
.headline-wrap .btn { align-self: flex-start; }

.att-list { display: flex; flex-direction: column; border-top: 1px solid var(--dark-line); }
.att-row {
  display: grid; grid-template-columns: 36px minmax(0, 300px) minmax(0, 1fr) 90px auto;
  align-items: center; gap: 16px;
  padding: 13px 0;
  border: 0; border-bottom: 1px solid var(--dark-line);
  background: transparent; color: #fff;
  text-align: left; width: 100%;
}
.att-row:hover .att-action { text-decoration: underline; }
.att-row:hover { background: rgba(255, 255, 255, .03); }
.att-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.att-crit { background: var(--crit); color: #fff; }
.att-warn { background: var(--warn); color: var(--ink); }
.att-subject { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-text { font-size: 14px; color: var(--on-dark-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-age { font-size: 12.5px; color: var(--on-dark-4); text-align: right; white-space: nowrap; }
.att-action { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; white-space: nowrap; justify-self: end; }
.att-chevron { display: none; color: var(--on-dark-3); }

.band-side { display: flex; flex-direction: column; justify-content: center; gap: 16px; min-width: 0; }
.band-side:empty { display: none; }
.pulse { display: flex; align-items: center; gap: 22px; padding: 22px; border-radius: 24px; background: rgba(255, 255, 255, .06); }
.ring-box { position: relative; flex: none; display: grid; place-items: center; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-value { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ring-unit { font-size: 11.5px; color: var(--on-dark-3); margin-top: 2px; }
.pulse-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pulse-title { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.pulse-text { font-size: 12.5px; color: var(--on-dark-3); line-height: 1.5; }
.pulse-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pulse-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px; border-radius: 20px; border: 0;
  background: rgba(255, 255, 255, .06); color: #fff;
  text-align: left; min-width: 0;
}
button.pulse-tile:hover { background: rgba(255, 255, 255, .1); }
.pulse-tile.is-alarm { background: rgba(229, 55, 43, .16); }
.pulse-tile.is-alarm:hover { background: rgba(229, 55, 43, .24); }
.pulse-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); }
.pulse-tile.is-alarm .pulse-label, .pulse-tile.is-alarm .pulse-num { color: var(--coral); }
.pulse-num { font-family: var(--display); font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.pulse-note { font-size: 12.5px; color: var(--on-dark-3); line-height: 1.4; }

.skeleton-dark { display: flex; flex-direction: column; gap: 14px; }
.skeleton-dark span { display: block; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .08); animation: pulse-bg 1.4s ease-in-out infinite; }
.skeleton-dark span:nth-child(1) { width: 78%; }
.skeleton-dark span:nth-child(2) { width: 52%; }
.skeleton-dark span:nth-child(3) { width: 100%; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .06); }
@keyframes pulse-bg { 50% { opacity: .55; } }

/* ── Page and cards ── */

.page { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 40px; max-width: 1440px; margin: 0 auto; }
#overviewView, #tenantView { min-width: 0; }

.tabs {
  position: sticky; top: 12px; z-index: 20;
  display: flex; gap: 6px; padding: 5px;
  border-radius: 22px; background: #fff;
  width: max-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
  box-shadow: 0 0 0 1px rgba(14, 14, 16, .02), 0 8px 24px rgba(14, 14, 16, .06);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs:empty { display: none; }
.tab {
  display: flex; align-items: center; gap: 7px; flex: none;
  height: 34px; padding: 0 16px;
  border: 0; border-radius: 17px;
  background: transparent; color: var(--ink-2);
  font-size: 13.5px; white-space: nowrap;
}
.tab:hover { color: var(--ink); background: var(--soft); }
.tab.is-on { background: var(--ink); color: #fff; font-weight: 600; }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.sec { scroll-margin-top: 72px; }

.card { display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: var(--radius-card); background: #fff; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.card-head > div:first-child { min-width: 0; }
.card-title { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.card-sub { margin-top: 4px; font-size: 13.5px; color: var(--ink-3); max-width: 560px; }
.card-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-tools:empty { display: none; }

.grid-costs { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.state-text { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.state-text.pad { padding: 8px 0; }
.state-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 4px 0; }
.state-card .btn-block { max-width: 360px; }
.state-title { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.state-row { display: flex; gap: 12px; align-items: flex-start; }
.state-row .state-text { color: var(--ink-2); }
.state-row b { color: var(--ink); }
.state-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; }
.state-icon.is-crit { background: var(--crit); color: #fff; }
.state-inline { display: flex; flex-direction: column; gap: 18px; }
.empty-bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.empty-bars span { flex: 1; height: 30%; border-radius: 4px; border: 1.5px dashed var(--line-3); }
.hatched {
  display: grid; place-items: center;
  min-height: 70px; padding: 12px;
  border-radius: 14px;
  background: repeating-linear-gradient(135deg, var(--soft) 0 10px, var(--line) 10px 11px);
  font-size: 13px; color: var(--ink-3); text-align: center;
}
.loading { display: flex; align-items: center; gap: 10px; padding: 18px 0; color: var(--ink-3); }

/* ── Overview: costs ── */

.card-now { justify-content: space-between; position: relative; }
.sentence {
  font-family: var(--display); font-size: 40px; font-weight: 700;
  letter-spacing: -.035em; line-height: 1.12;
  text-wrap: pretty;
}
.sentence mark { background: linear-gradient(transparent 62%, var(--run-hl) 62%); color: inherit; }
.sentence mark.warm { background: linear-gradient(transparent 62%, #FFE2D3 62%); }
.sentence .spark { vertical-align: -.08em; height: .95em; width: auto; }
.sentence-md { font-size: 38px; max-width: 1000px; }
.sentence-sm { font-size: 26px; letter-spacing: -.03em; line-height: 1.15; }
.sentence-sm .spark { height: .9em; }
.vat-mobile { display: none; }

.mbars-wrap { display: flex; flex-direction: column; gap: 6px; }
.mbars { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.mbar { flex: 1; min-width: 0; height: 4px; padding: 0; border: 0; border-radius: 5px; background: var(--line-2); transition: background-color .15s, box-shadow .15s; }
button.mbar:hover { background: var(--line-3); }
.mbar.is-last { background: var(--ink); }
.mbar.is-current { background: var(--run); }
.mbar.is-empty { height: 30% !important; background: transparent; border: 1.5px dashed var(--line-2); }
.mbar.is-selected:not(.is-last) { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.mbars-labels { display: flex; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.mbars-labels span { flex: 1; text-align: center; min-width: 0; overflow: hidden; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.facts b { color: var(--ink); font-weight: 500; }

.where-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.where-total { font-size: 13px; }
.where-strip { display: flex; height: 64px; gap: 3px; border-radius: 16px; overflow: hidden; }
.where-block { display: flex; flex-direction: column; justify-content: flex-end; flex-basis: 0; min-width: 6px; padding: 8px 10px; color: var(--ink); }
.where-block.is-dark { color: #fff; }
.where-block span { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; font-size: 13.5px; }
.where-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.where-row span:first-child { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where-row .mono { font-size: 12.5px; }

/* ── Charts ── */

.chart-box { position: relative; min-width: 0; }
.chart-plot { position: relative; width: 100%; }
.chart-plot svg { display: block; overflow: visible; }
.chart-tick { font-family: var(--mono); font-size: 11.5px; fill: var(--ink-3); }
.chart-label { font-size: 14px; fill: var(--ink-2); }
.chart-label.is-selected { fill: var(--ink); font-weight: 600; }
.chart-value { font-family: var(--mono); font-size: 13px; fill: var(--ink-2); font-weight: 500; }
.chart-value.is-selected { fill: var(--ink); font-size: 15.5px; } /* Geist Mono is self-hosted at 400/500 only: no synthetic bold */
.chart-side { font-size: 14.5px; fill: var(--ink); font-weight: 500; }
.chart-lg .chart-tick { font-size: 13.5px; }
.chart-lg .chart-label { font-size: 16px; }
.chart-lg .chart-value { font-size: 14.5px; }
.chart-lg .chart-value.is-selected { font-size: 18px; }
.chart-lg .chart-side { font-size: 16.5px; }
.chart-col { outline: none; }
.chart-col:focus-visible .chart-seg { stroke: var(--ink); stroke-width: 1.5; }
.chart-seg { transition: opacity .12s; }
.chart-seg.is-hover { opacity: .78; }
.chart-legend-host:empty { display: none; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.chart-legend-dot.is-hatched { background: repeating-linear-gradient(45deg, var(--c) 0 2px, #fff 2px 4px); }
.chart-empty { font-size: 13.5px; color: var(--ink-3); }
.chart-tooltip {
  position: fixed; z-index: 200; display: none;
  padding: 7px 12px; border-radius: 14px;
  background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: 12px;
  pointer-events: none; max-width: 320px;
  box-shadow: 0 10px 30px rgba(14, 14, 16, .25);
}
.chart-tooltip-title { color: var(--on-dark-3); margin-bottom: 3px; }
.chart-tooltip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.chart-tooltip-key { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chart-tooltip-label { color: #DADADD; }
.chart-tooltip strong { font-weight: 500; margin-left: auto; padding-left: 8px; }
.spark { display: inline-block; flex: none; }
.ring { display: block; }

.table-x { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { padding: 10px 12px; text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table .num { text-align: right; }
.table td.mono { font-size: 12.5px; }
.table tfoot td { font-weight: 600; border-bottom: 0; }

/* ── Overview: tenant table ── */

.search {
  display: flex; align-items: center; gap: 8px;
  height: 40px; width: 250px; padding: 0 14px;
  border-radius: 20px; background: var(--soft);
  color: var(--ink-3);
  border: 1.5px solid transparent;
}
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13.5px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }

.ttable { display: flex; flex-direction: column; margin: 0 -12px; }
.thead-row, .trow {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 120px 110px 112px minmax(0, 1.5fr) 150px 92px 116px 20px;
  align-items: center; gap: 14px;
}
.thead-row { padding: 0 12px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.thead-row .num { text-align: right; }
.trow {
  padding: 12px;
  border-top: 1px solid var(--line);
  border-radius: 16px;
  font-size: 14px; cursor: pointer;
  transition: background-color .12s;
}
.trow:hover { background: var(--soft); }
.trow:focus-visible { outline-offset: -2px; }
.trow.is-error { background: var(--crit-bg); border-top-color: transparent; }
.trow.is-error + .trow { border-top-color: transparent; }
.trow.is-error .chip { background: transparent; padding-left: 0; }
.trow > span { min-width: 0; }
.trow .num { text-align: right; }
.tcell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tbar { width: 5px; height: 36px; border-radius: 3px; flex: none; }
.tname-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tname { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; min-width: 0; }
.tid { font-family: var(--mono); font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-note { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.minibars { display: flex; align-items: flex-end; justify-content: flex-end; gap: 2px; height: 26px; }
.minibars span { width: 9px; border-radius: 2px; }
.now { display: inline-flex; flex-direction: column; align-items: stretch; gap: 5px; width: 100%; }
.now .mono { font-size: 13px; }
.now-track { display: flex; justify-content: flex-end; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.now-track span { display: block; height: 100%; border-radius: 2px; }
.col-last.mono, .trow .mono { font-size: 13px; }
.chev { color: var(--ink-3); display: grid; place-items: center; }

.mlist { display: none; flex-direction: column; }
.mrow {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px;
  border: 0; border-radius: 16px;
  background: transparent; text-align: left; width: 100%;
}
.mrow:hover { background: var(--soft); }
.mrow.is-error { background: var(--crit-bg); }
.mrow .tbar { height: 30px; }
.mrow-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mrow-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-meta { font-size: 11px; color: var(--ink-3); }

.tags-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 13.5px; color: var(--ink-2); }
.tags-line:empty { display: none; }
.tags-line .sig { color: var(--ink-2); }
.tags-label { color: var(--ink-3); }

/* ── Overview: shared infrastructure and metrics ── */

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric {
  position: relative; display: flex; flex-direction: column;
  padding: 20px 20px 0;
  border-radius: 22px; background: var(--soft);
  overflow: hidden; min-width: 0; min-height: 190px;
}
.metric.is-alarm { background: var(--crit-bg); }
.metric-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 24px; }
.metric-head .chip { background: #fff; }
.metric.is-alarm .metric-head .chip { background: transparent; }
.metric.is-alarm .label { color: #B3261E; }
.metric-value { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; margin-top: 4px; }
.metric.is-alarm .metric-value { color: var(--crit); }
.metric-note { font-size: 13px; color: var(--ink-2); min-height: 19px; }
.metric-area { position: relative; margin: auto -20px 0; height: 84px; }
.metric-area svg { display: block; }
.metric-area.is-empty { display: grid; place-items: center; margin: 12px 0 20px; height: 62px; border-radius: 14px; background: repeating-linear-gradient(135deg, var(--soft) 0 10px, var(--line) 10px 11px); }
.area-empty { font-size: 12.5px; color: var(--ink-3); text-align: center; padding: 0 10px; }
.metric-grid.is-refreshing { opacity: .55; transition: opacity .2s; }

/* The test server, under the shared infrastructure: state and its one action. */
.test-server { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.test-server-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.test-server .state-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) { .test-server { flex-direction: column; align-items: flex-start; } }
.metric-grid .state-card { padding: 0; }

/* ── Overview: alarms ── */

.alarm-list { display: flex; flex-direction: column; gap: 8px; }
.alarm-card {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 16px 14px 16px 14px;
  border-radius: 16px; background: var(--soft);
  scroll-margin-top: 90px;
}
.alarm-card.is-crit { background: var(--crit-bg); }
.alarm-card.is-focus { box-shadow: 0 0 0 2px var(--crit); }
.alarm-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--neutral); color: #fff; }
.alarm-card.is-crit .alarm-icon { background: var(--crit); }
.alarm-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alarm-title { font-size: 14.5px; }
.alarm-title b { font-weight: 600; }
.alarm-desc { font-size: 13.5px; color: var(--ink-2); }
.alarm-age { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.alarm-reason { margin-top: 4px; font-size: 12.5px; }
.alarm-reason summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-weight: 600; list-style: none; }
.alarm-reason summary::-webkit-details-marker { display: none; }
.alarm-reason[open] summary .icon { transform: rotate(180deg); }
.alarm-reason p { margin-top: 6px; font-size: 12px; color: var(--ink-2); word-break: break-word; }
.ok-fold { margin-top: 6px; }
.ok-fold summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-size: 14px; }
.ok-fold summary::-webkit-details-marker { display: none; }
.ok-fold summary b { font-weight: 600; }
.fold-chevron { color: var(--ink-2); transition: transform .15s; }
.ok-fold[open] .fold-chevron { transform: rotate(90deg); }
.fold-hint::after { content: 'mostra'; }
.ok-fold[open] .fold-hint::after { content: 'nascondi'; }
.ok-list { display: flex; flex-direction: column; padding: 0 14px; }
.ok-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ok-row > span:last-child { text-align: right; }

/* ── Overview: tags and billing ── */

.gov-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gov-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 18px; border-radius: 20px; background: var(--soft); min-width: 0; }
.gov-tile.is-alarm { background: var(--crit-bg); }
.gov-tile.is-alarm .label, .gov-tile.is-alarm .gov-num { color: var(--crit); }
.gov-num { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.gov-unit { font-size: 16px; color: var(--ink-3); letter-spacing: -.01em; }
.gov-tenant { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.gov-tenant:hover { text-decoration: underline; }
.gov-note { font-size: 12.5px; color: var(--ink-2); }
.gov-tile .mono.small { font-size: 12px; }
.gov-arns { font-size: 11.5px; color: var(--ink-2); word-break: break-all; line-height: 1.5; }
.gov-billing { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.gov-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.key-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; font-family: var(--mono); font-size: 12.5px; }
.key-ok { background: var(--ok-bg); }
.key-ok .icon { color: var(--ok); }
.key-warn { background: var(--warn-bg); }
.key-warn .icon { color: var(--warn-text); }
.key-crit { background: var(--crit-bg); }
.key-crit .icon { color: var(--crit); }
.gov-error { font-size: 12px; color: var(--crit); padding: 10px 12px; border-radius: 12px; background: var(--crit-bg); word-break: break-word; }

/* ── Overview: deleted environments ── */

.deleted-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px;
  padding: 18px 22px;
  border: 1.5px dashed var(--line-3); border-radius: 22px;
}
.deleted-icon { color: var(--ink-2); display: grid; place-items: center; }
.deleted-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-right: auto; }
.deleted-list { display: flex; flex-wrap: wrap; gap: 10px; }
.deleted-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 20px; background: #fff; min-width: 0; max-width: 100%; }
.deleted-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deleted-id { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }

.mobile-bar { display: none; }

/* ── Tenant detail ── */

.thero { position: relative; padding: 34px 40px 30px; background: var(--ink); color: #fff; overflow: hidden; }
.thero-circle { position: absolute; border-radius: 50%; pointer-events: none; }
.thero-circle.c1 { right: -60px; top: -80px; width: 420px; height: 420px; background: var(--tc, #2F6BFF); opacity: .9; }
.thero-circle.c2 { right: 120px; top: 120px; width: 260px; height: 260px; background: var(--tc2, rgba(255, 255, 255, .5)); opacity: .9; mix-blend-mode: screen; }
.thero-inner { position: relative; display: flex; flex-direction: column; gap: 26px; max-width: 1440px; margin: 0 auto; }
.back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13.5px; color: var(--on-dark-2); text-decoration: none; }
.back:hover { color: #fff; }
.thero-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: -12px; }
.thero-event { font-size: 12.5px; color: var(--on-dark-2); padding-left: 4px; }
.thero-event.is-error { color: #FFB0A8; }
.thero-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.thero-id { display: flex; flex-direction: column; gap: 14px; min-width: 0; flex: 1 1 520px; }
.thero-name {
  font-family: var(--display); font-size: 68px; font-weight: 800;
  letter-spacing: -.05em; line-height: .9; max-width: 820px;
  overflow-wrap: anywhere;
}
.thero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: #DADADD; min-width: 0; }
.thero-meta .sep { color: #55565B; }
.thero-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); text-decoration: none; min-width: 0; max-width: 100%; }
.thero-link:hover { color: #fff; text-decoration: underline; }
.link-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thero-actions { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.thero-actions .btn { height: 42px; border-radius: 21px; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: 50px; z-index: 30;
  display: none; flex-direction: column;
  width: 240px; padding: 6px;
  border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.menu.is-open { display: flex; }
.menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border: 0; border-radius: 12px;
  background: transparent; text-align: left; font-size: 14px;
}
.menu button:hover, .menu button:focus-visible { background: var(--soft); outline: none; }
.menu button.is-danger { color: var(--crit); }
.menu .only-narrow-flex { display: none; }

.thero-settings {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px;
  border-radius: 20px; overflow: hidden;
  background: var(--dark-line);
}
.setting { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: rgba(14, 14, 16, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); min-width: 0; }
.setting-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-label); }
.setting-value { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; min-width: 0; }
.setting-value span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setting-value.sig-ok .icon { color: #5EE08A; }
.setting-value.sig-warn .icon { color: var(--warn); }
.setting-value.sig-crit .icon { color: var(--coral); }
.setting-value.sig-neutral .icon { color: var(--on-dark-3); }
.setting-note { font-size: 12px; color: var(--on-dark-3); line-height: 1.35; }
.thero-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-dark-2); margin-top: -12px; }

.cost-sentence-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.cost-sentence { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cost-sentence .facts { padding-top: 0; border-top: 0; font-size: 13.5px; }
.cost-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.cost-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cost-side:empty { display: none; }
.breakdown { display: flex; flex-direction: column; gap: 2px; border-radius: 18px; overflow: hidden; }
.breakdown-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--soft); }
.breakdown-row .dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.breakdown-label { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breakdown-bar { display: flex; justify-content: flex-end; width: 80px; flex: none; }
.breakdown-bar span { display: block; height: 6px; border-radius: 3px; min-width: 2px; }
.breakdown-row .mono { font-size: 13px; width: 60px; text-align: right; flex: none; }

.alarm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alarm-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--soft); min-width: 0; }
.alarm-tile.is-crit { background: var(--crit-bg); }
.alarm-tile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.alarm-tile-head .chip-ok, .alarm-tile-head .chip-neutral { background: #fff; }
.alarm-tile-title { font-size: 15px; font-weight: 600; }

.svc-top { display: flex; align-items: center; gap: 24px; }
.ring-sm .ring-value { font-size: 26px; }
.svc-facts { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; min-width: 0; }
.code-chip { display: inline-block; max-width: 100%; vertical-align: bottom; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; padding: 3px 8px; border-radius: 8px; background: var(--line); }
#tvService { display: flex; flex-direction: column; gap: 12px; }
.sub-label { margin-top: 8px; }
.deploys { display: flex; flex-direction: column; gap: 6px; }
.deploy-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--soft); font-size: 13.5px; min-width: 0; }
.deploy-row.is-ok { background: var(--ok-bg); }
.deploy-row.is-crit { background: var(--crit-bg); }
.deploy-row.is-run { background: var(--run-bg); }
.deploy-row b { font-weight: 600; white-space: nowrap; }
.deploy-row .mono { font-size: 12.5px; }
.deploy-meta { margin-left: auto; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.timeline-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.timeline-list li { display: grid; grid-template-columns: 10px 70px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 4px 0; font-size: 13.5px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-3); align-self: center; }
.timeline-list li.is-first .tl-dot { background: var(--ink); border-color: var(--ink); }
.tl-time { font-size: 12px; color: var(--ink-3); }

.tag-score { display: flex; align-items: center; gap: 20px; }
.tag-num { font-family: var(--display); font-size: 48px; font-weight: 800; letter-spacing: -.05em; line-height: 1; white-space: nowrap; }
.tag-num .dim { color: var(--faint); }
.tag-bar { display: flex; gap: 4px; flex: 1; min-width: 0; }
.tag-bar span { flex: 1; height: 14px; border-radius: 4px; background: var(--ok); }
.tag-bar span.is-bad { background: var(--crit); }
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.res { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--soft); min-width: 0; }
.res.is-bad { background: var(--crit-bg); }
.res-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.res-type { font-size: 12.5px; color: var(--ink-2); }
.res-id { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.config { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.config-tile { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; border-radius: 18px; background: var(--soft); min-width: 0; }
.config-tile > .mono { font-size: 13px; min-width: 0; }
.copy-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.theme { display: flex; align-items: center; gap: 10px; min-width: 0; }
.swatches { display: flex; flex: none; }
.swatches span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--soft); }
.swatches span + span { margin-left: -8px; }
.theme .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.config-logo { margin-left: auto; height: 24px; width: auto; max-width: 64px; object-fit: contain; border-radius: 4px; }

.dns-panel { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 22px; background: var(--warn-bg); }
.dns-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.dns-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--warn); color: var(--ink); }
.dns-icon.is-ok { background: var(--ok); color: #fff; }
.dns-title { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.dns-sub { font-size: 13.5px; color: var(--ink-2); flex: 1 1 260px; min-width: 0; }
.dns-head .btn { height: 36px; border-radius: 18px; padding: 0 16px; font-size: 14px; }
.dns-records { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dns-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: #fff; min-width: 0; }
.dns-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dns-kind { font-size: 13px; color: var(--ink-3); }
.dns-kind b { color: var(--ink); font-weight: 600; }
.dns-name, .dns-value { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; cursor: copy; border-radius: 6px; }
.dns-value { color: var(--ink-2); font-size: 12px; }
.dns-name:hover, .dns-value[data-copy]:hover { background: var(--soft); }
.https-ok { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--ok-bg); font-size: 14px; font-weight: 500; }

/* ── Windows ── */

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(14, 14, 16, .4); opacity: 0; transition: opacity .18s; }
.modal.is-shown .modal-backdrop { opacity: 1; }
.window {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  border-radius: 28px; background: #fff;
  box-shadow: var(--shadow-window);
  overflow: hidden;
  opacity: 0; transform: translateY(8px) scale(.99);
  transition: opacity .18s, transform .18s;
}
.modal.is-shown .window { opacity: 1; transform: none; }
.window-sm { max-width: 480px; }
.window-md { max-width: 640px; }
.window-lg { max-width: 760px; }
.window-danger::before { content: ''; display: block; height: 6px; background: var(--crit); flex: none; }
.window-head { display: flex; align-items: center; gap: 10px; padding: 24px 28px 0; }
.window-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex: 1; min-width: 0; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.id-tag { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0; padding: 4px 9px; border-radius: 8px; background: var(--line); }
.window-body { display: flex; flex-direction: column; gap: 18px; padding: 22px 28px; overflow-y: auto; min-height: 0; }
.window-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 28px 26px; flex-wrap: wrap; }
.window-foot .btn { height: 40px; border-radius: 20px; }
.window-lead { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.window-text { font-size: 14px; color: var(--ink-2); }
.window-text:empty { display: none; }
.window-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* Operatore demo (demo.js) */
#demoBody:not(.hidden) { display: flex; flex-direction: column; gap: 16px; }
.demo-summary { display: flex; gap: 12px; align-items: center; }
.demo-summary .state-text { color: var(--ink-2); }
.demo-summary b { color: var(--ink); }
.demo-icon { background: var(--ink); color: #fff; }

.pv { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--ink); color: #fff; min-width: 0; }
.pv-avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; color: #fff; font-family: var(--display); font-weight: 700; font-size: 20px; }
.pv-logo { width: 44px; height: 44px; flex: none; border-radius: 13px; object-fit: contain; background: #fff; padding: 4px; }
.pv-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pv-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-url { font-family: var(--mono); font-size: 12px; color: var(--on-dark-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ok { color: #5EE08A; font-family: var(--sans); }
.pv-warn { color: var(--warn); font-family: var(--sans); }
.pv-tag { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-label); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid-brand { grid-template-columns: 1.2fr 1fr 1fr; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.file-drop {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 8px;
  border-radius: 12px; border: 1.5px dashed var(--line-3);
  font-size: 13px; font-weight: 400; cursor: pointer; min-width: 0;
}
.file-drop:hover { border-color: var(--ink-3); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--line); color: var(--ink-2); }
.file-thumb { width: 28px; height: 28px; flex: none; border-radius: 8px; object-fit: contain; background: var(--line); }
.file-thumb:not(.hidden) + .file-icon { display: none; }
.file-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.color-field {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 44px; padding: 0 12px 0 14px;
  border-radius: 12px; background: var(--soft);
  border: 1.5px solid transparent;
  font-size: 13.5px; font-weight: 400;
}
.color-field:focus-within { border-color: var(--ink); }
.color-field input[type=color] { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; overflow: hidden; }
.color-field input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-field input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }

/* The font of the app (font-picker.js): each name in its own font, a sample below. */
.fp { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fp-button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 44px; padding: 0 12px 0 14px;
  border-radius: 12px; border: 1.5px solid transparent; background: var(--soft);
  font-size: 15.5px; font-weight: 500; text-align: left; cursor: pointer;
  transition: border-color .15s;
}
.fp-button:hover { border-color: var(--line-2); }
.fp-button:focus-visible, .fp-button[aria-expanded=true] { outline: none; border-color: var(--ink); }
.fp-button.is-invalid { border-color: var(--crit); }
.fp-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fp-chevron { display: flex; flex: none; color: var(--ink-3); transition: transform .15s; }
.fp-button[aria-expanded=true] .fp-chevron { transform: rotate(180deg); }
.fp-list {
  max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; border-radius: 14px; background: #fff;
  border: 1.5px solid var(--line-2); box-shadow: 0 12px 30px rgba(14, 14, 16, .08);
  outline: none;
}
.fp-list:focus-visible { border-color: var(--ink); }
.fp-group { padding: 12px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.fp-option {
  display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; column-gap: 10px;
  min-height: 44px; padding: 7px 10px; border-radius: 10px;
  font-weight: 400; cursor: pointer;
}
.fp-option:hover, .fp-option.is-active { background: var(--soft); }
.fp-option.is-active { box-shadow: inset 0 0 0 1.5px var(--line-3); }
.fp-option-name { grid-column: 1; font-size: 17px; line-height: 1.25; color: var(--ink); }
.fp-option-note { grid-column: 1; font-size: 12.5px; color: var(--ink-3); }
.fp-check { grid-column: 2; grid-row: 1 / span 2; display: flex; color: var(--ink); }
.fp-sample { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1.5px dashed var(--line-3); }
.fp-sample-title { font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
.fp-sample-text { font-size: 14.5px; font-weight: 400; line-height: 1.5; color: var(--ink-2); }
.fp.is-default .fp-sample-title, .fp-option[data-value=""] .fp-option-name { font-family: var(--display); font-weight: 700; }

.match-input { position: relative; display: flex; align-items: center; }
.match-input .input { padding-right: 130px; border-color: var(--line-2); }
.match-input .input:focus { border-color: var(--ink); }
.match-input.is-match .input { border-color: var(--ink); }
.match-flag { position: absolute; right: 14px; display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); pointer-events: none; }
.match-input.is-match .match-flag { color: var(--ok); font-weight: 500; }

.id-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.id-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--soft); font-family: var(--mono); font-size: 13px; }
.id-chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.skeleton-block { display: flex; flex-direction: column; gap: 12px; }
.skeleton-block span { display: block; height: 96px; border-radius: 20px; background: var(--soft); animation: pulse-bg 1.4s ease-in-out infinite; }
.skeleton-block span:nth-child(2) { height: 22px; width: 60%; border-radius: 8px; }
.skeleton-block span:nth-child(3) { height: 120px; }
#planError { padding: 4px 0; }

#planBody { display: flex; flex-direction: column; gap: 18px; }
#planBody.hidden { display: none; }
.usage { display: flex; align-items: center; gap: 20px; padding: 18px; border-radius: 20px; background: var(--soft); }
.ring-plan .ring-value { font-size: 24px; }
.usage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; flex: 1; min-width: 0; }
.usage-stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.usage-num { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.usage-label { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.usage-foot { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-top: -6px; }
#planForm { display: flex; flex-direction: column; gap: 18px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; border: 1.5px solid var(--line); }
.plan-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-title { font-family: var(--display); font-size: 18px; font-weight: 700; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-bar { position: relative; display: flex; gap: 3px; height: 34px; border-radius: 17px; overflow: hidden; }
.tl-bar > span { min-width: 6px; }
.tl-active { display: flex; align-items: center; padding-left: 14px; background: var(--ok); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.tl-active span { overflow: hidden; text-overflow: ellipsis; }
.tl-extra { background: var(--warn); }
.tl-blocked { display: flex; align-items: center; padding-left: 14px; background: repeating-linear-gradient(45deg, var(--crit) 0 4px, #fff 4px 8px); color: var(--crit); font-size: 12.5px; font-weight: 700; }
.tl-blocked.tl-full { background: var(--crit-bg); }
.tl-full { flex: 1; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); }
.tl-labels { display: flex; gap: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; }
.tl-push { margin-left: auto; }
.input-with { position: relative; display: flex; align-items: center; }
.input-with .input { padding-right: 110px; }
.check { position: absolute; right: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.renew-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; align-items: start; }
.renew-row .btn { margin-top: 25px; height: 44px; border-radius: 22px; justify-self: start; }
.toggle-row { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--soft); cursor: pointer; transition: background-color .15s; }
.toggle-row.is-danger { background: var(--crit-bg); }
.toggle-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toggle-title { font-size: 14.5px; font-weight: 600; }
.toggle-text { font-size: 12.5px; color: var(--ink-3); }
.toggle {
  appearance: none; -webkit-appearance: none; position: relative; flex: none;
  width: 38px; height: 22px; margin: 0;
  border-radius: 11px; background: var(--line-3);
  cursor: pointer; transition: background-color .15s;
}
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle:checked { background: var(--crit); }
.toggle-ink:checked { background: var(--ink); }
/* A switch that turns a feature on, not off: green when on. */
.toggle.toggle--on:checked { background: var(--ok); }
.toggle:checked::after { transform: translateX(16px); }

/* ── Toasts ── */

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px;
  width: 380px; max-width: calc(100vw - 32px);
  padding: 12px 10px 12px 12px;
  border-radius: 18px; background: var(--ink); color: #fff;
  box-shadow: 0 16px 40px rgba(14, 14, 16, .25);
  pointer-events: auto;
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.toast.is-in { opacity: 1; transform: none; }
.toast-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; color: #fff; }
.toast-success .toast-icon { background: var(--ok); }
.toast-info .toast-icon { background: var(--run); }
.toast-warning .toast-icon { background: var(--warn-text); }
.toast-error .toast-icon { background: var(--crit); }
.toast-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; }
.toast-detail { font-size: 12.5px; color: var(--on-dark-3); overflow-wrap: anywhere; }
.toast-action { flex: none; padding: 6px 12px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px; font-weight: 600; }
.toast-action:hover { background: rgba(255, 255, 255, .2); }
.toast-close { display: grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--on-dark-4); }
.toast-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* ── Problem reports (tickets.js) ── */

.topnav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.topnav-link {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border-radius: 17px;
  color: var(--on-dark-3); text-decoration: none;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.topnav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.topnav-link.is-on { color: #fff; background: rgba(255, 255, 255, .12); font-weight: 600; }
.topnav-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  background: var(--live); color: var(--ink);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; line-height: 1;
}
.topnav-count.is-crit { background: var(--crit); color: #fff; }

.tk-hero { padding-bottom: 34px; }
.tk-hero .thero-chips { margin-bottom: -10px; }
.tk-hero-name { font-size: 60px; }
.mono-name { font-variant-numeric: tabular-nums; }
.tk-hero-title { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: #fff; max-width: 900px; overflow-wrap: anywhere; }
.tk-hero-link { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.tk-hero-link:hover { text-decoration-color: #fff; }
.tk-hero-late { color: var(--coral); font-weight: 600; }
.thero-meta .muted { color: var(--on-dark-3); }

.tk-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-select { width: auto; height: 34px; padding-left: 12px; border-radius: 17px; font-size: 13.5px; max-width: 240px; }

.tk-table .thead-row, .tk-table .trow {
  grid-template-columns: 100px minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1.3fr) 104px 186px 196px 16px;
}
.tk-table a.trow, .tk-mlist a.mrow, a.tk-mini-row, a.tk-link-row { color: inherit; text-decoration: none; }
.tk-table .trow.is-late { background: var(--crit-bg); border-top-color: transparent; }
.tk-table .trow.is-late + .trow { border-top-color: transparent; }
.tk-ref { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.tk-ref .mono { font-size: 13px; }
.tk-blocking { display: inline-grid; place-items: center; color: var(--crit); flex: none; }
.tk-title-cell { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; }
.tk-source { display: inline-grid; place-items: center; color: var(--ink-3); flex: none; }
.tk-mrow { align-items: flex-start; }
.tk-mrow.is-late { background: var(--crit-bg); }
.tk-mrow .mrow-name { display: flex; align-items: center; gap: 6px; }
.tk-mrow .mrow-meta { font-size: 12px; margin-top: 2px; }
.tk-mrow-signals { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 13px; }
.tk-mrow .chev { align-self: center; }

.tk-rel-list { display: flex; flex-direction: column; gap: 8px; }
.tk-rel { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--soft); }
.tk-rel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-rel-ref { font-size: 14px; font-weight: 600; color: var(--ink); }
.tk-rel-ref:hover { text-decoration: underline; }
.tk-rel-items { display: flex; flex-direction: column; gap: 2px; }
.tk-rel .tk-link-row { background: #fff; }

.tk-link-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; font-size: 13.5px;
}
.tk-link-row:hover { background: var(--line); }
.tk-link-row .mono { font-size: 12.5px; font-weight: 600; }
.card > .tk-link-row { margin: 0 -12px; }

.tk-summary td.num, .tk-summary th.num { font-variant-numeric: tabular-nums; }

.tk-days { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
#tkClosed > .state-text { margin-bottom: 14px; }
.tk-day { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 12px; border-radius: 17px; background: var(--soft); font-size: 13.5px; }
.tk-day .icon { color: var(--ink-3); }
.tk-day.is-past { color: var(--ink-3); }
.tk-day-remove { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); }
.tk-day-remove:hover { background: var(--line-2); color: var(--ink); }
.tk-day-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tk-day-form .field { width: 220px; }
.tk-day-form .btn { height: 44px; border-radius: 22px; }

.tk-detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.tk-main, .tk-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tk-body { font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

.tk-textarea { height: auto; min-height: 84px; padding: 12px 14px; font-family: var(--sans); line-height: 1.45; resize: vertical; }
.tk-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tk-form-foot .btn { margin-left: auto; }
.tk-note-form { display: flex; flex-direction: column; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

.tk-questions { background: var(--warn-bg); }
.tk-questions .card-sub { color: #6B3D00; }
.tk-question { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: #fff; }
.tk-question-text { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-question-text .icon { color: var(--warn-text); margin-top: 2px; }

.tk-events { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.tk-event { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tk-event:first-child { border-top: 0; }
.tk-event-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--ink-2); }
.tk-event.is-question .tk-event-icon { background: var(--warn-bg); color: var(--warn-text); }
.tk-event.is-answer .tk-event-icon, .tk-event.is-ok .tk-event-icon { background: var(--ok-bg); color: var(--ok); }
.tk-event.is-note .tk-event-icon { background: var(--run-bg); color: var(--run); }
.tk-event.is-ko .tk-event-icon { background: var(--crit-bg); color: var(--crit); }
.tk-event-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tk-event-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.tk-by { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; padding: 2px 8px; border-radius: 9px; background: var(--line); color: var(--ink-2); }
.tk-event-text { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-event-time { font-size: 12px; color: var(--ink-3); }

.tk-shot {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  background: var(--soft); cursor: zoom-in;
}
.tk-shot img { display: block; width: 100%; height: auto; }
.tk-shot-zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(14, 14, 16, .7); color: #fff; }
.tk-shot-card .btn { align-self: flex-start; }
.window-xl { max-width: 1200px; }
.tk-shot-big { padding-top: 16px; }
.tk-shot-big img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-2); }

.tk-facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 13.5px; }
.tk-facts dt { color: var(--ink-3); }
.tk-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tk-facts-mono { grid-template-columns: 120px minmax(0, 1fr); }

.tk-tech { gap: 0; }
.tk-tech-summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.tk-tech-summary::-webkit-details-marker { display: none; }
.tk-tech-summary .fold-chevron { margin-left: auto; transition: transform .15s; }
.tk-tech[open] .tk-tech-summary .fold-chevron { transform: rotate(180deg); }
.tk-tech-body { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
.tk-tech-body .label { margin-top: 6px; }
.tk-errors { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tk-errors li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--crit-bg); overflow-wrap: anywhere; }
.tk-errors .mono { font-size: 13px; }
.tk-pre { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
.tk-trace { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.tk-trace li { display: grid; grid-template-columns: 72px 78px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.tk-trace li:first-child { border-top: 0; }
.tk-trace-kind { font-size: 12.5px; font-weight: 600; }

.tk-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; }
.tk-try-link { align-self: flex-start; }
.tk-collaudo { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px; border-radius: 18px; background: var(--soft); }
.tk-collaudo-lead { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.tk-collaudo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-collaudo-actions .btn { height: 42px; border-radius: 21px; }
.tk-collaudo-line { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--soft); font-size: 14px; color: var(--ink-2); }
.tk-collaudo-line .icon { margin-top: 2px; color: var(--ink-3); }

.tk-tenant { display: flex; flex-direction: column; gap: 14px; }
.tk-mini { display: flex; flex-direction: column; margin: 0 -12px; }
.tk-mini-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 104px 186px 196px; align-items: center; gap: 14px;
  padding: 10px 12px; border-top: 1px solid var(--line); border-radius: 14px; font-size: 13.5px;
}
.tk-mini-row:first-child { border-top: 0; }
.tk-mini-row:hover { background: var(--soft); }
.tk-mini-row.is-late { background: var(--crit-bg); border-top-color: transparent; }
.tk-mini-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tk-shot-clear { align-self: flex-start; }

/* ── Responsive ── */

@media (max-width: 1320px) {
  .thead-row, .trow { grid-template-columns: minmax(0, 2.2fr) 112px 100px 104px minmax(0, 1.4fr) 92px 116px 20px; }
  .col-trend { display: none; }
  .thero-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .band { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .band-side { flex-direction: row; align-items: stretch; }
  .band-side .pulse { flex: 1.3; }
  .band-side .pulse-tiles { flex: 1; }
  .headline { font-size: 56px; }
  .thead-row, .trow { grid-template-columns: minmax(0, 2fr) 112px 100px minmax(0, 1.3fr) 108px 20px; }
  .col-alarms, .col-last { display: none; }
  .att-row { grid-template-columns: 32px minmax(0, 220px) minmax(0, 1fr) auto; }
  .att-age { display: none; }
  .crumb { display: none; }
  .tk-table .thead-row, .tk-table .trow { grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.6fr) 178px 190px 16px; }
  .tk-col-who, .tk-col-at { display: none; }
  .tk-mini-row { grid-template-columns: 92px minmax(0, 1fr) 178px 190px; }
  .tk-mini-row .cell-note { display: none; }
}

@media (max-width: 1000px) {
  .grid-costs, .grid-2, .cost-layout { grid-template-columns: minmax(0, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thero-name { font-size: 56px; }
  .topbar { padding: 0 20px; gap: 12px; }
  .topbar-user { display: none; }
  .crumb { display: none; }
  .tk-detail { grid-template-columns: minmax(0, 1fr); }
  .tk-hero-name { font-size: 48px; }
  .topnav { margin-left: 0; }
}

@media (max-width: 860px) {
  .band { padding: 28px 24px 28px; }
  .band-side { flex-direction: column; }
  .headline { font-size: 46px; }
  .att-row { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 2px; }
  .att-subject { grid-column: 2; }
  .att-text { grid-column: 2; grid-row: 2; font-size: 13px; }
  .att-icon { grid-row: span 2; }
  .att-action { grid-column: 3; grid-row: 1 / span 2; }
  .ttable { display: none; }
  .mlist { display: flex; margin: 0 -10px; }
  .thero { padding: 28px 24px 24px; }
  .dns-records { grid-template-columns: minmax(0, 1fr); }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vat-switch .vat-label { display: none; }
  .btn-logout .btn-label { display: none; }
  .btn-logout { padding: 0; width: 34px; justify-content: center; }
  .tk-mini-row { grid-template-columns: 88px minmax(0, 1fr) auto; row-gap: 6px; }
  .tk-mini-row > span:nth-child(5) { grid-column: 2 / -1; }
}

@media (max-width: 600px) {
  .only-wide, .only-wide-flex, .only-wide-block { display: none !important; }
  .only-narrow { display: inline; }
  .only-narrow-flex { display: flex; }
  .only-narrow-block { display: block; }
  /* The title on its own line, state and deadline under it. */
  .tk-mini-row { grid-template-columns: 72px minmax(0, 1fr); }
  .tk-mini-row > span:nth-child(n+4) { grid-column: 2; }
  .tk-summary th { padding: 10px 6px; letter-spacing: .03em; }
  .tk-summary td { padding: 10px 6px; }
  .tk-summary th:first-child, .tk-summary td:first-child { padding-left: 0; }
  .tk-summary th:last-child, .tk-summary td:last-child { padding-right: 0; }
  .menu .only-narrow-flex { display: flex; }

  .login { grid-template-columns: minmax(0, 1fr); background: #fff; }
  .login-art { display: none; }
  .login-side { align-items: flex-start; padding: 40px 22px; }
  .login-form .brand-on-light { display: flex; margin-bottom: 18px; }
  .login-form .brand-on-light .brand-name { font-size: 18px; }

  .topbar { height: 60px; padding: 0 20px; gap: 10px; }
  .brand-name, .brand-tag, .vat-switch { display: none; }
  .topbar-right { gap: 8px; }
  .live { background: transparent; padding: 0 2px; gap: 6px; font-size: 12px; color: var(--on-dark-3); }
  .live:hover { background: transparent; }
  .live .switch { display: none; }
  .live.is-on .live-dot { box-shadow: none; }
  .live-meta { font-family: var(--sans); font-size: 12px; min-width: 0; }
  .btn-round { width: 36px; height: 36px; }

  .band { padding: 4px 20px 22px; gap: 18px; }
  .band-top, .band-side { display: none; }
  .headline-wrap { gap: 18px; }
  .headline { font-size: 40px; }
  .headline-sub { margin-top: -6px; }
  .att-list { border-top: 0; }
  .att-row { grid-template-columns: 26px minmax(0, 1fr) 16px; gap: 2px 12px; min-height: 44px; padding: 6px 0; border-bottom: 0; }
  .att-icon { width: 26px; height: 26px; }
  .att-subject { font-size: 14.5px; }
  .att-text { font-size: 12px; color: var(--on-dark-3); }
  .att-action { display: none; }
  .att-chevron { display: grid; grid-column: 3; grid-row: 1 / span 2; place-items: center; }

  .page { padding: 14px 14px 110px; gap: 10px; }
  #tenantView .page { padding-bottom: 32px; }
  #overviewView .tabs { display: none; }
  #ovCosts { display: contents; }
  #ovCostNow { order: 1; }
  #ovTenantsSec { order: 2; }
  #ovCostWhere { order: 3; }
  #ovCostTenants { order: 4; }
  #ovInfra { order: 5; }
  #ovAlarmsSec { order: 6; }
  #ovDeletedSec { order: 7; }
  .card { padding: 20px; border-radius: 22px; gap: 16px; }
  .card-title { font-size: 21px; }
  .card-now { gap: 12px; }
  .card-now .mbars-wrap, .card-now .facts { display: none; }
  .vat-mobile { display: flex; order: 2; }
  .vat-mobile .seg button { height: 26px; font-size: 12.5px; padding: 0 10px; }
  .sentence-sm { font-size: 26px; }
  #ovTenantsSec { padding: 6px; gap: 4px; }
  #ovTenantsSec .card-head { padding: 8px 8px 0; }
  #ovTenantsSec .card-head > div:first-child { display: none; }
  #ovTenantsSec .card-tools, #ovTenantsSec .search { width: 100%; }
  #ovTenantsSec .tags-line { padding: 6px 10px 10px; font-size: 12.5px; gap: 6px 14px; }
  .mlist { margin: 0; }
  .where-list { grid-template-columns: minmax(0, 1fr); }
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .metric { min-height: 170px; }
  .metric-value { font-size: 38px; }
  .gov-tiles { grid-template-columns: minmax(0, 1fr); }
  .deleted-strip { padding: 16px; }
  .deleted-title { margin-right: 0; }
  .deleted-pill { flex-wrap: wrap; border-radius: 16px; padding: 10px 12px; }

  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--paper) 70%, rgba(242, 241, 236, 0));
  }
  .mobile-bar .btn { height: 46px; border-radius: 23px; }
  .mobile-bar .btn-primary { flex: 1 1 auto; max-width: 180px; }
  .mobile-bar.hidden { display: none; }

  /* As in the design, the tenant page on a phone starts with its own header: live, refresh and logout stay on the overview */
  body:has(#tenantView:not(.hidden)) .topbar { display: none; }
  .thero { padding: 22px 20px; }
  .thero-circle.c1 { right: -70px; top: -60px; width: 220px; height: 220px; opacity: 1; }
  .thero-circle.c2 { display: none; }
  .thero-inner { gap: 14px; }
  .thero-chips { margin-bottom: 0; gap: 6px; }
  .thero-event { display: none; }
  .thero-main { gap: 14px; }
  .thero-id { flex-basis: 100%; gap: 10px; }
  .thero-name { font-size: 34px; letter-spacing: -.045em; line-height: .95; }
  .thero-meta { font-size: 12px; color: var(--on-dark-2); }
  .thero-meta .sep { display: none; }
  .thero-actions { width: 100%; flex-wrap: nowrap; }
  .thero-actions .btn, .thero-actions .btn-round-dark { height: 46px; border-radius: 23px; }
  .thero-actions .btn-round-dark { width: 46px; }
  .thero-actions .btn-deploy { order: -1; flex: 1; }
  .thero-settings { display: none; }
  .thero-note { margin-top: 0; }
  .menu { top: 54px; }
  #tenantView .tabs, #ticketsView .tabs { position: static; background: transparent; padding: 0; box-shadow: none; border-radius: 0; width: auto; }
  #tenantView .tab, #ticketsView .tab { height: 36px; padding: 0 14px; border-radius: 18px; background: #fff; }
  #tenantView .tab.is-on, #ticketsView .tab.is-on { background: var(--ink); }
  .topnav-label { display: none; }
  .topnav-link { padding: 0 10px; gap: 5px; }
  .tk-hero-name { font-size: 38px; }
  .tk-hero-title { font-size: 19px; }
  .tk-filters { width: 100%; }
  .tk-filters .seg { width: 100%; }
  .tk-filters .seg button { flex: 1; }
  .tk-select { flex: 1 1 140px; max-width: none; }
  .tk-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tk-facts dd { margin-bottom: 8px; }
  .tk-trace li { grid-template-columns: 64px minmax(0, 1fr); }
  .tk-trace li > :last-child { grid-column: 1 / -1; }
  .tk-collaudo-actions, .tk-collaudo-actions .btn { width: 100%; }
  .tk-day-form .field { width: 100%; }
  .tk-link-row { grid-template-columns: 56px minmax(0, 1fr); }
  .tk-link-row > :last-child { grid-column: 2; justify-self: start; }
  .cost-sentence-row { flex-direction: column; gap: 12px; }
  .sentence-md { font-size: 24px; }
  #tvCostSentence .sentence-sm { font-size: 24px; }
  .chart-tick { font-size: 11px; }
  .chart-label { font-size: 12.5px; }
  .chart-value { font-size: 11.5px; }
  .chart-value.is-selected { font-size: 13.5px; }
  .cost-sentence .facts { display: none; }
  .alarm-grid, .res-grid, .config { grid-template-columns: minmax(0, 1fr); }
  .svc-top { gap: 16px; }
  .tag-num { font-size: 36px; }
  .tag-score { flex-wrap: wrap; gap: 12px; }
  .tag-bar { flex-basis: 100%; order: 3; }
  .timeline-list li { grid-template-columns: 10px 56px minmax(0, 1fr); gap: 10px; }
  .deploy-row { flex-wrap: wrap; }

  .modal { padding: 10px; align-items: flex-end; }
  .window { max-height: calc(100dvh - 20px); border-radius: 24px; }
  .window-head { padding: 20px 20px 0; }
  .window-body { padding: 18px 20px; }
  .window-foot { padding: 0 20px 20px; }
  .window-title { font-size: 21px; }
  .form-grid, .form-grid-brand, .form-grid-3, .renew-row { grid-template-columns: minmax(0, 1fr); }
  .renew-row .btn { margin-top: 0; }
  .usage { flex-direction: column; align-items: flex-start; }
  .usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .usage-foot { flex-direction: column; }

  .toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .toast { width: auto; }
  body:has(#mobileBar:not(.hidden)) .toasts { bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── The form of a new client (modulo.html, modulo.js): mobile first ── */

.mf-body { background: var(--paper); }
.mf-top { display: flex; align-items: center; height: 60px; padding: 0 18px; max-width: 760px; margin: 0 auto; }
.mf-top .brand-name { display: inline; }
.mf-main { max-width: 760px; margin: 0 auto; padding: 0 12px 120px; }
.mf-stack { display: flex; flex-direction: column; gap: 12px; }
.mf-card { display: flex; flex-direction: column; gap: 16px; padding: 22px 18px; border-radius: 20px; background: #fff; min-width: 0; }
.mf-hero { gap: 12px; }
.mf-title { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.mf-lead { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.mf-privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-3); }
.mf-privacy .icon { margin-top: 1px; color: var(--ok); }
.mf-status { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--soft); font-size: 13.5px; color: var(--ink-2); }
.mf-status .icon { margin-top: 2px; }
.mf-status.is-sent { background: var(--ok-bg); color: #0F5A2A; }
.mf-section { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.mf-section .mf-opt, .mf-opt { font-family: var(--sans); font-size: 12.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.mf-text { margin-top: -6px; }
.mf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.mf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mf-admins { display: flex; flex-direction: column; gap: 10px; }
.mf-admin { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) 36px; gap: 10px 10px; align-items: end; padding: 14px 12px; border-radius: 16px; background: var(--soft); }
.mf-admin .field { grid-column: 2; }
.mf-admin .input { background: #fff; }
.mf-admin-n { grid-row: 1; grid-column: 1; align-self: start; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 22px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 12.5px var(--sans); }
.mf-admin-remove { grid-row: 1; grid-column: 3; align-self: start; margin-top: 22px; width: 36px; height: 36px; background: #fff; color: var(--ink-2); }
.mf-add { align-self: flex-start; }
.mf-talk-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mf-talk-item { display: flex; flex-direction: column; gap: 4px; max-width: 88%; padding: 12px 14px; border-radius: 16px; }
.mf-talk-item.is-client { align-self: flex-end; background: var(--soft); border-bottom-right-radius: 6px; }
.mf-talk-item.is-team { align-self: flex-start; background: #EAF0FF; border-bottom-left-radius: 6px; }
.mf-talk-who { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.mf-talk-when { font-weight: 400; color: var(--ink-3); }
.mf-talk-text { margin: 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.mf-talk-input { min-height: 84px; }
.mf-talk-foot { display: flex; justify-content: flex-end; }
.mf-clear { align-self: flex-start; margin-top: -2px; }
.mf-color-text { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 13.5px; }
.mf-textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.45; font-family: var(--sans); }
.mf-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; margin: 4px -12px 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: rgba(242, 241, 236, .94); backdrop-filter: blur(8px); }
.mf-buttons { display: flex; gap: 8px; }
.mf-buttons .btn { flex: 1; }
.mf-form-error { text-align: center; }
.mf-state { align-items: flex-start; margin-top: 24px; }
.mf-state-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--soft); color: var(--ink-2); }
.mf-state-icon.is-ok { background: var(--ok-bg); color: var(--ok); }
.mf-sum { display: flex; flex-direction: column; margin: 0; }
.mf-sum-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.mf-sum-row dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.mf-sum-row dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.mf-sum-logo { max-height: 56px; max-width: 200px; object-fit: contain; }
.mf-swatch { display: inline-block; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; vertical-align: -3px; border: 1px solid var(--line-2); }
.mf-sep { display: inline-block; width: 16px; }

@media (min-width: 720px) {
  .mf-main { padding: 8px 24px 120px; }
  .mf-card { padding: 30px 32px; border-radius: var(--radius-card); }
  .mf-title { font-size: 34px; }
  .mf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mf-admin { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.2fr) 36px; align-items: start; }
  .mf-admin .field { grid-column: auto; grid-row: 1; }
  .mf-admin-n, .mf-admin-remove { grid-row: 1; grid-column: auto; margin-top: 26px; }
  .mf-admin-n { margin-top: 30px; }
  .mf-actions { flex-direction: row-reverse; justify-content: space-between; align-items: center; margin: 4px 0 0; padding: 14px 0; }
  .mf-buttons { flex: none; }
  .mf-buttons .btn { flex: none; min-width: 150px; }
  .mf-sum-row { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
}

/* ── «Record da inserire nel dominio» on the form's page (modulo.js, renderDns) ── */

.mf-dns { gap: 14px; }
.mf-dns-head { display: flex; align-items: center; gap: 12px; }
.mf-dns-titles { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.mf-dns-state { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12.5px; font-weight: 600; }
.mf-dns-state.is-wait { background: var(--warn-bg); color: var(--warn-text); }
.mf-dns-state.is-ok { background: var(--ok-bg); color: #0F5A2A; }
.mf-dns-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mf-dns-rec { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--soft); min-width: 0; }
.mf-dns-purpose { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.mf-dns-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; flex: none; }
.mf-dns-fields { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.mf-dns-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.mf-dns-row dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.mf-dns-row dd { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; padding: 8px 8px 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.mf-dns-value { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.mf-copy { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 16px; background: #fff; color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer; }
.mf-copy:hover { background: var(--soft); }
.mf-copy:focus-visible { outline: 2px solid var(--run); outline-offset: 2px; }
.mf-copy.is-copied { border-color: transparent; background: var(--ok-bg); color: #0F5A2A; }
.mf-copy-area { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 720px) {
  .mf-dns-row { grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; }
}

/* ── The forms of the new clients in the console (intakes.js) ── */

.ik-table .thead-row, .ik-table .trow { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1fr) 150px 16px; }
.ik-table a.trow, .ik-mlist a.mrow { color: inherit; text-decoration: none; }
.ik-link { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--soft); min-width: 0; }
.ik-link-url { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; cursor: copy; }
.ik-link-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ik-link-actions .btn { height: 36px; border-radius: 18px; }
.ik-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.ik-block { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ik-admins { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ik-admin { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.ik-admin-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.ik-admin-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ik-role { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.ik-look { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 16px; background: var(--soft); flex-wrap: wrap; }
.ik-logo { width: 96px; height: 64px; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; flex: none; }
.ik-logo-none { display: grid; place-items: center; font-size: 12px; color: var(--ink-3); }
.ik-colors { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.ik-colors > span { display: flex; align-items: center; gap: 6px; }
.ik-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); }
.ik-notes { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); padding: 14px; border-radius: 16px; background: var(--soft); }
.ik-tenant-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ik-tenant-link:hover { color: #fff; }
.ik-changes { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ik-change { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.ik-change-field { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ik-change-values { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.ik-change-values > .icon { color: var(--ink-3); flex: none; }
.ik-change-from { color: var(--ink-3); min-width: 0; }
.ik-change-from .strong, .ik-change-from .mono { text-decoration: line-through; text-decoration-color: var(--line-2); }
.ik-change-to { min-width: 0; }
.ik-change-color { display: inline-flex; align-items: center; gap: 6px; }
.ik-change-logo { width: 72px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; padding: 4px; border: 1px solid var(--line-2); }
.ik-applied { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.ik-applied > .icon { flex: none; margin-top: 2px; color: var(--ok); }
.ik-mail { margin-top: 0; }
.ik-mail > .icon { color: var(--ink-3); }
#intakeConfirmMore { margin-top: 14px; }
#intakeConfirmMore .ik-change { grid-template-columns: minmax(0, 1fr); gap: 4px; }
@media (max-width: 640px) {
  .ik-change { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.ik-from { background: var(--run-bg); color: #1B3A8A; }
.ik-from .icon { color: var(--run); }
@media (max-width: 860px) {
  .ik-split { grid-template-columns: minmax(0, 1fr); }
}
.ik-lines { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: 100%; }

/* Phones: with «Moduli» the top bar holds three sections; the time of the live
   switch makes room, the brand and the labels never squeeze. */
@media (max-width: 480px) {
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .brand { flex-shrink: 0; }
  .topnav { gap: 2px; }
  .topnav-link { padding: 0 8px; }
  .live-meta { display: none; }
  .live-label { white-space: nowrap; }
}

/* The local admins of a new tenant (createModal): name and email per row. */
.la-list { display: flex; flex-direction: column; gap: 8px; }
.la-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
.la-add { justify-self: start; margin-top: 4px; }
.la-remove {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid var(--line-3);
}
.la-remove:hover { color: var(--danger, #b42318); border-color: currentColor; }
@media (max-width: 640px) {
  .la-row { grid-template-columns: 1fr auto; padding: 10px; border: 1px solid var(--line-3); border-radius: 14px; }
  .la-row .la-name { grid-column: 1; }
  .la-row .la-email { grid-column: 1; grid-row: 2; }
  .la-row .la-remove { grid-column: 2; grid-row: 1 / span 2; }
}
