/* Insieme — plain, flat styles. Themes only change the variables below. */

:root,
[data-theme="notte"] {
  --bg: #1b1d21;
  --surface: #23262b;
  --surface-2: #2c3036;
  --border: #3a3f46;
  --text: #e4e6ea;
  --muted: #9aa0a8;
  --accent: #3d7cc0;
  --on-accent: #ffffff;
  --link: #7fb0e6;
  --danger: #e06c6c;
  --ok: #6dbb84;
  --warn: #d8a84e;
  --current: rgba(61, 124, 192, .18);
  --heading-font: inherit;
  color-scheme: dark;
}
[data-theme="giorno"] {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f0f0ed;
  --border: #d8d8d4;
  --text: #1f1f1f;
  --muted: #696969;
  --accent: #2f6db5;
  --on-accent: #ffffff;
  --link: #2a62a3;
  --danger: #c23b3b;
  --ok: #2e7d4a;
  --warn: #9a6a12;
  --current: #e6eef8;
  color-scheme: light;
}
[data-theme="vinile"] {
  --bg: #211c17;
  --surface: #29231d;
  --surface-2: #332b24;
  --border: #4a4036;
  --text: #eadfcf;
  --muted: #a89a87;
  --accent: #b9853c;
  --on-accent: #1d1914;
  --link: #d6a663;
  --danger: #d9785f;
  --ok: #95b46a;
  --warn: #d6a663;
  --current: rgba(185, 133, 60, .18);
  --heading-font: Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
[data-theme="neon"] {
  --bg: #17141c;
  --surface: #1f1b26;
  --surface-2: #29232f;
  --border: #3d3448;
  --text: #ebe6f1;
  --muted: #a49cb1;
  --accent: #b14f8d;
  --on-accent: #ffffff;
  --link: #e08bc0;
  --danger: #e2677a;
  --ok: #6fc29a;
  --warn: #d9b24f;
  --current: rgba(177, 79, 141, .2);
  color-scheme: dark;
}
[data-theme="foresta"] {
  --bg: #1a1f1b;
  --surface: #212822;
  --surface-2: #2a322b;
  --border: #3a443b;
  --text: #e2e8e2;
  --muted: #97a397;
  --accent: #5d9a6c;
  --on-accent: #0f1410;
  --link: #8cc49b;
  --danger: #dd7766;
  --ok: #8cc49b;
  --warn: #d2b860;
  --current: rgba(93, 154, 108, .2);
  color-scheme: dark;
}
[data-theme="carta"] {
  --bg: #f3eee3;
  --surface: #fbf8f1;
  --surface-2: #ece5d5;
  --border: #d5cab4;
  --text: #2b251c;
  --muted: #74685a;
  --accent: #9c4a1a;
  --on-accent: #ffffff;
  --link: #8a3f14;
  --danger: #a8321f;
  --ok: #3f7445;
  --warn: #8d5b0c;
  --current: #efe2cf;
  --heading-font: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
[data-theme="contrasto"] {
  --bg: #000000;
  --surface: #000000;
  --surface-2: #141414;
  --border: #ffffff;
  --text: #ffffff;
  --muted: #dddddd;
  --accent: #ffd400;
  --on-accent: #000000;
  --link: #ffd400;
  --danger: #ff5c5c;
  --ok: #3cff8f;
  --warn: #ffd400;
  --current: #333300;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  accent-color: var(--accent);
}
a { color: var(--link); }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
h1, h2, h3 { font-family: var(--heading-font, inherit); margin: 0; font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 5px 12px; min-height: 30px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 13.5px; white-space: nowrap; text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 3px 9px; min-height: 26px; font-size: 13px; }
.btn svg { width: 15px; height: 15px; }
.btn.icon { width: 34px; padding: 0; }
.btn.icon svg { width: 16px; height: 16px; }

.icon-btn {
  width: 26px; height: 26px; display: inline-grid; place-items: center; flex: none;
  border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn.danger:hover:not(:disabled) { color: var(--danger); }

.input {
  width: 100%; padding: 5px 9px; min-height: 30px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.input:focus { outline: none; border-color: var(--accent); }
select.input { width: auto; padding-right: 4px; }
.input.sm { min-height: 26px; padding: 2px 6px; font-size: 13px; }
textarea.input { resize: vertical; min-height: 64px; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
label.field > .input { color: var(--text); font-size: 14px; }
label.check, .switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.switch .track { display: none; }
input[type="checkbox"] { width: 15px; height: 15px; margin: 0; }
input[type="range"] { margin: 0; }

.pill {
  display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 12px;
  border: 1px solid var(--border); color: var(--muted);
}
.pill.accent { color: var(--link); border-color: var(--link); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.danger { color: var(--danger); border-color: var(--danger); }

.card, .panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 14px;
}
.card-head, .panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head .count, .panel-head .count { color: var(--muted); font-size: 13px; }
.card-head .spacer, .panel-head .spacer { flex: 1; }

/* ------------------------------------------------------------------ header */
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px; flex-wrap: wrap;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; }
.station-name { color: var(--muted); }
.station-name::before { content: "/"; margin-right: 10px; }
.theme-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ station */
.layout {
  max-width: 1180px; margin: 0 auto; padding: 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start;
}
.col-main, .col-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.np { display: flex; gap: 14px; align-items: center; min-height: 72px; }
.np-thumb { width: 128px; height: 72px; object-fit: cover; border-radius: 3px; flex: none; background: var(--surface-2); }
.np-text { min-width: 0; }
.np-title { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.transport { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.transport .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 38px; }
.transport .time:last-of-type { text-align: right; }
.transport #seek { flex: 1; min-width: 80px; }
.vol { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.vol input { width: 90px; }
.options {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13.5px;
}

.adder-row { display: flex; gap: 8px; }
.adder-row .input { flex: 1; }
.results-head { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--muted); }
.upload-bar { height: 3px; background: var(--surface-2); margin-top: 8px; }
.upload-bar i { display: block; height: 100%; width: 0; background: var(--accent); }

.queue-list, .results { list-style: none; margin: 0; padding: 0; }
.results { margin-top: 6px; }
.q-item {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 5px 6px; border-bottom: 1px solid var(--border);
}
.q-item:last-child { border-bottom: 0; }
.q-item.current { background: var(--current); }
.q-item.current .q-title { font-weight: 600; }
.q-item.error .q-title { text-decoration: line-through; color: var(--muted); }
.q-idx { text-align: right; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.q-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-dur { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.q-actions { display: flex; }
.q-thumb { display: none; }
.empty { padding: 14px 4px; color: var(--muted); }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.chat-card { display: flex; flex-direction: column; }
.chat-log { height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; }
.msg { font-size: 13.5px; overflow-wrap: anywhere; }
.msg .who { font-weight: 600; margin-right: 5px; }
.msg .time { color: var(--muted); font-size: 11.5px; margin-right: 5px; font-variant-numeric: tabular-nums; }
.msg.system { color: var(--muted); font-size: 12.5px; }
.msg.important { color: var(--text); font-weight: 600; border-left: 3px solid var(--accent); padding-left: 7px; }
.chat-form { display: flex; gap: 6px; margin-top: 10px; }

/* ------------------------------------------------------------------ landing */
.landing { max-width: 820px; margin: 0 auto; padding: 24px 16px 60px; }
.landing h1 { margin-bottom: 12px; }
.station-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.station-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.station-list li:last-child { border-bottom: 0; }
.station-list .name { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--text); }
.station-list .name:hover { text-decoration: underline; }
.create-form { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.create-form .input { max-width: 320px; }

/* ------------------------------------------------------------------ modal, toast, banner */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); }
.modal { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.modal h2 { font-size: 16px; }
.modal p { margin: 0; color: var(--muted); }
.toasts { position: fixed; right: 12px; bottom: 12px; z-index: 200; display: flex; flex-direction: column; gap: 6px; max-width: min(360px, calc(100vw - 24px)); }
.toast { padding: 8px 12px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; }
.toast.error { border-color: var(--danger); }
.toast.ok { border-color: var(--ok); }
.banner {
  display: block; width: 100%; padding: 8px 16px; border: 0; cursor: pointer; text-align: center;
  background: var(--warn); color: #111; font-weight: 600;
}

/* ------------------------------------------------------------------ admin */
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab { padding: 7px 12px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; color: var(--muted); margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.selected td { background: var(--current); }
.table-wrap { overflow-x: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.section-gap { margin-top: 16px; }
pre.log { max-height: 240px; overflow: auto; padding: 10px; border-radius: 4px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { padding: 8px 10px; gap: 6px; }
  .hide-sm, .station-name { display: none; }
  .layout { padding: 10px; gap: 10px; }
  .np-thumb { width: 96px; height: 54px; }
  .transport { flex-wrap: wrap; }
  .transport #seek { order: 10; flex-basis: 100%; }
  .vol { margin-left: auto; }
  .adder-row { flex-wrap: wrap; }
  .adder-row .input { flex-basis: 100%; }
  .q-item { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .q-item .q-dur { display: none; }
}

/* admin station detail */
.eyebrow { color: var(--muted); font-size: 12.5px; }
.controls { display: flex; align-items: center; gap: 6px; }
.modes { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
/* radios linked to YouTube playlists */
.source-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.source-row:first-child { border-top: 0; padding-top: 0; }
.source-main { flex: 1 1 220px; min-width: 0; }
.source-title { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
.source-error { color: var(--danger); }
.source-actions { gap: 6px; flex-wrap: wrap; }
.sources-note { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.listeners { display: flex; flex-wrap: wrap; gap: 6px; }
.listener { display: inline-flex; align-items: center; gap: 2px; padding: 1px 2px 1px 8px; border: 1px solid var(--border); border-radius: 3px; }

/* ==================================================================
   Stile XP e Stile 7: i riquadri diventano finestre con barra del titolo.
   La barra è il primo .panel-head / .card-head (o data-title), spostata
   nel bordo superiore della finestra.
   ================================================================== */
[data-theme="xp"] body, [data-theme="seven"] body { background-attachment: fixed; }
[data-theme="xp"] .panel, [data-theme="xp"] .card,
[data-theme="seven"] .panel, [data-theme="seven"] .card { position: relative; }

[data-theme="xp"] .panel > .panel-head:first-child,
[data-theme="xp"] .card > .card-head:first-child,
[data-theme="xp"] .modal > h2:first-child,
[data-theme="xp"] .panel[data-title]::before,
[data-theme="seven"] .panel > .panel-head:first-child,
[data-theme="seven"] .card > .card-head:first-child,
[data-theme="seven"] .modal > h2:first-child,
[data-theme="seven"] .panel[data-title]::before {
  position: absolute; margin: 0; display: flex; align-items: center; gap: 8px;
  flex-wrap: nowrap; overflow: hidden; white-space: nowrap; box-sizing: border-box;
}
[data-theme="xp"] .panel[data-title]::before,
[data-theme="seven"] .panel[data-title]::before { content: attr(data-title); }

/* ------------------------------------------------------------------ Stile XP */
[data-theme="xp"] {
  --bg: #004e98;
  --surface: #ece9d8;
  --surface-2: #f4f3ee;
  --border: #7f9db9;
  --text: #000000;
  --muted: #565656;
  --accent: #316ac5;
  --on-accent: #ffffff;
  --link: #0046d5;
  --danger: #c1121f;
  --ok: #237a00;
  --warn: #9a5800;
  --current: #316ac5;
  color-scheme: light;
}
[data-theme="xp"] body { font-family: Tahoma, Verdana, "Segoe UI", sans-serif; font-size: 13px; }

[data-theme="xp"] .topbar {
  padding: 3px 10px 3px 0; border-bottom: 1px solid #0c2a7a; color: #fff;
  background: linear-gradient(#1f2f86 0, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%,
    #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%, #245fdc 89%,
    #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
}
[data-theme="xp"] .brand {
  color: #fff; font-style: italic; font-size: 16px; padding: 4px 24px 4px 14px; margin: -3px 0;
  border-radius: 0 14px 14px 0; text-shadow: 1px 1px 2px rgba(0, 0, 0, .55);
  background: linear-gradient(#5eac56 0, #3c9a35 12%, #3a9934 40%, #308d2c 85%, #2a7b26);
  box-shadow: inset -3px 0 4px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .35);
}
[data-theme="xp"] .station-name, [data-theme="xp"] .theme-field { color: #fff; }

[data-theme="xp"] .panel, [data-theme="xp"] .card {
  background: #ece9d8; padding: 10px;
  border: 3px solid #0842d8; border-top-width: 28px; border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 7px rgba(0, 0, 0, .45);
}
[data-theme="xp"] .panel > .panel-head:first-child,
[data-theme="xp"] .card > .card-head:first-child,
[data-theme="xp"] .modal > h2:first-child,
[data-theme="xp"] .panel[data-title]::before {
  top: -28px; left: -3px; right: -3px; height: 28px; padding: 0 5px 0 9px;
  border-radius: 7px 7px 0 0; color: #fff; font-weight: bold; font-size: 13px; text-shadow: 1px 1px #0f1089;
  background: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7);
}
[data-theme="xp"] .panel-head:first-child h2, [data-theme="xp"] .card-head:first-child h2 { font-size: 13px; }
[data-theme="xp"] .panel-head:first-child .count, [data-theme="xp"] .card-head:first-child .count { color: #d8e4ff; font-weight: normal; }

[data-theme="xp"] .btn {
  color: #000; border: 1px solid #003c74; border-radius: 3px; text-shadow: none; font-weight: normal;
  background: linear-gradient(180deg, #ffffff, #ecebe6 86%, #d6d0c5);
}
[data-theme="xp"] .btn:hover:not(:disabled) {
  border-color: #003c74;
  box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a;
}
[data-theme="xp"] .btn:active:not(:disabled) { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); }
[data-theme="xp"] .btn.primary {
  box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4;
}
[data-theme="xp"] .btn:disabled { color: #aca899; border-color: #c9c7ba; opacity: 1; }
[data-theme="xp"] .btn.danger { color: #c1121f; }
[data-theme="xp"] .btn.danger.solid { color: #fff; background: linear-gradient(#e46d6d, #c1121f); border-color: #7a0b13; }
[data-theme="xp"] .input { border: 1px solid #7f9db9; border-radius: 0; background: #fff; color: #000; }

[data-theme="xp"] .queue-list, [data-theme="xp"] .results:not(:empty), [data-theme="xp"] .chat-log,
[data-theme="xp"] .station-list, [data-theme="xp"] .table-wrap {
  background: #fff; border: 1px solid #7f9db9; border-radius: 0;
}
[data-theme="xp"] .chat-log { padding: 4px 6px; }
[data-theme="xp"] .q-item { border-bottom-color: #ece9d8; }
[data-theme="xp"] .q-item.current { background: #316ac5; color: #fff; }
[data-theme="xp"] .q-item.current .q-sub, [data-theme="xp"] .q-item.current .q-dur,
[data-theme="xp"] .q-item.current .q-idx, [data-theme="xp"] .q-item.current .icon-btn { color: #fff; }
[data-theme="xp"] .q-item.current .icon-btn:hover { background: rgba(255, 255, 255, .2); }
[data-theme="xp"] .table tr.selected td { color: #fff; }
[data-theme="xp"] .table tr.selected .muted { color: #d8e4ff; }
[data-theme="xp"] .landing h1 { color: #fff; text-shadow: 1px 1px 2px #000; }
[data-theme="xp"] .toast { background: #ffffe1; border: 1px solid #000; border-radius: 7px; box-shadow: 2px 2px 4px rgba(0, 0, 0, .35); }
[data-theme="xp"] .tabs { border-bottom: 1px solid #919b9c; }
[data-theme="xp"] .tab {
  color: #000; margin: 0 2px -1px 0; padding: 4px 12px; border: 1px solid #919b9c; border-bottom: 0;
  border-radius: 3px 3px 0 0; background: linear-gradient(#ffffff, #ecebe5 86%, #d8d0c4);
}
[data-theme="xp"] .tab.active { background: #fcfcfe; border-top: 3px solid #e68b2c; font-weight: normal; }
[data-theme="xp"] .modal-backdrop { background: rgba(0, 0, 0, .25); }

/* ------------------------------------------------------------------ Stile 7 */
[data-theme="seven"] {
  --bg: radial-gradient(ellipse at 25% 15%, rgba(140, 200, 255, .55), transparent 55%),
        radial-gradient(ellipse at 85% 90%, rgba(20, 60, 110, .6), transparent 60%),
        linear-gradient(160deg, #1f5b9a 0%, #2c84cf 45%, #18466f 100%);
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --border: #c5d1de;
  --text: #1e1e1e;
  --muted: #5b6676;
  --accent: #3c7fb1;
  --on-accent: #ffffff;
  --link: #0066cc;
  --danger: #c42b1c;
  --ok: #2e7d32;
  --warn: #9a6400;
  --current: #cfe4fb;
  color-scheme: light;
}
[data-theme="seven"] body { font-family: "Segoe UI", Tahoma, Arial, sans-serif; font-size: 13.5px; }

[data-theme="seven"] .topbar {
  color: #fff; border-bottom: 1px solid rgba(0, 0, 0, .6); backdrop-filter: blur(10px);
  background: linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 50%, rgba(0, 0, 0, .12) 50%), rgba(16, 36, 64, .78);
  box-shadow: inset 0 1px rgba(255, 255, 255, .3);
}
[data-theme="seven"] .brand, [data-theme="seven"] .station-name, [data-theme="seven"] .theme-field { color: #fff; }

[data-theme="seven"] .panel, [data-theme="seven"] .card {
  padding: 10px; background: #fff; background-clip: padding-box;
  border: 7px solid rgba(169, 201, 236, .62); border-top-width: 30px; border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(70, 100, 140, .55), 0 6px 22px rgba(0, 0, 0, .4);
  backdrop-filter: blur(6px);
}
[data-theme="seven"] .panel > .panel-head:first-child,
[data-theme="seven"] .card > .card-head:first-child,
[data-theme="seven"] .modal > h2:first-child,
[data-theme="seven"] .panel[data-title]::before {
  top: -30px; left: -7px; right: -7px; height: 30px; padding: 0 8px 0 10px;
  border-radius: 7px 7px 0 0; color: #000; font-weight: normal; font-size: 13.5px;
  text-shadow: 0 0 9px #fff, 0 0 4px #fff;
  background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .18) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, .12));
}
[data-theme="seven"] .panel-head:first-child h2, [data-theme="seven"] .card-head:first-child h2 { font-size: 13.5px; font-weight: normal; }
[data-theme="seven"] .panel-head:first-child .count, [data-theme="seven"] .card-head:first-child .count { color: #1e2a3a; }

[data-theme="seven"] .btn {
  color: #000; border: 1px solid #707070; border-radius: 3px; text-shadow: none;
  background: linear-gradient(#f2f2f2 0%, #ebebeb 45%, #dddddd 50%, #cfcfcf 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75);
}
[data-theme="seven"] .btn:hover:not(:disabled) {
  border-color: #3c7fb1; background: linear-gradient(#eaf6fd 0%, #d9f0fc 45%, #bee6fd 50%, #a7d9f5 100%);
}
[data-theme="seven"] .btn:active:not(:disabled) {
  border-color: #2c628b; background: linear-gradient(#e5f4fc 0%, #c4e5f6 45%, #98d1ef 50%, #68b3db 100%);
}
[data-theme="seven"] .btn.primary { border-color: #3c7fb1; box-shadow: inset 0 0 0 1px rgba(72, 199, 245, .85); }
[data-theme="seven"] .btn:disabled { color: #838383; background: #f4f4f4; border-color: #adb2b5; opacity: 1; }
[data-theme="seven"] .btn.danger { color: #c42b1c; }
[data-theme="seven"] .btn.danger.solid { color: #fff; border-color: #8f1d12; background: linear-gradient(#ee8a7f 0%, #e0594b 45%, #d23f30 50%, #b8301f 100%); }
[data-theme="seven"] .input { border: 1px solid #abadb3; border-top-color: #8e8f8f; border-radius: 2px; background: #fff; color: #000; }
[data-theme="seven"] .input:hover { border-color: #7eb4ea; }

[data-theme="seven"] .q-item { border-bottom: 0; border-radius: 3px; }
[data-theme="seven"] .q-item:hover { background: linear-gradient(#f5fafd, #e8f5fd); box-shadow: inset 0 0 0 1px #b8d6fb; }
[data-theme="seven"] .q-item.current { background: linear-gradient(#dcebfc, #c1dbfc); box-shadow: inset 0 0 0 1px #7da2ce; }
[data-theme="seven"] .station-list { border-color: rgba(0, 0, 0, .45); box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
[data-theme="seven"] .landing h1 { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
[data-theme="seven"] .toast { background: linear-gradient(#ffffff, #e4e5f0); border: 1px solid #767676; border-radius: 3px; box-shadow: 2px 2px 6px rgba(0, 0, 0, .3); }
[data-theme="seven"] .tabs { border-bottom-color: rgba(255, 255, 255, .5); }
[data-theme="seven"] .tab { color: #e8f1fb; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
[data-theme="seven"] .tab.active { color: #fff; border-bottom-color: #fff; }
[data-theme="seven"] .modal-backdrop { background: rgba(0, 0, 0, .3); }

/* small screens: only the title stays in window title bars */
@media (max-width: 600px) {
  [data-theme="xp"] .panel-head:first-child .count, [data-theme="seven"] .panel-head:first-child .count { display: none; }
}
[data-theme="xp"] .table tr.selected .pill { color: #fff; border-color: rgba(255, 255, 255, .75); }

/* account page */
.account-wrap { max-width: 760px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.steps li { padding-left: 4px; }
.qr { display: block; width: max-content; margin: 10px 0 6px; padding: 10px; background: #fff; border-radius: 4px; border: 1px solid var(--border); }
.qr img { width: 200px; height: 200px; }
code.secret { font-size: 13px; letter-spacing: .5px; user-select: all; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.codes code { padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); text-align: center; font-size: 14px; user-select: all; }
.stack > p, .stack > h3 { margin: 0; }
.stack > .panel-head, .stack > .card-head { margin-bottom: 0; }

/* landing sections */
.landing .section-title { margin-top: 28px; }
.landing .section-help { margin: 0 0 10px; }
