:root{
  --navy:#0b1f3a;
  --navy-dark:#071527;
  --blue:#1565d8;
  --blue-light:#3d8bff;
  --gold:#f2b705;
  --green:#1fa971;
  --red:#e0483e;
  --gray-bg:#f2f5f9;
  --card-bg:#ffffff;
  --text:#1c2733;
  --text-light:#66768a;
  --border:#e6ebf2;
  --radius:14px;
  --shadow:0 6px 20px rgba(11,31,58,.06);
}
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--gray-bg);
  color:var(--text);
  display:flex;
  min-height:100vh;
}
a{text-decoration:none;color:inherit}
img{max-width:100%}

/* ===== Sidebar ===== */
.sidebar{
  width:250px;flex-shrink:0;
  background:linear-gradient(180deg,var(--navy),var(--navy-dark));
  color:#fff;min-height:100vh;
  position:sticky;top:0;align-self:flex-start;
  display:flex;flex-direction:column;
  padding:22px 0;
}
.sidebar .brand{
  display:flex;align-items:center;gap:10px;
  padding:0 22px 22px;font-weight:800;font-size:1.05rem;
  border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:14px;
}
.sidebar .brand .dot{width:10px;height:10px;border-radius:50%;background:var(--gold)}
.sidebar nav{display:flex;flex-direction:column;gap:2px;padding:0 12px}
.sidebar nav .group-label{
  font-size:.68rem;text-transform:uppercase;letter-spacing:1px;color:#8199b8;
  padding:16px 10px 6px;font-weight:700;
}
.sidebar nav a{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:9px;font-size:.9rem;font-weight:600;
  color:#c7d3e3;transition:background .15s,color .15s;
}
.sidebar nav a:hover{background:rgba(255,255,255,.06);color:#fff}
.sidebar nav a.active{background:var(--gold);color:var(--navy-dark)}
.sidebar nav a .ico{width:18px;text-align:center}
.sidebar-footer{
  margin-top:auto;padding:16px 22px 0;border-top:1px solid rgba(255,255,255,.08);
  font-size:.78rem;color:#8199b8;
}
.sidebar-footer a{color:#c7d3e3;font-weight:700}

/* ===== Main ===== */
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  background:#fff;border-bottom:1px solid var(--border);
  padding:18px 32px;display:flex;align-items:center;justify-content:space-between;
  position:sticky;top:0;z-index:5;
}
.topbar h1{font-size:1.35rem;font-weight:800;color:var(--navy)}
.topbar .sub{font-size:.85rem;color:var(--text-light);margin-top:2px}
.user-chip{display:flex;align-items:center;gap:10px;font-size:.85rem;font-weight:600}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.content{padding:28px 32px 60px}

/* ===== Cards / grid ===== */
.grid{display:grid;gap:20px}
.grid-4{grid-template-columns:repeat(4,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.sidebar{display:none}}

.card{
  background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);
  padding:22px;box-shadow:var(--shadow);
}
.card h3{font-size:.95rem;font-weight:700;color:var(--navy);margin-bottom:14px}
.kpi{padding:20px}
.kpi .label{font-size:.78rem;color:var(--text-light);font-weight:700;text-transform:uppercase;letter-spacing:.4px}
.kpi .value{font-size:1.7rem;font-weight:800;color:var(--navy);margin-top:8px}
.kpi .delta{font-size:.8rem;font-weight:700;margin-top:6px;display:inline-flex;align-items:center;gap:4px}
.delta.up{color:var(--green)}
.delta.down{color:var(--red)}

/* ===== Module hub cards (index) ===== */
.module-card{
  background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);
  padding:26px;box-shadow:var(--shadow);transition:transform .15s,box-shadow .15s;
  display:flex;flex-direction:column;gap:10px;
}
.module-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(11,31,58,.12)}
.module-card .ico{
  width:44px;height:44px;border-radius:11px;background:linear-gradient(135deg,var(--blue),var(--blue-light));
  color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.2rem;
}
.module-card h3{font-size:1.05rem;font-weight:800;color:var(--navy)}
.module-card p{font-size:.85rem;color:var(--text-light)}

/* ===== Table ===== */
table{width:100%;border-collapse:collapse;font-size:.88rem}
th{
  text-align:left;padding:12px 14px;color:var(--text-light);font-weight:700;
  text-transform:uppercase;font-size:.72rem;letter-spacing:.4px;border-bottom:2px solid var(--border);
}
td{padding:13px 14px;border-bottom:1px solid var(--border)}
tr:last-child td{border-bottom:none}
tr:hover td{background:#fafcff}
.badge{
  display:inline-block;padding:4px 10px;border-radius:999px;font-size:.72rem;font-weight:700;
}
.badge.green{background:#e2f6ed;color:var(--green)}
.badge.gold{background:#fff3cd;color:#8a6400}
.badge.red{background:#fde5e3;color:var(--red)}
.badge.blue{background:#e3edfd;color:var(--blue)}
.badge.gray{background:#eef1f5;color:var(--text-light)}

/* ===== Misc ===== */
.section-title{font-size:1.05rem;font-weight:800;color:var(--navy);margin:34px 0 16px}
.section-title:first-child{margin-top:0}
.flex-between{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.pill-filter{display:flex;gap:8px;flex-wrap:wrap}
.pill-filter button{
  border:1px solid var(--border);background:#fff;padding:7px 14px;border-radius:999px;
  font-size:.8rem;font-weight:700;color:var(--text-light);cursor:pointer;
}
.pill-filter button.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.progress-bar{height:8px;border-radius:99px;background:#eef1f5;overflow:hidden}
.progress-bar .fill{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--blue),var(--blue-light))}
.social-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}
.social-row:last-child{border-bottom:none}
.social-ico{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:.85rem;flex-shrink:0}
.chart-box{position:relative;height:280px}
.chart-box.small{height:200px}
.note-banner{
  background:#eef4ff;border:1px solid #cfe0fb;color:#0b3d8f;border-radius:12px;
  padding:14px 18px;font-size:.85rem;margin-bottom:24px;
}
