:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --line: #d9dde5;
  --text: #1f2933;
  --muted: #697586;
  --accent: #ff5a1f;
  --ok: #0f8f55;
  --warn: #a15c00;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 20px; }
.topbar-right { display: flex; gap: 16px; align-items: center; color: var(--muted); }
.workspace-switch select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
}
.shell { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 220px;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
}
.sidebar a.active, .sidebar a:hover { color: var(--text); background: #eef1f6; }
.content { flex: 1; padding: 28px; max-width: 1280px; }
.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}
h1 { margin: 0; font-size: 30px; letter-spacing: 0; }
h2 { margin: 0 0 16px; font-size: 18px; }
p { color: var(--muted); }
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.card, .panel, .login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.card span { display: block; color: var(--muted); font-size: 14px; }
.card strong { display: block; margin-top: 12px; font-size: 34px; }
.panel { margin-bottom: 18px; }
.attention-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.attention-item:first-of-type { border-top: 0; }
.attention-item span, small { display: block; color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 8px; align-items: center; }
.actions a, button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: 700;
}
button:disabled { color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}
.pill.ok { color: var(--ok); background: #e8f7ef; }
.pill.warn { color: var(--warn); background: #fff3db; }
.pill.danger { color: var(--danger); background: #fde8e8; }
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}
.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; }
.activity > div { border-top: 1px solid var(--line); padding: 14px 0; }
.activity > div:first-child { border-top: 0; }
time { color: var(--muted); font-size: 13px; display: block; margin-bottom: 4px; }
.settings { display: grid; grid-template-columns: 160px 1fr; gap: 10px 18px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; }
.muted { color: var(--muted); }
code { background: #eef1f6; border-radius: 4px; padding: 2px 5px; }
.login-card {
  max-width: 420px;
  margin: 80px auto;
}
label { display: block; font-weight: 700; margin: 16px 0; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 6px;
}
.login-card button {
  width: 100%;
  background: var(--accent);
  color: white;
  border: 0;
  padding: 12px;
}

@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { width: auto; display: flex; gap: 6px; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .cards { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .content { padding: 18px; }
  .attention-item { display: block; }
  .actions { margin-top: 10px; flex-wrap: wrap; }
}
