:root {
  color: #071a2b;
  background: #071a2b;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(520px, 1.22fr) minmax(420px, .78fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(34px, 4.5vw, 68px);
  color: #f5fbff;
  background:
    radial-gradient(circle at 72% 62%, rgb(73 166 200 / 19%), transparent 28%),
    radial-gradient(circle at 12% 10%, rgb(140 201 232 / 10%), transparent 25%),
    linear-gradient(145deg, #071a2b 0%, #0c3b5e 58%, #092b46 100%);
}

.brand-panel::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 2.4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2.4%) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  mask-image: linear-gradient(to bottom right, black, transparent 80%);
}

.brand-panel::after {
  position: absolute;
  top: -20%;
  right: -34%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgb(140 201 232 / 10%);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgb(140 201 232 / 2.5%), 0 0 0 140px rgb(140 201 232 / 1.5%);
  content: "";
}

.brand-lockup, .brand-story, .capital-orbit, .brand-footnote { position: relative; z-index: 1; }

.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-lockup > div { display: grid; gap: 1px; }
.brand-lockup strong { font-family: Georgia, serif; font-size: 24px; letter-spacing: .025em; }
.brand-lockup > div > span { color: #a9c7d8; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }

.brand-mark { position: relative; display: grid; place-items: center; width: 41px; height: 41px; }
.brand-mark { border: 1px solid rgb(140 201 232 / 62%); border-radius: 50%; }
.brand-mark::before, .brand-mark::after { position: absolute; background: #8cc9e8; content: ""; }
.brand-mark::before { width: 1px; height: 31px; }
.brand-mark::after { width: 31px; height: 1px; }
.brand-core { width: 8px; height: 8px; border-radius: 50%; background: #49a6c8; box-shadow: 0 0 16px #49a6c8; }
.brand-route { position: absolute; width: 33px; height: 15px; border-top: 1px solid #8cc9e8; border-radius: 50%; transform: rotate(-32deg); }
.brand-route::after { position: absolute; top: -3px; right: -1px; width: 5px; height: 5px; border-top: 1px solid #8cc9e8; border-right: 1px solid #8cc9e8; content: ""; transform: rotate(24deg); }

.brand-story { margin-top: clamp(70px, 11vh, 128px); }
.eyebrow { margin: 0 0 18px; color: #8cc9e8; font-size: 12px; font-weight: 700; letter-spacing: .24em; }
.brand-story h1 { max-width: 760px; margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(38px, 4.5vw, 68px); font-weight: 400; line-height: 1.17; letter-spacing: -.045em; }
.brand-copy { margin: 28px 0 0; color: #bdd2df; font-size: 15px; line-height: 1.9; }

.capital-orbit { width: min(620px, 72%); margin: auto auto 0; transform: translate(8%, 3%); }
.capital-orbit svg { display: block; width: 100%; height: auto; overflow: visible; }
.horizon-line { fill: none; stroke: rgb(140 201 232 / 18%); stroke-width: 1; }
.horizon-main { stroke: rgb(140 201 232 / 34%); }
.horizon-faint { stroke-dasharray: 3 9; }
.route-line { fill: none; stroke: url(#route-line); stroke-width: 2; }
.route-pulse { fill: none; stroke: #8cc9e8; stroke-width: 1; stroke-dasharray: 3 10; opacity: .7; }
.compass-ring { fill: rgb(73 166 200 / 4%); stroke: rgb(140 201 232 / 46%); }
.compass-inner { stroke-dasharray: 2 6; opacity: .7; }
.compass-axis { fill: none; stroke: rgb(140 201 232 / 22%); stroke-width: 1; }
.compass-needle { fill: #8cc9e8; opacity: .92; }
.compass-south { fill: rgb(255 255 255 / 18%); }
.compass-point { fill: #8cc9e8; font-size: 9px; text-anchor: middle; }
.route-node { fill: #49a6c8; filter: drop-shadow(0 0 8px #49a6c8); }
.node-soft { fill: #8cc9e8; }
.route-arrow { fill: #8cc9e8; opacity: .88; }

.flow-label { position: absolute; display: flex; gap: 7px; align-items: center; color: #d8e8e3; font-size: 11px; letter-spacing: .08em; }
.flow-label span { color: #769eb5; font-size: 9px; }
.label-product { left: -1%; top: 47%; }
.label-sales { right: 4%; top: 22%; }
.label-cash { right: 10%; bottom: 8%; }
.label-reorder { left: 23%; top: 8%; }
.brand-footnote { margin: 6px 0 0; color: #6f99b0; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }

.form-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 44px clamp(32px, 6vw, 90px);
  background:
    radial-gradient(circle at 100% 0, rgb(140 201 232 / 16%), transparent 18rem),
    #eaf3f8;
}

.form-wrap { width: min(100%, 410px); }
.mobile-brand { display: none; }
.form-kicker { margin: 0 0 16px; color: #1f648a; font-size: 11px; font-weight: 800; letter-spacing: .22em; }
.form-wrap h2 { margin: 0; color: #071a2b; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(36px, 4vw, 50px); font-weight: 400; letter-spacing: -.035em; }
.form-intro { margin: 12px 0 40px; color: #3d5a70; font-size: 14px; }

#login-form { display: grid; }
#login-form > label { margin: 0 0 8px; color: #173a55; font-size: 12px; font-weight: 700; }
#login-form > .input-wrap + label { margin-top: 22px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; top: 50%; left: 16px; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: #6f8fa5; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; pointer-events: none; }
.input-wrap input { width: 100%; height: 54px; padding: 0 48px; border: 1px solid #c8dce6; border-radius: 9px; outline: none; background: rgb(255 255 255 / 90%); color: #071a2b; transition: border-color 140ms, box-shadow 140ms, background 140ms; }
.input-wrap input:hover { border-color: #a9c7d8; }
.input-wrap input:focus { border-color: #49a6c8; background: white; box-shadow: 0 0 0 4px rgb(73 166 200 / 14%); }

.password-toggle { position: absolute; top: 50%; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #6f8fa5; cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { background: #eaf3f8; color: #1f648a; }
.password-toggle svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.password-toggle[aria-pressed="true"] svg { opacity: .55; }

.login-message { min-height: 22px; margin: 12px 0 6px; color: #b14942; font-size: 12px; line-height: 1.45; }
.login-message.success { color: #1f648a; }
.noscript-note { margin: 12px 0 0; color: #b14942; font-size: 12px; line-height: 1.5; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 54px; padding: 0 21px; border: 0; border-radius: 9px; background: #071a2b; color: white; cursor: pointer; font-weight: 750; box-shadow: 0 12px 24px rgb(7 26 43 / 20%); transition: background 140ms, transform 140ms, box-shadow 140ms; }
.submit-button:hover { background: #0c3b5e; transform: translateY(-1px); box-shadow: 0 15px 30px rgb(7 26 43 / 24%); }
.submit-button:focus-visible, .password-toggle:focus-visible { outline: 3px solid rgb(73 166 200 / 35%); outline-offset: 2px; }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; }
.submit-button svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.security-note { display: flex; align-items: center; gap: 9px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #c8dce6; color: #3d5a70; font-size: 11px; }
.security-note span { color: #49a6c8; font-size: 8px; }
.logout-button { margin: 13px 0 0; padding: 0; border: 0; background: transparent; color: #3d5a70; cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.logout-button:hover { color: #0c3b5e; }
.logout-button:disabled { cursor: wait; opacity: .55; }
.support-note { margin: 10px 0 0; color: #3d5a70; font-size: 10px; }

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 320px; padding: 28px 30px; }
  .brand-lockup { display: none; }
  .brand-story { margin-top: 12px; }
  .brand-story h1 { font-size: clamp(30px, 8vw, 48px); }
  .brand-copy { margin-top: 16px; font-size: 13px; }
  .desktop-only, .brand-footnote { display: none; }
  .capital-orbit { position: absolute; right: -70px; bottom: -115px; width: 430px; margin: 0; opacity: .68; transform: none; }
  .flow-label { display: none; }
  .form-panel { min-height: calc(100vh - 320px); padding: 42px 26px 54px; }
  .mobile-brand { display: flex; align-items: baseline; gap: 9px; margin-bottom: 46px; color: #071a2b; font-family: Georgia, serif; font-size: 20px; }
  .mobile-brand span { color: #6f8fa5; font-family: Inter, "Segoe UI", sans-serif; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }
  .form-kicker { display: none; }
}

@media (max-width: 540px) {
  .brand-panel { min-height: 270px; padding: 24px; }
  .brand-story h1 { font-size: 32px; }
  .brand-copy { max-width: 90%; font-size: 12px; line-height: 1.7; }
  .capital-orbit { right: -112px; bottom: -125px; width: 390px; }
  .form-panel { min-height: calc(100vh - 270px); padding: 34px 22px 44px; }
  .mobile-brand { margin-bottom: 35px; }
  .form-intro { margin-bottom: 30px; }
}

@media (prefers-reduced-motion: no-preference) {
  .route-pulse { animation: route-travel 12s linear infinite; }
  .route-node { animation: beacon-pulse 2.8s ease-in-out infinite; }
}

@keyframes route-travel { to { stroke-dashoffset: -130; } }
@keyframes beacon-pulse { 0%, 100% { opacity: .62; } 50% { opacity: 1; } }
