/* ==============================
   Enhanced Navbar Component ΓÇö Nam Long Social
   ============================== */

.nls-navbar {
    width: 100%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-bottom: 1px solid #f0f0f0;
}

/* Prevent horizontal scroll on mobile for dropdowns and mobile menu */
.nls-navbar-mobile,
.nls-notification-dropdown,
.nls-user-dropdown {
    box-sizing: border-box;
}

/* Adjust for WordPress admin bar (32px on desktop, 46px on mobile) */
body.admin-bar .nls-navbar {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .nls-navbar {
        top: 46px;
    }
}

.nls-navbar-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    gap: 8px;
}

/* ==============================
   Logo
   ============================== */

.nls-navbar-logo,
.nls-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 16px;
}

.nls-navbar-logo a,
.nls-header-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nls-navbar-logo:hover a,
.nls-header-logo:hover a {
    opacity: 0.85;
}

.nls-navbar-logo-img,
.nls-header-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* ==============================
   Center Navigation
   ============================== */

.nls-navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nls-navbar-link {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
    position: relative;
}

/* Keyboard focus styles */
.nls-navbar-link:focus-visible,
.nls-search-toggle:focus-visible,
.nls-notification-bell:focus-visible,
.nls-user-toggle:focus-visible,
.nls-navbar-btn:focus-visible,
.nls-navbar-toggle:focus-visible {
    outline: 2px solid #c62828;
    outline-offset: 2px;
}

.nls-navbar-link:hover {
    background: #fef2f2;
    color: #c62828;
}

.nls-navbar-link:active {
    transform: scale(0.98);
}

.nls-navbar-link--active {
    background: #fef2f2;
    color: #c62828;
    position: relative;
}

.nls-navbar-link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #c62828;
    border-radius: 2px;
}

/* ==============================
   Right Section
   ============================== */

.nls-navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    justify-content: flex-end;
}

/* ==============================
   Search
   ============================== */

.nls-navbar-search {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nls-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    background: #f9fafb;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s ease;
}

.nls-search-toggle:hover {
    background: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.nls-search-toggle:active {
    transform: scale(0.95);
}

.nls-search-form {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    overflow: hidden;
}

.nls-search-form--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.nls-search-input {
    width: 240px;
    padding: 10px 12px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #fff;
}

.nls-search-input::placeholder {
    color: #9ca3af;
}

.nls-search-submit {
    padding: 8px 14px;
    background: #c62828;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 6px;
    transition: background 0.15s ease;
}

.nls-search-submit:hover {
    background: #b71c1c;
}

/* ==============================
   User Section
   ============================== */

.nls-navbar-user-section {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

/* ==============================
   Notification Bell
   ============================== */

.nls-notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nls-notification-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    background: #f9fafb;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s ease;
    position: relative;
}

.nls-notification-bell:hover {
    background: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.nls-notification-bell:active {
    transform: scale(0.95);
}

.nls-notification-bell--loading {
    animation: nls-pulse 1.5s ease-in-out infinite;
}

@keyframes nls-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nls-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

/* Notification Dropdown */
.nls-notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.nls-notification-dropdown--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nls-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.nls-mark-read-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s ease;
}

.nls-mark-read-btn:hover {
    background: #f3f4f6;
    color: #059669;
}

.nls-notification-list {
    max-height: 280px;
    overflow-y: auto;
}

.nls-notification-loading,
.nls-notification-empty,
.nls-notification-error {
    padding: 24px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

/* Loading spinner */
.nls-notification-loading {
    position: relative;
}

.nls-notification-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f4f6;
    border-top-color: #c62828;
    border-radius: 50%;
    animation: nls-spin 0.8s linear infinite;
}

@keyframes nls-spin {
    to { transform: rotate(360deg); }
}

.nls-notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.15s ease;
}

.nls-notification-item:hover {
    background: #fef2f2;
}

.nls-notification-item--read {
    opacity: 0.6;
}

.nls-notification-text {
    font-size: 13px;
    color: #374151;
}

.nls-notification-time {
    font-size: 11px;
    color: #9ca3af;
}

.nls-notification-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
}

.nls-notification-footer a {
    display: block;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    color: #c62828;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.nls-notification-footer a:hover {
    background: #fef2f2;
}

/* ==============================
   User Dropdown
   ============================== */

.nls-user-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nls-user-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    min-height: 44px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nls-user-toggle:hover {
    background: #f3f4f6;
    transform: scale(1.02);
}

.nls-user-toggle:active {
    transform: scale(0.98);
}

.nls-dropdown-arrow {
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.nls-user-dropdown--open ~ .nls-user-toggle .nls-dropdown-arrow {
    transform: rotate(180deg);
}

.nls-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    object-fit: cover;
}

.nls-user-avatar--placeholder {
    background: linear-gradient(135deg, #c62828, #e53935);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.nls-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.nls-user-dropdown--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nls-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.nls-user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.nls-user-avatar-large.nls-user-avatar--placeholder {
    font-size: 18px;
}

.nls-user-details {
    flex: 1;
    min-width: 0;
}

.nls-user-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nls-user-phone {
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nls-user-menu {
    padding: 8px;
}

.nls-user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.nls-user-menu-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.nls-user-menu-item--danger {
    color: #ef4444;
}

.nls-user-menu-item--danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.nls-user-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

/* ==============================
   Login Button
   ============================== */

.nls-navbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    background: #c62828;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nls-navbar-btn:hover {
    background: #b71c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}

/* ==============================
   Mobile Menu Toggle
   ============================== */

.nls-navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
}

.nls-navbar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.nls-navbar-toggle--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nls-navbar-toggle--open span:nth-child(2) {
    opacity: 0;
}

.nls-navbar-toggle--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==============================
   Mobile Backdrop
   ============================== */

/* ==============================
   Mobile Dropdown Menu
   ============================== */

.nls-navbar-menu-wrapper {
    position: relative;
}

.nls-navbar-mobile {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 50vw;
    background: #fff;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.nls-navbar-mobile a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f9fafb;
    transition: all 0.15s ease;
}

.nls-navbar-mobile a:last-child {
    border-bottom: none;
}

.nls-navbar-mobile a:hover {
    background: #fef2f2;
    color: #c62828;
}

.nls-navbar-mobile-link--active {
    background: #fef2f2;
    color: #c62828;
    font-weight: 600;
}

.nls-mobile-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

/* ==============================
   Mobile Search
   ============================== */

.nls-mobile-search {
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #f0f0f0;
}

.nls-mobile-search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.nls-mobile-search-form:focus-within {
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.nls-mobile-search-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.nls-mobile-search-input::placeholder {
    color: #9ca3af;
}

.nls-mobile-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    background: #c62828;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.nls-mobile-search-submit:hover {
    background: #b71c1c;
}

.nls-mobile-search-submit:active {
    transform: scale(0.95);
}

/* ==============================
   Mobile Menu Sections
   ============================== */

.nls-mobile-section {
    margin-bottom: 8px;
}

.nls-mobile-section-title {
    padding: 12px 20px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nls-mobile-icon {
    flex-shrink: 0;
    margin-right: 12px;
    color: #6b7280;
    transition: color 0.15s ease;
}

.nls-navbar-mobile-link--active .nls-mobile-icon {
    color: #c62828;
}

.nls-mobile-link--danger {
    color: #ef4444;
}

.nls-mobile-link--danger .nls-mobile-icon {
    color: #ef4444;
}

.nls-mobile-link--danger:hover {
    background: #fef2f2;
}

.nls-mobile-link--primary {
    background: #c62828;
    color: #fff;
    justify-content: center;
    font-weight: 600;
}

.nls-mobile-link--primary .nls-mobile-icon {
    color: #fff;
    margin-right: 8px;
}

.nls-mobile-link--primary:hover {
    background: #b71c1c;
}

.nls-navbar-mobile--open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   Responsive
   ============================== */

@media (max-width: 900px) {
    .nls-navbar-menu {
        display: none;
    }

    .nls-navbar-toggle {
        display: flex;
    }
}

/* Improve touch feedback on mobile */
@media (hover: none) and (pointer: coarse) {
    /* Ensure all touch targets are at least 44px */
    .nls-search-toggle,
    .nls-notification-bell,
    .nls-user-toggle,
    .nls-navbar-btn,
    .nls-mark-read-btn,
    .nls-search-submit,
    .nls-mobile-search-submit,
    .nls-navbar-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    /* Larger touch targets */
    .nls-navbar-link {
        min-height: 44px;
        padding: 12px 16px;
    }

    .nls-search-toggle,
    .nls-notification-bell,
    .nls-user-toggle,
    .nls-navbar-toggle span {
        transform: scale(1);
    }

    /* Touch feedback with scale animation */
    .nls-navbar-link:active {
        background: #fef2f2;
        color: #c62828;
        transform: scale(0.97);
    }

    .nls-search-toggle:active {
        background: #f3f4f6;
        color: #374151;
        transform: scale(0.95);
    }

    .nls-notification-bell:active {
        background: #f3f4f6;
        color: #374151;
        transform: scale(0.95);
    }

    .nls-user-toggle:active {
        background: #f3f4f6;
        transform: scale(0.95);
    }

    .nls-navbar-btn:active {
        background: #b71c1c;
        transform: scale(0.97);
    }

    .nls-navbar-mobile a:active {
        background: #fef2f2;
        color: #c62828;
        transform: scale(0.98);
    }

    /* Remove transitions for instant touch feedback */
    * {
        transition-duration: 0.1s !important;
    }

    /* Improve dropdown touch targets */
    .nls-notification-item,
    .nls-user-menu-item {
        min-height: 48px;
        padding: 14px 12px;
    }

    /* Better touch feedback for buttons */
    .nls-mark-read-btn:active {
        background: #e5e7eb;
        transform: scale(0.9);
    }

    .nls-search-submit:active {
        background: #b71c1c;
        transform: scale(0.95);
    }

    /* Mobile search input improvements */
    .nls-mobile-search-input {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }

    /* Increase touch targets for mobile menu icons */
    .nls-mobile-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 768px) {
    .nls-navbar-container {
        padding: 0 12px;
        height: 56px;
        justify-content: space-between;
    }

    .nls-navbar-menu,
    .nls-navbar-search {
        display: none;
    }

    .nls-navbar-right {
        gap: 4px;
    }

    .nls-navbar-user-section {
        gap: 4px;
        align-items: center;
    }

    .nls-navbar-toggle {
        display: flex;
        margin-left: 4px;
    }

    /* Improve dropdown positioning on mobile */
    .nls-notification-dropdown,
    .nls-user-dropdown {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(-100%);
        margin: 0;
        border-radius: 0;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    /* Account for admin bar */
    body.admin-bar .nls-notification-dropdown,
    body.admin-bar .nls-user-dropdown {
        top: calc(46px + 56px);
    }

    .nls-notification-dropdown--open,
    .nls-user-dropdown--open {
        transform: translateY(0);
    }

    /* Better touch targets for dropdown items */
    .nls-notification-item,
    .nls-user-menu-item {
        min-height: 56px;
        padding: 16px 20px;
        font-size: 16px;
    }

    /* Larger user info section */
    .nls-user-info {
        padding: 20px;
    }

    .nls-user-avatar-large {
        width: 56px;
        height: 56px;
    }

    .nls-user-name {
        font-size: 16px;
    }

    .nls-user-phone {
        font-size: 14px;
    }

    /* Ensure all navbar buttons are vertically centered on mobile */
    .nls-search-toggle,
    .nls-notification-bell,
    .nls-user-toggle,
    .nls-navbar-btn,
    .nls-navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Fix dropdown positioning to avoid right space */
    .nls-notification-dropdown,
    .nls-user-dropdown {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
}

@media (max-width: 480px) {
    .nls-navbar-container {
        padding: 0 8px;
    }

    .nls-navbar-right {
        gap: 2px;
    }

    .nls-navbar-user-section {
        gap: 2px;
    }

    .nls-navbar-toggle {
        margin-left: 2px;
        padding: 6px;
    }
}

/* ==============================
   Header Style (Simple, matches screenshot)
   Design: tickets/header/Screenshot 2026-04-06 201602.png
   ============================== */

/* Header uses same base as navbar but with different logo and nav layout */
.nls-header {
    width: 100%;
    background: #fff;
    /* position: sticky; */
    top: 0;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.admin-bar .nls-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .nls-header {
        top: 46px;
    }
}

.nls-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    gap: 24px;
}

/* Header Logo */
.nls-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 16px;
}

.nls-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nls-header-logo a:hover {
    opacity: 0.85;
}

.nls-header-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Header Nav (horizontal with dividers) */
.nls-header-nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: center;
}

.nls-header-nav-link {
    display: block;
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 600;
    color: #666666;
    text-decoration: none;
    transition: color 0.15s ease;
}

.nls-header-nav-link:hover {
    color: #B22222;
}

.nls-header-nav-link--active {
    color: #B22222;
    font-weight: 600;
}

.nls-header-nav-divider {
    color: #cccccc;
    font-size: 14px;
    margin: 0 4px;
}

/* Header Right Actions */
.nls-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nls-header-login {
    font-size: 14px;
    font-weight: 500;
    color: #B22222;
    text-decoration: none;
    padding: 8px 12px;
}

.nls-header-login:hover {
    text-decoration: underline;
}

.nls-header-cta {
    padding: 10px 24px;
    background: #c62828;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nls-header-cta:hover {
    background: #961e1e;
    transform: translateY(-1px);
    color: #fff;
}

/* Header User Section */
.nls-header-user-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.nls-header-user-toggle:hover {
    background: #f5f5f5;
}

.nls-header-dropdown-arrow {
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.nls-header-user-dropdown--open ~ .nls-header-user-toggle .nls-header-dropdown-arrow {
    transform: rotate(180deg);
}

/* Header Mobile */
.nls-header-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
}

.nls-header-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}

.nls-header-toggle--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nls-header-toggle--open span:nth-child(2) {
    opacity: 0;
}

.nls-header-toggle--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==============================
   Header Mobile Dropdown Menu
   ============================== */

.nls-header-menu-wrapper {
    position: relative;
}

.nls-header-mobile {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 50vw;
    background: #fff;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.nls-header-mobile--open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.nls-header-mobile a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f9fafb;
}

.nls-header-mobile a:hover {
    background: #fef2f2;
    color: #B22222;
}

.nls-header-mobile-link--active {
    background: #fef2f2;
    color: #B22222;
}

.nls-header-mobile-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

.nls-header-mobile-section {
    margin-bottom: 8px;
}

.nls-header-mobile-title {
    padding: 12px 20px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
}

.nls-header-mobile-icon {
    margin-right: 12px;
    color: #6b7280;
}

.nls-header-mobile-link--active .nls-header-mobile-icon {
    color: #B22222;
}

.nls-header-mobile-link--danger {
    color: #ef4444;
}

.nls-header-mobile-link--danger:hover {
    background: #fef2f2;
}

.nls-header-mobile-link--primary {
    background: #B22222;
    color: #fff;
    justify-content: center;
}

.nls-header-mobile-link--primary:hover {
    background: #961e1e;
}

.nls-header-mobile-link--cta {
    background: #B22222;
    color: #fff;
    justify-content: center;
}

.nls-header-mobile-link--cta:hover {
    background: #961e1e;
}

/* Header Responsive */
@media (max-width: 900px) {
    .nls-header-nav {
        display: none;
    }
    .nls-header-toggle {
        display: flex;
    }
    .nls-header-login {
        display: none;
    }
}

@media (max-width: 768px) {
    .nls-header-container {
        padding: 0 16px;
        height: 60px;
    }
    .nls-header-logo-img {
        height: 32px;
    }
    .nls-header-user-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(-100%);
    }
    .nls-header-user-dropdown--open {
        transform: translateY(0);
    }
}

/* ==============================
   Header User Component
   ============================== */

.nls-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nls-header-user-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nls-header-user-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    min-height: 44px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nls-header-user-toggle:hover {
    background: #f3f4f6;
    transform: scale(1.02);
}

.nls-header-user-toggle:active {
    transform: scale(0.98);
}

.nls-header-dropdown-arrow {
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.nls-header-user-dropdown--open ~ .nls-header-user-toggle .nls-header-dropdown-arrow {
    transform: rotate(180deg);
}

.nls-header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    object-fit: cover;
}

.nls-header-user-avatar--placeholder {
    background: linear-gradient(135deg, #B22222, #e53935);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.nls-header-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.nls-header-user-dropdown--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nls-header-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.nls-header-user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
}

.nls-header-user-avatar-large.nls-header-user-avatar--placeholder {
    font-size: 18px;
}

.nls-header-user-details {
    flex: 1;
    min-width: 0;
}

.nls-header-user-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nls-header-user-phone {
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nls-header-user-menu {
    padding: 8px;
}

.nls-header-user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.nls-header-user-menu-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.nls-header-user-menu-item--danger {
    color: #ef4444;
}

.nls-header-user-menu-item--danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.nls-header-user-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

/* Header user mobile responsive adjustments */
@media (max-width: 768px) {
    .nls-header-user-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(-100%);
        margin: 0;
        border-radius: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    body.admin-bar .nls-header-user-dropdown {
        top: calc(46px + 60px);
    }

    @media (min-width: 783px) {
        body.admin-bar .nls-header-user-dropdown {
            top: calc(32px + 60px);
        }
    }

    .nls-header-user-dropdown--open {
        transform: translateY(0);
    }

    .nls-header-user-menu-item {
        min-height: 56px;
        padding: 16px 20px;
        font-size: 16px;
    }

    .nls-header-user-info {
        padding: 20px;
    }

    .nls-header-user-avatar-large {
        width: 56px;
        height: 56px;
    }

    .nls-header-user-name {
        font-size: 16px;
    }

    .nls-header-user-phone {
        font-size: 14px;
    }
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .nls-header-user-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .nls-header-user-toggle:active {
        background: #f3f4f6;
        transform: scale(0.95);
    }

    .nls-header-user-menu-item {
        min-height: 48px;
        padding: 14px 12px;
    }
}

/* Shared styles */
.nls-header,
.nls-header-mobile,
.nls-header-user-dropdown {
    box-sizing: border-box;
}

/* ==============================
   Mobile Bottom Navigation
   ============================== */

.nls-bottom-nav {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
}

.nls-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 44px; /* Touch target */
    padding: 10px 6px;
    text-decoration: none;
    color: #9ca3af;
    transition: all 0.15s ease;
}

.nls-bottom-nav-item:active {
    transform: scale(0.95);
}

.nls-bottom-nav-item--active {
    color: #c62828;
}

.nls-bottom-nav-item--highlight.nls-bottom-nav-item--active {
    background: #fef2f2;
}

.nls-bottom-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.nls-bottom-nav-icon--solid {
    display: none;
}

.nls-bottom-nav-item--active .nls-bottom-nav-icon--solid {
    display: block;
}

.nls-bottom-nav-item--active .nls-bottom-nav-icon:not(.nls-bottom-nav-icon--solid) {
    display: none;
}

.nls-bottom-nav-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

/* Mobile only - show bottom nav, hide top navbar */
@media (max-width: 767px) {
    /* Hide nav links, hamburger toggle and mobile dropdown — bottom nav handles navigation */
    .nls-header-mobile,
    .nls-navbar-mobile,
    .nls-header-nav,
    .nls-navbar-menu,
    .nls-header-menu-wrapper,
    .nls-navbar-menu-wrapper {
        display: none !important;
    }

    /* Keep header/navbar fixed at top — shows only user area and CTA */
    .nls-header,
    .nls-navbar {
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        z-index: 1000;
    }

    body.admin-bar .nls-header,
    body.admin-bar .nls-navbar {
        top: 46px;
    }

    /* Container shows as a compact bar aligned right */
    .nls-header-container,
    .nls-navbar-container {
        display: flex;
        height: 56px;
        padding: 0 16px;
        justify-content: flex-end;
        max-width: unset;
        margin: 0;
        gap: 8px;
    }

    /* CTA button — compact size on mobile */
    .nls-header-cta,
    .nls-navbar-cta {
        padding: 8px 14px;
        font-size: 13px;
    }

    .nls-bottom-nav {
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 0 4px;
    }

    /* Padding for fixed header (top) and bottom nav (bottom) */
    body.nls-has-bottom-nav {
        padding-top: 56px;
        padding-bottom: 60px;
    }

    body.admin-bar.nls-has-bottom-nav {
        padding-top: calc(56px + 46px);
    }

    body.admin-bar .nls-bottom-nav {
        bottom: 0;
    }
}

/* Override hover + focus cho button của bạn */
.nls-panel-tab:hover,
.nls-panel-tab:focus,
.nls-user-avatar-btn:hover,
.nls-user-avatar-btn:focus,
.nls-header-toggle:hover{
    background-color: #fff !important;
    color: #c62828 !important;
    border-color: #c62828 !important;
}