/* Wakefit Pulse sign-in pages. Tokens copied from wakefit-pulse-frontend src/app/globals.css. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Light by default; dark when the person chose it in Pulse (data-theme, set by signin.js) or,
   with no saved choice, when the device is dark. */
:root {
  color-scheme: light;
  --canvas: #f7f6fb;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --line: #e2e5ee;
  --ink: #0f1222;
  --ink-2: #474c63;
  --muted: #6b7087;
  --brand: #48308c;
  --brand-hover: #3b2675;
  --brand-soft: #efebfa;
  --ring: rgb(72 48 140 / 0.26);
  --rail: #1f1442;
  --rail-ink: #f1edfb;
  --rail-muted: #b3a8d6;
  --rail-accent: #f37b7d;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-line: #fecaca;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --info-line: #bfdbfe;
  --shadow: 0 1px 2px rgb(15 18 34 / 0.05), 0 12px 32px -16px rgb(31 20 66 / 0.22);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0c0a14;
  --surface: #14111e;
  --surface-2: #1c1829;
  --line: #2a253a;
  --ink: #ece9f4;
  --ink-2: #aca6bf;
  --muted: #9a94ae;
  --brand: #7152c8;
  --brand-hover: #805fd8;
  --brand-soft: rgb(128 95 216 / 0.16);
  --ring: rgb(170 145 255 / 0.45);
  --rail: #110b22;
  --rail-ink: #ece9f4;
  --rail-muted: #9a90b8;
  --rail-accent: #f58f90;
  --danger: #fca5a5;
  --danger-soft: rgb(239 68 68 / 0.12);
  --danger-line: rgb(239 68 68 / 0.35);
  --info: #93c5fd;
  --info-soft: rgb(59 130 246 / 0.12);
  --info-line: rgb(59 130 246 / 0.35);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -20px rgb(0 0 0 / 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #0c0a14;
    --surface: #14111e;
    --surface-2: #1c1829;
    --line: #2a253a;
    --ink: #ece9f4;
    --ink-2: #aca6bf;
    --muted: #9a94ae;
    --brand: #7152c8;
    --brand-hover: #805fd8;
    --brand-soft: rgb(128 95 216 / 0.16);
    --ring: rgb(170 145 255 / 0.45);
    --rail: #110b22;
    --rail-ink: #ece9f4;
    --rail-muted: #9a90b8;
    --rail-accent: #f58f90;
    --danger: #fca5a5;
    --danger-soft: rgb(239 68 68 / 0.12);
    --danger-line: rgb(239 68 68 / 0.35);
    --info: #93c5fd;
    --info-soft: rgb(59 130 246 / 0.12);
    --info-line: rgb(59 130 246 / 0.35);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -20px rgb(0 0 0 / 0.6);
  }
}

/* Which logo and theme icon show: by the saved choice, else by the device. */
.logo-dark, .when-dark { display: none; }
:root[data-theme="dark"] .logo-light, :root[data-theme="dark"] .when-light { display: none; }
:root[data-theme="dark"] .logo-dark, :root[data-theme="dark"] .when-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light, :root:not([data-theme="light"]) .when-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark, :root:not([data-theme="light"]) .when-dark { display: inline; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--surface);
  color: var(--ink);
  font: 15px/1.5 "Inter", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
.icon { width: 16px; height: 16px; flex: none; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  padding: 10px 14px; border-radius: 8px; background: var(--brand); color: #fff;
}
.skip:focus { top: 12px; }

/* Phones and tablets: the brand banner across the top, the form below; from 1024px the banner is
   the left half (media queries at the end). */
.split { display: grid; min-height: 100dvh; grid-template-rows: auto 1fr; position: relative; }

/* The Wakefit logo with "Pulse" beside it, as in Pulse's sidebar. */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { height: 30px; width: auto; }
.brand-rule { width: 1px; height: 22px; background: var(--line); }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

/* The brand panel: Pulse's rail colour, the logo, one line about what Pulse is. */
.rail {
  display: flex; flex-direction: column; gap: 20px;
  padding: 22px 20px 26px; background: var(--rail); color: var(--rail-ink);
}
.rail .brand-rule { background: rgb(255 255 255 / 0.18); }
.rail .brand-name { color: #fff; }
.headline { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.rail .sub { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--rail-muted); }
.rail small { display: none; }

.main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.topbar { position: absolute; top: 16px; right: 16px; z-index: 2; padding: 0; }
.topbar .brand { display: none; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); }
.theme-toggle .icon { width: 17px; height: 17px; }
.center { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 28px 20px 48px; }
.panel { width: 100%; max-width: 400px; }

h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.lead { margin: 8px 0 0; color: var(--ink-2); }
.lead strong { color: var(--ink); font-weight: 600; }
.help { margin: 24px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

form { margin: 28px 0 0; }
.field { margin: 0 0 20px; }
label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 500; }
.hint { display: block; margin: 7px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* An input and, for passwords, a show/hide button inside it on the right. */
.input { position: relative; }
.input input {
  display: block; width: 100%; min-height: 46px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input.has-reveal input { padding-right: 46px; }
.input input:hover { border-color: color-mix(in srgb, var(--line), var(--ink) 18%); }
.input input:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input input[aria-invalid="true"] { border-color: var(--danger); }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.reveal:hover { background: var(--surface-2); color: var(--ink); }
.reveal[aria-pressed="true"] { color: var(--brand); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 12px 16px; margin-top: 4px;
  border: 0; border-radius: 10px; background: var(--brand); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s;
}
.button:hover { background: var(--brand-hover); }
.button:focus-visible, a:focus-visible, .theme-toggle:focus-visible, .reveal:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.button.secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.button.secondary:hover { background: var(--brand-soft); }
a { color: var(--brand); }

.alert {
  margin: 24px 0 0; padding: 12px 14px; border-radius: 10px; border: 1px solid;
  font-size: 14px;
}
.alert.error { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.alert.info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.alert + form { margin-top: 20px; }

/* Tablets and up: a roomier banner and the form in a card. */
@media (min-width: 640px) {
  body { background: var(--canvas); }
  .topbar { top: 20px; right: 24px; }
  .center { padding: 48px 32px 56px; }
  .panel { max-width: 440px; }
  .card { padding: 36px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }

  .rail { gap: 28px; padding: 32px 40px 36px; }
  .rail .brand img { height: 42px; }
  .rail .brand-rule { height: 26px; }
  .rail .brand-name { font-size: 19px; }
  .headline { font-size: 32px; line-height: 1.15; letter-spacing: -0.025em; }
  .rail .sub { margin-top: 12px; font-size: 15px; line-height: 1.6; }
}

/* Desktop: the panel is the left half, with the staff-only line at its foot. */
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: none; }
  .main { min-height: 100dvh; position: relative; }
  .topbar { top: 24px; right: 28px; }
  .center { align-items: center; padding: 8px 20px 64px; }
  .panel { max-width: 400px; }
  .rail { justify-content: space-between; gap: 0; padding: 48px 56px; }
  .rail-body { max-width: 30rem; }
  .headline { font-size: 42px; line-height: 1.12; }
  .rail .sub { margin-top: 16px; }
  .rail small { display: block; font-size: 12px; color: var(--rail-muted); opacity: 0.8; }
}

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