:root{
  --bg:#F0F9FF;
  --card:#ffffffcc;
  --stroke:#e6f1ff;
  --text:#15223a;
  --muted:#5b6b86;

  --blue:#4FC3F7;
  --pink:#F06292;
  --green:#81C784;
  --yellow:#FFD54F;

  --shadow: 0 16px 40px rgba(15, 43, 78, .10);
  --shadow2: 0 10px 26px rgba(15, 43, 78, .10);
  --radius: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 600px at 20% 10%, #e6f8ff 0, transparent 55%),
              radial-gradient(900px 500px at 80% 20%, #ffe8f1 0, transparent 55%),
              radial-gradient(1000px 600px at 50% 90%, #fff9dc 0, transparent 55%),
              var(--bg);
  color:var(--text);
  overflow-x:hidden;
}

.bg-blob{
  position: fixed;
  filter: blur(40px);
  opacity:.35;
  z-index:-2;
  border-radius: 999px;
}
.b1{ width:360px;height:360px; left:-120px; top:80px; background: var(--blue); }
.b2{ width:420px;height:420px; right:-160px; top:160px; background: var(--pink); }
.b3{ width:380px;height:380px; left:35%; bottom:-180px; background: var(--yellow); }

.overlay{
  position:fixed; inset:0; background:rgba(10,20,40,.28);
  opacity:0; pointer-events:none; transition:.2s;
  z-index:9;
}
.overlay.show{ opacity:1; pointer-events:auto; }

.sidebar{
  position:fixed;
  left:18px; top:18px; bottom:18px;
  width:280px;
  background: linear-gradient(180deg, rgba(79,195,247,.35), rgba(240,249,255,.75));
  border:1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding:16px;
  z-index:10;
  display:flex;
  flex-direction:column;
}

.brand{ display:flex; align-items:center; gap:12px; padding:8px 8px 14px; }
.logo-badge{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), #8be7ff);
  color:#05314a;
  font-weight:900;
  box-shadow: var(--shadow2);
}
.brand-name{ font-weight:900; font-size:18px; letter-spacing:.2px; }
.brand-tagline{ font-size:12px; color:var(--muted); margin-top:2px; }

.nav{ display:flex; flex-direction:column; gap:8px; padding:6px; }
.nav-item{
  display:flex; align-items:center; gap:10px;
  padding:11px 12px;
  border-radius: 16px;
  text-decoration:none;
  color:var(--text);
  border:1px solid transparent;
  transition:.18s;
  font-weight:650;
}
.nav-item .ico{ width:26px; text-align:center; }
.nav-item:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.65);
  border-color: rgba(255,255,255,.85);
}
.nav-item.active{
  background: rgba(255,255,255,.8);
  border-color: rgba(255,255,255,.95);
  box-shadow: 0 8px 18px rgba(12, 32, 66, .08);
}

.sidebar-footer{ margin-top:auto; padding:6px; }
.mini-card{
  padding:14px;
  border-radius: 18px;
  background: rgba(255,255,255,.75);
  border:1px solid rgba(255,255,255,.85);
}
.mini-title{ font-weight:800; font-size:13px; }
.mini-text{ color:var(--muted); font-size:12px; margin-top:6px; line-height:1.35; }

.main{
  margin-left: 320px;
  padding: 18px 22px 26px;
  min-height:100%;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 14px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.7);
  border:1px solid rgba(255,255,255,.85);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(12px);
}

.hello-title{ font-size:18px; font-weight:900; }
.hello-sub{ color:var(--muted); font-size:12px; margin-top:3px; }

.top-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.search{
  display:flex; align-items:center; gap:8px;
  background: rgba(240,249,255,.8);
  border:1px solid rgba(230,241,255,1);
  padding:10px 12px;
  border-radius: 18px;
  min-width: 320px;
}
.search input{
  border:none; outline:none; background:transparent;
  width:100%;
  font-size:13px;
}
.search-ico{ opacity:.75; }

.icon-btn{
  position:relative;
  border:none;
  cursor:pointer;
  padding:10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.9);
  box-shadow: 0 10px 18px rgba(12,32,66,.08);
  transition:.18s;
  font-size:16px;
}
.icon-btn:hover{ transform: translateY(-1px); }

.badge{
  position:absolute;
  top:-6px; right:-6px;
  background: var(--pink);
  color:#fff;
  font-size:11px;
  padding:2px 7px;
  border-radius: 999px;
  border:2px solid rgba(255,255,255,.9);
}

.profile{
  display:flex; align-items:center; gap:10px;
  padding:8px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.9);
}
.avatar{
  width:38px; height:38px; border-radius: 16px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,.7));
  box-shadow: 0 10px 18px rgba(12,32,66,.08);
}
.profile-name{ font-weight:900; font-size:13px; }
.profile-role{ color:var(--muted); font-size:11px; margin-top:2px; }

.grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}

.card{
  grid-column: span 3;
  background: var(--card);
  border:1px solid rgba(255,255,255,.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding:14px;
  backdrop-filter: blur(12px);
}

.card.wide{ grid-column: span 8; }
.card.full{ grid-column: span 12; }

@media (max-width: 1100px){
  .card{ grid-column: span 6; }
  .card.wide{ grid-column: span 12; }
  .search{ min-width: 220px; }
}
@media (max-width: 780px){
  .main{ margin-left: 0; padding: 14px; }
  .sidebar{
    left: 10px; top: 10px; bottom: 10px;
    transform: translateX(-120%);
    transition: .22s ease;
  }
  .sidebar.show{ transform: translateX(0); }
  .mobile-only{ display:inline-flex; }
  .search{ display:none; }
  .grid{ grid-template-columns: repeat(12, 1fr); }
  .card{ grid-column: span 12; }
}
.mobile-only{ display:none; }

.stat{
  display:flex; align-items:center; justify-content:space-between;
  min-height: 108px;
  overflow:hidden;
  position:relative;
}
.stat::after{
  content:"";
  position:absolute;
  width:120px; height:120px;
  right:-40px; bottom:-40px;
  border-radius: 999px;
  opacity:.25;
}
.stat.blue::after{ background: var(--blue); }
.stat.pink::after{ background: var(--pink); }
.stat.green::after{ background: var(--green); }
.stat.yellow::after{ background: var(--yellow); }

.stat-left{ display:flex; flex-direction:column; gap:6px; }
.stat-title{ font-size:12px; color:var(--muted); font-weight:700; }
.stat-value{ font-size:22px; font-weight:1000; letter-spacing:.2px; }
.stat-note{ font-size:12px; color:rgba(21,34,58,.72); font-weight:650; }
.stat-ico{ font-size:30px; }

.card-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.card-title{ font-weight:950; font-size:14px; }
.card-sub{ color:var(--muted); font-size:12px; margin-top:2px; }
.pill{
  font-size:11px;
  padding:6px 10px;
  border-radius: 999px;
  background: rgba(129,199,132,.18);
  border:1px solid rgba(129,199,132,.35);
  font-weight:800;
}

.legend{
  display:flex; align-items:center;
  gap:10px;
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  font-weight:650;
}
.dot{ width:10px; height:10px; border-radius:999px; display:inline-block; }
.dot.d1{ background: rgba(79,195,247,.9); }
.dot.d2{ background: rgba(240,98,146,.9); }
.spacer{ width:18px; display:inline-block; }

.progress-wrap{ padding: 6px 2px 2px; }
.progress-label{
  display:flex; align-items:center; justify-content:space-between;
  font-size:12px; color:var(--muted); font-weight:750;
}
.progress{
  height:12px;
  background: rgba(230,241,255,1);
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(230,241,255,1);
  margin-top:8px;
}
.progress-bar{
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}

.kv{ margin-top:12px; display:flex; flex-direction:column; gap:10px; }
.kv-row{ display:flex; justify-content:space-between; color:rgba(21,34,58,.85); }
.kv-row span{ color:var(--muted); font-size:12px; font-weight:700; }
.kv-row strong{ font-size:13px; font-weight:950; }

.ghost-btn{
  border:none;
  cursor:pointer;
  background: rgba(255,255,255,.65);
  border:1px solid rgba(255,255,255,.9);
  padding:8px 10px;
  border-radius: 14px;
  font-weight:850;
  transition:.18s;
}
.ghost-btn:hover{ transform: translateY(-1px); }

.actions{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
.action-btn{
  border:none;
  cursor:pointer;
  padding:12px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.9);
  box-shadow: 0 10px 18px rgba(12,32,66,.07);
  font-weight:900;
  text-align:left;
  transition:.18s;
}
.action-btn:hover{ transform: translateY(-1px); }
.action-btn:active{ transform: translateY(0); }

.sticky-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
@media (max-width: 1100px){ .sticky-grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 780px){ .sticky-grid{ grid-template-columns: 1fr;} }

.sticky{
  padding:14px;
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.9);
  box-shadow: 0 12px 24px rgba(12,32,66,.08);
  transform: rotate(-0.6deg);
}
.sticky-title{ font-weight:1000; margin-bottom:6px; }
.sticky-text{ color:rgba(21,34,58,.82); font-size:13px; line-height:1.35; }
.sticky-meta{ margin-top:10px; font-size:12px; color:rgba(21,34,58,.65); font-weight:800; }

.sticky.n1{ background: rgba(255, 213, 79, .35); }
.sticky.n2{ background: rgba(79, 195, 247, .28); transform: rotate(0.7deg); }
.sticky.n3{ background: rgba(240, 98, 146, .22); }

.footer{
  margin-top:14px;
  padding: 10px 4px;
  color:rgba(21,34,58,.65);
  font-weight:700;
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.footer-right{ opacity:.9; }

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.95);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  border-radius: 18px;
  opacity:0;
  pointer-events:none;
  transition: .22s;
  font-weight:850;
  z-index: 50;
}
.toast.show{
  opacity:1;
  transform: translateX(-50%) translateY(0);
}

/* Form + table helpers */
.input{
  width:100%;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(230,241,255,1);
  outline:none;
  background: rgba(255,255,255,.75);
}
.input:focus{ border-color: rgba(79,195,247,.9); }

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  border:1px solid rgba(255,255,255,.85);
}
.table th, .table td{
  padding: 10px 12px;
  text-align:left;
  font-size: 13px;
}
.table th{
  font-weight: 950;
  color: rgba(21,34,58,.85);
  background: rgba(240,249,255,.6);
}
.table tr + tr td{ border-top: 1px solid rgba(230,241,255,1); }
