/* base.css — reset, tipografia, scrollbar, utility */

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 0.4em; font-weight: 650; line-height: 1.2; }
p { margin: 0 0 0.8em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

textarea, input {
  font: inherit;
  color: inherit;
}

[hidden] { display: none !important; }

::selection { background: var(--accent-soft); }

/* Scrollbar discreta */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ---- utility riutilizzabili ---- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.btn:hover { background: var(--bg-hover); }
.btn-primary {
  background: var(--accent-strong);
  border-color: transparent;
  color: #0b1020;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-hover); }

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center-text { text-align: center; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Stato vuoto centrato (placeholder sezioni) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .emoji { font-size: 48px; }
.empty-state h2 { color: var(--text); }
.empty-state p { max-width: 520px; }
