
:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --panel2: #243044;
  --line: #2f3d52;
  --text: #e8eef7;
  --muted: #9aabbf;
  --accent: #3b82f6;
  --accent2: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --sidebar: 250px;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: linear-gradient(180deg,#0b1220,#121a27 40%,#0f1419); color: var(--text); min-height:100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: rgba(18,26,40,.96); border-right:1px solid var(--line); padding: 18px 14px; display:flex; flex-direction:column; gap:16px; z-index:20; }
.brand { display:flex; gap:10px; align-items:center; padding: 6px 8px 14px; border-bottom:1px solid var(--line); }
.brand-mark { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background: linear-gradient(135deg,#2563eb,#06b6d4); font-weight:700; }
.brand strong { display:block; font-size:15px; }
.brand small { color: var(--muted); }
.sidebar nav { display:flex; flex-direction:column; gap:4px; overflow:auto; flex:1; }
.sidebar nav a { color: var(--muted); padding:10px 12px; border-radius:10px; }
.sidebar nav a.active, .sidebar nav a:hover { background: var(--panel2); color: var(--text); text-decoration:none; }
.sidebar-foot { border-top:1px solid var(--line); padding-top:12px; color:var(--muted); font-size:13px; }
.main { margin-left: var(--sidebar); padding: 24px; min-height:100vh; }
.main-public { margin-left:0; display:grid; place-items:center; }
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.page-head h1 { margin:0; font-size:24px; }
.page-head p { margin:4px 0 0; color:var(--muted); }
.kpi-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap:12px; margin-bottom:18px; }
.kpi { background: var(--panel); border:1px solid var(--line); border-radius: var(--radius); padding:16px; box-shadow: var(--shadow); }
.kpi .label { color:var(--muted); font-size:13px; }
.kpi .value { font-size:28px; font-weight:700; margin-top:6px; }
.kpi.green .value { color: var(--accent2); }
.kpi.blue .value { color: #60a5fa; }
.kpi.amber .value { color: var(--warn); }
.kpi.red .value { color: #f87171; }
.cards { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.card { background: var(--panel); border:1px solid var(--line); border-radius: var(--radius); padding:16px; transition:.15s transform; }
.card:hover { transform: translateY(-2px); border-color:#3b82f6aa; }
.card h3 { margin:0 0 6px; font-size:16px; }
.card p { margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
.panel { background: var(--panel); border:1px solid var(--line); border-radius: var(--radius); padding:16px; box-shadow: var(--shadow); }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; align-items:center; }
input, select, textarea, button { font: inherit; }
input[type=text], input[type=search], input[type=password], input[type=month], input[type=url], input[type=file], select, textarea {
  background: #0d1522; border:1px solid var(--line); color:var(--text); border-radius:10px; padding:9px 12px; min-width:140px;
}
textarea { width:100%; min-height:120px; }
button, .btn { background: var(--accent); color:white; border:0; border-radius:10px; padding:9px 14px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
button.secondary, .btn.secondary { background: var(--panel2); }
button.danger, .btn.danger { background: var(--danger); }
.table-wrap { overflow:auto; border-radius:12px; border:1px solid var(--line); }
table { width:100%; border-collapse: collapse; min-width:720px; }
th, td { padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; font-size:13px; }
th { background:#152033; color:#c6d4e6; position:sticky; top:0; }
tr:hover td { background: rgba(59,130,246,.06); }
.badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; background:#243044; }
.badge.ok { background:#14532d; color:#86efac; }
.badge.ing { background:#1e3a8a; color:#93c5fd; }
.badge.ng { background:#7f1d1d; color:#fca5a5; }
.flash { padding:10px 14px; border-radius:10px; margin-bottom:12px; }
.flash-ok { background:#14532d; }
.flash-err { background:#7f1d1d; }
.login-box { width:min(420px,92vw); background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:28px; box-shadow:var(--shadow); }
.login-box h1 { margin:0 0 4px; font-size:22px; }
.login-box p { color:var(--muted); margin:0 0 18px; }
.login-box label { display:block; margin:10px 0 6px; color:var(--muted); font-size:13px; }
.login-box input { width:100%; }
.login-box button { width:100%; margin-top:16px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.muted { color:var(--muted); }
.pre { white-space: pre-wrap; background:#0d1522; border:1px solid var(--line); border-radius:12px; padding:14px; line-height:1.6; font-size:13px; }
.tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.tabs a { padding:7px 12px; border-radius:999px; background:var(--panel2); color:var(--muted); }
.tabs a.active { background:var(--accent); color:white; text-decoration:none; }
.pager { display:flex; gap:8px; align-items:center; margin-top:12px; color:var(--muted); }
.form-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap:10px; }
.form-grid label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); }
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.55); display:none; place-items:center; z-index:50; padding:16px; }
.modal-bg.open { display:grid; }
.modal { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:18px; width:min(720px,96vw); max-height:90vh; overflow:auto; }
@media (max-width: 900px) {
  .sidebar { position: static; width:100%; height:auto; }
  .main { margin-left:0; padding:16px; }
  .grid-2 { grid-template-columns:1fr; }
  body { display:block; }
}
