/* ATOS unified sign-in look (CRM · Field · Map). Shared copy: apps/crm/public, apps/market/public, apps/field/src/app.
   Presentation only — every product keeps its own sign-in controller (email → 6-digit code → access check).
   Design: Codex/Sites hand-off 2026-10-18 (Shun approved phone + desktop look). Variables are scoped to .auth-root so the
   Field app (one page for sign-in and work screens) keeps its own colours after sign-in. */
.auth-root{--navy:#112a47;--ink:#192d43;--muted:#5b6e80;--line:#d9e2eb;--page:#f6f8fb;--surface:#fff;--soft:#eef3f8;--accent:#1b67b3;--danger:#ac3f37;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--page);color-scheme:light;font-size:16px;line-height:1.5;min-height:100vh;min-height:100svh}
html[data-theme=dark] .auth-root,.auth-root[data-theme=dark]{--ink:#ede8f5;--muted:#b5acc6;--line:#3a314c;--page:#100b1a;--surface:#1c172b;--soft:#282137;--accent:#aacbf3;--danger:#ffb1a9;color-scheme:dark}
html[data-theme=dark] body.auth-page{background:#100b1a}body.auth-page{margin:0;background:#f6f8fb}
.auth-root *{box-sizing:border-box}.auth-root button,.auth-root input,.auth-root select{font:inherit}.auth-root button,.auth-root a,.auth-root input,.auth-root select{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.auth-root button{cursor:pointer}.auth-root button:disabled{cursor:wait;opacity:.6}
.auth-root button:focus-visible,.auth-root a:focus-visible,.auth-root input:focus-visible,.auth-root select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.auth-root [hidden]{display:none!important}.auth-root .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.auth-shell{display:grid;grid-template-columns:minmax(360px,1fr) minmax(440px,1fr);min-height:100vh;min-height:100svh}
.brand-panel{background:linear-gradient(145deg,#163957 0%,#112a47 52%,#0c2038 100%);color:#fff;padding:44px clamp(32px,4.2vw,80px);display:flex;flex-direction:column;min-width:0;border-right:1px solid #ffffff0a}
.brand-signature{font-size:clamp(22px,2vw,28px);font-weight:700;letter-spacing:1.5px;line-height:1.2;white-space:nowrap}
.brand-message{margin:auto 0;padding:64px 0}
.brand-accent{width:36px;height:3px;background:#adc8e3;border-radius:2px;margin-bottom:28px}
.brand-message h2{font-size:clamp(28px,2.8vw,44px);line-height:1.4;letter-spacing:-.8px;font-weight:600;margin:0;white-space:nowrap}
.auth-root[lang=en] .brand-message h2,html[lang=en] .brand-message h2{font-size:clamp(22px,2.35vw,38px);letter-spacing:-.7px}
.auth-root[lang=ms] .brand-message h2,html[lang=ms] .brand-message h2{font-size:clamp(19px,1.85vw,30px);letter-spacing:-.5px}
.brand-description{font-size:16px;line-height:1.8;color:#bacbdb;max-width:420px;margin:20px 0 0}
.brand-bottom{display:flex;align-items:center;gap:16px;width:max-content;padding-top:18px;border-top:1px solid #c6dbed38;color:#becfe0;font-size:12px;line-height:1.2;letter-spacing:1px;font-weight:500}
.brand-bottom span{display:flex;align-items:center;gap:16px}.brand-bottom span+span:before{content:'';width:1px;height:10px;background:#c6dbed4d}
.auth-pane{display:flex;flex-direction:column;min-width:0}
.auth-topbar{display:flex;justify-content:flex-end;align-items:center;padding:28px 36px 0;gap:16px}
.mobile-brand{display:none;color:var(--ink);font-size:18px;font-weight:700;letter-spacing:.5px;white-space:nowrap;line-height:1.2}
.appearance-controls{display:flex;align-items:center;gap:8px}
.theme-control{display:grid;place-items:center;min-height:48px;min-width:48px;width:48px;padding:0;border:1px solid var(--line);border-radius:9px;background:transparent;color:var(--ink);font-size:23px;line-height:1}
/* Language: a styled native select (keyboard, screen readers and the phone's own picker work as usual; colour-scheme keeps
   the open list readable in dark mode). */
.auth-language{position:relative;display:flex;align-items:center}
.auth-language select{appearance:none;-webkit-appearance:none;min-height:48px;width:112px;min-width:0;max-width:none;text-overflow:ellipsis;padding:10px 34px 10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font-size:14px;cursor:pointer}
.auth-language select option{background:var(--surface);color:var(--ink)}
.auth-language:after{content:'';position:absolute;right:13px;top:50%;width:7px;height:7px;margin-top:-6px;border-right:1.5px solid var(--ink);border-bottom:1.5px solid var(--ink);transform:rotate(45deg);pointer-events:none}
.auth-center{flex:1;display:grid;place-items:center;padding:48px 32px 72px}
.auth-card{width:100%;max-width:440px;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:36px 38px;box-shadow:0 14px 46px #112a4706}
.step-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:23px}
.product-label{font-size:13px;font-weight:650;letter-spacing:.6px;color:var(--accent)}
.auth-card h1{font-size:32px;line-height:1.3;font-weight:650;letter-spacing:-.8px;margin:0 0 13px;color:var(--ink)}
.auth-card .intro{font-size:15px;line-height:1.7;color:var(--muted);margin:0 0 30px;text-align:left}
.auth-card form{display:flex;flex-direction:column;gap:0}
.auth-card .field{display:flex;flex-direction:column;gap:9px;font-size:14px;font-weight:600;color:var(--ink)}
.auth-card .field input{min-width:0;width:100%;min-height:54px;border:1px solid var(--line);border-radius:9px;padding:13px 14px;background:var(--surface);color:var(--ink);font-size:16px;line-height:1.5}
.auth-card .field input::placeholder{color:var(--muted);opacity:.75}
.auth-card .field-note{font-size:13px;line-height:1.65;color:var(--muted);margin:10px 0 22px}
.primary-action{display:flex;align-items:center;justify-content:center;min-height:54px;width:100%;padding:12px 18px;border:1px solid var(--navy);border-radius:9px;background:var(--navy);color:#fff;font-size:16px;font-weight:600;text-decoration:none}
.primary-action:hover:not(:disabled){background:#1b3d61}
html[data-theme=dark] .auth-root .primary-action,.auth-root[data-theme=dark] .primary-action{background:#3b5e87;border-color:#3b5e87}
html[data-theme=dark] .auth-root .primary-action:hover:not(:disabled),.auth-root[data-theme=dark] .primary-action:hover:not(:disabled){background:#456d99}
.recipient{display:flex;flex-wrap:wrap;gap:3px 8px;align-items:center;padding:0 0 22px;margin:-6px 0 0;color:var(--muted);font-size:14px}
.recipient>span{width:100%}.recipient>strong{color:var(--ink);font-size:15px;font-weight:500;overflow-wrap:anywhere;max-width:100%}
.text-action{border:0;background:transparent;color:var(--accent);min-height:44px;padding:10px 4px;font-size:14px;font-weight:600;text-align:left;width:auto}
.edit-email{margin:-4px 0 -4px auto}
.auth-card .field+.primary-action{margin-top:22px}
.auth-card .field .otp-input{font-size:28px;letter-spacing:9px;text-align:center;font-variant-numeric:tabular-nums;min-height:62px;padding-left:22px}
.resend-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 7px;margin-top:12px;font-size:13px;color:var(--muted)}
.auth-status{margin:0;font-size:14px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}.auth-status:not(:empty){margin-top:14px}
.auth-error{margin:0 0 18px;padding:11px 13px;border:1px solid var(--danger);border-radius:9px;font-size:14px;line-height:1.6;color:var(--danger);overflow-wrap:anywhere}
@media(min-width:901px){.auth-pane{background:linear-gradient(135deg,#fff5,transparent 65%)}.auth-card{border-radius:22px;box-shadow:0 24px 70px -34px #16334f2b,0 2px 6px #16334f03}.auth-topbar{padding-top:30px}
  html[data-theme=dark] .auth-root .auth-pane,.auth-root[data-theme=dark] .auth-pane{background:linear-gradient(135deg,#211a2e66,transparent 65%)}
  html[data-theme=dark] .auth-root .auth-card,.auth-root[data-theme=dark] .auth-card{box-shadow:0 24px 70px -34px #0005}}
@media(min-width:1500px){.auth-card{max-width:460px;padding:42px}.auth-center{padding:52px}}
@media(max-width:900px){.auth-shell{display:block}.brand-panel{display:none}.auth-pane{min-height:100vh;min-height:100svh}.auth-topbar{justify-content:space-between;padding:22px 32px 0}.mobile-brand{display:block;font-size:21px;letter-spacing:.8px}.auth-center{padding:40px 24px}.auth-card{max-width:460px}}
@media(max-width:700px){.auth-topbar{padding:calc(22px + env(safe-area-inset-top)) 24px 0;gap:10px}.appearance-controls{gap:7px}.theme-control{min-height:44px;min-width:44px;width:44px}
  .auth-language select{min-height:44px;width:100px;padding:9px 30px 9px 10px;font-size:13px}.auth-language:after{right:11px}.mobile-brand{font-size:17px;letter-spacing:.4px}
  .auth-center{display:flex;align-items:flex-start;justify-content:center;padding:48px 24px calc(32px + env(safe-area-inset-bottom))}
  .auth-card{border:0;box-shadow:none;background:transparent;padding:0;max-width:420px}.step-heading{margin-bottom:19px}
  .auth-card h1{font-size:30px;margin-bottom:12px}.auth-card .intro{font-size:16px;margin-bottom:28px}.auth-card .field{font-size:15px;gap:10px}.auth-card .field input{min-height:56px}
  .auth-card .field-note{font-size:14px;margin:11px 0 24px}.recipient>strong{font-size:16px}
  .auth-card .field .otp-input{min-height:64px;letter-spacing:10px}.resend-row,.resend-row .text-action{font-size:14px}}
@media(max-width:360px){.auth-topbar{padding-left:20px;padding-right:20px}.auth-center{padding-left:20px;padding-right:20px}.mobile-brand{font-size:14px;letter-spacing:.3px}.appearance-controls{gap:5px}.auth-language select{width:92px}}
@media(max-height:650px){.auth-center{padding-top:24px;padding-bottom:24px}.auth-topbar{padding-top:16px}.brand-message{padding:45px 0}}
@media(prefers-reduced-motion:no-preference){.primary-action,.theme-control{transition:background-color .16s ease,border-color .16s ease}}
