:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #e6eaf2;
  --accent: #1f5eff;
  --accent-dark: #1748c6;
  --danger: #dc3545;
  --success: #198754;
  --warning: #b7791f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: #0f172a; color: #fff; padding: 24px; display: flex; flex-direction: column; justify-content: space-between;
}
.brand { font-size: 24px; font-weight: 700; }
.brand-sub { color: #94a3b8; margin-top: 6px; font-size: 13px; }
.nav { display: grid; gap: 8px; margin-top: 24px; }
.nav a { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.05); }
.nav a:hover { background: rgba(255,255,255,0.12); }
.user-box { font-size: 14px; color: #cbd5e1; }
.logout { display: inline-block; margin-top: 10px; color: #fff; }
.content { flex: 1; padding: 32px; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 22px; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 6px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
input, select, button, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 14px;
}
button, .btn {
  background: var(--accent); color: #fff; border: none; cursor: pointer; display: inline-block; text-align: center;
}
button:hover, .btn:hover { background: var(--accent-dark); }
.btn-secondary { background: #eef3ff; color: var(--accent); border: 1px solid #dce6ff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--muted); font-weight: 600; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-danger { background: #fff1f2; color: var(--danger); }
.badge-success { background: #ecfdf3; color: var(--success); }
.badge-warning { background: #fffaeb; color: var(--warning); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; }
.alert-danger { background: #fff1f2; color: #9f1239; }
.alert-success { background: #ecfdf3; color: #166534; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 430px; }
.muted { color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; }
  .content { padding: 18px; }
  .grid-4 { grid-template-columns: 1fr; }
}
