/**
 * Little Moo Caravan Booking System
 * Single Page Application (SPA) Dashboard Styles
 * Design matches dashboard.css - Premium SaaS UI
 */

/* =====================================================
   CSS VARIABLES - Matching dashboard.css
===================================================== */
:root {
    /* Primary Colors - Green Theme */
    --lm-primary: #409a72;
    --lm-primary-hover: #357f5e;
    --lm-primary-dark: #2d6b4f;
    --lm-primary-soft: rgba(64, 154, 114, 0.1);
    --lm-primary-light: rgba(64, 154, 114, 0.15);

    /* Accent Colors */
    --lm-accent: #7b6cf6;
    --lm-accent-soft: rgba(123, 108, 246, 0.1);
    --lm-accent-pink: #FF6B9D;

    /* Dashboard Theme Colors (customizable per role) */
    --lm-sidebar-bg: linear-gradient(180deg, #f8f9fc 0%, #f1f4f9 100%);
    --lm-sidebar-border: #e8ecf3;
    --lm-sidebar-text: #464a53;
    --lm-sidebar-logo-text: #1e293b;
    --lm-menu-icon: var(--lm-accent);
    --lm-menu-hover-bg: #f8f8f8;
    --lm-menu-hover-text: var(--lm-accent);
    --lm-menu-active-bg: var(--lm-accent);
    --lm-menu-active-bg-end: #886cff;
    --lm-menu-active-text: #ffffff;
    --lm-menu-active-shadow: rgba(123, 108, 246, 0.35);
    --lm-menu-active-hover-bg: #6c5ce7;
    --lm-menu-active-hover-bg-end: #7b68ee;
    --lm-section-label: var(--lm-accent);
    --lm-section-label-hover: #5a4bd4;
    --lm-header-bg: var(--lm-bg-white);
    --lm-header-border: var(--lm-border-soft);
    --lm-header-text: var(--lm-text-dark);

    /* Status Colors */
    --lm-success: #10b981;
    --lm-success-soft: rgba(16, 185, 129, 0.1);
    --lm-warning: #f59e0b;
    --lm-warning-soft: rgba(245, 158, 11, 0.1);
    --lm-danger: #ef4444;
    --lm-danger-soft: rgba(239, 68, 68, 0.1);
    --lm-info: #3b82f6;
    --lm-info-soft: rgba(59, 130, 246, 0.1);

    /* Backgrounds */
    --lm-bg-primary: #f8fafc;
    --lm-bg-white: #ffffff;
    --lm-bg-dark: #1e293b;

    /* Text Colors */
    --lm-text-dark: #1e293b;
    --lm-text-body: #475569;
    --lm-text-muted: #94a3b8;
    --lm-text-light: #cbd5e1;
    --lm-text-inverse: #ffffff;

    /* Borders */
    --lm-border-soft: #e2e8f0;
    --lm-border-color: #e2e8f0;

    /* Border Radius */
    --lm-radius-sm: 6px;
    --lm-radius-md: 8px;
    --lm-radius-lg: 12px;
    --lm-radius-xl: 16px;
    --lm-radius-full: 9999px;

    /* Shadows */
    --lm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --lm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --lm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --lm-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --lm-shadow-focus: 0 0 0 3px rgba(123, 108, 246, 0.25);

    /* Spacing */
    --lm-space-1: 4px;
    --lm-space-2: 8px;
    --lm-space-3: 12px;
    --lm-space-4: 16px;
    --lm-space-5: 20px;
    --lm-space-6: 24px;
    --lm-space-8: 32px;

    /* Typography */
    --lm-text-xs: 0.75rem;
    --lm-text-sm: 0.875rem;
    --lm-text-base: 1rem;
    --lm-text-lg: 1.125rem;
    --lm-text-xl: 1.25rem;
    --lm-text-2xl: 1.5rem;

    --lm-font-normal: 400;
    --lm-font-medium: 500;
    --lm-font-semibold: 600;
    --lm-font-bold: 700;

    /* Layout */
    --lm-sidebar-width: 260px;
    --lm-header-height: 64px;

    /* Transitions */
    --lm-transition-fast: 0.15s ease;
    --lm-transition-smooth: 0.3s ease;
}

/* =====================================================
   RESET & BASE
===================================================== */
.lm-spa-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--lm-text-sm);
    line-height: 1.6;
    color: var(--lm-text-body);
    min-height: 100vh;
    background: var(--lm-bg-primary);
}

.lm-spa-app *,
.lm-spa-app *::before,
.lm-spa-app *::after {
    box-sizing: border-box;
}

/* =====================================================
   LOADER - Modern Loading Animation (Optimized)
===================================================== */
.lm-spa-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.lm-spa-loader.active {
    display: flex;
    opacity: 1;
}

/* Dark mode loader */
.lm-dark-mode .lm-spa-loader {
    background: rgba(17, 24, 39, 0.85);
}

/* Loader Container */
.lm-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Animated Spinner - Modern Style (Optimized) */
.lm-loader-spinner {
    width: 40px;
    height: 40px;
    position: relative;
}

.lm-loader-spinner::before,
.lm-loader-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.lm-loader-spinner::before {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--lm-primary, #6366f1);
    border-right-color: var(--lm-primary, #6366f1);
    animation: lm-spin 0.6s linear infinite;
}

.lm-loader-spinner::after {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border: 3px solid transparent;
    border-bottom-color: #a5b4fc;
    border-left-color: #a5b4fc;
    animation: lm-spin-reverse 0.5s linear infinite;
}

/* Loader Text */
.lm-loader-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--lm-text-secondary, #6b7280);
    letter-spacing: 0.3px;
}

/* Pulse Dots Animation */
.lm-loader-dots {
    display: flex;
    gap: 6px;
}

.lm-loader-dots span {
    width: 8px;
    height: 8px;
    background: var(--lm-primary, #6366f1);
    border-radius: 50%;
    animation: lm-bounce 0.9s infinite ease-in-out both;
}

.lm-loader-dots span:nth-child(1) {
    animation-delay: -0.2s;
}

.lm-loader-dots span:nth-child(2) {
    animation-delay: -0.1s;
}

.lm-loader-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes lm-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes lm-spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes lm-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Content Area Loader (inline) */
.lm-content-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    height: calc(100vh - 200px);
    padding: 60px 20px;
    gap: 20px;
}

.lm-content-loader .lm-loader-spinner {
    width: 45px;
    height: 45px;
}

/* =====================================================
   DASHBOARD LAYOUT - FIXED SIDEBAR + MAIN
===================================================== */
.lm-dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--lm-bg-primary);
}

/* =====================================================
   SIDEBAR (Fixed 260px) - Fillow Style
===================================================== */
.lm-sidebar {
    width: var(--lm-sidebar-width);
    min-width: var(--lm-sidebar-width);
    max-width: var(--lm-sidebar-width);
    background: var(--lm-sidebar-bg);
    border-right: 1px solid var(--lm-sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.lm-sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--lm-sidebar-border);
    min-height: 70px;
    display: flex;
    align-items: center;
}

.lm-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    width: 100%;
}

.lm-sidebar .lm-logo-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 45px !important;
    height: 45px !important;
    min-width: 45px;
    min-height: 45px;
    border-radius: 12px;
    background: transparent;
    overflow: visible;
}

.lm-sidebar .lm-logo-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.lm-sidebar .lm-sidebar-logo-img {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px;
    min-height: 45px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(123, 108, 246, 0.35);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.lm-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lm-sidebar-logo-text, #1e293b);
    letter-spacing: -0.02em;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.2s ease, width 0.3s ease;
}

/* Sidebar Collapsed State */
.lm-sidebar.collapsed {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.lm-sidebar.collapsed .lm-sidebar-header {
    padding: 20px 16px;
    justify-content: center;
}

.lm-sidebar.collapsed .lm-sidebar-logo {
    justify-content: center;
}

.lm-sidebar.collapsed .lm-logo-icon {
    width: 40px;
    height: 40px;
}

.lm-sidebar.collapsed .lm-sidebar-logo-img {
    width: 40px;
    height: 40px;
}

.lm-sidebar.collapsed .lm-logo-text {
    display: none;
}

/* Show menu sections with icons only when sidebar collapsed */
.lm-sidebar.collapsed .lm-menu-section {
    display: block;
}

/* Show section icon and hide text/arrow in collapsed state */
.lm-sidebar.collapsed .lm-menu-label {
    padding: 10px;
    justify-content: center;
    cursor: pointer;
    margin: 4px 12px;
}

.lm-sidebar.collapsed .lm-menu-label span {
    display: none;
}

.lm-sidebar.collapsed .lm-menu-label .lm-section-icon {
    display: block;
    margin-right: 0;
}

.lm-sidebar.collapsed .lm-accordion-arrow {
    display: none;
}

/* Show menu items with icons only when sidebar collapsed */
.lm-sidebar.collapsed .lm-menu-items {
    display: block !important;
    max-height: none !important;
    padding-left: 0 !important;
    opacity: 1 !important;
}

/* Override section collapsed state when sidebar is collapsed */
.lm-sidebar.collapsed .lm-menu-section.collapsed .lm-menu-items {
    display: block !important;
    max-height: none !important;
    opacity: 1 !important;
    padding-top: 4px !important;
}

.lm-sidebar.collapsed .lm-menu-items .lm-nav-link {
    display: flex !important;
    justify-content: center;
    padding: 12px;
    margin: 4px 12px;
    position: relative;
}

.lm-sidebar.collapsed .lm-menu-items .lm-nav-link svg {
    display: block !important;
    width: 20px;
    height: 20px;
    margin-right: 0;
}

.lm-sidebar.collapsed .lm-menu-items .lm-nav-link span {
    display: none !important;
}

.lm-sidebar.collapsed .lm-menu a span,
.lm-sidebar.collapsed .lm-menu .lm-nav-link span {
    display: none;
}

.lm-sidebar.collapsed .lm-menu a,
.lm-sidebar.collapsed .lm-menu .lm-nav-link {
    justify-content: center;
    padding: 12px;
    margin: 4px 12px;
    position: relative;
}

.lm-sidebar.collapsed .lm-menu a svg,
.lm-sidebar.collapsed .lm-menu .lm-nav-link svg {
    width: 22px;
    height: 22px;
    margin-right: 0;
}

/* Tooltip for collapsed menu items */
.lm-sidebar.collapsed .lm-menu a::after,
.lm-sidebar.collapsed .lm-menu .lm-nav-link::after,
.lm-sidebar.collapsed .lm-menu-label::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lm-sidebar.collapsed .lm-menu a::before,
.lm-sidebar.collapsed .lm-menu .lm-nav-link::before,
.lm-sidebar.collapsed .lm-menu-label::before {
    content: '';
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.lm-sidebar.collapsed .lm-menu a:hover::after,
.lm-sidebar.collapsed .lm-menu .lm-nav-link:hover::after,
.lm-sidebar.collapsed .lm-menu-label:hover::after,
.lm-sidebar.collapsed .lm-menu a:hover::before,
.lm-sidebar.collapsed .lm-menu .lm-nav-link:hover::before,
.lm-sidebar.collapsed .lm-menu-label:hover::before {
    opacity: 1;
    visibility: visible;
}

.lm-sidebar.collapsed .lm-menu-badge {
    display: none;
}

.lm-sidebar.collapsed .lm-logout-link span {
    display: none;
}

.lm-sidebar.collapsed .lm-logout-link {
    justify-content: center;
    padding: 12px;
    margin: 4px 12px;
    position: relative;
}

/* Logout link tooltip */
.lm-sidebar.collapsed .lm-logout-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lm-sidebar.collapsed .lm-logout-link::before {
    content: '';
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.lm-sidebar.collapsed .lm-logout-link:hover::after,
.lm-sidebar.collapsed .lm-logout-link:hover::before {
    opacity: 1;
    visibility: visible;
}

.lm-sidebar.collapsed+.lm-main {
    margin-left: 80px;
}

/* Section icon styles */
.lm-section-icon {
    flex-shrink: 0;
    color: var(--lm-section-label);
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

.lm-sidebar.collapsed .lm-section-icon {
    margin-right: 0;
}

/* Smooth transitions for menu items */
.lm-menu a span,
.lm-menu .lm-nav-link span {
    transition: opacity 0.2s ease, width 0.2s ease;
}

.lm-menu-label {
    transition: all 0.2s ease;
}

.lm-logout-link span {
    transition: opacity 0.2s ease, width 0.2s ease;
}

.lm-main {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Navigation - Fillow Style */
.lm-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

/* Custom Scrollbar */
.lm-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.lm-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.lm-sidebar-nav::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.lm-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.lm-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lm-menu li {
    margin-bottom: 2px;
}

.lm-menu a,
.lm-menu .lm-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 2px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--lm-sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.lm-menu a:hover,
.lm-menu .lm-nav-link:hover {
    background: var(--lm-menu-hover-bg);
    color: var(--lm-menu-hover-text);
}

.lm-menu a:hover svg,
.lm-menu .lm-nav-link:hover svg {
    color: var(--lm-menu-hover-text);
}

/* Active State - Fillow Purple Style */
.lm-menu a.active,
.lm-menu .lm-nav-link.active {
    background: linear-gradient(135deg, var(--lm-menu-active-bg) 0%, var(--lm-menu-active-bg-end) 100%);
    color: var(--lm-menu-active-text);
    box-shadow: 0 4px 15px var(--lm-menu-active-shadow);
}

.lm-menu a.active:hover,
.lm-menu .lm-nav-link.active:hover {
    background: linear-gradient(135deg, var(--lm-menu-active-hover-bg) 0%, var(--lm-menu-active-hover-bg-end) 100%);
    color: var(--lm-menu-active-text);
}

.lm-menu a.active svg,
.lm-menu .lm-nav-link.active svg {
    color: var(--lm-menu-active-text);
}

.lm-menu a svg,
.lm-menu .lm-nav-link svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--lm-menu-icon);
    transition: color 0.2s ease;
}

.lm-menu a span,
.lm-menu .lm-nav-link span {
    flex: 1;
}

/* Menu Badge - Fillow Style */
.lm-menu-badge {
    background: #FF6B9D;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}

.lm-menu-badge-warning {
    background: #f59e0b;
}

.lm-menu-badge-danger {
    background: #ef4444;
}

/* =====================================================
   ACCORDION MENU SECTIONS - Fillow Style
===================================================== */

/* Menu Section Container */
.lm-menu-section {
    list-style: none;
    margin: 8px 0;
}

/* Section Title Label */
.lm-menu-section .lm-menu-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lm-section-label);
    padding: 8px 20px 8px 20px;
    margin: 8px 16px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border-radius: 6px;
}

.lm-menu-section .lm-menu-label:hover {
    color: var(--lm-section-label-hover);
    background: rgba(123, 108, 246, 0.08);
}

.lm-menu-section .lm-menu-label span {
    flex: 1;
}

/* Accordion Arrow */
.lm-accordion-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: var(--lm-section-label);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lm-menu-section:not(.collapsed) .lm-accordion-arrow {
    transform: rotate(180deg);
}

/* Accordion Menu Items Container */
.lm-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease,
        padding 0.3s ease;
    opacity: 1;
    padding-top: 4px;
}

.lm-menu-section.collapsed .lm-menu-items {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

/* Menu Items inside accordion */
.lm-menu-items li {
    margin-bottom: 2px;
}

.lm-menu-items li:last-child {
    margin-bottom: 0;
}

.lm-menu-items .lm-nav-link {
    padding-left: 20px;
}

/* Legacy menu label styles (for non-accordion menus if any) */
.lm-menu>.lm-menu-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a1a8b1;
    padding: 8px 20px;
    margin: 12px 16px 8px;
    list-style: none;
    border-radius: 6px;
}

.lm-menu>.lm-menu-label:first-of-type {
    margin-top: 8px;
}

/* Sidebar Footer - Fillow Style */
.lm-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--lm-sidebar-border);
    margin-top: auto;
}

.lm-logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 0 0px;
    border-radius: 10px;
    text-decoration: none;
    color: #7c838e;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lm-logout-link:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.lm-logout-link svg {
    color: #7c838e;
    width: 20px;
    height: 20px;
}

.lm-logout-link:hover svg {
    color: #ef4444;
}

/* =====================================================
   MAIN AREA
===================================================== */
.lm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--lm-sidebar-width);
}

/* =====================================================
   HEADER (Fixed 64px)
===================================================== */
.lm-header {
    height: var(--lm-header-height);
    min-height: var(--lm-header-height);
    background: var(--lm-header-bg);
    border-bottom: 1px solid var(--lm-header-border);
    padding: 0 var(--lm-space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.lm-header-left {
    display: flex;
    align-items: center;
    gap: var(--lm-space-4);
}

.lm-mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--lm-accent);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 101;
    flex-shrink: 0;
}

.lm-mobile-menu-toggle:hover {
    background: rgba(123, 108, 246, 0.1);
    color: var(--lm-accent);
}

.lm-mobile-menu-toggle svg {
    display: block;
    width: 22px;
    height: 22px;
}

.lm-header-title {
    font-size: var(--lm-text-xl);
    font-weight: var(--lm-font-semibold);
    color: var(--lm-header-text, var(--lm-text-dark));
    margin: 0;
}

.lm-header-right {
    display: flex;
    align-items: center;
    gap: var(--lm-space-4);
}

/* Header Search */
.lm-header-search {
    position: relative;
}

.lm-header-search .lm-search-icon {
    position: absolute;
    left: var(--lm-space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--lm-text-muted);
    pointer-events: none;
}

.lm-header-search input {
    width: 280px;
    padding: var(--lm-space-2) var(--lm-space-4) var(--lm-space-2) 40px;
    border-radius: var(--lm-radius-lg);
    border: 1px solid var(--lm-border-soft);
    background: var(--lm-bg-primary);
    font-size: var(--lm-text-sm);
    color: var(--lm-text-dark);
    transition: all var(--lm-transition-fast);
}

.lm-header-search input::placeholder {
    color: var(--lm-text-muted);
}

.lm-header-search input:focus {
    outline: none;
    border-color: var(--lm-primary);
    box-shadow: var(--lm-shadow-focus);
    background: var(--lm-bg-white);
    width: 320px;
}

/* Header Notifications */
.lm-header-notifications {
    position: relative;
}

.lm-notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--lm-bg-primary);
    border-radius: var(--lm-radius-md);
    color: var(--lm-text-muted);
    cursor: pointer;
    transition: all var(--lm-transition-fast);
}

.lm-notification-btn:hover {
    background: var(--lm-primary-soft);
    color: var(--lm-primary);
}

.lm-notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--lm-danger);
    color: var(--lm-text-inverse);
    font-size: 10px;
    font-weight: var(--lm-font-bold);
    border-radius: var(--lm-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Notification Dropdown */
.lm-notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: var(--lm-bg-white);
    border: 1px solid var(--lm-border-soft);
    border-radius: var(--lm-radius-lg);
    box-shadow: var(--lm-shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--lm-transition-fast);
    display: flex;
    flex-direction: column;
}

.lm-header-notifications:hover .lm-notification-dropdown,
.lm-notification-dropdown:hover,
.lm-notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lm-notification-dropdown .lm-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--lm-space-4);
    border-bottom: 1px solid var(--lm-border-soft);
}

.lm-notification-dropdown .lm-dropdown-header span {
    font-weight: var(--lm-font-semibold);
    color: var(--lm-text-dark);
    font-size: var(--lm-text-base);
}

.lm-notification-dropdown .lm-mark-all-read {
    font-size: var(--lm-text-sm);
    color: var(--lm-primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--lm-transition-fast);
}

.lm-notification-dropdown .lm-mark-all-read:hover {
    color: var(--lm-primary-dark);
    text-decoration: underline;
}

.lm-notification-dropdown .lm-dropdown-body {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.lm-notification-dropdown .lm-dropdown-footer {
    padding: var(--lm-space-3) var(--lm-space-4);
    border-top: 1px solid var(--lm-border-soft);
    text-align: center;
}

.lm-notification-dropdown .lm-dropdown-footer a {
    font-size: var(--lm-text-sm);
    color: var(--lm-primary);
    text-decoration: none;
    font-weight: var(--lm-font-medium);
}

.lm-notification-dropdown .lm-dropdown-footer a:hover {
    text-decoration: underline;
}

/* Notification Items */
.lm-notification-item {
    display: flex;
    align-items: flex-start;
    gap: var(--lm-space-3);
    padding: var(--lm-space-4);
    cursor: pointer;
    transition: background var(--lm-transition-fast);
    position: relative;
    border-bottom: 1px solid var(--lm-border-soft);
    min-height: 56px;
}

.lm-notification-item:last-child {
    border-bottom: none;
}

.lm-notification-item:hover {
    background: var(--lm-bg-secondary);
}

.lm-notification-item:active {
    background: rgba(var(--lm-primary-rgb, 64, 154, 114), 0.08);
}

.lm-notification-item.unread {
    background: var(--lm-primary-soft);
}

.lm-notification-item.unread:hover {
    background: rgba(var(--lm-primary-rgb, 64, 154, 114), 0.15);
}

.lm-notification-item.unread:active {
    background: rgba(var(--lm-primary-rgb, 64, 154, 114), 0.2);
}

.lm-notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--lm-radius-full);
    background: var(--lm-bg-secondary);
    color: var(--lm-text-muted);
    font-size: 20px;
}

.lm-notification-icon.success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.lm-notification-icon.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.lm-notification-icon.info {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.lm-notification-content {
    flex: 1;
    min-width: 0;
}

.lm-notification-title {
    margin: 0 0 2px;
    font-size: var(--lm-text-sm);
    font-weight: var(--lm-font-semibold);
    color: var(--lm-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lm-notification-message {
    margin: 0 0 4px;
    font-size: var(--lm-text-xs);
    color: var(--lm-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lm-notification-time {
    font-size: 11px;
    color: var(--lm-text-light);
}

.lm-notification-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--lm-radius-sm);
    color: var(--lm-text-light);
    cursor: pointer;
    opacity: 0;
    transition: all var(--lm-transition-fast);
    font-size: 16px;
    line-height: 1;
}

.lm-notification-item:hover .lm-notification-delete {
    opacity: 1;
}

.lm-notification-delete:hover {
    background: var(--lm-danger);
    color: white;
}

/* Notification Empty State */
.lm-notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--lm-space-8) var(--lm-space-4);
    text-align: center;
    color: var(--lm-text-light);
}

.lm-notification-empty svg {
    margin-bottom: var(--lm-space-3);
    opacity: 0.5;
}

.lm-notification-empty p {
    margin: 0;
    font-size: var(--lm-text-sm);
}

/* Notification Loading */
.lm-notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--lm-space-8);
}

.lm-notification-loading .lm-spinner {
    animation: spin 1s linear infinite;
    color: var(--lm-primary);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Improved Mobile Experience - Medium Phones (480px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .lm-notification-dropdown {
        width: 380px;
    }

    .lm-profile-dropdown {
        width: 320px;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lm-notification-dropdown {
        width: 320px;
        right: 0;
    }

    .lm-profile-dropdown {
        width: 260px;
        right: 0;
    }
}

@media (max-width: 480px) {
    .lm-notification-dropdown {
        position: fixed;
        top: calc(var(--lm-header-height, 64px) + 8px);
        width: calc(100vw - 32px);
        right: 16px;
        left: auto;
        max-height: calc(100vh - var(--lm-header-height, 64px) - 48px);
        z-index: 9999;
        border-radius: var(--lm-radius-xl);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px) scale(0.95);
        transform-origin: top right;
    }

    .lm-notification-dropdown.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .lm-notification-dropdown .lm-dropdown-header {
        padding: var(--lm-space-5) var(--lm-space-4);
        background: linear-gradient(135deg, var(--lm-bg-secondary) 0%, var(--lm-bg-white) 100%);
        border-bottom: 2px solid var(--lm-border-soft);
        border-radius: var(--lm-radius-xl) var(--lm-radius-xl) 0 0;
    }

    .lm-notification-dropdown .lm-dropdown-header span {
        font-size: var(--lm-text-lg);
        font-weight: var(--lm-font-bold);
    }

    .lm-notification-dropdown .lm-mark-all-read {
        font-size: var(--lm-text-xs);
        padding: var(--lm-space-2) var(--lm-space-3);
        background: rgba(var(--lm-primary-rgb, 64, 154, 114), 0.1);
        border: 1px solid rgba(var(--lm-primary-rgb, 64, 154, 114), 0.2);
        border-radius: var(--lm-radius-md);
        transition: all var(--lm-transition-fast);
    }

    .lm-notification-dropdown .lm-mark-all-read:active {
        transform: scale(0.95);
        background: rgba(var(--lm-primary-rgb, 64, 154, 114), 0.15);
    }

    .lm-notification-dropdown .lm-dropdown-body {
        max-height: calc(100vh - var(--lm-header-height, 64px) - 200px);
        overflow-y: auto;
        scroll-behavior: smooth;
    }

    .lm-notification-dropdown .lm-dropdown-body::-webkit-scrollbar {
        width: 6px;
    }

    .lm-notification-dropdown .lm-dropdown-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .lm-notification-dropdown .lm-dropdown-body::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 3px;
    }

    .lm-notification-dropdown .lm-notification-item {
        padding: var(--lm-space-4);
        margin: var(--lm-space-2) var(--lm-space-3);
        border: none;
        border-radius: var(--lm-radius-md);
        background: var(--lm-bg-secondary);
        transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .lm-notification-dropdown .lm-notification-item:active {
        transform: scale(0.98);
        background: rgba(var(--lm-primary-rgb, 64, 154, 114), 0.08);
    }

    .lm-notification-dropdown .lm-notification-item.unread {
        background: linear-gradient(135deg, rgba(var(--lm-primary-rgb, 64, 154, 114), 0.12) 0%, var(--lm-bg-white) 100%);
        border-left: 4px solid var(--lm-primary);
        padding-left: calc(var(--lm-space-4) - 4px);
    }

    .lm-notification-dropdown .lm-dropdown-footer {
        padding: var(--lm-space-4);
        background: var(--lm-bg-secondary);
        border-top: 2px solid var(--lm-border-soft);
        border-radius: 0 0 var(--lm-radius-xl) var(--lm-radius-xl);
    }

    .lm-notification-dropdown .lm-dropdown-footer a {
        display: inline-block;
        padding: var(--lm-space-2) var(--lm-space-4);
        background: var(--lm-primary);
        color: var(--lm-text-inverse);
        border-radius: var(--lm-radius-md);
        transition: all var(--lm-transition-fast);
        font-weight: var(--lm-font-semibold);
    }

    .lm-notification-dropdown .lm-dropdown-footer a:active {
        transform: scale(0.95);
        opacity: 0.9;
    }

    .lm-notification-dropdown.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        z-index: -1;
        backdrop-filter: blur(3px);
        animation: fadeIn 0.3s ease-out;
    }

    /* Profile Dropdown Mobile Improvements */
    .lm-profile-dropdown {
        position: fixed;
        top: calc(var(--lm-header-height, 64px) + 8px);
        width: calc(100vw - 32px);
        right: 16px;
        left: auto;
        max-height: calc(100vh - var(--lm-header-height, 64px) - 48px);
        z-index: 9999;
        border-radius: var(--lm-radius-xl);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px) scale(0.95);
        transform-origin: top right;
    }

    .lm-profile-dropdown.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .lm-profile-header {
        padding: var(--lm-space-5) var(--lm-space-4);
        background: linear-gradient(135deg, var(--lm-bg-secondary) 0%, var(--lm-bg-white) 100%);
        border-bottom: 2px solid var(--lm-border-soft);
        border-radius: var(--lm-radius-xl) var(--lm-radius-xl) 0 0;
    }

    .lm-profile-menu {
        padding: var(--lm-space-2);
        max-height: calc(100vh - var(--lm-header-height, 64px) - 200px);
        overflow-y: auto;
    }

    .lm-profile-menu a {
        display: flex;
        align-items: center;
        gap: var(--lm-space-3);
        padding: var(--lm-space-4);
        margin: var(--lm-space-2) 0;
        background: var(--lm-bg-secondary);
        border-radius: var(--lm-radius-md);
        transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .lm-profile-menu a:active {
        transform: scale(0.98);
        background: rgba(var(--lm-primary-rgb, 64, 154, 114), 0.08);
    }

    .lm-profile-menu a svg {
        flex-shrink: 0;
    }

    .lm-profile-divider {
        height: 1px;
        background: var(--lm-border-soft);
        margin: var(--lm-space-2) var(--lm-space-4);
    }

    .lm-profile-dropdown.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        z-index: -1;
        backdrop-filter: blur(3px);
        animation: fadeIn 0.3s ease-out;
    }

    /* Ensure notification button is clickable on mobile */
    .lm-notification-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Animations */
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Sidebar Footer Mobile - Full Width */
    .lm-sidebar-footer {
        width: calc(100% + 32px);
        margin-left: -16px;
        margin-right: -16px;
        padding: var(--lm-space-4) var(--lm-space-5);
        border-top: 1px solid var(--lm-sidebar-border);
        border-radius: 0;
        background: var(--lm-sidebar-bg);
    }

    .lm-logout-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--lm-space-2);
        padding: var(--lm-space-4) var(--lm-space-4);
        margin: 0;
        width: 100%;
        border-radius: var(--lm-radius-md);
        font-size: var(--lm-text-sm);
        transition: all var(--lm-transition-fast);
    }

    .lm-logout-link:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* =====================================================
   HEADER PROFILE DROPDOWN
===================================================== */
.lm-header-profile {
    position: relative;
}

.lm-profile-btn {
    display: flex;
    align-items: center;
    gap: var(--lm-space-3);
    padding: var(--lm-space-2) var(--lm-space-3);
    border: 1px solid var(--lm-border-soft);
    background: var(--lm-bg-white);
    border-radius: var(--lm-radius-lg);
    cursor: pointer;
    transition: all var(--lm-transition-fast);
}

.lm-profile-btn:hover {
    border-color: var(--lm-primary);
    box-shadow: var(--lm-shadow-sm);
}

.lm-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--lm-radius-full);
    object-fit: cover;
}

.lm-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: var(--lm-radius-full);
    object-fit: cover;
}

.lm-user-name {
    font-size: var(--lm-text-sm);
    font-weight: var(--lm-font-medium);
    color: var(--lm-text-dark);
}

.lm-chevron {
    color: var(--lm-text-muted);
    transition: transform var(--lm-transition-fast);
}

.lm-header-profile:hover .lm-chevron {
    transform: rotate(180deg);
}

/* Profile Dropdown */
.lm-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--lm-bg-white);
    border-radius: var(--lm-radius-lg);
    box-shadow: var(--lm-shadow-xl);
    border: 1px solid var(--lm-border-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--lm-transition-fast);
    z-index: 200;
}

.lm-header-profile:hover .lm-profile-dropdown,
.lm-profile-dropdown:hover,
.lm-profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lm-profile-header {
    display: flex;
    align-items: center;
    gap: var(--lm-space-3);
    padding: var(--lm-space-4);
    border-bottom: 1px solid var(--lm-border-soft);
}

.lm-profile-info {
    flex: 1;
    min-width: 0;
}

.lm-profile-info strong {
    display: block;
    font-size: var(--lm-text-sm);
    font-weight: var(--lm-font-semibold);
    color: var(--lm-text-dark);
    margin-bottom: 2px;
}

.lm-profile-info span {
    display: block;
    font-size: var(--lm-text-xs);
    color: var(--lm-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lm-profile-menu {
    padding: var(--lm-space-2);
}

.lm-profile-menu a {
    display: flex;
    align-items: center;
    gap: var(--lm-space-3);
    padding: var(--lm-space-3);
    border-radius: var(--lm-radius-md);
    text-decoration: none;
    font-size: var(--lm-text-sm);
    color: var(--lm-text-body);
    transition: all var(--lm-transition-fast);
}

.lm-profile-menu a:hover {
    background: var(--lm-primary-soft);
    color: var(--lm-primary);
}

.lm-profile-menu a svg {
    color: var(--lm-text-muted);
}

.lm-profile-menu a:hover svg {
    color: var(--lm-primary);
}

.lm-profile-menu .lm-logout:hover {
    background: var(--lm-danger-soft);
    color: var(--lm-danger);
}

.lm-profile-menu .lm-logout:hover svg {
    color: var(--lm-danger);
}

.lm-profile-divider {
    height: 1px;
    background: var(--lm-border-soft);
    margin: var(--lm-space-2) 0;
}

/* =====================================================
   CONTENT AREA
===================================================== */
.lm-content {
    padding: var(--lm-space-6);
    flex: 1;
    overflow-y: auto;
    width: 100%;
}

/* =====================================================
   DASHBOARD HOME
===================================================== */
.lm-dashboard-home {
    width: 100%;
    max-width: 100%;
}

.lm-welcome-card {
    background: linear-gradient(135deg, var(--lm-primary) 0%, #2d6b4f 100%);
    color: white;
    padding: var(--lm-space-6);
    border-radius: var(--lm-radius-lg);
    margin-bottom: var(--lm-space-6);
}

.lm-welcome-card h2 {
    margin: 0 0 var(--lm-space-2) 0;
    font-size: var(--lm-text-2xl);
    font-weight: var(--lm-font-bold);
}

.lm-welcome-card p {
    margin: 0;
    opacity: 0.9;
}

/* Stats Grid - Basic (enhanced styles in dashboard.css) */
.lm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--lm-space-5);
    margin-bottom: var(--lm-space-6);
}

/* NOTE: Main stat card styles are in dashboard.css with professional design */
/* These are fallback styles only */
.lm-stat-purple .lm-stat-icon {
    background: var(--lm-accent-soft);
    color: var(--lm-accent);
}

.lm-stat-blue .lm-stat-icon {
    background: var(--lm-info-soft);
    color: var(--lm-info);
}

.lm-stat-green .lm-stat-icon {
    background: var(--lm-success-soft);
    color: var(--lm-success);
}

.lm-stat-orange .lm-stat-icon {
    background: var(--lm-warning-soft);
    color: var(--lm-warning);
}

/* View Placeholder */
.lm-view-placeholder {
    text-align: center;
    padding: 80px 20px;
    background: var(--lm-bg-white);
    border-radius: var(--lm-radius-lg);
    border: 1px solid var(--lm-border-soft);
}

.lm-placeholder-icon {
    font-size: 48px;
    margin-bottom: var(--lm-space-4);
}

.lm-view-placeholder h2 {
    margin: 0 0 var(--lm-space-2) 0;
    font-size: var(--lm-text-xl);
    color: var(--lm-text-dark);
}

.lm-view-placeholder p {
    margin: 0;
    color: var(--lm-text-muted);
}

/* =====================================================
   AUTHENTICATION PAGES
===================================================== */
.lm-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--lm-space-5);
    background: linear-gradient(135deg, #409a72 0%, #2d6b4f 50%, #1f4d38 100%);
}

.lm-auth-container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: var(--lm-radius-xl);
    padding: 40px;
    box-shadow: var(--lm-shadow-xl);
}

.lm-auth-header {
    text-align: center;
    margin-bottom: var(--lm-space-8);
}

.lm-auth-header svg {
    margin-bottom: var(--lm-space-4);
}

.lm-auth-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--lm-radius-xl);
    object-fit: cover;
    margin-bottom: var(--lm-space-4);
    box-shadow: 0 4px 15px rgba(123, 108, 246, 0.3);
}

.lm-auth-header h1 {
    margin: 0 0 var(--lm-space-2) 0;
    font-size: var(--lm-text-2xl);
    font-weight: var(--lm-font-bold);
    color: var(--lm-text-dark);
}

.lm-auth-header p {
    margin: 0;
    color: var(--lm-text-muted);
}

.lm-auth-form {
    margin-bottom: var(--lm-space-6);
}

.lm-form-group {
    margin-bottom: var(--lm-space-5);
}

.lm-form-group label {
    display: block;
    margin-bottom: var(--lm-space-2);
    font-weight: var(--lm-font-medium);
    color: var(--lm-text-dark);
    font-size: var(--lm-text-sm);
}

.lm-form-group input,
.lm-form-group select {
    width: 100%;
    padding: var(--lm-space-3) var(--lm-space-4);
    border: 1px solid var(--lm-border-color);
    border-radius: var(--lm-radius-md);
    font-size: var(--lm-text-sm);
    color: var(--lm-text-dark);
    transition: all var(--lm-transition-fast);
    background: var(--lm-bg-white);
}

.lm-form-group input:focus,
.lm-form-group select:focus {
    outline: none;
    border-color: var(--lm-primary);
    box-shadow: var(--lm-shadow-focus);
}

.lm-form-group input::placeholder {
    color: var(--lm-text-muted);
}

/* Password Field with Toggle */
.lm-password-field {
    position: relative;
    display: block;
}

.lm-password-field input {
    padding-right: 48px;
}

.lm-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--lm-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--lm-transition-fast);
}

.lm-password-toggle:hover {
    color: var(--lm-primary);
}

.lm-password-toggle svg {
    width: 20px;
    height: 20px;
}

.lm-password-toggle .lm-icon-eye-off {
    display: none;
}

.lm-form-hint {
    display: block;
    margin-top: var(--lm-space-1);
    color: var(--lm-text-muted);
    font-size: var(--lm-text-xs);
}

.lm-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lm-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--lm-space-4);
}

.lm-checkbox {
    display: flex;
    align-items: center;
    gap: var(--lm-space-2);
    cursor: pointer;
    font-size: var(--lm-text-sm);
    color: var(--lm-text-body);
}

.lm-checkbox input {
    width: auto;
    margin: 0;
}

.lm-link {
    color: var(--lm-primary);
    text-decoration: none;
    font-weight: var(--lm-font-medium);
    font-size: var(--lm-text-sm);
    transition: color var(--lm-transition-fast);
}

.lm-link:hover {
    color: var(--lm-primary-hover);
}

/* Brand Title */
.lm-auth-branding {
    text-align: center;
    margin-bottom: var(--lm-space-6);
}

.lm-auth-brand-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--lm-radius-xl);
    object-fit: cover;
    display: block;
    margin: 0 auto var(--lm-space-3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.lm-auth-brand-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lm-primary);
    margin-bottom: var(--lm-space-2);
    letter-spacing: -0.5px;
}

.lm-auth-brand-tagline {
    margin: 0;
    font-size: var(--lm-text-sm);
    color: var(--lm-text-muted);
}

.lm-auth-footer {
    text-align: center;
    color: var(--lm-text-muted);
    font-size: var(--lm-text-sm);
}

.lm-auth-footer p {
    margin: 0;
}

/* Powered By Footer */
.lm-auth-powered-by {
    text-align: center;
    margin-top: var(--lm-space-6);
    padding-top: var(--lm-space-5);
    border-top: 1px solid var(--lm-border);
    font-size: var(--lm-text-xs);
    color: var(--lm-text-muted);
}

.lm-auth-powered-by a {
    color: var(--lm-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lm-auth-powered-by a:hover {
    color: var(--lm-primary-hover);
    text-decoration: underline;
}

/* Buttons */
.lm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--lm-space-2);
    padding: var(--lm-space-3) var(--lm-space-6);
    border: none;
    border-radius: var(--lm-radius-md);
    font-size: var(--lm-text-sm);
    font-weight: var(--lm-font-semibold);
    cursor: pointer;
    transition: all var(--lm-transition-fast);
}

.lm-btn-primary {
    background: var(--lm-primary);
    color: white;
}

.lm-btn-primary:hover {
    background: var(--lm-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--lm-shadow-md);
}

.lm-btn-block {
    width: 100%;
}

.lm-btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: lm-spin 0.8s linear infinite;
}

/* Alerts */
.lm-alert {
    padding: var(--lm-space-3) var(--lm-space-4);
    border-radius: var(--lm-radius-md);
    margin-bottom: var(--lm-space-4);
    font-size: var(--lm-text-sm);
}

.lm-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.lm-alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* =====================================================
   MOBILE RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
    .lm-header-search input {
        width: 200px;
    }

    .lm-header-search input:focus {
        width: 240px;
    }
}

/* Tablet view (769px-1024px): Show sidebar */
@media (min-width: 769px) and (max-width: 1024px) {
    .lm-sidebar {
        transform: translateX(0);
        display: flex;
    }

    .lm-main {
        margin-left: var(--lm-sidebar-width);
    }
}

@media (max-width: 768px) {
    .lm-sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .lm-sidebar.open {
        transform: translateX(0);
    }

    .lm-main {
        margin-left: 0;
    }

    .lm-header-search {
        display: none;
    }

    .lm-content {
        padding: var(--lm-space-4);
    }

    .lm-stats-grid {
        grid-template-columns: 1fr;
    }

    .lm-header-title {
        font-size: var(--lm-text-lg);
    }

    .lm-auth-container {
        padding: var(--lm-space-6);
    }

    .lm-form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* Sidebar overlay for mobile */
.lm-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 999;
    transition: opacity 0.3s ease;
}

.lm-sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .lm-sidebar-overlay {
        left: var(--lm-sidebar-width);
    }
}

/* =====================================================
   TOAST NOTIFICATION SYSTEM
===================================================== */
.lm-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2147483648;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.lm-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--lm-bg-white);
    border-radius: var(--lm-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--lm-info);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.2s ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.lm-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.lm-toast-success {
    border-left-color: var(--lm-success);
}

.lm-toast-error {
    border-left-color: var(--lm-danger);
}

.lm-toast-warning {
    border-left-color: var(--lm-warning);
}

.lm-toast-info {
    border-left-color: var(--lm-info);
}

.lm-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lm-toast-icon svg {
    width: 24px;
    height: 24px;
}

.lm-toast-success .lm-toast-icon {
    color: var(--lm-success);
}

.lm-toast-success .lm-toast-icon svg {
    stroke: var(--lm-success);
}

.lm-toast-error .lm-toast-icon {
    color: var(--lm-danger);
}

.lm-toast-error .lm-toast-icon svg {
    stroke: var(--lm-danger);
}

.lm-toast-warning .lm-toast-icon {
    color: var(--lm-warning);
}

.lm-toast-warning .lm-toast-icon svg {
    stroke: var(--lm-warning);
}

.lm-toast-info .lm-toast-icon {
    color: var(--lm-info);
}

.lm-toast-info .lm-toast-icon svg {
    stroke: var(--lm-info);
}

.lm-toast-content {
    flex: 1;
    min-width: 0;
}

.lm-toast-message {
    margin: 0;
    font-size: var(--lm-text-sm);
    font-weight: var(--lm-font-medium);
    color: var(--lm-text-dark);
    line-height: 1.5;
}

.lm-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--lm-text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: color var(--lm-transition-fast);
}

.lm-toast-close:hover {
    color: var(--lm-text-dark);
}

.lm-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: lm-toast-progress 4s linear forwards;
}

.lm-toast-success .lm-toast-progress {
    background: var(--lm-success);
}

.lm-toast-error .lm-toast-progress {
    background: var(--lm-danger);
}

.lm-toast-warning .lm-toast-progress {
    background: var(--lm-warning);
}

.lm-toast-info .lm-toast-progress {
    background: var(--lm-info);
}

@keyframes lm-toast-progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Auth Brand Name */
.lm-auth-brand {
    display: block;
    margin-top: var(--lm-space-3);
    font-size: var(--lm-text-xs);
    font-weight: var(--lm-font-semibold);
    color: var(--lm-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =====================================================
   CONFIRMATION MODAL SYSTEM (Optimized)
===================================================== */
.lm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.lm-modal-overlay.lm-modal-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lm-modal {
    background: var(--lm-bg-white);
    border-radius: var(--lm-radius-xl);
    padding: var(--lm-space-8);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.15s ease;
}

.lm-modal-overlay.lm-modal-show .lm-modal {
    transform: scale(1);
}

.lm-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--lm-space-5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
}

.lm-modal-icon svg {
    width: 36px;
    height: 36px;
    color: var(--lm-warning);
}

.lm-modal-danger .lm-modal-icon {
    background: rgba(220, 38, 38, 0.1);
}

.lm-modal-danger .lm-modal-icon svg {
    color: var(--lm-danger);
}

.lm-modal-info .lm-modal-icon {
    background: rgba(59, 130, 246, 0.1);
}

.lm-modal-info .lm-modal-icon svg {
    color: var(--lm-info);
}

.lm-modal-title {
    margin: 0 0 var(--lm-space-3) 0;
    font-size: var(--lm-text-xl);
    font-weight: var(--lm-font-bold);
    color: var(--lm-text-dark);
}

.lm-modal-message {
    margin: 0 0 var(--lm-space-6) 0;
    font-size: var(--lm-text-base);
    color: var(--lm-text-muted);
    line-height: 1.6;
}

.lm-modal-actions {
    display: flex;
    gap: var(--lm-space-3);
    justify-content: center;
}

.lm-modal-actions .lm-btn {
    min-width: 120px;
}

.lm-btn-danger {
    background: var(--lm-danger);
    color: white;
}

.lm-btn-danger:hover {
    background: #b91c1c;
}

/* =====================================================
   ALERT POPUP SYSTEM (Success/Error/Warning/Info)
===================================================== */
.lm-alert {
    background: var(--lm-bg-white);
    border-radius: 24px;
    padding: 48px 40px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 80px -12px rgba(0, 0, 0, 0.35);
    transform: scale(0.8) translateY(40px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
}

.lm-modal-overlay.lm-modal-show .lm-alert {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.lm-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
    background-size: 200% 100%;
    animation: lm-gradient-shift 2s ease infinite;
}

@keyframes lm-gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.lm-alert-error::before {
    background: linear-gradient(90deg, #ef4444, #f87171, #fca5a5);
    background-size: 200% 100%;
}

.lm-alert-warning::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #fcd34d);
    background-size: 200% 100%;
}

.lm-alert-info::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
    background-size: 200% 100%;
}

/* Animated Icon Container */
.lm-alert-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.lm-alert-icon-animated {
    background: transparent;
}

/* Animated Checkmark for Success */
.lm-alert-checkmark {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #10b981;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #10b981;
}

.lm-alert-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: lm-checkmark-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.lm-alert-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #10b981;
    animation: lm-checkmark-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes lm-checkmark-circle {
    0% {
        stroke-dashoffset: 166;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes lm-checkmark-check {
    0% {
        stroke-dashoffset: 48;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* Animated Cross for Error */
.lm-alert-cross {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #ef4444;
    stroke-miterlimit: 10;
}

.lm-alert-cross-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #ef4444;
    fill: none;
    animation: lm-checkmark-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.lm-alert-cross-line {
    transform-origin: 50% 50%;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    stroke-width: 3;
    stroke: #ef4444;
    stroke-linecap: round;
    animation: lm-cross-line 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes lm-cross-line {
    0% {
        stroke-dashoffset: 60;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* Non-animated icons fallback */
.lm-alert-icon:not(.lm-alert-icon-animated) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.15) 100%);
}

.lm-alert-icon:not(.lm-alert-icon-animated) svg {
    width: 48px;
    height: 48px;
    color: #10b981;
}

.lm-alert-warning .lm-alert-icon:not(.lm-alert-icon-animated) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
}

.lm-alert-warning .lm-alert-icon:not(.lm-alert-icon-animated) svg {
    color: #f59e0b;
}

.lm-alert-info .lm-alert-icon:not(.lm-alert-icon-animated) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(96, 165, 250, 0.15) 100%);
}

.lm-alert-info .lm-alert-icon:not(.lm-alert-icon-animated) svg {
    color: #3b82f6;
}

/* Confetti Effect */
.lm-confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.lm-confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    opacity: 0;
}

.lm-confetti-0 {
    background: #10b981;
    border-radius: 50%;
    animation: lm-confetti-fall-1 2.5s ease-out forwards;
}

.lm-confetti-1 {
    background: #3b82f6;
    border-radius: 2px;
    animation: lm-confetti-fall-2 2.8s ease-out forwards;
}

.lm-confetti-2 {
    background: #f59e0b;
    border-radius: 50%;
    animation: lm-confetti-fall-3 2.3s ease-out forwards;
}

.lm-confetti-3 {
    background: #ec4899;
    border-radius: 2px;
    animation: lm-confetti-fall-4 2.6s ease-out forwards;
}

.lm-confetti-4 {
    background: #8b5cf6;
    border-radius: 50%;
    animation: lm-confetti-fall-5 2.4s ease-out forwards;
}

.lm-confetti-5 {
    background: #06b6d4;
    border-radius: 2px;
    animation: lm-confetti-fall-6 2.7s ease-out forwards;
}

/* Position confetti across the width */
.lm-confetti:nth-child(1) {
    left: 5%;
    animation-delay: 0s;
}

.lm-confetti:nth-child(2) {
    left: 10%;
    animation-delay: 0.05s;
}

.lm-confetti:nth-child(3) {
    left: 15%;
    animation-delay: 0.1s;
}

.lm-confetti:nth-child(4) {
    left: 20%;
    animation-delay: 0.15s;
}

.lm-confetti:nth-child(5) {
    left: 25%;
    animation-delay: 0.08s;
}

.lm-confetti:nth-child(6) {
    left: 30%;
    animation-delay: 0.12s;
}

.lm-confetti:nth-child(7) {
    left: 35%;
    animation-delay: 0.2s;
}

.lm-confetti:nth-child(8) {
    left: 40%;
    animation-delay: 0.03s;
}

.lm-confetti:nth-child(9) {
    left: 45%;
    animation-delay: 0.18s;
}

.lm-confetti:nth-child(10) {
    left: 50%;
    animation-delay: 0.07s;
}

.lm-confetti:nth-child(11) {
    left: 55%;
    animation-delay: 0.14s;
}

.lm-confetti:nth-child(12) {
    left: 60%;
    animation-delay: 0.22s;
}

.lm-confetti:nth-child(13) {
    left: 65%;
    animation-delay: 0.04s;
}

.lm-confetti:nth-child(14) {
    left: 70%;
    animation-delay: 0.16s;
}

.lm-confetti:nth-child(15) {
    left: 75%;
    animation-delay: 0.09s;
}

.lm-confetti:nth-child(16) {
    left: 80%;
    animation-delay: 0.24s;
}

.lm-confetti:nth-child(17) {
    left: 85%;
    animation-delay: 0.11s;
}

.lm-confetti:nth-child(18) {
    left: 90%;
    animation-delay: 0.19s;
}

.lm-confetti:nth-child(19) {
    left: 95%;
    animation-delay: 0.06s;
}

.lm-confetti:nth-child(20) {
    left: 8%;
    animation-delay: 0.26s;
}

.lm-confetti:nth-child(21) {
    left: 18%;
    animation-delay: 0.13s;
}

.lm-confetti:nth-child(22) {
    left: 28%;
    animation-delay: 0.28s;
}

.lm-confetti:nth-child(23) {
    left: 38%;
    animation-delay: 0.02s;
}

.lm-confetti:nth-child(24) {
    left: 48%;
    animation-delay: 0.21s;
}

.lm-confetti:nth-child(25) {
    left: 58%;
    animation-delay: 0.17s;
}

.lm-confetti:nth-child(26) {
    left: 68%;
    animation-delay: 0.3s;
}

.lm-confetti:nth-child(27) {
    left: 78%;
    animation-delay: 0.08s;
}

.lm-confetti:nth-child(28) {
    left: 88%;
    animation-delay: 0.25s;
}

.lm-confetti:nth-child(29) {
    left: 12%;
    animation-delay: 0.32s;
}

.lm-confetti:nth-child(30) {
    left: 22%;
    animation-delay: 0.01s;
}

.lm-confetti:nth-child(31) {
    left: 32%;
    animation-delay: 0.34s;
}

.lm-confetti:nth-child(32) {
    left: 42%;
    animation-delay: 0.15s;
}

.lm-confetti:nth-child(33) {
    left: 52%;
    animation-delay: 0.27s;
}

.lm-confetti:nth-child(34) {
    left: 62%;
    animation-delay: 0.1s;
}

.lm-confetti:nth-child(35) {
    left: 72%;
    animation-delay: 0.36s;
}

.lm-confetti:nth-child(36) {
    left: 82%;
    animation-delay: 0.04s;
}

.lm-confetti:nth-child(37) {
    left: 92%;
    animation-delay: 0.23s;
}

.lm-confetti:nth-child(38) {
    left: 3%;
    animation-delay: 0.38s;
}

.lm-confetti:nth-child(39) {
    left: 13%;
    animation-delay: 0.12s;
}

.lm-confetti:nth-child(40) {
    left: 23%;
    animation-delay: 0.4s;
}

.lm-confetti:nth-child(41) {
    left: 33%;
    animation-delay: 0.06s;
}

.lm-confetti:nth-child(42) {
    left: 43%;
    animation-delay: 0.29s;
}

.lm-confetti:nth-child(43) {
    left: 53%;
    animation-delay: 0.18s;
}

.lm-confetti:nth-child(44) {
    left: 63%;
    animation-delay: 0.42s;
}

.lm-confetti:nth-child(45) {
    left: 73%;
    animation-delay: 0.14s;
}

.lm-confetti:nth-child(46) {
    left: 83%;
    animation-delay: 0.35s;
}

.lm-confetti:nth-child(47) {
    left: 93%;
    animation-delay: 0.07s;
}

.lm-confetti:nth-child(48) {
    left: 7%;
    animation-delay: 0.31s;
}

.lm-confetti:nth-child(49) {
    left: 47%;
    animation-delay: 0.2s;
}

.lm-confetti:nth-child(50) {
    left: 87%;
    animation-delay: 0.44s;
}

@keyframes lm-confetti-fall-1 {
    0% {
        opacity: 1;
        top: -20px;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        top: 100%;
        transform: translateX(-30px) rotate(720deg) scale(0.5);
    }
}

@keyframes lm-confetti-fall-2 {
    0% {
        opacity: 1;
        top: -20px;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        top: 100%;
        transform: translateX(40px) rotate(-540deg) scale(0.5);
    }
}

@keyframes lm-confetti-fall-3 {
    0% {
        opacity: 1;
        top: -20px;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        top: 100%;
        transform: translateX(-50px) rotate(360deg) scale(0.5);
    }
}

@keyframes lm-confetti-fall-4 {
    0% {
        opacity: 1;
        top: -20px;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        top: 100%;
        transform: translateX(25px) rotate(-720deg) scale(0.5);
    }
}

@keyframes lm-confetti-fall-5 {
    0% {
        opacity: 1;
        top: -20px;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        top: 100%;
        transform: translateX(-35px) rotate(540deg) scale(0.5);
    }
}

@keyframes lm-confetti-fall-6 {
    0% {
        opacity: 1;
        top: -20px;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        top: 100%;
        transform: translateX(45px) rotate(-360deg) scale(0.5);
    }
}

/* Title */
.lm-alert-title {
    margin: 0 0 8px 0;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--lm-text-dark);
    letter-spacing: -0.03em;
}

.lm-alert-success .lm-alert-title {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.lm-alert-subtitle {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.lm-alert-error .lm-alert-subtitle {
    color: #ef4444;
}

.lm-alert-warning .lm-alert-subtitle {
    color: #f59e0b;
}

.lm-alert-info .lm-alert-subtitle {
    color: #3b82f6;
}

/* Message */
.lm-alert-message {
    margin: 0 0 32px 0;
    font-size: 1rem;
    color: var(--lm-text-muted);
    line-height: 1.7;
}

/* Actions */
.lm-alert-actions {
    display: flex;
    justify-content: center;
}

.lm-alert-close {
    min-width: 160px;
    padding: 16px 40px;
    border: none;
    border-radius: 14px;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.lm-alert-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.lm-alert-close:hover::before {
    left: 100%;
}

.lm-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.lm-btn-success:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.5);
}

.lm-btn-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.lm-btn-error:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.5);
}

.lm-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.lm-btn-warning:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
}

.lm-btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.lm-btn-info:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

/* Dark mode alert */
body.lm-dark-mode .lm-alert {
    background: #1e293b;
}

body.lm-dark-mode .lm-alert-title {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-alert-subtitle {
    color: #34d399;
}

body.lm-dark-mode .lm-alert-message {
    color: #94a3b8;
}

/* =====================================================
   UTILITIES
===================================================== */
.lm-hidden {
    display: none !important;
}

.lm-text-center {
    text-align: center;
}

.lm-mt-1 {
    margin-top: var(--lm-space-2);
}

.lm-mt-2 {
    margin-top: var(--lm-space-4);
}

.lm-mt-3 {
    margin-top: var(--lm-space-6);
}

.lm-mb-1 {
    margin-bottom: var(--lm-space-2);
}

.lm-mb-2 {
    margin-bottom: var(--lm-space-4);
}

.lm-mb-3 {
    margin-bottom: var(--lm-space-6);
}

/* Reset Link Modal (Development Mode) */
.lm-reset-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.lm-reset-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lm-reset-modal h3 {
    margin: 0 0 16px;
    font-size: 1.25rem;
    color: #f59e0b;
}

.lm-reset-modal p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.lm-reset-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.lm-reset-link-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #64748b;
    background: #f8fafc;
}

.lm-reset-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.lm-btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.lm-btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.lm-btn-secondary:hover {
    background: #e2e8f0;
}

/* =====================================================
   THEME TOGGLE BUTTON
===================================================== */
.lm-theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.lm-theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--lm-radius-lg);
    cursor: pointer;
    transition: all var(--lm-transition-fast);
    color: var(--lm-text-muted);
}

.lm-theme-btn:hover {
    background: var(--lm-primary-soft);
    color: var(--lm-primary);
}

.lm-theme-btn svg {
    transition: all 0.3s ease;
}

/* Sun icon visible in light mode, moon visible in dark mode */
.lm-icon-moon {
    display: none;
}

.lm-icon-sun {
    display: block;
}

/* =====================================================
   DARK MODE STYLES
===================================================== */
body.lm-dark-mode {
    --lm-bg-primary: #0f172a;
    --lm-bg-white: #1e293b;
    --lm-bg-dark: #0f172a;

    --lm-text-dark: #f1f5f9;
    --lm-text-body: #cbd5e1;
    --lm-text-muted: #94a3b8;
    --lm-text-light: #64748b;

    --lm-border-soft: #334155;
    --lm-border-color: #334155;
}

body.lm-dark-mode .lm-icon-moon {
    display: block;
}

body.lm-dark-mode .lm-icon-sun {
    display: none;
}

body.lm-dark-mode .lm-theme-btn {
    color: #fbbf24;
}

body.lm-dark-mode .lm-theme-btn:hover {
    background: rgba(251, 191, 36, 0.1);
}

/* Dashboard Dark Mode */
body.lm-dark-mode .lm-dashboard,
body.lm-dark-mode .lm-spa-app {
    background: #0f172a;
}

body.lm-dark-mode .lm-sidebar {
    background: #1e293b;
    border-color: #334155;
}

body.lm-dark-mode .lm-sidebar-header {
    border-color: #334155;
}

body.lm-dark-mode .lm-logo-text {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-sidebar-nav .lm-menu a {
    color: #94a3b8;
}

body.lm-dark-mode .lm-sidebar-nav .lm-menu a:hover {
    background: rgba(123, 108, 246, 0.1);
    color: #f1f5f9;
}

body.lm-dark-mode .lm-sidebar-nav .lm-menu a.active {
    background: linear-gradient(135deg, rgba(123, 108, 246, 0.2) 0%, rgba(136, 108, 255, 0.2) 100%);
    color: #a49bf8;
}

body.lm-dark-mode .lm-menu-label {
    color: #a49bf8;
}

body.lm-dark-mode .lm-header {
    background: #1e293b;
    border-color: #334155;
}

body.lm-dark-mode .lm-header-title {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-header-search input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.lm-dark-mode .lm-header-search input::placeholder {
    color: #64748b;
}

body.lm-dark-mode .lm-notification-btn,
body.lm-dark-mode .lm-profile-btn {
    color: #94a3b8;
}

body.lm-dark-mode .lm-notification-btn:hover,
body.lm-dark-mode .lm-profile-btn:hover {
    background: rgba(123, 108, 246, 0.1);
}

body.lm-dark-mode .lm-user-name {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-notification-dropdown,
body.lm-dark-mode .lm-profile-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.lm-dark-mode .lm-dropdown-header,
body.lm-dark-mode .lm-profile-header {
    border-color: #334155;
}

body.lm-dark-mode .lm-dropdown-header span,
body.lm-dark-mode .lm-profile-info strong {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-notification-content p {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-notification-item:hover,
body.lm-dark-mode .lm-profile-menu a:hover {
    background: rgba(123, 108, 246, 0.1);
}

body.lm-dark-mode .lm-profile-menu a {
    color: #cbd5e1;
}

body.lm-dark-mode .lm-profile-divider {
    background: #334155;
}

body.lm-dark-mode .lm-content {
    background: #0f172a;
}

/* Cards and Panels Dark Mode */
body.lm-dark-mode .lm-card,
body.lm-dark-mode .lm-stat-card,
body.lm-dark-mode .lm-panel,
body.lm-dark-mode .lm-chart-card,
body.lm-dark-mode .lm-table-card,
body.lm-dark-mode .lm-settings-card,
body.lm-dark-mode .lm-profile-card {
    background: #1e293b;
    border-color: #334155;
}

body.lm-dark-mode .lm-card-header,
body.lm-dark-mode .lm-panel-header,
body.lm-dark-mode .lm-settings-card-header {
    border-color: #334155;
}

body.lm-dark-mode .lm-card-title,
body.lm-dark-mode .lm-panel-title,
body.lm-dark-mode h1,
body.lm-dark-mode h2,
body.lm-dark-mode h3,
body.lm-dark-mode h4,
body.lm-dark-mode h5,
body.lm-dark-mode h6 {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-stat-card .stat-label {
    color: #94a3b8;
}

body.lm-dark-mode .lm-stat-card .stat-value {
    color: #f1f5f9;
}

/* Tables Dark Mode */
body.lm-dark-mode .lm-table th {
    background: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}

body.lm-dark-mode .lm-table td {
    color: #cbd5e1;
    border-color: #334155;
}

body.lm-dark-mode .lm-table tr:hover td {
    background: rgba(123, 108, 246, 0.05);
}

body.lm-dark-mode .lm-table-title {
    color: #f1f5f9;
}

/* Form Elements Dark Mode */
body.lm-dark-mode input,
body.lm-dark-mode select,
body.lm-dark-mode textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.lm-dark-mode input:focus,
body.lm-dark-mode select:focus,
body.lm-dark-mode textarea:focus {
    border-color: var(--lm-primary);
}

body.lm-dark-mode input::placeholder,
body.lm-dark-mode textarea::placeholder {
    color: #64748b;
}

body.lm-dark-mode label {
    color: #cbd5e1;
}

body.lm-dark-mode .lm-form-hint {
    color: #64748b;
}

body.lm-dark-mode input:disabled {
    background: #1e293b;
    color: #64748b;
}

/* Password Section Dark Mode */
body.lm-dark-mode .lm-password-section {
    background: #0f172a;
}

body.lm-dark-mode .lm-notification-item {
    background: transparent;
    border-color: #334155;
}

body.lm-dark-mode .lm-notification-item.unread {
    background: rgba(123, 108, 246, 0.08);
}

body.lm-dark-mode .lm-notification-item:hover {
    background: rgba(123, 108, 246, 0.1);
}

body.lm-dark-mode .lm-notification-item.unread:hover {
    background: rgba(123, 108, 246, 0.15);
}

body.lm-dark-mode .lm-notification-title {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-notification-message {
    color: #94a3b8;
}

body.lm-dark-mode .lm-notification-time {
    color: #64748b;
}

body.lm-dark-mode .lm-notification-icon {
    background: rgba(148, 163, 184, 0.1);
}

body.lm-dark-mode .lm-notification-delete {
    color: #64748b;
}

body.lm-dark-mode .lm-notification-delete:hover {
    background: var(--lm-danger);
    color: white;
}

body.lm-dark-mode .lm-notification-empty {
    color: #64748b;
}

body.lm-dark-mode .lm-dropdown-footer {
    border-color: #334155;
}

body.lm-dark-mode .lm-mark-all-read {
    color: var(--lm-primary);
}

/* Profile/Settings View Dark Mode */
body.lm-dark-mode .lm-profile-view,
body.lm-dark-mode .lm-settings-view {
    background: #0f172a;
}

body.lm-dark-mode .lm-avatar-upload-section {
    border-color: #334155;
}

body.lm-dark-mode .lm-btn-remove {
    background: #0f172a;
    color: #94a3b8;
}

body.lm-dark-mode .lm-btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

body.lm-dark-mode .lm-btn-cancel {
    background: #0f172a;
    color: #94a3b8;
}

body.lm-dark-mode .lm-btn-cancel:hover {
    background: #334155;
}

body.lm-dark-mode .lm-settings-actions {
    border-color: #334155;
}

/* Toggle Switch Dark Mode */
body.lm-dark-mode .lm-toggle-slider {
    background: #334155;
}

/* Sidebar Footer Dark Mode */
body.lm-dark-mode .lm-sidebar-footer {
    border-color: #334155;
}

body.lm-dark-mode .lm-logout-link {
    color: #94a3b8;
}

body.lm-dark-mode .lm-logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* =====================================================
   GLOBAL ALERT POPUP
===================================================== */
.lm-alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.lm-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    pointer-events: all;
    animation: lm-alert-slide-in 0.3s ease;
    transform-origin: top right;
    border-left: 4px solid;
}

.lm-alert.lm-alert-hide {
    animation: lm-alert-slide-out 0.3s ease forwards;
}

@keyframes lm-alert-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes lm-alert-slide-out {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

.lm-alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lm-alert-icon svg {
    width: 14px;
    height: 14px;
}

.lm-alert-content {
    flex: 1;
    min-width: 0;
}

.lm-alert-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin: 0 0 4px;
    color: #1e293b;
}

.lm-alert-message {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.lm-alert-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
    margin: -4px -8px -4px 0;
}

.lm-alert-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

.lm-alert-close svg {
    width: 16px;
    height: 16px;
}

/* Alert Types */
.lm-alert-success {
    border-left-color: #10b981;
}

.lm-alert-success .lm-alert-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.lm-alert-error {
    border-left-color: #ef4444;
}

.lm-alert-error .lm-alert-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.lm-alert-warning {
    border-left-color: #f59e0b;
}

.lm-alert-warning .lm-alert-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.lm-alert-info {
    border-left-color: #3b82f6;
}

.lm-alert-info .lm-alert-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Alert Dark Mode */
body.lm-dark-mode .lm-alert {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.lm-dark-mode .lm-alert-title {
    color: #f1f5f9;
}

body.lm-dark-mode .lm-alert-message {
    color: #94a3b8;
}

body.lm-dark-mode .lm-alert-close:hover {
    background: #334155;
    color: #cbd5e1;
}

/* =====================================================
   GLOBAL ADMIN DARK CONTRAST PATCH (SEARCH + TABLES)
===================================================== */
body.lm-dark-mode .lm-spa-app .lm-table-search input,
body.lm-dark-mode .lm-spa-app .lm-search input,
body.lm-dark-mode .lm-spa-app .lm-bk-search-input,
body.lm-dark-mode .lm-spa-app .lm-po-search-input,
body.lm-dark-mode .lm-spa-app .lm-pe-search-input,
body.lm-dark-mode .lm-spa-app .lm-cb-search input,
body.lm-dark-mode .lm-spa-app .lm-cr-search input,
body.lm-dark-mode .lm-spa-app input[type="search"] {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.lm-dark-mode .lm-spa-app .lm-table-search input::placeholder,
body.lm-dark-mode .lm-spa-app .lm-search input::placeholder,
body.lm-dark-mode .lm-spa-app .lm-bk-search-input::placeholder,
body.lm-dark-mode .lm-spa-app .lm-po-search-input::placeholder,
body.lm-dark-mode .lm-spa-app .lm-pe-search-input::placeholder,
body.lm-dark-mode .lm-spa-app .lm-cb-search input::placeholder,
body.lm-dark-mode .lm-spa-app .lm-cr-search input::placeholder,
body.lm-dark-mode .lm-spa-app input[type="search"]::placeholder {
    color: #64748b !important;
}

body.lm-dark-mode .lm-spa-app .lm-table-filters select,
body.lm-dark-mode .lm-spa-app .lm-bk-select,
body.lm-dark-mode .lm-spa-app .lm-po-select,
body.lm-dark-mode .lm-spa-app .lm-pe-select,
body.lm-dark-mode .lm-spa-app .lm-cb-date-input,
body.lm-dark-mode .lm-spa-app .lm-date-input,
body.lm-dark-mode .lm-spa-app .lm-filter-select {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.lm-dark-mode .lm-spa-app .lm-table-search svg,
body.lm-dark-mode .lm-spa-app .lm-search-icon,
body.lm-dark-mode .lm-spa-app .lm-bk-search-icon,
body.lm-dark-mode .lm-spa-app .lm-po-search-icon,
body.lm-dark-mode .lm-spa-app .lm-pe-search-icon,
body.lm-dark-mode .lm-spa-app .lm-cb-search-icon,
body.lm-dark-mode .lm-spa-app .lm-cr-search-icon {
    color: #94a3b8 !important;
}

body.lm-dark-mode .lm-spa-app .lm-data-table th,
body.lm-dark-mode .lm-spa-app .lm-table th,
body.lm-dark-mode .lm-spa-app .lm-bk-table th,
body.lm-dark-mode .lm-spa-app .lm-cb-table th,
body.lm-dark-mode .lm-spa-app .lm-cr-table th,
body.lm-dark-mode .lm-spa-app .lm-pe-table th,
body.lm-dark-mode .lm-spa-app .lm-po-table th {
    color: #94a3b8 !important;
    border-color: #334155 !important;
    background: #0f172a !important;
}

body.lm-dark-mode .lm-spa-app .lm-data-table td,
body.lm-dark-mode .lm-spa-app .lm-table td,
body.lm-dark-mode .lm-spa-app .lm-bk-table td,
body.lm-dark-mode .lm-spa-app .lm-cb-table td,
body.lm-dark-mode .lm-spa-app .lm-cr-table td,
body.lm-dark-mode .lm-spa-app .lm-pe-table td,
body.lm-dark-mode .lm-spa-app .lm-po-table td {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.lm-dark-mode .lm-spa-app .lm-data-table tbody tr:hover,
body.lm-dark-mode .lm-spa-app .lm-table tbody tr:hover,
body.lm-dark-mode .lm-spa-app .lm-bk-table tbody tr:hover,
body.lm-dark-mode .lm-spa-app .lm-cb-table tbody tr:hover,
body.lm-dark-mode .lm-spa-app .lm-cr-table tbody tr:hover,
body.lm-dark-mode .lm-spa-app .lm-pe-table tbody tr:hover,
body.lm-dark-mode .lm-spa-app .lm-po-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.1) !important;
}

body.lm-dark-mode .lm-spa-app .lm-table-wrapper,
body.lm-dark-mode .lm-spa-app .lm-table-container,
body.lm-dark-mode .lm-spa-app .lm-bk-table-container,
body.lm-dark-mode .lm-spa-app .lm-cb-table-wrap,
body.lm-dark-mode .lm-spa-app .lm-cr-table-wrap,
body.lm-dark-mode .lm-spa-app .lm-po-section,
body.lm-dark-mode .lm-spa-app .lm-pe-section {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.lm-dark-mode .lm-spa-app .lm-table-header,
[data-theme="dark"] .lm-spa-app .lm-table-header {
    background: #0f172a !important;
    border-color: #334155 !important;
}

/* =====================================================
   OWNER PAGES DARK MODE COMPATIBILITY PACK
===================================================== */
body.lm-dark-mode .lm-caravans-list-wrapper,
body.lm-dark-mode .lm-caravan-add-page,
body.lm-dark-mode .lm-cal-wrapper,
body.lm-dark-mode .lm-price-wrapper,
body.lm-dark-mode .lm-block-wrapper,
body.lm-dark-mode .lm-earnings-wrapper,
body.lm-dark-mode .lm-rp-wrapper,
body.lm-dark-mode .lm-ps,
body.lm-dark-mode .lm-profile-view,
body.lm-dark-mode .lm-dc-wrapper,
body.lm-dark-mode .lm-view[data-view-content="dashboard"],
[data-theme="dark"] .lm-caravans-list-wrapper,
[data-theme="dark"] .lm-caravan-add-page,
[data-theme="dark"] .lm-cal-wrapper,
[data-theme="dark"] .lm-price-wrapper,
[data-theme="dark"] .lm-block-wrapper,
[data-theme="dark"] .lm-earnings-wrapper,
[data-theme="dark"] .lm-rp-wrapper,
[data-theme="dark"] .lm-ps,
[data-theme="dark"] .lm-profile-view,
[data-theme="dark"] .lm-dc-wrapper,
[data-theme="dark"] .lm-view[data-view-content="dashboard"] {
    color: #cbd5e1 !important;
}

body.lm-dark-mode .lm-caravans-list-wrapper h1,
body.lm-dark-mode .lm-caravans-list-wrapper h2,
body.lm-dark-mode .lm-caravans-list-wrapper h3,
body.lm-dark-mode .lm-caravans-list-wrapper h4,
body.lm-dark-mode .lm-caravan-add-page h1,
body.lm-dark-mode .lm-caravan-add-page h2,
body.lm-dark-mode .lm-caravan-add-page h3,
body.lm-dark-mode .lm-caravan-add-page h4,
body.lm-dark-mode .lm-cal-wrapper h1,
body.lm-dark-mode .lm-cal-wrapper h2,
body.lm-dark-mode .lm-cal-wrapper h3,
body.lm-dark-mode .lm-cal-wrapper h4,
body.lm-dark-mode .lm-price-wrapper h1,
body.lm-dark-mode .lm-price-wrapper h2,
body.lm-dark-mode .lm-price-wrapper h3,
body.lm-dark-mode .lm-price-wrapper h4,
body.lm-dark-mode .lm-block-wrapper h1,
body.lm-dark-mode .lm-block-wrapper h2,
body.lm-dark-mode .lm-block-wrapper h3,
body.lm-dark-mode .lm-block-wrapper h4,
body.lm-dark-mode .lm-earnings-wrapper h1,
body.lm-dark-mode .lm-earnings-wrapper h2,
body.lm-dark-mode .lm-earnings-wrapper h3,
body.lm-dark-mode .lm-earnings-wrapper h4,
body.lm-dark-mode .lm-rp-wrapper h1,
body.lm-dark-mode .lm-rp-wrapper h2,
body.lm-dark-mode .lm-rp-wrapper h3,
body.lm-dark-mode .lm-rp-wrapper h4,
body.lm-dark-mode .lm-ps h1,
body.lm-dark-mode .lm-ps h2,
body.lm-dark-mode .lm-ps h3,
body.lm-dark-mode .lm-ps h4,
body.lm-dark-mode .lm-profile-view h1,
body.lm-dark-mode .lm-profile-view h2,
body.lm-dark-mode .lm-profile-view h3,
body.lm-dark-mode .lm-profile-view h4,
body.lm-dark-mode .lm-dc-wrapper h1,
body.lm-dark-mode .lm-dc-wrapper h2,
body.lm-dark-mode .lm-dc-wrapper h3,
body.lm-dark-mode .lm-dc-wrapper h4,
body.lm-dark-mode .lm-view[data-view-content="dashboard"] h1,
body.lm-dark-mode .lm-view[data-view-content="dashboard"] h2,
body.lm-dark-mode .lm-view[data-view-content="dashboard"] h3,
body.lm-dark-mode .lm-view[data-view-content="dashboard"] h4,
[data-theme="dark"] .lm-caravans-list-wrapper h1,
[data-theme="dark"] .lm-caravans-list-wrapper h2,
[data-theme="dark"] .lm-caravans-list-wrapper h3,
[data-theme="dark"] .lm-caravans-list-wrapper h4,
[data-theme="dark"] .lm-caravan-add-page h1,
[data-theme="dark"] .lm-caravan-add-page h2,
[data-theme="dark"] .lm-caravan-add-page h3,
[data-theme="dark"] .lm-caravan-add-page h4,
[data-theme="dark"] .lm-cal-wrapper h1,
[data-theme="dark"] .lm-cal-wrapper h2,
[data-theme="dark"] .lm-cal-wrapper h3,
[data-theme="dark"] .lm-cal-wrapper h4,
[data-theme="dark"] .lm-price-wrapper h1,
[data-theme="dark"] .lm-price-wrapper h2,
[data-theme="dark"] .lm-price-wrapper h3,
[data-theme="dark"] .lm-price-wrapper h4,
[data-theme="dark"] .lm-block-wrapper h1,
[data-theme="dark"] .lm-block-wrapper h2,
[data-theme="dark"] .lm-block-wrapper h3,
[data-theme="dark"] .lm-block-wrapper h4,
[data-theme="dark"] .lm-earnings-wrapper h1,
[data-theme="dark"] .lm-earnings-wrapper h2,
[data-theme="dark"] .lm-earnings-wrapper h3,
[data-theme="dark"] .lm-earnings-wrapper h4,
[data-theme="dark"] .lm-rp-wrapper h1,
[data-theme="dark"] .lm-rp-wrapper h2,
[data-theme="dark"] .lm-rp-wrapper h3,
[data-theme="dark"] .lm-rp-wrapper h4,
[data-theme="dark"] .lm-ps h1,
[data-theme="dark"] .lm-ps h2,
[data-theme="dark"] .lm-ps h3,
[data-theme="dark"] .lm-ps h4,
[data-theme="dark"] .lm-profile-view h1,
[data-theme="dark"] .lm-profile-view h2,
[data-theme="dark"] .lm-profile-view h3,
[data-theme="dark"] .lm-profile-view h4,
[data-theme="dark"] .lm-dc-wrapper h1,
[data-theme="dark"] .lm-dc-wrapper h2,
[data-theme="dark"] .lm-dc-wrapper h3,
[data-theme="dark"] .lm-dc-wrapper h4,
[data-theme="dark"] .lm-view[data-view-content="dashboard"] h1,
[data-theme="dark"] .lm-view[data-view-content="dashboard"] h2,
[data-theme="dark"] .lm-view[data-view-content="dashboard"] h3,
[data-theme="dark"] .lm-view[data-view-content="dashboard"] h4 {
    color: #f1f5f9 !important;
}

body.lm-dark-mode .lm-caravans-list-wrapper p,
body.lm-dark-mode .lm-caravans-list-wrapper span,
body.lm-dark-mode .lm-caravan-add-page p,
body.lm-dark-mode .lm-caravan-add-page span,
body.lm-dark-mode .lm-cal-wrapper p,
body.lm-dark-mode .lm-cal-wrapper span,
body.lm-dark-mode .lm-price-wrapper p,
body.lm-dark-mode .lm-price-wrapper span,
body.lm-dark-mode .lm-block-wrapper p,
body.lm-dark-mode .lm-block-wrapper span,
body.lm-dark-mode .lm-earnings-wrapper p,
body.lm-dark-mode .lm-earnings-wrapper span,
body.lm-dark-mode .lm-rp-wrapper p,
body.lm-dark-mode .lm-rp-wrapper span,
body.lm-dark-mode .lm-ps p,
body.lm-dark-mode .lm-ps span,
body.lm-dark-mode .lm-profile-view p,
body.lm-dark-mode .lm-profile-view span,
body.lm-dark-mode .lm-dc-wrapper p,
body.lm-dark-mode .lm-dc-wrapper span,
body.lm-dark-mode .lm-view[data-view-content="dashboard"] p,
body.lm-dark-mode .lm-view[data-view-content="dashboard"] span,
[data-theme="dark"] .lm-caravans-list-wrapper p,
[data-theme="dark"] .lm-caravans-list-wrapper span,
[data-theme="dark"] .lm-caravan-add-page p,
[data-theme="dark"] .lm-caravan-add-page span,
[data-theme="dark"] .lm-cal-wrapper p,
[data-theme="dark"] .lm-cal-wrapper span,
[data-theme="dark"] .lm-price-wrapper p,
[data-theme="dark"] .lm-price-wrapper span,
[data-theme="dark"] .lm-block-wrapper p,
[data-theme="dark"] .lm-block-wrapper span,
[data-theme="dark"] .lm-earnings-wrapper p,
[data-theme="dark"] .lm-earnings-wrapper span,
[data-theme="dark"] .lm-rp-wrapper p,
[data-theme="dark"] .lm-rp-wrapper span,
[data-theme="dark"] .lm-ps p,
[data-theme="dark"] .lm-ps span,
[data-theme="dark"] .lm-profile-view p,
[data-theme="dark"] .lm-profile-view span,
[data-theme="dark"] .lm-dc-wrapper p,
[data-theme="dark"] .lm-dc-wrapper span,
[data-theme="dark"] .lm-view[data-view-content="dashboard"] p,
[data-theme="dark"] .lm-view[data-view-content="dashboard"] span {
    color: #94a3b8 !important;
}

body.lm-dark-mode .lm-caravans-list-wrapper .lm-table-search input,
body.lm-dark-mode .lm-caravans-list-wrapper .lm-table-search input::placeholder,
body.lm-dark-mode .lm-caravans-list-wrapper .lm-table-search svg,
body.lm-dark-mode .lm-caravans-list-wrapper #lm-caravan-search,
body.lm-dark-mode .lm-caravan-add-page #caravan-address-search,
body.lm-dark-mode .lm-caravan-add-page #caravan-address-search::placeholder,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-table-search input,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-table-search input::placeholder,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-table-search svg,
[data-theme="dark"] .lm-caravans-list-wrapper #lm-caravan-search,
[data-theme="dark"] .lm-caravan-add-page #caravan-address-search,
[data-theme="dark"] .lm-caravan-add-page #caravan-address-search::placeholder {
    color: #f1f5f9 !important;
}

body.lm-dark-mode .lm-caravans-list-wrapper .lm-table-search,
body.lm-dark-mode .lm-caravans-list-wrapper .lm-table-filters select,
body.lm-dark-mode .lm-caravans-list-wrapper #lm-caravan-search,
body.lm-dark-mode .lm-caravan-add-page input,
body.lm-dark-mode .lm-caravan-add-page select,
body.lm-dark-mode .lm-caravan-add-page textarea,
body.lm-dark-mode .lm-rp-wrapper input,
body.lm-dark-mode .lm-rp-wrapper select,
body.lm-dark-mode .lm-rp-wrapper textarea,
body.lm-dark-mode .lm-ps input,
body.lm-dark-mode .lm-ps select,
body.lm-dark-mode .lm-ps textarea,
body.lm-dark-mode .lm-dc-wrapper input,
body.lm-dark-mode .lm-dc-wrapper select,
body.lm-dark-mode .lm-dc-wrapper textarea,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-table-search,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-table-filters select,
[data-theme="dark"] .lm-caravans-list-wrapper #lm-caravan-search,
[data-theme="dark"] .lm-caravan-add-page input,
[data-theme="dark"] .lm-caravan-add-page select,
[data-theme="dark"] .lm-caravan-add-page textarea,
[data-theme="dark"] .lm-rp-wrapper input,
[data-theme="dark"] .lm-rp-wrapper select,
[data-theme="dark"] .lm-rp-wrapper textarea,
[data-theme="dark"] .lm-ps input,
[data-theme="dark"] .lm-ps select,
[data-theme="dark"] .lm-ps textarea,
[data-theme="dark"] .lm-dc-wrapper input,
[data-theme="dark"] .lm-dc-wrapper select,
[data-theme="dark"] .lm-dc-wrapper textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode .lm-caravans-list-wrapper .lm-data-table th,
body.lm-dark-mode .lm-caravans-list-wrapper .lm-data-table td,
body.lm-dark-mode .lm-price-wrapper .lm-price-table th,
body.lm-dark-mode .lm-price-wrapper .lm-price-table td,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-data-table th,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-data-table td,
[data-theme="dark"] .lm-price-wrapper .lm-price-table th,
[data-theme="dark"] .lm-price-wrapper .lm-price-table td {
    border-color: #334155 !important;
}

body.lm-dark-mode .lm-caravans-list-wrapper .lm-data-table th,
body.lm-dark-mode .lm-price-wrapper .lm-price-table th,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-data-table th,
[data-theme="dark"] .lm-price-wrapper .lm-price-table th {
    color: #94a3b8 !important;
    background: #0f172a !important;
}

body.lm-dark-mode .lm-caravans-list-wrapper .lm-data-table td,
body.lm-dark-mode .lm-price-wrapper .lm-price-table td,
[data-theme="dark"] .lm-caravans-list-wrapper .lm-data-table td,
[data-theme="dark"] .lm-price-wrapper .lm-price-table td {
    color: #f1f5f9 !important;
    background: #1e293b !important;
}

body.lm-dark-mode .lm-confirm-modal,
body.lm-dark-mode .lm-caravan-modal,
body.lm-dark-mode .lm-success-modal,
body.lm-dark-mode .lm-caravan-view-modal,
body.lm-dark-mode .lm-cal-modal,
body.lm-dark-mode .lm-price-modal,
body.lm-dark-mode .lm-block-popup,
body.lm-dark-mode .lm-rp-modal,
[data-theme="dark"] .lm-confirm-modal,
[data-theme="dark"] .lm-caravan-modal,
[data-theme="dark"] .lm-success-modal,
[data-theme="dark"] .lm-caravan-view-modal,
[data-theme="dark"] .lm-cal-modal,
[data-theme="dark"] .lm-price-modal,
[data-theme="dark"] .lm-block-popup,
[data-theme="dark"] .lm-rp-modal {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.lm-dark-mode .lm-confirm-modal h3,
body.lm-dark-mode .lm-confirm-modal h4,
body.lm-dark-mode .lm-caravan-modal h3,
body.lm-dark-mode .lm-caravan-modal h4,
body.lm-dark-mode .lm-success-modal h3,
body.lm-dark-mode .lm-success-modal h4,
body.lm-dark-mode .lm-caravan-view-modal h3,
body.lm-dark-mode .lm-caravan-view-modal h4,
body.lm-dark-mode .lm-cal-modal h3,
body.lm-dark-mode .lm-cal-modal h4,
body.lm-dark-mode .lm-price-modal h3,
body.lm-dark-mode .lm-price-modal h4,
body.lm-dark-mode .lm-block-popup h3,
body.lm-dark-mode .lm-block-popup h4,
body.lm-dark-mode .lm-rp-modal h3,
body.lm-dark-mode .lm-rp-modal h4,
[data-theme="dark"] .lm-confirm-modal h3,
[data-theme="dark"] .lm-confirm-modal h4,
[data-theme="dark"] .lm-caravan-modal h3,
[data-theme="dark"] .lm-caravan-modal h4,
[data-theme="dark"] .lm-success-modal h3,
[data-theme="dark"] .lm-success-modal h4,
[data-theme="dark"] .lm-caravan-view-modal h3,
[data-theme="dark"] .lm-caravan-view-modal h4,
[data-theme="dark"] .lm-cal-modal h3,
[data-theme="dark"] .lm-cal-modal h4,
[data-theme="dark"] .lm-price-modal h3,
[data-theme="dark"] .lm-price-modal h4,
[data-theme="dark"] .lm-block-popup h3,
[data-theme="dark"] .lm-block-popup h4,
[data-theme="dark"] .lm-rp-modal h3,
[data-theme="dark"] .lm-rp-modal h4 {
    color: #f1f5f9 !important;
}

body.lm-dark-mode .lm-confirm-modal p,
body.lm-dark-mode .lm-caravan-modal p,
body.lm-dark-mode .lm-success-modal p,
body.lm-dark-mode .lm-caravan-view-modal p,
body.lm-dark-mode .lm-cal-modal p,
body.lm-dark-mode .lm-price-modal p,
body.lm-dark-mode .lm-block-popup p,
body.lm-dark-mode .lm-rp-modal p,
[data-theme="dark"] .lm-confirm-modal p,
[data-theme="dark"] .lm-caravan-modal p,
[data-theme="dark"] .lm-success-modal p,
[data-theme="dark"] .lm-caravan-view-modal p,
[data-theme="dark"] .lm-cal-modal p,
[data-theme="dark"] .lm-price-modal p,
[data-theme="dark"] .lm-block-popup p,
[data-theme="dark"] .lm-rp-modal p {
    color: #94a3b8 !important;
}

/* Spinner Animation */
@keyframes lm-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.lm-spinner {
    animation: lm-spin 1s linear infinite;
}