:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #f6f8fb;
  --surface: #ffffff;
  --line: #e2e8f0;
  --accent: #1677ff;
  --accent-dark: #0958d9;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 system-ui, sans-serif; }
a { color: var(--accent); }
.topbar { height: 64px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .03em; }
.brand-emblem {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: visible;
  background: transparent;
}
.brand-emblem img {
  display: block;
  width: 54px;
  max-width: none;
  height: 54px;
  object-fit: contain;
  transform: translate(-7px, -7px);
}
.topbar-actions, .actions { display: flex; align-items: center; gap: 12px; }
.shell { width: min(1180px, 92vw); margin: 48px auto 80px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; }
h2 { margin-top: 0; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font: 700 12px/1 system-ui; letter-spacing: .18em; }
.muted { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 28px; margin-bottom: 24px; }
.stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
label { display: grid; gap: 7px; font-weight: 650; }
input, textarea, select { width: 100%; border: 1px solid #cbd5e1; background: #fff; padding: 10px 12px; border-radius: 4px; color: var(--ink); font: inherit; }
textarea, pre { font-family: ui-monospace, Consolas, monospace; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgb(22 119 255 / 25%); outline-offset: 1px; border-color: var(--accent); }
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: auto; }
.button { border: 0; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 4px; font: 700 14px/1 system-ui; cursor: pointer; }
.button:hover { background: var(--accent-dark); }
.button-secondary { background: #eaf2ff; color: var(--accent-dark); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.status { display: inline-block; padding: 3px 8px; background: #e9eef5; border-radius: 99px; }
.status-ok { color: #087443; background: #dcfce7; }
.alert { padding: 12px 14px; margin: 16px 0; }
.alert-error { color: var(--danger); background: #fff1f0; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 24px; }
.metrics > div { min-width: 0; background: var(--surface); padding: 20px; }
.metrics span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.metrics strong { display: block; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #0f172a; color: #e2e8f0; padding: 18px; }

/* Bright blue enterprise SaaS login */
.login-page {
  --login-ink: #0f172a;
  --login-muted: #64748b;
  --login-line: #e3eaf3;
  --login-blue: #1677ff;
  --login-blue-dark: #0958d9;
  min-height: 100dvh;
  color: var(--login-ink);
  background: #f8fbff;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.login-page ::selection { color: #0b3d80; background: #cfe2ff; }
.login-page .topbar { display: none; }
.login-page .shell { width: 100%; min-height: 100dvh; margin: 0; }
.login-scene {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background-color: #f8fbff;
  background-image:
    linear-gradient(rgb(22 119 255 / 2.8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(22 119 255 / 2.8%) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-backdrop { position: absolute; inset: 0; pointer-events: none; }
.login-glow { position: absolute; display: block; border-radius: 50%; filter: blur(10px); }
.login-glow-primary {
  top: -24vw;
  left: -16vw;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, rgb(22 119 255 / 11%) 0, rgb(22 119 255 / 3%) 46%, transparent 72%);
}
.login-glow-secondary {
  right: -25vw;
  bottom: -30vw;
  width: 62vw;
  height: 62vw;
  background: radial-gradient(circle, rgb(37 99 235 / 7%) 0, rgb(37 99 235 / 2%) 48%, transparent 72%);
}
.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1240px, calc(100% - 64px));
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 448px);
  align-items: center;
  gap: clamp(88px, 7vw, 120px);
  margin: 0 auto;
  padding: 52px 0 60px;
}
.login-intro { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.login-brand,
.login-access-brand {
  width: fit-content;
  align-items: center;
  gap: 13px;
  color: var(--login-ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.025em;
}
.login-brand { display: flex; }
.login-access-brand { display: none; }
.login-page .brand-emblem { width: 52px; height: 52px; flex-basis: 52px; }
.login-page .brand-emblem img { width: 72px; height: 72px; transform: translate(-10px, -10px); }
.login-copy { max-width: 590px; margin-top: clamp(46px, 7vh, 68px); }
.login-version {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 17px;
  padding: 0;
  color: var(--login-blue);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.login-version span {
  width: 6px;
  height: 6px;
  background: var(--login-blue);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(22 119 255 / 10%);
}
.login-copy h1 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(45px, 4.2vw, 56px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -.06em;
  text-wrap: balance;
}
.login-copy h1 span { color: var(--login-blue); }
.login-copy > p:last-child {
  max-width: 29rem;
  margin: 20px 0 0;
  color: var(--login-muted);
  font-size: 17px;
  line-height: 1.8;
  text-wrap: pretty;
}
.login-features {
  display: grid;
  max-width: 540px;
  gap: 14px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.login-features li { display: flex; align-items: center; gap: 14px; color: #334155; }
.login-feature-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: var(--login-blue);
  background: #eaf3ff;
  border: 1px solid #d9e9ff;
  border-radius: 10px;
  transition: color 220ms ease, background-color 220ms ease, transform 220ms ease;
}
.login-features li:hover .login-feature-icon { color: #ffffff; background: var(--login-blue); transform: translateX(2px); }
.login-feature-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-features li > span:last-child { display: grid; gap: 2px; }
.login-features strong { color: #24324a; font-size: 14px; font-weight: 700; }
.login-features small { color: #7a889d; font-size: 12px; }
.login-access { min-width: 0; }
.login-card-frame { position: relative; width: 100%; }
.login-card-frame::before {
  position: absolute;
  inset: -8px 10px auto;
  height: 74%;
  content: "";
  background: linear-gradient(180deg, rgb(22 119 255 / 13%), transparent);
  border-radius: 30px;
  filter: blur(16px);
  opacity: .65;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 42px 44px 44px;
  background: rgb(255 255 255 / 96%);
  border: 1px solid rgb(220 230 243 / 88%);
  border-radius: 26px;
  box-shadow: 0 24px 64px rgb(22 78 144 / 11%), 0 8px 22px rgb(15 23 42 / 4%);
  backdrop-filter: blur(16px);
}
.login-card-heading { margin-bottom: 30px; text-align: center; }
.login-card-heading h2 {
  margin: 0;
  color: var(--login-ink);
  font-size: 30px;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: -.04em;
}
.login-card-heading p { margin: 10px 0 0; color: var(--login-muted); font-size: 14px; }
.login-form { display: grid; gap: 17px; }
.login-field { position: relative; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.login-field-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 16px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #94a3b8;
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 180ms ease;
}
.login-field-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-field:focus-within .login-field-icon { color: var(--login-blue); }
.login-form input {
  min-height: 56px;
  padding: 0 16px 0 48px;
  color: var(--login-ink);
  background: #f8fafc;
  border: 1px solid #dce4ee;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 550;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.login-form input::placeholder { color: #9aa8b9; font-weight: 450; }
.login-form input:hover { border-color: #b9c7d8; background: #ffffff; }
.login-form input:focus {
  outline: 0;
  background: #ffffff;
  border-color: var(--login-blue);
  box-shadow: 0 0 0 4px rgb(22 119 255 / 13%);
}
.login-page .login-submit {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 7px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--login-blue);
  border-radius: 12px;
  box-shadow: 0 13px 28px rgb(22 119 255 / 25%);
  font-size: 15px;
  font-weight: 700;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.login-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms ease; }
.login-page .login-submit:hover { background: var(--login-blue-dark); box-shadow: 0 16px 34px rgb(22 119 255 / 30%); transform: translateY(-1px); }
.login-page .login-submit:hover svg { transform: translateX(3px); }
.login-page .login-submit:active { transform: translateY(1px) scale(.995); }
.login-page .login-submit:focus-visible { outline: 3px solid rgb(22 119 255 / 28%); outline-offset: 3px; }
.login-alert {
  display: grid;
  gap: 2px;
  margin: -8px 0 20px;
  padding: 12px 14px;
  color: #9b2c2c;
  background: #fff4f3;
  border: 1px solid #f3d3d0;
  border-radius: 10px;
  font-size: 13px;
}
.login-alert strong { color: #7f2525; font-size: 14px; }
.login-security { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; margin-top: 20px; color: #7b8798; }
.login-security p { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; font-weight: 600; }
.login-security p svg { width: 16px; height: 16px; color: #13945e; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.login-security small { color: #9aa6b5; font-size: 11px; }
.login-intro,
.login-card-frame { animation: login-rise 520ms cubic-bezier(.22, .8, .32, 1) both; }
.login-card-frame { animation-delay: 80ms; }
@keyframes login-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .login-layout { width: min(1050px, calc(100% - 48px)); grid-template-columns: minmax(0, 1fr) minmax(380px, 408px); gap: 52px; }
  .login-copy h1 { font-size: 47px; }
}
@media (max-width: 820px) {
  .login-layout { display: block; width: min(440px, calc(100% - 40px)); padding: 112px 0 48px; }
  .login-intro { display: none; }
  .login-access { position: relative; }
  .login-access-brand { position: absolute; top: -80px; left: 0; display: flex; }
  .login-page .brand-emblem { width: 46px; height: 46px; flex-basis: 46px; }
  .login-page .brand-emblem img { width: 64px; height: 64px; transform: translate(-9px, -9px); }
}
@media (max-width: 480px) {
  .login-layout { width: calc(100% - 32px); padding-top: 100px; }
  .login-access-brand { top: -72px; left: 2px; }
  .login-card { padding: 30px 22px 32px; border-radius: 20px; }
  .login-card-heading { margin-bottom: 26px; }
  .login-card-heading h2 { font-size: 26px; }
  .login-card-frame::before { inset: -5px 14px auto; }
}
@media (prefers-reduced-motion: reduce) {
  .login-intro,
  .login-card-frame { animation: none; }
  .login-page *,
  .login-page *::before,
  .login-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .page-heading { align-items: start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
}
