:root{
  --bg0:#070A12;
  --bg1:#0B1022;
  --card:#0E1733;
  --card2:#0B132B;
  --stroke:rgba(255,255,255,.10);
  --muted:rgba(255,255,255,.70);
  --muted2:rgba(255,255,255,.55);
  --text:#F4F7FF;
  --accent:#22c55e;   /* tea green */
  --accent2:#06b6d4;  /* cyan */
  --warn:#f59e0b;
  --danger:#ef4444;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --shadow2: 0 10px 24px rgba(0,0,0,.25);
  --radius:18px;
}

.app-body{
  background:
    radial-gradient(800px 400px at 15% 10%, rgba(34,197,94,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 15%, rgba(6,182,212,.14), transparent 60%),
    radial-gradient(1100px 700px at 55% 95%, rgba(99,102,241,.08), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
  min-height: 100vh;
}

.app-shell{
  display:flex;
  min-height:100vh;
}

.app-sidebar{
  width: 290px;
  background: linear-gradient(180deg, rgba(14,23,51,.95), rgba(7,10,18,.85));
  border-right: 1px solid var(--stroke);
  padding: 18px 16px;
  position: sticky;
  top:0;
  height:100vh;
  overflow:auto;
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding: 8px 6px 14px 6px;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 14px;
}
.brand-mark{
  width: 44px; height: 44px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(34,197,94,.30), rgba(6,182,212,.25));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow2);
}
.brand-name{ font-weight: 900; letter-spacing:.3px; }
.brand-sub{ font-size: 12px; color: var(--muted2); margin-top:2px; }

.nav-section{ margin-top: 14px; }
.nav-caption{
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(255,255,255,.55);
  margin: 10px 8px 8px;
}
.nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: rgba(255,255,255,.82);
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: .18s ease;
}
.nav-item i{ opacity:.95; }
.nav-item:hover{
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
  transform: translateY(-1px);
}
.nav-item.active{
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(6,182,212,.12));
  border-color: rgba(34,197,94,.30);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

.sidebar-footer{
  margin-top: 18px;
  border-top: 1px solid var(--stroke);
  padding-top: 14px;
}
.userchip{
  display:flex; gap:10px; align-items:center;
  padding: 10px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
}
.userchip .avatar{
  width:38px; height:38px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 800;
  background: rgba(34,197,94,.22);
  border: 1px solid rgba(34,197,94,.25);
}
.userchip .name{ font-weight: 800; font-size: 13px; }
.userchip .roles{ font-size: 11px; color: var(--muted2); }

.app-main{
  flex:1;
  padding: 18px 18px 24px;
}
.app-topbar{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
}
.topbar-title .title{
  font-weight: 900;
  font-size: 16px;
  letter-spacing:.2px;
}
.topbar-title .crumb{
  font-size: 12px;
  color: var(--muted2);
}

.app-content{
  margin-top: 14px;
}

.card-elevated{
  background: linear-gradient(180deg, rgba(14,23,51,.90), rgba(11,19,43,.85));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kpi{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 14px;
}
.kpi .label{ font-size:12px; color: var(--muted2); }
.kpi .value{ font-size: 22px; font-weight: 900; letter-spacing:.3px; }
.kpi .icon{
  width:42px; height:42px;
  border-radius: 16px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}

.badge-soft{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.85);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.btn-glass{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.86);
}
.btn-glass:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}

.table.table-dark{
  --bs-table-bg: transparent;
}
.table-wrap{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  overflow:hidden;
  background: rgba(0,0,0,.10);
}
.table thead th{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.85);
}
.table td{
  border-color: rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.84);
}
.small-muted{ color: var(--muted2); font-size: 12px; }
.alert-elevated{
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: #fff;
}

/* Mobile sidebar */
@media (max-width: 991px){
  .app-sidebar{
    position: fixed;
    left:-320px;
    z-index: 9999;
    transition: .2s ease;
  }
  body.sidebar-open .app-sidebar{ left: 0; }
}
