/* OrbitMail sign-in, Orbit brand kit v1 (2026-10-06).
   Values follow the shared Orbit UI mapping (AgentWorkspace/reports/Orbit/orbit-brand-v1-ui-mapping-20261006.md):
   Graphite dark by default, light when the user picked light in the app (html.orbit-light),
   Mail Teal accent, Kumbh Sans from /public/static/brand/tokens/orbit-tokens.css. */

:root {
  color-scheme: dark;
  --bg: #0B0C0E; --rail: #0E1013; --card: #121418; --raised: #171A1E; --selected: #1D2025;
  --line: #23262C; --line-strong: #2E3239;
  --text: #EDEEF0; --text-2: #B3B7BF; --text-3: #80858E; --faint: #6B7079;
  --accent: #0CCBC5; --accent-hover: #1CADA7; --accent-on: #0C0C0C; --link: #0CCBC5; --tint: #1F4846;
  --danger: #EF6B73; --danger-bg: #2A1517; --danger-line: #4A2226; --warn: #E2A93F;
  --speed: linear-gradient(90deg, #FD9F4C 0%, #FC6AD5 50%, #8363FD 100%);
  --font: "Kumbh Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
html.orbit-light {
  color-scheme: light;
  --bg: #F6F6F6; --card: #FFFFFF; --raised: #F0F0F0; --selected: #F1FBFA;
  --line: #E6E6E6; --line-strong: #D4D4D4;
  --text: #0C0C0C; --text-2: #4A4A4A; --text-3: #6B6B6B; --faint: #8A8A8A;
  --link: #226764; --tint: #CCF3F0;
  --danger: #C7343F; --danger-bg: #FFF3F1; --danger-line: #FFCDCA; --warn: #9A6A12;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; overflow-x: clip; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font-family: var(--font); }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.orbit-icon { width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Layout: brand panel (always ink, like the brand mockup) + form side */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(420px, 620px) minmax(0, 1fr); }

.auth-hero { position: relative; overflow: hidden; background: #0C0C0C; color: #FAFAFA; padding: 56px 64px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; border-right: 1px solid #23262C; }
.auth-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--speed); }
.auth-crumb { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(250, 250, 250, .55); }
.hero-copy { max-width: 470px; }
.hero-logo { display: block; width: 240px; height: auto; margin: 0 0 36px -12px; }
.hero-rule { display: block; width: 72px; height: 3px; border-radius: 2px; background: var(--speed); margin: 0 0 22px; }
.hero-copy h2 { font-size: clamp(30px, 2.8vw, 40px); line-height: 1.12; font-weight: 700; letter-spacing: -.015em; margin: 0 0 18px; color: #FAFAFA; }
.hero-copy h2 em { font-style: normal; color: #0CCBC5; }
.hero-copy p { font-size: 17px; line-height: 1.55; color: rgba(250, 250, 250, .68); margin: 0; max-width: 430px; }

.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; padding: 40px 40px 28px; min-width: 0; }
.auth-logo-compact { display: none; }
.auth-logo-compact img { display: block; width: 186px; height: auto; }
.auth-logo-compact .logo-on-light, html.orbit-light .auth-logo-compact .logo-on-dark { display: none; }
html.orbit-light .auth-logo-compact .logo-on-light { display: block; }

/* Panel, heading, fields, buttons, callout */
.orbit-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.auth-panel { width: min(100%, 420px); margin-top: auto; }
.orbit-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; color: var(--text); margin: 0; }
.orbit-page-subtitle { color: var(--text-2); font-size: 16px; line-height: 1.5; margin: 8px 0 28px; }

.orbit-field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; min-width: 0; }
.orbit-field label { font-size: 14px; font-weight: 600; color: var(--text); }
.orbit-field input { width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); padding: 12px 14px; color: var(--text); font-size: 16px; }
.orbit-field input:hover { border-color: var(--text-3); }
.orbit-field input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px var(--tint); }
.orbit-field input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--card) inset; caret-color: var(--text); }
.orbit-field > small { font-size: 13px; line-height: 1.5; }

.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.text-link { font-size: 14px; font-weight: 600; color: var(--link); }

.auth-password { position: relative; }
.auth-password input { padding-right: 48px; }
.orbit-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text-3); }
.orbit-icon-button:hover { background: var(--raised); color: var(--text); }
.auth-reveal { position: absolute; top: 4px; right: 4px; }
.auth-reveal[hidden] { display: none; }
.auth-reveal .icon-hide, .auth-reveal[aria-pressed="true"] .icon-show { display: none; }
.auth-reveal[aria-pressed="true"] .icon-hide { display: block; }
.auth-hint { color: var(--warn); font-weight: 600; }
.auth-hint:empty { display: none; }
.auth-form .orbit-field:last-of-type { margin-bottom: 8px; }

.orbit-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; font-size: 16px; font-weight: 700; line-height: 1.25; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.orbit-button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.orbit-button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-on); }
.orbit-button.subtle { background: var(--card); border-color: var(--line-strong); color: var(--text); font-weight: 600; }
.orbit-button.subtle:hover { background: var(--raised); }
.orbit-button.full { width: 100%; margin-top: 16px; }
.auth-panel form + form .orbit-button { margin-top: 12px; }
.auth-submit[disabled] { cursor: progress; opacity: .85; }
.auth-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(12, 12, 12, .3); border-top-color: #0C0C0C; animation: auth-spin .8s linear infinite; }
.auth-submit[aria-busy="true"] .auth-spinner { display: block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.orbit-callout { display: flex; align-items: flex-start; gap: 12px; border-radius: 10px; }
.auth-alert { margin: 0 0 20px; padding: 12px 14px; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger); }
.auth-alert .orbit-icon { width: 18px; height: 18px; flex-basis: 18px; margin-top: 2px; }
.auth-alert p { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; }

.orbit-content-footer { display: flex; justify-content: space-between; gap: 16px; color: var(--text-3); font-size: 13px; }
.auth-footer { width: min(100%, 420px); margin-top: auto; }
.auth-footer span:last-child { display: flex; gap: 16px; }
.auth-footer a { color: inherit; }
.auth-footer a:hover { color: var(--text); }

/* Tablet and phone: the form alone, with the horizontal lockup above it. */
@media (max-width: 1023.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-main { position: relative; }
  .auth-main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--speed); }
  .auth-logo-compact { display: block; margin-top: auto; }
  .auth-panel { margin-top: 0; }
}
@media (max-width: 560px) {
  .auth-main { padding: 32px 16px 24px; gap: 20px; }
  .orbit-panel { padding: 24px 20px; }
  h1 { font-size: 24px; }
  .auth-logo-compact img { width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-spinner { animation-duration: 2.4s; }
  .orbit-button { transition: none; }
}
