/**
 * Sidebar Navigation and Header Styles
 *
 * Sidebar: 256px expanded, 80px collapsed
 * Colors: blue-600 (#2563eb) to purple-600 (#9333ea) gradient
 */

:root {
    --shell-header-height: 64px;
    --shell-chrome-bg: #e8eef5;
    --shell-chrome-border: #d5deeb;
    --shell-sidebar-bg: #e8eef5;
}

/* ========================================
   SIDEBAR CONTAINER
   ======================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100dvh;
    width: 256px;
    background: var(--shell-sidebar-bg);
    border-right: 1px solid var(--shell-chrome-border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    z-index: 1040;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 80px;
}

/* ========================================
   SIDEBAR HEADER (Logo)
   ======================================== */

.sidebar-header {
    padding: 10px 30px;
    border-bottom: 1px solid var(--shell-chrome-border);
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--shell-header-height);
    box-sizing: border-box;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 10px 12px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    line-height: 0;
    text-decoration: none;
}

.sidebar-logo-full {
    display: block;
    height: 30px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-logo-mark {
    display: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 11px;
    object-fit: cover;
}

.sidebar-brand-text {
    font-weight: 600;
    font-size: 16px;
    color: #111827;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-logo {
    width: auto;
}

.sidebar.collapsed .sidebar-logo-link {
    width: auto;
}

.sidebar.collapsed .sidebar-logo-full {
    display: none;
}

.sidebar.collapsed .sidebar-logo-mark {
    display: block;
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 4px;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: #eef2ff;
    color: #374151;
    text-decoration: none;
}

.nav-item.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.nav-item.active:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.nav-item i {
    width: 20px;
    min-width: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item span {
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

/* Collapsed sidebar nav items */
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}

.sidebar.collapsed .nav-item .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    padding: 2px 5px;
}

/* Nav divider for admin section */
.nav-divider {
    margin: 16px 0;
    border-top: 1px solid #e5e7eb;
}

.sidebar.collapsed .nav-divider {
    margin: 12px 8px;
}

/* Badge in nav item */
.nav-item .badge {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 8px;
}

.sidebar.collapsed .nav-item {
    position: relative;
}

/* ========================================
   SIDEBAR FOOTER
   ======================================== */

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.sidebar-footer .nav-item {
    margin-bottom: 4px;
}

.sidebar-footer .nav-item:last-child {
    margin-bottom: 0;
}

/* ========================================
   MAIN HEADER
   ======================================== */

.main-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--shell-chrome-border);
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    right: 0;
    left: 256px;
    height: var(--shell-header-height);
    box-sizing: border-box;
    z-index: 1030;
    transition: left 0.3s ease;
}

.sidebar.collapsed ~ .main-wrapper .main-header,
body.sidebar-collapsed .main-header {
    left: 80px;
}

/* Page title */
.page-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.page-title-icon i {
    font-size: 18px;
    color: white;
}

/* Gradient variants for page title icon */
.page-title-icon.gradient-yellow-orange {
    background: linear-gradient(135deg, #facc15 0%, #f97316 100%);
}

.page-title-icon.gradient-blue-indigo {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}

.page-title-icon.gradient-green-teal {
    background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
}

.page-title-icon.gradient-purple-pink {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
}

.page-title-text {
    flex: 1;
    min-width: 0;
}

.page-title h1 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
}

.page-title p {
    font-size: 11px;
    color: #6b7280;
    margin: 2px 0 0 0;
    line-height: 1.4;
}

/* Header right section */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header: make "Balance" and primary action buttons visually aligned (light + dark) */
.main-header .balance-box,
.main-header .support-btn,
.main-header .btn-add-link {
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
}

.main-header .support-btn {
    padding: 0 6px;
    border-radius: 6px;
}

/* ========================================
   BALANCE BOX
   ======================================== */

.balance-box {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 2px;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.balance-box:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
}

.balance-box i {
    color: #64748b;
    font-size: 16px;
}

.balance-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1px;
}

.balance-label {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.05;
}

.balance-amount {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.05;
}

/* ========================================
   ADD LINK BUTTON
   ======================================== */

.btn-add-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    text-decoration: none;
}

.btn-add-link:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-add-link:active {
    transform: translateY(0);
}

.btn-add-link i {
    font-size: 18px;
}

/* ========================================
   NOTIFICATION BUTTON
   ======================================== */

.notification-btn {
    position: relative;
    padding: 8px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.notification-btn i {
    font-size: 20px;
}

/* ========================================
   SUPPORT BUTTON
   ======================================== */

.support-btn {
    min-width: 32px;
    height: 40px;
    min-height: 40px;
    padding: 0 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    border: none;
    background: transparent;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.support-btn:hover {
    background: transparent;
    color: #374151;
    border-color: transparent;
    text-decoration: none;
}

.support-btn i {
    font-size: 15px;
    line-height: 1;
    color: #229ed9;
}

.support-btn-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* Notification badge with count */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    line-height: 1;
}

/* ========================================
   USER PROFILE
   ======================================== */

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 14px;
    border-left: 1px solid #e5e7eb;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
    text-decoration: none;
}

.user-profile:hover {
    background: #f9fafb;
    text-decoration: none;
}

.user-profile-wrapper {
    position: relative;
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    padding: 6px;
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.user-profile-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 14px;
}

.user-profile-wrapper:hover .user-profile-menu,
.user-profile-wrapper:focus-within .user-profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-profile-menu-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    border: none;
    background: transparent;
    text-decoration: none;
    color: #1f2937;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-profile-menu-link:hover,
.user-profile-menu-link:focus {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

.user-profile-menu-link i {
    font-size: 15px;
    width: 16px;
    text-align: center;
}

.user-profile-menu-logout {
    color: #dc2626;
}

.user-profile-menu-logout:hover,
.user-profile-menu-logout:focus {
    background: #fef2f2;
    color: #b91c1c;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    line-height: 1.3;
}

.user-email {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

.user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.user-avatar i {
    font-size: 18px;
}

/* ========================================
   MAIN WRAPPER & CONTENT
   ======================================== */

.main-wrapper {
    margin-left: 256px;
    padding-top: var(--shell-header-height);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: #f8fafc;
}

.sidebar.collapsed ~ .main-wrapper,
body.sidebar-collapsed .main-wrapper {
    margin-left: 80px;
}

.main-content {
    padding: 24px;
}

/* Standardize page width against the dashboard shell. */
.main-content > .container,
.main-content > .container-fluid {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* ========================================
   TOOLTIP FOR COLLAPSED SIDEBAR
   ======================================== */

.sidebar.collapsed .nav-item[title] {
    position: relative;
}

.sidebar.collapsed .nav-item::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    margin-left: 12px;
    z-index: 1050;
    pointer-events: none;
}

.sidebar.collapsed .nav-item::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1f2937;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    margin-left: 0;
    z-index: 1050;
}

.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-item:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   NOTIFICATION DROPDOWN ADJUSTMENTS
   ======================================== */

/* Position dropdown relative to new header */
.header-right .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
}

/* Notification dropdown wrapper - ensure proper positioning */
.notification-dropdown-wrapper {
    position: relative;
}

.notification-dropdown-wrapper .notification-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    min-width: 380px !important;
    max-width: 420px !important;
    z-index: 1050 !important;
}

/* Fix for Bootstrap dropdown auto-positioning issues */
.notification-dropdown-wrapper .dropdown-menu[data-popper-placement] {
    inset: auto !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
}

/* Notification dropdown styles are in modern-table.css */

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 1200px) {
    .header-right {
        gap: 10px;
    }

    .balance-box {
        padding: 4px 8px;
    }

    .btn-add-link span {
        display: none;
    }

    .btn-add-link {
        padding: 8px 12px;
    }
}

@media (max-width: 992px) {
    body.sidebar-mobile-open {
        overflow: hidden;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        will-change: transform;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .main-header {
        left: 0;
        justify-content: flex-start;
        gap: 2px;
        padding: 7px 10px 7px 4px;
    }

    .sidebar.collapsed ~ .main-wrapper,
    body.sidebar-collapsed .main-wrapper {
        margin-left: 0;
    }

    .sidebar.collapsed ~ .main-wrapper .main-header,
    body.sidebar-collapsed .main-header {
        left: 0;
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: transparent;
        border: none;
        color: #374151;
        cursor: pointer;
        border-radius: 8px;
        margin-right: 6px;
    }

    .mobile-menu-toggle:hover {
        background: #f3f4f6;
    }

    .mobile-menu-toggle i {
        font-size: 24px;
    }

    /* Overlay for mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .page-title {
        min-width: 0;
        flex: 1 1 auto;
        margin-left: -6px;
    }

    .page-title-row {
        gap: 4px;
    }

    .header-right {
        margin-left: auto;
        flex: 0 0 auto;
        gap: 6px;
    }

    .notification-dropdown-wrapper .notification-dropdown {
        position: fixed !important;
        top: 64px !important;
        right: 8px !important;
        left: auto !important;
        width: min(430px, calc(100vw - 16px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 16px) !important;
        margin-top: 0 !important;
        border-radius: 14px !important;
        z-index: 1060 !important;
    }

    .notification-dropdown-wrapper .dropdown-menu[data-popper-placement] {
        inset: auto !important;
        top: 64px !important;
        right: 8px !important;
        left: auto !important;
        width: min(430px, calc(100vw - 16px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 16px) !important;
        transform: none !important;
    }

    .notification-dropdown-wrapper .notification-list {
        max-height: calc(100dvh - 190px);
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 6px 8px 6px 3px;
    }

    .main-content {
        padding: 10px 8px;
    }

    .page-title-row {
        gap: 4px;
        min-width: 0;
    }

    .page-title-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .page-title-icon i {
        font-size: 20px;
    }

    .page-title h1 {
        font-size: 16px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-title p {
        display: none;
    }

    .user-info {
        display: none;
    }

    .user-profile {
        padding: 4px;
        border-left: none;
    }

    .user-profile-menu {
        display: none !important;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .lang-switcher {
        padding: 4px;
    }

    .notification-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .support-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        border-radius: 8px;
    }

    .support-btn i {
        font-size: 16px;
    }

    .support-btn-label {
        font-size: 14px;
    }

    .notification-badge {
        top: -4px;
        right: -5px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        border-width: 1.5px;
    }

    .notification-dropdown-wrapper .notification-dropdown {
        top: 64px !important;
        right: 6px !important;
        width: min(430px, calc(100vw - 12px)) !important;
        max-width: calc(100vw - 12px) !important;
    }

    .notification-dropdown-wrapper .dropdown-menu[data-popper-placement] {
        top: 64px !important;
        right: 6px !important;
        width: min(430px, calc(100vw - 12px)) !important;
        max-width: calc(100vw - 12px) !important;
    }

    .notification-dropdown-wrapper .notification-list {
        max-height: calc(100dvh - 220px);
        padding: 12px;
    }

    .balance-box .balance-label {
        display: none;
    }
}

@media (max-width: 576px) {
    .header-right {
        gap: 6px;
    }

    .main-header {
        padding: 6px 6px 6px 2px;
        gap: 3px;
    }

    .main-content {
        padding: 10px 4px;
    }

    .balance-box {
        display: none;
    }

    .mobile-menu-toggle {
        width: 32px;
        height: 32px;
        margin-right: 4px;
    }

    .page-title-row {
        gap: 3px;
        min-width: 0;
    }

    .page-title h1 {
        font-size: 15px;
    }

    .header-right {
        gap: 7px;
    }

    .notification-dropdown-wrapper .notification-dropdown,
    .notification-dropdown-wrapper .dropdown-menu[data-popper-placement] {
        left: auto !important;
        right: 4px !important;
        top: 64px !important;
        width: min(430px, calc(100vw - 8px)) !important;
        max-width: calc(100vw - 8px) !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .sidebar,
    .main-header {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.sidebar-hidden {
    display: none !important;
}

/* Hide old navbar when sidebar is present */
body.has-sidebar .navbar,
body.has-sidebar #mainNavbar {
    display: none !important;
}

/* Adjust body background */
body.has-sidebar {
    background: #f8fafc;
}

/* ========================================
   COLLAPSIBLE ADMIN SECTION
   ======================================== */

/* Admin toggle button */
.admin-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    border-radius: 8px;
    margin-bottom: 4px;
}

.admin-toggle:hover {
    background: #f1f5f9;
    color: #334155;
}

.admin-toggle.active {
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    color: #ffffff;
}

.admin-toggle.active:hover {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
}

.admin-toggle i:first-child {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Admin chevron icon */
.admin-chevron {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.admin-toggle.expanded .admin-chevron {
    transform: rotate(90deg);
}

/* Admin submenu container */
.admin-submenu {
    padding-left: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

/* Admin submenu items */
.nav-subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.nav-subitem:hover {
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
}

.nav-subitem.active {
    background: #eff6ff;
    color: #2563eb;
}

.nav-subitem i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

/* Badge in admin submenu */
.nav-subitem .nav-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Collapsed sidebar admin styles */
.sidebar.collapsed .admin-toggle span,
.sidebar.collapsed .admin-chevron {
    display: none;
}

.sidebar.collapsed .admin-toggle {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .admin-submenu {
    display: none !important;
}

/* Tooltip for collapsed admin toggle */
.sidebar.collapsed .admin-toggle {
    position: relative;
}

.sidebar.collapsed .admin-toggle::after {
    content: 'Админка';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 6px 12px;
    background: #1e293b;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.sidebar.collapsed .admin-toggle:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */

/* Language Switcher - Minimalist */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
}

.lang-switcher:hover {
    opacity: 0.7;
}

.lang-switcher:active {
    transform: scale(0.98);
}

.lang-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.lang-code {
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
}

/* Responsive adjustments for language switcher */
@media (max-width: 768px) {
    .lang-switcher .lang-code {
        display: none;
    }
}
