/* =======================================
   BLUE, YELLOW, WHITE THEME (REQUEST)
   ======================================= */
:root {
    --primary-color: #0056b3; /* School Blue */
    --primary-dark: #004085;  /* Dark Blue for hover states */
    --accent-gold: #ffc107;   /* School Yellow */
    --bg-light: #f4f8fb;      /* Clean Icy-White Background */
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e2eff8;  /* Soft blue-tinted border */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 250px;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.sidebar-header h2 { font-size: 1.2rem; font-family: 'Playfair Display', serif; }
.sidebar-header .logo-icon { font-size: 1.5rem; color: var(--accent-gold); }
.close-btn { display: none; cursor: pointer; margin-left: auto; font-size: 1.2rem; }

.nav-links { list-style: none; padding: 20px 0; flex-grow: 1; }
.nav-links li a {
    display: flex; align-items: center; gap: 15px;
    padding: 15px 25px; color: var(--text-light);
    text-decoration: none; font-weight: 500; transition: 0.2s;
}
.nav-links li a:hover, .nav-links li.active a {
    background-color: rgba(0, 86, 179, 0.05); /* Soft blue highlight */
    color: var(--primary-color);
    border-right: 4px solid var(--primary-color);
}
.logout-link { border-top: 1px solid var(--border-color); margin-top: auto; }
.logout-link a { color: #d9534f; }

/* --- MAIN CONTENT --- */
.main-content { flex: 1; display: flex; flex-direction: column; width: calc(100% - 250px); }

.top-header {
    background: var(--white); padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--primary-color); }
.user-info { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.avatar-icon { font-size: 2rem; color: var(--primary-color); }

.dashboard-wrapper { padding: 30px; }
.page-title { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--primary-color); margin-bottom: 25px; }

/* --- STATS GRID --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card {
    background: var(--white); padding: 25px; border-radius: 10px;
    display: flex; align-items: center; gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-gold);
}
.stat-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(0, 86, 179, 0.1); /* Soft blue circle */
    color: var(--primary-color);
    display: flex; justify-content: center; align-items: center; font-size: 1.8rem;
}
.stat-details h3 { font-size: 0.9rem; color: var(--text-light); font-weight: 500; }
.stat-details p { font-size: 1.5rem; font-weight: 600; color: var(--text-dark); margin-top: 5px; }

/* --- BUTTONS & TABLES --- */
.table-container { background: var(--white); padding: 25px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border-color); }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.table-header h2 { font-size: 1.2rem; font-family: 'Playfair Display', serif; color: var(--text-dark); }

/* Primary Button */
.btn-primary { background: var(--primary-color); color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.btn-primary:hover { background: var(--primary-dark); }

/* Cancel Button */
.btn-cancel {
    background-color: #dc3545; color: white; border: none; padding: 8px 12px;
    border-radius: 4px; cursor: pointer; font-size: 0.85rem; text-decoration: none;
    transition: 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; 
}
.btn-cancel:hover { background-color: #c82333; }

/* THE NEW SMART SHARE BUTTON */
.btn-share {
    background-color: #e2eff8; color: #0056b3; border: none; padding: 8px 12px;
    border-radius: 4px; cursor: pointer; font-size: 0.85rem; text-decoration: none;
    transition: 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; margin-left: 5px;
}
.btn-share:hover { background-color: #0056b3; color: white; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 86, 179, 0.2); }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f9f9f9; color: var(--text-light); font-weight: 500; font-size: 0.9rem; }
td { font-size: 0.95rem; color: var(--text-dark); }

.badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge.active { background: #e8f5e9; color: #2e7d32; }
.badge.completed { background: #e2eff8; color: #0056b3; }
.badge.pending { background: #fff3e0; color: #ef6c00; }

/* --- MODAL --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.modal-box { background: var(--white); width: 100%; max-width: 500px; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2); border-top: 4px solid var(--accent-gold); }
.modal-header { background: var(--primary-color); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 1.2rem; margin: 0; color: white;}
.close-modal { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.request-form { padding: 25px; }
.input-group { margin-bottom: 15px; }
.input-group label { display: block; font-size: 0.85rem; color: var(--text-dark); margin-bottom: 5px; font-weight: 500; }
.input-group input, .input-group select, .input-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-family: 'Poppins', sans-serif; outline: none; transition: 0.3s; }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 5px rgba(0,86,179,0.1); }
.full-width { width: 100%; padding: 12px; margin-top: 10px; justify-content: center; }

/* --- NOTIFICATION BELL --- */
.header-right { display: flex; align-items: center; gap: 20px; }
.notification-wrapper { position: relative; cursor: pointer; }
.notif-icon { font-size: 1.4rem; color: var(--primary-color); transition: 0.3s; }
.notif-badge { position: absolute; top: -5px; right: -5px; background: #dc3545; color: white; font-size: 0.65rem; font-weight: bold; padding: 2px 5px; border-radius: 50%; border: 2px solid white; }
.notif-dropdown { display: none; position: absolute; top: 35px; right: -10px; background: white; width: 300px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); border-radius: 8px; border: 1px solid var(--border-color); z-index: 1000; overflow: hidden; }
.notif-dropdown h4 { padding: 12px 15px; background: var(--primary-color); color: white; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; margin: 0; font-family: 'Playfair Display', serif; }
.notif-list { list-style: none; padding: 0; margin: 0; max-height: 300px; overflow-y: auto; }
.notif-list li { padding: 12px 15px; border-bottom: 1px solid #eee; font-size: 0.85rem; color: var(--text-dark); transition: 0.2s; line-height: 1.4; }
.notif-list li:hover { background: #f9f9f9; }
.notif-list li.unread { font-weight: 600; background: #e2eff8; border-left: 3px solid var(--primary-color); } 
.notif-list small { display: block; color: var(--text-light); font-size: 0.75rem; margin-top: 5px; font-weight: 400; }

/* Withdraw Button */
.btn-withdraw {
    background-color: var(--accent-gold); color: #333; border: none; padding: 8px 12px;
    border-radius: 4px; cursor: pointer; font-size: 0.85rem; text-decoration: none; font-weight: 600;
    transition: 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; margin-right: 5px;
}
.btn-withdraw:hover { background-color: #e0a800; }

/* GCash specific modal styling */
.gcash-header {
    background-color: #007bff; /* GCash Blue stays the same for brand recognition */
    color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center;
}
.gcash-header h2 { font-size: 1.2rem; margin: 0; display: flex; align-items: center; gap: 8px; color: white;}

/* --- PROGRESS BARS --- */
.progress-wrapper { background: #e9ecef; border-radius: 10px; height: 8px; width: 100%; margin-top: 5px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
.progress-fill { background: #28a745; height: 100%; border-radius: 10px; transition: width 0.8s ease-in-out; }

/* Edit Button */
.btn-edit {
    background-color: var(--primary-color); color: white; border: none; padding: 8px 12px;
    border-radius: 4px; cursor: pointer; font-size: 0.85rem; text-decoration: none;
    transition: 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; margin-right: 5px;
}
.btn-edit:hover { background-color: var(--primary-dark); }

/* =========================================
   📱 MOBILE & TABLET RESPONSIVE FIXES 
   ========================================= */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        position: fixed;
        z-index: 9999;
        width: 250px;
    }
    
    .sidebar.active { transform: translateX(0); }
    .menu-toggle { display: block !important; cursor: pointer; font-size: 1.5rem; color: var(--primary-color); }
    .close-btn { display: block !important; position: absolute; top: 20px; right: 20px; font-size: 1.5rem; cursor: pointer; color: white; }
    .main-content { margin-left: 0; width: 100%; padding: 15px; }
    .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    .table-container { padding: 15px; border-radius: 10px; }
    .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 10px; }
    .table-responsive table { width: 100%; min-width: 700px; }
    td button, td a { padding: 8px 10px !important; font-size: 0.85rem !important; margin-bottom: 5px; }
    .modal-box { width: 95%; margin: 10px; padding: 20px; max-height: 90vh; overflow-y: auto; }
}

@media (min-width: 769px) {
    .menu-toggle { display: none; }
    .close-btn { display: none; }
}

/* =========================================
   📱 MOBILE FIXES: OVERLAY & NOTIFICATIONS
   ========================================= */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); 
    z-index: 9998; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active { opacity: 1; visibility: visible; }

@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed !important; 
        top: 70px !important; 
        right: 10px !important; 
        width: calc(100vw - 20px) !important; 
        max-width: 350px !important;
    }
}

/* =========================================
   🔨 MAGIC OVERRIDE FOR SNEAKY INLINE BROWNS
   ========================================= */
*[style*="#8B4513"], *[style*="#c6a87c"], *[style*="#6b340e"] { color: var(--primary-color) !important; border-color: var(--accent-gold) !important; }
div[style*="linear-gradient(135deg, #8B4513"] { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important; border-color: var(--primary-dark) !important; color: white !important;}