/*
 * TemplateVault App Shell — shared styles for authenticated pages
 * Covers: CSS variables, reset, nav, sidebar, buttons, cards,
 *         forms, tables, modals, badges, alerts, utilities.
 *
 * Usage: <link rel="stylesheet" href="/assets/css/app.css">
 * No build step required. Vanilla CSS.
 */

/* ─────────────────────────────────────────────
   Variables
───────────────────────────────────────────── */
:root {
  --brand:       #4f46e5;
  --brand-dark:  #3730a3;
  --brand-light: #eef2ff;
  --text:        #111827;
  --muted:       #6b7280;
  --border:      #e5e7eb;
  --bg:          #f9fafb;
  --white:       #ffffff;
  --danger:      #dc2626;
  --danger-dark: #b91c1c;
  --success:     #059669;
  --warning:     #d97706;
  --sidebar-bg:  #0f172a;
  --sidebar-w:   220px;
  --nav-h:       56px;
  --radius-sm:   6px;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.1);
  --font:        -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

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

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

/* ─────────────────────────────────────────────
   Top Nav
───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-logo svg { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--brand-light);
  color: var(--brand);
}

/* User menu */
.nav-user {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.nav-user-btn:hover { background: var(--bg); }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
  user-select: none;
}
.nav-username {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.caret {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-width: 176px;
  overflow: hidden;
  z-index: 300;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a,
.nav-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}
.nav-dropdown a:hover,
.nav-dropdown button:hover  { background: var(--bg); }
.nav-dropdown .divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-dropdown .danger   { color: var(--danger); }

/* ─────────────────────────────────────────────
   Sidebar layout (admin page)
───────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.sidebar-item:hover  { background: rgba(255,255,255,.06); color: #e2e8f0; }
.sidebar-item.active { background: var(--brand); color: #fff; }
.sidebar-icon { width: 16px; height: 16px; flex-shrink: 0; }

.content-area {
  flex: 1;
  overflow: auto;
  padding: 32px 28px;
}

/* ─────────────────────────────────────────────
   Main content wrapper (non-sidebar pages)
───────────────────────────────────────────── */
.main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ─────────────────────────────────────────────
   Page header
───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.page-header-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.page-header-text p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ─────────────────────────────────────────────
   Cards
───────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card + .card { margin-top: 20px; }
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}
.card-muted {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────
   Buttons
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--brand);
  border-color: var(--brand);
}
.btn-secondary:hover { background: var(--brand-light); }

.btn-outline {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); }

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

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-sm  { padding: 6px 13px; font-size: 0.8rem; }
.btn-xs  { padding: 4px 10px; font-size: 0.75rem; }
.btn-icon {
  padding: 7px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }
.btn-icon svg { width: 16px; height: 16px; display: block; }

/* ─────────────────────────────────────────────
   Form elements
───────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid.cols-1 { grid-template-columns: 1fr; }
.full-col { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}
.form-input,
.form-select,
.form-textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.ml-auto { margin-left: auto; }

/* ─────────────────────────────────────────────
   Search / Toolbar
───────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px 9px 32px;
  font-size: 0.875rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* ─────────────────────────────────────────────
   Tabs
───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─────────────────────────────────────────────
   Tables
───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text);
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafafa; }

/* ─────────────────────────────────────────────
   Badges
───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-brand   { background: var(--brand-light); color: var(--brand); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-muted   { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge-admin   { background: #fef3c7; color: #92400e; }

/* ─────────────────────────────────────────────
   Alerts
───────────────────────────────────────────── */
.alert {
  display: none;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert.show { display: block; }
.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.alert-info {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-color: #c7d2fe;
}

/* ─────────────────────────────────────────────
   Modals
───────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  display: flex;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body {
  padding: 20px 24px;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   Loading overlay
───────────────────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}
.loading-overlay.show { display: flex; }
.loading-overlay p {
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font);
}

/* ─────────────────────────────────────────────
   Spinner
───────────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(79,70,229,.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
.spinner-white {
  border-color: rgba(255,255,255,.25);
  border-top-color: #fff;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────
   Wizard (step indicator)
───────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
  overflow-x: auto;
  gap: 0;
}
.step-item { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
}
.step-num.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-num.done   { background: var(--success); border-color: var(--success); color: #fff; }
.step-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.step-label.active { color: var(--brand); }
.step-divider {
  flex: 1;
  min-width: 20px;
  height: 1px;
  background: var(--border);
  margin: 0 10px;
}

.wizard-panel { display: none; }
.wizard-panel.active { display: block; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   Document / result output area
───────────────────────────────────────────── */
.doc-output {
  display: none;
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
  resize: vertical;
  background: var(--white);
}
.doc-output.show { display: block; }

/* ─────────────────────────────────────────────
   Document card (grid)
───────────────────────────────────────────── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}
.doc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s;
}
.doc-card:hover { box-shadow: 0 4px 18px rgba(79,70,229,.1); }
.doc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
}
.doc-icon svg { width: 18px; height: 18px; }
.doc-title { font-size: 0.875rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.doc-meta  { font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.doc-actions { display: flex; gap: 7px; margin-top: auto; }

/* ─────────────────────────────────────────────
   Empty state
───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--white);
}
.empty-state svg { width: 48px; height: 48px; color: var(--muted); opacity: .45; }
.empty-state h3  { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.empty-state p   { font-size: 0.85rem; color: var(--muted); max-width: 280px; }

/* ─────────────────────────────────────────────
   AI result / suggestion panel
───────────────────────────────────────────── */
.ai-panel {
  background: var(--brand-light);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-lg);
  padding: 18px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text);
  display: none;
}
.ai-panel.show { display: block; }
.ai-panel-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

/* ─────────────────────────────────────────────
   Pagination
───────────────────────────────────────────── */
.pagination {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
}
.pagination.show { display: flex; }
.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.page-btn:hover  { background: var(--brand-light); border-color: var(--brand); }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─────────────────────────────────────────────
   Stat / plan card
───────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.stat-sub   { font-size: 0.75rem; color: var(--muted); margin-top: 3px; }

/* Progress bar */
.progress-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar {
  height: 100%;
  background: var(--brand);
  border-radius: 99px;
  transition: width 0.4s;
}
.progress-bar.danger { background: var(--danger); }

/* ─────────────────────────────────────────────
   Quick-action cards (dashboard)
───────────────────────────────────────────── */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.action-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}
.action-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(79,70,229,.1);
}
.action-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.action-card-icon svg { width: 20px; height: 20px; }
.action-card-title { font-size: 0.875rem; font-weight: 600; }
.action-card-desc  { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* ─────────────────────────────────────────────
   Utilities
───────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-muted  { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-brand  { color: var(--brand); }
.text-sm     { font-size: 0.85rem; }
.mt-0  { margin-top: 0 !important; }
.mb-0  { margin-bottom: 0 !important; }
.gap-8 { gap: 8px; }

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-username { display: none; }
  .page-header  { flex-direction: column; align-items: flex-start; }
  .form-grid    { grid-template-columns: 1fr; }
  .sidebar      { display: none; }
  .content-area { padding: 20px 16px; }
  .main         { padding: 20px 16px; }
  .stat-grid    { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .wizard-steps { padding: 10px 12px; }
  .step-label   { display: none; }
  .stat-grid    { grid-template-columns: 1fr; }
}
