/* ======================
   GLOBAL (dashboard-dengue style)
====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #eaf4ec, #f6fbf7);
  color: #2c3e50;
  margin: 0;
  display: flex;
  min-height: 100vh;
}

/* ======================
   DASHBOARD LAYOUT
====================== */
.dashboard {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ======================
   HEADER (dashboard-dengue)
====================== */
.header {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  padding: 16px 22px;
  border-radius: 14px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.header h1 {
  font-size: 20px;
  margin-bottom: 5px;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
}

/* ======================
   KPI (dashboard-dengue)
====================== */
.kpi-row {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.kpi {
  position: relative;
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  transition: 0.2s;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 6px;
  background: #2e7d32;
}

.kpi:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

.kpi span {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1b5e20;
  margin-top: 10px;
}

/* ================= SIDEBAR ================= */
.sidebar{
width:280px;
background:linear-gradient(180deg, #1a365d 0%, #2c5282 100%);
color:white;
height:100vh;
position:sticky;
top:0;
display:flex;
flex-direction:column;
flex-shrink:0;
box-shadow:4px 0 15px rgba(0,0,0,0.1);
}

.sidebar-header{
padding:25px 20px;
text-align:center;
border-bottom:1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2{
font-size:28px;
margin-bottom:5px;
letter-spacing:1px;
}

.sidebar-header p{
font-size:12px;
opacity:0.8;
text-transform:uppercase;
letter-spacing:2px;
}

.sidebar-nav{
flex:1;
padding:20px 0;
}

.sidebar-nav a{
display:block;
color:rgba(255,255,255,0.9);
padding:15px 25px;
text-decoration:none;
font-size:15px;
transition:all 0.3s;
border-left:4px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active{
background:rgba(255,255,255,0.1);
border-left-color:#48bb78;
color:white;
}

.sidebar-footer{
padding:20px;
text-align:center;
border-top:1px solid rgba(255,255,255,0.1);
background:rgba(0,0,0,0.1);
}

.sidebar-footer p{
font-size:11px;
opacity:0.7;
margin-bottom:5px;
}

.sidebar-footer h4{
font-size:16px;
font-weight:600;
}

/* SIDEBAR HIDDEN */
.sidebar.hide{
width:0;
padding:0;
overflow:hidden;
}

/* ================= MAIN CONTENT ================= */
.main{
flex:1;
padding:0;
transition:0.3s;
min-width:0;
}

.main.full{
width:100%;
}

/* ================= HEADER ================= */
.main-header{
background:white;
padding:20px 30px;
display:flex;
align-items:center;
gap:20px;
box-shadow:0 2px 10px rgba(0,0,0,0.08);
position:sticky;
top:0;
z-index:2000;
}

.hamburger{
font-size:20px;
background:#2c5282;
border:none;
color:white;
padding:10px 15px;
border-radius:8px;
cursor:pointer;
transition:0.3s;
}

.hamburger:hover{
background:#1a365d;
transform:scale(1.05);
}

.header-title{
flex:1;
}

.header-title h1{
font-size:24px;
color:#1a365d;
margin-bottom:5px;
font-weight:700;
}

.header-title p{
color:#718096;
font-size:14px;
}

.header-date{
background: linear-gradient(135deg, #2e7d32, #1b5e20);
padding:8px 16px;
border-radius:20px;
font-size:13px;
color:white;
font-weight:500;
display:inline-block;
margin-top:8px;
}

/* ================= SUMMARY CARDS ================= */
.summary-cards{
display:grid;
grid-template-columns:repeat(4, 1fr);
gap:12px;
padding:15px;
}

.card{
background:white;
border-radius:12px;
padding:15px;
display:flex;
flex-direction:column;
align-items:center;
text-align:center;
gap:10px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
transition:transform 0.3s, box-shadow 0.3s;
border-left:5px solid;
}

.card:hover{
transform:translateY(-5px);
box-shadow:0 8px 25px rgba(0,0,0,0.12);
}

.card-blue{border-left-color:#3182ce;}
.card-green{border-left-color:#38a169;}
.card-orange{border-left-color:#dd6b20;}
.card-red{border-left-color:#e53e3e;}

.card-icon{
font-size:24px;
width:40px;
height:40px;
display:flex;
align-items:center;
justify-content:center;
background:#f7fafc;
border-radius:10px;
}

.card-content h3{
font-size:11px;
color:#718096;
text-transform:uppercase;
letter-spacing:1px;
margin-bottom:5px;
}

.card-value{
font-size:18px;
font-weight:700;
color:#2d3748;
margin-bottom:3px;
}

.card-label{
font-size:10px;
color:#a0aec0;
}

/* ================= FILTER SECTION ================= */
.filter-section{
margin:0 30px 5px;
background:white;
border-radius:12px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
overflow:hidden;
}

.filter-header{
background:linear-gradient(90deg, #2c5282 0%, #3182ce 100%);
color:white;
padding:15px 25px;
}

.filter-header h3{
font-size:16px;
font-weight:600;
}

.filter-content{
padding:25px;
display:flex;
align-items:end;
gap:20px;
flex-wrap:wrap;
}

.filter-group{
display:flex;
flex-direction:column;
gap:8px;
flex:1;
min-width:150px;
}

.filter-group label{
font-size:13px;
color:#4a5568;
font-weight:600;
}

.filter-group select{
padding:12px 15px;
border:2px solid #e2e8f0;
border-radius:8px;
font-size:14px;
background:white;
color:#2d3748;
cursor:pointer;
transition:0.3s;
}

.filter-group select:focus{
outline:none;
border-color:#3182ce;
}

.btn-primary{
padding:12px 30px;
background:linear-gradient(90deg, #38a169 0%, #48bb78 100%);
color:white;
border:none;
border-radius:8px;
font-size:14px;
font-weight:600;
cursor:pointer;
transition:0.3s;
text-transform:uppercase;
letter-spacing:1px;
}

.btn-primary:hover{
transform:translateY(-2px);
box-shadow:0 5px 15px rgba(56,161,105,0.4);
}

/* ================= MINI CHARTS ROW (4 & 12 WEEKS) ================= */
.mini-charts-row{
margin:0 30px 30px;
display:flex;
gap:20px;
}

.mini-charts-row .mini-card{
flex:1;
background:white;
border-radius:12px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
padding:20px;
}

.mini-charts-row .mini-chart-wrap{
height:200px;
}

.mini-charts-row .mini-chart-wrap canvas{
width:100% !important;
height:100% !important;
}

/* ================= CHART SECTIONS ================= */
.chart-section{
margin:0 30px 30px;
background:white;
border-radius:12px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
overflow:hidden;
}

.chart-header{
background:#f7fafc;
padding:20px 25px;
display:flex;
justify-content:space-between;
align-items:center;
border-bottom:1px solid #e2e8f0;
}

.chart-header h3{
font-size:18px;
color:#2d3748;
font-weight:600;
}

.chart-badge{
background:#48bb78;
color:white;
padding:6px 15px;
border-radius:20px;
font-size:12px;
font-weight:600;
text-transform:uppercase;
}

.chart-container{
padding:25px;
height:320px;
}

/* ================= SECONDARY SECTION ================= */
.secondary-section{
margin:0 30px 30px;
background:white;
border-radius:12px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
overflow:hidden;
}

.section-header{
background:linear-gradient(90deg, #1a365d 0%, #2c5282 100%);
color:white;
padding:20px 25px;
display:flex;
justify-content:space-between;
align-items:center;
}

.section-title{
font-size:20px;
font-weight:700;
letter-spacing:1px;
}

.section-badges{
display:flex;
gap:15px;
}

.badge{
padding:8px 20px;
border-radius:20px;
font-size:13px;
font-weight:600;
}

.badge-2024{background:#805ad5; color:white;}
.badge-2025{background:#b6c300; color:#1a202c;}
.badge-2026{background:#0b7d77; color:white;}


.secondary-container{
display:flex;
gap:20px;
padding:25px;
}

/* TREND CHART */
.trend-chart-box{
flex:3;
background:#f7fafc;
border-radius:10px;
padding:20px;
border:2px solid #e2e8f0;
}

.trend-header{
margin-bottom:15px;
padding-bottom:15px;
border-bottom:2px solid #e2e8f0;
}

.trend-header h4{
font-size:16px;
color:#2c5282;
font-weight:600;
}

#chartCopy{
width:100% !important;
height:280px !important;
}

/* MINI CHARTS */
.mini-charts-box{
flex:1;
display:flex;
flex-direction:column;
gap:20px;
}

.mini-card{
background:#f7fafc;
border-radius:10px;
padding:20px;
border:2px solid #e2e8f0;
flex:1;
display:flex;
flex-direction:column;
}

.mini-header{
display:flex;
align-items:center;
gap:12px;
margin-bottom:15px;
padding-bottom:15px;
border-bottom:2px solid #e2e8f0;
}

.mini-icon{
font-size:24px;
}

.mini-header h4{
font-size:14px;
color:#2c5282;
font-weight:700;
letter-spacing:1px;
}

.mini-12 .mini-header h4{color:#58b7c0;}
.mini-4 .mini-header h4{color:#59c17a;}

.mini-chart-wrap{
flex:1;
display:flex;
align-items:center;
justify-content:center;
}

.mini-chart-wrap canvas{
width:100% !important;
height:140px !important;
}

/* ================= DATA TABLE ================= */
.data-table-section{
margin:0 30px 30px;
background:white;
border-radius:12px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
overflow:hidden;
}

.table-header{
background:#f7fafc;
padding:20px 25px;
display:flex;
justify-content:space-between;
align-items:center;
border-bottom:1px solid #e2e8f0;
}

.table-header h3{
font-size:18px;
color:#2d3748;
font-weight:600;
}

.btn-export{
padding:10px 20px;
background:#3182ce;
color:white;
border:none;
border-radius:8px;
font-size:13px;
font-weight:600;
cursor:pointer;
transition:0.3s;
}

.btn-export:hover{
background:#2c5282;
}

.table-container{
padding:25px;
overflow-x:auto;
}

table{
width:100%;
border-collapse:collapse;
font-size:14px;
}

thead{
background:#2c5282;
color:white;
}

th{
padding:15px;
text-align:left;
font-weight:600;
text-transform:uppercase;
font-size:12px;
letter-spacing:1px;
}

td{
padding:15px;
border-bottom:1px solid #e2e8f0;
}

tbody tr:hover{
background:#f7fafc;
}

.trend-up{color:#38a169; font-weight:600;}
.trend-down{color:#e53e3e; font-weight:600;}
.trend-same{color:#718096;}

/* ================= CHART AND DATA CONTAINER (SIDE BY SIDE) ================= */
.chart-data-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin: 0 30px 30px;
}

.chart-data-container .chart-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chart-data-container .data-table-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chart-data-container .chart-container {
    flex: 1;
    min-height: 400px;
    overflow: hidden;
}

.chart-data-container .table-container {
    flex: 1;
    overflow-y: auto;
    min-height: 400px;
}

.chart-data-container .chart-header,
.chart-data-container .table-header {
    flex-shrink: 0;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px){
.summary-cards{
grid-template-columns:repeat(2, 1fr);
}

.chart-data-container {
    flex-direction: column;
}

.chart-data-container .chart-container,
.chart-data-container .table-container {
    min-height: 300px;
    max-height: 400px;
}
}

@media (max-width: 768px){
.sidebar{
position:fixed;
z-index:1000;
}

.summary-cards{
grid-template-columns:1fr;
padding:20px;
}

.secondary-container{
flex-direction:column;
}

.filter-content{
flex-direction:column;
align-items:stretch;
}

.filter-group{
width:100%;
}

.mini-charts-row{
flex-direction:column;
margin:0 20px 20px;
}

.mini-charts-row .mini-chart-wrap{
height:180px;
}
}

/* ================= USER INFO CONTAINER (Beautified Login Status) ================= */
.user-info-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 8px 16px 8px 8px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.avatar-initial {
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', Arial, sans-serif;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #38a169;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(56, 161, 105, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(56, 161, 105, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 161, 105, 0);
    }
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a365d;
    line-height: 1.2;
}

.user-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.user-role span {
    font-size: 10px;
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbd38d, #dd6b20);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(221, 107, 32, 0.3);
    flex-shrink: 0;
}

.btn-logout:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(221, 107, 32, 0.5);
    background: linear-gradient(135deg, #fbd38d, #c05621);
}

.btn-logout:active {
    transform: scale(0.95);
}

.btn-logout i {
    transition: transform 0.3s ease;
}

.btn-logout:hover i {
    transform: rotate(-180deg);
}

/* Responsive adjustments for user info */
@media (max-width: 768px) {
    .user-info-container {
        padding: 6px 12px 6px 6px;
        gap: 8px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    .avatar-initial {
        font-size: 15px;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .user-role {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    .btn-logout {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}
