/* ═══════════════════════════════════════════════════════════════════════
   DEXTER DESIGN SYSTEM (dexter-ds.css)
   Based on Tonies Design System (TDS) tokens — June 2026
   Font: DM Sans (approximating Wonder for web)
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

/* ─── Tokens ─── */
:root {
  /* Brand */
  --brand: #D2000F;
  --brand-accent: #F23B44;
  --brand-hover: #B5000D;

  /* Foreground (TDS: foreground/*) */
  --fg-default: #333333;
  --fg-medium: #5F5B56;
  --fg-subtle: #7E766B;
  --fg-disabled: #8F8F8F;
  --fg-white: #FFFFFF;

  /* Surfaces (TDS: canvas/surface) */
  --canvas: #F4F3EF;
  --surface: #FFFFFF;
  --surface-muted: #F4F3EF;

  /* Borders (TDS: border/*) */
  --border-card: #E2DBD2;
  --border-input: #7E766B;
  --border-divider: #E2DBD2;

  /* Status (TDS: status/*) */
  --status-info-fill: #CDE9F3;
  --status-info-text: #232D7B;
  --status-success-fill: #D4EDDA;
  --status-success-text: #1A7125;
  --status-warning-fill: #FFF3CD;
  --status-warning-text: #A34500;
  --status-error-fill: #F8D7DA;
  --status-error-text: #A10A11;

  /* Radii (TDS: radius/*) */
  --radius-xs: 4px;
  --radius-s: 6px;
  --radius-sm: 8px;
  --radius-m: 10px;
  --radius-ml: 12px;
  --radius-l: 16px;
  --radius-xl: 18px;
  --radius-card: 24px;
  --radius-pill: 384px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(51, 51, 51, 0.04);
  --shadow-md: 0 4px 12px rgba(51, 51, 51, 0.06);
  --shadow-lg: 0 8px 24px rgba(51, 51, 51, 0.08);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;

  /* Supporting (Dexter-specific) */
  --navy: #012E7C;
  --teal: #059DA5;
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--fg-default);
  background: var(--canvas);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ═══ TYPOGRAPHY ═══ */
.text-title-xxl { font-size: 36px; font-weight: 600; line-height: 130%; }
.text-title-xl  { font-size: 32px; font-weight: 600; line-height: 130%; }
.text-title-l   { font-size: 24px; font-weight: 600; line-height: 130%; }
.text-title-ml  { font-size: 20px; font-weight: 600; line-height: 130%; }
.text-title-sm  { font-size: 16px; font-weight: 600; line-height: 130%; }
.text-title-s   { font-size: 14px; font-weight: 600; line-height: 130%; }

.text-body-ml   { font-size: 20px; font-weight: 500; line-height: 150%; }
.text-body-sm   { font-size: 16px; font-weight: 500; line-height: 150%; }
.text-body-s    { font-size: 14px; font-weight: 500; line-height: 150%; }
.text-body-xs   { font-size: 12px; font-weight: 500; line-height: 130%; }

.text-bold { font-weight: 700; }
.text-medium { color: var(--fg-medium); }
.text-subtle { color: var(--fg-subtle); }
.text-brand  { color: var(--brand); }

/* ═══ BUTTONS (TDS: TdsTextButton — no black border on web) ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.08px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-lg {
  height: 52px;
  padding: 14px 24px;
  font-size: 18px;
  border-radius: var(--radius-xl);
}
.btn-md {
  height: 40px;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: var(--radius-ml);
}
.btn-sm {
  height: 32px;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--brand);
  color: var(--fg-white);
}
.btn-primary:hover { background: var(--brand-hover); }

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand-accent);
}
.btn-secondary:hover { background: #FEF2F2; }

.btn-tertiary {
  background: transparent;
  color: var(--fg-default);
  border: 1px solid var(--border-card);
}
.btn-tertiary:hover { background: var(--canvas); }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: none;
}
.btn-ghost:hover { background: #FEF2F2; }

.btn:disabled {
  background: #E0E0E0;
  color: var(--fg-disabled);
  border-color: transparent;
  pointer-events: none;
}

/* ═══ INPUTS (TDS: TdsInputField — 52px, 12px radius, #7E766B border) ═══ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-default);
}
.input-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-subtle);
}
.input-error-msg {
  font-size: 12px;
  font-weight: 500;
  color: var(--status-error-text);
}

.input {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-ml);
  background: var(--surface);
  color: var(--fg-default);
  outline: none;
  width: 100%;
  transition: border-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
}
.input::placeholder { color: var(--fg-medium); }
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(210, 0, 15, 0.12);
}
.input--error { border-color: var(--status-error-text); }

.textarea {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-ml);
  background: var(--surface);
  color: var(--fg-default);
  outline: none;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
  transition: border-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
}
.textarea::placeholder { color: var(--fg-medium); }
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(210, 0, 15, 0.12);
}

.select {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  height: 52px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-ml);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237E766B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--fg-default);
  appearance: none;
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: border-color var(--duration-fast) var(--ease);
}
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(210, 0, 15, 0.12);
}

/* ═══ CARDS (TDS: TdsContentCard — 24px radius, #E2DBD2 border) ═══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-card);
}
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ═══ BADGES (TDS: TdsBadge — 20px, pill, 14px semibold) ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.badge-info    { background: var(--status-info-fill); color: var(--status-info-text); }
.badge-success { background: var(--status-success-fill); color: var(--status-success-text); }
.badge-warning { background: var(--status-warning-fill); color: var(--status-warning-text); }
.badge-error   { background: var(--status-error-fill); color: var(--status-error-text); }
.badge-neutral { background: var(--canvas); color: var(--fg-medium); }
.badge-brand   { background: #FEF2F2; color: var(--brand); }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ═══ TAGS (TDS: TdsTag — 28px, 8px radius) ═══ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--fg-default);
  border: 1px solid var(--border-card);
}
.tag--selected {
  background: #FEF2F2;
  color: var(--brand);
  border-color: var(--brand-accent);
}

/* ═══ NAVIGATION (TDS: TdsNavBar — 56px) ═══ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-card);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-mark {
  width: 32px;
  height: 32px;
  background: var(--brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-white);
  font-weight: 700;
  font-size: 16px;
}
.nav-wordmark {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-default);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-medium);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease);
}
.nav-link:hover { background: var(--canvas); color: var(--fg-default); }
.nav-link--active { color: var(--brand); font-weight: 600; }

/* ═══ TABS ═══ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-card);
}
.tab {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-medium);
  text-decoration: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--duration-fast) var(--ease);
}
.tab:hover { color: var(--fg-default); }
.tab--active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* ═══ ALERTS ═══ */
.alert {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-ml);
  border: 1px solid;
  font-size: 14px;
  font-weight: 500;
  line-height: 150%;
}
.alert-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.alert--info    { background: var(--status-info-fill); border-color: #A8D8EA; color: var(--status-info-text); }
.alert--success { background: var(--status-success-fill); border-color: #A7D7B0; color: var(--status-success-text); }
.alert--warning { background: var(--status-warning-fill); border-color: #FDEAA8; color: var(--status-warning-text); }
.alert--error   { background: var(--status-error-fill); border-color: #F5C6C9; color: var(--status-error-text); }

/* ═══ TABLE ═══ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-subtle);
  background: var(--canvas);
  border-bottom: 1px solid var(--border-card);
}
.table td {
  padding: 12px 16px;
  color: var(--fg-default);
  border-bottom: 1px solid var(--border-divider);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FEFDFB; }

/* ═══ PROGRESS ═══ */
.progress {
  width: 100%;
  height: 6px;
  background: #E2DBD2;
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--brand);
  transition: width 0.3s var(--ease);
}
.progress-fill--teal { background: var(--teal); }
.progress-fill--success { background: var(--status-success-text); }

/* ═══ AVATAR ═══ */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.avatar--brand { background: #FEF2F2; color: var(--brand); }
.avatar--navy  { background: #E8F1FE; color: var(--navy); }

/* ═══ TOGGLE ═══ */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #D5CEC6;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease);
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease);
}
.toggle--on { background: var(--brand); }
.toggle--on::after { transform: translateX(20px); }

/* ═══ SPINNER ═══ */
.spinner {
  border: 2px solid var(--border-card);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: ds-spin 0.8s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; }
.spinner-md { width: 24px; height: 24px; }
.spinner-lg { width: 32px; height: 32px; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ═══ SKELETON ═══ */
.skeleton {
  background: linear-gradient(90deg, var(--canvas) 25%, #E2DBD2 50%, var(--canvas) 75%);
  background-size: 200% 100%;
  animation: ds-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes ds-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══ STAT CARD ═══ */
.stat {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 20px 24px;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-subtle);
  margin-bottom: 4px;
}
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--fg-default);
  line-height: 130%;
}
.stat-meta {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}
.stat-meta--up   { color: var(--status-success-text); }
.stat-meta--down { color: var(--status-error-text); }

/* ═══ EMPTY STATE ═══ */
.empty {
  text-align: center;
  padding: 48px 24px;
}
.empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--canvas);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 6px;
}
.empty-desc {
  font-size: 14px;
  color: var(--fg-medium);
  max-width: 320px;
  margin: 0 auto 20px;
}

/* ═══ CHAT INTERFACE ═══ */
.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
}
.chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.chat-msg--user .chat-msg-avatar { background: #FEF2F2; color: var(--brand); }
.chat-msg--assistant .chat-msg-avatar { background: var(--brand); color: var(--fg-white); }

.chat-msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-l);
  font-size: 14px;
  line-height: 150%;
}
.chat-msg--user .chat-msg-bubble {
  background: #FEF2F2;
  color: var(--fg-default);
  border-bottom-right-radius: var(--radius-xs);
}
.chat-msg--assistant .chat-msg-bubble {
  background: var(--surface);
  border: 1px solid var(--border-card);
  color: var(--fg-default);
  border-bottom-left-radius: var(--radius-xs);
}

.chat-input {
  padding: 16px 24px;
  border-top: 1px solid var(--border-card);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.chat-input-field {
  flex: 1;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-ml);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-default);
  outline: none;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  transition: border-color var(--duration-fast) var(--ease);
}
.chat-input-field::placeholder { color: var(--fg-medium); }
.chat-input-field:focus { border-color: var(--brand); }
.chat-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: var(--fg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease);
  flex-shrink: 0;
}
.chat-send:hover { background: var(--brand-hover); }

/* ═══ REPORT CARD (inline in chat) ═══ */
.report-card {
  margin-top: 12px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-ml);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease);
}
.report-card:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-md); }
.report-card--active { border-color: var(--brand); }
.report-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #FEFDFB;
}
.report-card-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--fg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.report-card-title { font-size: 14px; font-weight: 600; color: var(--fg-default); }
.report-card-meta { font-size: 12px; color: var(--fg-subtle); }

/* ═══ REPORT PANEL ═══ */
.report-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border-card);
  overflow: hidden;
}
.report-panel-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.report-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.report-summary {
  background: #FEF2F2;
  border-left: 3px solid var(--brand);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
}
.report-summary-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 6px;
}
.report-summary p {
  font-size: 14px;
  line-height: 165%;
  color: var(--fg-default);
}

.report-toc { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border-divider); }
.report-toc-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
  margin-bottom: 8px;
}
.report-toc-list { list-style: none; padding: 0; margin: 0; }
.report-toc-item {
  padding: 6px 8px;
  font-size: 14px;
  color: var(--fg-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--duration-fast) var(--ease);
}
.report-toc-item:hover { background: #FEFDFB; color: var(--fg-default); }
.report-toc-item--active { background: #FEF2F2; color: var(--brand); font-weight: 600; }
.report-toc-num { font-size: 12px; font-weight: 700; color: var(--brand); width: 20px; }

/* Hypothesis */
.hypothesis { margin-bottom: 20px; }
.hypothesis-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
}
.hypothesis-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--fg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.hypothesis-title { font-size: 14px; font-weight: 600; color: var(--fg-default); line-height: 140%; flex: 1; }
.hypothesis-confidence {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.confidence--high   { background: var(--status-success-fill); color: var(--status-success-text); }
.confidence--medium { background: var(--status-warning-fill); color: var(--status-warning-text); }
.confidence--low    { background: var(--status-error-fill); color: var(--status-error-text); }

/* Evidence */
.evidence-list {
  margin-left: 32px;
  padding-left: 12px;
  border-left: 2px solid var(--border-card);
}
.evidence-item {
  padding: 10px 0;
  font-size: 13px;
  line-height: 160%;
  color: var(--fg-default);
}
.evidence-item + .evidence-item { border-top: 1px solid var(--border-divider); }
.evidence-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  margin-top: 4px;
  transition: all var(--duration-fast) var(--ease);
}
.evidence-source--kb  { background: rgba(5,157,165,0.1); color: var(--teal); }
.evidence-source--kb:hover { background: rgba(5,157,165,0.2); }
.evidence-source--web { background: rgba(1,46,124,0.08); color: var(--navy); }
.evidence-source--web:hover { background: rgba(1,46,124,0.15); }

/* ═══ LAYOUT HELPERS ═══ */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.stack { display: flex; flex-direction: column; }
.stack-sm { gap: 8px; }
.stack-md { gap: 16px; }
.stack-lg { gap: 24px; }
.row { display: flex; align-items: center; }
.row-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ═══ LOGIN PAGE ═══ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, #6D0008 50%, #1A1614 100%);
  padding: 2rem;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 48px rgba(51, 51, 51, 0.15);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--fg-default);
  margin-bottom: 0.5rem;
}
.login-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-medium);
  margin-bottom: 2rem;
  line-height: 150%;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--fg-subtle);
  font-size: 12px;
  font-weight: 500;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-card);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-ml);
  background: var(--surface);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-default);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease);
}
.btn-google:hover {
  background: #FEFDFB;
  border-color: #D5CEC6;
  box-shadow: var(--shadow-sm);
}
.btn-google:active { transform: translateY(1px); }
.btn-google svg { flex-shrink: 0; }
.login-footer {
  margin-top: 2rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-subtle);
  line-height: 150%;
}
