/* ==========================================================================
   GOCOSYS SEO Intelligence — Authentication (login / signup)

   Built on the design tokens declared in theme.css, so the auth screens
   inherit the dashboard palette and re-theme with <html data-bs-theme>.
   Layout is horizontal: a brand/product panel on the left, the form on the
   right. Below 992px it stacks into a single scrollable column.
   ========================================================================== */

/* The app shell locks scrolling (body{overflow:hidden}); auth pages are a
   normal document and must scroll, especially on short mobile viewports. */
body.auth-body { overflow: auto; height: auto; min-height: 100%; }

.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  min-height: 100svh; /* avoids the mobile URL-bar jump */
  background: var(--bg);
}

/* ==========================================================================
   Left — brand / product panel
   ========================================================================== */
/* Sticky at viewport height: the signup form is taller than the screen, and as
   a plain grid item this column would stretch to match it — spreading the logo,
   pitch and trust row across a screen and a half of empty space. Pinning it
   keeps the story in view while the form scrolls beside it. */
.auth-brand {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 40px 44px;
  /* Glow strength is a token so the light theme can dial it down — the same
     alphas that read as a soft wash on near-black look like stains on #eef1f6. */
  --glow-blue: rgba(79, 142, 247, .20);
  --glow-purple: rgba(167, 139, 250, .16);
  background:
    radial-gradient(900px 500px at 12% -10%, var(--glow-blue), transparent 60%),
    radial-gradient(700px 500px at 110% 110%, var(--glow-purple), transparent 55%),
    var(--bg-2);
  border-right: 1px solid var(--border);
}

/* Faint grid texture behind the content. */
.auth-brand::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-dim) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .5;
  mask-image: radial-gradient(700px 600px at 30% 30%, #000, transparent 75%);
  pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }

/* The supplied wordmark, used as-is. Height is fixed and width follows the
   artwork's own ratio, so the logo is never stretched or recoloured. */
.auth-logo-img { height: 30px; width: auto; display: block; flex-shrink: 0; }
.auth-logo-divider { width: 1px; height: 24px; background: var(--border-2); flex-shrink: 0; }

.auth-logo-text { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }

/* Takes the space left between the logo and the trust row and centres its own
   content there, so a sparse panel reads as balanced rather than as a void
   under the logo. */
.auth-pitch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
}
.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start; /* .auth-pitch is a flex column — without this the pill stretches full width */
  padding: 4px 10px; border-radius: 20px; margin-bottom: 16px;
  background: var(--primary-dim); color: var(--primary);
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.auth-headline {
  font-size: 30px; line-height: 1.22; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); margin: 0 0 12px;
}
.auth-headline em { font-style: normal; color: var(--primary); }
.auth-lede { font-size: 13px; line-height: 1.65; color: var(--text-soft); margin: 0; }

.auth-features { display: grid; gap: 10px; margin-top: 22px; padding: 0; list-style: none; }
.auth-feature { display: flex; align-items: flex-start; gap: 10px; }
.auth-feature i { color: var(--green); font-size: 13px; line-height: 1.5; flex-shrink: 0; }
.auth-feature b { display: block; font-size: 12px; font-weight: 600; color: var(--text-bright); }
.auth-feature small { font-size: 11px; color: var(--text-muted); }

.auth-trust { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.auth-trust span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text-muted); }
.auth-trust i { font-size: 12px; color: var(--text-dim); }

/* ==========================================================================
   Right — form panel
   ========================================================================== */
.auth-form-side {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 44px; background: var(--bg);
}
/* Centred with auto margins rather than justify-content: center. When the card
   is taller than the column, centring via justify-content pushes its top past
   the scroll origin and clips the heading unreachably; auto margins collapse to
   start-aligned instead, so nothing is ever cut off. */
.auth-card { width: 100%; max-width: 400px; margin-block: auto; }

/* Compact logo shown only when the brand panel is hidden (mobile). */
.auth-mobile-logo { display: none; margin-bottom: 22px; }

.auth-form-title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; margin: 0 0 6px; }
.auth-form-sub { font-size: 12px; color: var(--text-muted); margin: 0 0 22px; }

/* ---- Social sign-in ------------------------------------------------------ */
/* Side by side when the card has room for both; each takes a full row on a
   phone, and a lone button still spans the card. */
.auth-social { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 40px; padding: 9px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px;
  color: var(--text); font-size: 12.5px; font-weight: 500; font-family: inherit; white-space: nowrap;
  cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, transform .15s;
}
.btn-social:hover { background: var(--surface-3); border-color: var(--border-2); color: var(--text); transform: translateY(-1px); }
.btn-social:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-social svg, .btn-social .gcs-mark { width: 17px; height: 17px; flex-shrink: 0; }
/* The emblem is used as supplied — no tint, no container, no rounding. */
.gcs-mark { object-fit: contain; display: block; }

/* ---- "or" divider -------------------------------------------------------- */
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-or span { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

/* ---- Fields -------------------------------------------------------------- */
.auth-form { display: grid; gap: 16px; }
/* minmax(0, …): a bare 1fr won't shrink below its content, so a long
   timezone label would push its column wider than its neighbour. */
.auth-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth-field { display: block; }
.auth-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; font-weight: 500; color: var(--text-soft); margin-bottom: 6px;
}
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-wrap > i.lead {
  position: absolute; left: 11px; font-size: 13px; color: var(--text-dim); pointer-events: none;
  transition: color .15s;
}
.auth-input-wrap:focus-within > i.lead { color: var(--primary); }
.auth-input {
  width: 100%; min-height: 40px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px;
  padding: 9px 12px 9px 34px; font-size: 12.5px; color: var(--text);
  font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: var(--text-dim); }
.auth-input:hover { border-color: var(--border-2); }
.auth-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 142, 247, .15); }
.auth-input.has-toggle { padding-right: 38px; }
/* Native <select> (welcome.html): own chevron, since appearance:none drops the
   browser's; options follow the theme so the open list is readable in dark. */
.auth-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 32px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%238b949e' stroke-width='2' d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.auth-select option { background: var(--surface-2); color: var(--text); }
.auth-input[aria-invalid="true"] { border-color: var(--red); }

/* ---- Searchable select (js/combo-select.js) -------------------------------
   The native select stays in the form, holding the value, under a button
   trigger. The popup is a search box, a ranked list and a footer. */
.combo-native {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none;
}
.combo-trigger {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding-right: 32px; text-align: left; cursor: pointer; line-height: 1.4;
}
.combo-trigger .combo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-trigger.is-placeholder .combo-text { color: var(--text-dim); }
.combo-trigger:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 142, 247, .15); }
.combo-caret {
  position: absolute; right: 12px; top: 50%; margin-top: -6px;
  font-size: 11px; line-height: 12px; color: var(--text-dim); pointer-events: none;
  transition: transform .18s, color .15s;
}
/* The trigger is positioned, so it would paint over the field's icon. */
.combo > i.lead { z-index: 1; }
.combo.is-open > i.lead { color: var(--primary); }
.combo.is-open .combo-trigger { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 142, 247, .15); }
.combo.is-open .combo-caret { transform: rotate(180deg); color: var(--primary); }

/* Country code / UTC offset chip, in the trigger and the list. Mono, so every
   chip in a list is the same width and the names line up. */
.combo-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 18px; padding: 0 5px; border-radius: 5px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .02em;
  color: var(--text-muted); background: var(--surface-3); border: 1px solid var(--border);
}
.combo-badge[hidden] { display: none; }

.combo-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  display: flex; flex-direction: column;
  min-width: 100%; width: var(--combo-width, 100%); max-width: calc(100vw - 32px);
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: 0 22px 48px -18px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .3);
  overflow: hidden;
  transform-origin: top center;
  animation: combo-in .16s cubic-bezier(.2, .8, .2, 1);
}
.combo-panel[hidden] { display: none; }
.combo-panel.is-up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; animation-name: combo-in-up; }
.combo-panel.is-right { left: auto; right: 0; }
html[data-bs-theme="light"] .combo-panel {
  box-shadow: 0 22px 48px -20px rgba(15, 23, 42, .3), 0 2px 8px rgba(15, 23, 42, .08);
}
@keyframes combo-in    { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes combo-in-up { from { opacity: 0; transform: translateY(4px) scale(.985); }  to { opacity: 1; transform: none; } }

.combo-search {
  display: flex; align-items: center; gap: 9px; flex-shrink: 0;
  height: 42px; padding: 0 10px 0 13px; border-bottom: 1px solid var(--border);
}
.combo-search > i { font-size: 13px; color: var(--text-dim); }
.combo-search:focus-within > i { color: var(--primary); }
.combo-input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 12.5px; color: var(--text);
}
.combo-input::placeholder { color: var(--text-dim); }
.combo-clear {
  flex-shrink: 0; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--text-muted); font-size: 14px; cursor: pointer;
}
.combo-clear:hover { color: var(--text); }
.combo-clear[hidden] { display: none; }

.combo-list {
  position: relative; /* offsetTop of an option is measured from here */
  margin: 0; padding: 6px; list-style: none;
  max-height: 272px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
}
.combo-list[hidden] { display: none; }
.combo-group {
  padding: 8px 9px 5px; font-size: 9.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--text-dim);
}
.combo-group:not(:first-child) { margin-top: 5px; padding-top: 11px; border-top: 1px solid var(--border); }
.combo-option {
  display: flex; align-items: center; gap: 10px; min-height: 34px;
  padding: 7px 9px; border-radius: 7px; cursor: pointer;
  font-size: 12.5px; line-height: 1.35; color: var(--text-soft);
}
.combo-option .combo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-option.is-active { background: var(--surface-3); color: var(--text); }
.combo-option.is-blank { color: var(--text-muted); }
.combo-option[aria-selected="true"] { color: var(--text); font-weight: 500; }
.combo-option[aria-selected="true"] .combo-badge {
  color: var(--primary-on-dim, var(--primary)); background: var(--primary-dim);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}
.combo-option mark { padding: 0; background: none; color: var(--primary); font-weight: 600; }
.combo-tick { flex-shrink: 0; font-size: 15px; color: var(--primary); visibility: hidden; }
.combo-option[aria-selected="true"] .combo-tick { visibility: visible; }
.combo-tag {
  flex-shrink: 0; padding: 2px 7px; border-radius: 10px;
  font-size: 9px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  background: var(--green-dim); color: var(--green-on-dim, var(--green));
}

.combo-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 18px; text-align: center; font-size: 12px; color: var(--text-muted);
}
.combo-empty i { font-size: 18px; color: var(--text-dim); }
.combo-empty[hidden] { display: none; }

.combo-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0;
  padding: 7px 12px; border-top: 1px solid var(--border);
  font-size: 10.5px; color: var(--text-dim);
}
.combo-keys { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; }
.combo-keys kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 17px;
  padding: 0 4px; border-radius: 4px; border: 1px solid var(--border-2); box-shadow: none;
  background: var(--surface-3); color: var(--text-muted); font-family: var(--font-mono); font-size: 9.5px;
}
.combo-keys kbd + kbd { margin-left: -1px; }
.combo-count { flex-shrink: 0; margin-left: auto; white-space: nowrap; }
/* Touch: no keyboard hints, and a 16px search box so iOS does not zoom in. */
@media (pointer: coarse) {
  .combo-keys { display: none; }
  .combo-input { font-size: 16px; }
  .combo-option { min-height: 40px; }
}

.pw-toggle {
  position: absolute; right: 6px; width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; color: var(--text-muted); font-size: 13px;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-3); }

.field-error { display: none; font-size: 10.5px; color: var(--red); margin-top: 5px; }
.field-error.show { display: block; }

/* ---- Password strength meter --------------------------------------------- */
.pw-meter { display: none; margin-top: 8px; }
.pw-meter.show { display: block; }
.pw-meter-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter-bars i { height: 3px; border-radius: 2px; background: var(--surface-3); transition: background .2s; }
.pw-meter-note { font-size: 10px; color: var(--text-muted); margin-top: 5px; display: block; }
.pw-meter[data-score="1"] .pw-meter-bars i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-score="2"] .pw-meter-bars i:nth-child(-n+2) { background: var(--yellow); }
.pw-meter[data-score="3"] .pw-meter-bars i:nth-child(-n+3) { background: var(--primary); }
.pw-meter[data-score="4"] .pw-meter-bars i { background: var(--green); }

/* ---- Checkbox (remember me / terms) -------------------------------------- */
.auth-check { display: flex; align-items: flex-start; gap: 8px; }
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check .box {
  width: 15px; height: 15px; margin-top: 1px; flex-shrink: 0; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; font-size: 10px; transition: background .15s, border-color .15s, color .15s;
}
.auth-check input:checked + .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.auth-check input:focus-visible + .box { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-check .txt { font-size: 11.5px; color: var(--text-soft); line-height: 1.5; }
/* Only the plain-text variant is a <label>; consent text carrying links is a
   <span>, so clicks land on the link instead of toggling the box. */
label.auth-check-txt, .auth-check label.txt { cursor: pointer; }
.auth-check a { color: var(--primary); text-decoration: none; }
.auth-check a:hover { text-decoration: underline; }

/* ==========================================================================
   "I'm not a robot" verification widget

   A self-contained challenge for the frontend stage: click -> verifying ->
   verified. The result is mirrored into a hidden input so a real provider
   (reCAPTCHA / Turnstile) can replace the markup without touching the layout.
   ========================================================================== */
/* Google's widget is a fixed 304×78 iframe that cannot be restyled, so it is
   only centred and given room. On narrow phones it is scaled down rather than
   allowed to overflow the card. */
.robot-wrap { display: flex; justify-content: center; }
.robot-recaptcha { transform-origin: center top; }
@media (max-width: 360px) {
  .robot-recaptcha { transform: scale(.85); margin-bottom: -12px; }
}

.robot-check {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .15s;
}
.robot-check[data-state="verified"] { border-color: var(--green); }
.robot-check[data-state="error"] { border-color: var(--red); }

.robot-box {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 4px;
  border: 2px solid var(--border-2); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: transparent; font-size: 12px;
  transition: background .2s, border-color .2s, color .2s;
}
.robot-box:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.robot-check[data-state="verifying"] .robot-box { border-color: var(--primary); cursor: default; }
.robot-check[data-state="verified"] .robot-box {
  background: var(--green); border-color: var(--green); color: #fff; cursor: default;
}
.robot-spinner {
  display: none; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--primary-dim); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
.robot-check[data-state="verifying"] .robot-spinner { display: block; }
.robot-check[data-state="verifying"] .robot-tick { display: none; }

.robot-label { flex: 1; font-size: 12px; color: var(--text); user-select: none; cursor: pointer; }
.robot-check[data-state="verified"] .robot-label { color: var(--green); font-weight: 500; }
.robot-brand { text-align: right; flex-shrink: 0; line-height: 1.25; }
.robot-brand b { display: block; font-size: 9.5px; font-weight: 600; color: var(--text-muted); }
.robot-brand small { font-size: 8px; color: var(--text-dim); }

/* ==========================================================================
   Submit, footer, alerts
   ========================================================================== */
.btn-auth {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; min-height: 42px; padding: 11px 16px; margin-top: 2px;
  background: var(--primary);
  background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 72%, var(--purple)) 100%);
  border: 1px solid transparent; border-radius: 9px;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--primary) 85%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .16);
  color: #fff; font-size: 13px; font-weight: 600; font-family: inherit; letter-spacing: .01em;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s, filter .15s, opacity .15s;
}
/* A light sweep across the button on hover. */
.btn-auth::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn-auth:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--primary) 90%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-auth:hover::after { transform: translateX(120%); }
.btn-auth:active { transform: translateY(0); }
.btn-auth:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-auth:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-auth i { transition: transform .15s; }
.btn-auth:hover i { transform: translateX(2px); }

/* Busy: the arrow becomes a spinner and the label says what is happening. */
.btn-auth-spinner {
  display: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-auth.is-busy { opacity: 1; cursor: progress; }
.btn-auth.is-busy .btn-auth-spinner { display: inline-block; }
.btn-auth.is-busy i { display: none; }

.auth-footnote { font-size: 12px; color: var(--text-muted); text-align: center; margin: 20px 0 0; }
.auth-footnote a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-footnote a:hover { text-decoration: underline; }

.auth-legal { font-size: 10.5px; color: var(--text-dim); text-align: center; margin: 26px 0 0; line-height: 1.6; }
.auth-legal a { color: var(--text-muted); text-decoration: none; }
.auth-legal a:hover { color: var(--text-soft); text-decoration: underline; }

.auth-alert {
  display: none; align-items: flex-start; gap: 8px; margin-bottom: 16px;
  padding: 10px 12px; border-radius: 7px;
  background: var(--red-dim); border: 1px solid var(--red); color: var(--red);
  font-size: 11.5px; line-height: 1.5;
}
.auth-alert.show { display: flex; }

/* ==========================================================================
   Sign in / Create account / Forgot password — the panels of login.html
   ========================================================================== */
/* The form sits on a raised card so the three panels and the federated buttons
   read as one object. Dropped on phones, where every pixel of width counts. */
.auth-card {
  padding: 26px 26px 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 5%, transparent), transparent 140px),
    var(--surface);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .65), 0 1px 0 rgba(255, 255, 255, .03) inset;
}
html[data-bs-theme="light"] .auth-card { box-shadow: 0 28px 60px -36px rgba(15, 23, 42, .28); }

/* Segmented switch. The pill is one element that slides under the tabs. */
.auth-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; margin-bottom: 22px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.auth-tabs-pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 9px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 8px 18px -10px rgba(0, 0, 0, .5);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
html[data-bs-theme="light"] .auth-tabs-pill { box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 6px 14px -8px rgba(15, 23, 42, .25); }
.auth-panels[data-active="signup"] .auth-tabs-pill { transform: translateX(100%); }
.auth-tab {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; min-height: 34px;
  border-radius: 9px; font-size: 12.5px; font-weight: 600; text-decoration: none;
  color: var(--text-muted); transition: color .2s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab[aria-selected="true"] { color: var(--text); }
.auth-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.auth-panel.is-entering { animation: auth-panel-in .34s cubic-bezier(.2, .8, .2, 1); }
@keyframes auth-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Forgot password: an icon badge over the heading, and a way back. */
.auth-badge {
  width: 46px; height: 46px; margin-bottom: 14px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--primary-dim); color: var(--primary-on-dim, var(--primary));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);
}
.auth-badge.is-success {
  background: var(--green-dim); color: var(--green-on-dim, var(--green));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 30%, transparent);
}
.auth-back {
  display: flex; width: max-content; align-items: center; gap: 6px; margin-bottom: 18px;
  font-size: 11.5px; font-weight: 500; color: var(--text-muted); text-decoration: none;
  transition: color .15s;
}
.auth-back:hover { color: var(--text); }
.auth-back i { transition: transform .15s; }
.auth-back:hover i { transform: translateX(-2px); }

.auth-link { font-size: 11px; font-weight: 500; color: var(--primary); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-hint { font-size: 11.5px; color: var(--text-muted); text-align: center; margin: 14px 0 0; line-height: 1.55; }
.auth-hint a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-hint a:hover { text-decoration: underline; }

/* "Resend verification email" under an unverified sign-in. */
.auth-resend { margin: -6px 0 14px; }
.auth-resend button {
  display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--primary); cursor: pointer;
}
.auth-resend button:hover { text-decoration: underline; }

/* Light theme — the brand panel's glows are tuned for a dark backdrop. */
html[data-bs-theme="light"] .auth-brand {
  --glow-blue: rgba(47, 111, 224, .10);
  --glow-purple: rgba(109, 40, 217, .08);
}

/* Theme toggle — the same control as the dashboard navbar, placed for pre-login. */
.auth-theme-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 20;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px;
}
.auth-theme-toggle:hover { color: var(--text); border-color: var(--border-2); }

/* ==========================================================================
   Responsive — tablet and mobile
   ========================================================================== */
@media (max-width: 1200px) {
  .auth-brand { padding: 32px 34px; }
  .auth-form-side { padding: 32px 34px; }
  .auth-headline { font-size: 26px; }
}

/* ==========================================================================
   Desktop — one screen, no page scroll

   Both screens are meant to be taken in at a glance, so the shell is locked to
   the viewport and the form metrics are tightened until the taller of the two
   (signup) fits. Declared after the max-width:1200 block so it wins in the
   993–1200px overlap.

   `.auth-form-side` keeps overflow-y:auto as a safety valve: on an unusually
   short window the column scrolls internally rather than clipping, which would
   otherwise put the submit button out of reach.
   ========================================================================== */
@media (min-width: 993px) {
  body.auth-body { overflow: hidden; height: 100%; }
  .auth-shell { height: 100vh; height: 100svh; min-height: 0; overflow: hidden; }
  .auth-form-side { padding: 28px 40px; overflow-y: auto; }

  /* Wider card for the paired fields. The single social button (Google) spans
     the full width — the base .auth-social grid is one column. */
  .auth-card { max-width: 468px; }
  .auth-tabs { margin-bottom: 18px; }

  .auth-form-title { font-size: 20px; margin-bottom: 4px; }
  .auth-form-sub { margin-bottom: 16px; }

  .auth-form { gap: 14px; }
  .auth-label { margin-bottom: 4px; }
  .auth-input { min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
  .robot-check { padding: 9px 12px; }
  .btn-auth { min-height: 38px; padding: 9px 16px; }

  .auth-or { margin: 13px 0; }
  .auth-social { gap: 7px; }
  .btn-social { min-height: 36px; padding: 8px 14px; }
  .auth-footnote { margin-top: 14px; }
  .auth-legal { margin-top: 14px; }
}

/* Shorter desktop windows (roughly 1366×768 laptops) — tighten a second time. */
@media (min-width: 993px) and (max-height: 860px) {
  .auth-brand { padding: 28px 34px; gap: 20px; }
  .auth-headline { font-size: 24px; }
  .auth-features { gap: 8px; margin-top: 16px; }
  .auth-form-side { padding: 20px 36px; }

  .auth-card { padding: 20px 22px 18px; }
  .auth-tabs { margin-bottom: 14px; }
  .auth-tab { min-height: 30px; }
  .auth-badge { width: 40px; height: 40px; font-size: 18px; margin-bottom: 10px; }
  .auth-back { margin-bottom: 12px; }

  .auth-form-title { font-size: 18px; }
  .auth-form-sub { margin-bottom: 12px; font-size: 11.5px; }
  .auth-form { gap: 11px; }
  .auth-label { margin-bottom: 3px; font-size: 10.5px; }
  .auth-input { min-height: 33px; padding-top: 6px; padding-bottom: 6px; }
  .robot-check { padding: 7px 11px; }
  .btn-auth { min-height: 36px; }

  .auth-or { margin: 9px 0; }
  .btn-social { min-height: 34px; }
  .auth-footnote { margin-top: 10px; }
  .auth-legal { margin-top: 8px; }
}

/* Below 992px the brand panel is dropped: on a phone the form must be the
   first thing in view, so the product story collapses into the header logo. */
@media (max-width: 992px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: flex; align-items: center; gap: 10px; }
  .auth-form-side { padding: 32px 24px; justify-content: flex-start; }
  .auth-card { max-width: 440px; }
}

@media (max-width: 480px) {
  .auth-form-side { padding: 24px 18px 36px; }
  .auth-card { padding: 0; background: none; border: 0; box-shadow: none; }
  .auth-form-title { font-size: 20px; }
  .auth-row { grid-template-columns: 1fr; }
  .robot-brand { display: none; }
  .auth-theme-toggle { top: 12px; right: 12px; }
}

/* Landscape phones: keep the form reachable without a tall header. */
@media (max-height: 560px) and (max-width: 992px) {
  .auth-form-side { padding-top: 20px; }
  .auth-mobile-logo { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .robot-spinner { animation: none; }
  .auth-panel.is-entering { animation: none; }
  .auth-tabs-pill, .btn-auth, .btn-auth::after, .btn-social { transition: none; }
  .combo-panel { animation: none; }
  .combo-caret { transition: none; }
}
/* Settings › Appearance › "Animations" off. */
html[data-no-anim] .auth-tabs-pill,
html[data-no-anim] .btn-auth, html[data-no-anim] .btn-auth::after,
html[data-no-anim] .combo-caret { transition: none; }
html[data-no-anim] .combo-panel { animation: none; }
