/* Radio UltimatumCast - stile. Tema chiaro (bianco/grigio) di default, tema scuro (nero), colore principale a scelta. */
:root {
  --accent: #2563eb;
  --on-accent: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 40%, transparent);
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 10px;
  --top-a: #4a4a4a; --top-b: #1c1c1c; --top-text: #ffffff;
  --hdr-a: color-mix(in srgb, var(--accent) 30%, #a9b7ca);
  --hdr-b: color-mix(in srgb, var(--accent) 38%, #6f84a3);
  --page-bg: #dedfe1;
  --side-a: #ffffff; --side-b: #ececee;
  --head-line: #cfd2d6;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #050506;
  --surface: #101012;
  --surface-2: #17171a;
  --border: #26262b;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --shadow: none;
  --top-a: #232326; --top-b: #0b0b0c;
  --hdr-a: color-mix(in srgb, var(--accent) 28%, #2a2d33);
  --hdr-b: color-mix(in srgb, var(--accent) 36%, #14161a);
  --page-bg: #050506;
  --side-a: #17171a; --side-b: #101012;
  --head-line: #2a2a30;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
code { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.muted { color: var(--muted); }
.sm-text { font-size: 12.5px; }
.w100 { width: 100%; }
.sp { flex: 1; }
.nowrap { white-space: nowrap; }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- elementi base ---------- */
input, select, textarea {
  width: 100%; padding: 9px 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); box-shadow: none; }
input[type="color"] { padding: 2px; height: 36px; cursor: pointer; }
label { display: block; font-size: 12.5px; font-weight: 550; color: var(--muted); margin: 12px 0 5px; }
label.inline { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--text); font-weight: 500; font-size: 13.5px; }
label.inline input:not([type="checkbox"]) { width: 110px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--muted) 40%, var(--border)); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { padding: 8px; }
.btn.sm.icon { padding: 6px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.row > input, .row > select { flex: 1 1 160px; width: auto; min-width: 0; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

.card { background: var(--surface); border: 1px solid var(--head-line); border-radius: var(--radius); padding: 16px; box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.two { grid-template-columns: 2fr 1fr; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.gap { margin-top: 16px; }
@media (max-width: 960px) { .grid.two { grid-template-columns: 1fr; } }

/* ---------- badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.live { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.badge.live::before { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- struttura in stile Centova Cast ---------- */
.cc { min-height: 100vh; display: flex; flex-direction: column; background: var(--page-bg); }
.cc-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 7px 18px; background: linear-gradient(var(--top-a), var(--top-b)); color: var(--top-text); font-size: 12px; font-weight: 700; border-bottom: 1px solid #000; }
.cc-top a { color: var(--top-text); }
.cc-top .r { font-weight: 600; opacity: .95; }
.cc-head { background: linear-gradient(var(--hdr-a), var(--hdr-b)); padding: 10px 18px; border-bottom: 1px solid color-mix(in srgb, var(--hdr-b) 70%, #000); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.cc-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 26px; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.cc-logo svg { width: 34px; height: 34px; }
.cc-logo b { font-weight: 700; }
.cc-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--head-line); }
.cc-title .l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cc-title .big { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.cc-title .big svg { width: 26px; height: 26px; }
.cc-title h1 { margin: 0; font-size: 20px; font-weight: 400; color: var(--accent); letter-spacing: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-title .sub { color: var(--muted); font-size: 11.5px; }
.cc-meters { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.cc-meter { min-width: 150px; }
.cc-meter .t { font-size: 12px; margin-bottom: 3px; white-space: nowrap; }
.cc-meter .t b { font-weight: 700; }
.segbar { height: 14px; border: 1px solid #8e949c; border-radius: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.segbar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.segbar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 3px, var(--surface) 3px 4px); opacity: .85; }
.segbar.warn > i { background: var(--warn); }
.segbar.bad > i { background: var(--bad); }
.cc-body { flex: 1; display: flex; gap: 18px; padding: 18px 20px 14px; align-items: flex-start; }
.cc-side { width: 232px; flex: none; border: 1px solid var(--head-line); border-radius: 22px; background: linear-gradient(var(--side-a), var(--side-b)); padding: 8px 6px; box-shadow: var(--shadow); }
.grp { display: flex; gap: 10px; padding: 12px 12px; border-bottom: 1px solid var(--head-line); }
.grp:last-child { border-bottom: 0; }
.grp .gi { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.grp .gi svg { width: 22px; height: 22px; }
.grp .gt { font-weight: 700; color: var(--text); cursor: pointer; font-size: 13px; }
.grp .gl { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.grp .gl a { color: var(--muted); }
.grp .gl a:hover, .grp .gl a.on { color: var(--accent); text-decoration: none; font-weight: 700; }
.grp .gl .bar { color: var(--head-line); margin: 0 3px; }
.cc-main { flex: 1; min-width: 0; border: 1px solid var(--head-line); border-radius: 22px; background: linear-gradient(var(--surface-2), var(--surface) 90px); padding: 18px 22px 24px; box-shadow: var(--shadow); }
.cc-main .ph { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cc-main .ph .big { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.cc-main .ph .big svg { width: 26px; height: 26px; }
.cc-main .ph h2 { font-size: 17px; font-weight: 400; color: var(--accent); }
.cc-main .ph .sub { color: var(--muted); font-size: 11.5px; }
.cc-foot { text-align: right; color: var(--muted); font-size: 11.5px; padding: 8px 26px 22px; }
.cc-foot span + span::before { content: "|"; margin: 0 10px; color: var(--head-line); }
@media (max-width: 900px) {
  .cc-body { flex-direction: column; padding: 12px; }
  .cc-side { width: 100%; display: flex; flex-wrap: wrap; border-radius: 16px; }
  .grp { flex: 1 1 200px; border-bottom: 0; }
  .cc-main { width: 100%; padding: 14px; border-radius: 16px; }
  .cc-title { padding: 10px 14px; }
}

/* barra degli strumenti e tabella elenco (come "Accounts List") */
.cc-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--head-line); border-radius: 8px; background: linear-gradient(var(--surface), var(--surface-2)); margin-bottom: 12px; }
.cc-toolbar .tb { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; border-radius: 6px; }
.cc-toolbar .tb svg { width: 15px; height: 15px; color: var(--accent); }
.cc-toolbar .tb:hover:not(:disabled) { background: var(--accent-soft); }
.cc-toolbar .tb:disabled { color: var(--muted); opacity: .55; cursor: default; }
.cc-toolbar .tb.dng svg { color: var(--bad); }
.cc-toolbar .vsep { width: 1px; height: 20px; background: var(--head-line); margin: 0 4px; }
.cc-toolbar input[type="search"], .cc-toolbar .find { width: 170px; padding: 4px 8px; border-radius: 6px; margin-left: 6px; }
table.cc-table { border: 1px solid var(--head-line); border-radius: 8px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.cc-table th { background: linear-gradient(var(--surface), var(--surface-2)); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; padding: 7px 10px; border-bottom: 1px solid var(--head-line); }
.cc-table td { padding: 5px 10px; border-bottom: 1px solid var(--head-line); font-size: 12.5px; }
.cc-table tr.gh td { background: var(--surface-2); font-weight: 700; padding: 8px 10px; }
.cc-table tbody tr.row:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cc-table tbody tr.row:hover td { background: var(--accent-soft); }
.cc-table tr:last-child td { border-bottom: 0; }
.cc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
.mini { height: 8px; width: 78px; display: inline-block; vertical-align: middle; margin-left: 6px; border: 1px solid var(--head-line); border-radius: 2px; background: var(--surface-2); position: relative; overflow: hidden; }
.mini i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.typecard { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; margin-top: 8px; background: var(--surface); }
.typecard.on { border-color: var(--accent); background: var(--accent-soft); }
.typecard input { margin-top: 3px; }
.typecard b { display: block; }
.news { border: 1px solid var(--head-line); border-radius: 8px; background: var(--surface-2); margin-bottom: 12px; }
.news .h { padding: 5px 10px; font-weight: 700; border-bottom: 1px solid var(--head-line); background: linear-gradient(var(--surface), var(--surface-2)); }
.news .b { padding: 8px 10px; }

/* selettore tema e colore */
.pop-wrap { position: relative; }
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; box-shadow: 0 12px 36px rgba(0, 0, 0, .18); z-index: 50;
}
.pop h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 8px; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 6px 8px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatch.custom { background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); position: relative; overflow: hidden; }
.swatch.custom input { position: absolute; inset: -6px; opacity: 0; width: 40px; height: 40px; cursor: pointer; }

/* ---------- KPI ---------- */
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.kpi .ico svg { width: 21px; height: 21px; }
.kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; }

/* ---------- barre / grafici ---------- */
.meter { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.meter.warn > div { background: var(--warn); }
.meter.bad > div { background: var(--bad); }
.chart { position: relative; height: 190px; margin-left: 30px; }
.chart .grid-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); }
.chart .grid-line span { position: absolute; left: -30px; top: -9px; width: 24px; text-align: right; font-size: 11px; color: var(--muted); }
.chart .bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart .bar { flex: 1; min-width: 1px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .9; min-height: 0; }
.chart .bar:hover { opacity: 1; filter: brightness(1.15); }
.chart .bar.empty { background: var(--border); height: 2px !important; opacity: .6; }
.chart-x { display: flex; justify-content: space-between; margin: 6px 0 0 30px; font-size: 11px; color: var(--muted); }
.tip { margin: 8px 0 0 30px; font-size: 12.5px; color: var(--muted); min-height: 20px; }

.country-row { display: grid; grid-template-columns: 28px 1fr 56px 52px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.country-row:last-child { border-bottom: 0; }
.country-row .flag { font-size: 20px; line-height: 1; }
.country-row .name { font-weight: 550; margin-bottom: 4px; }
.country-row .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.country-row .pct { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 550; font-size: 13px; }

/* ---------- tabelle ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 4px; }
td.check, th.check { width: 34px; padding-right: 0; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.empty svg { width: 34px; height: 34px; opacity: .5; display: block; margin: 0 auto 8px; }

/* ---------- libreria ---------- */
.lib { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .lib { grid-template-columns: 1fr; } }
.tree { padding: 10px; }
.tree button {
  display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; color: var(--text);
  padding: 7px 10px; border-radius: 9px; font: inherit; cursor: pointer; text-align: left;
}
.tree button:hover { background: var(--surface-2); }
.tree button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tree button .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.tree button .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { border: 2px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); transition: all .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop .btn { margin-top: 8px; }
.selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 12px; margin-bottom: 12px; }
.selbar select { width: auto; flex: 0 1 190px; padding: 6px 10px; }
.progress { margin-top: 12px; }
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.crumbs .sep { color: var(--muted); }

/* ---------- playlist ---------- */
.pl { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .pl { grid-template-columns: 1fr; } }
.pl-item { display: block; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--text); margin-bottom: 8px; }
.pl-item:hover { border-color: var(--accent-line); }
.pl-item.on { border-color: var(--accent); background: var(--accent-soft); }
.pl-item .t { font-weight: 600; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pl-item .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 600; cursor: pointer; font-size: 12.5px; }
.day.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sched { padding: 12px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; margin-bottom: 10px; }
.sched .row { margin-top: 8px; }
.sched input[type="time"] { width: 120px; flex: none; }

/* ---------- avvisi ---------- */
.alert { display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 10px; }
.alert svg { margin-top: 2px; }
.alert.error { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.alert.error > svg { color: var(--bad); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.alert.warn > svg { color: var(--warn); }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.alert.ok > svg { color: var(--ok); }
.alert.info > svg { color: var(--accent); }
.alert b { display: block; }
.alert .hint { color: var(--muted); font-size: 13px; }
pre.log { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 8px 0 0; max-height: 260px; overflow: auto; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }

/* ---------- player / in onda ---------- */
.onair { display: flex; gap: 16px; align-items: center; }
.cover { width: 74px; height: 74px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #000)); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.cover svg { width: 34px; height: 34px; }
.cover.live { animation: glow 2s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 8px var(--accent-soft); } }
.onair .title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
audio { width: 100%; margin-top: 14px; height: 40px; }
.copyline { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.copyline code { flex: 1; min-width: 0; padding: 7px 10px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* ---------- radio (admin) ---------- */
.radio-card { display: flex; flex-direction: column; gap: 12px; }
.radio-card .head { display: flex; gap: 12px; align-items: flex-start; }
.radio-card .head .cover { width: 46px; height: 46px; border-radius: 12px; }
.radio-card .head .cover svg { width: 22px; height: 22px; }
.radio-card .nm { font-weight: 700; font-size: 16px; }
.radio-card .np { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-card .stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.radio-card .stats b { color: var(--text); }
.radio-card .btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- modale ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; }
.modal h3 { font-size: 17px; margin-bottom: 4px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .cols2 { grid-template-columns: 1fr; } }

.toast { position: fixed; right: 20px; bottom: 20px; background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 550; z-index: 100; max-width: 440px; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--page-bg); }
.login-center { flex: 1; display: grid; place-items: center; padding: 24px 20px; }
.login-box { width: 100%; max-width: 380px; }
.login-card { padding: 26px; background: linear-gradient(var(--side-a), var(--side-b)); border: 1px solid var(--head-line); border-radius: 22px; box-shadow: var(--shadow); }
.login-card h3 { font-size: 16px; font-weight: 400; color: var(--accent); margin-bottom: 2px; }
.field { position: relative; }
.field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field input { padding-left: 38px; }
.login-card .btn.primary { width: 100%; padding: 10px; margin-top: 18px; font-size: 14px; }
.login-opts { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; }
.login-foot { text-align: center; padding: 18px; color: var(--muted); font-size: 12.5px; }
.login-foot a { font-weight: 700; }
.errline { color: var(--bad); font-size: 13px; margin-top: 12px; text-align: center; }

.bad-text { color: var(--bad); font-weight: 700; }
textarea { resize: vertical; font: 12px/1.4 ui-monospace, Menlo, monospace; }

/* Widget */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.form-grid input[type=color] { height: 36px; padding: 2px; width: 100%; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; font-size: 13px; }
.checks label { display: flex; gap: 6px; align-items: center; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.copyline code { white-space: pre-wrap; word-break: break-all; }

/* le righe delle tabelle non devono ereditare .row (flex) */
table.cc-table tr.row, table.cc-table tr.gh { display: table-row; margin: 0; }


.login-brand { text-align: center; margin-bottom: 16px; }
.login-brand img { width: 170px; height: auto; display: block; margin: 0 auto 6px; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--accent) 35%, transparent)); }
.lb-title { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--text); }
.lb-title b { color: var(--accent); }
.lb-sub { margin-top: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; color: var(--muted); }
