/* Customer-auth pages — minimal layout that aligns with the marketing
   site's navy + orange palette. Flat radius (border-radius:0) on
   buttons and inputs to match the brand. */

:root {
  --navy: #162b6f;
  --orange: #ff9a2c;
  --ink: #1f2937;
  --muted: #5f6b7a;
  --line: #e3e7ee;
  --bg: #f8f9fa;
  --error: #b3261e;
  --success: #14532d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* Brand body font is Nunito Sans (Oswald is headings-only) — see CLAUDE.md
     Brand section. Marketing + quote tools already use Nunito Sans; this
     fixes the customer-auth drift to align with the rest of the surface. */
  font-family: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--navy); }

.site-header {
  background: var(--navy);
  color: #fff;
  padding: 16px 24px;
}
.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-link {
  color: #fff;
  text-decoration: none;
  font-family: "Oswald", Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 18px;
}
.locale-switch button {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
  border-radius: 0;
}
.locale-switch button:hover { background: rgba(255,255,255,0.1); }

.shell {
  max-width: 480px;
  margin: 48px auto;
  background: #fff;
  border: 1px solid var(--line);
  padding: 32px;
}

h1 {
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.subhead {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 16px 0 6px;
}

input[type=email],
input[type=password],
input[type=text],
input[type=tel] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 0;
}

button[type=submit], .btn-primary {
  display: inline-block;
  background: var(--orange);
  color: var(--ink);
  border: 0;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  margin-top: 24px;
  width: 100%;
  letter-spacing: 0.02em;
}
button[type=submit]:hover, .btn-primary:hover { filter: brightness(0.95); }
button[type=submit][disabled] { opacity: 0.6; cursor: wait; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  border-radius: 0;
}

.success-card,
.error-card {
  margin: 16px 0;
  padding: 16px;
  border-radius: 0;
  font-size: 14px;
  display: none;
}
.success-card[data-visible="true"],
.error-card[data-visible="true"] { display: block; }
.success-card { background: #ecfdf5; border: 1px solid #bbf7d0; color: var(--success); }
.error-card   { background: #fef2f2; border: 1px solid #fecaca; color: var(--error); }

.form-actions { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.form-actions a { font-size: 13px; color: var(--muted); }

.field-error {
  display: none;
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
}
.field-error[data-visible="true"] { display: block; }

/* Inline resend-verification form on /verify-email — hidden by default;
   setupVerifyEmail flips `data-visible="true"` when the page is in the
   token-invalid-or-expired error state. */
form[data-resend-form]:not([data-visible="true"]) { display: none; }

/* Resend-verification single-click entry — used on signup-success and
   login-error pages. Hidden by default; setupSignup / setupLogin flips
   data-visible="true" when the parent flow surfaces it. The .link-button
   modifier renders the resend button as a text-like control so it reads
   as a follow-up prompt rather than a primary CTA. */
.resend-prompt:not([data-visible="true"]) { display: none; }
.resend-prompt { margin-top: 12px; }
.link-button {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.link-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: none;
}

.muted { color: var(--muted); font-size: 13px; }

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.account-row:last-child { border-bottom: 0; }

/* v1.5 Sprint-05: /account dashboard layout — 3 cards, responsive grid. */
.dashboard-shell { max-width: 1100px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.dashboard-card {
  border: 1px solid var(--line, #d1d5db);
  background: #fff;
  padding: 20px 24px;
}
.dashboard-card-wide { grid-column: 1 / -1; }
.dashboard-card-title {
  margin: 0 0 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy, #162b6f);
  border-bottom: 2px solid var(--orange, #ff9a2c);
  padding-bottom: 8px;
}
.account-info-list { margin: 0; padding: 0; }
.account-info-list dt { font-weight: 600; color: var(--navy, #162b6f); }
.account-info-list dd { margin: 0; }
.quick-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-action {
  display: block;
  padding: 12px 16px;
  background: var(--navy, #162b6f);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  border: 0;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
}
.quick-action:hover { background: var(--orange, #ff9a2c); }
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.activity-empty { text-align: center; padding: 24px 12px; }
.activity-empty-title { margin: 0 0 8px; font-weight: 600; color: var(--navy, #162b6f); }
.activity-empty-body { margin: 0 0 16px; color: var(--muted, #6b7280); font-size: 14px; }
.activity-empty .quick-action { display: inline-block; width: auto; padding: 10px 20px; }

/* v1.6 Sprint C-2: Snapshot accordion cards in the Activity panel.
   Each card is one logical Snapshot (after groupSnapshotsByCorrelationId
   collapses sibling rows); clicking the header reveals the full Quote
   Context breakdown rendered by renderQuoteContextDetails. */
.snapshot-card {
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
.snapshot-card[data-expanded="true"] {
  border-color: var(--navy, #162b6f);
  box-shadow: 0 2px 8px rgba(22, 43, 111, 0.08);
}
.snapshot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--navy, #162b6f);
}
.snapshot-row:hover {
  background: #f9fafb;
}
.snapshot-row:focus-visible {
  outline: 2px solid var(--orange, #ff9a2c);
  outline-offset: -2px;
}
.snapshot-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.snapshot-badge-emailed {
  background: rgba(22, 43, 111, 0.1);
  color: var(--navy, #162b6f);
}
.snapshot-badge-saved {
  background: rgba(255, 154, 44, 0.15);
  color: #a85f00;
}
.snapshot-route {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.snapshot-time {
  font-size: 13px;
  color: var(--muted, #6b7280);
  white-space: nowrap;
}
.snapshot-toggle-icon {
  font-size: 12px;
  color: var(--muted, #6b7280);
  transition: transform 150ms ease;
}
.snapshot-card[data-expanded="true"] .snapshot-toggle-icon {
  transform: rotate(180deg);
}
.snapshot-details {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
}
.snapshot-details[hidden] { display: none; }
.snapshot-section {
  margin: 0 0 16px;
}
.snapshot-section:last-child { margin-bottom: 0; }
.snapshot-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy, #162b6f);
}
.snapshot-section-reference h4 {
  color: var(--muted, #6b7280);
}
.snapshot-section dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  font-size: 14px;
}
.snapshot-section dt {
  margin: 0;
  font-weight: 400;
  color: #374151;
}
.snapshot-section dt[data-depth="1"] {
  padding-left: 16px;
  color: var(--muted, #6b7280);
}
.snapshot-section dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.snapshot-details-empty {
  margin: 0;
  font-size: 14px;
  color: var(--muted, #6b7280);
  font-style: italic;
}
.snapshot-edit {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--navy, #162b6f);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.snapshot-edit:hover {
  background: var(--orange, #ff9a2c);
  color: #fff;
}

@media (max-width: 560px) {
  .snapshot-row {
    flex-wrap: wrap;
  }
  .snapshot-time {
    width: 100%;
    order: 3;
  }
}

@media (max-width: 720px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* v1.5: required-field marker. Decorative only — aria-hidden in the
   markup; native `required` attribute handles screenreader semantics. */
.required-marker {
  color: var(--error);
  font-weight: 700;
  margin-left: 2px;
}

/* v1.5: country-code + phone group on the signup form. */
.phone-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.phone-input-group select {
  flex: 0 0 auto;
  min-width: 140px;
  max-width: 220px;
}
.phone-input-group input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
}

/* review-fix H#7 — skip-to-content link.
   Mirrors marketing/style.css's `.skip-link` so the visual treatment is
   identical across surfaces. Off-screen until :focus so it doesn't
   distract sighted users; first reachable element by Tab key for
   keyboard / screen-reader users (WCAG 2.4.1 Bypass Blocks). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { left: 16px; top: 16px; }
