:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #e5e7eb;
  --primary: #12315b;
  --accent: #1f5eff;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #12315b, #1f5eff);
}
.login-card {
  width: min(420px, calc(100% - 32px));
  background: white;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.logo, .brand {
  font-weight: 800;
  color: var(--primary);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 16px 0 8px;
}
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
}
button, .button {
  display: inline-flex;
  margin-top: 18px;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  color: white;
  background: var(--accent);
  cursor: pointer;
}
.alert {
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--danger);
  background: #fee4e2;
}
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.topbar nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}
.topbar nav a {
  text-decoration: none;
  color: inherit;
}
.container {
  width: min(1120px, calc(100% - 40px));
  margin: 32px auto;
}
.container.narrow {
  width: min(680px, calc(100% - 40px));
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
h1 { margin: 0 0 8px; }
p { color: var(--muted); }
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card, .panel, .form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.card strong {
  display: block;
  font-size: 32px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  font-size: 14px;
}
th {
  color: var(--muted);
  font-size: 12px;
}
.search {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.search button { margin-top: 0; }
@media (max-width: 800px) {
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .page-head { display: block; }
}
