/* =============================================================
   style.css — ITIS Guglielmo Marconi Verona — Linktree
   -------------------------------------------------------
   Struttura:
     1. Reset & Custom Properties
     2. Base & Body
     3. Background Orbs (glassmorphism)
     4. Layout principale (page, panel)
     5. Hero section
     6. Links section & card singola
     7. Animazione reveal (IntersectionObserver)
     8. Responsive Media Queries
     9. Reduced Motion
    10. === ADMIN DASHBOARD STYLES ===
   ============================================================= */

/* ============================================================
   1. Reset & Custom Properties
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  /* Palette frontend */
  --bg:            #eef2f6;
  --bg-2:          #f6f8fb;
  --panel:         rgba(255, 255, 255, 0.82);
  --panel-strong:  rgba(255, 255, 255, 0.93);
  --text:          #1f3a56;
  --text-soft:     #5f7690;
  --line:          rgba(31, 58, 86, 0.10);
  --gold:          #d5b24b;
  --gold-soft:     rgba(213, 178, 75, 0.15);
  --blue-soft:     rgba(96, 156, 220, 0.12);
  --shadow:        0 18px 42px rgba(40, 70, 104, 0.10);
  --shadow-soft:   0 10px 24px rgba(40, 70, 104, 0.08);
  --radius-xl:     32px;
  --radius-lg:     22px;
  --radius-md:     16px;

  /* Palette admin */
  --adm-bg:        #0d1117;
  --adm-bg-2:      #161b22;
  --adm-panel:     rgba(22, 27, 34, 0.85);
  --adm-panel-2:   rgba(30, 37, 48, 0.90);
  --adm-border:    rgba(255, 255, 255, 0.08);
  --adm-text:      #e6edf3;
  --adm-text-soft: #8b949e;
  --adm-blue:      #388bfd;
  --adm-blue-dim:  rgba(56, 139, 253, 0.15);
  --adm-gold:      #d5b24b;
  --adm-gold-dim:  rgba(213, 178, 75, 0.12);
  --adm-green:     #3fb950;
  --adm-red:       #f85149;
  --adm-red-dim:   rgba(248, 81, 73, 0.14);
  --adm-shadow:    0 16px 40px rgba(0, 0, 0, 0.45);
  --adm-radius:    16px;
  --adm-radius-sm: 10px;
}

/* ============================================================
   2. Base & Body (frontend)
   ============================================================ */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, #dbe6f2 0%, #eef3f8 12%, #f5f7fa 50%, #eef3ef 88%, #e8efe8 100%);
  padding: 22px 14px 34px;
}

/* ============================================================
   3. Background Orbs
   ============================================================ */
.bg-orb {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.orb-left {
  background: rgba(125, 174, 227, 0.22);
  top: 18px;
  left: -70px;
}

.orb-right {
  background: rgba(213, 178, 75, 0.14);
  bottom: 24px;
  right: -80px;
}

/* ============================================================
   4. Layout principale
   ============================================================ */
.page {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  margin: 0 auto;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

/* ============================================================
   5. Hero Section
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  text-align: center;
  padding: 28px 22px 28px;
  margin-bottom: 16px;
}

.logo {
  position: relative;
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  box-shadow: 0 14px 28px rgba(35, 63, 95, 0.12);
  margin-bottom: 14px;
}

.eyebrow {
  position: relative;
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2e66ab;
}

h1 {
  position: relative;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.55rem, 8vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.intro {
  position: relative;
  width: min(100%, 31ch);
  margin: 16px auto 0;
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--text-soft);
  font-weight: 600;
}

/* ============================================================
   6. Links Section
   ============================================================ */
.links-wrap {
  border-radius: var(--radius-xl);
  padding: 18px 14px 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  line-height: 1;
}

.links {
  display: grid;
  gap: 12px;
}

/* Singola card link */
.band-link {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 16px;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.band-link:hover,
.band-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(40, 70, 104, 0.12);
  border-color: rgba(46, 102, 171, 0.18);
}

.band-link:active {
  transform: translateY(0) scale(0.99);
}

.band-link--email {
  background: linear-gradient(180deg, #fffdf9, #fffaf1);
}

/* Icona link */
.icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(219, 234, 247, 0.92), rgba(243, 237, 221, 0.92));
  border: 1px solid rgba(31, 58, 86, 0.06);
}

.icon-wrap svg {
  width: 24px;
  height: 24px;
  fill: #2b5f95;
}

/* Testo link */
.text {
  min-width: 0;
}

.title {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}

.desc {
  display: block;
  margin-top: 3px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-soft);
  font-weight: 600;
}

/* Badge "Apri / Segui / Email" */
.go {
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-soft), rgba(96, 156, 220, 0.08));
  color: #8d6a14;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ============================================================
   7. Animazione reveal (gestita da script.js)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 480ms ease, transform 480ms ease;
}

/* ============================================================
   8. Responsive
   ============================================================ */
@media (min-width: 700px) {
  body {
    padding: 34px 18px 40px;
  }

  .hero {
    padding: 34px 32px 32px;
  }

  .links-wrap {
    padding: 22px 18px 20px;
  }

  .band-link {
    padding: 18px 18px;
  }
}

/* ============================================================
   9. Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }

  .reveal,
  .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ============================================================
   10. ADMIN DASHBOARD STYLES
   ============================================================ */

/* --- Reset body per le pagine admin --- */
body.admin-body {
  background: var(--adm-bg);
  color: var(--adm-text);
  font-family: "Nunito", system-ui, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* --- Navbar admin --- */
.adm-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 62px;
  background: rgba(13, 17, 23, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--adm-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.adm-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--adm-text);
  text-decoration: none;
}

.adm-navbar-brand .brand-badge {
  background: var(--adm-blue-dim);
  color: var(--adm-blue);
  border: 1px solid rgba(56, 139, 253, 0.25);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  text-transform: uppercase;
}

.adm-navbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.adm-navbar-actions a {
  color: var(--adm-text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.adm-navbar-actions a:hover {
  color: var(--adm-text);
}

.btn-logout {
  background: var(--adm-red-dim);
  color: var(--adm-red) !important;
  border: 1px solid rgba(248, 81, 73, 0.25);
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  transition: background 160ms ease !important;
}

.btn-logout:hover {
  background: rgba(248, 81, 73, 0.24) !important;
}

/* --- Contenitore principale admin --- */
.adm-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  flex: 1;
}

/* --- Tab Navigation --- */
.adm-tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--adm-border);
  margin-bottom: 32px;
  overflow-x: auto;
}

.adm-tab-btn {
  background: none;
  border: none;
  color: var(--adm-text-soft);
  font-family: "Nunito", sans-serif;
  font-size: 0.93rem;
  font-weight: 700;
  padding: 10px 20px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

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

.adm-tab-btn.active {
  color: var(--adm-blue);
  border-bottom-color: var(--adm-blue);
}

/* --- Tab Content --- */
.adm-tab-panel {
  display: none;
}

.adm-tab-panel.active {
  display: block;
}

/* --- Card Analytics (glassmorphism dark) --- */
.adm-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.adm-stat-card {
  background: var(--adm-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.adm-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--adm-blue), var(--adm-gold));
  border-radius: 16px 16px 0 0;
}

.adm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--adm-shadow);
}

.adm-stat-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--adm-text-soft);
  margin: 0 0 10px;
}

.adm-stat-value {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--adm-text);
  line-height: 1;
  font-family: "Cormorant Garamond", serif;
}

.adm-stat-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  opacity: 0.12;
  font-size: 2.8rem;
}

/* --- Sezione heading admin --- */
.adm-section-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--adm-text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-section-title .tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--adm-blue-dim);
  color: var(--adm-blue);
}

/* --- Tabella admin --- */
.adm-table-wrap {
  overflow-x: auto;
  border-radius: var(--adm-radius);
  border: 1px solid var(--adm-border);
  margin-bottom: 28px;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.adm-table th {
  background: rgba(255,255,255,0.04);
  color: var(--adm-text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--adm-border);
}

.adm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--adm-text);
  vertical-align: middle;
}

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

.adm-table tr:hover td {
  background: rgba(255,255,255,0.025);
}

.adm-table .url-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--adm-text-soft);
  font-size: 0.85rem;
}

/* Badge click counter */
.click-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--adm-gold-dim);
  color: var(--adm-gold);
  border: 1px solid rgba(213, 178, 75, 0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.click-bar-wrap {
  width: 100%;
  max-width: 180px;
}

.click-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.click-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--adm-blue), var(--adm-gold));
  border-radius: 999px;
  transition: width 600ms ease;
}

/* --- Form admin --- */
.adm-card {
  background: var(--adm-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 28px 26px;
  margin-bottom: 24px;
}

.adm-form-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--adm-text);
  margin: 0 0 20px;
}

.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.adm-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-form-group.full-width {
  grid-column: 1 / -1;
}

.adm-form-group label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-text-soft);
}

.adm-form-group input[type="text"],
.adm-form-group input[type="url"],
.adm-form-group input[type="number"],
.adm-form-group input[type="password"],
.adm-form-group input[type="file"],
.adm-form-group textarea,
.adm-form-group select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-sm);
  color: var(--adm-text);
  font-family: "Nunito", sans-serif;
  font-size: 0.94rem;
  padding: 10px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  outline: none;
  width: 100%;
}

.adm-form-group input:focus,
.adm-form-group textarea:focus,
.adm-form-group select:focus {
  border-color: var(--adm-blue);
  box-shadow: 0 0 0 3px var(--adm-blue-dim);
}

.adm-form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.adm-form-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Bottoni admin --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--adm-radius-sm);
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--adm-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(56, 139, 253, 0.30);
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--adm-text);
  border: 1px solid var(--adm-border);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.10);
}

.btn-danger {
  background: var(--adm-red-dim);
  color: var(--adm-red);
  border: 1px solid rgba(248, 81, 73, 0.2);
}

.btn-danger:hover {
  background: rgba(248, 81, 73, 0.22);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* --- Alert / Messaggio flash --- */
.adm-alert {
  border-radius: var(--adm-radius-sm);
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-alert-success {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.25);
  color: var(--adm-green);
}

.adm-alert-error {
  background: var(--adm-red-dim);
  border: 1px solid rgba(248, 81, 73, 0.25);
  color: var(--adm-red);
}

/* --- Login Page --- */
.adm-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(56, 139, 253, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(213, 178, 75, 0.06) 0%, transparent 60%),
    var(--adm-bg);
}

.adm-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--adm-panel-2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--adm-border);
  border-radius: 24px;
  padding: 42px 38px;
  box-shadow: var(--adm-shadow);
}

.adm-login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.adm-login-logo .login-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--adm-blue-dim);
  border: 1px solid rgba(56, 139, 253, 0.25);
  display: inline-grid;
  place-items: center;
  font-size: 2rem;
  margin-bottom: 14px;
}

.adm-login-logo h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--adm-text);
  margin: 0 0 4px;
  font-family: "Nunito", sans-serif;
  letter-spacing: normal;
}

.adm-login-logo p {
  color: var(--adm-text-soft);
  font-size: 0.88rem;
  margin: 0;
}

.adm-login-form .adm-form-group {
  margin-bottom: 16px;
}

.adm-login-form .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 1rem;
  margin-top: 6px;
}

/* --- Rank bar (top link) --- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-sm);
}

.rank-pos {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--adm-text-soft);
  min-width: 22px;
}

.rank-title {
  font-weight: 700;
  font-size: 0.94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-clicks {
  font-weight: 800;
  font-size: 1rem;
  color: var(--adm-gold);
}

/* --- Divisore --- */
.adm-divider {
  border: none;
  border-top: 1px solid var(--adm-border);
  margin: 24px 0;
}

/* ============================================================
   11. SVG UPLOAD WIDGET STYLES
   ============================================================ */

/* Contenitore principale della sezione icona */
.svg-upload-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Riga con label + bottone sfoglia */
.svg-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Label cliccabile che mostra il nome file */
.svg-file-label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 139, 253, 0.08);
  border: 1px dashed rgba(56, 139, 253, 0.3);
  border-radius: var(--adm-radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--adm-blue);
  transition: background 160ms ease, border-color 160ms ease;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svg-file-label:hover {
  background: rgba(56, 139, 253, 0.14);
  border-color: rgba(56, 139, 253, 0.5);
}

.svg-file-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Anteprima dell'icona attuale (in modifica) */
.svg-current-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(213, 178, 75, 0.06);
  border: 1px solid rgba(213, 178, 75, 0.18);
  border-radius: var(--adm-radius-sm);
  transition: opacity 300ms ease;
}

/* Anteprima live del file caricato */
.svg-live-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(56, 139, 253, 0.06);
  border: 1px solid rgba(56, 139, 253, 0.18);
  border-radius: var(--adm-radius-sm);
  flex-wrap: wrap;
}

/* Box che contiene l'icona SVG renderizzata */
.svg-preview-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  flex-shrink: 0;
}

.svg-preview-icon svg {
  fill: #2b5f95;
}

/* Etichetta testo sopra le anteprime */
.svg-preview-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-text-soft);
  white-space: nowrap;
}

/* Divisore "oppure incolla manualmente" */
.svg-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--adm-text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.svg-or-divider::before,
.svg-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--adm-border);
}

/* ============================================================
   12. ADMIN RESPONSIVE — Mobile First
   ============================================================ */

/* --- Tablet (< 900px) --- */
@media (max-width: 900px) {
  .adm-container {
    max-width: 100%;
    padding: 24px 16px 50px;
  }

  .adm-analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Tabella: abilita scroll orizzontale su schermi stretti */
  .adm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Nasconde colonne meno importanti nella tabella link */
  .adm-table th:nth-child(2),
  .adm-table td:nth-child(2) {
    display: none; /* nasconde "Pos" su tablet */
  }

  /* Form grid: 1 colonna */
  .adm-form-grid {
    grid-template-columns: 1fr;
  }

  .adm-form-group.full-width {
    grid-column: 1;
  }

  /* Rank list */
  .rank-item {
    padding: 12px 14px;
  }
}

/* --- Mobile (< 640px) --- */
@media (max-width: 640px) {

  /* ---- Navbar ---- */
  .adm-navbar {
    padding: 0 14px;
    height: auto;
    flex-wrap: wrap;
    gap: 0;
  }

  .adm-navbar-brand {
    padding: 12px 0;
    font-size: 0.97rem;
  }

  .adm-navbar-actions {
    width: 100%;
    padding: 8px 0 10px;
    border-top: 1px solid var(--adm-border);
    gap: 10px;
    flex-wrap: wrap;
  }

  /* ---- Container ---- */
  .adm-container {
    padding: 16px 12px 48px;
  }

  /* ---- Stat cards: 1 colonna su mobile molto stretto, 2 colonne altrove ---- */
  .adm-analytics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .adm-stat-card {
    padding: 18px 14px;
  }

  .adm-stat-value {
    font-size: 1.9rem;
  }

  .adm-stat-icon {
    font-size: 2rem;
    top: 12px;
    right: 12px;
  }

  /* ---- Tab nav: scroll orizzontale ---- */
  .adm-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    padding-bottom: 0;
  }

  .adm-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .adm-tab-btn {
    padding: 10px 14px;
    font-size: 0.84rem;
    flex-shrink: 0;
  }

  /* ---- Tabella: nasconde colonne su mobile ---- */
  .adm-table th:nth-child(1),
  .adm-table td:nth-child(1) {
    display: none; /* nasconde "ID" */
  }

  .adm-table th:nth-child(4),
  .adm-table td:nth-child(4) {
    display: none; /* nasconde "URL" (visibile al click) */
  }

  .adm-table td,
  .adm-table th {
    padding: 10px 10px;
    font-size: 0.86rem;
  }

  /* Bottoni azione nella tabella: impilati */
  .adm-table td > div {
    flex-direction: column;
    gap: 6px;
  }

  /* ---- Card & form ---- */
  .adm-card {
    padding: 20px 16px;
  }

  .adm-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .adm-form-group.full-width {
    grid-column: 1;
  }

  .adm-form-actions {
    flex-direction: column;
  }

  .adm-form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* ---- Login ---- */
  .adm-login-card {
    padding: 28px 18px;
    border-radius: 18px;
  }

  .adm-login-logo .login-icon {
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
  }

  .adm-login-logo h1 {
    font-size: 1.2rem;
  }

  /* ---- Section title ---- */
  .adm-section-title {
    font-size: 1rem;
    flex-wrap: wrap;
  }

  /* ---- Rank list ---- */
  .rank-item {
    grid-template-columns: auto 1fr auto;
    padding: 10px 12px;
    gap: 8px;
  }

  .rank-title {
    font-size: 0.88rem;
  }

  /* ---- SVG upload widget ---- */
  .svg-upload-row {
    flex-direction: column;
    align-items: stretch;
  }

  .svg-file-label {
    justify-content: center;
  }

  .svg-live-preview-wrap {
    flex-wrap: wrap;
  }

  /* ---- Alert ---- */
  .adm-alert {
    font-size: 0.86rem;
    padding: 10px 14px;
  }
}

/* --- Mobile XS (< 380px) --- */
@media (max-width: 380px) {
  .adm-analytics-grid {
    grid-template-columns: 1fr;
  }

  .adm-stat-value {
    font-size: 1.7rem;
  }
}
