/* Doorman sign up, log in and password screens, in the Security Print world. They live inside the dashboard shell
   (app.html, styled by dash.css), so every rule is scoped to a page showing main.auth. The card is the
   engraved telegram paper from /agents, lit on the print ground in both themes. */
@font-face { font-family: "Wittgenstein"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/wittgenstein-latin.woff2) format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/schibsted-grotesk-latin.woff2) format("woff2"); }

body:has(main.auth) {
  --pr-tint: #E1EBE5; --pr-page: #DCE6E0; --pr-ink: #10342A; --pr-ink-2: #3D5C52; --pr-paper: #E7E4CE; --pr-over: #A8161F;
  --pr-display: "Wittgenstein", Georgia, serif; --pr-text: "Schibsted Grotesk", system-ui, sans-serif;
  background: var(--pr-tint) image-set(url(/assets/plates/ground.webp) type("image/webp"), url(/assets/plates/ground.png) type("image/png")) 0 0 / 200px 120px;
  color: var(--pr-ink); font-family: var(--pr-text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body:has(main.auth) { background: #0A0A0B linear-gradient(105deg, #0B0B0C, #111113 50%, #0B0B0C) fixed; }
}
:root[data-theme="dark"] body:has(main.auth) { background: #0A0A0B linear-gradient(105deg, #0B0B0C, #111113 50%, #0B0B0C) fixed; }

main.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
main.auth .card { position: relative; width: 100%; max-width: 480px; box-sizing: border-box; padding: 58px 48px 52px; border: 0; border-radius: 0; box-shadow: none; color: var(--pr-ink);
  background: url(/assets/plates/cut/tg-top.webp) top / 100% auto no-repeat, url(/assets/plates/cut/tg-bottom.webp) bottom / 100% auto no-repeat, url(/assets/plates/cut/tg-left.webp) left top / 5.27% auto repeat-y, url(/assets/plates/cut/tg-right.webp) right top / 3.68% auto repeat-y, var(--pr-paper);
  filter: drop-shadow(0 0 10px rgba(255, 214, 128, .5)) drop-shadow(0 0 34px rgba(255, 196, 92, .22)); }
main.auth .brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pr-ink); font: 600 15px/1 var(--pr-text); letter-spacing: .3em; text-transform: uppercase; text-decoration: none; }
main.auth .brand i { position: relative; width: 26px; height: 26px; border: 1.5px solid currentColor; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--pr-paper), inset 0 0 0 3px currentColor; flex: none; background: none; }
main.auth .brand i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 7px; height: 11px; margin-left: -3.5px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; transform: none; }
main.auth h1 { margin: 26px 0 8px; font: 700 34px/1.1 var(--pr-display); letter-spacing: -.01em; color: var(--pr-ink); }
main.auth .card > p.muted { color: var(--pr-ink-2); font-size: 15.5px; line-height: 1.5; }
main.auth form { display: grid; gap: 18px; margin-top: 26px; padding-top: 22px; border-top: 3px double rgba(16, 52, 42, .55); }
main.auth label { display: grid; gap: 6px; font: 600 12px/1.3 var(--pr-text); letter-spacing: .16em; text-transform: uppercase; color: var(--pr-ink-2); }
main.auth label small { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--pr-ink-2); }
/* fields are ruled lines on the card */
main.auth input { width: 100%; box-sizing: border-box; height: 40px; padding: 0 2px; border: 0; border-bottom: 1.5px solid rgba(16, 52, 42, .55); border-radius: 0; background: transparent; color: var(--pr-ink); font: 400 17px var(--pr-text); letter-spacing: 0; text-transform: none; box-shadow: none; }
main.auth input::placeholder { color: #6B8378; }
main.auth input:focus { outline: none; border-bottom-color: var(--pr-ink); box-shadow: 0 1.5px 0 var(--pr-ink); }
main.auth input:focus-visible { outline: 2px solid var(--pr-ink); outline-offset: 3px; }
main.auth .err { color: var(--pr-over); font-size: 14px; }
/* the one action: an inked stamp-grain block, as on the landing */
main.auth .btn.primary { min-height: 54px; border: 0; border-radius: 0; background: #355644 image-set(url(/assets/plates/stamp-grain.webp) type("image/webp"), url(/assets/plates/stamp-grain.png) type("image/png")) center / cover; color: #EEF3EF; font: 600 17px var(--pr-text); letter-spacing: .01em; cursor: pointer; }
main.auth .btn.primary:hover { filter: brightness(.93); }
main.auth .btn.primary:focus-visible { outline: 2px solid var(--pr-ink); outline-offset: 3px; }
main.auth .btn.primary:disabled { cursor: progress; opacity: .8; }
main.auth .hint, main.auth .hint a, main.auth form > a, main.auth .card > p.muted a { color: var(--pr-ink-2); font-size: 13.5px; }
main.auth .card a { color: var(--pr-ink); }
main.auth .card > p.muted:last-of-type { margin-top: 22px !important; padding-top: 16px; border-top: 1px solid rgba(16, 52, 42, .3); }
/* the agent route: a small telegram slip inside the card */
main.auth .agentbox { margin-top: 22px; padding: 14px 16px; border: 1px solid rgba(16, 52, 42, .55); outline: 1px solid rgba(16, 52, 42, .3); outline-offset: -5px; border-radius: 0; background: rgba(255, 255, 255, .25); color: var(--pr-ink-2); font-size: 14px; gap: 10px; }
main.auth .agentbox b { color: var(--pr-ink); }
main.auth .agentbox .btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--pr-ink); border-radius: 0; background: transparent; color: var(--pr-ink); font: 600 14px var(--pr-text); cursor: pointer; }
main.auth .agentbox .btn:hover { background: rgba(16, 52, 42, .07); }
@media (max-width: 520px) {
  main.auth { padding: 20px 12px; place-items: start center; }
  main.auth .card { padding: 40px 28px 40px; }
  main.auth h1 { font-size: 28px; }
}

/* ---------- night grade for the lit papers ----------
   At night a cream sheet at full brightness is the brightest thing on the screen and reads like a flashbang. The papers
   keep every plate, line and colour, graded down like a sheet under a dim lamp: the ink darkens with the paper, so
   contrast holds, and the warm halo shrinks to a faint rim. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.lamp-field, .sheet, .ledger, .cables, .slip, main.auth .card) { filter: brightness(.74) saturate(.8) contrast(1.05); }
  :root:not([data-theme="light"]) :is(.slip, main.auth .card) { filter: brightness(.74) saturate(.8) contrast(1.05) drop-shadow(0 0 18px rgba(255, 214, 140, .10)); }
}
:root[data-theme="dark"] :is(.lamp-field, .sheet, .ledger, .cables, .slip, main.auth .card) { filter: brightness(.74) saturate(.8) contrast(1.05); }
:root[data-theme="dark"] :is(.slip, main.auth .card) { filter: brightness(.74) saturate(.8) contrast(1.05) drop-shadow(0 0 18px rgba(255, 214, 140, .10)); }
/* the card keeps its daylight stamp at night: a pale button on the paper would vanish */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) main.auth .btn.primary { background: #355644 image-set(url(/assets/plates/stamp-grain.webp) type("image/webp"), url(/assets/plates/stamp-grain.png) type("image/png")) center / cover; color: #EEF3EF; border: 0; } }
:root[data-theme="dark"] main.auth .btn.primary { background: #355644 image-set(url(/assets/plates/stamp-grain.webp) type("image/webp"), url(/assets/plates/stamp-grain.png) type("image/png")) center / cover; color: #EEF3EF; border: 0; }
