:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #eff3f7;
  background: #080714;
  --accent: #371edc;
  --accent-light: #b3a6ff;
  --muted: #aaa7be;
  --line: #2a273e;
  --panel: #121020;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
header {
  display: flex; align-items: center; gap: 24px;
  padding: 22px max(5%, calc((100vw - 1400px) / 2));
  border-bottom: 1px solid var(--line); background: #080714;
}
.brand { display: inline-flex; flex: none; text-decoration: none; }
.brand img { width: 166px; height: auto; display: block; }
.tag, .badge {
  display: inline-flex; align-items: center; gap: 8px;
  color: #d1cbe7; border: 1px solid #322953; background: #171229;
  border-radius: 30px; padding: 7px 12px; font-size: 11px; font-weight: 500;
}
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #9280ff; }
#identity { margin-left: auto; color: var(--muted); display: flex; gap: 16px; align-items: center; font-size: 13px; }
main { max-width: 1400px; margin: auto; padding: 38px 5% 56px; min-height: calc(100vh - 165px); }
h1 { font-size: clamp(42px, 4.5vw, 70px); line-height: 1.04; letter-spacing: -2.7px; font-weight: 800; margin: 24px 0; }
h2 { font-size: 30px; letter-spacing: -1px; font-weight: 750; margin: 20px 0 26px; }
h3 { font-size: 16px; font-weight: 650; margin: 0 0 18px; line-height: 1.4; }
.eyebrow, .panel-kicker { font-size: 10px; font-weight: 650; letter-spacing: 2px; color: var(--accent-light); line-height: 1.6; }
p, .hint { color: var(--muted); line-height: 1.7; font-size: 14px; }
.login { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .85fr); gap: clamp(40px, 7vw, 100px); align-items: center; min-height: 660px; }
.login-copy { position: relative; min-width: 0; padding-top: 28px; }
h1 span { color: #b3a6ff; }
.login-description { max-width: 480px; font-size: 15px; }
.brand-scene { position: relative; height: 280px; overflow: hidden; margin-top: 26px; }
.orb {
  position: absolute; width: 225px; height: 225px; top: 18px; right: 15%; border-radius: 50%;
  background: radial-gradient(ellipse at 30% 20%, #3267d7 0, #302174 25%, #511ebc 45%, #19113b 70%, #090719 95%);
  box-shadow: inset -20px -20px 35px #08071488;
}
.scene-sign { position: absolute; width: 240px; left: 7%; top: 79px; transform: rotate(-12deg); filter: drop-shadow(0 14px 40px #371edc66); }
.orbit { position: absolute; border: 1px solid #5134e77a; width: 440px; height: 132px; border-radius: 50%; left: 8%; top: 65px; transform: rotate(-23deg); }
.orbit-two { transform: rotate(-23deg) translateY(18px); border-color: #371edc44; }
.scene-caption { position: absolute; bottom: 12px; left: 0; font-size: 10px; letter-spacing: 2px; color: #d0c9ef; }
.scene-caption span { display: block; margin-top: 8px; color: #827b9a; font-size: 9px; }
.login-panel { padding: 38px; background: #f2f1f7; border-radius: 16px; color: #151123; border: 1px solid white; box-shadow: 0 24px 80px #0004; }
.login-panel .panel-kicker { color: #371edc; }
.login-panel h2 { font-size: 28px; margin: 18px 0 10px; }
.login-panel p { color: #696578; font-size: 13px; margin-bottom: 26px; }
.login-panel form { display: grid; gap: 20px; }
.login-panel label { color: #51495f; }
.login-panel input { color-scheme: light; background: white; color: #151123; border-color: #d9d5e4; padding: 14px; }
.login-panel input::placeholder { color: #898193; }
.login-panel button { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 15px 18px; }
.login-panel button span { font-size: 20px; line-height: 1; }
.login-note { display: flex; align-items: center; gap: 8px; color: #746b85; font-size: 11px; margin-top: 30px; border-top: 1px solid #dfdbe6; padding-top: 20px; }
#login-error { color: #a21c39; font-size: 13px; line-height: 1.6; margin-top: 18px; }
#login-error:empty { display: none; }
label { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 12px; }
input, select, textarea { background: #0c0a17; color: #eff3f7; border: 1px solid #39324b; padding: 12px; border-radius: 7px; width: 100%; font: inherit; font-size: 13px; min-height: 44px; }
input::placeholder, textarea::placeholder { color: #7b748d; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9381ff; outline-offset: 2px; }
button { background: var(--accent); color: white; border: 1px solid transparent; border-radius: 7px; padding: 12px 18px; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; min-height: 44px; transition: background .15s, border-color .15s; }
button:hover { background: #4b32ec; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #b3a6ff; outline-offset: 4px; }
button:disabled { opacity: .5; cursor: wait; }
.secondary { background: #1b162b; color: #e2dbef; border-color: #39314a; }
.secondary:hover { background: #2a203f; }
nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 38px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
nav button { background: transparent; color: #aaa7be; border: 1px solid transparent; padding: 11px 18px; }
nav button:hover { background: #1d1730; border-color: #33264f; }
nav button.active { background: #371edc; color: white; border-color: #6049ec; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 24px; margin-bottom: 20px; min-width: 0; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.table-wrap { overflow: auto; margin: 18px 0 6px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { text-align: left; color: #9690a9; font-weight: 500; font-size: 11px; }
td, th { border-bottom: 1px solid var(--line); padding: 14px 12px; white-space: nowrap; }
tbody tr:hover { background: #1a1529; }
.warning { color: #ffbd91; }
.error { color: #ffb0c0; }
.success { color: #9ce2bb; }
#notice { position: sticky; top: 10px; z-index: 2; border: 1px solid #4a3c75; border-radius: 8px; background: #24183d; color: #e6def9; padding: 14px 18px; margin-bottom: 24px; display: none; font-size: 13px; }
#notice.show { display: block; }
#notice.error { background: #391824; border-color: #673148; }
footer { border-top: 1px solid var(--line); padding: 24px 5%; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 10px; color: #8e87a2; }
.footer-brand { font-weight: 800; color: #d7d1e6; letter-spacing: .6px; }
.footer-label { margin-left: auto; letter-spacing: 1.7px; font-size: 9px; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.summary .card { position: relative; padding: 24px; overflow: hidden; }
.summary .card::after { content: ''; position: absolute; width: 62px; height: 29px; right: 20px; bottom: 26px; background: #371edc; clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 75%); opacity: .45; }
.summary h3 { color: #b4adc9; font-size: 12px; font-weight: 500; }
.number { font-size: 46px; font-weight: 750; letter-spacing: -2px; color: #eff3f7; line-height: 1.2; }
.empty { padding: 18px 0; color: var(--muted); font-size: 13px; }
details { margin: 14px 0; }
summary { cursor: pointer; color: #b3a6ff; padding: 10px 0; font-size: 13px; }
[hidden] { display: none !important; }
[aria-busy="true"] { opacity: .65; cursor: progress; }
@media (max-width: 1050px) {
  .login { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(310px, .9fr); }
  .login-panel { padding: 28px; }
  h1 { font-size: 48px; letter-spacing: -2px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  header { flex-wrap: wrap; padding: 18px; gap: 16px; }
  .brand img { width: 135px; }
  .tag { font-size: 10px; margin-left: auto; }
  #identity:not(:empty) { width: 100%; margin-left: 0; padding-top: 6px; justify-content: space-between; }
  #identity:empty { display: none; }
  main { padding: 28px 18px 40px; }
  h1 { font-size: clamp(36px, 8vw, 52px); letter-spacing: -1.5px; }
  h2 { font-size: 26px; }
  .login { grid-template-columns: 1fr; gap: 26px; min-height: auto; }
  .login-copy { padding-top: 8px; }
  .login-description { font-size: 14px; }
  .brand-scene { display: none; }
  .login-panel { padding: 26px; max-width: 480px; width: 100%; }
  .login-panel h2 { font-size: 25px; }
  .card { padding: 20px; }
  .grid { grid-template-columns: 1fr; gap: 0; }
  .summary { gap: 12px; }
  .summary .card { padding: 18px; }
  .summary .card::after { width: 38px; right: 14px; opacity: .3; }
  .number { font-size: 38px; }
  nav { gap: 4px; margin-bottom: 28px; padding-bottom: 16px; }
  nav button { padding: 10px 12px; }
  .row > * { min-width: 160px; }
  footer { padding: 24px 18px; gap: 12px; line-height: 1.6; }
  .footer-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
