:root {
  --blue: #0b3d91;
  --blue-deep: #072b67;
  --blue-bright: #1558c4;
  --ink: #111827;
  --muted: #697386;
  --line: #dce2ea;
  --soft: #f4f7fb;
  --white: #ffffff;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

button, input { font: inherit; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(500px, .95fr); }

.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 54px clamp(46px, 6vw, 96px) 46px;
  color: var(--white);
  background: linear-gradient(145deg, #0c43a1 0%, #082d6d 72%, #061f4c 100%);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -24% 12%;
  height: 55%;
  z-index: -1;
  opacity: .5;
  background: repeating-linear-gradient(120deg, transparent 0 40px, rgba(255,255,255,.035) 41px 42px);
  transform: skewY(-9deg);
}

.brand-logo { width: min(310px, 70%); height: auto; padding: 10px 12px; object-fit: contain; object-position: left center; background: var(--white); border-radius: 10px; box-shadow: 0 12px 30px rgba(2, 18, 45, .14); }

.brand-message { margin: auto 0; max-width: 600px; padding: 80px 0; }
.eyebrow { margin: 0 0 16px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow-light { color: #aac7ff; }
.brand-message h1 { margin: 0; max-width: 620px; font-size: clamp(46px, 5vw, 74px); line-height: .98; letter-spacing: -.055em; font-weight: 760; }
.brand-message > p:last-child { max-width: 520px; margin: 30px 0 0; color: #d7e4fb; font-size: 18px; line-height: 1.65; }
.server-status { display: flex; align-items: center; gap: 11px; color: #c9daf8; font-size: 13px; font-weight: 600; }
.server-status span { width: 8px; height: 8px; border-radius: 50%; background: #72e7aa; box-shadow: 0 0 0 5px rgba(114,231,170,.12); }

.brand-orbit { position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.orbit-one { width: 520px; height: 520px; right: -240px; top: -190px; }
.orbit-two { width: 340px; height: 340px; right: -150px; top: -100px; }

.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 54px clamp(32px, 7vw, 110px) 30px; background: #fbfcfe; }
.login-card { width: min(100%, 430px); }
.mobile-brand { display: none; }
.login-card h2 { margin: 0; color: #111827; font-size: clamp(34px, 3vw, 44px); line-height: 1.1; letter-spacing: -.04em; }
.intro { margin: 15px 0 40px; color: var(--muted); font-size: 15px; line-height: 1.65; }

form label { display: block; margin: 0 0 9px; font-size: 13px; font-weight: 700; color: #2e3746; }
.label-row { margin-top: 22px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; top: 50%; left: 16px; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: #8490a3; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.input-wrap input { width: 100%; height: 54px; padding: 0 50px 0 48px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 11px; outline: 0; transition: border-color .18s, box-shadow .18s, transform .18s; }
.input-wrap input::placeholder { color: #9aa4b3; }
.input-wrap input:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 4px rgba(21,88,196,.11); }
.password-toggle { position: absolute; top: 50%; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; transform: translateY(-50%); color: #748094; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.password-toggle:hover { color: var(--blue); background: #f0f4fa; }
.password-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form-error { min-height: 21px; margin: 12px 0 6px; color: var(--danger); font-size: 13px; line-height: 1.5; }

.primary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 55px; padding: 0 22px; color: var(--white); background: var(--blue); border: 0; border-radius: 11px; box-shadow: 0 9px 22px rgba(11,61,145,.2); font-weight: 750; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.primary-button:hover { background: #0a347c; transform: translateY(-1px); box-shadow: 0 12px 26px rgba(11,61,145,.25); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { cursor: wait; opacity: .7; }
.primary-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.primary-button.is-loading span::after { content: "…"; }

.privacy-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 30px; color: #7b8798; font-size: 12px; }
.privacy-note svg { width: 18px; fill: none; stroke: #5f6d81; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.copyright { margin: auto 0 0; padding-top: 44px; color: #9aa3b1; font-size: 11px; letter-spacing: .03em; }

.home-page { min-height: 100vh; background: #f5f7fb; }
.home-header { height: 86px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 6vw, 84px); background: var(--white); border-bottom: 1px solid #e5e9f0; }
.home-header img { width: 180px; height: 64px; object-fit: contain; object-position: left center; }
.ghost-button { padding: 11px 17px; color: var(--blue); background: #eef4ff; border: 0; border-radius: 9px; font-weight: 700; cursor: pointer; }
.home-main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: clamp(70px, 10vw, 120px) 0; }
.welcome-block { max-width: 740px; }
.welcome-block h1 { margin: 0; font-size: clamp(44px, 7vw, 76px); line-height: 1; letter-spacing: -.055em; }
.welcome-block > p:last-child { color: var(--muted); font-size: 18px; }
.status-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; margin-top: 68px; }
.status-card { position: relative; min-height: 250px; padding: 34px; overflow: hidden; background: var(--white); border: 1px solid #e3e8ef; border-radius: 18px; }
.status-card.featured { color: var(--white); background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%); border-color: transparent; }
.status-card h2 { margin: 6px 0 10px; font-size: 28px; letter-spacing: -.03em; }
.status-card p:last-child { max-width: 420px; color: var(--muted); line-height: 1.6; }
.status-card.featured p:last-child { color: #d2def3; }
.card-label { margin: 52px 0 0; color: #8b96a7; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.featured .card-label { color: #a9c6fa; }
.status-icon { position: absolute; top: 34px; left: 34px; width: 12px; height: 12px; border-radius: 50%; background: #6ee7a8; box-shadow: 0 0 0 8px rgba(110,231,168,.12); }
.number-mark { position: absolute; right: 24px; top: 15px; color: #eff2f6; font-size: 82px; font-weight: 800; letter-spacing: -.08em; }

@media (max-width: 860px) {
  .login-shell { display: block; }
  .brand-panel { display: none; }
  .login-panel { min-height: 100vh; padding: 42px 24px 24px; }
  .mobile-brand { display: block; margin-bottom: 70px; }
  .mobile-brand img { width: 240px; height: auto; object-fit: contain; object-position: left center; }
  .copyright { margin-top: auto; }
  .status-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .login-panel { justify-content: flex-start; }
  .mobile-brand { margin-bottom: 48px; }
  .mobile-brand img { width: 200px; height: auto; }
  .login-card h2 { font-size: 34px; }
  .home-header img { width: 155px; height: 54px; }
  .home-main { width: min(100% - 32px, 1120px); padding-top: 64px; }
  .status-card { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
