:root {
  --colore-primario: #2b6cb0;
  --colore-primario-scuro: #1a4971;
  --colore-ok: #2f855a;
  --colore-warn: #c05621;
  --colore-errore: #c53030;
  --colore-info: #2b6cb0;
  --colore-sfondo: #f4f6f8;
  --colore-bordo: #dde3e8;
  --colore-testo: #1a202c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--colore-sfondo);
  color: var(--colore-testo);
}
#app { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: var(--colore-primario-scuro);
  color: #fff;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: 1.1rem; margin: 0; display: flex; align-items: center; gap: 0.5rem; }

.view { flex: 1; padding: 1rem; padding-bottom: 5rem; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; background: #fff; border-top: 1px solid var(--colore-bordo);
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  background: none; border: none; padding: 0.6rem 0.4rem;
  color: #4a5568; font-size: 0.72rem; cursor: pointer;
}
.tabbar button i { font-size: 1.15rem; }
.tabbar button.active { color: var(--colore-primario); font-weight: 700; }

.card-ordine {
  background: #fff; border: 1px solid var(--colore-bordo); border-radius: 10px;
  padding: 1rem; margin-bottom: 0.85rem;
}
.card-ordine h3 { margin: 0 0 0.3rem; font-size: 1.02rem; }
.card-ordine .autore { font-size: 0.85rem; color: #4a5568; margin-bottom: 0.4rem; }
.card-ordine .meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; color: #4a5568; }
.card-ordine .prezzo { font-weight: 700; color: var(--colore-testo); }

.notifica-titolo { font-size: 0.78rem; color: #4a5568; margin-bottom: 0.35rem; }

.badge { display: inline-block; font-size: 0.7rem; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 999px; background: #edf2f7; color: #4a5568; white-space: nowrap; }
.badge--info { background: #ebf8ff; color: var(--colore-info); }
.badge--warn { background: #fffaf0; color: var(--colore-warn); }
.badge--ok { background: #f0fff4; color: var(--colore-ok); }
.badge--errore { background: #fff5f5; color: var(--colore-errore); }

button, .button {
  display: inline-block; background: var(--colore-primario); color: #fff; border: none;
  padding: 0.6rem 1.1rem; border-radius: 8px; font-size: 0.95rem; cursor: pointer; text-decoration: none;
}
button:disabled { background: #a0aec0; cursor: not-allowed; }
.button-secondary { background: #718096; }
.button-danger { background: var(--colore-errore); }
.button-full { display: block; width: 100%; text-align: center; }

.form label { display: block; margin-top: 1rem; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.form input {
  width: 100%; padding: 0.65rem 0.7rem; border: 1px solid var(--colore-bordo);
  border-radius: 8px; font-size: 1.05rem;
}

.alert { padding: 0.65rem 1rem; border-radius: 8px; margin: 0.75rem 0; font-size: 0.92rem; }
.alert-ok { background: #f0fff4; color: var(--colore-ok); border: 1px solid #c6f6d5; }
.alert-error { background: #fff5f5; color: var(--colore-errore); border: 1px solid #fed7d7; }

.centro-schermo {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 1.5rem;
}
.logo-app { font-size: 1.6rem; font-weight: 800; color: var(--colore-primario-scuro); margin-bottom: 0.3rem; }
.sottotitolo { color: #4a5568; margin-bottom: 1.5rem; text-align: center; }
.box-attivazione { width: 100%; max-width: 360px; background: #fff; border-radius: 12px; padding: 1.5rem; border: 1px solid var(--colore-bordo); }

.muted { color: #4a5568; font-size: 0.88rem; }

.settings-card { background: #fff; border: 1px solid var(--colore-bordo); border-radius: 10px; padding: 1rem; margin-bottom: 0.85rem; }
.settings-card h3 { display: flex; align-items: center; gap: 0.5rem; margin-top: 0; }

.header-azioni { display: flex; align-items: center; gap: 0.75rem; }
.header-azioni button { background: none; color: #fff; padding: 0.3rem; font-size: 1.05rem; }
