/* static/css/tokens.css — Design system NORA AI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Palette neutra (light) */
  --bg: #ffffff;
  --bg-elev: #f7f8fa;
  --bg-hover: #f0f1f5;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f1115;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;

  /* Accent */
  --accent: #5B5BFE;
  --accent-hover: #4747e8;
  --accent-soft: #eef0ff;
  --accent-text: #ffffff;

  /* Stati */
  --success: #16a34a;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;

  /* Spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  /* Radius */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;

  /* Shadow */
  --sh-1: 0 1px 2px rgba(15,17,21,.04), 0 1px 3px rgba(15,17,21,.06);
  --sh-2: 0 4px 12px rgba(15,17,21,.06), 0 1px 3px rgba(15,17,21,.04);
  --sh-3: 0 12px 32px rgba(15,17,21,.10);

  /* Typo */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Transizioni */
  --t-fast: 120ms cubic-bezier(.4,0,.2,1);
  --t-base: 180ms cubic-bezier(.4,0,.2,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-elev: #181b22;
    --bg-hover: #1f242d;
    --border: #2a2f3a;
    --border-strong: #3a4150;
    --text: #f3f4f6;
    --text-muted: #9aa3af;
    --text-soft: #6b7280;
    --accent-soft: rgba(91,91,254,.16);
    --sh-1: 0 1px 2px rgba(0,0,0,.4);
    --sh-2: 0 6px 16px rgba(0,0,0,.5);
    --sh-3: 0 14px 40px rgba(0,0,0,.6);
  }
}

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

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

/* Components base */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 10px 16px; border-radius: var(--r-md); font-weight: 500; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all var(--t-fast);
  font-family: inherit; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-hover); text-decoration: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 14px; outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--sh-1);
}

.muted { color: var(--text-muted); }
.label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.error-msg { background: var(--danger-soft); color: var(--danger); padding: 10px 12px;
             border-radius: var(--r-md); font-size: 13px; display: none; }
.success-msg { background: var(--success-soft); color: var(--success); padding: 10px 12px;
               border-radius: var(--r-md); font-size: 13px; display: none; }

/* Auth card layout */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--s-5); background: var(--bg-elev);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-6); box-shadow: var(--sh-2);
}
.auth-logo { display: flex; justify-content: center; margin-bottom: var(--s-5); }
.auth-logo img { height: 36px; }
.auth-title { font-size: 22px; font-weight: 600; letter-spacing: -.01em; text-align: center; margin: 0 0 var(--s-2); }
.auth-sub { color: var(--text-muted); text-align: center; margin: 0 0 var(--s-5); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: var(--s-4); }
.auth-footer { text-align: center; margin-top: var(--s-5); font-size: 14px; color: var(--text-muted); }
.field { display: flex; flex-direction: column; }
