:root {
  color-scheme: dark;
  font-family: Inter, "Pretendard", system-ui, sans-serif;
  background: #070b14;
  color: #e9efff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #070b14; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 18% -5%, rgba(61, 109, 255, .19), transparent 34%), radial-gradient(circle at 94% 18%, rgba(96, 61, 255, .1), transparent 28%); }
header, main { position: relative; width: min(1240px, 92vw); margin: auto; }
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 28px 0 22px; gap: 20px; }
.brand, .header-actions, .status-line, .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #4c7dff, #7558ff); box-shadow: 0 8px 24px rgba(70, 100, 255, .3); font-size: 13px; font-weight: 800; letter-spacing: -.5px; }
h1 { margin: 3px 0 0; font-size: 24px; letter-spacing: -.8px; }
h2 { margin: 4px 0 14px; font-size: 19px; letter-spacing: -.35px; }
p { margin: 4px 0; color: #93a1bc; line-height: 1.6; }
.eyebrow { margin: 0; color: #7fa2ff; font-size: 10px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.pill { padding: 7px 10px; border: 1px solid #27344d; border-radius: 999px; color: #aab8d2; background: rgba(20, 29, 47, .9); font-size: 11px; font-weight: 700; }
.pill.mode { color: #a9c3ff; border-color: #314d86; }
.pill.good { color: #7ff1bd; border-color: #1c604c; background: #102e29; }
.pill.danger { color: #ffb0bc; border-color: #783244; background: #3d1a26; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; overflow: hidden; padding: 22px 25px; border: 1px solid #263450; border-radius: 18px; background: linear-gradient(120deg, rgba(22, 36, 62, .95), rgba(19, 25, 44, .84)); box-shadow: 0 14px 38px rgba(0, 0, 0, .2); }
.hero h2 { margin: 6px 0 4px; font-size: 25px; }
.hero-metric { min-width: 110px; padding-left: 24px; border-left: 1px solid #34425b; text-align: right; }
.hero-metric span, .hero-metric small { display: block; color: #8f9cb4; font-size: 11px; }
.hero-metric strong { color: #b5caff; font-size: 36px; }
.hero-metric small { display: inline; margin-left: 3px; }
.cards, .grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.grid { grid-template-columns: .86fr 1.14fr; margin-top: 14px; }
.card, .panel { border: 1px solid #212e46; background: rgba(15, 23, 39, .9); box-shadow: 0 10px 28px rgba(0, 0, 0, .16); }
.card { position: relative; overflow: hidden; min-height: 130px; border-radius: 15px; padding: 19px; }
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: #6089ff; }
.accent-violet::before { background: #9c7aff; }.accent-cyan::before { background: #59cee3; }.accent-green::before { background: #58d69a; }
.card span, .card small { display: block; color: #8d9bb3; font-size: 12px; }
.card strong { display: block; margin: 13px 0 8px; color: #f4f7ff; font-size: 27px; letter-spacing: -.7px; }
.panel { margin-top: 14px; border-radius: 15px; padding: 19px; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 9px; padding: 10px 13px; color: #07101e; background: linear-gradient(135deg, #7aa7ff, #688cff); box-shadow: 0 6px 16px rgba(70, 105, 255, .16); font-weight: 800; }
button:hover { filter: brightness(1.1); }
button.secondary { color: #dbe6ff; border-color: #304665; background: #213450; box-shadow: none; }
button.danger { color: #ffe4e8; border-color: #923a50; background: #852d42; box-shadow: none; }
button.ghost { color: #aab9d3; border-color: #28364f; background: transparent; box-shadow: none; }
button.small { padding: 7px 10px; font-size: 11px; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
label { color: #a9b6cd; font-size: 12px; font-weight: 700; }
input { width: 100%; margin-top: 6px; border: 1px solid #2d3f5e; border-radius: 8px; padding: 10px; color: #edf3ff; outline: none; background: #0b1424; }
input:focus { border-color: #658fff; box-shadow: 0 0 0 3px rgba(77, 122, 255, .14); }
.note, .subtle { color: #7f8da7; font-size: 12px; }
.positive { color: #78efb8 !important; }.negative { color: #ff96a7 !important; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 8px; border-bottom: 1px solid #202d44; text-align: left; white-space: nowrap; }
th { color: #7485a3; font-size: 10px; letter-spacing: .7px; text-transform: uppercase; }
td { color: #d5def0; }
tbody tr:hover { background: rgba(68, 99, 155, .08); }
.login-body { display: grid; min-height: 100vh; place-items: center; }
.login-shell { display: grid; grid-template-columns: 1.1fr .9fr; width: min(900px, 92vw); overflow: hidden; border: 1px solid #263552; border-radius: 22px; background: rgba(12, 19, 33, .95); box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.login-intro { position: relative; min-height: 470px; overflow: hidden; padding: 52px; background: linear-gradient(145deg, rgba(34, 66, 128, .62), rgba(20, 29, 53, .7)); }
.login-intro h1 { margin-top: 12px; font-size: 45px; }
.login-copy { max-width: 390px; margin-top: 20px; }
.login-orbit span { position: absolute; right: -145px; bottom: -170px; width: 410px; height: 410px; border: 1px solid rgba(126, 163, 255, .25); border-radius: 50%; }
.login-orbit span:nth-child(2) { right: -95px; bottom: -120px; width: 310px; height: 310px; }.login-orbit span:nth-child(3) { right: -45px; bottom: -70px; width: 210px; height: 210px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.login-card .brand-mark { margin-bottom: 24px; }
.login-form { display: grid; gap: 14px; margin-top: 20px; }
.login-footnote { margin-top: 20px; color: #74839e; font-size: 11px; }
.form-error { margin-top: 14px; padding: 10px; border: 1px solid #713245; border-radius: 8px; color: #ffabb8; background: #351923; font-size: 12px; }
@media (max-width: 820px) {
  .app-header, .controls { align-items: start; flex-direction: column; }
  .cards, .grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { display: none; }
  .login-card { padding: 34px 28px; }
}
