/* The login page of CTS Secure: the look of the app (shared/theme.css tokens, proposal 6c-4), nothing else loaded.
   It must work with only what the gate lets through without a session: this file, shared/theme.css, shared/auth*.js, app/logo*.svg. */
* { box-sizing:border-box; }
html, body { height:100%; margin:0; }
body { display:grid; place-items:center; min-height:100%; padding:24px 16px; font:var(--t-body); }   /* sizes, weights and heights are DESIGN.md's roles and tokens (this page cannot load shared/ui.css: see the head) */
body :focus-visible { outline:2px solid var(--acc-text); outline-offset:2px; }
button, input { font:inherit; }

.lg-bg { position:fixed; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; opacity:0; transition:opacity 1.2s var(--ease); }
.lg-bg.on { opacity:1; }
.lg { position:relative; z-index:1; width:100%; max-width:400px; padding:28px 24px 24px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); }
.lg-logo { display:block; width:100%; max-width:200px; height:auto; margin:0 0 26px; }
.lg h1 { margin:4px 0 6px; font:var(--t-display); color:var(--heading); letter-spacing:-.02em; }
.lg-lead { margin:0 0 20px; color:var(--muted); }
.lg-fld { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.lg-fld > label { font:var(--t-small); color:var(--muted); }
.lg-in { position:relative; display:flex; }
.lg-in input { flex:1; min-width:0; height:var(--ctl-l); padding:0 14px; font-size:16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--field); color:var(--text); outline:none; -webkit-appearance:none; appearance:none; }
.lg-in input:focus { border-color:var(--acc); }
.lg-in input::placeholder { color:var(--muted); opacity:1; }
.lg-in.has-btn input { padding-right:60px; }
.lg-show { position:absolute; right:4px; top:4px; height:calc(var(--ctl-l) - 8px); padding:0 12px; border:0; border-radius:8px; background:transparent; color:var(--acc-text); font:var(--t-small); cursor:pointer; }
.lg-show::after { content:''; position:absolute; inset:-4px 0; }   /* the finger's 44 px */
.lg-show:hover { background:var(--nav-hover); }
.lg-err { box-sizing:border-box; min-height:46px; margin:0 0 14px; padding:10px 12px; border:1px solid var(--warn-line); border-radius:var(--radius); background:var(--warn-bg); color:var(--warn-ink); font:var(--t-body); }
.lg-err:empty { visibility:hidden; }   /* the line keeps its height: an error does not push the card down */
.lg-ok:not([hidden]) + .lg-err:empty { display:none; }   /* a shown ok line (email changed) holds the place; no empty gap under it */
.lg-ok { margin:0 0 14px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--tint); color:var(--text); font:var(--t-body); }
/* the second step (two-step verification): the three lines, the QR picture on its white tile, the set-up key as text with Copy (behind its button), the code field and its own error line */
.lg-steps { margin:10px 0 16px; padding:0 0 0 20px; color:var(--text); }
.lg-steps li { margin:0 0 4px; padding-left:2px; }
.lg-qr { display:flex; justify-content:center; margin:0 0 14px; }
.lg-qr img { display:block; width:176px; height:176px; padding:8px; border-radius:var(--radius); background:#fff; }   /* a QR code is read dark on white, on the dark page too */
.lg-key { display:flex; align-items:center; gap:10px; margin:0 0 14px; padding:0 0 0 14px; border:1px solid var(--line); border-radius:var(--radius); background:var(--field); }
.lg-key-l { flex:none; font:var(--t-small); color:var(--muted); }
.lg-key code { flex:1; min-width:0; padding:8px 0; font:var(--t-small); font-family:var(--font-mono);   /* the page writes half the groups on each line: two even lines */ color:var(--text); white-space:pre-line; overflow-wrap:anywhere; -webkit-user-select:all; user-select:all; }
/* "Can't scan the picture?" and its box: the line that says what the key is, "Set-up key" over the row (as a field's label), the muted line under it */
.lg-alt { display:flex; justify-content:center; margin:-10px 0 4px; }
.lg-box { margin:0 0 14px; }
.lg-box .lg-key-l { display:block; margin:0 0 6px; }
.lg-box .lg-key { margin:0 0 8px; }
.lg-say { margin:0 0 12px; color:var(--text); }
.lg-help { margin:0; color:var(--muted); font:var(--t-help); }
.lg-lost { margin:12px 0 0; }
.lg-copy { flex:none; margin-left:auto; min-width:76px; height:var(--ctl-l); padding:0 14px; border:0; border-left:1px solid var(--line); border-radius:0 var(--radius) var(--radius) 0; background:transparent; color:var(--acc-text); font:var(--t-body); font-weight:500; cursor:pointer; }
.lg-copy:hover { background:var(--nav-hover); }
.lg-in input.lg-code { font-family:var(--font-mono); letter-spacing:.2em; }
.lg-in input.lg-code::placeholder { font-family:var(--font); letter-spacing:0; }
.lg-in input[aria-invalid="true"] { border-color:var(--warn-ink); }
.lg-ferr { min-height:1.45em; margin:0; color:var(--warn-ink); font:var(--t-help); }   /* under its field; the line keeps its height, so a message does not move the button */
.lg-btn { display:inline-flex; align-items:center; justify-content:center; width:100%; height:var(--ctl-l); padding:0 16px; border:1px solid var(--acc); border-radius:var(--radius); background:var(--acc); color:var(--acc-ink); font:var(--t-body); font-weight:500; cursor:pointer; }
.lg-btn:hover { background:#4a6dd0; }
.lg-btn[disabled] { opacity:.6; cursor:default; }
.lg-link { display:inline-flex; align-items:center; min-height:44px; padding:0; border:0; background:none; color:var(--acc-text); font:var(--t-body); font-weight:500; text-decoration:none; cursor:pointer; }
.lg-link:hover { text-decoration:underline; }
.lg-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:6px; }
/* Fileshare's recovery code: the code in one mono line, the box to tick, the field, the quiet way on without it and its own (second) button */
.lg-rcode { justify-content:center; padding:0 14px; }
.lg-rcode code { flex:none; padding:12px 0; font:var(--t-body); font-family:var(--font-mono); white-space:nowrap; letter-spacing:.02em; }
.lg-chk { display:flex; align-items:center; gap:10px; min-height:44px; margin:0 0 4px; color:var(--text); cursor:pointer; }
.lg-chk input { flex:none; width:20px; height:20px; margin:0; accent-color:var(--acc); }
.lg-ferr + .lg-btn { margin-top:8px; }
.lg-in input.lg-rin { font-family:var(--font-mono); letter-spacing:.02em; }
.lg-skip { justify-content:center; }
.lg-link.lg-quiet { color:var(--muted); font-weight:400; }
.lg-btn.lg-sec { background:transparent; color:var(--acc-text); }
.lg-btn.lg-sec:hover { background:var(--nav-hover); }
.lg-wait { display:flex; align-items:center; gap:12px; padding:8px 0 4px; color:var(--muted); }
.lg-spin { width:18px; height:18px; flex:none; border:2px solid var(--line); border-top-color:var(--acc-text); border-radius:50%; animation:lg-spin .8s linear infinite; }
@keyframes lg-spin { to { transform:rotate(360deg); } }
[hidden] { display:none !important; }
@media (max-width:480px) { body { place-items:start center; padding-top:40px; } .lg { padding:24px 20px 20px; } }
@media (prefers-reduced-motion:reduce) { .lg-spin { animation:none; } .lg-bg { transition:none; } }
