/* ============================================================
   Economic Impact Tool — Global Styles
   Claude-style warm/orange palette
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-2: #F5F4F0;
  --orange: #E8651A;
  --orange-hover: #D45A14;
  --orange-light: #FFF3EC;
  --orange-border: #F4C4A1;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-light: #9A9A9A;
  --border: #E8E4DF;
  --border-focus: #E8651A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo__dot {
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  display: inline-block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

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

.site-nav a.active {
  color: var(--orange);
  background: var(--orange-light);
}

.site-nav__user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.site-nav__email {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav__logout {
  font-size: 13px;
  color: var(--text-muted) !important;
  padding: 4px 10px !important;
}

.site-nav__signup {
  margin-left: 4px;
  color: #fff !important;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: var(--orange-hover);
  border-color: var(--orange-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232,101,26,0.25);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

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

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

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

.btn--sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn--lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn--danger {
  background: #fff;
  color: #dc2626;
  border-color: #fecaca;
}

.btn--danger:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--orange {
  background: var(--orange-light);
  color: var(--orange);
  border: 1px solid var(--orange-border);
}

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

/* --- Forms --- */
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,101,26,0.12);
}

/* --- Chat Interface --- */
#chat-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

#chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  animation: fadeSlideIn 0.3s ease forwards;
  opacity: 0;
}

.chat-message--bot { align-items: flex-start; }
.chat-message--user { align-items: flex-end; }

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.55;
}

.chat-bubble--bot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.chat-bubble--user {
  background: var(--orange);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* --- Chat Option Chips --- */
.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 0;
}

.chat-option-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chat-option-btn:hover {
  border-color: var(--orange);
  background: var(--orange-light);
  color: var(--orange);
}

.chat-option-btn--selected,
.chat-option-btn:focus {
  border-color: var(--orange);
  background: var(--orange-light);
  color: var(--orange);
  outline: none;
}

/* Option with checkbox-style indicator */
.chat-option-btn__check {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  transition: all 0.15s;
}

.chat-option-btn:hover .chat-option-btn__check,
.chat-option-btn--selected .chat-option-btn__check {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* Province grid */
.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

/* --- Chat Number Input --- */
.chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: flex-start;
}

.chat-number-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
  outline: none;
}

.chat-number-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,101,26,0.12);
}

/* Skip link */
.chat-skip-link {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  cursor: pointer;
  text-decoration: underline;
  display: inline-block;
}

.chat-skip-link:hover { color: var(--text); }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom-left-radius: 4px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-light);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

#chat-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* --- Results Page --- */
.results-header {
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
  color: #fff;
  padding: 40px 0;
  margin-bottom: 32px;
}

.results-headline {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  max-width: 700px;
}

.results-headline strong {
  color: #FFA862;
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
}

.results-meta-item {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

.results-meta-item span {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

/* KPI Stats */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card__icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F0EEEB 0%, #E8E4DF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.kpi-card__icon--highlight {
  background: linear-gradient(135deg, #FDDBB4 0%, #F4A262 100%);
  color: #fff;
}

.kpi-card__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kpi-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.kpi-card__sub {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.kpi-card--highlight {
  border-color: var(--orange-border);
  background: var(--orange-light);
}

.kpi-card--highlight .kpi-card__value {
  color: var(--orange);
}

/* Impact Table */
.impact-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.impact-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
}

.impact-table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.impact-table th:first-child { text-align: left; }

.impact-table td {
  padding: 14px 20px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.impact-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.impact-table tr:last-child td { border-bottom: none; }

.impact-table tr:nth-child(even) td { background: rgba(0,0,0,0.015); }

.impact-table .col-total {
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-light) !important;
}

.impact-table tbody tr {
  animation: fadeSlideIn 0.3s ease forwards;
  opacity: 0;
}

.impact-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.impact-table tbody tr:nth-child(2) { animation-delay: 0.10s; }
.impact-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.impact-table tbody tr:nth-child(4) { animation-delay: 0.20s; }
.impact-table tbody tr:nth-child(5) { animation-delay: 0.25s; }

/* ── Transposed impact block layout ───────────────────────────────────────── */
.impact-table-wrap {
  border: none;
  box-shadow: none;
  background: transparent;
}

.impact-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.impact-block__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 20px;
  border-bottom: 2px solid var(--orange);
  background: var(--surface-2);
}

.impact-block__label--roc {
  color: var(--text-muted);
  border-bottom-color: #A0AEC0;
}

.impact-block__label--total {
  color: var(--text);
  background: var(--orange-light);
  border-bottom-color: var(--orange);
}

.impact-table-scroll {
  overflow-x: auto;
}

.impact-table--transposed {
  min-width: 860px; /* prevent collapse on narrow screens */
}

.impact-table--transposed th,
.impact-table--transposed td {
  padding: 12px 16px;
  white-space: nowrap;
}

.impact-table--transposed .col-impact-type {
  text-align: left;
  font-weight: 600;
  min-width: 110px;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
}

.impact-table--transposed th.col-impact-type {
  background: var(--surface-2);
}

.impact-table--transposed tr.row-total td {
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-light) !important;
  border-top: 2px solid var(--border);
}

.impact-table--transposed tr.row-total .col-impact-type {
  background: var(--orange-light);
}

/* Section header rows inside combined table */
.impact-table--transposed tr.section-header-row td {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 8px 16px;
  border-bottom: none;
}

.impact-table--transposed tr.section-header-row--province td {
  background: var(--orange-light);
  color: var(--orange);
  border-top: 1px solid var(--border);
}

.impact-table--transposed tr.section-header-row--roc td {
  background: #F0F4F8;
  color: #4A6FA5;
  border-top: 2px solid var(--border);
}

.impact-table--transposed tr.section-header-row--total td {
  background: var(--orange-light);
  color: var(--orange);
  border-top: 2px solid var(--orange);
}

/* Subtotal rows (province & ROC section totals) */
.impact-table--transposed tr.row-subtotal td {
  font-weight: 600;
  background: rgba(0,0,0,0.03) !important;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.impact-table--transposed tr.row-subtotal .col-impact-type {
  background: rgba(0,0,0,0.03);
}

.section-header-row__note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  opacity: 0.8;
}

/* Total block label variant */
.impact-block__label--total {
  color: var(--text);
  background: var(--orange-light);
  border-bottom-color: var(--orange);
}

.impact-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 20px 6px;
  border-bottom: 2px solid var(--orange);
  margin-bottom: 0;
  display: block;
  background: var(--surface-2);
}

.impact-section-label--roc {
  margin-top: 2px;
}

.adjustments-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--orange);
}

/* Charts */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  max-height: 420px;
  display: flex;
  flex-direction: column;
}

.chart-card canvas {
  flex: 1;
  min-height: 0;
}

.chart-card__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Results Action Buttons */
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

/* Edit Panel */
.edit-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.edit-panel__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.edit-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.edit-panel__field {
  display: flex;
  flex-direction: column;
}

.edit-panel__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.edit-panel__field .form-input {
  margin-top: auto;
}

/* Industry selector (edit panel) */
.edit-panel__field--wide {
  grid-column: 1 / -1;
}

.industry-selector__current {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.industry-selector__current--selected {
  color: var(--orange);
}

.industry-selector__dropdowns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.industry-selector__level-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.industry-selector__select {
  width: 100%;
}

/* --- Reports Dashboard --- */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.report-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--orange-border);
}

.report-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.report-card__meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.report-card__stat {
  font-size: 22px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 4px;
}

.report-card__stat-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.report-card__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state__icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.empty-state__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state__text {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* --- Landing Page --- */
.landing-hero {
  padding: 80px 0 64px;
  text-align: center;
}

.landing-hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 16px;
}

.landing-hero__title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.landing-hero__title em {
  font-style: normal;
  color: var(--orange);
}

.landing-hero__subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.landing-hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.how-it-works {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.how-it-works__title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step__number {
  width: 44px;
  height: 44px;
  background: var(--orange-light);
  border: 1.5px solid var(--orange-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--orange);
  margin: 0 auto 16px;
}

.step__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Footer --- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: auto;
}

/* --- Loading Spinner --- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* --- Animations --- */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Auth Pages --- */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px 80px;
  min-height: calc(100vh - 200px);
}

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

.auth-card__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-card__subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
}

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

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.auth-field .form-input {
  width: 100%;
}

.btn--full {
  width: 100%;
  justify-content: center;
}

.auth-form .btn--full {
  margin-top: 8px;
}

.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-links a {
  color: var(--orange);
  font-weight: 600;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links p {
  margin-bottom: 8px;
}

.auth-forgot {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 4px;
}

.auth-forgot a {
  color: var(--orange);
  font-weight: 500;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-guest-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
  line-height: 1.5;
}

.guest-save-note {
  text-align: center;
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--orange-light);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.guest-save-note a {
  color: var(--orange);
  font-weight: 600;
}

/* --- Utility --- */
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* --- Responsive --- */
@media (max-width: 640px) {
  .charts-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  #chat-container { padding: 16px 12px; }
  .site-nav { display: none; }
  .results-actions { flex-direction: column; }
  .btn--lg { width: 100%; justify-content: center; }
  .landing-hero { padding: 48px 0 40px; }
  .auth-card { padding: 28px 20px; }
  .auth-page { padding: 32px 16px 60px; }
  .steps-grid { grid-template-columns: 1fr; }
}
