/* WorkSync Custom Styles */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2c2c2c;
    --bg-nav: #181818;
    --text-primary: #e0e0e0;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --border-color-light: #4b5563;
    
    /* Fluid Typography Scale */
    /* Adjust these tokens to scale fonts across the app */
    --fs-root: clamp(14px, 1.1vw + 12px, 16px); /* controls rem */
    --fs-xxs: clamp(10px, 0.625rem, 11px);
    --fs-xs: clamp(12px, 0.75rem, 13px);
    --fs-sm: clamp(13px, 0.875rem, 14px);
    --fs-md: clamp(14px, 1rem, 16px);
    --fs-lg: clamp(16px, 1.125rem + 0.25vw, 18px);
    --fs-xl: clamp(18px, 1.25rem + 0.35vw, 22px);
    --fs-2xl: clamp(22px, 1.5rem + 0.5vw, 26px);
    --fs-3xl: clamp(26px, 1.875rem + 0.8vw, 32px);
    
    /* Line-height tokens */
    --lh-tight: 1.25;
    --lh-default: 1.5;
    --lh-loose: 1.7;
}

body.light-mode {
    --bg-primary: #f5f5f5;
    --bg-secondary: #fafafa;
    --bg-tertiary: #e8e8e8;
    --bg-nav: #fafafa;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #d1d5db;
    --border-color-light: #9ca3af;
}

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
}

html {
    scroll-behavior: smooth;
    /* Fluid root controls all rem-based sizes (including Tailwind text scale) */
    font-size: var(--fs-root);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: var(--lh-default);
}

/* Optional typography utility classes for app-specific text */
.fs-xxs { font-size: var(--fs-xxs); line-height: var(--lh-tight); }
.fs-xs  { font-size: var(--fs-xs);  line-height: var(--lh-tight); }
.fs-sm  { font-size: var(--fs-sm);  line-height: var(--lh-default); }
.fs-md  { font-size: var(--fs-md);  line-height: var(--lh-default); }
.fs-lg  { font-size: var(--fs-lg);  line-height: var(--lh-default); }
.fs-xl  { font-size: var(--fs-xl);  line-height: var(--lh-loose); }
.fs-2xl { font-size: var(--fs-2xl); line-height: var(--lh-loose); }
.fs-3xl { font-size: var(--fs-3xl); line-height: var(--lh-loose); }

.card-bg {
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.input-bg {
    background-color: var(--bg-tertiary);
    transition: background-color 0.3s ease;
}

/* Modern form controls */
input[type="date"], input[type="time"], input[type="number"], select {
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.2) 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 10px 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.02);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    opacity: 0.75;
    cursor: pointer;
}

input[type="date"]:focus, input[type="time"]:focus, input[type="number"]:focus, select:focus {
    border-color: #D6F60C;
    box-shadow: 0 8px 20px rgba(214,246,12,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Minimal, modern checkboxes */
input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.3));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
    transition: all 0.18s ease;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    border-color: #D6F60C;
    background: linear-gradient(135deg, #D6F60C, #b4d40a);
    box-shadow: 0 6px 16px rgba(214,246,12,0.25);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 3px;
    background: #121212;
}

/* Search field with icon */
.search-input {
    padding-left: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.2) 100%);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 44px;
}

.search-input:focus {
    border-color: #D6F60C;
    box-shadow: 0 8px 20px rgba(214,246,12,0.12);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glow Effect */
.warning-glow {
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
    border-color: #eab308;
}

/* Tabs */
.tab-active {
    background-color: #D6F60C;
    color: #121212;
    border-color: #D6F60C;
}

.tab-inactive {
    background-color: transparent;
    color: #9ca3af;
    border-color: #374151;
}

.tab-inactive:hover {
    border-color: #6b7280;
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Toggle Switch */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    width: 40px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}
.toggle-switch input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.toggle-slider {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    width: 40px;
    height: 14px;
    background-color: #ef4444; /* red for unpaid */
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
    padding: 0;
    box-sizing: border-box;
    position: relative;
}
.toggle-switch .toggle-slider::before {
    content: "";
    height: 18px;
    width: 18px;
    background-color: #fff;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 50%;
    flex-shrink: 0;
    position: absolute;
    top: -2px;
    left: -1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-slider {
    background-color: #10b981; /* emerald for paid */
}
.toggle-switch input:checked + .toggle-slider::before {
    left: 23px;
}
.toggle-slider.small {
    width: 28px;
    height: 12px;
    padding: 0;
}
.toggle-switch .toggle-slider.small::before {
    height: 16px;
    width: 16px;
    top: -2px;
    left: -1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-slider.small::before {
    left: 17px;
}

/* Status text next to toggles */
.status-text {
    letter-spacing: 0.04em;
}
.status-text.text-emerald-400 {
    color: #34d399; /* Tailwind emerald-400 */
}
.status-text.text-red-500 {
    color: #ef4444; /* Tailwind red-500 */
}

/* Toast Notifications */
.toast {
    min-width: 220px;
    max-width: 360px;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    font-size: 0.9rem;
    animation: toastIn 220ms ease-out;
}
.toast-success { background-color: #10b981; }
.toast-error { background-color: #ef4444; }
.toast .icon { width: 20px; height: 20px; opacity: 0.95; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Loading / disabled button styles */
.btn-loading { opacity: 0.7; cursor: not-allowed; pointer-events: none; }
.btn-loading .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.35); border-top-color: rgba(255,255,255,0.95); border-radius: 999px; animation: spin 800ms linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   UNIFIED BUTTON SYSTEM
   ======================================== */

/* Primary action buttons */
.btn-primary {
    background: linear-gradient(135deg, #D6F60C 0%, #D6F60C 100%);
    color: #121212;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(214, 246, 12, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D6F60C 0%, #D6F60C 100%);
    box-shadow: 0 4px 12px rgba(214, 246, 12, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary action buttons */
.btn-secondary {
    background-color: #374151;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* Danger buttons */
.btn-danger {
    background-color: #ef4444;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Success buttons */
.btn-success {
    background-color: #10b981;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background-color: #059669;
}

/* ========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) {
    /* Search input full width on mobile */
    #clientSearch { 
        max-width: 100%; 
        width: 100%;
    }
    
    /* Better spacing for mobile */
    body {
        font-size: 14px;
    }
    
    /* Navigation improvements */
    nav {
        padding: 10px 14px !important;
    }
    
    nav span {
        font-size: 10px !important;
        font-weight: 500 !important;
        letter-spacing: 0.4px;
    }
    
    nav button {
        font-weight: 500 !important;
    }
    
    /* Mobile menu improvements */
    #mobileMenu {
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        backdrop-filter: blur(10px);
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    #mobileMenu button {
        font-size: 12px;
        font-weight: 500;
        padding: 10px 8px;
        border-radius: 8px;
        transition: all 0.2s;
    }
    
    #mobileMenu button span {
        font-weight: 500;
        letter-spacing: 0.3px;
    }
    
    #mobileMenu button:hover {
        background-color: rgba(59, 130, 246, 0.1);
        transform: translateX(4px);
    }
    
    #mobileMenu button:active {
        transform: translateX(4px) scale(0.98);
    }
    
    /* Client cards on mobile */
    #clientsGrid > div {
        padding: 14px !important;
        margin-bottom: 10px;
    }
    
    #clientsGrid h3 {
        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1.3;
    }
    
    #clientsGrid .text-sm {
        font-size: 11.5px !important;
    }
    
    #clientsGrid .text-xs {
        font-size: 10.5px !important;
    }
    
    #clientsGrid button {
        font-weight: 500 !important;
    }
    
    /* Make contact links more prominent on mobile */
    #clientsGrid a[href^="mailto:"],
    #clientsGrid a[href^="tel:"] {
        padding: 4px 8px;
        background-color: rgba(59, 130, 246, 0.1);
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin: 2px 0;
    }
    
    /* Better grid spacing on mobile */
    #clientsGrid {
        gap: 16px !important;
    }
    
    /* Filter buttons stack better on mobile */
    .flex.gap-2.items-center {
        flex-wrap: wrap;
    }
    
    /* Actions dropdown positioning on mobile */
    .actions-dropdown {
        position: static;
    }
    
    .actions-menu {
        left: auto;
        right: -8px;
        min-width: 160px;
    }
    
    /* Modal improvements for mobile */
    .fixed.inset-0 > div {
        margin: 8px;
        max-height: calc(100vh - 16px);
    }
    
    /* Form inputs larger touch targets */
    input, textarea, select, button {
        min-height: 44px;
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    button {
        padding: 12px 16px;
    }
    
    /* Table improvements on mobile */
    table {
        font-size: 12px;
    }
    
    table th, table td {
        padding: 8px 6px !important;
    }
    
    /* History modal on mobile */
    #historyModal table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Quote modal improvements on mobile */
    #quoteModal .card-bg {
        padding: 16px !important;
        max-height: calc(100vh - 16px) !important;
    }
    
    #quoteModal h2 {
        font-size: 16px !important;
    }
    
    #offerItemsContainer {
        max-height: 50vh;
        overflow-y: auto;
    }
    
    #offerItemsContainer::-webkit-scrollbar {
        width: 4px;
    }
    
    /* Offer item spacing */
    #offerItemsContainer > div {
        margin-bottom: 12px;
    }
    
    /* Better spacing for offer items labels */
    #offerItemsContainer label {
        font-size: 10px;
    }
    
    #offerItemsContainer input,
    #offerItemsContainer textarea {
        font-size: 14px !important;
    }
    
    /* Tags wrap better on mobile */
    .client-tag {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    /* Toast notifications on mobile */
    #toastContainer {
        top: 70px;
        right: 8px;
        left: 8px;
        max-width: 100%;
    }
    
    .toast {
        font-size: 13px;
        padding: 12px 14px;
    }
    
    /* Finance cards stack on mobile */
    #tabFinance .grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Chart container on mobile */
    #financeChart {
        max-height: 250px !important;
    }
    
    /* Sort dropdown full width on mobile */
    #clientSort {
        width: 100%;
        max-width: 100%;
    }
    
    /* Better spacing in forms */
    .space-y-4 > * {
        margin-bottom: 12px;
    }
    
    /* Website/Client type chooser buttons */
    .grid.grid-cols-2.gap-6 {
        gap: 12px;
    }
    
    /* Hosting period section on mobile */
    #hostingPeriodSection .grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Status badges more visible */
    .text-xs.font-bold {
        font-size: 11px !important;
    }
    
    /* Progress bars */
    .h-2 {
        height: 6px !important;
    }
    
    /* Login form on mobile */
    #loginSection h1 {
        font-size: 20px;
        margin-bottom: 32px;
    }
    
    #loginSection .card-bg {
        padding: 24px 20px;
    }
    
    /* Improve button visibility */
    button:not(:disabled):active {
        transform: scale(0.97);
        transition: transform 0.1s;
    }
    
    /* Fix modal close button on mobile */
    .absolute.top-6.right-6 {
        top: 12px;
        right: 12px;
    }
}

/* Extra small devices (phones in portrait, less than 400px) */
@media (max-width: 400px) {
    /* Even more compact on very small screens */
    nav span {
        font-size: 10px !important;
    }
    
    #clientsGrid h3 {
        font-size: 14px !important;
    }
    
    .px-3.md\\:px-4 {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    /* Stack filter and search vertically on very small screens */
    .flex.flex-col.md\\:flex-row {
        gap: 8px;
    }
    
    /* Smaller modals on tiny screens */
    .max-w-2xl, .max-w-3xl, .max-w-4xl {
        max-width: 100% !important;
        margin: 4px !important;
    }
}

/* Floating Action Button (FAB) for Mobile */
@media (max-width: 768px) {
    .mobile-fab {
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #D6F60C 0%, #D6F60C 100%);
        color: #121212;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        box-shadow: 0 8px 20px rgba(214, 246, 12, 0.4);
        z-index: 40;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
        cursor: pointer;
    }
    
    .mobile-fab-offers {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
        display: none; /* Hidden by default, shown when offers tab active */
    }
    
    .mobile-fab:active {
        transform: scale(0.92);
    }
    
    .mobile-fab:hover {
        box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
        transform: translateY(-2px);
    }
    
    .mobile-fab-offers:hover {
        box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
    }
    
    /* Hide desktop ADD button on mobile, show FAB instead */
    #tabClients .flex.gap-2.w-full button:last-child,
    #tabOffers .flex.gap-2.w-full button:last-child {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-fab {
        display: none !important;
    }
}

/* Confirmation modal tweaks */
#confirmModal p { font-size: 0.95rem; }
#confirmModal .card-bg { max-width: 480px; }
#confirmModal { opacity: 0; transition: opacity 180ms ease; }
#confirmModal.modal-visible { opacity: 1; }
#confirmModal .card-bg { transform: translateY(-6px) scale(.98); opacity: 0; transition: transform 200ms cubic-bezier(.2,.9,.27,1), opacity 200ms; }
#confirmModal.modal-visible .card-bg { transform: translateY(0) scale(1); opacity: 1; }

/* little pulse animation on confirm success/loading */
@keyframes confirmPulse { 0% { box-shadow: 0 0 0 rgba(255,255,255,0); } 50% { box-shadow: 0 0 18px rgba(37,99,235,0.18); } 100% { box-shadow: 0 0 0 rgba(255,255,255,0); } }
.confirm-pulse { animation: confirmPulse 900ms ease-in-out; }
#confirmModal .bg-red-500 { background-color: #ef4444; }
#confirmModal .bg-gray-700 { background-color: #374151; }

/* Disable buttons inside confirm modal while action runs */
#confirmModal .card-bg button[disabled] { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* Inline expense validation */
.input-error { border-color: #ef4444 !important; }
.expense-inline-error { color: #fca5a5; font-size: 12px; margin-top: 6px; }

/* Client Tags */
.tag-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
    cursor: pointer;
}
.tag-btn:hover {
    border-color: var(--border-color-light);
    color: var(--text-primary);
}
.tag-btn.active {
    background-color: #D6F60C;
    color: #121212;
    border-color: #D6F60C;
}

.client-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.client-tag.tag-vip { background-color: #fbbf24; color: #000; }
.client-tag.tag-active { background-color: #10b981; color: #000; }
.client-tag.tag-inactive { background-color: #6b7280; color: #fff; }
.client-tag.tag-new { background-color: #D6F60C; color: #121212; }
.client-tag.tag-priority { background-color: #ef4444; color: #fff; }

/* Quick Actions Dropdown */
.actions-dropdown {
    position: relative;
    display: inline-block;
}
.actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    min-width: 140px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}
.actions-dropdown.open .actions-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.actions-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.actions-menu button:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}
.actions-menu button:first-child {
    border-radius: 8px 8px 0 0;
}
.actions-menu button:last-child {
    border-radius: 0 0 8px 8px;
}
.actions-menu button.danger:hover {
    background-color: #dc2626;
    color: white;
}

/* Toast action button */
.toast .action { background: rgba(0,0,0,0.12); border-radius: 6px; padding: 4px 8px; color: #fff; font-weight: 700; cursor: pointer; margin-left: 8px; }

/* =============================
   Modern Hamburger Menu
   ============================= */

/* Hamburger menu only visible on mobile */
.hamburger {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.32s cubic-bezier(.4,0,.2,1);
}
.hamburger:active { transform: scale(.9); }
.hamburger-line {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.32s cubic-bezier(.4,0,.2,1);
    position: relative;
}
.hamburger-line:nth-child(2) { width: 20px; }
.hamburger.open .hamburger-line { background: #fff; }
.hamburger.open .hamburger-line:nth-child(1) { transform: translateY(9px) rotate(45deg); width: 26px; }
.hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-9px) rotate(-45deg); width: 26px; }

@media (max-width: 768px) {
    .hamburger { width: 48px; height: 48px; gap: 7px; display: flex; }
    .hamburger-line { height: 3.5px; }
}
@media (min-width: 769px) {
    .hamburger { display: none !important; }
}

#mobileMenu {
    transform-origin: top center;
    transition: opacity .28s ease, transform .28s ease;
}
#mobileMenu.hidden { opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; }
#mobileMenu:not(.hidden) { opacity: 1; transform: translateY(0) scale(1); }

#menuOverlay { animation: overlayFade .3s ease; }
@keyframes overlayFade { from { opacity: 0; } to { opacity: .5; } }

/* =============================
   Login Page Enhancements
   ============================= */

/* Animated gradient background */
.login-gradient {
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0f0f1e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Fade in animation for login card */
.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced input focus effects */
#loginSection input:focus {
    box-shadow: 0 0 0 3px rgba(214, 246, 12, 0.1);
    border-color: #D6F60C;
}

/* Checkbox styling */
#loginSection input[type="checkbox"] {
    cursor: pointer;
    border-radius: 4px;
}

#loginSection input[type="checkbox"]:checked {
    background-color: #D6F60C;
    border-color: #D6F60C;
}

/* Logo pulse animation */
#loginSection [data-lucide="briefcase"] {
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* =============================
   Notification System
   ============================= */

#notificationBtn {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

#notificationBtn:hover {
    transform: scale(1.1);
    color: #D6F60C;
}

/* Spinner animation for Lucide loader icon */
@keyframes ws-spin {
    to { transform: rotate(360deg); }
}
.lucide-loader {
    animation: ws-spin 1s linear infinite;
    transform-origin: center;
}

/* Quote status button styling */
.quote-status {
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.quote-status:active {
    transform: scale(0.97);
}

/* Send reminder button mobile fix */
@media (max-width: 768px) {
    .bg-yellow-600 {
        background-color: #ca8a04 !important;
    }
    .bg-yellow-600:hover {
        background-color: #a16207 !important;
    }
}

#notifBadge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

#notificationDropdown {
    animation: dropdownSlideIn 0.3s ease;
}

#notificationDropdown:not(.hidden) {
    animation: dropdownSlideIn 0.3s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 16px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.notification-header button {
    font-size: 12px;
    color: #D6F60C;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-header button:hover {
    background: rgba(214, 246, 12, 0.1);
}

#notificationList {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.notification-item:hover {
    background: #242424;
}

.notification-item.read {
    opacity: 0.6;
}

.notification-item i {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-item span {
    flex: 1;
    font-size: 14px;
    color: #e0e0e0;
    line-height: 1.4;
}

.unread-dot {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #D6F60C;
    border-radius: 50%;
}

/* =============================
   Activity Log
   ============================= */

#activityLogList {
    max-height: 400px;
    overflow-y: auto;
}

.activity-log-item {
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.2s;
}

.activity-log-item:hover {
    background: #242424;
}

.activity-log-item i {
    font-size: 16px;
    color: #D6F60C;
    margin-top: 4px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-details {
    font-size: 14px;
    color: #e0e0e0;
    margin: 0 0 4px 0;
}

.activity-time {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* Custom scrollbar for notifications and activity log */
#notificationList::-webkit-scrollbar,
#activityLogList::-webkit-scrollbar {
    width: 6px;
}

#notificationList::-webkit-scrollbar-track,
#activityLogList::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#notificationList::-webkit-scrollbar-thumb,
#activityLogList::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

#notificationList::-webkit-scrollbar-thumb:hover,
#activityLogList::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Toggle switch for notification preferences (isolated styles) */
.toggle-slider.pref {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 14px;
}

.toggle-slider.pref input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider.pref .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 999px;
}

.toggle-slider.pref .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: -1px;
    top: -2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-slider.pref input:checked + .slider {
    background-color: #D6F60C;
}

.toggle-slider.pref input:checked + .slider:before {
    transform: translateX(22px);
}

.toggle-slider.pref input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(214, 246, 12, 0.1);
}