:root {
  --bg: #f5f7fb;
  --panel: #fff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e0eb;
  --header: #fff400;
  --blue: #d9e3f4;
  --blue2: #cbd8ee;
  --green: #0f8b57;
  --red: #c2413b;
  --accent: #1d4ed8;
  --shadow: 0 12px 32px rgba(31, 42, 68, .1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--accent); text-decoration: none; font-weight: 800; }
.app { width: min(1500px, calc(100% - 24px)); margin: 0 auto; padding: 24px 0 40px; }
.login { width: min(420px, calc(100% - 28px)); margin: 80px auto; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: 0; }
h2 { margin: 18px 0 10px; font-size: 22px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(31, 42, 68, .07);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--red); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; }
.grid.one { grid-template-columns: 1fr; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 800; }
input, select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fbfcff;
  font: inherit;
  font-weight: 700;
}
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.table-wrap { overflow-x: auto; border: 2px solid #111827; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
table { width: 100%; min-width: 960px; border-collapse: collapse; table-layout: fixed; }
th, td { border: 1.5px solid #111827; padding: 8px; text-align: center; }
th { background: var(--header); font-size: 15px; font-weight: 900; white-space: nowrap; }
tbody td { background: var(--blue); }
tbody tr:nth-child(even) td { background: var(--blue2); }
.positive { color: var(--green); font-weight: 900; }
.negative { color: var(--red); font-weight: 900; }
.muted { color: var(--muted); }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 6px; background: #eef3fb; font-weight: 900; }
@media (max-width: 900px) {
  .topbar, .grid { grid-template-columns: 1fr; display: grid; }
  .topbar { display: grid; }
}
