/* The sign-in page (/next/login), as approved in the login-page design thread (12 Nov 2026).
   Its own stylesheet: the page shares theme.js and the fonts with the dashboard, not style.css.
   Dark by default; light for an explicit choice (data-theme, theme.js) or, on Auto, the system. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2?v=8909904ab6c8") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-latin-500-normal.woff2?v=f3779f1efccc") format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/poppins-latin-500-normal.woff2?v=cd36de204aca") format("woff2"); }
:root {
  color-scheme: dark;
  --page: #12131B; --deep: #0D0E14; --card: #1A1B26; --field: #14151F;
  --text: #E8E9F0; --muted: #9A9CB0; --label: #CFD0DF;
  --brand: #9DA1FF; --button-text: #12131B; --card-border: #2C2D3D;
  --field-border: #484A62; --focus: #B8BBFF; --toggle: #242635;
  --shadow: 0 24px 70px -36px rgba(0,0,0,.65); --neg: #FF7B72;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
  color-scheme: light;
  --page: #F5F5F5; --deep: #ECECF3; --card: #FFFFFF; --field: #FAFAFC;
  --text: #2C2F38; --muted: #65677B; --label: #4C4F61;
  --brand: #2E3192; --button-text: #FFFFFF; --card-border: #DFDFE9;
  --field-border: #9B9DAF; --focus: #4A4EC8; --toggle: #E5E5F1;
  --shadow: 0 24px 70px -40px rgba(46,49,146,.24); --neg: #B42318;
}
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #F5F5F5; --deep: #ECECF3; --card: #FFFFFF; --field: #FAFAFC;
  --text: #2C2F38; --muted: #65677B; --label: #4C4F61;
  --brand: #2E3192; --button-text: #FFFFFF; --card-border: #DFDFE9;
  --field-border: #9B9DAF; --focus: #4A4EC8; --toggle: #E5E5F1;
  --shadow: 0 24px 70px -40px rgba(46,49,146,.24); --neg: #B42318;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; min-height: 100%; background: var(--page); }
body {
  margin: 0; min-width: 0; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  color: var(--text); background: var(--page);
  font: 400 14px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.stage {
  flex: 1 0 auto; width: min(1224px, calc(100% - 96px)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 400px);
  align-items: center; justify-content: center; gap: 64px;
  padding: 36px 0 12px;
}
.hero { margin: 0; width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.art { position: relative; isolation: isolate; width: 100%; height: 620px; flex: 0 0 auto; }
.art::before {
  content: ''; position: absolute; z-index: -1; inset: 4%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(74,78,200,.045), transparent 69%);
}
:root[data-theme="light"] .art::before { background: radial-gradient(ellipse at center, rgba(74,78,200,.035), transparent 69%); }
canvas { display: block; width: 100%; height: 100%; }
.wordmark { display: block; width: 240px; max-width: 74%; height: auto; }
.panel {
  width: 100%; min-width: 0; padding: 32px 34px 28px;
  border: 1px solid var(--card-border); border-radius: 26px;
  background: var(--card); box-shadow: var(--shadow);
}
form { display: flex; flex-direction: column; }
h1 { margin: 0; font: 500 30px/1.3 'Poppins', sans-serif; letter-spacing: -.8px; outline: none; }
.error-slot { height: 20px; margin: 6px 0 17px; }
.error-slot p { margin: 0; color: var(--neg); font-size: 12px; line-height: 20px; display: flex; align-items: center; gap: 6px; }
.error-slot p[hidden] { display: none; }
.error-slot p::before { content: ''; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("assets/icons/alert.svg") center/contain no-repeat; mask: url("assets/icons/alert.svg") center/contain no-repeat; }
.wordmark { animation: wm-in .7s ease-out 1.05s both; }
@keyframes wm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wordmark { animation: none; } }
.field { margin: 0 0 18px; }
.field.password-field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 7px; color: var(--label); font-weight: 500; font-size: 13px; line-height: 20px; }
.field input {
  display: block; width: 100%; min-width: 0; height: 44px; padding: 0 13px;
  border: 1px solid var(--field-border); border-radius: 9px;
  outline: none; background: var(--field); color: var(--text);
  font-size: 14px; line-height: normal; caret-color: var(--brand);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 100px var(--field) inset; }
.primary {
  display: block; width: 100%; height: 48px; margin: 0; padding: 0 12px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--brand); color: var(--button-text);
  font-size: 14px; line-height: 20px; font-weight: 500;
  transition: filter .18s, transform .18s;
}
.primary:hover:not(:disabled) { filter: brightness(1.06); }
.primary:active:not(:disabled) { transform: translateY(1px); }
.primary:disabled { opacity: 1; }
.lost-device { max-width: 220px; margin: 18px auto 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 18px; }
button:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.footer {
  flex: 0 0 auto; min-width: 0; width: 100%; min-height: 84px;
  display: flex; align-items: center; justify-content: center; gap: 25px;
  padding: 18px 24px max(27px, env(safe-area-inset-bottom));
  color: var(--muted); font-size: 11px; line-height: 18px;
}
.footer p { margin: 0; text-align: center; }
.footer-controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.theme-switch { display: flex; align-items: center; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid var(--card-border); border-radius: 999px; background: var(--page); }
.theme-switch button {
  position: relative; height: 27px; min-width: 46px; padding: 0 9px;
  border: 0; border-radius: 999px; color: var(--muted); background: transparent;
  font-size: 11px; line-height: 17px; font-weight: 400;
}
.theme-switch button::after { content: ''; position: absolute; inset: -9px 0; }
.theme-switch button[aria-pressed="true"] { background: var(--toggle); color: var(--text); }
  position: absolute; top: max(32px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: min(384px, calc(100% - 32px)); padding: 24px;
  border: 1px solid #A8A8A8; border-radius: 8px; background: #E0E0E0; color: #202020;
  box-shadow: 0 12px 36px rgba(0,0,0,.28); color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@media (min-width: 761px) and (max-width: 1120px) {
  .stage { width: calc(100% - 48px); grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 28px; }
  .art { height: 550px; }
  .panel { padding: 30px 26px 26px; }
}
@media (max-width: 760px) {
  .stage { width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: max(12px, env(safe-area-inset-top)) 0 12px; }
  .hero { gap: 8px; }
  .art { width: calc(100% + 32px); height: 338px; }
  .wordmark { width: 180px; }
  .panel { border-radius: 22px; padding: 26px 24px 24px; box-shadow: 0 18px 45px -35px rgba(0,0,0,.45); }
  h1 { font-size: 28px; }
  .error-slot { margin-bottom: 15px; }
  .field { margin-bottom: 16px; }
  .field.password-field { margin-bottom: 20px; }
  .field input { font-size: 16px; }
  .lost-device { margin-top: 16px; }
  .footer { flex-direction: column; gap: 7px; min-height: 100px; padding: 9px 16px max(20px, env(safe-area-inset-bottom)); }
  .footer-controls { gap: 22px; }
  .theme-switch { padding: 2px; }
  .theme-switch button { height: 30px; min-width: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
