/* ============================================================
   AETON Business Dashboard — Design System (Optimized & Responsive)
   Nunito font, purple palette, clean & professional
   ============================================================ */

@import url('fonts/fonts.css');

:root {
  --purple: #7E57C2;
  --purple-dark: #5E35B1;
  --purple-light: #B39DDB;
  --purple-faint: rgba(126,87,194,0.08);
  --purple-border: rgba(126,87,194,0.2);

  --ink: #2D2435;
  --ink-soft: #6A6072;
  --ink-faint: #9E93A8;
  --paper: #fff;
  --bg: #F9F7FF;
  --card: #fff;
  --line: #EBE6F2;

  --green: #4CAF50;
  --red: #E53935;
  --amber: #FF8F00;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(126,87,194,0.08);
  --shadow-sm: 0 2px 12px rgba(126,87,194,0.04);

  --font: 'Nunito', Arial, sans-serif;
  --sidebar-w: 260px;
  --topbar-h: 64px;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header di servizio per mobile */
.mobile-top-bar {
  display: none;
  height: var(--topbar-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 99;
}
.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--purple);
  cursor: pointer;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-logo .logo-text {
  font-size: 1.4rem; font-weight: 900; color: var(--purple);
  letter-spacing: -0.5px;
}
.sidebar-logo .logo-badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--purple-light);
  background: var(--purple-faint); border-radius: 20px;
  padding: 2px 8px; margin-left: 6px; vertical-align: middle;
}
.sidebar-nav { flex: 1; padding: 20px 14px; overflow-y: auto; }
.nav-section-label {
  font-size: 0.72rem; font-weight: 750; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--ink-faint);
  padding: 12px 8px 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 4px;
}
.sidebar-link:hover { background: var(--purple-faint); color: var(--purple); }
.sidebar-link.active {
  background: var(--purple-faint); color: var(--purple); font-weight: 800;
}
.sidebar-link i { font-size: 1.25rem; flex-shrink: 0; }
.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--line);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm);
}
.sidebar-user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 0.9rem;
  flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-email { font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px; margin-top: 8px;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--ink-soft);
  font-family: var(--font); font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.sidebar-logout-btn:hover { border-color: var(--red); color: var(--red); background: rgba(229,57,53,0.02); }

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 40px;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; gap: 20px;
}
.page-title { font-size: 1.8rem; font-weight: 900; color: var(--ink); letter-spacing: -0.5px; }
.page-subtitle { font-size: 0.95rem; color: var(--ink-soft); font-weight: 600; margin-top: 4px; }

/* Griglia sdoppiata per form e sidebar Elisa */
.two-column-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}
.card-title { font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.card-subtitle { font-size: 0.88rem; color: var(--ink-soft); margin-top: 2px; }

/* ── STATS ROW (Dashboard) ───────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; justify-content: space-between;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--purple-faint);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple); font-size: 1.3rem;
  margin-bottom: 16px;
}
.stat-value { font-size: 1.6rem; font-weight: 900; color: var(--ink); line-height: 1.3; }
.stat-label { font-size: 0.82rem; color: var(--ink-soft); font-weight: 700; margin-top: 6px; }

/* ── QUOTA BAR ───────────────────────────────────────────── */
.quota-bar-wrap { margin-top: 14px; width: 100%; }
.quota-bar-track {
  height: 8px; background: var(--line); border-radius: 99px; overflow: hidden;
}
.quota-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple-light));
  border-radius: 99px; transition: width 0.6s ease;
}
.quota-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; font-weight: 700;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px;
  font-family: var(--font); font-size: 0.92rem; font-weight: 750;
  cursor: pointer; border: none; transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), #9C6FD6);
  color: #fff; box-shadow: 0 4px 16px rgba(126,87,194,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(126,87,194,0.3); }
.btn-outline {
  background: transparent; color: var(--purple);
  border: 1.5px solid var(--purple-border);
}
.btn-outline:hover { background: var(--purple-faint); }
.btn-danger { background: transparent; color: var(--red); border: 1.5px solid rgba(229,57,53,0.3); }
.btn-danger:hover { background: rgba(229,57,53,0.06); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-published { background: rgba(76,175,80,0.12); color: var(--green); }
.badge-draft { background: var(--purple-faint); color: var(--purple); }
.badge-expired { background: rgba(158,147,168,0.15); color: var(--ink-faint); }

/* ── THEME PILLS ─────────────────────────────────────────── */
.theme-pill {
  display: inline-block;
  padding: 3px 10px; border-radius: 20px;
  background: var(--purple-faint); color: var(--purple);
  font-size: 0.72rem; font-weight: 700; margin: 2px;
}

/* ── EVENTS TABLE / LIST ─────────────────────────────────── */
.events-list { display: flex; flex-direction: column; gap: 14px; }
.event-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
   Kakao: 16px; align-items: center; gap: 18px;
  background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid var(--line); padding: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.event-item:hover { box-shadow: var(--shadow); border-color: var(--purple-border); }
.event-cover {
  width: 80px; height: 50px; border-radius: 8px;
  object-fit: cover; background: var(--purple-faint);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light); font-size: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
}
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-info .event-title { font-weight: 800; font-size: 1rem; color: var(--ink); }
.event-info .event-meta {
  font-size: 0.82rem; color: var(--ink-soft);
  display: flex; gap: 16px; margin-top: 4px; flex-wrap: wrap;
}
.event-actions { display: flex; gap: 8px; align-items: center; }

/* ── FORM STYLES ─────────────────────────────────────────── */
.form-grid { display: grid; gap: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.82rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-soft);
}
.form-label span.required { color: var(--purple); margin-left: 3px; }
.form-input, .form-select, .form-textarea {
  font-family: var(--font); font-size: 0.95rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 16px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(126,87,194,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-hint { font-size: 0.8rem; color: var(--ink-faint); margin-top: 4px; }

/* ── CHECKBOX GRID (tematiche) ───────────────────────────── */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.theme-checkbox-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); cursor: pointer;
  transition: all 0.2s; font-size: 0.88rem; font-weight: 700;
  background: var(--paper);
}
.theme-checkbox-item:has(input:checked) {
  border-color: var(--purple); background: var(--purple-faint); color: var(--purple-dark);
}
.theme-checkbox-item input { accent-color: var(--purple); width: 16px; height: 16px; }

/* ── ELISA CARD ──────────────────────────────────────────── */
.elisa-card {
  background: linear-gradient(135deg, rgba(126,87,194,0.03), rgba(179,157,219,0.06));
  border: 1.5px solid var(--purple-border);
  border-radius: var(--radius); padding: 24px;
}
.elisa-card-title { font-weight: 900; color: var(--purple); margin-bottom: 8px; font-size: 1rem; text-align: center; }
.elisa-card-text { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 18px; text-align: center; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.login-card {
  background: var(--card); border-radius: 24px;
  border: 1px solid var(--line); padding: 48px 40px;
  box-shadow: var(--shadow); width: 100%; max-width: 440px;
}
.login-logo {
  text-align: center; margin-bottom: 32px;
}
.login-logo .logo-main { font-size: 2.2rem; font-weight: 900; color: var(--purple); letter-spacing: -1px; }
.login-logo .logo-sub {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--purple-light);
  background: var(--purple-faint); border-radius: 20px;
  padding: 3px 10px; display: inline-block; margin-top: 4px;
}
.login-title { font-size: 1.4rem; font-weight: 800; color: var(--ink); text-align: center; margin-bottom: 8px; }
.login-desc { font-size: 0.88rem; color: var(--ink-soft); text-align: center; margin-bottom: 28px; line-height: 1.5; }

/* ── ALERT / STATUS ──────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; margin-bottom: 20px;
}
.alert-error { background: rgba(229,57,53,0.08); border: 1px solid rgba(229,57,53,0.15); color: var(--red); }
.alert-success { background: rgba(76,175,80,0.08); border: 1px solid rgba(76,175,80,0.15); color: var(--green); }
.alert-info { background: var(--purple-faint); border: 1px solid var(--purple-border); color: var(--purple); }
.alert-warning { background: rgba(255,143,0,0.08); border: 1px solid rgba(255,143,0,0.15); color: var(--amber); }

/* ── UPLOAD AREA ─────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--line); border-radius: var(--radius-sm);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--bg);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--purple); background: var(--purple-faint);
}
.upload-preview {
  width: 100%; max-height: 240px; object-fit: cover;
  border-radius: var(--radius-sm); margin-top: 12px; display: none;
  border: 1px solid var(--line);
}

/* ── BILLING PAGE ────────────────────────────────────────── */
.plan-card {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 32px; background: var(--card);
  box-shadow: var(--shadow-sm);
  max-width: 420px;
  margin: 0 auto;
}
.plan-price { font-size: 2.4rem; font-weight: 900; color: var(--ink); margin-top: 10px; }
.plan-price sup { font-size: 1.1rem; vertical-align: super; }
.plan-period { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.plan-feature { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
.plan-feature i { color: var(--purple); font-size: 1.1rem; }

/* ── LOADER ──────────────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--purple);
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; flex-direction: column; gap: 16px;
}
.loading-overlay p { color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--ink-soft);
}
.empty-state i { font-size: 2.8rem; color: var(--purple-light); margin-bottom: 12px; display: block; }
.empty-state h3 { font-weight: 800; margin-bottom: 8px; color: var(--ink); }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* ── TOAST ───────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 14px 24px; border-radius: 12px;
  font-size: 0.9rem; font-weight: 700;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  animation: slideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slideIn { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }

/* ── RESPONSIVE (SCREENS 2, 3, 4 MOBILE FIX) ──────────────── */

/* Overlay di chiusura della sidebar per mobile */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 28, 44, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 98;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Pulsante per chiudere la sidebar, visibile solo su mobile */
.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(36,28,44,0.18);
  }
  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-top-bar {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding: 24px 16px;
    padding-top: 80px; /* Evita sovrapposizione con mobile top bar */
  }

  /* Allineamento pagina-header verticale su mobile */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }
  .page-header > div:last-child {
    width: 100% !important;
  }
  .page-header .btn,
  .page-header a.btn {
    width: 100% !important;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
  }
  
  /* Elisa card posizionata in cima prima del form */
  .two-column-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .elisa-card {
    order: -1;
    margin-bottom: 8px;
    width: 100%;
  }

  /* Impila i campi orizzontali a riga singola su mobile */
  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Impila i bottoni in fondo al form verticalmente */
  .form-actions-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .form-actions-group .btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .stat-card {
    padding: 20px;
  }
  .event-item {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
    gap: 12px;
  }
  .event-cover {
    width: 100%;
    height: 120px;
    margin: 0 auto;
  }
  .event-info .event-meta {
    justify-content: center;
    gap: 12px;
  }
  .event-actions {
    justify-content: center;
    width: 100%;
    margin-top: 10px;
  }
}

/* ── MODALE CUSTOM ELIMINAZIONE EVENTO ───────────────────── */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 28, 44, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}
.custom-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.custom-modal-box {
  background: var(--card);
  max-width: 440px;
  width: 100%;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(36, 28, 44, 0.15);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}
.custom-modal-overlay.open .custom-modal-box {
  transform: scale(1);
}
.custom-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red-faint);
  color: var(--red);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}
.custom-modal-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 10px;
}
.custom-modal-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 24px;
}
.custom-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
@media (max-width: 480px) {
  .custom-modal-actions {
    flex-direction: column;
  }
  .custom-modal-actions .btn {
    width: 100%;
  }
}

/* ── FOOTER SCOPRI ───────────────────────────────────────── */
.scopri-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 40px 24px;
  margin-top: 64px;
  text-align: center;
}
.scopri-footer-logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 12px;
}
.scopri-footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.scopri-footer-link {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.scopri-footer-link:hover {
  color: var(--purple);
}
.scopri-footer-copy {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* Contatore caratteri premium */
.char-counter {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 700;
  opacity: 0.85;
}

/* ── LAYOUT EVENTI A CARD VERTICALI STACCATE ──────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
  margin-top: 16px;
  width: 100%;
}
.event-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--purple-border);
}
.event-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  background: var(--purple-faint);
  border-bottom: 1px solid var(--line);
  display: block;
}
.event-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-card-title {
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--ink);
  line-height: 1.35;
}
.event-card-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.event-card-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.event-card-meta-item i {
  color: var(--purple-light);
  font-size: 1.15rem;
}
.event-card-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── MODALI DI MODIFICA EVENTO E SOCIETÀ ────────────────────── */
/* Questi modali usano display:none/flex via JS inline.           */
/* NON ridefinire .custom-modal-overlay qui (già definita sopra). */
.edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 36, 53, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 16px;
  /* display gestito da JS con style.display = "flex" / "none" */
}

.edit-modal-box {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 16px 56px rgba(45, 36, 53, 0.2);
  width: 100%;
  max-width: 650px;
  margin: 20px auto;
  padding: 28px;
  animation: editModalIn 0.28s cubic-bezier(0.24, 0.22, 0.31, 1.07);
}

@keyframes editModalIn {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ── GESTIONE ABBONAMENTO INATTIVO IN SIDEBAR ───────────────── */
body.sub-inactive a.sidebar-link[href="dashboard.html"] {
  opacity: 0.35 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* ── PULSANTI ABBONAMENTO A LARGHEZZA INTERA SU MOBILE ───────── */
@media (max-width: 576px) {
  #active-subscription-container {
    width: 100% !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  #active-subscription-container .btn,
  #active-subscription-container a.btn {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
  }
}

/* ── SELECT FILTRO STILE PREMIUM ────────────────────────────── */
.filter-select {
  width: 100%;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236A6072'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 36px;
  box-shadow: 0 2px 8px rgba(36,28,44,0.03);
}
.filter-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(126,87,194,0.12);
}






