:root {
  /* ── HSL palette from Adventurer's Codex ── */
  --background:           30 15% 10%;
  --foreground:           38 50% 90%;
  --card:                 30 20% 14%;
  --card-foreground:      38 50% 90%;
  --popover:              30 20% 12%;
  --popover-foreground:   38 50% 90%;
  --primary:              38 70% 55%;
  --primary-foreground:   30 30% 8%;
  --secondary:            30 15% 20%;
  --secondary-foreground: 38 40% 80%;
  --muted:                30 10% 18%;
  --muted-foreground:     30 15% 55%;
  --accent:               25 60% 40%;
  --accent-foreground:    38 50% 95%;
  --destructive:          0 65% 50%;
  --destructive-foreground: 0 0% 98%;
  --border:               30 20% 20%;
  --input:                30 15% 18%;
  --ring:                 38 70% 55%;
  --radius:               0.5rem;

  /* ── Functional aliases ── */
  --bg-primary:          hsl(var(--background));
  --bg-card:             hsl(var(--card));
  --bg-input:            hsl(var(--input));
  --border-color:        hsl(var(--border));
  --accent-gold:         hsl(var(--primary));
  --text-primary:        hsl(var(--foreground));
  --text-muted:          hsl(var(--muted-foreground));
  --font-display:        'Cinzel', 'Crimson Text', serif;
  --font-body:           'DM Sans', 'Crimson Text', sans-serif;

  /* ── Shadows ── */
  --shadow-glow:         0 0 20px hsl(var(--primary) / 0.15), 0 0 60px hsl(var(--primary) / 0.05);
  --shadow-card:         0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
  --sidebar-width:       260px;
}

/* ── GLOBAL ── */
* {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── PARCHMENT TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ═══════════════════════════════════════
   AUTH SCREEN (landing page gate)
   ═══════════════════════════════════════ */

.auth-hero {
  position: relative; z-index: 1;
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(
    180deg,
    hsl(30, 15%, 6%) 0%,
    hsl(30, 15%, 10%) 30%,
    hsl(30, 15%, 12%) 70%,
    hsl(30, 15%, 8%) 100%
  );
}

.auth-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, hsl(var(--primary) / 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 120%, hsl(var(--primary) / 0.05), transparent 50%);
  pointer-events: none;
}

.auth-card {
  position: relative; z-index: 2;
  width: 98%;
  max-width: none;
  min-height: 96vh;
  margin: 1vh auto;
  padding: 80px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, hsl(var(--primary)) 30%, hsl(var(--primary) / 0.6) 70%, transparent 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.auth-brand { text-align: center; margin-bottom: 32px; }

.auth-icons {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  margin-bottom: 48px;
}

.auth-icon { font-size: 48px; opacity: 0.6; }
.auth-icon.center {
  font-size: 72px; opacity: 1;
  filter: drop-shadow(0 0 18px hsl(var(--primary) / 0.4));
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 14px hsl(var(--primary) / 0.3)); }
  50% { filter: drop-shadow(0 0 32px hsl(var(--primary) / 0.6)); }
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.2rem);
  font-weight: 800;
  color: hsl(var(--primary));
  letter-spacing: 0.02em;
  text-shadow: 0 0 36px hsl(var(--primary) / 0.25);
  line-height: 1.1;
  margin-bottom: 20px;
}

.auth-subtitle {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

/* Auth tabs */
.auth-tabs {
  display: flex; gap: 6px;
  background: hsl(var(--muted));
  border-radius: var(--radius);
  padding: 6px;
  margin: 56px 0 48px;
}

.auth-tab {
  flex: 1;
  padding: 16px 14px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab.active {
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Auth forms */
.auth-form { display: none; }
.auth-form.active { display: block; }

.field-group {
  margin-bottom: 32px;
  position: relative;
}

.field-icon {
  position: absolute;
  left: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  opacity: 0.7;
  z-index: 2;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  padding: 26px 16px 26px 64px;
  background: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 1.4rem;
  transition: all 0.2s ease;
  outline: none;
}

.auth-input::placeholder { color: hsl(var(--muted-foreground) / 0.5); }
.auth-input:focus {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.08), inset 0 1px 0 rgba(255,255,255,0.02);
}

.btn-gold {
  width: 100%;
  padding: 26px 24px;
  margin-top: 18px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(180deg, hsl(var(--primary)) 0%, hsl(38 60% 45%) 100%);
  color: hsl(var(--primary-foreground));
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-gold::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 40%);
  pointer-events: none;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.3), var(--shadow-glow);
}

.btn-gold:active { transform: translateY(0); }

.btn-guest {
  width: 100%;
  padding: 24px;
  margin-top: 24px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-guest:hover {
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--foreground));
  background: hsl(var(--primary) / 0.05);
}

.form-error {
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: hsl(var(--destructive) / 0.1);
  border: 1px solid hsl(var(--destructive) / 0.2);
  color: hsl(var(--destructive));
  font-size: 1.15rem;
}

.form-error.hidden { display: none; }

.auth-footer {
  text-align: center;
  margin-top: 52px;
  padding-top: 44px;
  border-top: 1px solid hsl(var(--border));
  font-size: 1.1rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════
   SIDEBAR LAYOUT (app pages)
   ═══════════════════════════════════════ */

.app-shell {
  position: relative; z-index: 1;
  display: flex;
  min-height: 100dvh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid hsl(var(--border));
}

.sidebar-brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: hsl(var(--primary));
  letter-spacing: 0.02em;
}

.sidebar-brand-sub {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.nav-item:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.nav-item.active {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  font-weight: 600;
}

.nav-item .nav-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .nav-label { white-space: nowrap; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid hsl(var(--border));
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-mini-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
}

.user-mini-info {
  flex: 1;
  min-width: 0;
}

.user-mini-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-mini-role {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 110;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 28px 36px 20px;
  border-bottom: 1px solid hsl(var(--border));
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: hsl(var(--primary));
  margin-bottom: 6px;
}

.page-header p {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
}

.page-body {
  flex: 1;
  padding: 28px 36px 48px;
}

/* ═══════════════════════════════════════
   FORM COMPONENTS (wizard pages)
   ═══════════════════════════════════════ */

.form-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.form-card::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, hsl(var(--primary)) 30%, hsl(var(--primary) / 0.6) 70%, transparent 100%);
  margin: -32px -32px 28px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.field-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 10px;
}

.input-lg, .textarea-lg {
  width: 100%;
  padding: 14px 16px;
  background: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
  margin-bottom: 20px;
}

.input-lg::placeholder, .textarea-lg::placeholder {
  color: hsl(var(--muted-foreground) / 0.5);
}

.input-lg:focus, .textarea-lg:focus {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.08);
}

.textarea-lg { resize: vertical; min-height: 100px; }

/* Chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  padding: 10px 18px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--foreground));
}

.chip.active {
  background: hsl(var(--primary) / 0.12);
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--primary));
  font-weight: 600;
}

/* Toggles */
.toggle-group {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.toggle {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.toggle:hover {
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--foreground));
}

.toggle.active {
  background: hsl(var(--primary) / 0.12);
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--primary));
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn.primary {
  background: linear-gradient(180deg, hsl(var(--primary)) 0%, hsl(38 60% 45%) 100%);
  color: hsl(var(--primary-foreground));
  font-family: var(--font-display);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.3);
}

.btn.ghost {
  background: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn.ghost:hover {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.05);
}

.btn.sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Action row */
.action-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid hsl(var(--border));
}

.action-row.center { justify-content: center; }

/* Checkbox grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
}

.checkbox-label:hover {
  border-color: hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.04);
}

.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: hsl(var(--primary));
}

/* Radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
}

.radio-label:hover {
  border-color: hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.04);
}

.radio-label input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: hsl(var(--primary));
}

/* Hint text */
.hint-text {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 20px;
  line-height: 1.5;
}

.hint-text a {
  color: hsl(var(--primary));
  text-decoration: none;
}

.hint-text a:hover { text-decoration: underline; }

.hint-text code {
  background: hsl(var(--muted));
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Warning / Insight boxes */
.warning-box, .insight-box {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.warning-box {
  background: hsl(var(--destructive) / 0.08);
  border: 1px solid hsl(var(--destructive) / 0.15);
  color: hsl(var(--destructive));
}

.insight-box {
  background: hsl(140 60% 35% / 0.08);
  border: 1px solid hsl(140 60% 35% / 0.15);
  color: hsl(140 70% 50%);
}

/* Status items */
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.red { background: hsl(var(--destructive)); }
.status-dot.green { background: hsl(140 70% 50%); }
.status-dot.amber { background: hsl(38 70% 55%); }

/* Nested form */
.nested-form {
  padding: 20px;
  background: hsl(var(--muted));
  border-radius: var(--radius);
  margin-bottom: 20px;
}

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.dash-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.dash-card::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, hsl(var(--primary)) 30%, hsl(var(--primary) / 0.6) 70%, transparent 100%);
  margin: -24px -24px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.dash-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: hsl(var(--primary));
  margin-bottom: 8px;
}

.dash-card p {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 16px;
}

.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.dash-status.pending {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.dash-status.complete {
  background: hsl(140 60% 35% / 0.12);
  color: hsl(140 70% 50%);
}

.dash-status.in-progress {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

/* Project cards */
.project-card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.proj-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.proj-card:hover {
  border-color: hsl(var(--primary) / 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.proj-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: hsl(var(--foreground));
  margin-bottom: 6px;
}

.proj-card .proj-meta {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 16px;
}

.proj-card .proj-progress {
  height: 4px;
  background: hsl(var(--muted));
  border-radius: 2px;
  overflow: hidden;
}

.proj-card .proj-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(38 60% 45%));
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Step badge */
.step-badge {
  display: inline-block;
  padding: 6px 14px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 999px;
  color: hsl(var(--primary));
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: flex;
  }
  .sidebar-overlay.show {
    display: block;
  }
  .main-content {
    margin-left: 0;
  }
  .page-header, .page-body {
    padding-left: 20px;
    padding-right: 20px;
  }
  .page-header {
    padding-top: 72px; /* space for toggle button */
  }
  .form-card {
    padding: 24px;
  }
  .form-card::before {
    margin: -24px -24px 20px;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid, .project-card {
    grid-template-columns: 1fr;
  }
  .action-row {
    flex-direction: column;
  }
  .action-row .btn {
    width: 100%;
  }
}

/* Auth mobile */
@media (max-width: 480px) {
  .auth-hero {
    align-items: flex-start;
    padding-top: 8vh;
  }
  .auth-card {
    max-width: 100%;
    width: 100%;
    margin: 0 0;
    padding: 72px 28px 60px;
    border-radius: 0;
    border-left: none; border-right: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    background: hsl(var(--card));
    min-height: 92vh;
  }
  .auth-card::before { display: block; }
  .auth-title { font-size: 2rem; }
  .auth-subtitle { font-size: 1.15rem; }
  .auth-icon { font-size: 32px; }
  .auth-icon.center { font-size: 48px; }
  .field-icon { font-size: 20px; }
  .auth-input { font-size: 1.1rem; padding: 20px 16px 20px 50px; }
  .btn-gold { font-size: 1.15rem; padding: 20px; }
  .btn-guest { font-size: 1rem; padding: 18px; }
}

/* iOS zoom prevention */
@supports (-webkit-touch-callout: none) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card, .form-card, .dash-card, .proj-card {
  animation: fadeInUp 0.4s ease-out;
}
