/* The sign-in page's look (AU2, AU21, AU32): technicians use it on phones and 8-inch tablets, so it keeps the field page's
   sizes (FA9, FA80, checked by app\tests\ui\field_served.js in Accounts mode and the demo walk): text 20 px (24 px with
   Larger text), every control 56 px tall and the full width of the card, contrast at least 4.5:1, the one main button at
   the bottom of the screen on phones and tablets (thumb reach). On a desktop: a centred card. Sizes in rem, so Larger
   text and the device's own text size both count.
   Colours and font are the U2 revamp's (the same names and values as wwwroot\shared\tokens.css, both themes, chosen by the
   same browser setting as BUILDERLITE and Working sets): the page is served before sign-in, where /shared/ is not open,
   so the few values it uses are written here. Change them together with tokens.css. */
:root {
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --surface-page: #F4F5F7; --surface-panel: #FFFFFF; --text: #1A1F29; --text-muted: #4A5263; --border-control: #7D8695;
  --brand: #C8221A; --action: #C8221A; --action-hover: #A11B14; --on-action: #FFFFFF; --link: #1D4ED8; --focus: #1D4ED8;
  --ok: #15803D; --danger: #B01E17;
}
html.theme-dark {
  --surface-page: #0E1015; --surface-panel: #15181F; --text: #ECEDF0; --text-muted: #9DA3AF; --border-control: #6B7385;
  --brand: #ECEDF0; --action: #D2342A; --action-hover: #B82A21; --on-action: #FFFFFF; --link: #7AA7FF; --focus: #7AA7FF;
  --ok: #22C55E; --danger: #FF6B5E;
}
* { box-sizing: border-box; }
html { font: 20px/1.4 var(--font-sans); color: var(--text); background: var(--surface-page); }
html.larger { font-size: 24px; }
body { margin: 0; min-height: 100vh; }
.card { max-width: 30rem; margin: 0 auto; padding: 1.2rem 1rem 6rem; background: var(--surface-panel); min-height: 100vh; }
/* the word mark: the brand red bar of BUILDERLITE and Working sets, as a short line before the name */
h1 { font-size: 1.4rem; margin: 0 0 0.4rem; color: var(--text); padding-left: 0.6rem; border-left: 6px solid var(--brand); }
h2 { font-size: 1.2rem; margin: 0.4rem 0 0.8rem; }
label { display: block; margin: 0.8rem 0 0.3rem; font-weight: 600; font-size: 1rem; }
input, select { width: 100%; height: 56px; font: inherit; font-size: 1rem; padding: 0 0.7rem; border: 2px solid var(--border-control); border-radius: 8px; background: var(--surface-panel); color: var(--text); }
input:focus, select:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
/* a tick box with its words: the whole line is the 56 px target (Show password, Larger text) */
label.switch { display: flex; align-items: center; gap: 0.6rem; min-height: 56px; width: 100%; margin: 0.6rem 0 0; font-weight: 400; cursor: pointer; }
label.switch input { width: 1.4rem; height: 1.4rem; flex: none; margin: 0; accent-color: var(--link); }
button { font: inherit; font-size: 1rem; min-height: 56px; border-radius: 8px; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.main { width: 100%; margin-top: 1rem; border: 0; background: var(--action); color: var(--on-action); font-weight: 600; }
.main:hover { background: var(--action-hover); }
.main:disabled { background: var(--surface-panel); color: var(--text); border: 2px dashed var(--border-control); cursor: wait; }
.plain { width: 100%; margin-top: 0.6rem; border: 2px solid var(--border-control); background: var(--surface-panel); color: var(--text); }
.msg { min-height: 1.4em; margin: 0.6rem 0 0; color: var(--danger); font-weight: 600; }
.msg.ok { color: var(--ok); }
/* an error next to its field (change password): the words under the box, the box's edge in the danger colour */
.fielderr { margin: 0.3rem 0 0; color: var(--danger); font-weight: 600; }
input[aria-invalid="true"] { border-color: var(--danger); }
.hint { color: var(--text-muted); }
.links a { display: inline-block; margin: 0 0.8rem 0.4rem 0; color: var(--link); }
/* phones and tablets: the main button sits at the bottom of the screen, above the safe area */
@media (max-width: 1023.98px) {
  .main { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); min-height: calc(56px + env(safe-area-inset-bottom)); z-index: 10; }
}
@media (min-width: 1024px) {
  .card { margin: 3rem auto; min-height: 0; border-radius: 12px; box-shadow: 0 16px 44px rgba(16, 24, 40, .18); padding: 1.6rem; }
}
