:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f7f8fa;
  --border: #dfe4eb;
  --muted: #606c7c;
  --text: #202938;
  --cyan: #245dc1;
  --blue: #245dc1;
  --danger: #b42332;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: not-allowed; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #aec9f5; outline-offset: 3px; }
.layout { max-width: 1520px; margin: auto; display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: 100vh; }
.sidebar { padding: 32px 22px; border-right: 1px solid var(--border); background: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.brand span { color: var(--blue); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; color: var(--blue); text-transform: uppercase; }
.brand-note { color: var(--muted); font-size: 12px; margin: 5px 0 34px; }
.nav { display: grid; gap: 7px; }
.nav button { border: 0; background: transparent; color: #536174; text-align: left; border-radius: 8px; padding: 12px 14px; transition: background .15s, color .15s; }
.nav button:hover { background: #f2f4f7; color: var(--text); }
.nav button.active { background: #edf3fc; color: #204fa3; box-shadow: inset 3px 0 var(--blue); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding-top: 26px; color: var(--muted); font-size: 12px; }
.main { padding: 34px 38px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 32px; padding-bottom: 22px; border-bottom: 1px solid #e9ecf0; }
.topbar h1 { margin: 4px 0; font-size: 27px; letter-spacing: -.4px; }
.muted { color: var(--muted); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.pill, .badge { display: inline-block; padding: 3px 10px; border: 1px solid #d1dfd8; border-radius: 30px; font-size: 12px; color: #276044; background: #f1f7f3; }
.badge.bad { color: #a32938; border-color: #edcbd0; background: #fdf3f4; }
.btn { padding: 10px 17px; border: 1px solid #d6dde6; border-radius: 8px; background: #fff; color: #354154; font-weight: 600; transition: background .15s, border-color .15s; }
.btn:hover { background: #f0f3f7; border-color: #b8c4d4; }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { background: #1c4ea7; border-color: #1c4ea7; }
.btn.danger { color: var(--danger); border-color: #e9c8cd; background: #fff; }
.btn.danger:hover { background: #fff0f2; border-color: #dba4ad; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.card, .panel { border: 1px solid var(--border); background: var(--panel); border-radius: 12px; box-shadow: 0 2px 6px #1d293904; }
.card { padding: 23px; position: relative; overflow: hidden; }
.metric { font-size: 32px; line-height: 1.3; font-weight: 700; margin: 12px 0 4px; letter-spacing: -.5px; color: #26354b; font-variant-numeric: tabular-nums; }
.metric small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 7px; }
.panel { padding: 24px; margin-bottom: 22px; }
.panel h2 { font-size: 17px; margin: 0 0 17px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.info { background: #f1f5fb; border: 1px solid #d9e3f1; border-radius: 9px; padding: 15px 18px; color: #425875; margin-bottom: 22px; }
.form { display: grid; gap: 16px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; color: #3e4a5c; font-size: 13px; }
input, select, textarea { width: 100%; min-width: 0; min-height: 43px; padding: 10px 12px; background: #fff; border: 1px solid #cbd4e0; color: var(--text); border-radius: 8px; outline: none; }
input::placeholder, textarea::placeholder { color: #758092; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #245dc114; }
input:disabled, select:disabled, textarea:disabled { background: #edf0f4; color: #657080; }
input[type=checkbox] { width: 18px; min-height: 18px; accent-color: var(--blue); }
label.check { display: flex; gap: 10px; align-items: center; }
.help { color: var(--muted); font-size: 12px; }
.form-foot { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-top: 3px; }
.table-wrap { overflow: auto; border: 1px solid #e0e5eb; border-radius: 8px; background: #fff; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
th { text-align: left; color: #526075; font-weight: 600; background: #eef1f5; }
th, td { padding: 14px 13px; border-bottom: 1px solid #e5e9ef; }
tbody tr:nth-child(even) { background: #f9fafc; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #edf3fb; }
.empty { text-align: center; padding: 42px; color: var(--muted); }
.actions { display: flex; gap: 7px; }
.login-shell { min-height: 100vh; max-width: 1100px; margin: auto; display: grid; grid-template-columns: 1fr 420px; align-items: center; gap: 90px; padding: 40px; }
.login-intro h1 { font-size: 46px; line-height: 1.35; margin: 22px 0; letter-spacing: -1px; }
.login-intro h1 span { color: var(--blue); }
.login-intro p { color: var(--muted); font-size: 16px; max-width: 430px; }
.login-panel { padding: 34px; background: #f7f8fa; box-shadow: 0 8px 30px #23334c08; }
.login-panel h2 { font-size: 24px; margin-bottom: 6px; }
.login-panel .form { margin-top: 28px; }
.login-panel .btn { width: 100%; padding: 13px; }
.login-mark { width: 55px; height: 55px; display: grid; place-items: center; border: 1px solid #d9e3f3; border-radius: 13px; color: var(--blue); font-weight: bold; font-size: 25px; background: #eef3fc; margin-bottom: 24px; }
.toast { position: fixed; bottom: 26px; right: 26px; max-width: min(440px, calc(100vw - 40px)); padding: 14px 20px; border-radius: 10px; border: 1px solid #bcd8c9; color: #245b3f; background: #f2faf5; z-index: 100; box-shadow: 0 8px 30px #25344b14; }
.toast.error { color: #a12535; border-color: #e9bbc3; background: #fff3f5; }
.error-box { color: #a12535; background: #fff1f3; border: 1px solid #ecc6cd; border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; }
.section-note { margin: 0 0 20px; color: var(--muted); }
dialog { color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 14px; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 26px; box-shadow: 0 20px 80px #25344b26; }
dialog::backdrop { background: #34405440; backdrop-filter: blur(3px); }
dialog h2 { margin-top: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.summary-line { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); padding: 12px 0; }
.summary-line:last-child { border: 0; }
.mono { font-family: Consolas, monospace; word-break: break-all; }
.refresh-note { font-size: 12px; color: var(--muted); }
@media (min-width: 1450px) { .main { padding: 40px 48px; } }
@media (max-width: 1050px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding: 26px 14px; }
  .main { padding: 26px 22px; }
  .cards { gap: 12px; }
  .card { padding: 18px; }
  .metric { font-size: 27px; }
  .grid2 { grid-template-columns: 1fr; }
  .login-shell { gap: 40px; padding: 35px; }
  .login-intro h1 { font-size: 36px; }
}
@media (max-width: 720px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 18px; }
  .brand-note, .sidebar-foot { display: none; }
  .nav { display: flex; overflow: auto; margin-top: 17px; gap: 6px; padding-bottom: 3px; }
  .nav button { white-space: nowrap; padding: 8px 12px; }
  .main { padding: 23px 16px; }
  .topbar { align-items: flex-start; margin-bottom: 24px; }
  .topbar h1 { font-size: 23px; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; font-size: 12px; }
  .top-actions .pill { display: none; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 18px 22px; }
  .metric { font-size: 30px; }
  .panel { padding: 18px; }
  .fields { grid-template-columns: 1fr; }
  .login-shell { display: block; padding: 24px; max-width: 450px; }
  .login-intro { padding-top: 35px; }
  .login-intro h1 { font-size: 30px; margin: 20px 0; }
  .login-intro p { font-size: 14px; }
  .login-panel { padding: 25px; margin-top: 32px; }
  .login-mark { display: none; }
  .top-actions .btn { padding: 8px 10px; }
  .panel-head { align-items: flex-start; }
  .toast { bottom: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
