/* ==========================================================================
   ১. বেসিক স্টাইল ও মেইন লেআউট
   ========================================================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    display: flex;
    flex-direction: row;
}

/* ==========================================================================
   ২. ডেস্কটপ সাইডবার এবং প্রোফাইল সেটিংস
   ========================================================================== */
.sidebar {
    width: 260px;
    background-color: #2c3e50;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 20px;
    z-index: 999;
    box-sizing: border-box;
    overflow-y: auto;
}

.sidebar h2 {
    color: #fff;
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
}

.sidebar button {
    width: 100%;
    padding: 15px 25px;
    text-align: left;
    background: none;
    border: none;
    font-size: 16px;
    color: #95a5a6;
    cursor: pointer;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.sidebar button:hover, .sidebar button.active {
    color: #ffffff;
    background-color: #34495e;
    border-left: 4px solid #28a745;
}

.user-profile {
    padding: 15px;
    margin: 0 15px 20px 15px;
    background-color: #34495e;
    border-radius: 8px;
    text-align: center;
}

.user-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 3px solid #28a745;
    margin-bottom: 8px;
    object-fit: cover;
}

.user-name { color: #ffffff; font-size: 15px; font-weight: bold; }
.user-email { color: #bdc3c7; font-size: 12px; margin-bottom: 12px; word-break: break-all; }

.btn-view-profile {
    width: 100% !important;
    background-color: #28a745 !important;
    color: white !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: bold;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   ৩. 🎯 ডাইনামিক ৪-কলাম গ্রিড ও চার কোণা মেনু স্টাইল (ডেস্কটপ ও মোবাইল উভয়ের জন্য)
   ========================================================================== */
.menu-grid {
    display: grid;
    /* 👈 গুরুত্বপূর্ণ: যেকোনো স্ক্রিনেই ১ লাইনে ঠিক ৪টি সমান কলাম তৈরি করবে */
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; /* প্রতিটি বাটনের মাঝখানের ফাঁকা জায়গা */
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* চার কোণা বিশিষ্ট গ্রিড মেনু বাটন */
.grid-item-btn {
    background-color: #ffffff;
    border: 5px solid #000000;
    border-radius: 10px !important; 
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.grid-item-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #28a745;
}

.grid-item-btn.active {
    background-color: #e8f5e9;
    border-color: #28a745;
    color: #28a745;
}

.grid-item-btn .grid-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.grid-item-btn .grid-title {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
}

/* ==========================================================================
   ৪. মেইন কন্টেন্ট এরিয়া ও ফিক্সড সেটিংস
   ========================================================================== */
.main-content {
    margin-left: 260px;
    padding: 40px;
    width: calc(100% - 260px);
    box-sizing: border-box;
}

.page {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.status-bar {
    font-weight: bold;
    color: #555;
    padding: 12px;
    background: #e9ecef;
    border-left: 5px solid #28a745;
    border-radius: 4px;
}

/* 🔒 ফিক্সড মোবাইল হেডার ও ফুটার */
.mobile-header {
    display: none;
    width: 100%;
    background-color: #2c3e50;
    color: white;
    padding: 15px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1005;
    height: 60px;
    box-sizing: border-box;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle-btn {
    background: #34495e;
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 4px;
}

.fixed-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1005;
    height: 60px;
    justify-content: space-around;
    align-items: center;
    box-sizing: border-box;
}

.fixed-footer button {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
}

.fixed-footer button span { font-size: 18px; margin-bottom: 2px; }
.fixed-footer button.active { color: #28a745; }






.fixed-admin {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1005;
    height: 60px;
    justify-content: space-around;
    align-items: center;
    box-sizing: border-box;
}

.fixed-admin button {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
}

.fixed-admin button span { font-size: 18px; margin-bottom: 2px; }
.fixed-admin button.active { color: #28a745; }






/* ==========================================================================
   ৫. 📱 মোবাইল রেসপনসিভ মিডিয়া কোয়েরি
   ========================================================================== */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .mobile-header, .fixed-footer { display: flex; }
    
    .sidebar {
        transform: translateX(-100%);
        top: 60px; 
        height: calc(100vh - 120px);
        width: 100%; 
        position: fixed;
        z-index: 1004;
    }

    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
        margin-top: 75px;    
        margin-bottom: 75px; 
        box-sizing: border-box;
    }

    /* মোবাইলেও গ্রিডের গ্যাপ একটু কমানো হলো যাতে সুন্দর ফিট হয় */
    .menu-grid {
        gap: 8px;
    }
    .grid-item-btn {
        padding: 15px 5px;
    }
    .grid-item-btn .grid-title {
        font-size: 12px;
    }
}
