
:root {
  --navy: #0e253b;
  --navy-hover: #173756;
  --navy-active: #1f4f78;
  --teal-start: #0b3d46;
  --teal-end: #0f6e5c;
  --bg: #f4f7f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0f766e;
  --alert-bg: #fef3c7;
  --alert-border: #f59e0b;
  --alert-text: #92400e;
}
body.dark {
  --bg: #0b1622;
  --card: #122132;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #1e334a;
  --alert-bg: #451a03;
  --alert-border: #d97706;
  --alert-text: #fde68a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 20;
}
.brand-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-box img { max-width: 100%; height: auto; max-height: 44px; display: block; }
.user-card {
  text-align: center;
  padding: 10px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 14px;
}
.user-name { font-weight: 700; font-size: 15px; }
.user-role { font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.nav-label { font-size: 11px; color: #7c93aa; letter-spacing: .08em; margin: 8px 8px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: #e2e8f0; text-decoration: none;
  padding: 10px 12px; border-radius: 10px;
  margin-bottom: 4px; font-size: 14px; font-weight: 500;
}
.nav a:hover { background: var(--navy-hover); }
.nav a.active { background: var(--navy-active); color: #fff; font-weight: 600; }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: #94a3b8; }
.theme-btn {
  width: 100%; background: rgba(255,255,255,0.08); color: #fff; border: 0;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 10px; font-size: 13px;
}
.main { margin-left: 248px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
}
.breadcrumb { font-size: 13px; color: var(--muted); }
.content { padding: 22px 26px; max-width: 1380px; width: 100%; }
.hero {
  background: linear-gradient(135deg, var(--teal-start) 0%, var(--teal-end) 100%);
  color: #fff; border-radius: 16px; padding: 24px 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.hero-kicker { font-size: 11px; letter-spacing: .08em; opacity: .85; text-transform: uppercase; }
.hero h1 { margin: 4px 0 6px; font-size: 24px; }
.hero-sub { font-size: 14px; opacity: .9; }
.hero-metric {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px; padding: 12px 18px; text-align: right; min-width: 170px;
}
.hero-metric .val { font-size: 26px; font-weight: 800; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.kpi-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.kpi-val { font-size: 26px; font-weight: 800; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
input, select, textarea {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font-size: 14px;
}
.btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 9px 15px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-sec { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #b91c1c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; }
.alert-row { background: var(--alert-bg); }
.alert-pill {
  display: inline-block; background: var(--alert-border); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; margin-bottom: 4px;
}
.alert-box {
  background: var(--alert-bg); border: 1px solid var(--alert-border); color: var(--alert-text);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #091a2a 0%, #0b3d46 100%); padding: 20px;
}
.login-card { width: 100%; max-width: 400px; background: #fff; color: #0f172a; border-radius: 16px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; }
  .layout { flex-direction: column; }
  .main { margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
