/*
 * Speed Launch · Enterprise authentication screens
 * Load after styles.css, auth-professional.css and typography.css.
 * Dark brand panel on the left (matches the workspace sidebar), calm form on the right.
 */

.speed-auth.auth-page {
  --auth-ink: #0f172a;
  --auth-copy: #475569;
  --auth-muted: #64748b;
  --auth-line: #e2e8f0;
  --auth-line-strong: #cbd5e1;
  --auth-brand: #2f5be9;
  --auth-brand-deep: #2446c7;
  --auth-soft: #e9efff;
  --auth-ring: rgba(47, 91, 233, .22);
  --auth-surface: #ffffff;
  --auth-surface-2: #f8fafc;
  --auth-side-bg: #0f172a;
  --auth-side-bg-2: #0b1220;
  --auth-side-text: #cbd5e1;
  --auth-side-muted: #8593ab;
  --auth-side-line: rgba(255, 255, 255, .10);
  grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr);
  background: var(--auth-surface);
  color: var(--auth-ink);
  font-family: var(--sl-type-ui, Inter, system-ui, sans-serif);
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------- brand story panel */
.speed-auth .auth-story {
  gap: 22px;
  padding: clamp(28px, 4vw, 52px);
  border-right: 1px solid var(--auth-side-line);
  background: linear-gradient(180deg, var(--auth-side-bg) 0%, var(--auth-side-bg-2) 100%);
  color: var(--auth-side-text);
}
.speed-auth .auth-story::before,
.speed-auth .auth-story::after { display: none; }
.speed-auth .auth-story .speed-brand { color: #fff; font-family: var(--sl-type-display, Onest, sans-serif); font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.speed-auth .speed-mark { width: 36px; height: 36px; border-radius: 9px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.speed-auth .auth-story .speed-brand small { color: var(--auth-side-muted); font-family: var(--sl-type-ui, Inter, sans-serif); font-size: 9px; font-weight: 600; letter-spacing: .14em; }
.speed-auth .auth-story-copy { margin: clamp(20px, 6vh, 64px) 0 0; max-width: 560px; }
.speed-auth .auth-story .eyebrow { margin: 0 0 12px; color: var(--auth-side-muted); font-family: var(--sl-type-ui, Inter, sans-serif); font-size: 11px; font-weight: 600; letter-spacing: .1em; }
.speed-auth .auth-story h1 {
  max-width: 560px;
  color: #fff;
  font-family: var(--sl-type-display, Onest, sans-serif);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.speed-auth .auth-story-copy > p:last-child { max-width: 520px; margin: 14px 0 0; color: var(--auth-side-text); font-size: 15px; line-height: 1.65; opacity: .9; }
.speed-auth .auth-story-preview {
  width: min(640px, 100%);
  margin: auto 0 0;
  padding: 6px;
  border: 1px solid var(--auth-side-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.speed-auth .auth-story-preview img { border-radius: 11px; }
.speed-auth .auth-story > .form-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--auth-side-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}

/* ------------------------------------------------------------- form panel */
.speed-auth .auth-panel { padding: clamp(24px, 4vw, 56px); background: var(--auth-surface); }
.speed-auth .auth-box { width: min(100%, 420px); }
.speed-auth .auth-mobile-top { margin-bottom: 34px; gap: 8px; }
.speed-auth .lang-toggle { padding: 3px; border: 1px solid var(--auth-line); border-radius: 9px; background: var(--auth-surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.speed-auth .lang-toggle button { min-width: 32px; min-height: 28px; padding: 0 8px; border-radius: 6px; color: var(--auth-muted); font-size: 11.5px; font-weight: 600; }
.speed-auth .lang-toggle button.active { background: var(--auth-ink); color: #fff; box-shadow: none; }
.speed-auth .theme-switch { flex-basis: 36px; width: 36px; height: 36px; border: 1px solid var(--auth-line); border-radius: 9px; background: var(--auth-surface); color: var(--auth-muted); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.speed-auth .theme-switch:hover { border-color: var(--auth-line-strong); background: var(--auth-surface-2); color: var(--auth-ink); transform: none; }
.speed-auth .theme-switch svg { width: 16px; height: 16px; }
.speed-auth .auth-box .eyebrow { margin: 0 0 10px; color: var(--auth-muted); font-family: var(--sl-type-ui, Inter, sans-serif); font-size: 11px; font-weight: 600; letter-spacing: .1em; }
.speed-auth .auth-box h2,
.speed-auth .reset-step h2 {
  margin: 0 0 8px;
  color: var(--auth-ink);
  font-family: var(--sl-type-display, Onest, sans-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.speed-auth .auth-box .muted { color: var(--auth-copy); font-size: 14px; line-height: 1.55; }
.speed-auth .auth-tabs { gap: 3px; margin: 22px 0 20px; padding: 3px; border: 1px solid var(--auth-line); border-radius: 10px; background: var(--auth-surface-2); }
.speed-auth .auth-tabs button { min-height: 36px; padding: 6px 12px; border-radius: 7px; color: var(--auth-muted); font-size: 13px; font-weight: 600; }
.speed-auth .auth-tabs button.active { background: var(--auth-surface); color: var(--auth-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--auth-line); }
.speed-auth .form-stack { gap: 14px; }
.speed-auth .field { gap: 6px; color: var(--auth-ink); font-size: 12.5px; font-weight: 600; }
.speed-auth .field > span:first-child { padding: 0; }
.speed-auth .field input,
.speed-auth .field select {
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--auth-line-strong);
  border-radius: 8px;
  background: var(--auth-surface);
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 400;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.speed-auth .field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.speed-auth .field input::placeholder { color: #94a3b8; }
.speed-auth .field input:hover,
.speed-auth .field select:hover { border-color: #94a3b8; background-color: var(--auth-surface); }
.speed-auth .field input:focus,
.speed-auth .field select:focus { border-color: var(--auth-brand); background-color: var(--auth-surface); box-shadow: 0 0 0 3px var(--auth-ring); }
.speed-auth .password-control input { padding-right: 44px; }
.speed-auth .password-toggle { right: 3px; width: 34px; height: 34px; border-radius: 6px; color: var(--auth-muted); }
.speed-auth .auth-forgot { margin: -6px 0 0; color: var(--auth-brand); font-size: 12.5px; font-weight: 600; }
.speed-auth .btn { min-height: 40px; padding: 8px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.speed-auth .btn-primary { border: 1px solid var(--auth-brand-deep); background: var(--auth-brand); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(15, 23, 42, .12); }
.speed-auth .btn-primary:hover { background: var(--auth-brand-deep); transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 4px 12px var(--auth-ring); }
.speed-auth .form-note { color: var(--auth-muted); font-size: 12px; line-height: 1.5; }
.speed-auth .form-error { border: 1px solid rgba(192, 54, 74, .3); border-radius: 8px; background: #fdecef; color: #c0364a; font-size: 12.5px; }
.speed-auth .auth-back { margin-bottom: 22px; color: var(--auth-muted); font-size: 12.5px; font-weight: 600; }
.speed-auth .reset-progress { margin-bottom: 22px; }
.speed-auth .reset-progress i { background: var(--auth-surface-2); color: var(--auth-muted); border: 1px solid var(--auth-line); }
.speed-auth .reset-progress i.active { background: var(--auth-brand); border-color: var(--auth-brand); color: #fff; box-shadow: none; }
.speed-auth .reset-progress > span { background: var(--auth-line); }
.speed-auth .reset-progress > span.active { background: var(--auth-brand); }
.speed-auth .reset-code-input { font-size: 20px !important; letter-spacing: .2em; }

/* ----------------------------------------------------------------- dark */
html[data-theme="dark"] .speed-auth.auth-page {
  --auth-ink: #f1f5f9;
  --auth-copy: #cbd5e1;
  --auth-muted: #94a3b8;
  --auth-line: rgba(148, 163, 184, .18);
  --auth-line-strong: rgba(148, 163, 184, .3);
  --auth-brand: #7c9aff;
  --auth-brand-deep: #a3b8ff;
  --auth-soft: rgba(124, 154, 255, .14);
  --auth-ring: rgba(124, 154, 255, .3);
  --auth-surface: #111827;
  --auth-surface-2: #151d2c;
  --auth-side-bg: #0a0f1a;
  --auth-side-bg-2: #070a12;
  background: var(--auth-surface);
}
html[data-theme="dark"] .speed-auth .auth-story { border-color: var(--auth-side-line); background: linear-gradient(180deg, var(--auth-side-bg) 0%, var(--auth-side-bg-2) 100%); }
html[data-theme="dark"] .speed-auth .auth-panel { background: var(--auth-surface); }
html[data-theme="dark"] .speed-auth .lang-toggle,
html[data-theme="dark"] .speed-auth .theme-switch { border-color: var(--auth-line); background: var(--auth-surface-2); color: var(--auth-muted); }
html[data-theme="dark"] .speed-auth .lang-toggle button.active { background: var(--auth-brand); color: #0b1017; }
html[data-theme="dark"] .speed-auth .auth-tabs { border-color: var(--auth-line); background: var(--auth-surface-2); }
html[data-theme="dark"] .speed-auth .auth-tabs button.active { background: #1e293b; color: #fff; box-shadow: none; }
html[data-theme="dark"] .speed-auth .field input,
html[data-theme="dark"] .speed-auth .field select { border-color: var(--auth-line-strong); background-color: var(--auth-surface-2); color: var(--auth-ink); }
html[data-theme="dark"] .speed-auth .btn-primary { color: #0b1017; border-color: transparent; }
html[data-theme="dark"] .speed-auth .auth-box { background: transparent; }
html[data-theme="dark"] .speed-auth .form-error { border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .13); color: #fda4af; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .speed-auth.auth-page { grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); }
  .speed-auth .auth-story h1 { font-size: clamp(28px, 3.4vw, 36px); }
}
@media (max-width: 860px) {
  .speed-auth.auth-page { display: block; background: var(--auth-surface-2); }
  .speed-auth .auth-story { display: none; }
  .speed-auth .auth-panel { min-height: 100svh; padding: 24px 16px; background: var(--auth-surface-2); }
  .speed-auth .auth-box { padding: 24px; border: 1px solid var(--auth-line); border-radius: 16px; background: var(--auth-surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px rgba(15, 23, 42, .06); }
  .speed-auth .auth-mobile-top > .speed-brand { color: var(--auth-ink); font-family: var(--sl-type-display, Onest, sans-serif); font-size: 13px; font-weight: 600; }
  .speed-auth .auth-mobile-top .speed-mark { background: var(--auth-ink); }
  html[data-theme="dark"] .speed-auth .auth-box { background: var(--auth-surface); }
}
@media (max-width: 480px) {
  .speed-auth .auth-panel { padding: 12px; }
  .speed-auth .auth-box { padding: 20px 16px; border-radius: 14px; }
  .speed-auth .auth-box h2 { font-size: 24px; }
  .speed-auth .field input,
  .speed-auth .field select { height: 44px; font-size: 16px; }
}

/* Searchable select component (shared with the dashboard; v20260827-ship3) */
.ads-search-select-native{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;border:0!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;overflow:hidden!important;white-space:nowrap!important;opacity:0!important;pointer-events:none!important}
.ads-search-select{position:relative;display:grid;gap:0;min-width:0;width:100%}
.ads-search-select.is-open{z-index:10010}
.ads-search-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:50px;height:auto;padding:8px 13px;border:1px solid #d7deea;border-radius:13px;background:#fbfcff;color:#1f2b40;font:inherit;font-size:13px;font-weight:760;text-align:left;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease,transform .18s ease}
.ads-search-select-trigger:hover:not(:disabled){border-color:#b8c4ea;background:#fff}.ads-search-select-trigger:focus-visible,.ads-search-select.is-open .ads-search-select-trigger{border-color:#667ff0;outline:0;box-shadow:0 0 0 4px rgba(67,97,238,.11)}
.ads-search-select-trigger:disabled{cursor:not-allowed;opacity:.58}.ads-search-select-summary{display:grid;gap:2px;min-width:0;overflow:visible;line-height:1.25;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ads-search-select-summary b{font-size:12.5px;font-weight:800;line-height:1.3}.ads-search-select-summary small{color:#778398;font-size:10px;font-weight:650;line-height:1.3}
.ads-search-select-trigger[aria-invalid="true"]{border-color:#d85766;box-shadow:0 0 0 4px rgba(216,87,102,.1)}
.ads-search-select-chevron{flex:0 0 auto;width:8px;height:8px;border-right:1.7px solid currentColor;border-bottom:1.7px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .18s ease}.ads-search-select.is-open .ads-search-select-chevron{transform:rotate(225deg) translate(-2px,-1px)}
.ads-search-select-panel{position:fixed;z-index:10020;display:grid;grid-template-rows:auto minmax(0,1fr);gap:7px;width:min(420px,calc(100vw - 24px));max-height:min(360px,calc(100dvh - 24px));margin:0;padding:8px;border:1px solid rgba(202,212,230,.96);border-radius:15px;background:rgba(255,255,255,.985);box-shadow:0 24px 64px rgba(22,35,66,.2),0 4px 14px rgba(22,35,66,.08);backdrop-filter:blur(18px);overflow:hidden;animation:ads-search-select-in .16s ease both}
.ads-search-select-panel[hidden]{display:none!important}
.ads-search-select-search{width:100%;min-height:43px;margin:0;padding:0 13px;border:1px solid #dce3ed;border-radius:11px;background:#f7f9fc;color:#1e293b;font:inherit;font-size:13px;outline:0}.ads-search-select-search:focus{border-color:#7c91ee;box-shadow:0 0 0 3px rgba(67,97,238,.09)}
.ads-search-select-options{display:grid;align-content:start;gap:3px;min-height:0;max-height:280px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.ads-search-select-option{display:grid;gap:2px;width:100%;min-height:42px;padding:9px 11px;border:0;border-radius:10px;background:transparent;color:#2b374a;font:inherit;text-align:left;cursor:pointer}.ads-search-select-option:hover,.ads-search-select-option:focus-visible{background:#f0f4ff;outline:0}.ads-search-select-option[aria-selected="true"]{background:#eaf0ff;color:#2f4bc8}.ads-search-select-option[aria-selected="true"] b::after{margin-left:8px;content:"✓";font-weight:900}.ads-search-select-option:disabled{cursor:not-allowed;opacity:.5}.ads-search-select-option b{overflow:visible;font-size:12px;line-height:1.35;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ads-search-select-option small{overflow:visible;color:#7c889b;font-size:10px;line-height:1.35;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ads-search-select-empty{margin:0;padding:14px;color:#8b96a8;font-size:11px;text-align:center}
.ads-step.ads-search-select-open{z-index:10000;overflow:visible}
@keyframes ads-search-select-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@keyframes ads-search-select-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
