:root{
  --bg:#0b1220;
  --card:#0f1a2e;
  --border:#1d2a44;
  --text:#e6edf7;
  --muted:#a9b6cc;
  --accent:#7fbf3f; /* green from logo-ish */
  --accent2:#1e7bd7; /* blue */
}

body{
  background: var(--bg);
  color: var(--text);
}

a{color: var(--text); text-decoration:none;}

.app-shell{min-height:100vh; display:flex;}
.sidebar{
  width: 260px;
  background: #081024;
  border-right:1px solid var(--border);
  padding:16px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  padding:10px 8px; border:1px solid var(--border);
  border-radius:18px; background:rgba(255,255,255,0.02);
}
.brand img{width:40px; height:40px; border-radius:12px; background:#fff; padding:4px;}
.brand .t1{font-weight:800; letter-spacing:0.6px;}
.brand .t2{font-size:12px; color:var(--muted);}

.navsec{margin-top:14px;}
.navitem{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:14px;
  color:var(--muted);
  border:1px solid transparent;
}
.navitem:hover{background:rgba(255,255,255,0.03); color:var(--text); border-color:rgba(255,255,255,0.06);}
.navitem.active{background:rgba(127,191,63,0.12); color:var(--text); border-color:rgba(127,191,63,0.25);}

.content{
  flex:1;
  padding:18px;
}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(255,255,255,0.02);
  margin-bottom:16px;
}

.card{
  background: var(--card) !important;
  border:1px solid var(--border) !important;
  color: var(--text);
  border-radius:18px;
}

.table{color: var(--text);}
.table thead th{color: var(--muted); border-bottom:1px solid var(--border) !important;}
.table td, .table th{border-color: var(--border) !important;}

.form-control, .form-select{
  background:#09142b;
  border:1px solid var(--border);
  color:var(--text);
  border-radius:14px;
}
.form-control:focus, .form-select:focus{box-shadow:none; border-color: rgba(30,123,215,0.55);}

.btn-primary{background: var(--accent2); border-color: var(--accent2); border-radius:14px;}
.btn-success{background: var(--accent); border-color: var(--accent); border-radius:14px; color:#091021; font-weight:700;}
.btn-outline-light{border-radius:14px;}
.btn-danger{border-radius:14px;}

.badge{border-radius:999px;}

.small-muted{color:var(--muted); font-size:12px;}

hr{border-color: var(--border);}
/* ---- Dashboard FX ---- */
.kpi-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  background: radial-gradient(1200px 200px at 10% 0%, rgba(80,120,255,.18), transparent 60%),
              linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.kpi-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  border-color: rgba(120,160,255,.25);
}
.kpi-glow{
  position:absolute; inset:-60% -40%;
  background: radial-gradient(circle, rgba(110,160,255,.18), transparent 60%);
  filter: blur(20px);
  pointer-events:none;
  transform: translate3d(0,0,0);
}
.kpi-icon{
  width:44px;height:44px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
}
.kpi-sub{ color: var(--muted); font-size:.9rem; }
.kpi-val{ font-weight: 900; letter-spacing: .3px; }

.chart-card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}

.table-dark thead th{ color: rgba(255,255,255,.75) !important; }
/* ===== Layout: Sidebar + Header ===== */
:root{
  --panel: rgba(255,255,255,.05);
  --panel2: rgba(255,255,255,.03);
  --stroke: rgba(255,255,255,.08);
  --stroke2: rgba(255,255,255,.12);
  --glow: rgba(120,160,255,.16);
  --brand: #9AB23B; /* ONTIME green */
}

.app-shell{ min-height:100vh; display:flex; background: radial-gradient(1100px 600px at 20% -10%, rgba(70,120,255,.18), transparent 60%); }
.sidebar{
  width: 280px;
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, rgba(7,12,22,.85), rgba(7,12,22,.65));
  border-right: 1px solid var(--stroke);
  padding: 18px 14px;
  overflow: hidden;
}
.side-top{
  display:flex; align-items:center; gap:12px;
  padding:12px; border-radius:18px;
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, var(--panel), var(--panel2));
}
.brand-logo{
  width:44px;height:44px;border-radius:14px;
  background: rgba(255,255,255,.08);
  border:1px solid var(--stroke);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.brand-logo img{ width:100%; height:100%; object-fit:cover; }
.brand-name{ line-height:1.1 }
.brand-name b{ display:block; letter-spacing:.4px; }
.brand-name span{ color:var(--muted); font-size:.82rem; }

.side-nav{ margin-top:14px; display:flex; flex-direction:column; gap:6px; }
.side-link{
  display:flex; align-items:center; gap:12px;
  padding: 12px 12px;
  border-radius: 14px;
  color: rgba(255,255,255,.78);
  text-decoration:none;
  border:1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.side-link i{ width:20px; text-align:center; opacity:.9; }
.side-link:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  transform: translateX(2px);
}
.side-link.active{
  background: radial-gradient(900px 120px at 0% 0%, rgba(120,160,255,.18), transparent 60%),
              rgba(255,255,255,.06);
  border-color: rgba(120,160,255,.22);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.badge-pill{
  margin-left:auto;
  padding:3px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  font-size:.75rem; color: rgba(255,255,255,.75);
}

.side-bottom{
  position:absolute; left:14px; right:14px; bottom:14px;
  border-radius: 18px;
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  padding: 12px;
}
.user-mini{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.user-mini .role{ color:var(--muted); font-size:.85rem; }

.main{
  flex:1;
  min-width: 0;
  padding: 18px 18px 28px;
}
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 14px 16px;
  border-radius: 18px;
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  margin-bottom: 14px;
}
.topbar-left{ display:flex; align-items:center; gap:12px; }
.burger{
  width:44px;height:44px;border-radius:14px;
  display:none; align-items:center; justify-content:center;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  cursor:pointer;
}
.page-title{ line-height:1.1 }
.page-title b{ display:block; font-size:1.05rem; }
.page-title span{ color:var(--muted); font-size:.86rem; }

.top-actions{ display:flex; gap:10px; align-items:center; }
.search{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
.search input{
  border:none; outline:none; background:transparent;
  color:#fff; width: 220px;
}
@media (max-width: 992px){
  .sidebar{
    position: fixed; left: 0; top: 0;
    transform: translateX(-110%);
    transition: transform .22s ease;
    z-index: 999;
  }
  .sidebar.open{ transform: translateX(0); }
  .burger{ display:flex; }
  .search input{ width: 140px; }
}
.backdrop{
  display:none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 998;
}
.backdrop.show{ display:block; }
/* ===== Mobile polish ===== */
@media (max-width: 992px){
  .main{ padding: 12px 12px 20px; }
  .topbar{ padding: 12px; border-radius: 16px; }
  .page-title b{ font-size: 1rem; }
  .page-title span{ font-size: .8rem; }

  /* cards spacing */
  .card-dark{ border-radius: 16px; }
  .h3{ font-size: 1.35rem; }

  /* button bigger for touch */
  .btn{ border-radius: 14px; }
}

@media (max-width: 576px){
  /* Make KPI cards feel lighter on small screens */
  .h3{ font-size: 1.2rem; }
  .small{ font-size: .82rem; }

  /* Table: show scroll + better spacing */
  .table-responsive{ border-radius: 14px; overflow: auto; }
  .table td, .table th{ white-space: nowrap; }
}
/* ===== Dashboard Pro Cards ===== */
.kpi{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: radial-gradient(900px 220px at 0% 0%, rgba(30,123,215,.20), transparent 60%),
              radial-gradient(900px 220px at 90% 0%, rgba(127,191,63,.20), transparent 60%),
              linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.kpi:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
  border-color: rgba(127,191,63,.25);
}
.kpi .kpi-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.kpi .kpi-ico{
  width:44px; height:44px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.kpi .kpi-ico.green{ box-shadow: 0 0 0 8px rgba(127,191,63,.08); }
.kpi .kpi-ico.blue{  box-shadow: 0 0 0 8px rgba(30,123,215,.08); }

.kpi .kpi-title{ color: var(--muted); font-size:.92rem; }
.kpi .kpi-val{ font-weight: 900; font-size: 1.55rem; letter-spacing:.3px; margin-top:4px; }
.kpi .kpi-link{ color: rgba(255,255,255,.80); font-size:.9rem; margin-top:6px; display:inline-flex; gap:6px; align-items:center; }
.kpi .kpi-link i{ opacity:.85; }

/* Chart card */
.chart-wrap{
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  padding: 14px;
}
.chart-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom: 10px;
}
.chart-head .ttl{ font-weight:900; }
.chart-head .sub{ color: var(--muted); font-size:.85rem; }

/* Low stock table polish */
.table.table-dark{ --bs-table-bg: transparent; }
.table thead th{ background: rgba(255,255,255,.04); }
