:root {
  --navy: #17355E;
  --green: #2E8B57;
  --bg: #F3F7F5;
  --card: #FFFFFF;
  --border: #E1EAE5;
  --muted: #5C7085;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--navy);
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 24px;
  padding: 34px;
  width: min(400px, 100%);
  box-shadow: 0 18px 45px rgba(23, 53, 94, 0.1);
  text-align: center;
}
.login-card img { height: 48px; margin-bottom: 12px; }
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 10px;
}
.sidebar-brand img { height: 34px; border-radius: 8px; background: #fff; padding: 3px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.82);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.nav-item:hover, .nav-item.is-active {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.main-area { padding: 28px 32px; overflow-x: auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 1.6rem; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}
.kpi-label { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.kpi-val { font-size: 1.8rem; font-weight: 800; margin-top: 6px; }
.panel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}
.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-light { background: #EEF3F0; color: var(--navy); }
.btn-danger { background: #FDECEC; color: #C0392B; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }
.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.pill-green { background: #E6F7ED; color: #1F7A48; }
.pill-yellow { background: #FFF6DC; color: #9C6B00; }
.pill-blue { background: #E7F0FC; color: #17355E; }
.pill-red { background: #FDECEC; color: #B83227; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.84rem; font-weight: 700; }
.field input, .field textarea, .field select {
  border: 1.5px solid #D3DFE7;
  border-radius: 10px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.94rem;
}
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(16,35,62,0.55);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 100;
}
.modal-backdrop.is-open { display: flex; }
.modal-box {
  background: #fff; border-radius: 22px; width: min(680px, 100%);
  max-height: 92vh; overflow-y: auto; padding: 24px;
}
.variant-item {
  display: grid; grid-template-columns: 1fr 70px 90px auto; gap: 8px; align-items: center; margin-bottom: 8px;
}
@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
