:root {
  --flame: #ff3b1f;
  --bg: #e8eaef;
  --side: #0b1220;
  --side-2: #111a2c;
  --line: #e5e7eb;
  --ink: #111827;
  --muted: #6b7280;
  --card: #fff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #app {
  height: 100%;
  overflow: hidden;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.login-wrap {
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 480px at 10% 0%, #3a120c, transparent 55%),
    #07090f;
}
.login-card {
  width: 420px;
  background: #111827;
  color: #fff;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid rgba(255,255,255,.06);
}
.login-card .k { letter-spacing: .28em; color: #ff7a3d; font-size: 12px; font-weight: 700; }
.login-card h1 { font-size: 28px; margin: 10px 0 8px; }
.login-card p { color: #9ca3af; font-size: 13px; margin-bottom: 22px; }
.login-card label { display: block; font-size: 12px; color: #9ca3af; margin: 12px 0 6px; }
.login-card input {
  width: 100%; height: 42px; border-radius: 10px; border: 1px solid #374151;
  background: #0b1220; color: #fff; padding: 0 12px; font: inherit;
}
.login-card button {
  width: 100%; margin-top: 18px; height: 44px; border: 0; border-radius: 12px;
  background: var(--flame); color: #fff; font-weight: 700; cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  height: 100%;
}
.side {
  background: var(--side);
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.side .brand {
  color: #fff;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.side .brand span {
  display: block;
  font-size: 11px;
  color: #ff7a3d;
  letter-spacing: .18em;
  font-weight: 700;
}
.side .brand b { display: block; font-size: 16px; margin-top: 6px; }
.side-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px;
}
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.nav-label {
  font-size: 11px;
  letter-spacing: .12em;
  color: #64748b;
  padding: 14px 12px 6px;
}
.side a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 2px;
}
.side a:hover { background: rgba(255,255,255,.05); color: #fff; }
.side a.on { background: var(--flame); color: #fff; }
.side .foot {
  flex-shrink: 0;
  padding: 14px 20px 18px;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid rgba(255,255,255,.06);
}

.main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.top {
  flex-shrink: 0;
  min-height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
}
.top .titles { min-width: 0; }
.top h2 { font-size: 18px; line-height: 1.2; }
.top .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.top .ops { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.top a, .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 650; background: var(--ink); color: #fff; text-decoration: none;
}
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.line { background: #fff; color: var(--flame); border: 1px solid var(--flame); }
.btn.warn { background: #b45309; }
.btn.ok { background: #15803d; }

.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb { background: #c5cad3; border-radius: 8px; }

.page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  flex-shrink: 0;
}
.card, .panel {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 16px 18px;
}
.card .l { font-size: 12px; color: var(--muted); }
.card .n { font-size: 28px; font-weight: 800; margin-top: 8px; letter-spacing: -.02em; }
.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel.fill { flex: 1; overflow: hidden; }
.panel .table-wrap { flex: 1; }
.panel h3 { font-size: 14px; margin: 0 0 12px; }
.grid2 {
  flex: 1;
  min-height: 240px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 12px;
}
.grid2 > .panel { min-height: 0; }
.todo-list { display: grid; gap: 8px; }
.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8f9fb;
  border-radius: 10px;
  font-size: 13px;
}
.steps { color: #4b5563; font-size: 13px; line-height: 1.9; }
.steps b { color: var(--ink); }

.table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 650; background: #fafafa; position: sticky; top: 0; }
tr:hover td { background: #fafbfc; }
tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: #f3f4f6; font-weight: 700;
}
.tag.on { background: #ecfdf3; color: #15803d; }
.tag.off { background: #fef2f2; color: #b91c1c; }
.tag.wait { background: #fff7ed; color: #c2410c; }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; }
input[type="text"], input[type="number"], select, textarea {
  height: 36px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font: inherit;
}
.muted { color: var(--muted); font-size: 12px; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.screen-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.scr {
  aspect-ratio: 16/10;
  border-radius: 12px;
  background: #0b1220;
  color: #fff;
  padding: 12px;
  font-size: 12px;
}
.scr .nm { opacity: .7; }
.scr .play { margin-top: 22px; font-weight: 700; font-size: 14px; }
.scr.off { outline: 2px solid #b91c1c; }
.toast {
  position: fixed; top: 18px; right: 18px; background: #111827; color: #fff;
  padding: 12px 16px; border-radius: 12px; display: none; z-index: 20;
}
h3 { font-size: 14px; margin: 0 0 12px; }

@media (max-width: 1100px) {
  .cards, .screen-grid { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .side .brand b, .side .brand span, .side .foot, .nav-label { display: none; }
  .side a { justify-content: center; font-size: 11px; padding: 12px 6px; }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
}
