/* This file is reserved for custom CSS styles for the application. */
/* Add any custom styles, overrides, or additional design elements here. */

/* Modern Financial UI with Navy Blue and Gold Theme */
:root {
    /* Primary Colors - Navy Blue */
    --primary-navy: #1A2B48;
    --primary-navy-dark: #0f1a2e;
    --primary-navy-light: #2a3f5f;
    --primary-navy-lighter: #3a4f6f;
    
    /* Accent Colors - Deep Gold/Mustard Yellow (used sparingly) */
    --accent-gold: #E5B23A;
    --accent-gold-dark: #d4a02a;
    --accent-gold-light: #f0c050;
    --accent-gold-lighter: #f5d080;
    
    /* Secondary Colors - Cool Gray */
    --secondary-gray: #7C8A9A;
    --secondary-gray-dark: #5a6778;
    --secondary-gray-light: #9ba5b3;
    --secondary-gray-lighter: #c1c8d1;
    
    /* Neutral Colors */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-light: #e5e7eb;
    
    /* Status Colors */
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Gradients */
    --gradient-navy: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-light) 100%);
    --gradient-navy-light: linear-gradient(135deg, var(--primary-navy-light) 0%, var(--primary-navy-lighter) 100%);
    --gradient-gold: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    --gradient-gray: linear-gradient(135deg, var(--secondary-gray) 0%, var(--secondary-gray-light) 100%);
}

/* Global override for DaisyUI primary color -> Brand Navy */
.btn-primary,
.bg-primary,
.border-primary,
.text-primary,
.link-primary {
    background-color: var(--primary-navy) !important;
    border-color: var(--primary-navy) !important;
    color: #ffffff !important;
}
.btn-primary:hover,
.bg-primary:hover {
    background-color: var(--primary-navy-dark) !important;
    border-color: var(--primary-navy-dark) !important;
}
.text-primary,
.link-primary {
    background-color: transparent !important;
    color: var(--primary-navy) !important;
}
.border-primary {
    background-color: transparent !important;
}
.checkbox-primary:checked {
    background-color: var(--primary-navy) !important;
    border-color: var(--primary-navy) !important;
}
.checkbox-primary:indeterminate {
    background-color: var(--primary-navy) !important;
    border-color: var(--primary-navy) !important;
}

/* Enhanced Status Dropdown Styles */
.status-dropdown {
    position: relative;
    display: inline-block;
    z-index: 10;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    justify-content: space-between;
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-badge:active {
    transform: translateY(0);
}

/* Status Badge Variants */
.status-badge.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #f59e0b;
}

.status-badge.pending:hover {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    border-color: #d97706;
}

.status-badge.in-progress {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e40af;
    border-color: #3b82f6;
}

.status-badge.in-progress:hover {
    background: linear-gradient(135deg, #93c5fd 0%, #2563eb 100%);
    border-color: #1d4ed8;
}

.status-badge.completed {
    background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%);
    color: #166534;
    border-color: #22c55e;
}

.status-badge.completed:hover {
    background: linear-gradient(135deg, #86efac 0%, #16a34a 100%);
    border-color: #15803d;
}

/* Status Indicator Dot */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
    animation: pulse 2s infinite;
}

.status-indicator.pending {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.status-indicator.in-progress {
    background: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.status-indicator.completed {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

/* Dropdown Menu */
.status-dropdown-menu {
    position: fixed;
    z-index: 10000 !important;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    max-height: 300px;
    overflow-y: auto;
    pointer-events: none;
}

.status-dropdown-menu.show,
.status-dropdown.open .status-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Three-dot menu should have higher z-index */
.dropdown {
    z-index: 10 !important;
    position: relative !important;
}

.dropdown-content {
    z-index: 10001 !important;
    position: fixed !important;
    pointer-events: auto !important;
}

/* Specific styling for the three-dot menu dropdown */
.dropdown.dropdown-end {
    z-index: 10 !important;
    position: relative !important;
}

.dropdown.dropdown-end .dropdown-content {
    z-index: 10001 !important;
    position: fixed !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
    min-width: 160px !important;
}

/* DaisyUI dropdown - show when label is clicked/focused */
.dropdown label:focus + .dropdown-content,
.dropdown label:active + .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Keep dropdown open when hovering over it */
.dropdown .dropdown-content:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Ensure dropdowns can extend beyond card boundaries */
.task-card {
    overflow: visible !important;
}

.task-card .dropdown {
    overflow: visible !important;
}

.group {
    position: relative;
    z-index: 1;
}

.group:hover {
    z-index: 2;
}

/* Dropdown Menu Items */
.status-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    border: 1px solid transparent;
    white-space: nowrap;
    min-height: 44px;
    pointer-events: auto !important;
}

.status-menu-item:last-child {
    margin-bottom: 0;
}

.status-menu-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-menu-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
    font-weight: 600;
}

/* Status Menu Item Variants */
.status-menu-item.pending {
    color: var(--primary-navy-dark);
}

.status-menu-item.pending:hover {
    background: linear-gradient(135deg, var(--accent-gold-lighter) 0%, var(--accent-gold-light) 100%);
    border-color: var(--accent-gold);
}

.status-menu-item.in-progress {
    color: var(--primary-navy);
}

.status-menu-item.in-progress:hover {
    background: linear-gradient(135deg, var(--primary-navy-lighter) 0%, var(--primary-navy-light) 100%);
    border-color: var(--primary-navy);
}

.status-menu-item.completed {
    color: var(--secondary-gray-dark);
}

.status-menu-item.completed:hover {
    background: linear-gradient(135deg, var(--secondary-gray-lighter) 0%, var(--secondary-gray-light) 100%);
    border-color: var(--secondary-gray);
}

/* Disabled State */
.status-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #9ca3af;
}

.status-menu-item.disabled:hover {
    transform: none;
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Future Task Indicator */
.future-task-indicator {
    font-size: 0.75rem;
    color: var(--warning-orange);
    font-style: italic;
    margin-left: 0.5rem;
}

/* Past task indicator */
.past-task-indicator {
    font-size: 0.75rem;
    color: var(--error-red);
    font-style: italic;
    margin-left: 0.5rem;
}

/* Chevron Icon */
.status-chevron {
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.status-dropdown.open .status-chevron {
    transform: rotate(180deg);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden !important;
}

/* Header and Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-light) 100%);
    box-shadow: var(--shadow-lg);
    border-bottom: none;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

/* Cards and Containers */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-dark) 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    border: none;
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    margin: 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-dark) 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-navy-dark) 0%, var(--primary-navy-light) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* Team Member Action Buttons */
.btn-ghost.btn-sm {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.btn-ghost.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

.btn-ghost.btn-sm.text-blue-600 {
    color: #2563eb !important;
    border-color: #dbeafe;
}

.btn-ghost.btn-sm.text-red-600 {
    color: #dc2626 !important;
    border-color: #fecaca;
}

.btn-ghost.btn-sm:hover.text-blue-600 {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
}

.btn-ghost.btn-sm:hover.text-red-600 {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-error {
    background: linear-gradient(135deg, var(--error-red) 0%, #dc2626 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

/* Forms */
.form-control, .input, .textarea, .select {
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    background: var(--bg-white);
    box-sizing: border-box;
    min-height: 2.75rem;
    vertical-align: middle;
}

.form-control:focus, .input:focus, .textarea:focus, .select:focus {
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(26, 43, 72, 0.1);
    outline: none;
}

/* Specific input type fixes for better text rendering */
input[type="text"], 
input[type="email"], 
input[type="number"], 
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="file"] {
    height: auto;
    vertical-align: middle;
    font-family: inherit;
}

/* Textarea specific improvements */
.textarea {
    min-height: 6rem;
    resize: vertical;
    line-height: 1.6;
}

/* Select dropdown improvements */
.select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* File input improvements */
input[type="file"] {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

/* Date input specific styling */
input[type="date"],
.date-input-enhanced {
    padding: 0.5rem 0.75rem;
    height: 2.5rem;
    line-height: 1.25;
    font-size: 0.875rem;
    min-height: 2.5rem;
}

/* Ensure date parts stay on one line (fix for iOS Chrome/Safari) */
input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    margin: 0;
}

/* Mobile-specific improvements */
@media (max-width: 640px) {
    .form-control, .input, .textarea, .select {
        padding: 0.75rem 1rem;
        font-size: 16px;
        min-height: 3rem;
    }
    
    .textarea {
        min-height: 5rem;
    }
}

/* Focus states for better accessibility */
.form-control:focus-visible, 
.input:focus-visible, 
.textarea:focus-visible, 
.select:focus-visible {
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(26, 43, 72, 0.1);
    outline: none;
}

/* Error and success states */
.input.error,
.textarea.error {
    border-color: var(--error-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input.success,
.textarea.success {
    border-color: var(--success-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Tables */
.table {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-dark) 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(26, 43, 72, 0.05);
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

/* Modals */
.modal-box {
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: none;
    background: var(--bg-white);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-dark) 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

/* Sidebar - only for drawer layouts */
.drawer .drawer-side {
    background: none !important;
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Sidebar robust vertical stacking and scroll */
.drawer .drawer-side .menu {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    max-height: 100vh !important;
}
.drawer .drawer-side .menu > div {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f1f5f9 100%);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--border-light);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-navy) 0%, var(--accent-gold) 100%);
    border-radius: 4px;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mobile-sidebar-toggle {
        display: block;
    }
    
    .stats-card {
        padding: 1.5rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
}

/* Loading States */
.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-navy);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-navy-dark);
}

/* UX Improvements */
.btn:focus,
.input:focus,
.textarea:focus,
.select:focus {
    outline: 2px solid var(--primary-navy);
    outline-offset: 2px;
}

/* Improved table readability */
.table tbody tr:nth-child(even) {
    background-color: rgba(26, 43, 72, 0.02);
}

/* Better modal animations */
.modal-box {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved button states */
.btn:active {
    transform: scale(0.98);
}

/* Loading states */
.loading-spinner {
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary-navy);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Better form validation */
.input.error,
.textarea.error {
    border-color: var(--error-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input.success,
.textarea.success {
    border-color: var(--success-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Improved mobile & tablet responsiveness (below the lg breakpoint 1024px) - only for drawer layouts */
@media (max-width: 1023px) {
    /* Sidebar sizing - only for drawer layouts */
    .drawer .drawer-side {
        width: 20rem !important;
    }

    .drawer .card {
        margin-bottom: 1rem;
    }

    .drawer .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Better accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.btn:focus-visible,
.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
    outline: 2px solid var(--primary-navy);
    outline-offset: 2px;
}

.mobile-sidebar-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-sidebar-toggle {
        display: block;
    }
}

/* ============================================================
   TASKS PAGE SPECIFIC DROPDOWN FIXES
   ============================================================ */

/* CRITICAL FIX: Use fixed positioning to escape stacking contexts */
.tasks-page .status-dropdown {
    position: relative;
    z-index: 10;
}

.tasks-page .status-dropdown-menu {
    position: fixed !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tasks-page .status-dropdown.open .status-dropdown-menu,
.tasks-page .status-dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Three-dot menu dropdown */
.tasks-page .dropdown {
    position: relative;
    z-index: 10;
}

.tasks-page .dropdown-content {
    position: fixed !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
}

.tasks-page .dropdown.dropdown-end .dropdown-content {
    position: fixed !important;
    z-index: 10001 !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
    min-width: 160px !important;
    pointer-events: auto !important;
}

/* Ensure menu items are clickable */
.tasks-page .status-menu-item {
    pointer-events: auto !important;
    position: relative;
    z-index: inherit;
}

.tasks-page .dropdown-content li,
.tasks-page .dropdown-content a {
    pointer-events: auto !important;
}

/* Task cards and groups */
.tasks-page .group {
    position: relative;
    z-index: 1;
}

.tasks-page .group:hover {
    z-index: 2;
}

.tasks-page .task-card {
    overflow: visible !important;
    position: relative;
}

.tasks-page .card-body {
    overflow: visible !important;
    position: relative;
}

/* Ensure containers don't clip dropdowns */
.tasks-page .grid {
    overflow: visible;
    position: relative;
}

.tasks-page .container {
    overflow: visible;
}

/* Responsive positioning for mobile */
@media (max-width: 768px) {
    .tasks-page .status-dropdown-menu {
        min-width: 250px;
        max-width: 90vw;
    }
}

/* Ensure proper spacing in the grid */
.tasks-page .grid > * {
    margin-bottom: 1.5rem;
}

/* Prevent card hover transform from interfering with dropdowns */
.tasks-page .card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tasks-page .card:hover {
    transform: translateY(-2px);
}

/* ============================================================
   END TASKS PAGE SPECIFIC FIXES
   ============================================================ */

/* Better card interactions */
.card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   CRITICAL FIX: Override DaisyUI pointer-events on sidebar
   This ensures the sidebar is clickable on all screen sizes
   ============================================================ */
.drawer .drawer-side {
    pointer-events: auto !important;
}

/* ============================================================
   DESKTOP SIDEBAR DISPLAY FIX
   Force sidebar to be visible on desktop screens
   ============================================================ */
@media (min-width: 1024px) {
    /* Show drawer side on desktop */
    .drawer .drawer-side {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        pointer-events: auto !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 40 !important;
        width: 20rem !important;
        height: 100vh !important;
    }
    
    /* CRITICAL FIX: Force sidebar container transform on desktop */
    .drawer .drawer-side > .sidebar-container {
        transform: translateX(0) !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: 100% !important;
    }
    
    /* Adjust main content to account for sidebar */
    .drawer-content {
        margin-left: 20rem !important;
    }
    
    /* Hide drawer toggle on desktop */
    .drawer-toggle {
        display: none !important;
    }
}

/* ============================================================
   ONBOARDING HELP BUTTON STYLES
   Floating help button for starting onboarding tours
   ============================================================ */
.onboarding-help-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary-navy);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.onboarding-help-button:hover {
    background: var(--primary-navy-light);
    transform: scale(1.05);
    box-shadow: 0 15px 25px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.onboarding-help-button:active {
    transform: scale(0.95);
}

.onboarding-help-button.hidden {
    display: none;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .onboarding-help-button {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* Ensure help button stays above sidebar and modals */
@media (min-width: 1024px) {
    .onboarding-help-button {
        right: 20px; /* Keep on right side even with sidebar */
    }
}