/* CallTurbo app + account pages: the marketing family (ink, indigo, cream, DM Sans).
   Loaded by the prebuilt SPA (index.html) and by the server-rendered /user/signup page. */
:root {
  --ct-ink: #080a0f;
  --ct-ink-2: #10141d;
  --ct-panel: #151a24;
  --ct-paper: #f1efe8;
  --ct-white: #f8f9fb;
  --ct-muted: #aeb6c4;
  --ct-muted-dark: #596171;
  --ct-accent: #7587ff;
  --ct-accent-soft: #aeb8ff;
  --ct-line: rgba(248, 249, 251, 0.13);
  --ct-font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ct-mono: "IBM Plex Mono", ui-monospace, monospace;
}

.ct-account *, .ct-account *::before, .ct-account *::after,
.ct-auth-header, .ct-auth-header *, .ct-plan-bar, .ct-plan-bar *, .ct-plan-note, .ct-auth-switch { box-sizing: border-box; }

.ct-account .skip-link {
  position: fixed; z-index: 100; top: 0.75rem; left: 0.75rem; padding: 0.75rem 1rem;
  color: var(--ct-ink); background: var(--ct-white); border-radius: 0.5rem; transform: translateY(-160%);
}
.ct-account .skip-link:focus { transform: translateY(0); }
.ct-account a { color: inherit; }
.ct-form > p a { color: var(--ct-accent-soft); font-weight: 600; text-underline-offset: 3px; }

/* Type: one family across site and app. */
body,
#root,
#root .MuiTypography-root,
#root .MuiButtonBase-root,
#root .MuiInputBase-root,
#root .MuiFormLabel-root,
#root .MuiChip-root,
#root .MuiTableCell-root,
#root .MuiMenuItem-root,
#root .MuiListItemText-primary,
#root .MuiListItemText-secondary,
.MuiPopover-root,
.MuiDialog-root,
.MuiTooltip-tooltip,
.MuiSnackbar-root {
  font-family: var(--ct-font) !important;
}

#root .MuiTypography-root:is(h1, h2, h3, h4, h5, h6) { letter-spacing: -0.025em; }

::selection { color: var(--ct-ink); background: var(--ct-accent-soft); }

#root :focus-visible { outline: 2px solid var(--ct-accent-soft); outline-offset: 2px; }

* { scrollbar-color: rgba(174, 184, 255, 0.28) transparent; scrollbar-width: thin; }

/* ── Sign-in screen (SPA) ───────────────────────────────────────────── */
body.ct-auth { background: var(--ct-ink); }

body.ct-auth .ct-auth-stage {
  background:
    radial-gradient(circle at 50% 30%, rgba(117, 135, 255, 0.18), transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--ct-ink) !important;
  background-size: auto, 72px 72px, 72px 72px, auto !important;
  padding-top: 5.5rem !important;
}

body.ct-auth .ct-auth-blob { display: none !important; }

body.ct-auth .ct-auth-card {
  border: 1px solid var(--ct-line) !important;
  border-radius: 1.25rem !important;
  background: rgba(16, 20, 29, 0.94) !important;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: none !important;
}

body.ct-auth .ct-auth-card > .ct-auth-topline {
  height: 2px !important;
  background: linear-gradient(90deg, var(--ct-accent), #b7c0ff) !important;
}

body.ct-auth .ct-auth-icon {
  width: 3.5rem !important;
  height: 3.5rem !important;
  border-radius: 50% !important;
  background: var(--ct-ink) url("/assets/callturbo-logo-v1.png") center / 100% no-repeat !important;
  box-shadow: 0 0 0 1px var(--ct-line) !important;
}
body.ct-auth .ct-auth-icon > * { display: none !important; }

#root .ct-brand-icon {
  border-radius: 50% !important;
  background: var(--ct-ink) url("/assets/callturbo-logo-v1.png") center / 100% no-repeat !important;
  box-shadow: 0 0 0 1px var(--ct-line) !important;
}
#root .ct-brand-icon > * { display: none !important; }

body.ct-auth .ct-auth-card h5 { font-weight: 700 !important; letter-spacing: -0.035em !important; color: var(--ct-white) !important; }
body.ct-auth .ct-auth-card p,
body.ct-auth .ct-auth-card .MuiTypography-caption { color: var(--ct-muted) !important; }

body.ct-auth .ct-auth-card .MuiChip-root {
  border: 1px solid var(--ct-line) !important;
  background: transparent !important;
  color: var(--ct-accent-soft) !important;
}
body.ct-auth .ct-auth-card .MuiChip-root svg { color: var(--ct-accent-soft) !important; }
body.ct-auth .ct-auth-card .MuiChip-label { font-size: 0.72rem !important; font-weight: 600 !important; }

body.ct-auth .ct-auth-card .MuiOutlinedInput-root {
  border-radius: 0.65rem !important;
  background: var(--ct-ink) !important;
}
body.ct-auth .ct-auth-card .MuiOutlinedInput-notchedOutline { border-color: var(--ct-line) !important; }
body.ct-auth .ct-auth-card .Mui-focused .MuiOutlinedInput-notchedOutline { border-color: var(--ct-accent) !important; }
body.ct-auth .ct-auth-card input { color: var(--ct-white) !important; }
body.ct-auth .ct-auth-card input::placeholder { color: #8a92a1 !important; opacity: 1 !important; }
body.ct-auth .ct-auth-card .MuiInputAdornment-root svg { color: #8a92a1 !important; }
body.ct-auth .ct-auth-card .MuiFormLabel-root { color: var(--ct-muted) !important; }

body.ct-auth .ct-auth-card .MuiButton-containedPrimary {
  border-radius: 0.65rem !important;
  color: var(--ct-ink) !important;
  background: var(--ct-white) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  transition: transform 180ms ease, background 180ms ease !important;
}
body.ct-auth .ct-auth-card .MuiButton-containedPrimary:hover { background: #dfe3ff !important; transform: translateY(-2px); }

body.ct-auth .ct-auth-card span[class*="caption"]:hover { color: var(--ct-accent-soft) !important; }

/* Injected header, plan note and account switch link (sign-in screen). */
.ct-auth-header {
  position: fixed;
  z-index: 1300;
  top: 1rem;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 2rem), 1180px);
  min-height: 4rem;
  padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  border: 1px solid var(--ct-line);
  border-radius: 1rem;
  background: rgba(8, 10, 15, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%);
  font-family: var(--ct-font);
}
.ct-auth-header a { color: var(--ct-white); text-decoration: none; }
.ct-auth-brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 700; letter-spacing: -0.03em; }
.ct-auth-brand img { width: 36px; height: 36px; border-radius: 50%; }
.ct-auth-header nav { display: flex; align-items: center; gap: 1.1rem; font-size: 0.85rem; }
.ct-auth-header nav a:not(.ct-btn) { color: #c9ced7; transition: color 160ms ease; }
.ct-auth-header nav a:not(.ct-btn):hover { color: var(--ct-accent-soft); }

.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border: 1px solid var(--ct-white);
  border-radius: 0.65rem;
  color: var(--ct-ink) !important;
  background: var(--ct-white);
  font: 600 0.88rem/1 var(--ct-font);
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}
.ct-btn:hover { background: #dfe3ff; transform: translateY(-2px); }
.ct-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.ct-btn-ghost { color: var(--ct-white) !important; background: transparent; border-color: var(--ct-line); }
.ct-btn-ghost:hover { background: rgba(248, 249, 251, 0.06); }

.ct-plan-note {
  margin: 0 0 1.1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(174, 184, 255, 0.28);
  border-radius: 0.75rem;
  color: #d9ddf9;
  background: rgba(117, 135, 255, 0.08);
  font: 400 0.86rem/1.5 var(--ct-font);
  text-align: left;
}
.ct-plan-note strong { color: var(--ct-white); font-weight: 700; }
.ct-plan-note a { color: var(--ct-accent-soft); font-weight: 600; text-underline-offset: 3px; }

.ct-auth-switch {
  margin: 1.1rem 0 0;
  color: var(--ct-muted);
  font: 400 0.9rem/1.5 var(--ct-font);
  text-align: center;
}
.ct-auth-switch a { color: var(--ct-accent-soft); font-weight: 600; text-underline-offset: 3px; }

/* Plan reminder inside the console */
.ct-plan-bar {
  position: fixed;
  z-index: 1250;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: min(calc(100% - 2rem), 26rem);
  padding: 0.9rem 0.9rem 0.9rem 1rem;
  border: 1px solid var(--ct-line);
  border-radius: 0.9rem;
  color: #d9ddf9;
  background: rgba(16, 20, 29, 0.97);
  box-shadow: 0 18px 48px -18px rgba(0, 0, 0, 0.7);
  font: 400 0.85rem/1.5 var(--ct-font);
  animation: ct-rise 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ct-plan-bar strong { color: var(--ct-white); }
.ct-plan-bar a { color: var(--ct-accent-soft); }
.ct-plan-bar button {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--ct-line);
  border-radius: 50%;
  color: var(--ct-muted);
  background: transparent;
  cursor: pointer;
}
.ct-plan-bar button svg { width: 12px; height: 12px; }

@keyframes ct-rise { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 640px) {
  .ct-auth-header { top: 0.6rem; min-height: 3.4rem; width: calc(100% - 1.2rem); }
  .ct-auth-header nav .ct-hide-sm { display: none; }
  body.ct-auth .ct-auth-stage { padding-top: 4.6rem !important; }
  .ct-plan-bar { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-plan-bar { animation: none; }
  .ct-btn, body.ct-auth .ct-auth-card .MuiButton-containedPrimary { transition: none !important; }
  .ct-btn:hover, body.ct-auth .ct-auth-card .MuiButton-containedPrimary:hover { transform: none; }
}

/* ── Server-rendered account page (/user/signup) ────────────────────── */
.ct-account {
  min-height: 100svh;
  margin: 0;
  color: var(--ct-white);
  background:
    radial-gradient(circle at 70% 18%, rgba(117, 135, 255, 0.16), transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--ct-ink);
  background-size: auto, 72px 72px, 72px 72px, auto;
  font-family: var(--ct-font);
  -webkit-font-smoothing: antialiased;
}
.ct-account .ct-auth-header { position: relative; top: auto; left: auto; margin: 1rem auto 0; transform: none; }

.ct-account-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
  width: min(calc(100% - 2rem), 1180px);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0 5rem;
}

.ct-account-intro h1 {
  max-width: 13ch;
  margin: 0 0 1.1rem;
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.ct-account-intro > p { max-width: 34rem; margin: 0 0 2rem; color: var(--ct-muted); font-size: 1.05rem; line-height: 1.6; }

.ct-plan-picker { margin: 0; padding: 0; border: 0; }
.ct-plan-picker legend { margin-bottom: 0.8rem; color: var(--ct-white); font-weight: 600; }
.ct-plan-options { display: grid; gap: 0.6rem; max-width: 34rem; }
.ct-plan-option { position: relative; display: block; cursor: pointer; }
.ct-plan-option input { position: absolute; opacity: 0; }
.ct-plan-option span {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--ct-line);
  border-radius: 0.8rem;
  background: rgba(16, 20, 29, 0.7);
  transition: border-color 160ms ease, background 160ms ease;
}
.ct-plan-option b { font-size: 1rem; }
.ct-plan-option em { grid-row: span 2; align-self: center; font: 600 1rem/1 var(--ct-font); font-style: normal; font-variant-numeric: tabular-nums; }
.ct-plan-option small { color: var(--ct-muted); font-size: 0.82rem; }
.ct-plan-option:hover span { border-color: rgba(174, 184, 255, 0.4); }
.ct-plan-option input:checked + span { border-color: var(--ct-accent); background: rgba(117, 135, 255, 0.1); box-shadow: inset 0 0 0 1px var(--ct-accent); }
.ct-plan-option input:focus-visible + span { outline: 2px solid var(--ct-accent-soft); outline-offset: 2px; }

.ct-billing { display: inline-flex; gap: 0.25rem; margin: 0 0 0.9rem; padding: 0.25rem; border: 1px solid var(--ct-line); border-radius: 0.7rem; }
.ct-billing label { position: relative; cursor: pointer; }
.ct-billing input { position: absolute; opacity: 0; }
.ct-billing span { display: block; padding: 0.45rem 0.85rem; border-radius: 0.5rem; color: var(--ct-muted); font-size: 0.85rem; font-weight: 600; }
.ct-billing input:checked + span { color: var(--ct-ink); background: var(--ct-white); }
.ct-billing input:focus-visible + span { outline: 2px solid var(--ct-accent-soft); }

.ct-truth { max-width: 34rem; margin: 1.4rem 0 0; color: var(--ct-muted); font-size: 0.88rem; line-height: 1.6; }
.ct-truth a { color: var(--ct-accent-soft); }

.ct-form {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--ct-line);
  border-radius: 1.25rem;
  background: rgba(16, 20, 29, 0.94);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}
.ct-form h2 { margin: 0 0 0.35rem; font-size: 1.45rem; letter-spacing: -0.035em; }
.ct-form > p { margin: 0 0 1.4rem; color: var(--ct-muted); font-size: 0.92rem; }
.ct-field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.ct-field label { font-size: 0.85rem; font-weight: 600; }
.ct-field label small { color: var(--ct-muted); font-weight: 400; }
.ct-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0 0.9rem;
  border: 1px solid var(--ct-line);
  border-radius: 0.65rem;
  color: var(--ct-white);
  background: var(--ct-ink);
  font: 400 1rem/1 var(--ct-font);
  transition: border-color 160ms ease;
}
.ct-field input:focus { outline: none; border-color: var(--ct-accent); box-shadow: 0 0 0 3px rgba(117, 135, 255, 0.2); }
.ct-field input[aria-invalid="true"] { border-color: #ff8a8a; }
.ct-form .ct-btn { width: 100%; min-height: 3.15rem; margin-top: 0.4rem; font-size: 0.95rem; }
.ct-form-error { min-height: 1.4rem; margin: 0.2rem 0 0.4rem; color: #ffb4b4; font-size: 0.88rem; }
.ct-form-legal { margin: 1rem 0 0; color: #8a92a1; font-size: 0.78rem; line-height: 1.5; }
.ct-form-legal a { color: var(--ct-muted); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 900px) {
  .ct-account-main { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .ct-account-intro h1 { max-width: none; }
}

/* r3 2026-11-16: checkout notes on sign-up and the checkout hand-off page */
.ct-form-note { margin: 0.75rem 0 0; padding: 0.7rem 0.85rem; border: 1px solid rgba(117, 135, 255, 0.35); border-radius: 10px; color: var(--ct-muted); font-size: 0.88rem; line-height: 1.5; }
.ct-form-note[hidden] { display: none; }
.ct-form-note a, .ct-checkout-status a { color: var(--ct-accent-soft); }
.ct-checkout-main { min-height: 60vh; }
.ct-checkout-status { color: var(--ct-muted); }
