:root {
    --primary-hue: 220;
    --primary-sat: 90%;
    --primary-light: 60%;
    
    --bg-light: #f0f4f8;
    --bg-dark: #1a1c23;
    
    --text-light: #2d3748;
    --text-dark: #e2e8f0;
    
    --shadow-light: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
    --shadow-dark: 6px 6px 12px #0d0e11, -6px -6px 12px #272a35;
    
    --glass-light: rgba(255, 255, 255, 0.7);
    --glass-dark: rgba(26, 28, 35, 0.7);
    
    --sidebar-width: 280px;
    --header-height: 70px;
}

[data-user-theme="light"] {
    --bg-body: var(--bg-light);
    --bg-card: #f0f4f8;
    --text-main: var(--text-light);
    --text-muted: #718096;
    --neumorph-shadow: var(--shadow-light);
    --neumorph-inset: inset 4px 4px 8px #d1d9e6, inset -4px -4px 8px #ffffff;
    --accent: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
    --glass-bg: var(--glass-light);
    --border-color: rgba(255,255,255,0.8);
    --separator-color: rgba(0,0,0,0.08);
}

[data-user-theme="dark"] {
    --bg-body: var(--bg-dark);
    --bg-card: #1a1c23;
    --text-main: var(--text-dark);
    --text-muted: #a0aec0;
    --neumorph-shadow: var(--shadow-dark);
    --neumorph-inset: inset 4px 4px 8px #0d0e11, inset -4px -4px 8px #272a35;
    --accent: hsl(var(--primary-hue), var(--primary-sat), 65%);
    --glass-bg: var(--glass-dark);
    --border-color: rgba(255,255,255,0.05);
    --separator-color: rgba(255,255,255,0.05);
}

@keyframes floatUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   Landing Page Navbar
   =========================== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

[data-user-theme="dark"] nav {
    background: rgba(26, 28, 35, 0.8);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    z-index: 10001;
    transition: right 0.3s ease;
    padding: 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.mobile-menu-container.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mobile-menu-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    background: none;
    border: none;
    padding: 0;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
}

.mobile-nav-links a:hover {
    color: var(--accent);
}

.mobile-auth-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Media query moved to bottom of file */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

body {
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(245, 158, 11, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden !important;
}

/* Dark mode background tuning to match Admin look */
[data-user-theme="dark"] body {
    background-image: none;
}

[data-user-theme="dark"] h1,
[data-user-theme="dark"] h2,
[data-user-theme="dark"] h3,
[data-user-theme="dark"] h4,
[data-user-theme="dark"] h5,
[data-user-theme="dark"] h6,
[data-user-theme="dark"] p,
[data-user-theme="dark"] small,
[data-user-theme="dark"] span,
[data-user-theme="dark"] li,
[data-user-theme="dark"] label,
[data-user-theme="dark"] td,
[data-user-theme="dark"] th {
    color: var(--text-main) !important;
}

[data-user-theme="dark"] .text-muted,
[data-user-theme="dark"] .text-secondary {
    color: var(--text-muted) !important;
}

[data-user-theme="dark"] a {
    color: var(--accent) !important;
}

[data-user-theme="dark"] .card-title,
[data-user-theme="dark"] .card-body,
[data-user-theme="dark"] .section-card h2,
[data-user-theme="dark"] .section-card h3,
[data-user-theme="dark"] .neu-card,
[data-user-theme="dark"] .info-card,
[data-user-theme="dark"] .stat-card {
    color: var(--text-main) !important;
}

[data-user-theme="dark"] .nav-item,
[data-user-theme="dark"] .menu-list a,
[data-user-theme="dark"] .navbar-brand,
[data-user-theme="dark"] .profile-name {
    color: var(--text-main) !important;
}

[data-user-theme="dark"] .btn-link,
[data-user-theme="dark"] .link,
[data-user-theme="dark"] .nav-link {
    color: var(--accent) !important;
}

[data-user-theme="dark"] .badge {
    color: var(--text-main) !important;
}

[data-user-theme="dark"] .dropdown-divider,
[data-user-theme="dark"] hr {
    border-color: var(--border-color) !important;
    background: var(--border-color) !important;
}

[data-user-theme="dark"] .form-control,
[data-user-theme="dark"] .form-select,
[data-user-theme="dark"] .input-group-text {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

[data-user-theme="dark"] ::placeholder {
    color: var(--text-muted) !important;
}

/* Enhanced Dark Mode Fixes */
[data-user-theme="dark"] .text-primary { color: #60a5fa !important; } /* Lighter blue */
[data-user-theme="dark"] .text-success { color: #4ade80 !important; } /* Lighter green */
[data-user-theme="dark"] .text-warning { color: #facc15 !important; } /* Lighter yellow */
[data-user-theme="dark"] .text-danger { color: #f87171 !important; } /* Lighter red */
[data-user-theme="dark"] .text-info { color: #22d3ee !important; } /* Lighter cyan */
[data-user-theme="dark"] .text-dark { color: #f1f5f9 !important; } /* Light grey */
[data-user-theme="dark"] .text-body { color: var(--text-main) !important; }

/* Form Elements Dark Mode */
[data-user-theme="dark"] input,
[data-user-theme="dark"] select,
[data-user-theme="dark"] textarea {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

[data-user-theme="dark"] select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Autofill Fix for Dark Mode */
[data-user-theme="dark"] input:-webkit-autofill,
[data-user-theme="dark"] input:-webkit-autofill:hover, 
[data-user-theme="dark"] input:-webkit-autofill:focus, 
[data-user-theme="dark"] input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-card) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Ensure all headings and text are visible */
[data-user-theme="dark"] .h1, [data-user-theme="dark"] .h2, [data-user-theme="dark"] .h3, 
[data-user-theme="dark"] .h4, [data-user-theme="dark"] .h5, [data-user-theme="dark"] .h6 {
    color: var(--text-main) !important;
}

/* Button Visibility in Dark Mode */
[data-user-theme="dark"] .neu-btn-primary {
    color: #ffffff !important;
}


/* Main Layout Wrapper */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-body);
    width: 100%;
    overflow-x: hidden; /* Prevent body horizontal scroll */
}

/* Sidebar Scrollbar Customization */
.sidebar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
    opacity: 0.3;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    width: 100%;
}

.sidebar-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    text-align: left;
}

.sidebar-brand i {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card); /* Changed from transparent to var(--bg-card) */
    padding: 1.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
    transition: transform 0.3s ease;
    z-index: 100 !important; /* Lowered from 1030 to ensure modals (1050+) stay on top */
    border-right: 1px solid var(--separator-color);
}

.sidebar .sidebar-menu {
    /* Reset generic nav styles */
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    position: static !important;
    backdrop-filter: none !important;
    
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.nav-item span:not(.badge) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    text-align: left;
}

.nav-item .badge {
    flex-shrink: 0;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent);
    background: var(--bg-body);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
    transform: translateX(5px);
}

.nav-item.active {
    color: var(--accent);
    font-weight: 600;
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0; /* Move to right side */
    top: 20%;
    height: 60%;
    width: 4px;
    background: var(--accent);
    border-radius: 4px 0 0 4px; /* Rounded on the inside */
}

.nav-item i {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    font-size: 1rem;
}

/* Sidebar Dropdown Styles */
.nav-dropdown {
    position: relative;
    width: 100%;
}

.nav-dropdown-toggle {
    cursor: pointer;
    justify-content: space-between !important;
}

.nav-dropdown-toggle i.fa-chevron-right {
    font-size: 0.7rem !important;
    width: auto !important;
    transition: transform 0.3s ease;
}

.nav-dropdown.active .nav-dropdown-toggle i.fa-chevron-right {
    transform: rotate(90deg);
}

.nav-dropdown-menu {
    display: none;
    padding-left: 1.2rem;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-dropdown.active .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    gap: 0.8rem;
}

.nav-dropdown-item i {
    font-size: 0.8rem;
    width: 20px;
    text-align: center;
}

.nav-dropdown-item:hover, .nav-dropdown-item.active {
    color: var(--accent);
    background: rgba(102, 126, 234, 0.1);
}

[data-user-theme="dark"] .nav-dropdown-item:hover, 
[data-user-theme="dark"] .nav-dropdown-item.active {
    background: rgba(255, 255, 255, 0.05);
}

/* Sidebar Separator */
.menu-divider {
    margin: 1.5rem 0;
    border-top: 1px solid var(--separator-color);
    width: 100%;
    opacity: 0.5;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width) !important;
    padding: 2.5rem 2rem;
    padding-top: 100px; /* Counteract fixed top-header height */
    width: calc(100% - var(--sidebar-width)) !important;
    transition: margin-left 0.3s ease, width 0.3s ease;
    min-width: 0; /* Important for flex child not to overflow */
}

/* Header/Top Bar */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;

    /* Sticky Header Implementation */
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    z-index: 90; /* Lowered from 1000 to be behind modals (1040+) */
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Full width adjustment to counteract main-content padding */
    margin: 0;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--separator-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 2;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: var(--neumorph-inset);
    width: 100%;
    order: 3;
    margin-top: 0.5rem;
}
/* Ensure icon spacing and input expands fully */
.header-search i{margin-right:8px;flex-shrink:0}
.header-search form{flex:1 1 auto;min-width:0}
.header-search input{
    width:100%;
    background:transparent!important;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    -webkit-appearance:none;
    appearance:none;
    padding:0.2rem 0;
}
.header-search input::placeholder{color:var(--text-muted)}

@media (min-width: 768px) {
    .header-right { order: 3; }
    .top-header { flex-wrap: nowrap; }
    .header-search { 
        order: 2; 
        margin-top: 0;
        flex: 1 1 420px; /* Fill remaining space with a comfortable min width */
        max-width: 800px; /* Prevent over-growing on ultra-wide headers */
        margin-left: 1rem;
        margin-right: 1rem;
    }
    .header-left { flex: 0 0 auto; min-width: 160px; }
    .header-right { flex: 0 0 auto; gap: 0.75rem; }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        background-color: var(--bg-card) !important; /* Force solid background color */
        background-image: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: 10px 0 25px rgba(0,0,0,0.1);
        border-right: none;
        z-index: 100 !important; /* Consistent with main definition */
    }
    
    [data-user-theme="dark"] .sidebar {
        box-shadow: 10px 0 25px rgba(0,0,0,0.4);
    }
    
    .sidebar.active {
        transform: translateX(0);
        visibility: visible !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1.5rem 1rem !important;
        padding-top: calc(130px + 1rem) !important; /* Increased top padding for mobile stacked header */
        overflow-x: hidden; /* Prevent horizontal scroll on mobile */
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 90 !important; /* Lower than sidebar (100) */
        display: none;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Improve Header Layout on Mobile */
    .top-header {
        margin-bottom: 1.5rem;
        gap: 0.5rem;
        justify-content: space-between;
        align-items: center;
        
        /* Mobile Fixed Header Reset */
        left: 0;
        width: 100%;
        margin: 0;
        padding: 1rem;
    }
    
    .header-left {
        order: 1;
        flex: 1;
        min-width: 0; /* Allow text truncate */
        margin-right: 0.5rem;
    }
    
    .page-heading {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-right {
        order: 2;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    /* Ensure icons are visible and sized correctly */
    .header-right .theme-toggle-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .header-right .profile-img {
        width: 32px;
        height: 32px;
    }

    /* Force search bar to new line */
    .header-search {
        order: 3;
        flex-basis: 100%;
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.45rem 0.9rem;
    }

/* Accessibility helper: hide visually-hidden labels without affecting layout */
.visually-hidden{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
}
    
    /* Make icons slightly smaller on mobile */
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .profile-img {
        width: 36px;
        height: 36px;
    }
}

/* Utility class for header dropdown width responsiveness */
.header-dropdown-width {
    width: 320px !important;
}

@media (max-width: 768px) {
    .header-dropdown-width {
        width: 280px !important;
        max-width: 85vw !important;
        /* Center positioning for mobile */
        position: fixed !important;
        top: 80px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }

    /* Compact dropdown items on mobile */
    .dropdown-menu-custom .dropdown-item,
    .dropdown-menu .dropdown-item {
        padding: 10px 12px !important;
    }

    .dropdown-menu-custom strong,
    .dropdown-menu strong {
        font-size: 0.8rem !important;
    }

    .dropdown-menu-custom span, 
    .dropdown-menu span {
        font-size: 0.65rem !important;
    }

    .dropdown-menu-custom p,
    .dropdown-menu p {
        font-size: 0.75rem !important;
    }
}

.page-heading {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--neumorph-inset);
    width: 300px;
}

.search-bar input {
    border: none;
    background: transparent;
    margin-left: 10px;
    color: var(--text-main);
    width: 100%;
    outline: none;
}
.search-bar input::placeholder {
    color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        display: flex;
        flex-direction: column;
    }
}

/* Neumorphic Card */
.neu-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--neumorph-shadow);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.neu-card:hover {
    transform: translateY(-5px);
}

/* Glassmorphism Overlay */
.glass-overlay {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

/* ===========================
   Admin Topbar & Menu (Theme-aware)
   =========================== */
.topbar {
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.topbar-left .menu-link,
.stat-info .icon-wrapper {
    background: var(--bg-card);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--neumorph-shadow);
    color: var(--accent);
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Charts Section */
.chart-section {
    grid-column: span 8;
    height: 400px;
}

.card-header h3 {
    color: var(--text-main);
}
.card-body {
    color: var(--text-main);
}

.side-panel {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Profile Dropdown (Modern) */
.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.profile-menu:hover {
    box-shadow: var(--neumorph-shadow);
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--neumorph-shadow);
}

/* Modern Table */
.table-modern {
    width: 100%;
    border-collapse: collapse;
}

.table-modern th {
    padding: 1rem;
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.table-modern td {
    padding: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.table-modern tr:hover {
    background-color: rgba(255,255,255,0.05);
}

/* Neumorphic Components */
.neu-btn {
    background: var(--bg-card);
    color: var(--text-main);
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    box-shadow: var(--neumorph-shadow);
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
}

.text-muted-neu {
    color: var(--text-muted);
}

.nav-auth a {
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-auth a:hover {
    color: var(--accent);
}

/* Navigation */
nav:not(.sidebar-menu) {
    background: var(--glass-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--neumorph-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent);
}

.nav-auth {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Landing Page Specifics */
.hero {
    min-height: calc(100vh - 70px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 60px 40px;
    gap: 50px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        text-align: center;
        gap: 30px;
        height: auto;
        min-height: auto;
    }

    .hero-content {
        order: 2;
    }

    /* Fix list alignment on mobile to be neat (left-aligned text, centered block) */
    .hero-content ul {
        display: inline-block;
        text-align: left;
        width: 100%; /* Ensure full width for consistent alignment */
        padding-left: 0;
    }
    
    .hero-content ul li {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* Align icon and text to the left */
        margin-bottom: 0.5rem;
    }

    /* Ensure text aligns nicely with icon */
    .hero-content ul li i {
        min-width: 25px; /* Fixed width for icons */
        text-align: center;
    }

    /* Override h3 to be left aligned as well if desired, or keep centered? 
       User said "rata kiri-kanan", usually implies full left alignment for neatness.
       Let's try aligning everything left in the hero content for mobile to be safe?
       No, hero usually centers.
       Let's stick to list fix.
    */
    .hero-content h3 {
        text-align: left; /* Align titles to left to match lists */
        margin-top: 1.5rem;
    }
    
    /* If we align left, we should remove text-align: center from .hero for mobile?
       Line 909 says text-align: center.
       If we want "rata kiri-kanan" (neat left alignment), we should override it.
    */
    .hero-content {
        text-align: left !important;
    }

    .hero-image {
        order: 1;
        margin-bottom: 20px;
    }
    
    .features-grid, .steps-grid, .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* Old dropdown menu styles removed */
}

.features-grid, .steps-grid, .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
    position: relative;
    z-index: 3;
}

.feature-card, .step, .testimonial-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--neumorph-shadow);
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.auth-form-title {
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.auth-tab-btn {
    background: none;
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* Neumorphic Input Fields */
.neu-input {
    width: 100%;
    padding: 12px 20px;
    background: var(--bg-card);
    border: none;
    border-radius: 12px;
    box-shadow: var(--neumorph-inset);
    color: var(--text-main);
    transition: all 0.3s ease;
    outline: none;
    font-size: 1rem;
    display: block;
}

textarea.neu-input {
    border-radius: 20px;
}

.neu-input:focus {
    box-shadow: var(--neumorph-inset), 0 0 0 2px var(--accent);
}

.neu-input::placeholder {
    color: var(--text-muted);
}

/* Form Label */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
}

/* Floating Action Buttons (Landing Page) */
.floating-menu-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column-reverse; /* Bottom to top stack */
    gap: 15px;
    z-index: 9999;
    pointer-events: none; /* Allow clicking through container area */
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 1.8rem;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    pointer-events: auto; /* Re-enable clicks on buttons */
    border: none;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    color: white !important;
}

/* WhatsApp - Primary Action */
.chat-btn {
    background: #25D366; /* WhatsApp Green */
    z-index: 2;
}

/* Secondary Actions - Slightly Smaller */
.testimonial-btn {
    background: #3b82f6; /* Blue */
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    margin: 0 auto; /* Center in column */
}

.feedback-btn {
    background: #f59e0b; /* Amber */
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    margin: 0 auto;
}

/* Tooltip on hover (Left side since we are on the right) */
.floating-btn::after {
    content: attr(title);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    margin-right: 15px;
}

.floating-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
}

/* Animation for entrance */
.floating-menu-container {
    animation: floatUp 0.5s ease-out forwards;
}

/* ===========================
   Mobile Responsiveness Fixes (Final)
   =========================== */
@media (max-width: 768px) {
    /* Force hide desktop navigation */
    .nav-menu, .nav-auth {
        display: none !important;
    }

    /* Show hamburger menu */
    .hamburger {
        display: block !important;
        font-size: 1.5rem;
        color: var(--text-main);
        cursor: pointer;
    }

    /* Adjust Navbar */
    nav, nav:not(.sidebar-menu) {
        padding: 0.8rem 1.5rem !important;
        justify-content: space-between !important;
        width: 100% !important;
        display: flex !important;
    }

    /* Hero Section Adjustments */
    .hero {
        padding-top: 100px !important;
        text-align: center !important;
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: auto !important;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem !important;
    }

    /* Hero Buttons */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero-buttons .neu-btn {
        width: 100% !important;
        margin-right: 0 !important;
        display: block;
        text-align: center;
    }

    /* Grids to Single Column */
    .features-grid, .steps-grid, .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Auth Form Adjustments */
    .auth-container {
        padding: 1.5rem !important;
    }

    /* Ensure Mobile Menu Overlay works */
    .mobile-menu-overlay.active {
        display: block !important;
    }
}
