:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface2: #1e1e24;
  --border: #2a2a2e;
  --text: #e2e2e6;
  --text-muted: #9898a0;
  --accent: #7c9cff;
  --accent-hover: #9ab0ff;
  --success: #6bcf7f;
  --registered: #e07c7c;
  --sidebar-w: 220px;
  --topbar-h: 52px;
  --radius: 10px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Scrollbar flat globale ──────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

.hidden { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT PLATFORM
═══════════════════════════════════════════════════════════════ */

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Topbar (mobile only) ──────────────────────────────────── */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
  z-index: 200;
}
.topbar-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.topbar-btn svg { width: 22px; height: 22px; }
.topbar-brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.topbar-spacer { flex: 1; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100vh;
  background: var(--bg);           /* stesso sfondo del body — flat */
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 150;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 140;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.1rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.brand-dot {
  width: 26px; height: 26px;
  background: var(--accent);
  border-radius: 7px;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  line-height: 1.2;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.nav-item.active {
  background: rgba(124,156,255,0.1);
  color: var(--accent);
}
.nav-item.active svg { opacity: 1; }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,156,255,0.18);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 5px;
  margin-left: auto;
  min-width: 17px;
}
.nav-badge:empty { display: none; }

.sidebar-footer {
  padding: 0.65rem 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.45;
}

/* ── Main content ────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ── Pages ───────────────────────────────────────────────── */
.page {
  display: none;
  flex-direction: column;
  min-height: 100%;
  padding: 2rem 2rem 3rem;
  max-width: 820px;
  width: 100%;
}
.page.active { display: flex; }

.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  flex: 1 1 100%;
  margin-top: 0.15rem;
}
.page-header-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ── Dashboard ───────────────────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card-green { border-color: rgba(107,207,127,.2); }
.stat-card-accent { border-color: rgba(124,156,255,.2); }
.stat-icon {
  width: 38px; height: 38px;
  background: var(--surface2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; color: var(--text-muted); }
.stat-card-green .stat-icon svg { color: var(--success); }
.stat-card-accent .stat-icon svg { color: var(--accent); }
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.dash-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
}
.dash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.dash-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}
.dash-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dash-action-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
}
.dash-action-btn:hover { background: #26262e; border-color: #3a3a42; }
.dash-action-btn svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 260px;
  overflow-y: auto;
}
.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.dash-recent-item:last-child { border-bottom: none; }
.dash-recent-type {
  font-size: 0.67rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.dash-type-check { background: rgba(124,156,255,.15); color: var(--accent); }
.dash-type-scan  { background: rgba(107,207,127,.15); color: var(--success); }
.dash-recent-query { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dash-recent-esito { font-size: 0.75rem; flex-shrink: 0; white-space: nowrap; }
.dash-recent-time { color: var(--text-muted); font-size: 0.72rem; flex-shrink: 0; white-space: nowrap; }
.dash-empty { color: var(--text-muted); font-size: 0.85rem; padding: 0.5rem 0; }

/* ── Nuovi elementi piattaforma ──────────────────────────── */

/* Topbar hamburger + page title */
.topbar-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  flex-shrink: 0;
}
.topbar-hamburger:hover { color: var(--text); }
.topbar-hamburger svg { width: 20px; height: 20px; }
.topbar-page-title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

/* Tutte le SVG dentro .btn hanno dimensione controllata */
.btn svg { width: 14px; height: 14px; flex-shrink: 0; vertical-align: middle; }
.btn-sm svg { width: 12px; height: 12px; }

/* Brand logo (lettera D) */
.brand-logo {
  width: 28px; height: 28px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Nav icon */
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Page layout */
.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}
.page-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  vertical-align: middle;
  margin-left: 4px;
}
.page-badge:empty { display: none; }
.page-body { display: flex; flex-direction: column; gap: 1.25rem; }

/* Content card (sostituisce .card) */
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Stat card variants */
.stat-body { display: flex; flex-direction: column; gap: 2px; }
.stat-green .stat-icon { background: rgba(107,207,127,.1); }
.stat-green .stat-icon svg { color: var(--success); }
.stat-blue  .stat-icon { background: rgba(124,156,255,.1); }
.stat-blue  .stat-icon svg { color: var(--accent); }

/* Dashboard cards */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.dash-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 0.5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.12s;
  text-align: center;
}
.quick-action-btn svg { width: 20px; height: 20px; color: var(--accent); }
.quick-action-btn:hover { border-color: var(--accent); background: rgba(124,156,255,.06); }

/* Form check inline */
.form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.form .field { flex: 1; min-width: 200px; }
.form .btn { align-self: flex-end; }

/* ── Verifica: row check ─────────────────────────────────── */
.check-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

/* ── Responsive (mobile) ─────────────────────────────────── */
@media (max-width: 768px) {
  body { overflow: auto; }
  .app { flex-direction: column; height: auto; overflow: auto; }

  .topbar { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    top: 0;
    height: 100vh;
    z-index: 160;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }

  .main-content {
    margin-left: 0;
    margin-top: var(--topbar-h);
    height: auto;
    min-height: calc(100vh - var(--topbar-h));
    overflow: visible;
  }
  .page {
    padding: 1.25rem 1rem 2rem;
  }
  .page.active { display: flex; }

  .dash-stats { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .dash-row { grid-template-columns: 1fr; }
  .stat-card { padding: 0.85rem 0.9rem; gap: 0.75rem; }
  .stat-icon { width: 32px; height: 32px; border-radius: 8px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-value { font-size: 1.25rem; }
  .stat-label { font-size: 0.68rem; }

  .check-row { flex-direction: column; }
  .check-row .field-submit { align-self: flex-start; }

  .page-header {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: flex-start;
    margin-bottom: 1rem;
  }
  .page-header > div:first-child { flex: 1 1 auto; }
  .page-header-actions { margin-left: auto; flex-wrap: wrap; flex-shrink: 0; }
  .page-title { font-size: 1.2rem; }
  .page-sub { font-size: 0.78rem; }

  /* Bottoni header: dimensione compatta */
  .btn-sm { font-size: 0.72rem; padding: 0.3rem 0.65rem; }
  .btn-sm svg { width: 12px; height: 12px; }

  /* Scan tabs: più compatti */
  .scan-tabs { gap: 0; border-bottom: 1px solid var(--border); }
  .scan-tab {
    font-size: 0.75rem;
    padding: 0.4rem 0.55rem;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
    text-align: center;
  }
  .tab-icon { width: 11px; height: 11px; }

  /* Form check mobile: input full-width, bottone in riga */
  .check-input-row { gap: 0.4rem; }
  .check-input-row input { font-size: 0.88rem; padding: 0.6rem 0.75rem; }
  /* DNS grid: 1 colonna su mobile */
  .check-dns-grid { grid-template-columns: 1fr; gap: 0.3rem; }
  .check-dns-item { padding: 0.45rem 0.6rem; }
  .dns-label { display: none; } /* nasconde la label verbose su mobile */
  /* Form legacy check: colonna */
  .form { flex-direction: column; }
  .form .field { min-width: 0; }
  .form .btn { width: 100%; }

  /* ── Watchlist mobile: card layout a 2 righe ── */
  .wl-row {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0.4rem;
    row-gap: 0;
    padding: 0.6rem 0.75rem;
    align-items: center;
  }
  /* riga 1: icona | dominio | badge */
  .wl-icon   { grid-column: 1; grid-row: 1; font-size: 0.9rem; }
  .wl-domain { grid-column: 2; grid-row: 1; font-size: 0.85rem; font-weight: 600;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 160px); }
  .wl-label  { grid-column: 3; grid-row: 1; font-size: 0.62rem; padding: 1px 6px; white-space: nowrap; }
  /* riga 2: timestamps compatti | azioni */
  .wl-timestamps {
    grid-column: 2; grid-row: 2;
    display: flex !important;
    flex-wrap: wrap;
    gap: 0 0.55rem;
    margin-top: 3px;
  }
  .wl-ts { font-size: 0.62rem !important; }
  .wl-ts-expiry { font-size: 0.6rem !important; }
  .wl-sigs { display: none; }
  .wl-row-actions {
    grid-column: 3; grid-row: 2;
    gap: 0.15rem;
    margin-left: 0;
    margin-top: 3px;
    justify-content: flex-end;
  }
  /* Bottoni azione: solo icone, compatti */
  .wl-row-actions button {
    width: 26px; height: 26px;
    font-size: 0.7rem;
    padding: 0;
  }
  .wl-row-actions .btn-wl-whois { font-size: 0.6rem; width: auto; padding: 0 5px; }
  .wl-row-actions button svg { width: 11px; height: 11px; }

  /* Cronologia: card list al posto della tabella */
  .history-table { display: none; }
  .history-cards { display: flex !important; flex-direction: column; gap: 0; }

  /* Quick actions: 2 colonne */
  .quick-actions { grid-template-columns: 1fr 1fr; }

  /* Content card padding ridotto */
  .content-card { padding: 1rem 0.85rem; }

  /* Bottom mobile nav */
  .sidebar-nav-mobile {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 130;
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sidebar-nav-mobile::-webkit-scrollbar { display: none; }
  .mobile-nav-item {
    flex: 1;
    min-width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 3px;
    color: var(--text-muted);
    font-size: 0.58rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.12s;
  }
  .mobile-nav-item svg { width: 20px; height: 20px; }
  .mobile-nav-item.active { color: var(--accent); }
  .main-content { padding-bottom: 60px; }
}

@media (min-width: 769px) {
  .sidebar-nav-mobile { display: none !important; }
}

/* ═══ Legacy layout helpers (mantenuti per compatibilità) ══ */
.card h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.1rem; }
.main { display: flex; flex-direction: column; gap: 1.5rem; }
.footer { display: none; }

.title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.tagline {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.tagline a {
  color: var(--accent);
  text-decoration: none;
}

.tagline a:hover {
  text-decoration: underline;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-checkbox {
  margin-top: -0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.scan-options-optional {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  grid-column: 1 / -1;
}

.scan-options-optional.hidden {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.field input,
.field select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field-submit {
  align-self: flex-end;
}

.btn {
  padding: 0.6rem 1.1rem;
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-whois {
  margin-top: 0.75rem;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-whois:hover:not(:disabled) {
  background: var(--border);
}

.whois-optional {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.whois-content {
  margin-top: 0.5rem;
  min-height: 1rem;
}

/* ── Pagina Verifica: form compatto ────────────────────────────── */
.check-form-card { padding: 1rem 1.1rem; }

.check-form { display: flex; flex-direction: column; gap: 0; }

.check-input-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.check-input-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.check-input-row input:focus { border-color: var(--accent); }
.check-input-row input::placeholder { color: var(--text-muted); font-family: var(--font-sans); }
.check-input-row .btn { flex-shrink: 0; white-space: nowrap; }

/* ── Ricerche recenti (sotto il form Verifica) ─────────────────── */
.recent-checks {
  padding: 0.55rem 0.2rem 0.2rem;
}
.recent-checks-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
  padding-left: 0.1rem;
}
.recent-checks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.rc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.2;
}
.rc-pill:hover { border-color: var(--text-muted); background: var(--hover-bg); }
.rc-pill.rc-avail { border-color: rgba(107,207,127,.35); color: var(--text); }
.rc-pill.rc-avail:hover { border-color: var(--success); }
.rc-pill.rc-reg   { border-color: rgba(224,124,124,.25); color: var(--text-muted); }
.rc-pill.rc-reg:hover { border-color: var(--registered); color: var(--text); }
.rc-ts {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-left: 0.1rem;
}

/* ── Card risultato DNS ────────────────────────────────────────── */
.check-result-card { animation: check-card-in 0.18s ease; }
@keyframes check-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.check-loading {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.check-result-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.check-available,
.check-registered {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  flex: 1 1 auto;
}
.check-available { color: var(--success); }
.check-registered { color: var(--registered); }
.check-available svg,
.check-registered svg { width: 18px; height: 18px; flex-shrink: 0; }

.check-sigs {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* Griglia 2 colonne per i 4 check DNS */
.check-dns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.check-dns-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.78rem;
}
.dns-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dns-found .dns-dot  { background: var(--success); }
.dns-absent .dns-dot { background: var(--border); }
.dns-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.dns-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dns-state {
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.dns-found .dns-state  { color: var(--success); }
.dns-absent .dns-state { color: var(--text-muted); }

.check-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Card WHOIS ─────────────────────────────────────────────────── */
.check-whois-card { animation: check-card-in 0.18s ease; }
.check-whois-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.check-whois-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.whois-pre {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}
.whois-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* Mantiene .result-box per usi legacy (scan etc.) */
.result-box {
  padding: 0.75rem;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.result-box:empty {
  display: none;
}

.result-box.empty {
  color: var(--text-muted);
}

.result-single .available {
  color: var(--success);
  font-weight: 500;
}

.result-single .registered {
  color: var(--registered);
}

.result-single .signatures {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.details-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.details-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.details-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.detail-item {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-id {
  font-family: var(--font-mono);
  font-weight: 500;
  min-width: 5.5rem;
}

.detail-item.found .detail-id {
  color: var(--registered);
}

.detail-item.not-found .detail-id {
  color: var(--text-muted);
}

.detail-label {
  color: var(--text-muted);
  flex: 1;
}

.detail-result {
  font-size: 0.8rem;
}

.detail-item.found .detail-result {
  color: var(--registered);
}

.detail-item.not-found .detail-result {
  color: var(--text-muted);
}

.detail-value {
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-muted);
  max-height: 28rem;
  overflow-y: auto;
}

.error-detail {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--registered);
}

.result-scan .summary {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.result-scan .summary-count {
  padding: 0.5rem 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.result-scan .summary-count strong {
  color: var(--accent);
}

.result-scan .list {
  height: 480px;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-right: 4px;
}

.result-scan .list .domain {
  padding: 0.25rem 0;
  line-height: 1.2;
  border-bottom: 1px solid var(--border);
}

.result-scan .list .domain.avail {
  color: var(--success);
}

.result-scan .list .domain.reg {
  color: var(--registered);
}

.result-scan .loading {
  color: var(--text-muted);
}

.error-msg {
  color: var(--registered);
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Stili per filtro e controlli scansione */
.scan-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text);
}

.filter-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Stili per lista domini con WHOIS */
.domain {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.26rem 0.4rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  line-height: 1.2;
  border-radius: 4px;
  transition: background 0.1s;
}
.domain:last-child { border-bottom: none; }
.domain:hover { background: rgba(255,255,255,0.03); }

/* Domini disponibili: verde sottile a sinistra */
.domain.avail {
  border-left: 2px solid var(--success);
  padding-left: 0.75rem;
}
/* Domini registrati: sfondo scuro, testo muted */
.domain.reg {
  border-left: 2px solid rgba(224,124,124,0.35);
  padding-left: 0.75rem;
  opacity: 0.72;
}
.domain.reg .domain-name {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(224,124,124,0.4);
}

.domain-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-whois-mini {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(124,156,255,0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.btn-whois-mini:hover {
  background: rgba(124,156,255,0.12);
}
/* WHOIS per domini registrati: colore più neutro */
.domain.reg .btn-whois-mini {
  color: var(--text-muted);
  border-color: var(--border);
}
/* Badge "free" quando WHOIS non ha dati */
.whois-free {
  color: var(--text-muted) !important;
  border-color: transparent !important;
  background: transparent !important;
  font-style: italic;
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}
.domain.reg .btn-whois-mini:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.btn-whois-mini:hover {
  background: var(--accent-hover);
}

.whois-result {
  width: 100%;
  margin-top: 0.5rem;
}

.whois-text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.85rem;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
}

.loading-mini {
  color: var(--accent);
  font-size: 0.85rem;
}

.no-whois {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.error-mini {
  color: var(--registered);
  font-size: 0.85rem;
}

/* ─── Scan: tab modalità ────────────────────────────────────────────────── */

.scan-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.scan-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.85rem;
  margin-bottom: -1px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tab-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
}
.scan-tab.active .tab-icon { opacity: 1; }

.scan-tab:hover {
  color: var(--text);
}

.scan-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Scan: blocchi modalità ─────────────────────────────────────────────── */

.scan-mode-block {
  margin-bottom: 1.25rem;
}

.mode-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

.mode-hint strong { color: var(--text); }
.mode-hint em { color: var(--accent); font-style: normal; }

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.field-grow {
  flex: 1 1 140px;
}

.field-align-end {
  padding-bottom: 0.55rem;
}

/* ─── Scan: word builder (prima + parola + dopo) ────────────────────────── */

.word-builder {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.word-builder-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

/* ─── Pillole posizione (C/V/lettera/*) ──────────────── */
.cv-row {
  display: flex;
  gap: 3px;
  justify-content: center;
  min-height: 26px;
  margin-top: 3px;
}
/* pillola CV singola per posizione */
.cv-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.cv-pill:focus { box-shadow: 0 0 0 2px rgba(124,156,255,0.35); }
.cv-pill.cv-any    { color: var(--text-muted); border-color: var(--border); }
.cv-pill.cv-c      { color: var(--accent);   background: rgba(124,156,255,0.18); border-color: rgba(124,156,255,0.5); }
.cv-pill.cv-v      { color: var(--success);  background: rgba(107,207,127,0.18); border-color: rgba(107,207,127,0.5); }
.cv-pill.cv-letter { color: #ffb95a;          background: rgba(255,185,90,0.18);  border-color: rgba(255,185,90,0.5); }
.cv-pill.cv-input  { border-color: var(--accent); background: rgba(124,156,255,0.1); padding: 0 4px; }
.cv-inline-inp {
  width: 18px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffb95a;
  text-align: center;
  caret-color: var(--accent);
  padding: 0;
}
.cv-inline-inp::placeholder { color: var(--border); font-size: 0.55rem; }

/* legenda pillole CV */
.cv-legend {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: 4px 0 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  align-items: center;
}
.cv-legend-any  { font-weight: 800; font-family: var(--font-mono); color: var(--text-muted); }
.cv-legend-c    { font-weight: 800; font-family: var(--font-mono); color: var(--accent); }
.cv-legend-v    { font-weight: 800; font-family: var(--font-mono); color: var(--success); }
.cv-legend-l    { font-weight: 800; font-family: var(--font-mono); color: #ffb95a; }

.word-builder-side label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.word-builder-side input[type="number"] {
  width: 4rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
}

.word-builder-side input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}

.word-builder-sep {
  font-size: 1.2rem;
  color: var(--text-muted);
  padding-bottom: 0.45rem;
  user-select: none;
}

.word-builder-center {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 120px;
}

.word-builder-center label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.word-builder-center input[type="text"] {
  padding: 0.5rem 0.65rem;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.word-builder-center input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-hover);
}

/* anteprima formula */
.word-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 1.2rem;
  padding: 0.3rem 0.1rem;
  font-family: var(--font-mono);
}

.wp-label { color: var(--text-muted); }
.wp-var   { color: var(--success); font-weight: 600; }
.wp-word  { color: var(--accent); font-weight: 600; }
.wp-placeholder { color: var(--border); }

/* ─── Scan: TLD quick-select ─────────────────────────────────────────────── */

.scan-tld-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.scan-tld-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 2rem;
}

.tld-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tld-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tld-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.tld-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.tld-input {
  width: 6rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.tld-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── Scan: opzioni avanzate ─────────────────────────────────────────────── */

.advanced-opts {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.advanced-opts > summary {
  padding: 0.55rem 0.9rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.advanced-opts > summary::-webkit-details-marker { display: none; }

.advanced-opts > summary::before {
  content: '›';
  display: inline-block;
  transition: transform 0.2s;
  font-size: 1rem;
  color: var(--text-muted);
}

.advanced-opts[open] > summary::before {
  transform: rotate(90deg);
}

.advanced-opts > summary:hover {
  color: var(--text);
}

.advanced-fields {
  padding: 0.75rem 0.9rem 0.9rem;
  border-top: 1px solid var(--border);
}

/* ─── Scan: submit row + stima ───────────────────────────────────────────── */

.scan-submit-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.scan-estimate {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ─── Scan: strategie ────────────────────────────────────────────────────── */

.scan-strategies {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.scan-strategies > summary {
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  color: var(--text-muted);
}

.scan-strategies > summary::-webkit-details-marker { display: none; }
.scan-strategies > summary::before {
  content: '›';
  display: inline-block;
  transition: transform 0.2s;
  font-size: 1rem;
}
.scan-strategies[open] > summary::before { transform: rotate(90deg); }
.scan-strategies > summary:hover { color: var(--text); }
.scan-strategies > summary .tab-icon { width: 14px; height: 14px; opacity: 0.7; }

.strategies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
}

.strategy-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.strategy-card .strategy-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  opacity: 0.8;
}
.strategy-card .strategy-icon svg {
  width: 100%;
  height: 100%;
}

.strategy-card strong {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.3;
}

.strategy-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
  flex: 1;
}

.strategy-card p em {
  color: var(--accent);
  font-style: normal;
}

.btn-strategy {
  align-self: flex-start;
  margin-top: 0.35rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s, color 0.15s;
}

.btn-strategy:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ─── Cronologia ─────────────────────────────────────────────────────────── */

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.history-header h2 {
  margin: 0;
}

.history-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.history-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: transparent;
  color: var(--registered);
  border: 1px solid var(--registered);
}

.btn-danger:hover:not(:disabled) {
  background: var(--registered);
  color: var(--bg);
}

.history-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.history-list {
  overflow-x: auto;
}

/* Card list cronologia mobile (nascosta su desktop) */
.history-cards {
  display: none;
  flex-direction: column;
  gap: 0;
}
.h-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.h-card:last-child { border-bottom: none; }
.h-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.h-card-domain {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  flex: 1 1 auto;
}
.h-card-esito {
  font-size: 0.8rem;
}
.h-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.h-card-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.h-card-actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.history-table thead th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.history-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

.history-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.h-dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.h-time {
  font-size: 0.72rem;
  opacity: 0.75;
}

.h-type {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.type-check {
  background: rgba(124, 156, 255, 0.15);
  color: var(--accent);
}

.type-scan {
  background: rgba(107, 207, 127, 0.12);
  color: var(--success);
}

.h-domain {
  font-family: var(--font-mono);
  font-weight: 500;
}

.h-query {
  max-width: 160px;
  word-break: break-all;
}

.h-available {
  color: var(--success);
  font-weight: 500;
}

.h-registered {
  color: var(--registered);
}

.h-sigs {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.btn-rerun {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 5px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  transition: background 0.15s;
}

.btn-rerun:hover {
  background: rgba(124, 156, 255, 0.15);
}

.h-metodo {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-top: 0.2rem;
  letter-spacing: 0.01em;
}

.metodo-dns {
  background: rgba(152, 152, 160, 0.15);
  color: var(--text-muted);
}

.metodo-whois-auto {
  background: rgba(107, 207, 127, 0.12);
  color: var(--success);
}

.metodo-whois {
  background: rgba(124, 156, 255, 0.18);
  color: var(--accent);
}

/* ── Live scan window ──────────────────────────────────────────────────── */

.live-window {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(124, 156, 255, 0.06);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.live-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  flex: 1 1 auto;
}

.live-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.live-meta .live-checked,
.live-meta .live-total {
  color: var(--text);
  font-weight: 600;
}

.live-meta .live-avail {
  color: var(--success);
  font-weight: 700;
}

.btn-live-stop {
  background: transparent;
  border: 1px solid var(--registered);
  color: var(--registered);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-live-stop:hover:not(:disabled) {
  background: var(--registered);
  color: #fff;
}

.btn-live-stop:disabled {
  opacity: 0.4;
  cursor: default;
}

.live-progress-track {
  height: 4px;
  background: var(--border);
  overflow: hidden;
}

.live-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}

/* Animazione pulse quando la barra è a 0 (scan appena partita) */
.live-bar[style*="width: 0%"],
.live-bar:not([style]) {
  animation: live-pulse 1.4s ease-in-out infinite;
  width: 100% !important;
  background: linear-gradient(90deg,
    transparent 0%, rgba(124,156,255,0.35) 40%,
    rgba(107,207,127,0.35) 60%, transparent 100%);
  background-size: 200% 100%;
}

@keyframes live-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.live-list-wrap {
  height: 480px;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 0.5rem 0.25rem 0.5rem 0;
  scroll-behavior: smooth;
}

.live-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.live-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.14rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.3;
  color: var(--text-muted);
  animation: live-row-in 0.12s ease;
}

@keyframes live-row-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.live-row-avail {
  color: var(--success);
  background: rgba(107, 207, 127, 0.07);
}

/* Intestazione live con label job */
.live-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1 1 auto;
  min-width: 0;
}
.live-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-job-id {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  opacity: 0.5;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Sezione scansioni recenti (jobs) ────────────────────────────────────── */
.jobs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.jobs-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.jobs-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
}
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.job-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.job-row:last-child { border-bottom: none; }
.job-row-open { background: rgba(124,156,255,0.04); border-radius: 8px; }

/* Intestazione cliccabile del job */
.job-summary {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0.1rem;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.job-summary:hover { opacity: 0.85; }

.job-chevron {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}
.job-chevron svg { width: 16px; height: 16px; }
.job-row-open .job-chevron { transform: translateY(-50%) rotate(180deg); }

.job-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding-right: 24px; /* spazio per il chevron */
}

/* Pannello espanso inline */
.job-panel {
  padding: 0 0 0.75rem;
  animation: job-panel-in 0.15s ease;
}
@keyframes job-panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.job-panel-stream {
  border-radius: 8px;
  overflow: visible;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  min-height: 60px;
}
.job-panel-stream .result-scan {
  padding: 0.5rem 0.75rem 0.25rem;
}
.job-panel-footer {
  display: flex;
  justify-content: flex-end;
}
.job-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.job-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}
.job-running {
  background: rgba(124, 156, 255, 0.15);
  color: var(--accent);
  animation: pulse-badge 1.5s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.job-done  { background: rgba(107,207,127,.15); color: var(--success); }
.job-error { background: rgba(224,124,124,.15); color: var(--registered); }
.job-avail { color: var(--success); font-weight: 700; }
.job-err-msg { color: var(--registered); font-size: 0.68rem; }
.job-time  { color: var(--text-muted); }
.job-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.job-progress-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.job-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  transition: width 0.4s ease;
}
.job-pct {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}
.job-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.live-row-icon {
  font-size: 0.72rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.live-row-domain {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Gruppo dizionario (checkbox + select lingua) ───────────────────── */
.dict-field-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  min-height: 2.2rem;
}
.checkbox-compact {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex: 1;
}
.checkbox-compact input[type="checkbox"] {
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}
/* Pillole lingua (lang flags) */
.lang-flags {
  display: none;
  gap: 0.22rem;
  align-items: center;
}
.checkbox-compact:has(input:checked) ~ .lang-flags {
  display: flex;
}
.lang-flag {
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  line-height: 1.4;
  user-select: none;
}
.lang-flag:hover { border-color: var(--text-muted); color: var(--text); }
.lang-flag.active {
  background: rgba(124,156,255,0.15);
  border-color: var(--accent);
  color: var(--accent);
}
/* legacy select nascosto */
.dict-lang-select { display: none !important; }

/* ─── Pulsante ★ watchlist ─────────────────────────────────────────────── */
.btn-wl-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0 4px;
  transition: color 0.15s, transform 0.12s;
  vertical-align: middle;
  flex-shrink: 0;
}
.btn-wl-star:hover { color: var(--accent); transform: scale(1.2); }
.btn-wl-star.wl-starred { color: var(--accent); }

/* nella live-row il label e la star affiancati */
.live-row { display: flex; align-items: center; gap: 4px; }
.live-row-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Sezione Watchlist ────────────────────────────────────────────────── */
.card-watchlist {
  padding: 1.4rem 1.6rem;
}
.wl-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 1rem;
}
.wl-header h2 { margin: 0; font-size: 1.1rem; }
.wl-hint {
  flex: 1 1 100%;
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.wl-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  vertical-align: middle;
  margin-left: 4px;
}
.wl-actions { margin-left: auto; }
.wl-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.8rem 0;
}
.wl-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Riga singola — tutto su una linea */
.wl-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.85rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background 0.12s;
  min-width: 0;
}
.wl-row:last-child { border-bottom: none; }
.wl-row:hover { background: #1e1e24; }
.wl-row.wl-avail { border-left-color: var(--success); }
.wl-row.wl-reg   { border-left-color: var(--registered); }

/* Icona ✓ / ✗ */
.wl-icon {
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}
.wl-row.wl-avail .wl-icon { color: var(--success); }
.wl-row.wl-reg   .wl-icon { color: var(--registered); }

/* Nome dominio */
.wl-domain {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 200px;
}

/* Badge Disponibile / Registrato */
.wl-label {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.wl-avail .wl-label { background: rgba(107,207,127,.15); color: var(--success); }
.wl-reg   .wl-label { background: rgba(224,124,124,.15); color: var(--registered); }

/* Firme DNS */
.wl-sigs {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 0;
  min-width: 0;
}

/* Timestamps (aggiunto / DNS / WHOIS) */
.wl-timestamps {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: auto;
  align-items: flex-end;
  flex-shrink: 0;
}
.wl-ts {
  font-size: 0.65rem;
  white-space: nowrap;
  line-height: 1.35;
}
.wl-ts-added       { color: var(--text-muted); opacity: 0.7; }
.wl-ts-dns         { color: var(--accent); opacity: 0.85; }
.wl-ts-dns-reg     { color: var(--registered); opacity: 0.85; }
.wl-ts-whois       { color: var(--success); opacity: 0.85; }
.wl-ts-whois-reg   { color: var(--registered); opacity: 0.85; }
.wl-ts-archive     { color: #e8c84a; opacity: 0.9; }
.wl-ts-archive-none { color: var(--text-muted); opacity: 0.7; }
.wl-ts-whois-free  { color: var(--text-muted); opacity: 0.75; font-style: italic; }
.wl-ts-expiry      { opacity: 0.75; font-style: italic; margin-left: 2px; }

/* Data ultimo controllo (legacy) */
.wl-row-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* Pulsanti azione */
.wl-row-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* ── Accordion WHOIS inline (watchlist) ─────────────────────────── */
.wl-whois-box {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.18s ease;
  border-bottom: none;
  padding: 0 0.9rem;
  background: var(--surface);
}
.wl-whois-box.wl-whois-open {
  max-height: 600px;
  opacity: 1;
  padding: 0.6rem 0.9rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.wl-whois-box:empty { padding: 0; border-bottom: none; max-height: 0; opacity: 0; }

/* Griglia campi strutturati */
.wl-whois-panel { display: flex; flex-direction: column; gap: 0.4rem; }
.wl-wh-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.18rem 0.9rem;
  font-size: 0.78rem;
}
.wl-wh-row { display: contents; }
.wl-wh-key {
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0.08rem 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wl-wh-val {
  color: var(--text);
  word-break: break-word;
  padding: 0.08rem 0;
  line-height: 1.4;
}

/* Sezione raw text collassabile */
.wl-wh-raw-wrap {
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 0.35rem;
}
.wl-wh-raw-toggle {
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.wl-wh-raw-toggle::before { content: '▶'; font-size: 0.55rem; transition: transform 0.15s; }
details[open] .wl-wh-raw-toggle::before { transform: rotate(90deg); }
.wl-wh-raw {
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg);
  color: var(--text-muted);
  padding: 0.55rem;
  border-radius: 5px;
  max-height: 220px;
  overflow-y: auto;
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.45;
  border: 1px solid var(--border);
}

/* legacy .whois-text (usato altrove) */
.wl-whois-box pre {
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg);
  color: var(--text);
  padding: 0.6rem;
  border-radius: 6px;
  max-height: 280px;
  overflow-y: auto;
  margin: 0.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.btn-wl-recheck-one,
.btn-wl-whois,
.btn-wl-archive,
.btn-wl-remove {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 8px;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  white-space: nowrap;
  line-height: 1.6;
}
.btn-wl-recheck-one:hover { background: #1e2c1e; border-color: var(--success); color: var(--success); }
.btn-wl-whois:hover       { background: #1c1e2c; border-color: var(--accent);  color: var(--accent); }
.btn-wl-archive           { color: #9ab; padding: 2px 7px; }
.btn-wl-archive:hover     { background: #152030; border-color: #4a9aba; color: #6bbcdc; }
.btn-wl-archive svg       { display: block; }
.wl-ts-icon               { display: inline-block; vertical-align: middle; margin-bottom: 1px; }
.btn-wl-remove            { color: var(--registered); }
.btn-wl-remove:hover      { background: #2c1e1e; border-color: var(--registered); }

/* ── Internet Archive badge nella card ───────────────────────────── */
.wl-ts-archive-link { color: #e8c84a; font-weight: 700; text-decoration: none; }
.wl-ts-archive-link:hover { text-decoration: underline; }

/* ── Pagina Impostazioni ─────────────────────────────────────────── */
.settings-card { padding: 1.25rem 1.4rem; margin-bottom: 0; }
.settings-section-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.3rem;
}
.settings-section-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  line-height: 1.5;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}
.settings-row:first-of-type { border-top: none; }
.settings-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.settings-row-label {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}
.settings-row-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Toggle switch */
.settings-toggle {
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.settings-toggle input { display: none; }
.settings-toggle-track {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
}
.settings-toggle input:checked + .settings-toggle-track {
  background: var(--accent);
}
.settings-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.settings-toggle input:checked + .settings-toggle-track .settings-toggle-thumb {
  transform: translateX(18px);
}

/* Input numerico */
.settings-input {
  width: 80px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  text-align: right;
}
.settings-input:focus { outline: none; border-color: var(--accent); }
.settings-input-wide  { width: 100%; max-width: 380px; text-align: left; font-family: var(--font-mono); font-size: 0.75rem; }

/* Azioni */
.settings-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.settings-saved-msg {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.settings-saved-ok { color: var(--success); }

/* ══════════════════════════════════════════════════════════════════
   CARRELLO ACQUISTI
   ══════════════════════════════════════════════════════════════════ */

/* ── FAB (pulsante flottante) ─────────────────────────────────── */
.cart-fab {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  z-index: 1200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
  transition: background 0.15s, transform 0.12s;
}
.cart-fab:hover { background: var(--accent-hover, #5060d0); transform: scale(1.07); }

.cart-fab-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--registered);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  pointer-events: none;
}

/* ── Pannello laterale ────────────────────────────────────────── */
.cart-panel {
  position: fixed;
  bottom: 5.2rem;
  right: 1.6rem;
  z-index: 1199;
  width: 340px;
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.cart-panel-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}
.cart-panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0 5px;
  margin-left: 6px;
}
.cart-panel-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.1s;
}
.cart-panel-close:hover { color: var(--registered); }

.cart-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.cart-empty {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1.5rem 1rem;
}

/* ── Singola riga nel pannello ────────────────────────────────── */
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  transition: background 0.1s;
}
.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: var(--surface-hover, rgba(255,255,255,0.04)); }

.cart-item-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.cart-item-domain {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}
.cart-item-price {
  font-size: 0.72rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.cart-price-reg   { color: var(--success); font-weight: 700; }
.cart-price-renew { color: var(--text-muted); margin-left: 3px; }
.cart-price-loading { color: var(--text-muted); font-style: italic; }
.cart-price-err   { color: var(--text-muted); }

.cart-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Bottone Acquista OVH ──────────────────────────────────────── */
.btn-cart-buy {
  display: inline-block;
  border: 1px solid #3a6db5;
  background: #0d1a30;
  color: #7aaee8;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  line-height: 1.6;
}
.btn-cart-buy:hover:not(:disabled) { background: #112244; border-color: #5a8dd5; color: #a8ccf0; }
.btn-cart-buy:disabled { opacity: 0.6; cursor: wait; }
.btn-cart-buy.cart-buy-ok { background: #0d2a1a; border-color: #3a8a5a; color: #6ac88a; cursor: default; }

.cart-buy-result {
  font-size: 0.68rem;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  grid-column: 1 / -1;
}
.cart-buy-result a { color: inherit; text-decoration: underline; }
.cart-buy-success { background: #0d2a1a; color: #6ac88a; border: 1px solid #2a5a3a; }
.cart-buy-err     { background: #2a0d0d; color: #e87a7a; border: 1px solid #5a2a2a; }

.btn-cart-remove {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 6px;
  transition: color 0.1s, background 0.1s;
  line-height: 1.6;
}
.btn-cart-remove:hover { color: var(--registered); background: #2c1e1e; border-color: var(--registered); }

.cart-panel-footer {
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.btn-cart-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.btn-cart-clear:hover { color: var(--registered); border-color: var(--registered); background: #2c1e1e; }

/* ── Bottone carrello nella riga watchlist ────────────────────── */
.btn-wl-cart {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 8px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
  line-height: 1.6;
}
.btn-wl-cart:hover       { background: #1a2040; border-color: var(--accent); color: var(--accent); }
.btn-wl-cart-active      { border-color: var(--accent); color: var(--accent); background: #151c38; }
.btn-wl-cart-active:hover { background: #1a2040; }

/* ── Responsive: su mobile il pannello occupa tutta la larghezza ── */
@media (max-width: 480px) {
  .cart-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 4.8rem;
  }
  .cart-fab {
    right: 1rem;
    bottom: 1rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   MODALE ACQUISTO
══════════════════════════════════════════════════════════════════ */
.buy-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.buy-modal-overlay.hidden { display: none; }
.buy-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%; max-width: 420px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.buy-modal-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.buy-modal-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.buy-modal-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0;
}
.buy-modal-body { padding: 1.25rem; }
.buy-modal-domain {
  font-size: 1.1rem; font-weight: 600; color: var(--accent);
  margin-bottom: 0.5rem;
}
.buy-modal-price {
  font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 1rem;
}
.buy-modal-info {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.buy-modal-info label {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.82rem; color: var(--text); cursor: pointer;
}
.buy-modal-info input[type="radio"] { margin-top: 2px; accent-color: var(--accent); }
.buy-modal-info strong { display: block; }
.buy-modal-info span { color: var(--text-muted); }
.buy-modal-footer {
  padding: 0.75rem 1.25rem 1rem;
  display: flex; gap: 0.5rem; justify-content: flex-end;
}
.btn-buy-cancel {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 7px;
  padding: 0.45rem 1rem; font-size: 0.85rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-buy-cancel:hover { border-color: var(--text-muted); color: var(--text); }
.btn-buy-confirm {
  background: var(--accent); border: none; color: #fff;
  border-radius: 7px; padding: 0.45rem 1.2rem;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.btn-buy-confirm:hover { opacity: 0.85; }

/* ══════════════════════════════════════════════════════════════════
   SEZIONE ACQUISTI
══════════════════════════════════════════════════════════════════ */
.purchases-section { margin-bottom: 2rem; }
.purchases-section-title {
  font-size: 1.25rem; font-weight: 700; margin: 0 0 0.25rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.purchases-section-count {
  background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 600;
  padding: 1px 7px; border-radius: 10px;
}
.purchases-auth-warn {
  background: #2a1f00; border: 1px solid #5a4000;
  color: #e0b030; border-radius: 8px;
  padding: 0.6rem 1rem; font-size: 0.82rem;
  margin-bottom: 1rem; display: none;
}
.purchases-auth-warn a { color: #f0c040; text-decoration: underline; cursor: pointer; }

/* Griglia domini OVH */
.ovh-domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.ovh-domain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s;
}
.ovh-domain-card:hover { border-color: var(--accent); }
.ovh-domain-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.4rem;
}
.ovh-domain-name {
  font-weight: 600; font-size: 0.95rem;
  color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 160px;
}
.domain-state-badge {
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.state-ok       { background: #0f2a1a; color: #3ecf6e; border: 1px solid #1a4a30; }
.state-expired  { background: #2a0f0f; color: #e05050; border: 1px solid #4a1a1a; }
.state-deleting { background: #2a1f00; color: #e0a030; border: 1px solid #5a4000; }
.state-other    { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.ovh-domain-meta {
  display: flex; flex-direction: column; gap: 0.15rem;
}
.ovh-meta-row {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; color: var(--text-muted);
}
.ovh-meta-row svg { flex-shrink: 0; }
.domain-renew-badge {
  font-size: 0.68rem; padding: 1px 6px; border-radius: 8px;
  text-transform: lowercase;
}
.renew-auto     { background: #0f2a1a; color: #3ecf6e; border: 1px solid #1a4a30; }
.renew-manual   { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.renew-cancel   { background: #2a0f0f; color: #e05050; border: 1px solid #4a1a1a; }
.expiry-ok      { color: #3ecf6e; }
.expiry-warn    { color: #e0a030; }
.expiry-expired { color: #e05050; }

/* Ordini OVH */
.ovh-orders-list { display: flex; flex-direction: column; gap: 0.6rem; }
.ovh-order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}
.ovh-order-domain { font-weight: 600; font-size: 0.9rem; flex: 1; min-width: 120px; }
.ovh-order-meta   { font-size: 0.75rem; color: var(--text-muted); }
.ovh-order-status {
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
  text-transform: uppercase;
}
.order-delivering { background: #0f2040; color: #5090f0; border: 1px solid #1a3070; }
.order-done       { background: #0f2a1a; color: #3ecf6e; border: 1px solid #1a4a30; }
.order-pending    { background: #2a1f00; color: #e0a030; border: 1px solid #5a4000; }
.order-other      { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.ovh-order-link { font-size: 0.75rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.ovh-order-link:hover { text-decoration: underline; }

/* Acquisti locali (da questa app) */
.purchase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.15s;
}
.purchase-card:hover { border-color: var(--accent); }
.purchase-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.45rem;
}
.purchase-domain { font-weight: 600; font-size: 0.95rem; }
.purchase-price  { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.purchase-card-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem;
  font-size: 0.75rem; color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.purchase-meta-item {
  display: flex; align-items: center; gap: 0.25rem;
}
.purchase-tag {
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
}
.purchase-tag-paid   { background: #0f2a1a; color: #3ecf6e; border: 1px solid #1a4a30; }
.purchase-tag-manual { background: #2a1f00; color: #e0a030; border: 1px solid #5a4000; }
.purchase-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-purchase-view {
  font-size: 0.75rem; color: var(--accent);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.2rem;
}
.btn-purchase-view:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════
   "DOMINIO È TUO"
══════════════════════════════════════════════════════════════════ */
.check-ismine {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #0f2a1a; color: #3ecf6e;
  border: 1px solid #1a4a30; border-radius: 6px;
  font-size: 0.75rem; font-weight: 600; padding: 2px 10px;
}
.check-ismine-banner {
  margin-top: 0.6rem; padding: 0.6rem 1rem;
  background: #0f2a1a; border: 1px solid #1a4a30;
  border-radius: 8px; font-size: 0.82rem; color: #3ecf6e;
}
.check-ismine-link { color: #3ecf6e; text-decoration: underline; cursor: pointer; }
.wl-mine .wl-domain { color: #3ecf6e; }
.h-mine  .h-domain  { color: #3ecf6e; }

/* ══════════════════════════════════════════════════════════════════
   MOBILE — refinements
══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Dashboard */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .stat-card   { padding: 0.6rem 0.75rem; }
  .stat-value  { font-size: 1.4rem; }

  /* Check */
  .check-result-card { padding: 0.75rem; }
  .check-domain-name { font-size: 1.1rem; }

  /* Watchlist */
  .wl-row { padding: 0.5rem 0.6rem; gap: 0.4rem; }
  .wl-domain { font-size: 0.82rem; }
  .wl-actions { gap: 0.25rem; }
  .btn-wl-check, .btn-wl-whois, .btn-wl-archive, .btn-wl-cart, .btn-wl-del {
    padding: 2px 6px; font-size: 0.65rem;
  }

  /* Acquisti */
  .ovh-domains-grid { grid-template-columns: 1fr; }
  .ovh-domain-card  { padding: 0.7rem; }
  .ovh-order-card   { flex-direction: column; gap: 0.4rem; }
  .purchase-card    { padding: 0.7rem; }

  /* Modal */
  .buy-modal { margin: 0 0.5rem; }

  /* Bottom nav */
  .sidebar-nav-mobile { gap: 0; }
  .mobile-nav-item    { font-size: 0.58rem; padding: 0.45rem 0.3rem; min-width: 48px; }
  .mobile-nav-item svg { width: 18px; height: 18px; }
}
