/* Sign-in page. Colours, type and spacing from /design/system/tokens.css (identity A), loaded first.
   Layout (Sasi, 16 Oct 2026): two halves meeting at the centre, the platform's name on a soft panel and the form beside it,
   a theme button in the corner and a footer bar with the release. */
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-rows: 1fr auto; background: var(--surface); color: var(--ink);
  font: 15px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }

/* the two halves: the name on the end side (left), the form on the start side (right); both hug the centre line */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.side { grid-column: 2; grid-row: 1; display: grid; align-content: center; justify-items: start; gap: 6px; padding: 48px 32px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface) 75%); }
.pane { grid-column: 1; grid-row: 1; display: grid; align-content: center; justify-items: end; padding: 48px 32px; }
.side > * { width: min(100%, 420px); }

.fcsc { height: 38px; width: auto !important; display: block; margin-bottom: 14px; }
/* the platform's mark beside its name */
.lockup { display: flex; align-items: center; gap: 14px; }
.lockup .mark { width: 52px; height: 52px; flex: none; display: block; }
h1 { font: 700 24px/1.4 var(--font-head); color: var(--title); margin: 0; text-wrap: balance; }
.tagline { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.sub { color: var(--ink); font-size: 14px; margin: 2px 0 0; }

.card { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-dialog); padding: 24px;
  display: grid; gap: 14px; box-shadow: var(--shadow-overlay); }
form { display: grid; gap: 8px; }
label { font-weight: 600; font-size: 13.5px; }
input { font: inherit; color: inherit; height: 44px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 12px; }
input:hover { border-color: var(--muted); }
input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input#otp { height: 56px; font: 600 24px/1 var(--font-latin); letter-spacing: .45em; padding-inline-start: .45em; text-align: center; font-variant-numeric: tabular-nums; }
button { font: inherit; font-weight: 600; font-size: 14px; height: 44px; border: 0; border-radius: var(--r); padding: 0 16px; background: var(--brand); color: var(--on-brand); cursor: pointer; }
button:hover { background: var(--brand-hover); }
form button[type=submit] { margin-top: 6px; }
button.link { background: none; color: var(--link); height: 36px; padding: 0 10px; justify-self: start; }
button.link:hover { background: var(--surface-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sent { margin: 0 0 4px; font-size: 14px; }
.msg { color: var(--danger); font-weight: 600; font-size: 13.5px; min-height: 1.6em; margin: 0; }
.msg:empty { display: none; }
.note { color: var(--muted); font-size: 12px; margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }

/* the theme button in the corner (signin.js): auto → light → dark, the same choice as inside the app */
.theme { position: fixed; top: 16px; left: 16px; z-index: 2; width: 36px; height: 36px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.theme:hover { background: var(--surface-2); }
.theme svg { width: 18px; height: 18px; }

/* the footer bar: the Centre, the environment (staging), the release */
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 10px 24px;
  border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; }
.env { display: inline-block; margin-inline-start: 8px; padding: 0 8px; border-radius: 4px; font-weight: 600;
  background: var(--draft-bg); color: var(--draft); border: 1px solid var(--draft-fill); }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .side, .pane { grid-column: 1; justify-items: stretch; padding: 24px 16px; }
  .side { justify-items: start; }
  .side { grid-row: 1; padding-top: 64px; }
  .pane { grid-row: 2; align-content: start; }
  .side > *, .card { width: 100%; }
  .bar { justify-content: center; text-align: center; padding: 10px 16px; }
}
@media (max-width: 400px) { .lockup .mark { width: 44px; height: 44px; } h1 { font-size: 20px; } }
