:root {
  --green: #006A54;
  --green-deep: #004334;
  --ivory: #E6E4DE;
  --charcoal: #0A0A0A;
  --black: #000000;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font-family: Manrope, system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% -10%, rgba(0,106,84,.22), transparent 28rem),
    radial-gradient(circle at 100% 80%, rgba(0,67,52,.20), transparent 32rem),
    var(--black);
}

button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(230,228,222,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,228,222,.018) 1px, transparent 1px);
  background-size: 34px 34px;
}

.glass {
  background: linear-gradient(145deg, rgba(230,228,222,.065), rgba(230,228,222,.018));
  border: 1px solid rgba(230,228,222,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.glass-soft {
  background: rgba(230,228,222,.035);
  border: 1px solid rgba(230,228,222,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-gradient {
  background: linear-gradient(145deg, var(--green), var(--green-deep));
}

.logo-tile {
  background: var(--green);
  border: 1px solid rgba(230,228,222,.12);
  box-shadow: 0 10px 30px rgba(0,106,84,.25);
}

.nav-link {
  position: relative;
  transition: all .18s ease;
}
.nav-link:hover { background: rgba(230,228,222,.06); color: var(--ivory); }
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(0,106,84,.34), rgba(0,106,84,.09));
  border: 1px solid rgba(0,106,84,.35);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: -1px;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: var(--ivory);
}

.kpi-card { overflow: hidden; position: relative; }
.kpi-card::after {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  right: -42px;
  top: -42px;
  border-radius: 50%;
  background: rgba(0,106,84,.12);
  filter: blur(2px);
}

.table-scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(230,228,222,.18) transparent; }
.table-scroll::-webkit-scrollbar { width: 7px; height: 7px; }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(230,228,222,.16); border-radius: 999px; }

.form-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(230,228,222,.11);
  background: rgba(0,0,0,.48);
  color: var(--ivory);
  padding: .78rem .9rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-input::placeholder { color: rgba(230,228,222,.34); }
.form-input:focus {
  border-color: rgba(0,106,84,.85);
  box-shadow: 0 0 0 4px rgba(0,106,84,.16);
  background: rgba(0,0,0,.68);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  padding: .72rem 1rem;
  font-weight: 800;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
  box-shadow: 0 10px 26px rgba(0,106,84,.20);
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 13px;
  border: 1px solid rgba(230,228,222,.12);
  background: rgba(230,228,222,.045);
  color: var(--ivory);
  padding: .68rem .9rem;
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease;
}
.btn-secondary:hover { background: rgba(230,228,222,.09); border-color: rgba(230,228,222,.22); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 13px;
  border: 1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.09);
  color: #fecaca;
  padding: .68rem .9rem;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  border: 1px solid rgba(230,228,222,.10);
  padding: .28rem .58rem;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-active { color: #bbf7d0; background: rgba(34,197,94,.09); border-color: rgba(34,197,94,.22); }
.status-pending { color: #fde68a; background: rgba(245,158,11,.09); border-color: rgba(245,158,11,.22); }
.status-suspended { color: #fecaca; background: rgba(239,68,68,.09); border-color: rgba(239,68,68,.22); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  animation: fadeIn .16s ease both;
}
.modal-card {
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 24px;
  animation: riseIn .2s ease both;
}

.toast {
  border-radius: 15px;
  border: 1px solid rgba(230,228,222,.12);
  background: rgba(10,10,10,.93);
  box-shadow: 0 16px 50px rgba(0,0,0,.46);
  padding: .85rem 1rem;
  animation: slideIn .2s ease both;
}

.fab-menu { animation: riseIn .18s ease both; }
.mobile-nav { padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }

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

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 767px) {
  .desktop-sidebar { display: none; }
  .desktop-main { margin-left: 0 !important; padding-bottom: 90px; }
  .chart-wrap { min-height: 240px; }
}

@media (min-width: 768px) {
  .mobile-nav { display: none; }
}
