/* =====================================================
   Teatro Agenda — Design System
   Dark Theater Theme: Deep Navy + Purple + Gold
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

/* ── CSS Custom Properties (Design Tokens) ─────────── */
:root {
  /* Colors — overridable via Developer settings (inline style on <html>) */
  --color-primary:     #7C3AED;
  --color-primary-h:   #9461F5;
  --color-primary-10:  rgba(124, 58, 237, 0.10);
  --color-primary-20:  rgba(124, 58, 237, 0.20);
  --color-secondary:   #F59E0B;
  --color-secondary-h: #FBB534;
  --color-bg:          #0D0D1A;
  --color-surface:     #141428;
  --color-surface-2:   #1C1C38;
  --color-surface-3:   #252548;
  --color-border:      rgba(255,255,255,0.08);
  --color-border-2:    rgba(255,255,255,0.14);
  --color-text:        #E8E8F0;
  --color-text-muted:  #8888AA;
  --color-text-faint:  #555570;
  --color-success:     #10B981;
  --color-warning:     #F59E0B;
  --color-danger:      #EF4444;
  --color-info:        #3B82F6;

  /* Typography */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;

  /* Sizing */
  --sidebar-w:       260px;
  --topbar-h:        64px;
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       18px;
  --radius-xl:       24px;
  --radius-full:     9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow:0 0 24px rgba(124,58,237,0.25);

  /* Transitions */
  --ease: cubic-bezier(0.4,0,0.2,1);
  --dur:  220ms;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ── Layout: App Shell ─────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--dur) var(--ease);
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--color-text);
}

.sidebar-logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.sidebar-section {
  padding: 0 12px 8px;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--dur) var(--ease);
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.nav-item.active {
  background: var(--color-primary-10);
  color: var(--color-primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--color-primary);
  border-radius: 0 2px 2px 0;
}

.nav-item svg, .nav-item .nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg, .nav-item.active .nav-icon { opacity: 1; }

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

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}

.user-mini:hover { background: var(--color-surface-3); }

.user-mini-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.user-mini-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.user-mini-info { flex: 1; min-width: 0; }
.user-mini-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-mini-role {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  text-transform: capitalize;
}

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

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.page-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

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

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  color: var(--color-text-muted);
}

.icon-btn:hover {
  background: var(--color-surface-3);
  color: var(--color-text);
  border-color: var(--color-border-2);
}

/* ── Page Content ───────────────────────────────────── */
.page-content {
  padding: 28px;
  flex: 1;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--dur) var(--ease);
}

.card:hover { border-color: var(--color-border-2); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

/* ── Stat Cards ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--dur) var(--ease);
}

.stat-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--color-primary-10);
  transform: translate(20px, -20px);
}

.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.stat-icon.purple { background: var(--color-primary-10); color: var(--color-primary); }
.stat-icon.gold   { background: rgba(245,158,11,0.1);   color: var(--color-secondary); }
.stat-icon.green  { background: rgba(16,185,129,0.1);   color: var(--color-success); }
.stat-icon.blue   { background: rgba(59,130,246,0.1);   color: var(--color-info); }
.stat-icon.red    { background: rgba(239,68,68,0.1);    color: var(--color-danger); }

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Grid ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

/* ── Tables ─────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--dur) var(--ease);
}

tbody tr:hover { background: var(--color-surface-2); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 14px 16px;
  color: var(--color-text);
  vertical-align: middle;
}

/* ── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success { background: rgba(16,185,129,0.15); color: var(--color-success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--color-warning); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--color-danger); }
.badge-info    { background: rgba(59,130,246,0.15); color: var(--color-info); }
.badge-purple  { background: var(--color-primary-10); color: var(--color-primary); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #9461F5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,0.5);
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary), #FBB534);
  color: #1a1a00;
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.45);
}

.btn-ghost {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-surface-3);
  color: var(--color-text);
  border-color: var(--color-border-2);
}

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239,68,68,0.2);
}

.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Form Elements ──────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--color-text);
  font-size: 0.9rem;
  transition: all var(--dur) var(--ease);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  background: var(--color-surface-3);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}

.form-control::placeholder { color: var(--color-text-faint); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888AA' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  margin-top: 5px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--color-danger);
  margin-top: 5px;
}

/* Color input */
input[type="color"].form-control {
  height: 42px;
  padding: 4px;
  cursor: pointer;
}

/* ── Alerts / Flash Messages ────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 20px;
  border-left: 4px solid transparent;
  animation: slideDown 0.3s var(--ease);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background: rgba(16,185,129,0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}

.alert-error {
  background: rgba(239,68,68,0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.alert-warning {
  background: rgba(245,158,11,0.1);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.alert-info {
  background: rgba(59,130,246,0.1);
  border-color: var(--color-info);
  color: var(--color-info);
}

/* ── Wizard Steps ───────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 8px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--color-border);
  z-index: 0;
  transition: background var(--dur) var(--ease);
}

.wizard-step.done:not(:last-child)::after,
.wizard-step.active:not(:last-child)::after {
  background: var(--color-primary);
}

.wizard-step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
  transition: all var(--dur) var(--ease);
}

.wizard-step.active .wizard-step-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 16px rgba(124,58,237,0.5);
}

.wizard-step.done .wizard-step-num {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.wizard-step-label {
  font-size: 0.72rem;
  color: var(--color-text-faint);
  text-align: center;
  font-weight: 500;
}

.wizard-step.active .wizard-step-label { color: var(--color-primary); }
.wizard-step.done .wizard-step-label   { color: var(--color-success); }

/* ── Production Thumbnail Card ──────────────────────── */
.prod-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.prod-card:hover, .prod-card.selected {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.prod-card.selected {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.prod-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--color-surface-3);
}

.prod-card-body { padding: 14px; }
.prod-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.prod-card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ── Thumbnail Preview ──────────────────────────────── */
.thumb-preview {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--color-border);
  margin-top: 8px;
}

/* ── Avatar Upload ──────────────────────────────────── */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.avatar-preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid var(--color-border-2);
}

.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ── Page Header ────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 2px;
}

/* ── Empty State ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text-muted);
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--color-text-faint);
  margin-bottom: 20px;
}

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.97);
  transition: transform var(--dur) var(--ease);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all var(--dur) var(--ease);
}

.modal-close:hover { background: var(--color-danger); color: #fff; }

/* ── Auth Pages ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  bottom: -50px; left: -50px;
  pointer-events: none;
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

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

.auth-logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(124,58,237,0.35);
}

.auth-logo h1 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.auth-logo p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ── Analytics ──────────────────────────────────────── */
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.state-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  transition: all var(--dur) var(--ease);
}

.state-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-10);
}

.state-card-abbr {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
}

.state-card-name {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.state-card-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-top: 4px;
}

/* ── Notification Compose ───────────────────────────── */
.notification-target {
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

/* ── Settings Color Grid ────────────────────────────── */
.color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.color-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* ── Divider ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 24px 0;
}

/* ── Hamburger (mobile) ─────────────────────────────── */
.hamburger {
  display: none;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  color: var(--color-text);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .grid-2، .grid-3 { grid-template-columns: 1fr; }
  .form-row، .form-row-3 { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 24px; }
  .wizard-steps { gap: 0; }
  .wizard-step-label { display: none; }
}

/* ── Utilities ──────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Sidebar overlay (mobile) ───────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

.sidebar-backdrop.open { display: block; }
