/* ==========================================================================
   1. IMPORT GOOGLE FONTS (Inter & Plus Jakarta Sans)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ==========================================================================
   2. GLOBAL RESETS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    background: #f4f6f9;
    color: #1f2937;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. SIDEBAR STYLES
   ========================================================================== */
.sidebar {
    width: 260px;
    height: 100vh;
    background: #000000;
    color: #9ca3af;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    overflow: hidden;
}

.logo {
    padding: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #1f2937;
    height: 65px;
    flex-shrink: 0;
    letter-spacing: -0.2px;
}

.logo i {
    color: #3b82f6;
    min-width: 30px;
    text-align: center;
}

.logo span {
    opacity: 1;
    transition: opacity 0.2s;
    white-space: nowrap;
}

/* ==========================================================================
   4. SIDEBAR MENU
   ========================================================================== */
.menu {
    list-style: none;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.menu::-webkit-scrollbar {
    width: 5px;
}

.menu::-webkit-scrollbar-track {
    background: transparent;
}

.menu::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 10px;
}

.menu::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Module Divider / Section Header */
.menu-divider {
    padding: 16px 20px 6px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.8px;
    user-select: none;
    border-bottom: 1px solid #1f2937;
    margin-bottom: 4px;
}

.menu-item {
    width: 100%;
}

.menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #9ca3af;
    text-decoration: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.25s ease, color 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 0 20px 20px 0;
    margin-right: 10px;
}

.menu-link:hover,
.menu-item.active > .menu-link,
.menu-item.open > .menu-link {
    background: #1f2937;
    color: #ffffff;
}

.link-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-link i.main-icon {
    font-size: 18px;
    min-width: 30px;
    text-align: center;
}

.menu-link span.text {
    opacity: 1;
    transition: opacity 0.2s;
}

.arrow {
    font-size: 11px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

/* Arrow Rotation ON CLICK ONLY */
.menu-item.open > .menu-link .arrow,
.submenu-item.open > .submenu-link .arrow {
    transform: rotate(90deg);
}

/* ==========================================================================
   5. STRICT CLICK-ONLY DROPDOWNS (display: none / block)
   ========================================================================== */

/* Submenu/Childmenu Hidden by Default */
.submenu,
.childmenu {
    list-style: none;
    display: none; /* সম্পূর্ণ হাইড রাখা হবে যাতে কোনো স্পেস না নেয় */
    padding: 0;
    margin: 0;
}

.submenu {
    background: #111827;
}

.childmenu {
    background: #090d16;
}

/* OPEN STATE (ONLY WHEN .open CLASS IS TRIGGERED BY CLICK) */
.menu-item.open > .submenu,
.submenu-item.open > .childmenu {
    display: block; /* ক্লিক করলেই কেবল দৃশ্যমান হবে ও জায়গা নেবে */
}

/* Submenu Links */
.submenu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 10px 65px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.submenu-link:hover,
.submenu-item.active > .submenu-link,
.submenu-item.open > .submenu-link {
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.03);
}

/* Childmenu Links */
.childmenu-link {
    display: block;
    padding: 8px 20px 8px 85px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.childmenu-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   6. MAIN CONTAINER AND TOP NAVBAR
   ========================================================================== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-width: 0;
}

.navbar {
    background: #ffffff;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    flex-shrink: 0;
    z-index: 90;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 15px 8px 38px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    font-size: 13.5px;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
}

/* ==========================================================================
   7. HEADER DROPDOWNS ROW
   ========================================================================== */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-dropdown-wrapper {
    position: relative;
}

.nav-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    color: #4b5563;
}

.nav-trigger-btn:hover,
.nav-dropdown-wrapper.active .nav-trigger-btn {
    background: #f3f4f6;
    color: #111827;
}

.nav-trigger-btn i.icon-main {
    font-size: 20px;
}

.badge-wrapper {
    position: relative;
    display: inline-flex;
}

.badge {
    position: absolute;
    top: -5px;
    right: -6px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 10px;
    border: 2px solid #ffffff;
}

.badge-blue { background: #3b82f6; }
.badge-red { background: #ef4444; }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
}

.user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #1f2937;
}

.chevron-down {
    font-size: 11px;
    color: #9ca3af;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown-wrapper.active .chevron-down {
    transform: rotate(180deg);
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    padding: 8px 0;
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    pointer-events: none;
}

.nav-dropdown-wrapper.active .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.width-msg { width: 290px; }
.width-notif { width: 290px; }
.width-profile { width: 220px; }

.panel-header {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
}

.panel-header strong {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.panel-header span {
    font-size: 12px;
    color: #6b7280;
}

.panel-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.panel-item:last-child {
    border-bottom: none;
}

.panel-item:hover {
    background: #f9fafb;
    color: #111827;
}

.item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-title {
    font-weight: 600;
    color: #111827;
}

.item-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.panel-item i {
    font-size: 16px;
    margin-top: 2px;
}

.icon-blue { color: #3b82f6; }
.icon-green { color: #10b981; }
.icon-gray { color: #9ca3af; }

.dropdown-panel hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 6px 0;
}

.text-danger, .text-danger i {
    color: #ef4444 !important;
}

.panel-footer {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    padding: 8px 0 2px 0;
}

.panel-footer:hover {
    text-decoration: underline;
}

/* ==========================================================================
   8. SCROLLABLE CONTENT AREA & DASHBOARD LAYOUT
   ========================================================================== */
.content-scrollable-area {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.dashboard-grid-layout {
    display: flex;
    width: 100%;
    height: calc(100vh - 65px);
}

.main-page-content {
    flex: 0 0 85%;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    padding: 30px;
}

.right-content-panel {
    flex: 0 0 15%;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    height: 100%;
    overflow-y: auto;
    padding: 30px 20px;
}

.main-page-content::-webkit-scrollbar,
.right-content-panel::-webkit-scrollbar {
    width: 6px;
}

.main-page-content::-webkit-scrollbar-thumb,
.right-content-panel::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.main-page-content::-webkit-scrollbar-thumb:hover,
.right-content-panel::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.panel-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 15px;
    font-weight: 700;
}

.quick-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4b5563;
    text-decoration: none;
    font-size: 13.5px;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.quick-list li a:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

.quick-list li a i {
    color: #9ca3af;
}

.quick-list li a:hover i {
    color: #3b82f6;
}

.dashboard-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.welcome-sec {
    margin-bottom: 25px;
}

.welcome-sec h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.welcome-sec p {
    color: #6b7280;
    font-size: 14px;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-info p {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.blue-card { background: #eff6ff; color: #3b82f6; }
.green-card { background: #ecfdf5; color: #10b981; }
.purple-card { background: #f5f3ff; color: #8b5cf6; }
.orange-card { background: #fff7ed; color: #f97316; }

.content-panel {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.content-panel h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
}