:root {
  --bg: #07111c;
  --panel: rgba(15, 30, 45, .88);
  --panel-2: #10283a;
  --line: rgba(148, 177, 197, .15);
  --text: #f2f7f9;
  --muted: #88a0b2;
  --cyan: #46d9c6;
  --cyan-2: #1db09f;
  --amber: #ffbd66;
  --red: #ff6d78;
  --blue: #77b7ff;
  --shadow: 0 22px 55px rgba(0, 0, 0, .22);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% -10%, rgba(26, 119, 122, .25), transparent 32%), var(--bg); color: var(--text); font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.topbar { height: 78px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(5, 15, 25, .82); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand strong { display: block; font-size: 18px; letter-spacing: .08em; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .22em; margin-top: 4px; }
.brand-mark { width: 40px; height: 40px; border: 1px solid rgba(70, 217, 198, .5); border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 5px; background: rgba(70, 217, 198, .08); }
.brand-mark span { width: 7px; height: 22px; border: 2px solid var(--cyan); border-radius: 2px; transform: skewY(-20deg); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(255, 109, 120, .1); }
.status-pill.online i { background: var(--cyan); box-shadow: 0 0 0 5px rgba(70, 217, 198, .1); }
.ghost-btn, .primary-btn { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; color: var(--text); background: rgba(255,255,255,.035); transition: .2s ease; }
.logout-btn { border: 0; background: transparent; color: var(--muted); padding: 9px 4px 9px 8px; font-size: 12px; }
.logout-btn:hover { color: var(--text); }
.ghost-btn:hover { border-color: rgba(70, 217, 198, .45); background: rgba(70,217,198,.07); }
.primary-btn { background: var(--cyan); color: #04201d; font-weight: 750; border-color: var(--cyan); }
.primary-btn:hover { background: #6ce7d7; transform: translateY(-1px); }
main { width: min(1460px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 30px; }
.eyebrow, .section-kicker { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .23em; margin: 0 0 10px; }
h1 { font-size: clamp(34px, 5vw, 62px); letter-spacing: -.045em; margin: 0; line-height: 1.08; }
.subtitle { color: var(--muted); max-width: 650px; font-size: 15px; line-height: 1.75; margin: 18px 0 0; }
.clock-card { min-width: 190px; text-align: right; padding-bottom: 5px; }
.clock-card span, .clock-card small { display: block; color: var(--muted); font-size: 11px; }
.clock-card strong { display: block; font: 600 30px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--cyan); margin: 6px 0; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metrics article { position: relative; overflow: hidden; background: linear-gradient(135deg, rgba(19, 42, 59, .92), rgba(10, 25, 39, .92)); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; min-height: 132px; box-shadow: var(--shadow); }
.metrics article::after { content: ""; position: absolute; width: 90px; height: 90px; border: 1px solid rgba(119,183,255,.09); border-radius: 50%; right: -30px; bottom: -42px; }
.metrics article.accent { border-color: rgba(70,217,198,.27); background: linear-gradient(135deg, rgba(16, 71, 69, .7), rgba(10, 34, 44, .95)); }
.metrics span { display: block; color: var(--muted); font-size: 12px; }
.metrics strong { display: block; font-size: 38px; margin: 10px 0 3px; letter-spacing: -.04em; }
.metrics small { color: #6e899b; font-size: 11px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); margin-top: 18px; backdrop-filter: blur(15px); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.section-head h2, .modal-card h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.muted { color: var(--muted); font-size: 12px; }
.controller-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.controller-card { background: linear-gradient(145deg, rgba(22,50,66,.92), rgba(10,27,40,.96)); border: 1px solid var(--line); border-radius: 15px; padding: 18px; }
.controller-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.controller-top strong { font: 650 16px ui-monospace, Consolas, monospace; }
.controller-top small { display: block; color: var(--muted); margin-top: 5px; }
.online-tag { color: var(--cyan); font-size: 11px; border: 1px solid rgba(70,217,198,.28); background: rgba(70,217,198,.07); padding: 5px 8px; border-radius: 20px; }
.doors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.door { padding: 12px; border-radius: 11px; background: rgba(255,255,255,.035); border: 1px solid transparent; }
.door.open { border-color: rgba(255,189,102,.28); }
.door-line { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.door-state { color: var(--cyan); }
.door.open .door-state { color: var(--amber); }
.door-actions { display: flex; gap: 7px; margin-top: 12px; }
.door-actions button { flex: 1; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.04); color: var(--text); padding: 7px 5px; font-size: 11px; }
.door-actions button:hover { border-color: var(--cyan-2); color: var(--cyan); }
.controller-settings { margin-top: 12px; width: 100%; }
.empty-state { text-align: center; padding: 42px 20px 48px; color: var(--muted); }
.empty-state h3 { color: var(--text); margin: 12px 0 6px; }
.empty-state p { margin: 0; font-size: 13px; }
.empty-state code { color: var(--cyan); }
.empty-icon { margin: auto; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: var(--cyan); border: 1px solid rgba(70,217,198,.25); background: rgba(70,217,198,.06); font-size: 24px; }
.filters { display: flex; background: rgba(255,255,255,.035); padding: 4px; border-radius: 10px; }
.filter { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 7px; font-size: 12px; }
.filter.active { background: var(--panel-2); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th { color: #658194; text-align: left; font-size: 10px; letter-spacing: .08em; font-weight: 700; padding: 0 12px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid rgba(148,177,197,.08); font-size: 12px; color: #b9c8d2; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 5px 8px; font-size: 10px; background: rgba(255,255,255,.05); }
.badge.success { color: var(--cyan); background: rgba(70,217,198,.08); }
.badge.exit { color: var(--blue); background: rgba(119,183,255,.08); }
.badge.failed { color: var(--red); background: rgba(255,109,120,.08); }
.badge.pending { color: var(--amber); background: rgba(255,189,102,.08); }
.empty-table { color: var(--muted); text-align: center; padding: 42px 0 25px; font-size: 13px; }
.modal { display: none; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 7, 13, .78); backdrop-filter: blur(6px); }
.modal-card { position: relative; z-index: 1; width: min(560px, 100%); background: #0d2030; border: 1px solid rgba(148,177,197,.2); border-radius: 18px; padding: 28px; box-shadow: 0 35px 90px rgba(0,0,0,.5); }
.modal-close { position: absolute; right: 18px; top: 16px; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 20px; }
.modal-sn { color: var(--muted); font: 12px ui-monospace, Consolas, monospace; margin: 7px 0 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid label { color: var(--muted); font-size: 11px; }
.form-grid input, .form-grid select { display: block; width: 100%; margin-top: 7px; background: #081723; border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 11px; outline: none; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--cyan-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; background: #153043; border: 1px solid rgba(70,217,198,.3); padding: 13px 18px; border-radius: 11px; color: var(--text); box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s ease; font-size: 13px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: rgba(255,109,120,.4); }
@media (max-width: 980px) { .metrics { grid-template-columns: repeat(2, 1fr); } .controller-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { .topbar { height: 68px; } .brand small { display: none; } .status-pill b { display: none; } .hero { align-items: flex-start; flex-direction: column; } .clock-card { text-align: left; } .metrics { gap: 10px; } .metrics article { min-height: 112px; padding: 16px; } .metrics strong { font-size: 30px; } .controller-grid { grid-template-columns: 1fr; } .section-head { align-items: flex-start; flex-direction: column; } .records-head { gap: 12px; } .filters { width: 100%; overflow-x: auto; } .filter { flex: 1; white-space: nowrap; } .panel { padding: 18px; } .form-grid { grid-template-columns: 1fr; } .modal-actions { flex-direction: column-reverse; } .modal-actions button { width: 100%; } }

/* Login landing page */
.login-page { min-height: 100vh; overflow: hidden; background: #06101a; }
.login-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 16% 22%, rgba(70,217,198,.15), transparent 28%), radial-gradient(circle at 88% 82%, rgba(34,91,128,.2), transparent 34%); }
.login-shell { min-height: 100vh; position: relative; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(430px, .82fr); }
.login-story { padding: clamp(34px, 6vw, 92px); display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); position: relative; }
.login-story::after { content: ""; position: absolute; right: 9%; top: 17%; width: min(30vw, 420px); aspect-ratio: 1; border: 1px solid rgba(70,217,198,.1); border-radius: 50%; box-shadow: 0 0 0 60px rgba(70,217,198,.025), 0 0 0 120px rgba(70,217,198,.015); pointer-events: none; }
.login-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.login-brand strong { display: block; font-size: 17px; letter-spacing: .1em; }
.login-brand small { color: var(--muted); letter-spacing: .2em; font-size: 9px; }
.login-copy { max-width: 720px; position: relative; z-index: 1; margin: 70px 0; }
.login-copy h1 { max-width: 720px; }
.login-copy .subtitle { max-width: 560px; }
.login-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
.login-feature { border-top: 1px solid rgba(70,217,198,.28); padding: 16px 2px 0; }
.login-feature strong { display: block; font-size: 13px; margin-bottom: 6px; }
.login-feature span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.login-copyright { color: #496477; font-size: 10px; letter-spacing: .06em; position: relative; z-index: 1; }
.login-panel { display: grid; place-items: center; padding: 40px; background: rgba(8, 21, 32, .6); backdrop-filter: blur(18px); }
.login-card { width: min(410px, 100%); }
.login-card .section-kicker { margin-bottom: 13px; }
.login-card h2 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.04em; }
.login-intro { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 30px; }
.login-form label { display: block; color: #9bb0be; font-size: 12px; margin-bottom: 18px; }
.field-wrap { display: flex; align-items: center; margin-top: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 11px; transition: .2s ease; }
.field-wrap:focus-within { border-color: rgba(70,217,198,.65); box-shadow: 0 0 0 3px rgba(70,217,198,.07); }
.field-icon { color: var(--cyan); width: 44px; text-align: center; font: 700 14px ui-monospace, Consolas, monospace; }
.field-wrap input { min-width: 0; width: 100%; color: var(--text); background: transparent; border: 0; outline: 0; padding: 14px 14px 14px 0; font-size: 14px; }
.password-toggle { border: 0; background: transparent; color: var(--muted); padding: 11px 14px; font-size: 11px; }
.login-submit { width: 100%; border: 0; border-radius: 11px; padding: 14px 18px; margin-top: 6px; color: #04201d; background: linear-gradient(110deg, var(--cyan), #79eadc); font-weight: 800; box-shadow: 0 12px 32px rgba(70,217,198,.18); transition: .2s ease; }
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(70,217,198,.24); }
.login-submit:disabled { cursor: wait; opacity: .65; transform: none; }
.login-error { min-height: 20px; color: var(--red); font-size: 12px; margin: 12px 0 0; }
.login-security { display: flex; gap: 9px; align-items: flex-start; color: #637d8f; font-size: 10px; line-height: 1.6; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.security-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); margin-top: 4px; box-shadow: 0 0 0 4px rgba(70,217,198,.08); }
@media (max-width: 900px) { .login-shell { grid-template-columns: 1fr; } .login-story { min-height: 46vh; border-right: 0; border-bottom: 1px solid var(--line); } .login-copy { margin: 70px 0 45px; } .login-panel { padding: 58px 24px 70px; } }
@media (max-width: 560px) { .login-story { padding: 28px 24px 38px; } .login-copy { margin: 55px 0 35px; } .login-copy h1 { font-size: 38px; } .login-features { grid-template-columns: 1fr; } .login-feature { display: flex; justify-content: space-between; gap: 18px; } .login-feature span { text-align: right; } .login-copyright { margin-top: 36px; } .login-panel { padding-top: 44px; } }
