/* Standalone login surface: shared application tables and buttons do not apply. */
:root {
  color-scheme: dark;
  --auth-bg: #0b141e;
  --auth-panel: #131f2d;
  --auth-field: #0c1723;
  --auth-border: #2a4052;
  --auth-text: #edf2f7;
  --auth-muted: #a0adbb;
  --auth-accent: #40d2ba;
  --auth-button: #38ccb2;
  --auth-button-hover: #65ddc7;
  --auth-button-text: #102b24;
  --auth-shadow: 0 20px 70px rgba(0, 0, 0, .12);
}
:root[data-theme="light"] {
  color-scheme: light;
  --auth-bg: #f5f7fa;
  --auth-panel: #fff;
  --auth-field: #fff;
  --auth-border: #d6dee5;
  --auth-text: #1e2c37;
  --auth-muted: #5d6d7b;
  --auth-accent: #267364;
  --auth-button: #127b69;
  --auth-button-hover: #0d6657;
  --auth-button-text: #fff;
  --auth-shadow: 0 18px 64px rgba(34, 53, 70, .07);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(ellipse at 22% 44%, rgba(31, 118, 104, .08), transparent 62%), var(--auth-bg);
  color: var(--auth-text);
  font: 14px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  -webkit-text-size-adjust: 100%;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.auth-header, .auth-shell, .auth-footer {
  width: calc(100% - 80px);
  max-width: 1172px;
  margin-left: auto;
  margin-right: auto;
}
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: calc(32px + env(safe-area-inset-top));
  padding-bottom: 24px;
}
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand img { display: block; flex: none; object-fit: contain; }
.auth-brand-name { font-size: 20px; font-weight: 600; letter-spacing: .06em; }
.auth-brand-caption { margin-top: 3px; font-size: 9px; letter-spacing: .3em; color: var(--auth-muted); }
.auth-theme {
  min-height: 40px;
  max-width: 132px;
  padding: 7px 10px;
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  background: transparent;
  color: var(--auth-muted);
  font-size: 12px;
}
.auth-theme option { background: var(--auth-panel); color: var(--auth-text); }
.auth-shell {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 414px;
  align-items: center;
  gap: clamp(60px, 10vw, 180px);
  align-self: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.auth-intro { min-width: 0; padding-bottom: 20px; }
.auth-workspace-label { display: flex; align-items: center; gap: 10px; color: var(--auth-muted); font-size: 10px; letter-spacing: .22em; }
.auth-workspace-label::before { content: ""; width: 17px; height: 2px; background: var(--auth-accent); }
.auth-intro h2 { margin: 30px 0 24px; font-size: clamp(38px, 4vw, 56px); font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.auth-intro h2 span { color: var(--auth-accent); }
.auth-intro-copy { margin: 0; font-size: 15px; color: var(--auth-muted); line-height: 1.8; }
.auth-illustration { width: 100%; max-width: 456px; margin-top: 40px; }
.auth-illustration svg { display: block; width: 100%; height: auto; }
.auth-chart-grid { stroke: var(--auth-border); stroke-width: 1; opacity: .4; }
.auth-chart-reference { stroke: var(--auth-muted); stroke-width: 1; opacity: .28; }
.auth-chart-line { stroke: var(--auth-accent); stroke-width: 1.8; opacity: .75; }
.auth-features { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; margin: 20px 0 0; padding: 0; font-size: 12px; color: var(--auth-muted); letter-spacing: .08em; }
.auth-features li + li { padding-left: 24px; border-left: 1px solid var(--auth-border); }
.auth-login-column { min-width: 0; }
.auth-card {
  width: 100%;
  padding: 36px 34px;
  background: var(--auth-panel);
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  box-shadow: var(--auth-shadow);
}
.auth-eyebrow { color: var(--auth-accent); font-size: 12px; letter-spacing: .12em; }
.auth-card h1 { margin: 12px 0 8px; font-size: 30px; line-height: 1.4; font-weight: 600; letter-spacing: -.025em; }
.auth-subtitle { margin: 0 0 30px; color: var(--auth-muted); font-size: 14px; }
.auth-form { display: grid; gap: 20px; }
.auth-field { min-width: 0; }
.auth-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 400; }
.auth-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  background: var(--auth-field);
  color: var(--auth-text);
  font-size: 16px;
  line-height: 1.5;
}
.auth-field input::placeholder { color: var(--auth-muted); opacity: 1; font-size: 14px; }
.auth-field input:focus { outline: 2px solid var(--auth-accent); outline-offset: 2px; border-color: var(--auth-accent); }
.auth-password { position: relative; }
.auth-password input { padding-right: 52px; }
.auth-password-toggle {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--auth-muted);
}
.auth-password-toggle:hover { color: var(--auth-text); background: var(--auth-bg); }
.auth-password-toggle svg { width: 20px; height: 20px; }
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 13px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--auth-button);
  color: var(--auth-button-text);
  font-size: 15px;
  font-weight: 600;
}
.auth-submit:hover { background: var(--auth-button-hover); }
.auth-submit svg { width: 18px; height: 18px; }
.auth-submit:active { transform: translateY(1px); }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
.auth-session-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--auth-border); color: var(--auth-muted); }
.auth-session-note svg { flex: none; width: 17px; height: 17px; margin-top: 3px; }
.auth-session-note p { margin: 0; font-size: 12px; line-height: 1.8; }
.auth-back { margin-top: 18px; text-align: center; }
.auth-back a { color: var(--auth-accent); text-underline-offset: 4px; }
.auth-help { margin: 20px auto 0; max-width: 440px; color: var(--auth-muted); font-size: 12px; text-align: center; }
.auth-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 0 calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--auth-border); color: var(--auth-muted); font-size: 11px; }
.auth-version { font-variant-numeric: tabular-nums; }
.auth-error, .auth-warning, .auth-notice { margin: 0 0 22px; padding: 12px 14px; border: 1px solid; border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
.auth-error { color: #ffb0bb; border-color: #69404a; background: #2c1c23; }
.auth-warning { color: #eed197; border-color: #655738; background: #29251b; }
.auth-notice { color: #b8d4ec; border-color: #3b5368; background: #182733; }
:root[data-theme="light"] .auth-error { color: #a52c44; border-color: #ecc2ca; background: #fff4f5; }
:root[data-theme="light"] .auth-warning { color: #78591c; border-color: #e8d8ac; background: #fff9eb; }
:root[data-theme="light"] .auth-notice { color: #315975; border-color: #c7dbe8; background: #f0f7fb; }
@media (max-width: 1000px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; }
  .auth-card { padding: 32px 28px; }
  .auth-intro h2 { font-size: 40px; }
  .auth-features { gap: 12px 16px; }
  .auth-features li + li { padding-left: 16px; }
}
@media (max-width: 820px) {
  .auth-header, .auth-shell, .auth-footer { width: calc(100% - 48px); }
  .auth-shell { grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 440px; padding: 36px 0 44px; }
  .auth-intro { padding-bottom: 0; }
  .auth-workspace-label { font-size: 9px; }
  .auth-intro h2 { margin: 18px 0 14px; font-size: 36px; line-height: 1.35; }
  .auth-intro-copy { font-size: 13px; }
  .auth-illustration, .auth-features { display: none; }
}
@media (max-width: 520px) {
  .auth-header { padding-top: calc(22px + env(safe-area-inset-top)); padding-bottom: 16px; }
  .auth-brand { gap: 10px; }
  .auth-brand img { width: 34px; height: 34px; }
  .auth-brand-name { font-size: 17px; }
  .auth-brand-caption { font-size: 8px; letter-spacing: .22em; }
  .auth-theme { padding-left: 7px; padding-right: 7px; }
  .auth-card { padding: 28px 24px; border-radius: 12px; }
  .auth-card h1 { font-size: 27px; }
}
@media (max-width: 360px) {
  .auth-header, .auth-shell, .auth-footer { width: calc(100% - 32px); }
  .auth-card { padding: 24px 18px; }
  .auth-header { gap: 10px; }
  .auth-intro h2 { font-size: 32px; }
}
@supports (padding: max(0px)) {
  body.auth-page { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
