:root {
    --elite-primary: #009595;
    --elite-primary-dark: #345a6c;
    --elite-secondary: #607d8b;
    --elite-success: #009595;
    --elite-danger: #ef4444;
    --elite-warning: #f59e0b;
    --elite-info: #3b82f6;
    --elite-bg: #f8fbff;
    --elite-card-bg: #ffffff;
    --elite-text: #1e293b;
    --elite-text-muted: #64748b;
    --elite-border: #e2e8f0;
    --sidebar-width: 240px;
    --topbar-height: 70px;
    --elite-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

html,
body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--elite-bg) !important;
    font-family: 'Outfit', sans-serif !important;
    overflow-x: hidden !important;
}

body {
    overflow-y: auto !important;
    /* Single scrollbar on body */
}

/* --- SIDEBAR --- */
.main-sidebar-nav {
    width: var(--sidebar-width) !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    background: #1e293b !important;
    z-index: 10001 !important;
    /* Elevated */
    overflow-y: auto !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: transform 0.3s ease !important;
}

/* Custom Scrollbar for Sidebar */
.main-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.main-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.rd-sidebar-brand {
    height: var(--topbar-height) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Centering added */
    padding: 0 15px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    color: white !important;
}

.rd-sidebar-brand img {
    max-width: 100% !important;
    max-height: 50px !important;
    /* Increased for better visibility */
    height: auto !important;
    border-radius: 0 !important;
    /* Removed border radius for logo flexibility */
}

.nav-list {
    list-style: none !important;
    padding: 12px 8px !important;
    margin: 0 !important;
}

.nav-header {
    color: #00bfbf !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 8px 10px 3px !important;
}

.nav-item a {
    display: flex !important;
    align-items: center !important;
    padding: 6px 12px !important;
    color: #d5d5d5 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    margin-bottom: 1px !important;
    line-height: 1.25 !important;
    transition: 0.2s !important;
}

.nav-item a i {
    width: 18px !important;
    margin-right: 8px !important;
    text-align: center !important;
    font-size: 13px !important;
}

.nav-item a span {
    line-height: 1.2 !important;
}

.nav-item.active a,
.nav-item a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.nav-item.active a {
    background: var(--elite-primary) !important;
    box-shadow: 0 4px 12px rgba(70, 200, 229, 0.3) !important;
}

.nav-item-external {
    margin-top: 12px !important;
    opacity: 0.55 !important;
}

/* --- TOPBAR --- */
.rd-top-bar {
    position: fixed !important;
    top: 0 !important;
    left: var(--sidebar-width) !important;
    right: 0 !important;
    width: auto !important;
    height: var(--topbar-height) !important;
    background: #ffffff !important;
    z-index: 1030 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 25px !important;
    border-bottom: 2px solid #009595 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.rd-top-logo {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
}

@media (max-width: 991px) {
    .rd-top-bar {
        left: 0 !important;
        padding: 0 15px !important;
    }

    .rd-top-bar-left,
    .rd-desktop-title {
        display: none !important;
    }

    .rd-top-logo {
        display: flex !important;
    }

    .rd-mobile-menu-trigger {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

.rd-mobile-menu-trigger,
.rd-mobile-page-header {
    display: none !important;
}


.rd-top-bar-left {
    display: flex !important;
    align-items: center !important;
}

.rd-top-bar-right {
    display: flex !important;
    align-items: center !important;
}

.rd-action-btn {
    width: 36px !important;
    height: 36px !important;
    background: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    position: relative !important;
    transition: all 0.2s !important;
    padding: 0 !important;
}

.rd-action-btn:hover {
    background: #eff6ff !important;
    color: var(--elite-primary) !important;
    border-color: #dbeafe !important;
}

.rd-action-btn i {
    font-size: 15px !important;
}

.rd-profile-trigger div i {
    font-size: 15px !important;
}

.rd-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.rd-nav-toggle {
    display: none !important;
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    cursor: pointer !important;
}

.rd-top-brand {
    font-weight: 700 !important;
    font-size: 18px !important;
    color: var(--elite-text) !important;
}

.rd-action-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    position: relative !important;
    padding: 0 !important;
}

.rd-action-btn:hover {
    background: white !important;
    color: var(--elite-primary) !important;
    border-color: var(--elite-primary) !important;
}

.rd-notify-count {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: #ef4444 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    width: 19px !important;
    height: 19px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3) !important;
    pointer-events: none;
    z-index: 10;
}

.rd-profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: transparent;
    text-decoration: none !important;
}

.rd-profile-trigger:hover {
    background: #f9fafb;
}

.rd-profile-trigger img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: var(--sidebar-width) !important;
    padding: calc(var(--topbar-height) - 66px) 25px 40px !important;
    min-height: 100vh !important;
    background: var(--elite-bg) !important;
    position: relative !important;
    z-index: 1 !important;
}

.page-header {
    margin-bottom: 25px !important;
}

.page-header h2 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

/* --- CARDS & COMPONENTS --- */
.card {
    background: white !important;
    border-radius: 12px !important;
    border: 1px solid var(--elite-border) !important;
    box-shadow: var(--elite-shadow) !important;
    margin-bottom: 30px !important;
    overflow: hidden !important;
}

.card-heading {
    padding: 15px 25px !important;
    border-bottom: 1px solid var(--elite-border) !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    background: white !important;
}

.card-block {
    padding: 25px !important;
}

/* --- GRID & TABLES --- */
/* --- DASHBOARD TOP ROW (FORCED SIDE-BY-SIDE) --- */
.rd-dashboard-top-flex {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    gap: 20px !important;
    margin-bottom: 25px !important;
    align-items: stretch !important;
}

.rd-metrics-section {
    flex: 0 0 65% !important;
    max-width: 65% !important;
}

.rd-stats-section {
    flex: 0 0 calc(35% - 20px) !important;
    max-width: calc(35% - 20px) !important;
    display: flex !important;
}

/* Metrics Grid */
.rd-metrics-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.rd-metric-card-sm {
    background: var(--elite-card-bg);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--elite-shadow);
}

.rd-metric-card-sm:hover {
    transform: translateY(-2px);
}

.rd-metric-card-sm i {
    font-size: 24px;
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rd-metric-info {
    display: flex;
    flex-direction: column;
}

.rd-metric-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--elite-text);
    line-height: 1.2;
}

.rd-metric-label {
    font-size: 12px;
    color: var(--elite-text-muted);
    white-space: nowrap;
}

/* Visitor Sidebar Card (Right) */
.rd-visitor-sidebar-card {
    width: 100%;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
}

.rd-visitor-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rd-visitor-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.rd-visitor-stat:last-child {
    border-bottom: none;
}

.rd-visitor-stat span {
    font-size: 13px;
    color: var(--elite-text-muted);
}

.rd-visitor-stat strong {
    font-size: 15px;
    color: var(--elite-text);
}

@media (max-width: 991px) {
    .rd-dashboard-top-flex {
        flex-direction: column !important;
    }

    .rd-metrics-section,
    .rd-stats-section {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .rd-metrics-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rd-metrics-grid-compact {
        grid-template-columns: 1fr;
    }

    .rd-dashboard-top-row>[class*="col-"] {
        width: 100%;
    }
}

.rd-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
}

@media (max-width: 768px) {
    .rd-metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
        margin-top: 20px !important;
    }
}

.rd-metric-card {
    background: white !important;
    padding: 20px !important;
    border-radius: 12px !important;
    border: 1px solid var(--elite-border) !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    box-shadow: var(--elite-shadow) !important;
}

.rd-metric-card i {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
}

.rd-metric-val {
    display: block !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

.rd-metric-label {
    font-size: 13px !important;
    color: var(--elite-text-muted) !important;
    font-weight: 500 !important;
}

.table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.table th {
    background: #f9fafb !important;
    padding: 12px 15px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: #6b7280 !important;
    border-bottom: 1px solid var(--elite-border) !important;
    text-align: left !important;
}

.table td {
    padding: 12px 15px !important;
    border-bottom: 1px solid var(--elite-border) !important;
    font-size: 14px !important;
    vertical-align: middle !important;
}

/* Action Buttons */
.rd-btn-icon-xs {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
}

/* Forms */
.form-control {
    border-radius: 8px !important;
    border: 1px solid var(--elite-border) !important;
    height: 40px !important;
    font-size: 14px !important;
}

/* --- FOOTER --- */
.footer {
    margin-left: var(--sidebar-width) !important;
    padding: 20px !important;
    background: white !important;
    border-top: 1px solid var(--elite-border) !important;
    text-align: center !important;
    font-size: 13px !important;
    color: #9ca3af !important;
}

/* --- RESPONSIVE --- */
/* Legacy Responsive Cleanup (Removed to avoid conflicts) */

/* Notification Side Panel (Slide from Right) */
.rd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    z-index: 3000000 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rd-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.rd-modal-content {
    position: absolute;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.rd-modal-overlay.open .rd-modal-content {
    right: 0;
}

@media (max-width: 480px) {
    .rd-modal-content {
        width: 300px;
        right: -300px;
    }
}

.rd-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rd-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.rd-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.rd-modal-body {
    padding: 20px;
}

.rd-notif-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    margin-bottom: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.rd-notif-card:hover {
    border-color: var(--elite-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.rd-notif-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.rd-notif-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.rd-notif-info p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #64748b;
}

.rd-top-bar .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    float: left;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    font-size: 14px;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}

.rd-top-bar .dropdown.open .dropdown-menu {
    display: block !important;
}

.rd-profile-info strong {
    display: block;
    font-size: 13px;
    color: #333;
    line-height: 1.1;
}

.rd-profile-info small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 0;
    line-height: 1;
}

/* --- FINAL OVERRIDES FOR COMPACT TABLES --- */
/* We put these at the end of the file to ensure they override everything above */

table.rd-compact-table tr,
table.rd-compact-table td {
    height: 30px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    vertical-align: middle !important;
    line-height: 3 !important;
}

table.rd-compact-table td {
    padding-left: 12px !important;
    padding-right: 12px !important;
    font-size: 13px !important;
}

table.rd-compact-table th {
    padding: 8px 12px !important;
    font-size: 11px !important;
    background: #f8f9fa !important;
}

table.rd-compact-table .badge {
    padding: 2px 8px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

table.rd-compact-table .btn-xs {
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 26px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.rd-action-container {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    align-items: center !important;
    min-width: 80px !important;
    white-space: nowrap !important;
    height: 100% !important;
}

/* --- VISIBILITY UTILITIES --- */
.rd-show-mobile {
    display: none !important;
}

.rd-hide-mobile {
    display: block !important;
}

/* --- MOBILE RESPONSIVE (FORCED OVERRIDES) --- */
@media (max-width: 768px) {
    .rd-show-mobile {
        display: block !important;
    }

    .rd-hide-mobile {
        display: none !important;
    }

    .rd-top-bar {
        left: 0 !important;
        padding: 0 15px !important;
        z-index: 1000001 !important;
        /* Top of everything */
    }

    .rd-hide-mobile,
    .rd-desktop-title {
        display: none !important;
    }

    .rd-mobile-menu-trigger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
    }

    .rd-hamburger-btn {
        background: none;
        border: none;
        font-size: 20px;
        color: #111827;
        cursor: pointer;
        padding: 5px;
    }

    .rd-mobile-logo {
        display: flex !important;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .rd-mobile-logo img {
        max-height: 24px !important;
        filter: brightness(0);
    }

    .rd-mobile-page-header {
        display: block !important;
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        right: 0;
        background: #e1e1e1;
        padding: 12px 15px;
        text-align: center;
        border-bottom: 1px solid #edf2f7;
        z-index: 1000000 !important;
    }

    .rd-mobile-page-header h2 {
        margin: 0;
        font-size: 14px;
        font-weight: 800;
        color: #1e293b;
        font-family: 'Outfit', sans-serif;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Content and Footer Full Width */
    .be-content,
    .main-content,
    .footer {
        margin-left: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
    }

    /* --- 2x2 Grid for Stats --- */
    .rd-metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .rd-metric-card {
        padding: 8px 5px !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 4px !important;
    }

    .rd-metric-card i {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
        margin: 0 !important;
    }

    .rd-metric-val {
        font-size: 18px !important;
    }

    .rd-metric-label {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    .be-content {
        padding-top: calc(var(--topbar-height) + 10px) !important;
    }

    .main-content {
        padding-top: 30px !important;
        margin-top: 0 !important;
    }

    .main-content>.row:first-child {
        margin-top: 0 !important;
    }

    /* CRITICAL: Allow wrapper to show fixed sidebar on mobile */
    .be-wrapper {
        overflow: visible !important;
    }

    /* THE ULTIMATE SIDEBAR FIX (V3 - ID Based Specificity) */
    #rd-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        bottom: 0 !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
        background: #111827 !important;
        z-index: 2000000 !important;
        transition: left 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        display: block !important;
        visibility: visible !important;
        box-shadow: 15px 0 40px rgba(0, 0, 0, 0.5) !important;
        transform: none !important;
    }

    body.rd-sidebar-open #rd-sidebar {
        left: 0 !important;
    }

    /* Ensure content inside doesn't disappear */
    #rd-sidebar .nav-list {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Backdrop Overlay */
    body.rd-sidebar-open::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 1500000 !important;
        animation: rdFadeIn 0.3s ease;
    }
}

@keyframes rdFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- MOBILE MODAL MENU (The Final Fix) --- */
.rd-mobile-sidebar-modal.open .rd-modal-content {
    left: 0 !important;
}

.rd-mobile-sidebar-modal .rd-modal-content {
    right: auto !important;
    left: -280px !important;
    width: 280px !important;
    background: #111827 !important;
    z-index: 2000001 !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4) !important;
}

/* Hide legacy sidebar on mobile to avoid double menu */
@media (max-width: 768px) {

    #rd-sidebar,
    .main-sidebar-nav {
        display: none !important;
    }
}

/* --- HIGHLIGHT ANIMATIONS (Elite Global) --- */
@keyframes rdOrderGlow {
    0% {
        background-color: #fffbeb !important;
        box-shadow: 0 0 0px #10b981;
        transform: scale(1);
    }

    15% {
        background-color: #ecfdf5 !important;
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
        transform: scale(1.02);
    }

    100% {
        background-color: white !important;
        box-shadow: none;
        transform: scale(1);
    }
}

@keyframes rdCallGlow {
    0% {
        background-color: #fffbeb !important;
        box-shadow: 0 0 0px #3b82f6;
        transform: scale(1);
    }

    15% {
        background-color: #eff6ff !important;
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
        transform: scale(1.02);
    }

    100% {
        background-color: white !important;
        box-shadow: none;
        transform: scale(1);
    }
}

.rd-highlight-order {
    animation: rdOrderGlow 4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    z-index: 10 !important;
    position: relative !important;
}

.rd-highlight-call {
    animation: rdCallGlow 4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    z-index: 10 !important;
    position: relative !important;
}

/* --- ELITE ACTIVATION MODAL --- */
.rd-activation-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.rd-activation-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
}

.rd-activation-card {
    background: #fff !important;
    width: 90% !important;
    max-width: 360px !important;
    border-radius: 28px !important;
    padding: 30px !important;
    text-align: center !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(40px) !important;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.rd-activation-overlay.open .rd-activation-card {
    transform: translateY(0) !important;
}

.rd-act-icon {
    width: 70px !important;
    height: 70px !important;
    background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
    border-radius: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 20px !important;
    color: #fff !important;
    font-size: 32px !important;
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.3) !important;
    animation: rdPulse 2s infinite !important;
}

@keyframes rdPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* --- STATUS MODAL ANIMATIONS --- */
@keyframes rdScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- GLOBAL ELITE MODALS & DRAWERS --- */
.rd-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(6px) !important;
    z-index: 3000000 !important;
    display: none;
    padding: 0 !important;
}

.rd-modal-overlay.open {
    display: flex !important;
}

/* Modifiers for Overlay Positioning */
.rd-modal-overlay.rd-drawer-right {
    justify-content: flex-end !important;
    align-items: stretch !important;
}

.rd-modal-overlay.rd-drawer-left {
    justify-content: flex-start !important;
    align-items: stretch !important;
}

.rd-modal-overlay.rd-modal-center {
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
}

/* Side Drawer Content */
.rd-drawer-content {
    background: #fff !important;
    width: 320px !important;
    max-width: 85% !important;
    height: 100% !important;
    position: relative !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 0 !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

/* Animations based on direction */
.rd-drawer-right .rd-drawer-content {
    transform: translateX(100%);
    animation: rdSlideInRight 0.4s forwards;
}

.rd-drawer-left .rd-drawer-content {
    transform: translateX(-100%);
    animation: rdSlideInLeft 0.4s forwards;
}

@keyframes rdSlideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes rdSlideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Centered Status Card */
.rd-status-card {
    background: #fff !important;
    width: 100% !important;
    max-width: 380px !important;
    border-radius: 32px !important;
    padding: 45px 35px !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3) !important;
    animation: rdScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    text-align: center !important;
    position: relative !important;
}

/* Centered Modal Card (For Details, Confirms etc) */
.rd-modal-card {
    background: #fff !important;
    width: 100% !important;
    max-width: 500px !important;
    border-radius: 28px !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3) !important;
    animation: rdScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Specific fix for mobile sidebar dark theme */
.rd-mobile-sidebar-modal .rd-drawer-content {
    background: #111827 !important;
}

.rd-mobile-sidebar-modal .rd-modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.rd-mobile-sidebar-modal .rd-modal-header h3 {
    color: #fff !important;
}

.rd-modal-header {
    padding: 25px 30px 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #f1f5f9 !important;
    flex-shrink: 0 !important;
}

.rd-modal-header h3 {
    margin: 0 !important;
    font-weight: 800 !important;
    font-size: 20px !important;
    color: #1e293b !important;
}

.rd-modal-close {
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 5px !important;
}

.rd-modal-body {
    padding: 25px !important;
    flex: 1 !important;
    overflow-y: auto !important;
}

/* --- PERSONNEL RESTRICTIONS --- */
.rd-is-personel .btn-danger {
    display: none !important;
}

/* --- PROFILE TABS FIX --- */
.rd-profile-tabs {
    border-bottom: 2px solid #f1f5f9 !important;
    margin-bottom: 25px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    list-style: none !important;
    padding-left: 0 !important;
}

.rd-profile-tabs .nav-item {
    margin-bottom: -2px !important;
}

.rd-profile-tabs .nav-link {
    border: none !important;
    padding: 10px 20px !important;
    color: #64748b !important;
    font-weight: 600 !important;
    border-radius: 8px 8px 0 0 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    background: transparent !important;
    display: block !important;
    text-decoration: none !important;
}

.rd-profile-tabs .nav-link:hover {
    color: var(--elite-primary) !important;
    background: #f8fafc !important;
}

.rd-profile-tabs .nav-link.active {
    color: var(--elite-primary) !important;
    border-bottom: 2px solid var(--elite-primary) !important;
    background: transparent !important;
}

/* --- DATATABLES PAGINATION (ELITE DESIGN) --- */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    line-height: 34px !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 4px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border: none !important;
    background: transparent !important;
    color: #64748b !important;
    transition: all 0.2s ease !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f1f5f9 !important;
    color: var(--elite-primary) !important;
}

/* --- SIDEBAR NAV --- */
.left-sidebar,
.main-sidebar {
    background: #0f172a !important;
}

.metisMenu.nav>li.active {
    background: transparent !important;
}

.metisMenu.nav>li.active>a {
    background: #009595 !important;
    color: #fff !important;
    border-radius: 12px !important;
    margin: 5px 15px !important;
    box-shadow: 0 10px 20px rgba(0, 149, 149, 0.4) !important;
    font-weight: 600 !important;
}

.metisMenu.nav>li>a:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    margin: 5px 15px !important;
}

/* --- BUTTON OVERRIDES --- */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #009595 !important;
    border-color: #009595 !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 149, 149, 0.2) !important;
    font-weight: 600 !important;
}

.btn-danger,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background-color: var(--elite-danger) !important;
    border-color: var(--elite-danger) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2) !important;
}

.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: var(--elite-success) !important;
    border-color: var(--elite-success) !important;
    color: #fff !important;
}

/* Fix for Blue Links */
a {
    color: var(--elite-primary);
}

a:hover {
    color: var(--elite-primary-dark);
}

/* DataTables Pagination Fix */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--elite-primary) !important;
    border-color: var(--elite-primary) !important;
    color: #fff !important;
}

/* Keep 'Önceki' and 'Sonraki' buttons rounded-rects instead of circles */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    border-radius: 10px !important;
    width: auto !important;
    padding: 0 16px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.previous:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.next:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #f8fafc !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
}

@media (max-width: 768px) {
    .rd-mobile-mt-minus {
        margin-top: -100px !important;
    }
}

/* --- LARGE CARD NOTIFICATIONS --- */
.rd-large-notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.rd-large-notif-overlay.open {
    opacity: 1;
    visibility: visible;
}
.rd-large-notif-card {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 40px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    transform: scale(0.8) translateY(40px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.rd-large-notif-overlay.open .rd-large-notif-card {
    transform: scale(1) translateY(0);
}
.rd-large-notif-icon {
    width: 120px;
    height: 120px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    margin: 0 auto 25px;
}
.rd-large-notif-title {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 15px;
}
.rd-large-notif-body {
    font-size: 20px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 35px;
    font-weight: 500;
}
.rd-large-notif-btn {
    width: 100%;
    background: var(--elite-primary);
    color: #fff;
    border: none;
    padding: 22px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(0, 149, 149, 0.3);
    transition: all 0.3s;
}
.rd-large-notif-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 149, 149, 0.4);
}
/* --- RESPONSIVE STABILIZATION PATCH (2026-05) --- */

@media (max-width: 991px) {
    .rd-top-bar {
        left: 0 !important;
        padding: 0 12px !important;
        gap: 8px !important;
    }

    .rd-top-bar-left,
    .rd-desktop-title,
    .rd-desktop-only {
        display: none !important;
    }

    .rd-mobile-menu-trigger {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
    }

    .rd-top-bar-right {
        margin-left: auto !important;
        min-width: max-content !important;
    }

    .rd-top-logo {
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        height: auto !important;
        justify-content: flex-start !important;
    }

    .rd-top-logo > div {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .rd-top-logo form {
        flex: 0 1 auto !important;
        min-width: 0 !important;
    }

    .rd-top-logo select {
        width: auto !important;
        max-width: calc(100vw - 240px) !important;
        min-width: 0 !important;
        height: 34px !important;
        font-size: 12px !important;
        padding: 0 8px !important;
    }

    .rd-top-logo a {
        height: 34px !important;
        padding: 0 9px !important;
        font-size: 11px !important;
    }

    .be-content,
    .main-content,
    .footer {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .be-content,
    .main-content {
        box-sizing: border-box !important;
    }

    .be-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: calc(var(--topbar-height) + 10px) !important;
    }

    .main-content {
        padding: 16px 0 28px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .rd-top-bar {
        height: calc(var(--topbar-height) - 10px) !important;
        padding: 0 10px !important;
        background: #062737 !important;
        border-bottom-color: #010b1b !important;
    }

    /* Dashboard summary cards: 2x2 layout on phones */
    .rd-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin-top: 0 !important;
    }

    .rd-metrics-grid > div,
    .rd-metrics-grid > .rd-metric-card,
    .rd-metrics-grid > .rd-metric-card.elite {
        min-width: 0 !important;
        width: 100% !important;
    }

    .rd-metrics-grid * {
        word-break: break-word;
    }

    .rd-top-logo select {
        font-size: 12px !important;
        height: 32px !important;
        max-width: calc(100vw - 205px) !important;
    }

    .rd-top-logo a {
        font-size: 11px !important;
        height: 32px !important;
    }

    .main-content {
        padding: 4px 0 24px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .main-content > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .main-content > .row > [class^="col-"],
    .main-content > .row > [class*=" col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .card,
    .rd-glass-card,
    .panel,
    .widget,
    .rd-elite-card {
        overflow-x: auto !important;
    }
}

@media (max-width: 430px) {
    .rd-top-bar {
        gap: 6px !important;
        padding: 0 8px !important;
    }

    .rd-top-logo {
        min-width: 0 !important;
    }

    .rd-top-logo > div {
        gap: 4px !important;
    }

    .rd-top-logo select {
        max-width: calc(100vw - 192px) !important;
        font-size: 11px !important;
        padding: 0 6px !important;
    }

    .rd-top-logo a {
        font-size: 10px !important;
        padding: 0 6px !important;
    }

    .main-content {
        padding: 12px 8px 22px !important;
    }
}

/* --- TABLET USES MOBILE LAYOUT (up to 1024px) --- */
@media (max-width: 1024px) {
    .main-sidebar-nav,
    #rd-sidebar {
        display: none !important;
    }

    .rd-show-mobile {
        display: block !important;
    }

    .rd-hide-mobile {
        display: none !important;
    }

    .rd-top-bar {
        left: 0 !important;
    }

    .be-content,
    .main-content,
    .footer {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .be-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: calc(var(--topbar-height) + 10px) !important;
    }

    .main-content {
        padding: 4px 0 24px !important;
        margin-right: 0 !important;
    }

    .main-content > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .main-content > .row > [class^="col-"],
    .main-content > .row > [class*=" col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .rd-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}

/* --- GLOBAL PAGE HARMONIZATION (ALL APP PAGES) --- */
.main-content.container,
.main-content.container-fluid {
    margin-left: var(--sidebar-width) !important;
    padding: calc(var(--topbar-height) - 66px) 25px 40px !important;
    max-width: none !important;
}

@media (max-width: 1024px) {
    .main-content.container,
    .main-content.container-fluid {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 4px 0 24px !important;
    }

    .main-content.container > .row,
    .main-content.container-fluid > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .main-content.container > .row > [class^="col-"],
    .main-content.container > .row > [class*=" col-"],
    .main-content.container-fluid > .row > [class^="col-"],
    .main-content.container-fluid > .row > [class*=" col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
    }

    .card-block,
    .panel-body {
        max-width: 100% !important;
    }
}

/* --- STANDARD PAGE TITLE SPACING (RAPORLAR REFERENCE) --- */
.main-content.rd-page-standardized {
    margin-top: 10px !important;
}

.main-content.rd-page-standardized .rd-mobile-header-box {
    background: #fff !important;
    padding: 20px 25px !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
    margin: 0 0 14px !important;
}

.main-content.rd-page-standardized .rd-mobile-header-box .rd-page-title h2 {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.main-content.rd-page-standardized .rd-mobile-header-box .rd-page-title p {
    margin: 5px 0 0 !important;
    color: #64748b !important;
    font-size: 14px !important;
}

/* Prevent dashboard-only negative pull from overlapping title blocks */
.main-content.rd-page-standardized .rd-metrics-grid {
    margin-top: 0 !important;
}

@media (max-width: 1024px) {
    .main-content.rd-page-standardized {
        margin-top: 12px !important;
    }
}

@media (max-width: 768px) {
    .main-content.rd-page-standardized {
        margin-top: 10px !important;
    }

    .main-content.rd-page-standardized .rd-mobile-header-box {
        padding: 14px 16px !important;
    }
}

/* --- GLOBAL PAGE FLOW TEMPLATE (TOPBAR -> 10PX -> TITLE -> 10PX -> CONTENT) --- */
:root {
    --rd-page-gap-after-topbar: 10px;
    --rd-page-gap-after-title: 10px;
    --rd-active-topbar-height: var(--topbar-height);
}

@media (max-width: 768px) {
    :root {
        --rd-active-topbar-height: calc(var(--topbar-height) - 10px);
    }
}

.be-content {
    padding-top: calc(var(--rd-active-topbar-height) + var(--rd-page-gap-after-topbar)) !important;
}

.main-content,
.main-content.container,
.main-content.container-fluid {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.main-content.rd-page-standardized {
    margin-top: 0 !important;
}

.main-content.rd-page-standardized .rd-mobile-header-box,
.main-content .rd-mobile-header-box,
.main-content .rd-page-header,
.main-content > .page-header {
    margin-bottom: var(--rd-page-gap-after-title) !important;
}

/* ==========================================================================
   --- ELITE MODERN TOPBAR DESKTOP RE-DESIGN CUSTOM DROPDOWNS ---
   ========================================================================== */

/* Dropdown Container */
.rd-custom-dropdown {
    position: relative;
    display: inline-block;
}

/* Trigger Buttons */
.rd-dropdown-ghost-btn {
    height: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rd-dropdown-ghost-btn:hover {
    background: #eff6ff;
    color: #009595;
    border-color: #ccfbf1;
    transform: translateY(-1px);
}

.rd-dropdown-ghost-btn i {
    font-size: 14px;
}

/* Profile Specific Trigger */
.rd-profile-dropdown-btn {
    height: 38px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    border-radius: 12px;
    padding: 0 10px 0 6px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rd-profile-dropdown-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.rd-profile-dropdown-btn img.rd-avatar {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.rd-profile-dropdown-btn span.rd-username {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rd-profile-dropdown-btn i.fa-angle-down {
    color: #64748b;
    font-size: 12px;
    transition: transform 0.2s;
}

.rd-custom-dropdown.open .rd-profile-dropdown-btn i.fa-angle-down {
    transform: rotate(180deg);
}

/* Dropdown Menu Box */
.rd-custom-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.05);
    min-width: 230px;
    z-index: 2050;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.rd-custom-dropdown.open .rd-custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header Details (Profile Card) */
.rd-dropdown-header-card {
    padding: 12px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rd-dropdown-header-name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.rd-dropdown-header-role {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rd-dropdown-header-badge {
    margin-top: 4px;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 800;
    color: #0f766e;
    background: #ccfbf1;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rd-dropdown-header-badge.trial {
    background: #fef08a;
    color: #854d0e;
}

/* Items inside dropdown */
.rd-custom-dropdown-menu .rd-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 0;
}

.rd-custom-dropdown-menu a.rd-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.rd-custom-dropdown-menu a.rd-dropdown-item:hover {
    background: #f1f5f9;
    color: #009595;
    padding-left: 20px;
}

.rd-custom-dropdown-menu a.rd-dropdown-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: #64748b;
    transition: color 0.15s ease;
}

.rd-custom-dropdown-menu a.rd-dropdown-item:hover i {
    color: #009595;
}

/* Minimalist Add Restaurant Icon Ghost Button next to Selector */
.rd-select-plus-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rd-btn-plus-ghost {
    width: 36px;
    height: 36px;
    background: #f8fafc;
    border: 1px solid #d9e2ef;
    color: #009595;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.rd-btn-plus-ghost:hover {
    background: #009595;
    color: #ffffff;
    border-color: #009595;
    transform: scale(1.05);
}

/* ==========================================================================
   --- ELITE FLOATING GLASS SIDEBAR & ACCORDION CUSTOM STYLES ---
   ========================================================================== */

/* Custom Scrollbar for Sidebar */
.main-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.main-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}

.main-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

/* Floating Glass Sidebar */
.main-sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    width: calc(var(--sidebar-width) - 24px) !important;
    height: calc(100vh - 24px) !important;
    margin: 12px !important;
    border-radius: 24px !important;
    background: rgba(15, 23, 42, 0.96) !important; /* Obsidian Deep Slate */
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
    padding-bottom: 8px !important;
}

.rd-sidebar-brand {
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin-bottom: 8px !important;
    flex: 0 0 auto !important;
}

/* Accordion Sidebar List */
.main-sidebar-nav .nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    list-style: none !important;
    flex: 1 1 auto !important;
}

.nav-group {
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    border-radius: 14px !important;
    transition: all 0.3s ease !important;
}

/* Accordion Header */
.nav-group-header {
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 12px !important;
    color: #94a3b8 !important; /* Muted cool slate */
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    cursor: pointer !important;
    border-radius: 10px !important;
    transition: all 0.22s ease !important;
    user-select: none !important;
}

.nav-group-header:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.nav-group-header .caret {
    font-size: 12px !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #64748b !important;
}

.nav-group.open .nav-group-header .caret {
    transform: rotate(180deg) !important;
    color: #ffffff !important;
}

.nav-group.open .nav-group-header {
    color: #ffffff !important;
}

/* Collapsible Submenus */
.nav-group-items {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    overflow: hidden !important;
    max-height: 0 !important;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-group.open .nav-group-items {
    max-height: 500px !important; /* Fits all submenu links */
}

/* Sub-items styling */
.nav-group-items .nav-item {
    margin: 0 !important;
    list-style: none !important;
}

.nav-group-items .nav-item a {
    height: 36px !important;
    padding: 0 12px 0 28px !important; /* Beautifully indented */
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    background: transparent !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}

.nav-group-items .nav-item a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.04) !important;
    padding-left: 32px !important;
}

.nav-group-items .nav-item.active a {
    color: #ffffff !important;
    background: linear-gradient(135deg, #009595 0%, #007373 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 149, 149, 0.22) !important;
}

.nav-group-items .nav-item a i {
    font-size: 13px !important;
    width: 16px !important;
    margin-right: 8px !important;
    color: #64748b !important;
    transition: color 0.2s ease !important;
}

.nav-group-items .nav-item.active a i,
.nav-group-items .nav-item a:hover i {
    color: #ffffff !important;
}

/* Bottom Upgrade Widget in Sidebar */
.rd-sidebar-upgrade-card {
    margin: auto 12px 12px 12px !important; /* Automatically pushes to bottom */
    padding: 12px !important;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    text-align: center !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
    flex: 0 0 auto !important;
}

.rd-sidebar-upgrade-icon {
    width: 32px !important;
    height: 32px !important;
    background: rgba(234, 179, 8, 0.1) !important;
    color: #eab308 !important; /* Premium Gold */
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    margin-bottom: 6px !important;
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.15) !important;
}

.rd-sidebar-upgrade-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-bottom: 1px !important;
    line-height: 1.2 !important;
}

.rd-sidebar-upgrade-text {
    font-size: 10px !important;
    color: #94a3b8 !important;
    line-height: 1.25 !important;
    margin-bottom: 8px !important;
}

.rd-sidebar-upgrade-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 28px !important;
    background: #eab308 !important;
    color: #0f172a !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    transition: all 0.2s ease !important;
}

.rd-sidebar-upgrade-btn:hover {
    background: #facc15 !important;
    transform: translateY(-1px) !important;
}


