:root{
  --bg:#07101d;
  --bg2:#0d1c36;
  --sidebar:#0a1424;
  --card:rgba(255,255,255,0.08);
  --card-2:rgba(255,255,255,0.06);
  --border:rgba(255,255,255,0.12);
  --text:#ffffff;
  --muted:#bfd0ea;
  --blue:#7db2ff;
  --purple:#8f6fff;
  --success:#3ddc97;
  --warning:#ffb84d;
  --danger:#ff6b81;
  --shadow:0 20px 50px rgba(0,0,0,.35);
  --radius:26px;
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:'Inter',sans-serif;
  min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(125,178,255,.14), transparent 25%),
    radial-gradient(circle at bottom right, rgba(143,111,255,.12), transparent 25%),
    linear-gradient(180deg,var(--bg),var(--bg2));
}

.dashboard-layout{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:100vh;
}

.sidebar{
  background:rgba(5,10,20,.45);
  border-right:1px solid var(--border);
  padding:28px 20px;
  backdrop-filter:blur(18px);
  position:sticky;
  top:0;
  height:100vh;
}

.sidebar-logo{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:28px;
}

.logo-dot{
  width:14px;
  height:14px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--purple));
}

.sidebar-logo h2{
  font-size:26px;
}

.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:28px;
}

.nav-item{
  text-decoration:none;
  color:var(--muted);
  padding:14px 16px;
  border-radius:16px;
  background:transparent;
  transition:.25s ease;
  font-weight:600;
}

.nav-item:hover,
.nav-item.active{
  color:#fff;
  background:rgba(255,255,255,0.08);
  border:1px solid var(--border);
}

.sidebar-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
}

.sidebar-card p{
  color:var(--muted);
  line-height:1.7;
  margin-bottom:14px;
}

.sidebar-card button{
  width:100%;
  height:48px;
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg,var(--blue),var(--purple));
  color:white;
  font-weight:700;
  cursor:pointer;
}

.main-content{
  padding:28px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:26px;
  flex-wrap:wrap;
}

.topbar-left{
  display:flex;
  align-items:center;
  gap:16px;
}

.menu-btn{
  display:none;
  width:48px;
  height:48px;
  border:none;
  border-radius:14px;
  background:var(--card);
  color:#fff;
  font-size:22px;
  cursor:pointer;
  border:1px solid var(--border);
}

.section-label{
  color:var(--muted);
  font-size:14px;
  margin-bottom:6px;
}

.topbar-left h1{
  font-size:38px;
  line-height:1.1;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.search-box{
  width:240px;
  height:52px;
  border:none;
  outline:none;
  border-radius:16px;
  padding:0 16px;
  background:var(--card);
  border:1px solid var(--border);
  color:var(--text);
}

.search-box::placeholder{
  color:var(--muted);
}

.user-box{
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:10px 14px;
}

.avatar{
  width:44px;
  height:44px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  background:linear-gradient(135deg,var(--blue),var(--purple));
}

.user-box span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-top:4px;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:20px;
}

.stat-card,
.panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
}

.stat-card{
  padding:22px;
}

.stat-card span{
  display:block;
  color:var(--muted);
  margin-bottom:10px;
}

.stat-card h2{
  font-size:34px;
  margin-bottom:10px;
}

.positive{
  color:var(--success);
  font-weight:600;
}

.negative{
  color:var(--danger);
  font-weight:600;
}

.content-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
  margin-bottom:20px;
}

.bottom-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
}

.panel{
  padding:22px;
}

.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.panel-head.simple{
  margin-bottom:18px;
}

.panel-label{
  color:var(--muted);
  font-size:14px;
  margin-bottom:6px;
}

.panel-head h3{
  font-size:28px;
}

.chart-filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.chart-btn{
  border:none;
  padding:10px 14px;
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  border:1px solid var(--border);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}

.chart-btn.active{
  background:linear-gradient(135deg,var(--blue),var(--purple));
  color:#fff;
}

.chart-area{
  height:320px;
  display:flex;
  align-items:flex-end;
}

.chart-bars{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:16px;
  align-items:end;
}

.bar-group{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  height:100%;
  justify-content:flex-end;
}

.bar{
  width:100%;
  max-width:46px;
  border-radius:18px 18px 8px 8px;
  background:linear-gradient(180deg,var(--blue),var(--purple));
  box-shadow:0 14px 24px rgba(125,178,255,.16);
  transition:.3s ease;
}

.bar-group span{
  color:var(--muted);
  font-size:13px;
}

.progress-item{
  margin-bottom:18px;
}

.progress-item:last-child{
  margin-bottom:0;
}

.progress-text{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.progress-text span{
  color:var(--muted);
}

.progress-bar{
  width:100%;
  height:12px;
  background:rgba(255,255,255,0.07);
  border-radius:999px;
  overflow:hidden;
  border:1px solid var(--border);
}

.progress-bar div{
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,var(--blue),var(--purple));
}

.table-wrap{
  overflow-x:auto;
}

table{
  width:100%;
  border-collapse:collapse;
}

th,
td{
  text-align:left;
  padding:14px 10px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

th{
  color:var(--muted);
  font-size:14px;
  font-weight:600;
}

td{
  font-size:15px;
}

.status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
}

.status.success{
  color:#8ef0c1;
  background:rgba(61,220,151,0.16);
}

.status.pending{
  color:#ffd58a;
  background:rgba(255,184,77,0.16);
}

.status.failed{
  color:#ff9cab;
  background:rgba(255,107,129,0.16);
}

.insight-card{
  padding:18px;
  border-radius:18px;
  background:rgba(255,255,255,0.05);
  border:1px solid var(--border);
  margin-bottom:14px;
}

.insight-card:last-child{
  margin-bottom:0;
}

.insight-card h4{
  margin-bottom:8px;
  font-size:18px;
}

.insight-card p{
  color:var(--muted);
  line-height:1.7;
}

@media (max-width:1100px){
  .stats-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .content-grid,
  .bottom-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:860px){
  .dashboard-layout{
    grid-template-columns:1fr;
  }

  .sidebar{
    position:fixed;
    left:-100%;
    width:280px;
    z-index:20;
    transition:.3s ease;
  }

  .sidebar.show{
    left:0;
  }

  .menu-btn{
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .main-content{
    padding:20px;
  }
}

@media (max-width:640px){
  .stats-grid{
    grid-template-columns:1fr;
  }

  .topbar-left h1{
    font-size:30px;
  }

  .search-box{
    width:100%;
  }

  .topbar-right{
    width:100%;
  }

  .user-box{
    width:100%;
  }
}