/* base.css */
/* variabili CSS globali, reset, font, top nav, badge stato abbonamento, layout base */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── VARIABILI E RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F4F5F0;
  --surface: #ffffff;
  --border: #DFE3DA;
  --text: #1B211D;
  --muted: #6B7268;
  --accent: #1F5C4A;
  --accent-dark: #143D31;
  --accent-light: #E3EEE9;
  --accent-register: #B8791F;
  --accent-register-light: #FAF0DD;
  --danger: #C0392B;
  --danger-light: #FBEAE7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 25, 0.06);
  --shadow-md: 0 6px 16px rgba(20, 30, 25, 0.08);
  --shadow-lg: 0 16px 40px rgba(20, 30, 25, 0.14);
  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* ── BACKGROUND E ALTEZZA APPLICATI SOLO ALLA PAGINA GENERALE ── */
body {
  background: var(--bg);
  min-height: 100vh;
}

/* ── FONT E COLORI CONDIVISI (SENZA ALLUNGARE GLI INPUT) ── */
body, input, button, select, textarea {
  font-family: var(--font-body);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

/* ── TOP NAV ── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.logo { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.3px; color: var(--accent-dark); }
#nav-user { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }

/* Pulsante avatar che apre il menu a tendina */
.account-trigger { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 0; transition: all 0.15s ease; }
.account-trigger:hover, .account-trigger.open { background: var(--accent-light); border-color: var(--accent); }
.account-avatar { font-size: 16px; line-height: 1; }

/* Menu a tendina: nascosto di default, ancorato sotto l'avatar, non si sovrappone a nulla */
.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
}
.account-dropdown.open { display: block; }
.account-dropdown-email { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; word-break: break-all; }
.account-dropdown-item { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 6px; padding: 9px 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); transition: all 0.15s ease; }
.account-dropdown-item:hover { background: var(--accent-light); color: var(--accent-dark); }
.account-dropdown-item.danger { color: var(--danger); }
.account-dropdown-item.danger:hover { background: var(--danger-light); }

/* ── STATO ABBONAMENTO ── */
.status-badge { display: none; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 20px; white-space: nowrap; }
.status-badge:not(:empty) { display: inline-block; }
.status-badge.status-trial { background: var(--accent-register-light); color: var(--accent-register); }
.status-badge.status-active { background: var(--accent-light); color: var(--accent-dark); }
.status-badge.status-pending { background: var(--danger-light); color: var(--danger); }

.paywall-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px; margin-bottom: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.paywall-icon { font-size: 32px; margin-bottom: 8px; }
.paywall-card h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 10px; color: var(--text); }
.paywall-card p { color: var(--muted); font-size: 13px; max-width: 440px; margin: 0 auto 18px; }
.paywall-card .btn { display: inline-block; text-decoration: none; }
.paywall-note { margin-top: 16px !important; font-size: 12px !important; }

/* ── LAYOUT ── */
/* Allargato a 1120px per dare ampio spazio ai nomi dei piatti su schermi grandi */
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }