/* ============================================================
   Salone — Stile base
   Palette: oro, crema, marrone caldo (salone italiano).
   ============================================================ */

:root {
  --bg:           #f6f1ea;
  --surface:      #ffffff;
  --text:         #2d2620;
  --muted:        #6b5b4c;
  --accent:       #a77c4a;    /* oro scuro */
  --accent-dark:  #6b4e3d;    /* marrone caldo */
  --border:       #e5dccc;
  --danger:       #a14242;
  --ok:           #587a45;
  --radius:       12px;
  --shadow:       0 2px 12px rgba(107, 78, 61, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app-root {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

/* ------- Boot splash ------- */
.boot-splash {
  text-align: center;
  color: var(--muted);
}
.logo-badge {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 28px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}

/* ------- Card auth ------- */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
}
.auth-title {
  margin: 0 0 .25rem;
  font-size: 1.75rem;
  color: var(--accent-dark);
  letter-spacing: .5px;
}
.auth-subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: .95rem;
}

/* ------- Tabs ------- */
.tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: .65rem .5rem;
  font-size: .9rem;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, border-color .15s;
}
.tab.active {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

/* ------- Form ------- */
.form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.form input[type=text],
.form input[type=email],
.form input[type=password] {
  padding: .75rem .9rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  color: var(--text);
  width: 100%;
  transition: border-color .15s, background .15s;
}
.form input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.btn-primary {
  padding: .8rem 1rem;
  background: var(--accent-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover:not(:disabled) { background: #553d2e; }
.btn-primary:disabled { opacity: .6; cursor: default; }

.btn-secondary {
  padding: .65rem 1rem;
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
}
.btn-secondary:hover { background: #f7ede0; }

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  padding: .25rem .5rem;
  text-decoration: underline;
}
.btn-link:hover { color: var(--accent-dark); }

/* ------- Messaggi inline ------- */
.errore, .info, .esito {
  padding: .65rem .85rem;
  border-radius: 8px;
  font-size: .9rem;
  margin: 0;
}
.errore { background: #fdecec; color: var(--danger); border: 1px solid #f2c9c9; }
.info   { background: #eaf3e4; color: var(--ok);     border: 1px solid #cde0bf; }
.esito.ok  { background: #eaf3e4; color: var(--ok); }
.esito.err { background: #fdecec; color: var(--danger); }
.esito:empty { display: none; }

/* ------- Dashboard stub ------- */
.dashboard-card {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.saluto h1 {
  margin: 0 0 .25rem;
  color: var(--accent-dark);
  font-size: 1.4rem;
}
.muted { color: var(--muted); font-size: .9rem; margin: 0; }

.placeholder {
  background: #fbf7f1;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--border);
  margin-bottom: 1.25rem;
}
.placeholder h2 { margin: 0 0 .4rem; font-size: 1rem; color: var(--accent-dark); }
.placeholder p  { margin: 0; font-size: .9rem; color: var(--muted); }

/* ------- Pannello invito ------- */
.invito-panel { margin-top: 1rem; }
.invito-panel .form.hidden { display: none; }
.invito-panel .form { margin-top: .75rem; }
