/* Tumas Pillar: stesso linguaggio visivo di tumas.it (palette, font, forme). */

/* ── font (gli stessi di tumas.it, serviti dal pannello: OFL) ───────────────── */
@font-face {
  font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/public-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/playfair-display-700-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* palette di tumas.it: i "-text" sono verificati per testo su --bg (WCAG AA) */
  --bg: #07000e;            /* Ghost Purple UV */
  --magenta: #D9437E;
  --magenta-text: #F07AA4;
  --cyan: #3FBFD6;
  --cyan-text: #5CC9DC;
  --violet: #9B6CF0;
  --violet-text: #B79AF5;
  --btn-from: #B8336B;
  --btn-to: #6E3FC0;

  --tint-magenta: rgba(217, 67, 126, 0.12);
  --tint-cyan: rgba(63, 191, 214, 0.10);
  --tint-violet: rgba(155, 108, 240, 0.12);
  --line-cyan: rgba(92, 201, 220, 0.6);
  --line-magenta: rgba(240, 122, 164, 0.6);

  /* superfici in vetro come le schede del sito */
  --glass: rgba(255, 255, 255, 0.03);
  --glass-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.08);
  --surface: #140b20;       /* opaco: tooltip dei grafici, intestazioni fisse */

  --text: #ffffff;
  --text-2: #e2e8f0;        /* slate-200 */
  --text-3: #cbd5e1;        /* slate-300 */
  --muted: #94a3b8;         /* slate-400 */
  --grid: rgba(255, 255, 255, 0.07);
  --axis: rgba(255, 255, 255, 0.16);

  /* dati e stati: ciano = va bene, magenta = errore (come sul sito) */
  --series-1: #5CC9DC;
  --series-2: #B79AF5;
  --series-3: #F07AA4;
  --good: #5CC9DC;
  --good-text: #5CC9DC;
  --warning: #F5B54A;
  --warning-text: #F7C873;
  --critical: #D9437E;
  --critical-text: #F07AA4;

  --radius: 24px;
  --radius-sm: 16px;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text-2);
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html, .table-wrap, .scroll-box, .log, .tabs { scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.table-wrap, .scroll-box, .log { scrollbar-width: thin; }
a { color: var(--cyan-text); text-decoration-style: dotted; text-underline-offset: 4px; }
a:hover { color: var(--text); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--text); }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 11px; font-weight: 600; font-family: var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
::selection { background: rgba(217, 67, 126, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan-text); outline-offset: 3px; border-radius: 6px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── effetti di tumas.it ─────────────────────────────────────────────────── */
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.10); }
  66% { transform: translate(-40px, 50px) scale(0.92); }
  100% { transform: translate(25px, -15px) scale(1.04); }
}
@keyframes scan {
  0% { transform: translateY(-10vh); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { transform: translateY(110vh); opacity: 0; }
}
@keyframes border-pulse {
  0%, 100% { border-color: rgba(92, 201, 220, 0.6); box-shadow: 0 0 10px rgba(92, 201, 220, 0.08); }
  50% { border-color: rgba(240, 122, 164, 0.7); box-shadow: 0 0 18px rgba(240, 122, 164, 0.14); }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
/* solo movimento, senza dissolvenza: i testi grandi restano visibili da subito (come animate-rise del sito) */
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }

.shimmer {
  background: linear-gradient(90deg, #F07AA4 0%, #5CC9DC 35%, #ffffff 50%, #5CC9DC 65%, #F07AA4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 5s linear infinite;
}

/* sfondo: sfere sfocate magenta, ciano e viola, come sul sito */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; animation: orb-drift 22s ease-in-out infinite alternate; }
.orb-a { width: 650px; height: 650px; top: -12rem; right: -6rem; background: radial-gradient(circle, rgba(217, 67, 126, 0.16) 0%, transparent 65%); }
.orb-b { width: 600px; height: 600px; bottom: -12rem; left: -6rem; background: radial-gradient(circle, rgba(63, 191, 214, 0.13) 0%, transparent 65%); animation-duration: 28s; animation-direction: alternate-reverse; }
.orb-c { width: 520px; height: 520px; top: 50%; left: 50%; margin: -260px 0 0 -260px; background: radial-gradient(circle, rgba(110, 63, 192, 0.14) 0%, transparent 65%); animation-duration: 36s; }
.scan { position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, rgba(92, 201, 220, 0.35), transparent); animation: scan 6s linear infinite; }

.gradient-line {
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 67, 126, 0), #D9437E 20%, #9B6CF0 40%, #3FBFD6 60%, #D9437E 80%, rgba(217, 67, 126, 0));
  background-size: 200% 100%;
  animation: gradient-shift 8s ease infinite;
  opacity: .7;
}

/* badge a pillola con il puntino luminoso */
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-cyan); color: var(--cyan-text);
  font: 600 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase;
  animation: border-pulse 3s ease-in-out infinite;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-text); box-shadow: 0 0 10px var(--cyan-text); }

/* ── intestazione ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 0, 14, 0.62);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.bar {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px 6px;
}
.brand {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  font: 700 20px/1 var(--display); letter-spacing: -0.01em; color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.spacer { flex: 1; }
.user { display: flex; align-items: center; gap: 10px; color: var(--text-3); white-space: nowrap; }
.user .name { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.tabs {
  max-width: 1280px; margin: 0 auto;
  display: flex; gap: 4px; padding: 4px 20px 10px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 9px 15px; border-radius: 999px; white-space: nowrap;
  color: var(--text-3); text-decoration: none; font-size: 14px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.tabs a:hover { color: var(--text); background: var(--glass-2); transform: translateY(-1px); }
.tabs a[aria-current="page"] { color: var(--text); background: var(--glass-2); box-shadow: inset 0 0 0 1px rgba(92, 201, 220, 0.35); }

.content { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 24px 40px; }
.content:focus { outline: none; }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head::before {
  content: "Tumas Pillar"; content: "Tumas Pillar" / "";
  flex-basis: 100%;
  font: 600 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--cyan-text);
}
.view-head h1 {
  font: 700 clamp(28px, 4vw, 40px)/1.08 var(--display); letter-spacing: -0.015em;
  background: linear-gradient(90deg, #F07AA4 0%, #5CC9DC 35%, #ffffff 50%, #5CC9DC 65%, #F07AA4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 5s linear infinite;
  padding-bottom: 2px;
}

/* ── piè di pagina ───────────────────────────────────────────────────────── */
.site-footer { position: relative; z-index: 1; margin-top: auto; }
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 18px 24px 26px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted);
}
.footer-inner .sig { font-family: var(--mono); letter-spacing: .08em; }

/* ── controlli ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--glass);
  cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--text-2);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); background: var(--glass-2); color: var(--text); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary {
  border: 0; color: #fff;
  background: linear-gradient(270deg, var(--btn-from), var(--btn-to), var(--btn-from));
  background-size: 300% 300%;
  animation: gradient-shift 4s ease infinite;
  box-shadow: 0 10px 30px rgba(184, 51, 107, 0.25);
}
.btn-primary:hover:not(:disabled) { color: #fff; box-shadow: 0 14px 34px rgba(184, 51, 107, 0.38); }
.btn-outline { border-color: var(--line-magenta); color: var(--magenta-text); background: transparent; }
.btn-outline:hover:not(:disabled) { background: rgba(240, 122, 164, 0.1); color: var(--magenta-text); }
.btn-danger { border-color: var(--line-magenta); color: var(--magenta-text); background: transparent; }
.btn-danger:hover:not(:disabled) { background: rgba(240, 122, 164, 0.1); color: var(--magenta-text); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-block { width: 100%; min-height: 50px; font-size: 15px; }
.btn .arrow { width: 18px; height: 18px; flex: none; transition: transform .2s ease; }
.btn:hover:not(:disabled) .arrow { transform: translateX(3px); }

.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.06); }
.segmented button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px;
  cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px;
  transition: color .2s ease, background-color .2s ease;
}
.segmented button:hover { color: var(--text-2); }
.segmented button[aria-pressed="true"] { color: #fff; background: linear-gradient(270deg, var(--btn-from), var(--btn-to)); }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); padding-left: 20px; }
.field input {
  width: 100%; padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line-cyan); background: var(--glass);
  color: var(--text-2); font-family: var(--mono); font-size: 14px;
  outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder { color: var(--muted); }
.field input:focus { border-color: var(--magenta-text); box-shadow: 0 0 0 3px rgba(240, 122, 164, 0.14); }
.field input:disabled { opacity: .6; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); cursor: pointer; font-size: 13px; }
.check input { accent-color: var(--magenta); width: 16px; height: 16px; }

/* ── card e griglie ──────────────────────────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.stack { display: grid; gap: 18px; }
@media (max-width: 960px) { .g-2, .g-3, .g-main { grid-template-columns: minmax(0, 1fr); } }

.card {
  position: relative; min-width: 0;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.card:hover { border-color: rgba(92, 201, 220, 0.35); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .sub { font: 12px/1.4 var(--mono); color: var(--muted); }

.tile {
  min-width: 0; padding: 18px 20px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background-color: var(--glass);
  background-image: linear-gradient(150deg, var(--tint-magenta), rgba(255, 255, 255, 0));
  transition: transform .2s ease, border-color .3s ease;
}
.tile:nth-child(3n+2) { background-image: linear-gradient(150deg, var(--tint-cyan), rgba(255, 255, 255, 0)); }
.tile:nth-child(3n) { background-image: linear-gradient(150deg, var(--tint-violet), rgba(255, 255, 255, 0)); }
.tile:hover { transform: translateY(-2px); border-color: rgba(92, 201, 220, 0.45); }
.tile .label { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text-3); }
.tile .value {
  margin-top: 8px;
  font: 700 32px/1.05 var(--display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em;
  background: linear-gradient(90deg, #F07AA4, #5CC9DC 70%, #ffffff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  overflow-wrap: anywhere;
}
.tile .foot { font-size: 13px; color: var(--text-3); margin-top: 6px; line-height: 1.4; }
.delta-up { color: var(--good-text) !important; }
.delta-down { color: var(--critical-text) !important; }

.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 300px; }
.chart-box.short { height: 180px; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }

/* ── stato del bot ───────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 11px; border-radius: 999px;
  font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--border); background: var(--glass); color: var(--text-3);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.good { background: var(--good); box-shadow: 0 0 10px var(--good); }
.dot.warning { background: var(--warning); box-shadow: 0 0 10px var(--warning); }
.dot.critical { background: var(--critical); box-shadow: 0 0 10px var(--critical); }

.bot-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.bot-card h2 { font: 700 24px/1.15 var(--display); margin-bottom: 6px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--glass-2);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(217, 67, 126, 0.7), 0 0 30px rgba(217, 67, 126, 0.35);
}
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 20px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.facts .k { font: 600 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts .v { margin-top: 4px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 14px;
  background: rgba(217, 67, 126, 0.10); color: var(--text-2);
  border: 1px solid rgba(240, 122, 164, 0.45);
}
.alert.warn { background: rgba(245, 181, 74, 0.09); border-color: rgba(245, 181, 74, 0.45); }
.alert.ok { background: rgba(63, 191, 214, 0.09); border-color: rgba(92, 201, 220, 0.45); }
.alert .ico { font-weight: 700; flex: none; color: var(--magenta-text); }
.alert.warn .ico { color: var(--warning-text); }
.alert.ok .ico { color: var(--cyan-text); }

/* ── barre di utilizzo ───────────────────────────────────────────────────── */
.meter { margin-bottom: 16px; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 7px; color: var(--text-2); }
.meter-top .v { font-variant-numeric: tabular-nums; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.meter-track { height: 8px; border-radius: 999px; background: var(--glass-2); overflow: hidden; }
.meter-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px rgba(63, 191, 214, 0.35);
  transition: width .6s cubic-bezier(.22, 1, .36, 1);
}
.meter-fill.warning { background: linear-gradient(90deg, #E39B2D, var(--warning)); box-shadow: 0 0 12px rgba(245, 181, 74, 0.35); }
.meter-fill.critical { background: linear-gradient(90deg, var(--btn-from), var(--magenta-text)); box-shadow: 0 0 12px rgba(217, 67, 126, 0.45); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 13px; margin: 0; padding-top: 4px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }

/* ── tabelle (come la tabella delle fonti di tumas.it) ───────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.scroll-box { max-height: 520px; overflow-y: auto; margin: 0 -22px; padding: 0 22px; }
.scroll-box .table-wrap { margin: 0; padding: 0; }
.scroll-box thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 10px 12px; white-space: nowrap;
  font: 600 10.5px/1.2 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border-soft);
}
td { padding: 11px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; color: var(--text-2); }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font: 600 11px/1.3 var(--mono); letter-spacing: .04em;
  background: var(--glass); border: 1px solid var(--border); color: var(--text-3);
}
.tag-after { margin-left: 8px; }
.tag.ok { color: var(--cyan-text); border-color: rgba(92, 201, 220, 0.45); background: rgba(63, 191, 214, 0.08); }
.tag.err { color: var(--magenta-text); border-color: rgba(240, 122, 164, 0.45); background: rgba(217, 67, 126, 0.08); }
.tag.admin { color: var(--violet-text); border-color: rgba(183, 154, 245, 0.45); background: rgba(155, 108, 240, 0.10); }
.cmd { font-family: var(--mono); font-size: 12px; white-space: nowrap; color: var(--violet-text); }
.err-text { color: var(--critical-text); font-size: 12px; overflow-wrap: anywhere; margin-top: 4px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed strong { color: var(--text); font-weight: 600; }
.feed .when { margin-left: auto; color: var(--muted); font: 11.5px/1.6 var(--mono); white-space: nowrap; padding-left: 8px; }
.feed .ico { width: 22px; flex: none; text-align: center; }

.log {
  font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere;
  margin: 8px 0 0; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border-soft); color: var(--text-3);
  max-height: 240px; overflow: auto;
}
details.logrow { border-bottom: 1px solid var(--border-soft); padding: 10px 0; }
details.logrow:last-child { border-bottom: 0; }
details.logrow summary { cursor: pointer; display: flex; gap: 12px; font-size: 13px; list-style: none; }
details.logrow summary::-webkit-details-marker { display: none; }
details.logrow summary .first { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

.guild-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.guild-head h2 { font: 700 20px/1.2 var(--display); }
.guild-icon {
  width: 48px; height: 48px; border-radius: 16px; flex: none; object-fit: cover;
  display: grid; place-items: center; font: 700 15px/1 var(--display); color: var(--text);
  background: linear-gradient(150deg, rgba(217, 67, 126, 0.35), rgba(110, 63, 192, 0.35));
  border: 1px solid var(--border);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 12px; background: var(--glass); color: var(--text-2);
}
.chip .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.section-title { margin: 22px 0 10px; }

.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(380px, calc(100vw - 40px));
  padding: 12px 20px; border-radius: 999px;
  background: rgba(7, 0, 14, 0.92); color: var(--text-2);
  border: 1px solid var(--line-cyan);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 18px rgba(92, 201, 220, 0.12);
  animation: fade-up .35s cubic-bezier(.22, 1, .36, 1) both;
}
.loading { color: var(--muted); padding: 48px 0; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ── selettore del server (barra in alto) ────────────────────────────────── */
[hidden] { display: none !important; }
.scope { display: flex; align-items: center; gap: 8px; min-width: 0; }
.scope-label { font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.scope select, .select {
  appearance: none; -webkit-appearance: none; min-width: 0; max-width: 260px;
  padding: 8px 36px 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-cyan); color: var(--text-2); font-size: 13px; font-weight: 600;
  background: var(--glass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235CC9DC' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  text-overflow: ellipsis; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.scope select:focus-visible { border-color: var(--magenta-text); box-shadow: 0 0 0 3px rgba(240, 122, 164, 0.14); }
.scope select:disabled { cursor: default; opacity: 1; border-color: var(--border); background-image: none; padding-right: 16px; }
.scope option { background: var(--surface); color: var(--text-2); }

/* ── utenti del pannello ──────────────────────────────────────────────────── */
.field-label { display: block; margin: 18px 0 9px; padding-left: 4px; font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.check-list {
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  max-height: 220px; overflow-y: auto; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18); border: 1px solid var(--border-soft); scrollbar-width: thin;
}
.check-list .check { color: var(--text-2); overflow-wrap: anywhere; }
.access-note { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.user-card .kv { margin-bottom: 4px; }
.secret-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.secret {
  padding: 8px 16px; border-radius: 999px; font-size: 15px; letter-spacing: .06em; user-select: all;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-cyan); color: var(--text); overflow-wrap: anywhere;
}

/* ── pagina di accesso (come tumas.it/login) ─────────────────────────────── */
.auth-page {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  width: 100%; max-width: 640px; margin: 0 auto; padding: 56px 16px 40px; text-align: center;
}
.auth-page:focus { outline: none; }
.auth-logo {
  width: 84px; height: 84px; object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(217, 67, 126, 0.55)) drop-shadow(0 0 40px rgba(63, 191, 214, 0.18));
  animation: float 4s ease-in-out infinite;
}
.auth-title {
  font: 700 clamp(34px, 6vw, 54px)/1.08 var(--display); letter-spacing: -0.02em; color: var(--text);
  animation: rise .8s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-lead { margin: 0; max-width: 470px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.auth-card { width: 100%; max-width: 400px; margin-top: 6px; padding: 28px 24px 24px; text-align: left; animation: rise .9s cubic-bezier(.22, 1, .36, 1) both; }
.auth-card .form-title { margin: 0 0 20px; text-align: center; color: var(--text); font-weight: 600; font-size: 15px; }
.form-error { color: var(--critical-text); font-size: 13px; min-height: 20px; margin: -4px 0 12px; text-align: center; }
.form-ok { color: var(--good-text); font-size: 13px; min-height: 20px; margin: -4px 0 12px; text-align: center; }
.hint { font-size: 12px; color: var(--muted); margin: -6px 0 16px; padding-left: 20px; }
.card .hint.section-title { padding-left: 0; margin-top: 18px; line-height: 1.55; }

@media (max-width: 640px) {
  .bar { padding: 10px 16px 4px; gap: 10px; }
  .brand { font-size: 18px; }
  .brand img { width: 30px; height: 30px; }
  .tabs { padding: 4px 10px 10px; }
  .content { padding: 20px 16px 32px; }
  .card { padding: 18px; }
  .table-wrap, .scroll-box { margin: 0 -18px; padding: 0 18px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px 15px; border-radius: 20px; }
  .tile .value { font-size: 24px; }
  .tile .label { font-size: 12px; }
  .tile .foot { font-size: 12px; }
  .user .name { display: none; }
  .bar { flex-wrap: wrap; }
  .scope { order: 10; width: 100%; padding-bottom: 4px; }
  .scope select { flex: 1; max-width: none; }
  .hide-sm { display: none; }
  .footer-inner { padding: 16px 16px 22px; }
  .auth-page { padding-top: 36px; }
}

@media (max-width: 420px) { .bar .pill { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .orb, .scan, .shimmer, .view-head h1, .gradient-line, .badge, .btn-primary, .auth-logo, .auth-title, .auth-card, .toast { animation: none !important; }
  .scan { display: none; }
  .btn, .tile, .tabs a, .meter-fill { transition: none; }
  .btn:hover:not(:disabled), .tile:hover, .tabs a:hover { transform: none; }
}
