/* Callia v2 · public/styles/auth.css
   Palette neutra: carbone, grigi, bianco. Niente accenti caldi.
*/

:root {
  --c-bg:           #F7F7F7;
  --c-surface:      #FFFFFF;
  --c-ink:          #1A1A1A;
  --c-ink-soft:     #4A4A4A;
  --c-muted:        #8A8A8A;
  --c-line:         #E4E4E4;
  --c-line-soft:    #F0F0F0;
  --c-accent:       #1A1A1A;       /* il "carbone" come accent */
  --c-accent-hover: #333333;
  --c-danger:       #B23A2B;
  --c-success:      #3F6A3F;
  --radius:         8px;
  --radius-lg:      14px;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg:      0 16px 36px rgba(0,0,0,0.14);
  --font-sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter',
                    Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--c-ink);
  background: var(--c-bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-ink); text-decoration: none; }
a:hover { color: var(--c-accent-hover); text-decoration: underline; }

/* ------------ LANDING (index.html) ------------ */

.landing-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-surface);
}

.landing-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
}

.landing-hero {
  max-width: 640px;
  text-align: center;
}

.landing-hero h1 {
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.landing-hero p {
  font-size: 17px;
  color: var(--c-ink-soft);
  margin: 0 0 32px 0;
}

.landing-footer {
  text-align: center;
  padding: 24px;
  color: var(--c-muted);
  font-size: 13px;
  border-top: 1px solid var(--c-line);
  background: var(--c-surface);
}

/* ------------ BRAND MARK ------------ */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--c-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-mark-large {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--c-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ------------ AUTH PAGE (login.html) ------------ */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--c-bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-line);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-brand-name {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.auth-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px 0;
  text-align: center;
}

.auth-intro {
  color: var(--c-ink-soft);
  text-align: center;
  margin: 0 0 24px 0;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ------------ FIELDS ------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-soft);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="email"] {
  padding: 11px 13px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
  font-family: inherit;
  font-size: 15px;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--c-ink);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.field input:disabled {
  background: var(--c-line-soft);
  color: var(--c-muted);
  cursor: not-allowed;
}

/* ------------ BUTTONS ------------ */

.btn {
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--c-accent);
  color: white;
  border-color: var(--c-accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-line);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--c-line-soft);
}

.btn-block { width: 100%; }
.btn-large { padding: 13px 24px; font-size: 15px; }

/* ------------ MESSAGES ------------ */

.error-box,
.success-box {
  padding: 11px 13px;
  border-radius: var(--radius);
  font-size: 13px;
  margin: 0;
  border: 1px solid transparent;
}

.error-box {
  background: rgba(178, 58, 43, 0.08);
  color: var(--c-danger);
  border-color: rgba(178, 58, 43, 0.18);
}

.success-box {
  background: rgba(63, 106, 63, 0.08);
  color: var(--c-success);
  border-color: rgba(63, 106, 63, 0.18);
}

/* Importante: l'attributo hidden deve davvero nascondere */
.error-box[hidden],
.success-box[hidden] {
  display: none !important;
}

/* ------------ DASHBOARD PLACEHOLDER ------------ */

.dashboard-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-user-name {
  font-size: 14px;
  color: var(--c-ink-soft);
}

.dashboard-user-name strong {
  color: var(--c-ink);
  font-weight: 600;
}

.dashboard-main {
  flex: 1;
  padding: 40px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.dashboard-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
}

.dashboard-card h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
}

.muted {
  color: var(--c-muted);
  font-size: 14px;
}

/* ------------ LOADING ------------ */

.loading-view {
  padding: 40px;
  text-align: center;
  color: var(--c-muted);
}

@media (max-width: 600px) {
  .auth-card { padding: 28px 24px; }
  .landing-hero h1 { font-size: 30px; }
  .dashboard-main { padding: 24px 16px; }
  .landing-header,
  .dashboard-topbar { padding: 16px 20px; }
}
