:root {
  --green: #1B4332;
  --green-light: #2D6A4F;
  --gold: #C5A028;
  --gold-soft: rgba(197, 160, 40, 0.15);
  --black: #111111;
  --white: #ffffff;
  --bg: #f7f7f5;
  --card: #ffffff;
  --card-strong: #ffffff;
  --sidebar: #1B4332;
  --accent: #C5A028;
  --accent-soft: rgba(197, 160, 40, 0.18);
  --dark: #111111;
  --muted: #5c5c5c;
  --line: rgba(17, 17, 17, 0.1);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

.sidebar {
  width: 260px;
  color: var(--white);
  position: fixed;
  inset: 0 auto 0 0;
  padding: 22px 16px;
  z-index: 10;
  background: var(--sidebar);
  border-right: 3px solid var(--gold);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.brand {
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 28px;
  color: var(--gold);
  letter-spacing: 0.3px;
}

.sidebar a {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 10px;
  margin: 6px 0;
  transition: 0.2s ease;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(197, 160, 40, 0.2);
  border: 1px solid rgba(197, 160, 40, 0.45);
  color: var(--white);
}

.main {
  margin-left: 260px;
  width: calc(100% - 260px);
  padding: 24px;
}

.topbar {
  height: 64px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  margin: 0 0 24px;
  border-left: 4px solid var(--gold);
}

.menu-btn {
  display: none;
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
}

.user-chip {
  color: var(--muted);
  font-weight: 600;
}

.user-chip span {
  background: var(--gold-soft);
  color: var(--green);
  border-radius: 20px;
  padding: 4px 10px;
  margin: 0 8px;
  text-transform: capitalize;
}

.user-chip a {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
}

.cardx,
.table-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green), var(--green-light)) !important;
  border-left: 4px solid var(--gold);
}

.stat::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(197, 160, 40, 0.12);
  top: -70px;
  right: -40px;
}

.row.g-3.mt-2 > .col-md:nth-child(1) .stat,
.row.g-3.mt-2 > .col-md:nth-child(2) .stat,
.row.g-3.mt-2 > .col-md:nth-child(3) .stat,
.row.g-3.mt-2 > .col-md:nth-child(4) .stat,
.row.g-3.mt-2 > .col-md .stat {
  background: linear-gradient(135deg, var(--green), var(--green-light)) !important;
}

.row.g-3.mt-2 > .col-md .stat p,
.row.g-3.mt-2 > .col-md .stat h3 {
  color: #fff;
}

.stat h3 {
  font-size: 30px;
  margin: 0;
}

.stat p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(197, 160, 40, 0.25);
  color: var(--gold);
  border: 1px solid rgba(197, 160, 40, 0.4);
  font-size: 24px;
}

.badge-status {
  border-radius: 999px;
  padding: 5px 10px;
}

.form-control,
.form-select {
  border-radius: 10px;
  border-color: #ddd;
  background: #fff;
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-light);
  border-color: var(--green-light);
}

.btn-success {
  background: var(--green);
  border-color: var(--green);
}

.btn {
  border-radius: 10px;
}

.btn-outline-danger {
  background: #fff;
  border-color: rgba(139, 0, 0, 0.35);
  color: #8b0000;
}

.table {
  --bs-table-bg: transparent;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--green);
}

.auth-card {
  width: min(430px, 92vw);
  background: #fff;
  border-radius: 20px;
  padding: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border-top: 4px solid var(--gold);
}

.auth-logo {
  font-weight: 900;
  font-size: 28px;
  color: var(--green);
}

.modal-content {
  border-radius: 16px;
}

.chart-card {
  position: relative;
}

.chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-card h5 {
  color: var(--green);
  font-weight: 700;
}

.chart-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--gold-soft);
  border: 1px solid rgba(197, 160, 40, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.chart-wrap {
  height: 280px;
  position: relative;
}

.chart-wrap-sm {
  height: 260px;
}

.main > h2,
.main > .d-flex h2,
.main > h3 {
  color: var(--black);
  font-weight: 700;
  margin-bottom: 14px;
}

.main > form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.05);
  margin-bottom: 16px;
}

.main .form-group > label,
.main form label.form-label,
.main form label {
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
}

.main input[type="checkbox"] {
  accent-color: var(--gold);
}

.main .table thead th {
  border-bottom-color: var(--line);
  font-weight: 700;
  color: var(--green);
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.2s;
  }

  .sidebar-open .sidebar {
    transform: none;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }

  .menu-btn {
    display: block;
  }
}
