:root {
  color-scheme: dark;
  --bg: #080c10;
  --panel: #111a21;
  --line: #2a3740;
  --muted: #8a9ba7;
  --accent: #7de0d1;
  --text: #eef5f7;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
button, input { font: inherit; border-radius: 0; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: wait; }
[hidden] { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr);
}
.auth-brand {
  min-height: 100vh;
  padding: 48px clamp(32px, 7vw, 112px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(125,224,209,.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(125,224,209,.035) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(ellipse at 72% 68%, rgba(34,87,88,.22), transparent 42%),
    linear-gradient(140deg, #111d26, #080c10 76%);
  position: relative;
  overflow: hidden;
}
.auth-brand::after {
  content: '';
  position: absolute;
  right: 9%;
  bottom: 16%;
  width: clamp(150px, 19vw, 260px);
  aspect-ratio: 1;
  border: 1px solid rgba(125,224,209,.18);
  transform: rotate(45deg);
  pointer-events: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  width: fit-content;
  color: var(--text);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 5px;
  position: relative;
  z-index: 1;
}
.brand img { display: block; width: 48px; height: 48px; }
.brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font: 8px/1.8 monospace;
  letter-spacing: 1px;
}
.brand-copy { position: relative; z-index: 1; }
.eyebrow {
  color: var(--accent);
  font: 10px/1.8 monospace;
  letter-spacing: 1.7px;
}
.auth-brand h1 {
  margin: 24px 0;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -2.5px;
}
.auth-brand p { color: #a9b7c0; font-size: 15px; line-height: 1.8; }
.brand-index {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #61727c;
  font: 9px/1 monospace;
  letter-spacing: 1.2px;
  position: relative;
  z-index: 1;
}
.brand-index i { width: 42px; height: 1px; background: #31434a; }
.brand-index small { margin-left: 10px; font: inherit; }

.auth-panel {
  width: min(100%, 530px);
  margin: auto;
  padding: 56px clamp(28px, 5vw, 62px);
}
.auth-panel h2 { margin: 15px 0 10px; font-size: 30px; letter-spacing: -.7px; }
.auth-note { color: var(--muted); font-size: 13px; line-height: 1.7; }
.connection-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 30px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 9px/1.4 monospace;
  letter-spacing: 1px;
}
.connection-led { width: 7px; height: 7px; flex: 0 0 7px; background: #85949c; }
.connection-status.is-secure { border-color: #28594f; color: var(--accent); }
.connection-status.is-secure .connection-led { background: var(--accent); box-shadow: 0 0 10px rgba(125,224,209,.55); }
.connection-status.is-local { border-color: #756338; color: #f2d18c; }
.connection-status.is-local .connection-led { background: #f2d18c; }

form { margin-top: 28px; }
label {
  display: block;
  margin: 20px 0 8px;
  color: #b5c5cf;
  font: 11px/1.7 monospace;
}
input {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  outline: none;
  background: #0c141b;
  color: var(--text);
  font: 15px Arial, sans-serif;
}
input::placeholder { color: #65737d; }
input:focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.password-field { position: relative; }
.password-field input { padding-right: 96px; }
.password-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: auto;
  min-width: 82px;
  height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 10px monospace;
  letter-spacing: .5px;
}
.password-toggle:hover { color: #c0fff3; background: #14221f; }
.primary-action {
  display: block;
  width: 100%;
  min-height: 50px;
  margin-top: 26px;
  padding: 14px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #08201d;
  font-size: 12px;
  font-weight: 700;
  transition: background .15s ease, color .15s ease;
}
.primary-action:hover { background: transparent; color: var(--accent); }
.primary-action span { padding-left: 4px; }
.text-button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.text-button:hover { color: var(--text); }
button:focus-visible, a:focus-visible { outline: 2px solid white; outline-offset: 4px; }
.auth-panel > footer {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 9px/1.7 monospace;
  letter-spacing: .7px;
}
.auth-message, .auth-warning {
  padding: 14px;
  border: 1px solid #756338;
  background: #282319;
  color: #f2d18c;
  font-size: 12px;
  line-height: 1.7;
}
.auth-message[data-kind="success"] { border-color: #386c64; background: #122723; color: var(--accent); }
#backToWorkspace { display: block; padding: 12px; text-align: center; font-size: 12px; }
noscript { display: block; margin-top: 18px; color: #f2d18c; font-size: 12px; }

@media (max-width: 760px) {
  .auth-shell { display: block; }
  .auth-brand {
    min-height: auto;
    padding: 23px 24px 20px;
    gap: 25px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { font-size: 20px; }
  .brand img { width: 42px; height: 42px; }
  .auth-brand h1 { margin: 14px 0 0; font-size: 39px; letter-spacing: -1.5px; }
  .auth-brand p, .brand-index, .auth-brand::after { display: none; }
  .auth-panel { padding: 32px 24px 42px; }
  .connection-status { margin: 22px 0 26px; }
}
@media (max-width: 380px) {
  .auth-panel { padding-inline: 18px; }
  .auth-brand { padding-inline: 18px; }
  .brand { gap: 12px; letter-spacing: 3px; }
}
@media (max-height: 720px) and (min-width: 761px) {
  .auth-brand, .auth-panel { padding-top: 32px; padding-bottom: 32px; }
  .auth-brand h1 { margin-block: 14px; }
  .connection-status { margin-block: 18px; }
  form { margin-top: 20px; }
  label { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Compact sign-in: keep the brand and form, remove promotional and test-contour copy. */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 26px;
  padding: 36px 20px;
  background:
    linear-gradient(90deg, rgba(125,224,209,.025) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(125,224,209,.025) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(ellipse at 50% 42%, rgba(34,87,88,.18), transparent 48%), var(--bg);
}
.auth-brand {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}
.auth-brand::after, .brand-copy, .brand-index { display: none; }
.auth-panel {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(17,26,33,.96);
  box-shadow: 0 24px 90px rgba(0,0,0,.28);
}
.auth-panel h2 { margin-top: 0; }
.connection-status { display: none; }
@media (max-width: 760px) {
  .auth-shell { display: grid; padding: 24px 16px; gap: 20px; }
  .auth-brand { padding: 0; border: 0; }
  .auth-panel { padding: 32px 24px 36px; }
}

/* Shared login stylesheet also contains the isolated onboarding view. */
:root .pending-shell { max-width: 1100px; margin: auto; min-height: 100vh; padding: 42px 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 50px; }
.pending-card { border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 40px; background: var(--panel); }
.pending-card h1 { max-width: 900px; font-size: clamp(28px, 4vw, 46px); letter-spacing: -1px; line-height: 1.25; }
.pending-card > p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.pending-actions { display: flex; align-items: center; gap: 28px; margin-top: 28px; }
.pending-actions button { width: auto; min-width: 140px; margin: 0; }
.pending-actions a { font-size: 13px; }
@media (max-width: 700px) {
  :root .pending-shell { padding: 24px 18px; }
  .pending-card { padding: 24px; }
  .pending-actions { flex-wrap: wrap; }
}
