/* =========================================
   1. CORE VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

:root {
    --afppm-primary: #4caf50;
    --afppm-primary-dark: #388e3c;
    --afppm-blue: #0073aa;
    --afppm-orange: #f39c12;
    --afppm-red: #d63638;
    --afppm-dark: #2c3338;
    --afppm-gray: #646970;
    --afppm-bg: #f4f6f9;
    --afppm-white: #ffffff;
    --afppm-border: #e2e8f0;
    --afppm-sidebar-width: 250px;
    --afppm-header-height: 70px; /* Header Height Increased */
    --afppm-radius: 8px;
    --afppm-shadow: 0 4px 15px rgba(0,0,0,0.05);
    --afppm-font: 'Hind Siliguri', sans-serif;
}

/* Force Full Screen Overlay */
body.afppm-dashboard-active {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important; 
    font-family: var(--afppm-font);
}

.afppm-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999; /* Highest Z-Index to stay on top of theme */
    background-color: var(--afppm-bg);
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* =========================================
   2. TOP WEB HEADER (Fixed Top)
   ========================================= */
.afppm-web-header {
    height: var(--afppm-header-height);
    background: var(--afppm-white);
    border-bottom: 1px solid var(--afppm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 1001;
}


 
.afppm-brand {
    display: flex; align-items: center; gap: 10px;
}
.afppm-brand img { height: 40px; width: auto; }
.afppm-brand span { font-size: 22px; font-weight: 700; color: var(--afppm-primary); text-transform: uppercase; }

/* Web Menu (Desktop) */
.afppm-top-menu { display: flex; gap: 25px; }
.afppm-top-menu a {
    text-decoration: none; color: var(--afppm-dark); font-weight: 600; font-size: 15px;
    transition: 0.2s; position: relative;
}
.afppm-top-menu a:hover { color: var(--afppm-primary); }

/* User Pill */
.afppm-user-pill {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px; background: #f0fdf4; border: 1px solid #d1fae5;
    border-radius: 30px; cursor: pointer;
}
.afppm-user-pill img { width: 32px; height: 32px; border-radius: 50%; }
.afppm-user-pill span { font-size: 14px; font-weight: 600; color: var(--afppm-dark); }

.afppm-toggle-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--afppm-dark); }

/* =========================================
   3. SIDEBAR & CONTENT (Body Wrapper)
   ========================================= */
.afppm-body-wrapper {
    display: flex;
    flex: 1; /* Takes remaining height */
    overflow: hidden;
    position: relative;
}

/* Sidebar */
.afppm-sidebar {
    width: var(--afppm-sidebar-width);
    background: var(--afppm-white);
    border-right: 1px solid var(--afppm-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.afppm-nav { padding: 25px 15px; }

.afppm-nav-group { margin-bottom: 25px; }
.afppm-nav-label {
    font-size: 11px; text-transform: uppercase; color: #999; font-weight: 700;
    margin-bottom: 10px; padding-left: 12px;
}

.afppm-nav a {
    display: flex; align-items: center; padding: 10px 15px;
    color: var(--afppm-gray); text-decoration: none; font-size: 15px; font-weight: 500;
    border-radius: 8px; margin-bottom: 5px; transition: all 0.2s;
}

.afppm-nav a:hover, .afppm-nav a.active {
    background: #e8f5e9; color: var(--afppm-primary);
}
.afppm-nav a i { width: 22px; margin-right: 10px; text-align: center; }

/* Main Content */
.afppm-main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--afppm-bg);
}

.afppm-content { padding: 30px; flex: 1; }

/* Cards */
.afppm-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px;
}
.afppm-stat-card {
    background: white; padding: 20px; border-radius: var(--afppm-radius);
    box-shadow: var(--afppm-shadow); border-left: 5px solid #ccc;
}
.card-green { border-left-color: var(--afppm-primary); }
.card-blue { border-left-color: var(--afppm-blue); }
.card-orange { border-left-color: var(--afppm-orange); }

.afppm-stat-card h3 { margin: 0 0 5px; font-size: 13px; color: #777; font-weight: 600; text-transform: uppercase; }
.afppm-stat-number { font-size: 28px; font-weight: 700; color: #333; margin: 0; }

/* Charts */
.afppm-charts-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: 25px; margin-bottom: 30px;
}
.afppm-card {
    background: white; border-radius: var(--afppm-radius);
    padding: 25px; box-shadow: var(--afppm-shadow); height: 100%;
}
.afppm-card h3 { margin: 0 0 20px; font-size: 18px; font-weight: 700; color: var(--afppm-dark); }

/* Quick Actions */
.afppm-action-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.afppm-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 20px; border-radius: 8px;
    color: white; text-decoration: none; font-weight: 600; font-size: 14px;
    transition: transform 0.2s; flex: 1; border: none; cursor: pointer;
}
.afppm-action-btn:hover { transform: translateY(-2px); opacity: 0.95; color: white; }

.btn-blue { background: var(--afppm-blue); }
.btn-red { background: var(--afppm-red); }
.btn-orange { background: var(--afppm-orange); }
.btn-green { background: var(--afppm-primary); }

/* Footer */
.afppm-footer {
    text-align: center; padding: 20px; background: var(--afppm-white);
    border-top: 1px solid var(--afppm-border); font-size: 13px; color: #888;
}

/* =========================================
   4. MOBILE RESPONSIVE
   ========================================= */
.afppm-overlay { display: none; }

@media (max-width: 991px) {
    .afppm-top-menu { display: none; } /* Hide Web Menu Links */
    .afppm-toggle-btn { display: block; }
    
    .afppm-sidebar {
        position: fixed; left: -260px; top: var(--afppm-header-height);
        height: calc(100vh - var(--afppm-header-height));
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    .afppm-sidebar.active { left: 0; }
    
    .afppm-main-panel { width: 100%; }
    .afppm-content { padding: 15px; }
    
    .afppm-stats-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Stack Charts Vertically */
    .afppm-charts-grid { grid-template-columns: 1fr; gap: 20px; }
    
    .afppm-overlay {
        display: none; position: fixed; top: var(--afppm-header-height);
        left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 999;
    }
    .afppm-overlay.active { display: block; }
}

@media (max-width: 576px) {
    .afppm-stats-grid { grid-template-columns: 1fr; }
    .afppm-action-buttons { flex-direction: column; }
}



