:root{
  --bg:#f5f8fa;
  --card-bg:#ffffff;
  --sidebar-bg:#1e1e2d;
  --sidebar-bg-hover:#2a2a3c;
  --sidebar-text:#9899ac;
  --sidebar-text-active:#ffffff;
  --primary:#009ef7;
  --primary-light:#f1faff;
  --success:#50cd89;
  --success-light:#e8fff3;
  --warning:#ffc700;
  --warning-light:#fff8dd;
  --danger:#f1416c;
  --danger-light:#fff5f8;
  --dark:#181c32;
  --gray:#7e8299;
  --gray-light:#f9f9f9;
  --border:#eff2f5;
  --card-radius:12px;
  --topbar-h:70px;
  --sidebar-w:265px;
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--dark);
  font-size:14px;
}
a{text-decoration:none;color:inherit;}
.sidebar{
  position:fixed; top:0; left:0; bottom:0;
  width:var(--sidebar-w);
  background:var(--sidebar-bg);
  display:flex; flex-direction:column;
  z-index:100;
  transition:transform .25s ease;
}
.sidebar-brand{
  height:var(--topbar-h);
  display:flex; align-items:center; gap:10px;
  padding:0 24px;
  border-bottom:1px solid rgba(255,255,255,.06);
  flex-shrink:0;
}
.sidebar-brand .logo-box{
  width:34px; height:34px; border-radius:8px;
  background:linear-gradient(135deg,var(--primary),#7239ea);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:800; font-size:15px;
}
.sidebar-brand span{color:#fff; font-weight:700; font-size:17px; letter-spacing:.3px;}
.sidebar-menu{ padding:16px 12px; overflow-y:auto; flex:1;}
.menu-label{
  font-size:11px; text-transform:uppercase; letter-spacing:.08em;
  color:#5b5b6b; padding:16px 12px 8px;
  font-weight:600;
}
.menu-item{
  display:flex; align-items:center; gap:12px;
  padding:10px 12px; border-radius:8px;
  color:var(--sidebar-text); font-weight:500; font-size:13.5px;
  margin-bottom:2px; cursor:pointer;
  transition:background .15s, color .15s;
  border:0;
  width:100%;
  background:transparent;
  text-align:left;
  font-family:inherit;
}
.menu-item i{width:18px; text-align:center; font-size:15px;}
.menu-item:hover{ background:var(--sidebar-bg-hover); color:#fff;}
.menu-item.active{
  background:rgba(0,158,247,.12); color:#fff;
}
.menu-item.active i{color:var(--primary);}
.menu-item .chevron{margin-left:auto; font-size:11px; transition:transform .2s;}
.menu-item.open .chevron{transform:rotate(90deg);}
.submenu{
  max-height:0; overflow:hidden; padding-left:30px;
  transition:max-height .25s ease;
}
.submenu.open{max-height:300px;}
.submenu a{
  display:block; padding:8px 12px; font-size:13px;
  color:var(--sidebar-text); border-left:2px solid transparent;
}
.submenu a:hover, .submenu a.active{ color:#fff; border-left-color:var(--primary);}
.main-wrapper{ margin-left:var(--sidebar-w); min-height:100vh; display:flex; flex-direction:column;}
.topbar{
  height:var(--topbar-h);
  background:var(--card-bg); border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 28px; position:sticky; top:0; z-index:50; gap:16px;
}
.topbar-left{display:flex; align-items:center; gap:16px; flex:1;}
.burger{
  display:none; border:none; background:none; font-size:18px; cursor:pointer; color:var(--dark);
}
.search-box{
  display:flex; align-items:center; gap:10px;
  background:var(--gray-light); border-radius:8px;
  padding:9px 14px; max-width:320px; width:100%;
  color:var(--gray);
}
.search-box input{
  border:none; background:none; outline:none; font-family:inherit; font-size:13.5px; width:100%;
}
.topbar-right{display:flex; align-items:center; gap:8px;}
.icon-btn{
  width:40px; height:40px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  background:var(--gray-light); color:var(--gray); font-size:15px;
  cursor:pointer; position:relative; border:none;
}
.icon-btn .dot{
  position:absolute; top:8px; right:9px; width:7px; height:7px;
  background:var(--danger); border-radius:50%; border:2px solid var(--card-bg);
}
.user-chip{
  display:flex; align-items:center; gap:10px; cursor:pointer;
  padding:6px 10px 6px 6px; border-radius:10px;
}
.user-chip:hover{background:var(--gray-light);}
.avatar{
  width:38px; height:38px; border-radius:8px;
  background:linear-gradient(135deg,#7239ea,var(--primary));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:700; font-size:14px;
}
.user-chip .name{font-weight:600; font-size:13.5px; line-height:1.1;}
.user-chip .role{font-size:11.5px; color:var(--gray);}
.content{ padding:28px; flex:1;}
.page-header{
  display:flex; align-items:flex-end; justify-content:space-between;
  margin-bottom:22px; flex-wrap:wrap; gap:12px;
}
.page-header h1{font-size:22px; font-weight:700; margin:0 0 4px;}
.breadcrumb{font-size:12.5px; color:var(--gray);}
.breadcrumb a{color:var(--gray);}
.breadcrumb .sep{margin:0 6px;}
.btn{
  border:none; padding:10px 18px; border-radius:8px; font-weight:600; font-size:13px;
  cursor:pointer; display:inline-flex; align-items:center; gap:8px;
  font-family:inherit;
}
.btn-primary,.btn.primary{background:var(--primary); color:#fff;}
.btn-light{background:var(--gray-light); color:var(--dark);}
.grid-stats{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:20px; margin-bottom:22px;
}
.card{
  background:var(--card-bg); border-radius:var(--card-radius); border:1px solid var(--border);
  padding:22px;
}
.stat-card .top-row{display:flex; justify-content:space-between; align-items:flex-start;}
.stat-icon{
  width:46px; height:46px; border-radius:10px;
  display:flex; align-items:center; justify-content:center; font-size:18px;
}
.stat-icon.blue{background:var(--primary-light); color:var(--primary);}
.stat-icon.green{background:var(--success-light); color:var(--success);}
.stat-icon.yellow{background:var(--warning-light); color:#a17c00;}
.stat-icon.red{background:var(--danger-light); color:var(--danger);}
.badge-trend{
  font-size:11.5px; font-weight:700; padding:3px 9px; border-radius:6px;
}
.badge-trend.up{background:var(--success-light); color:var(--success);}
.badge-trend.down{background:var(--danger-light); color:var(--danger);}
.stat-value{font-size:26px; font-weight:800; margin:16px 0 2px;}
.stat-label{color:var(--gray); font-size:13px;}
.grid-2col{
  display:grid; grid-template-columns:1.6fr 1fr; gap:20px; margin-bottom:22px;
}
.card-head{
  display:flex; justify-content:space-between; align-items:center; margin-bottom:18px;
}
.card-head h3{font-size:15.5px; font-weight:700; margin:0;}
.card-head .sub{font-size:12px; color:var(--gray); margin-top:2px;}
.tabs{display:flex; gap:6px; background:var(--gray-light); padding:4px; border-radius:8px; flex-wrap:wrap;}
.tabs span,.tabs button{
  padding:6px 12px; font-size:12px; font-weight:600; border-radius:6px; cursor:pointer; color:var(--gray);
  background:transparent; border:0; font-family:inherit;
}
.tabs span.active,.tabs button.active{background:var(--card-bg); color:var(--dark); box-shadow:0 1px 2px rgba(0,0,0,.08);}
.chart-placeholder{
  height:260px; border-radius:8px;
  display:flex; align-items:flex-end; gap:10px; padding:10px 4px;
}
.chart-placeholder .bar{
  flex:1; background:linear-gradient(180deg,var(--primary),#8fd8ff);
  border-radius:6px 6px 0 0; position:relative;
}
.chart-placeholder .bar span{
  position:absolute; bottom:-22px; left:0; right:0; text-align:center;
  font-size:10.5px; color:var(--gray);
}
.activity-item{display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--border);}
.activity-item:last-child{border-bottom:none;}
.activity-dot{
  width:36px; height:36px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:13px;
}
.activity-text{font-size:13px;}
.activity-time{font-size:11.5px; color:var(--gray); margin-top:2px;}
.table-card{background:var(--card-bg); border-radius:var(--card-radius); border:1px solid var(--border); padding:22px;}
table{width:100%; border-collapse:collapse;}
thead th{
  text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--gray); padding:12px 10px; border-bottom:1px solid var(--border); font-weight:600;
}
tbody td{padding:14px 10px; border-bottom:1px solid var(--border); font-size:13.5px;}
tbody tr:last-child td{border-bottom:none;}
.cell-user{display:flex; align-items:center; gap:10px;}
.cell-user .mini-avatar{
  width:34px; height:34px; border-radius:8px; background:var(--gray-light);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12px; color:var(--gray);
}
.cell-user .u-name{font-weight:600;}
.cell-user .u-email{font-size:11.5px; color:var(--gray);}
.status-pill{
  padding:5px 12px; border-radius:6px; font-size:11.5px; font-weight:700;
}
.status-pill.active{background:var(--success-light); color:var(--success);}
.status-pill.pending{background:var(--warning-light); color:#a17c00;}
.status-pill.blocked{background:var(--danger-light); color:var(--danger);}
.row-actions i{
  width:30px; height:30px; border-radius:6px; background:var(--gray-light); color:var(--gray);
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer; margin-right:4px; font-size:12.5px;
}
.overlay{
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:90;
}
.overlay.show{display:block;}
@media (max-width:1100px){ .grid-2col{grid-template-columns:1fr;} }
@media (max-width:992px){
  .sidebar{transform:translateX(-100%);}
  .sidebar.open{transform:translateX(0);}
  .main-wrapper{margin-left:0;}
  .burger{display:block;}
  .search-box{display:none;}
  .overlay.show{display:block;}
}