/* Sanctis — splash / sign-in
   Light palette: grey / white / blue. Matches the authenticated app shell
   (assets/app.css) and the sanctis.net marketing site. Token names kept
   (--black, --gray-*, --blue*) for the rules below; values are the light theme. */

:root {
  --black:      #f5f6f8;   /* page ground */
  --gray-900:   #ffffff;   /* elevated surface */
  --gray-850:   #ffffff;   /* input surface */
  --gray-800:   #f3f4f6;   /* input surface, focused */
  --gray-700:   #e3e6ea;   /* border */
  --line:       #e3e6ea;
  --line-soft:  #edeff2;

  --text:       #1b2430;
  --text-muted: #5a626d;
  --text-dim:   #8a929c;

  /* Brand accent — blue. */
  --blue:       #2563eb;
  --blue-strong:#2563eb;
  --blue-hover: #1d4ed8;
  --blue-wash:  rgba(37, 99, 235, 0.10);
  --accent-ink: #ffffff;

  --radius:     12px;
  --radius-sm:  9px;
  --maxw:       380px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- layout ---------- */

.split {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(420px, 44%) 1fr;
}

/* ---------- left: shaded gray panel ---------- */

.panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background:
    radial-gradient(120% 80% at 15% 0%, var(--gray-800) 0%, var(--gray-900) 55%, var(--black) 100%);
  border-right: 1px solid var(--line);
}

.panel__inner {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.brand { display: inline-flex; }
.brand img { display: block; height: 52px; width: auto; }

/* ---------- sign-in ---------- */

.signin__title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.signin__lede {
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; }

.field__label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--gray-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field__input::placeholder { color: var(--text-dim); }

.field__input:focus {
  border-color: var(--blue);
  background: var(--gray-800);
  box-shadow: 0 0 0 3px var(--blue-wash);
}

.field__input:user-invalid {
  border-color: #c0392b;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 12px 18px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--blue-strong);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:hover { background: var(--blue-hover); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }

.btn--ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}
.btn--ghost:hover:not(:disabled) { background: rgba(0, 0, 0, 0.04); }

.btn__icon { width: 16px; height: 16px; flex: none; }

/* ---------- Microsoft sign-in button ---------- */
/* White card with the full-colour Microsoft mark — the primary way in, so it
   sits above the fold with real presence against the dark panel. */
.ms-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1b1f24;
  background: #fff;
  border: 1px solid #d7dce3;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ms-btn:hover:not(:disabled) { background: #f3f5f8; border-color: #c4ccd6; }
.ms-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ms-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.ms-btn__mark { width: 20px; height: 20px; flex: none; }
.ms-btn__text { line-height: 1; }

.signin__admin {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
}
.signin__admin a { color: var(--text-dim); text-decoration: none; }
.signin__admin a:hover { color: var(--text-muted); text-decoration: underline; }

.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-wash);
  padding: 2px 6px;
  border-radius: 999px;
}

.form__note {
  margin: 2px 0 0;
  min-height: 1.2em;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.form__note[data-state="ok"]   { color: var(--blue); }
.form__note[data-state="err"]  { color: #c0392b; }

/* ---------- divider ---------- */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: var(--text-dim);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

/* ---------- footer ---------- */

.panel__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.panel__foot a { color: var(--text-dim); text-decoration: none; }
.panel__foot a:hover { color: var(--text-muted); }

/* ---------- right: hero imagery ---------- */

.hero {
  position: relative;
  background-color: var(--gray-900);
  background-image:
    linear-gradient(180deg, rgba(11, 14, 19,0.15) 0%, rgba(11, 14, 19,0.55) 100%),
    url("/assets/hero.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 56px 44px;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 14, 19,0.72) 100%);
}

.hero__kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
}

.hero__line {
  margin: 0;
  max-width: 30ch;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 550;
  color: #f2f4f8;
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .panel { border-right: none; border-bottom: 1px solid var(--line); order: 2; padding: 44px 24px; }
  .hero  { order: 1; min-height: 34vh; }
  .hero__overlay { padding: 28px 24px 24px; }
  .hero__line { font-size: 18px; }
}

@media (max-width: 420px) {
  .panel__inner { gap: 32px; }
  .brand img { height: 44px; }
  .hero { min-height: 26vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
