:root {
  color-scheme: dark;
  --bg: #06101d;
  --bg-soft: #0a1727;
  --panel: rgba(13, 28, 46, .82);
  --panel-solid: #0d1c2e;
  --line: rgba(144, 170, 197, .17);
  --line-strong: rgba(76, 201, 240, .34);
  --text: #e9f2fb;
  --muted: #8ea5ba;
  --cyan: #31d5ff;
  --cyan-soft: rgba(49, 213, 255, .12);
  --blue: #3586ff;
  --green: #35d39a;
  --amber: #ffbd5a;
  --danger: #ff6b7d;
  --shadow: 0 24px 80px rgba(0, 0, 0, .32);
  font-family: Inter, "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; background-image: radial-gradient(circle at 78% 10%, rgba(53, 134, 255, .15), transparent 31%), radial-gradient(circle at 14% 88%, rgba(49, 213, 255, .08), transparent 27%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(420px, .65fr); }
.login-hero { position: relative; min-height: 680px; padding: 52px clamp(48px, 7vw, 112px); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: linear-gradient(135deg, rgba(6, 16, 29, .96), rgba(8, 27, 47, .86)); }
.login-hero::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(80, 180, 230, .25) 1px, transparent 1px), linear-gradient(90deg, rgba(80, 180, 230, .25) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(90deg, #000, transparent); }
.brand-lockup, .side-brand { position: relative; display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 800; letter-spacing: .13em; }
.brand-mark { display: inline-grid; place-items: center; width: 45px; height: 45px; border: 1px solid var(--line-strong); border-radius: 13px; color: #04131f; background: linear-gradient(135deg, #d5f7ff, var(--cyan)); box-shadow: 0 0 40px rgba(49, 213, 255, .22); font: 900 24px/1 "Segoe UI", sans-serif; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; font-size: 20px; }
.hero-copy { position: relative; max-width: 680px; }
.hero-copy h1 { margin: 0; font-size: clamp(48px, 5.8vw, 88px); line-height: 1.02; letter-spacing: -.055em; }
.hero-copy h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px rgba(133, 222, 255, .8); }
.hero-copy > p:last-child { max-width: 560px; margin: 26px 0 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.hero-metrics { position: relative; display: flex; gap: 42px; color: var(--muted); font-size: 12px; }
.hero-metrics span { display: grid; gap: 4px; }
.hero-metrics b { color: var(--text); font-size: 25px; letter-spacing: -.03em; }
.orbit { position: absolute; right: -180px; bottom: -210px; width: 620px; height: 620px; border: 1px solid rgba(49, 213, 255, .16); border-radius: 50%; }
.orbit::before, .orbit::after { content: ""; position: absolute; border: 1px solid rgba(49, 213, 255, .12); border-radius: 50%; inset: 82px; }
.orbit::after { inset: 165px; }
.orbit i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.orbit i:nth-child(1) { left: 104px; top: 92px; }.orbit i:nth-child(2) { left: 32px; top: 310px; }.orbit i:nth-child(3) { left: 280px; top: 44px; }

.login-card { align-self: center; width: min(440px, calc(100% - 64px)); margin: 32px auto; padding: 44px; border: 1px solid var(--line); border-radius: 24px; background: rgba(9, 22, 37, .82); box-shadow: var(--shadow); backdrop-filter: blur(22px); }
.login-card h2 { margin: 0; font-size: 31px; letter-spacing: -.03em; }
.form-intro { margin: 10px 0 30px; color: var(--muted); line-height: 1.65; }
.secure-chip { float: right; display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; }
.secure-chip i, .side-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
label { display: grid; gap: 8px; margin: 17px 0; color: #bed0e1; font-size: 13px; font-weight: 650; }
input, select { width: 100%; min-height: 44px; padding: 0 14px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; outline: none; background: rgba(3, 13, 24, .72); transition: .18s ease; }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
input::placeholder { color: #62788d; }
.trust-note { display: block; margin-top: 18px; color: #6e8498; text-align: center; }
.form-error { min-height: 20px; color: var(--danger); font-size: 13px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; color: var(--text); font-weight: 720; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { color: #03131e; background: linear-gradient(135deg, var(--cyan), #6be5ff); box-shadow: 0 8px 24px rgba(49, 213, 255, .18); }
.button.secondary { border-color: var(--line); background: rgba(23, 43, 64, .76); }
.button.secondary:hover { border-color: var(--line-strong); }
.button.danger { color: var(--danger); border-color: rgba(255, 107, 125, .25); background: rgba(255, 107, 125, .08); }
.button.wide { width: 100%; min-height: 48px; margin-top: 10px; justify-content: space-between; padding: 0 20px; }

.app { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 17px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(5, 14, 25, .94); }
.side-brand { padding: 0 8px 25px; border-bottom: 1px solid var(--line); }
.side-brand div { display: grid; gap: 3px; }.side-brand b { letter-spacing: .18em; }.side-brand small { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
nav { display: grid; gap: 7px; margin-top: 24px; }
nav button { min-height: 45px; padding: 0 13px; display: flex; align-items: center; gap: 13px; color: var(--muted); border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; }
nav button span { width: 23px; color: #678198; font-size: 18px; text-align: center; }
nav button b { font-size: 13px; }
nav button:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
nav button.active { color: var(--text); border-color: rgba(49, 213, 255, .17); background: linear-gradient(90deg, rgba(49, 213, 255, .14), rgba(49, 213, 255, .03)); }
nav button.active span { color: var(--cyan); }
.side-status { margin-top: auto; padding: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(15, 33, 52, .7); }
.side-status div { display: grid; gap: 2px; }.side-status b { font-size: 11px; }.side-status small { color: var(--muted); font-size: 9px; }
main { width: 100%; max-width: 1660px; margin: 0 auto; padding: 0 clamp(24px, 3.5vw, 58px) 54px; overflow: hidden; }
.topbar { height: 104px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.admin-chip { display: flex; align-items: center; gap: 10px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: rgba(14, 30, 48, .68); }
.admin-chip > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--cyan); background: var(--cyan-soft); font-weight: 800; }
.admin-chip div { display: grid; min-width: 92px; }.admin-chip b { font-size: 12px; }.admin-chip small { color: var(--muted); font-size: 10px; }
.admin-chip button { padding: 7px 10px; color: var(--muted); border: 0; border-left: 1px solid var(--line); background: transparent; }
.page { display: none; padding-top: 31px; }.page.active-page { display: block; animation: enter .24s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.hero-panel { min-height: 178px; padding: 34px 38px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; border: 1px solid var(--line-strong); border-radius: 18px; background: linear-gradient(112deg, rgba(18, 54, 78, .78), rgba(12, 29, 48, .72)); box-shadow: var(--shadow); }
.hero-panel::after { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; border: 1px solid rgba(49, 213, 255, .16); border-radius: 50%; }
.hero-panel h3 { margin: 0 0 10px; font-size: 27px; }.hero-panel p:last-child { margin: 0; color: var(--muted); }
.pulse { position: relative; z-index: 1; width: 88px; height: 88px; display: grid; place-items: center; border: 1px solid rgba(53, 211, 154, .28); border-radius: 50%; color: var(--green); background: rgba(53, 211, 154, .07); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.pulse i { position: absolute; inset: 10px; border: 1px solid rgba(53, 211, 154, .22); border-radius: 50%; animation: breathe 2.2s ease infinite; }
@keyframes breathe { 50% { transform: scale(1.17); opacity: .25; } }
.stats { margin: 20px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stats article, .panel, .vehicle-card, .table-wrap { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.stats article { min-height: 132px; padding: 22px; display: grid; align-content: space-between; }
.stats span { color: var(--muted); font-size: 12px; }.stats strong { font-size: 34px; letter-spacing: -.045em; }.stats small { color: #627b91; }
.panel { padding: 25px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.panel-heading h3 { margin: 0; font-size: 22px; }.panel-heading p:last-child { margin: 8px 0 0; color: var(--muted); }
.badge { padding: 7px 11px; color: var(--green); border: 1px solid rgba(53, 211, 154, .2); border-radius: 99px; background: rgba(53, 211, 154, .08); font-size: 10px; font-weight: 760; }
.key-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.key-grid span { padding: 13px 14px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(4, 15, 27, .45); }
.key-grid b { color: #c7d8e7; font: 650 12px/1 ui-monospace, Consolas, monospace; }.key-grid small { color: #627b91; }
.toolbar { display: grid; grid-template-columns: minmax(220px, 440px) auto; gap: 9px; margin-bottom: 15px; }.toolbar input { min-height: 40px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; vertical-align: middle; }
th { color: #6f879c; background: rgba(4, 14, 25, .42); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; } tbody tr:hover { background: rgba(49, 213, 255, .025); }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.muted { color: var(--muted); }.empty { padding: 52px; color: var(--muted); text-align: center; }
.tag { display: inline-flex; padding: 5px 8px; border-radius: 99px; color: var(--green); background: rgba(53, 211, 154, .1); font-size: 10px; font-weight: 750; }.tag.off { color: var(--danger); background: rgba(255, 107, 125, .1); }
.action { padding: 6px 9px; color: var(--cyan); border: 0; background: transparent; font-size: 11px; }.action.danger { color: var(--danger); }
.button.compact { min-height: 34px; padding: 0 12px; font-size: 11px; white-space: nowrap; }
.sessions-table { min-width: 1080px; }
.live-tag { margin-bottom: 7px; gap: 6px; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); animation: breathe 1.8s ease infinite; }
.session-warning { margin-bottom: 16px; padding: 15px 17px; display: flex; align-items: center; gap: 13px; border: 1px solid rgba(255, 189, 90, .24); border-radius: 12px; background: rgba(255, 189, 90, .07); }
.session-warning > span { flex: 0 0 30px; height: 30px; display: grid; place-items: center; color: #1e1403; border-radius: 50%; background: var(--amber); font-weight: 900; }
.session-warning div { display: grid; gap: 3px; }.session-warning b { color: #ffe0a9; font-size: 12px; }.session-warning small { color: #a99370; line-height: 1.5; }
.vehicle-list { display: grid; gap: 12px; }
.vehicle-card { padding: 20px 21px; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(450px, 1.7fr) auto; gap: 24px; align-items: center; }
.vehicle-card h4 { margin: 6px 0; font-size: 17px; }.vehicle-card p { margin: 0; color: var(--muted); font-size: 11px; }
.secret-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.secret-summary span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(4, 14, 24, .4); }
.secret-summary small { display: block; color: #688196; font-size: 8px; }.secret-summary code { color: #a9bdcf; font-size: 10px; }
.vehicle-actions { display: flex; gap: 5px; }

dialog { width: min(760px, calc(100vw - 34px)); max-height: calc(100vh - 38px); padding: 0; color: var(--text); border: 1px solid var(--line-strong); border-radius: 18px; background: #0b1929; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(1, 7, 14, .72); backdrop-filter: blur(5px); }
dialog form { max-height: calc(100vh - 40px); padding: 26px; overflow: auto; }
.dialog-head { position: sticky; top: -26px; z-index: 3; margin: -26px -26px 20px; padding: 24px 26px 18px; display: flex; justify-content: space-between; background: rgba(11, 25, 41, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.dialog-head h3 { margin: 0; font-size: 23px; }.icon-button { width: 35px; height: 35px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: transparent; font-size: 21px; }
.dialog-actions { position: sticky; bottom: -26px; margin: 22px -26px -26px; padding: 17px 26px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: rgba(11, 25, 41, .96); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }.form-grid .full { grid-column: 1 / -1; }
.toggle-row { min-height: 44px; padding: 0 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(3, 13, 24, .72); }.toggle-row input { width: auto; min-height: auto; }
.keys-editor { grid-column: 1 / -1; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }.keys-editor > p { margin: 0 0 5px; color: var(--muted); font-size: 12px; }.keys-editor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
#toast { position: fixed; left: 50%; bottom: 27px; z-index: 20; padding: 11px 17px; color: #062015; border: 1px solid rgba(53, 211, 154, .4); border-radius: 9px; background: #7ce8c1; box-shadow: var(--shadow); font-size: 12px; font-weight: 750; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.error { color: #2a080d; border-color: rgba(255, 107, 125, .45); background: #ff9aaa; }

@media (max-width: 1050px) {
  .login-shell { grid-template-columns: 1fr; }.login-hero { min-height: 440px; }.hero-copy h1 { font-size: 55px; }.login-card { margin: 46px auto; }
  .stats { grid-template-columns: 1fr 1fr; }.vehicle-card { grid-template-columns: 1fr; }.secret-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1320px) and (min-width: 1051px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }.sidebar { padding: 18px 10px; }.side-brand div, nav b, .side-status div { display: none; }.side-brand { justify-content: center; padding: 0 0 18px; }nav button { justify-content: center; padding: 0; }.side-status { justify-content: center; }
  main { padding: 0 16px 35px; }.topbar { height: 88px; }.admin-chip div { display: none; }.admin-chip { gap: 4px; }.stats { grid-template-columns: 1fr; }.key-grid, .keys-editor-grid { grid-template-columns: 1fr; }.panel-heading { align-items: stretch; flex-direction: column; }.toolbar { grid-template-columns: 1fr auto; }.form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.login-hero { padding: 34px 30px; }.hero-metrics { gap: 18px; }.login-card { width: calc(100% - 28px); padding: 30px; }
}
