/* Circular login theme (owner 2026-10-19: same look as the Circular platform login). Shared by the admin console,
   the driver / supervisor PWA and the platform console. Light only on purpose (it is a branded sign-in card).
   Font: Google Sans (self-hosted in assets/vendor/fonts, @font-face in each console/app stylesheet; Thai glyphs included,
   Noto Sans Thai fallback). 2026-10-20: colours / controls aligned to the macOS System Settings theme (system blue).
   Inputs are 16px+ so iOS never zooms; the PWA keeps its own no-zoom viewport rules. No coloured edge stripes. */
.auth-page {
  --auth-navy: #072f50;
  --auth-navy-2: #0b416b;
  --auth-blue: #1366e8;
  --auth-blue-2: #0b55c9;
  --auth-bg: #eef4fb;
  --auth-text: #10233d;
  --auth-muted: #526780;
  --auth-line: #cfdbeb;
  --auth-danger: #b42318;
  --auth-danger-bg: #fff1ef;
  --auth-warn: #8a4b00;
  --auth-warn-bg: #fff6e5;
  --auth-shadow: 0 30px 80px rgba(19, 45, 78, .2);
  font-family: "Google Sans", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", "Leelawadee UI", Tahoma, sans-serif;
  color: var(--auth-text);
  background: radial-gradient(circle at 12% 18%, rgba(18, 103, 237, .1), transparent 32%), radial-gradient(circle at 92% 85%, rgba(11, 65, 107, .1), transparent 34%), var(--auth-bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page button, .auth-page input, .auth-page select { font: inherit; }
.auth-shell {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr);
  width: min(1400px, calc(100% - 40px));
  min-height: min(850px, calc(100vh - 48px));
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid rgba(178, 197, 220, .76);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--auth-shadow);
}
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, #0b2f55 0%, #0b416b 52%, #0f5c9e 100%);
}
.auth-brand::before, .auth-brand::after { position: absolute; content: ""; border-radius: 50%; pointer-events: none; }
.auth-brand::before { right: -150px; top: -160px; width: 420px; height: 420px; border: 1px solid rgba(255, 255, 255, .13); box-shadow: 0 0 0 70px rgba(255, 255, 255, .025); }
.auth-brand::after { left: -140px; bottom: -180px; width: 390px; height: 390px; background: rgba(255, 255, 255, .045); }
.auth-brand-top, .auth-brand-copy, .auth-brand-status { position: relative; z-index: 1; }
.auth-brand-top { display: flex; align-items: center; gap: 16px; }
.auth-logo { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(255, 255, 255, .26); border-radius: 18px; color: #fff; background: rgba(255, 255, 255, .11); font-size: 22px; font-weight: 800; flex: none; }
.auth-kicker, .auth-eyebrow { margin: 0; color: #0d63dd; font-size: 11.5px; font-weight: 800; letter-spacing: .16em; }
.auth-brand .auth-kicker { color: #b9d9ff; }
.auth-brand h1 { margin: 2px 0 0; font-size: 26px; line-height: 1.15; color: #fff; }
.auth-brand-copy { max-width: 520px; margin: 60px 0; }
.auth-brand-copy .auth-eyebrow { color: #8fc6ff; }
.auth-brand-copy h2 { margin: 12px 0 16px; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.25; letter-spacing: -.02em; color: #fff; }
.auth-brand-copy .auth-sub { max-width: 460px; margin: 0; color: #d7e8f7; font-size: 15.5px; line-height: 1.8; }
.auth-brand-status { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; padding: 11px 16px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; color: #dcecff; background: rgba(0, 0, 0, .12); font-size: 12.5px; }
.auth-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #36d98c; box-shadow: 0 0 0 5px rgba(54, 217, 140, .13); flex: none; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: linear-gradient(180deg, #fff 0%, #fbfdff 100%); min-width: 0; }
.auth-panel-inner { width: min(100%, 480px); }
.auth-panel-heading { position: relative; margin-bottom: 26px; }
.auth-panel-heading h2 { margin: 7px 0 7px; font-size: 34px; line-height: 1.2; letter-spacing: -.02em; color: var(--auth-text); }
.auth-panel-heading .auth-lead { margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.65; }
.auth-environment { position: absolute; top: -8px; right: 0; padding: 7px 12px; border-radius: 10px; color: #075ccf; background: #eaf3ff; font-size: 11.5px; font-weight: 700; }
.auth-alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #f3aaa3; border-radius: 13px; color: var(--auth-danger); background: var(--auth-danger-bg); font-size: 13.5px; line-height: 1.55; }
.auth-alert.warn { border-color: #f1cf8f; color: var(--auth-warn); background: var(--auth-warn-bg); }
.auth-alert[hidden] { display: none; }
.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 8px; color: #253b55; font-size: 13px; font-weight: 700; }
.auth-input-wrap { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; min-height: 62px; border: 1px solid var(--auth-line); border-radius: 14px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.auth-input-wrap:focus-within { border-color: #317cf0; box-shadow: 0 0 0 4px rgba(18, 103, 237, .1); }
.auth-input-wrap > svg { width: 19px; height: 19px; margin-left: 16px; fill: #637891; }
.auth-input-wrap input { width: 100%; height: 60px; padding: 0 16px 0 12px; border: 0; outline: 0; color: var(--auth-text); background: transparent; font-size: 16px; font-weight: 500; min-width: 0; }
.auth-input-wrap input::placeholder { color: #8a9bb0; }
.auth-password-toggle { display: grid; place-items: center; width: 40px; height: 40px; margin-right: 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.auth-password-toggle:hover, .auth-password-toggle:focus-visible { background: #edf4fd; outline: 0; }
.auth-password-toggle svg { width: 19px; height: 19px; fill: #637891; }
.auth-check { display: flex; align-items: center; gap: 9px; width: fit-content; color: #526780; font-size: 13px; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--auth-blue); }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 62px; padding: 0 20px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #1366e8, #0b55c9); box-shadow: 0 12px 24px rgba(18, 103, 237, .26); font-size: 16px; font-weight: 800; cursor: pointer; transition: transform .18s, box-shadow .18s, opacity .18s; }
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 15px 28px rgba(18, 103, 237, .3); }
.auth-submit:focus-visible { outline: 3px solid rgba(18, 103, 237, .24); outline-offset: 3px; }
.auth-submit:disabled { opacity: .65; cursor: default; transform: none; }
.auth-submit svg { width: 19px; height: 19px; fill: currentColor; }
.auth-submit.secondary { color: #0b55c9; background: #eaf3ff; box-shadow: none; }
.auth-help { margin-top: 22px; padding: 13px 15px; border: 1px solid #d9e4f0; border-radius: 13px; color: #61758c; background: #f7faff; font-size: 12.5px; line-height: 1.55; }
.auth-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e1e9f2; color: #718298; font-size: 11px; }
.auth-link { border: 0; background: none; color: #0b55c9; font-weight: 700; cursor: pointer; padding: 6px 0; font-size: 14px; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; width: min(620px, calc(100% - 28px)); min-height: auto; margin: 14px auto; border-radius: 22px; }
  .auth-brand { padding: 28px; }
  .auth-brand-copy { margin: 30px 0 22px; }
  .auth-brand-copy h2 { font-size: 29px; }
  .auth-brand-copy .auth-sub { display: none; }
  .auth-panel { padding: 30px 24px 28px; }
}
@media (max-width: 520px) {
  /* compact header: logo + Circular + short tagline; form full width with a 16px gutter */
  .auth-shell { width: 100%; min-height: 100vh; min-height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
  .auth-brand { padding: 18px 16px 20px; flex: none; }
  .auth-logo { width: 46px; height: 46px; border-radius: 14px; font-size: 18px; }
  .auth-brand h1 { font-size: 22px; }
  .auth-brand-copy { margin: 14px 0 0; }
  .auth-brand-copy .auth-eyebrow { display: none; }
  .auth-brand-copy h2 { margin: 0; font-size: 18px; line-height: 1.45; letter-spacing: 0; }
  .auth-brand-copy h2 br { display: none; }
  .auth-brand-status { display: none; }
  .auth-panel { align-items: start; padding: 24px 16px 24px; flex: 1; }
  .auth-panel-heading h2 { font-size: 28px; }
  .auth-environment { position: static; display: inline-flex; margin-bottom: 14px; }
  .auth-footer { flex-direction: column; gap: 4px; }
}

/* ===== macOS System Settings alignment (owner 2026-10-20): same split layout, system blue + macOS controls ===== */
.auth-page { --auth-blue: #007aff; --auth-blue-2: #0068d9; --auth-bg: #f2f2f7; --auth-text: #1d1d1f; --auth-muted: #6e6e73; --auth-line: #d1d1d6; --auth-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 24px 70px rgba(0, 0, 0, .14); background: radial-gradient(circle at 12% 18%, rgba(0, 122, 255, .08), transparent 34%), radial-gradient(circle at 92% 85%, rgba(88, 86, 214, .07), transparent 36%), var(--auth-bg); }
.auth-shell { border: 0; border-radius: 22px; animation: authIn .32s cubic-bezier(.2, .8, .2, 1) backwards; }
.auth-brand { background: linear-gradient(155deg, #0b2a55 0%, #0a4d9c 55%, #0a74e8 100%); }
.auth-logo { border-radius: 14px; }
.auth-kicker, .auth-eyebrow { color: var(--auth-blue); letter-spacing: .08em; }
.auth-panel { background: #fff; }
.auth-panel-heading h2 { font-weight: 700; letter-spacing: -.02em; }
.auth-environment { color: var(--auth-blue); background: #e6f1ff; border-radius: 8px; }
.auth-field { color: #3a3a3c; font-weight: 600; }
.auth-input-wrap { min-height: 52px; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--auth-line), inset 0 1px 2px rgba(0, 0, 0, .04); transition: box-shadow .18s; }
.auth-input-wrap:focus-within { box-shadow: 0 0 0 1px var(--auth-blue), 0 0 0 4px rgba(0, 122, 255, .25); }
.auth-input-wrap > svg { fill: #8e8e93; }
.auth-input-wrap input:focus, .auth-input-wrap input:focus-visible, .auth-password-toggle:focus-visible { box-shadow: none; outline: none; }
.auth-input-wrap input { height: 50px; }
.auth-password-toggle { border-radius: 8px; }
.auth-password-toggle:hover, .auth-password-toggle:focus-visible { background: rgba(118, 118, 128, .12); }
.auth-check { color: #6e6e73; }
.auth-check input { accent-color: var(--auth-blue); }
.auth-submit { min-height: 50px; border-radius: 10px; background: linear-gradient(180deg, #1a8cff, #007aff); box-shadow: 0 0 0 .5px rgba(0, 80, 180, .6), 0 6px 16px rgba(0, 122, 255, .24); font-weight: 700; transition: transform .12s cubic-bezier(.2, .8, .2, 1), box-shadow .18s, filter .12s; }
.auth-submit:hover { transform: none; filter: brightness(1.05); box-shadow: 0 0 0 .5px rgba(0, 80, 180, .6), 0 8px 20px rgba(0, 122, 255, .28); }
.auth-submit:active:not(:disabled) { transform: scale(.98); filter: brightness(.95); }
.auth-submit.secondary { color: var(--auth-blue); background: rgba(118, 118, 128, .12); box-shadow: none; }
.auth-alert { border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px #f5b5b0; animation: authShake .3s ease-out; }
.auth-alert.warn { box-shadow: inset 0 0 0 1px #f1cf8f; animation: none; }
.auth-help { border: 0; border-radius: 10px; background: #f5f5f7; color: #6e6e73; }
.auth-footer { border-top-color: #e5e5ea; color: #8e8e93; }
.auth-link { color: var(--auth-blue); }
.auth-panel-inner > * { animation: authUp .3s cubic-bezier(.2, .8, .2, 1) backwards; }
.auth-panel-inner > *:nth-child(2) { animation-delay: 40ms; } .auth-panel-inner > *:nth-child(n+3) { animation-delay: 80ms; }
@keyframes authIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes authUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes authShake { 0%, 100% { transform: none; } 30% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }
@media (max-width: 520px) { .auth-shell { border-radius: 0; animation: none; } }
@media (prefers-color-scheme: dark) {
  .auth-page { --auth-bg: #000; --auth-text: #f5f5f7; --auth-muted: #98989d; --auth-line: #3a3a3c; color-scheme: dark; }
  .auth-shell { background: #1c1c1e; box-shadow: 0 0 0 1px #2c2c2e, 0 24px 70px rgba(0, 0, 0, .6); }
  .auth-panel { background: #1c1c1e; }
  .auth-panel-heading h2 { color: #f5f5f7; }
  .auth-field { color: #d1d1d6; }
  .auth-input-wrap { background: #2c2c2e; box-shadow: 0 0 0 1px #3a3a3c; }
  .auth-input-wrap input { color: #f5f5f7; }
  .auth-input-wrap input::placeholder { color: #8e8e93; }
  .auth-environment { background: #0d2a4a; color: #64aaff; }
  .auth-help { background: #2c2c2e; color: #98989d; }
  .auth-footer { border-top-color: #38383a; }
  .auth-alert { background: #3d1614; color: #ff8a80; box-shadow: inset 0 0 0 1px #6b2420; }
  .auth-alert.warn { background: #3a2a0c; color: #ffcf7a; box-shadow: inset 0 0 0 1px #6b4d12; }
  .auth-check { color: #98989d; }
}
@media (prefers-reduced-motion: reduce) { .auth-shell, .auth-panel-inner > *, .auth-alert { animation: none !important; } .auth-submit { transition: none; } }