:root {
    /* Color Palette - Premium Dark */
    --bg-main: #0a0a0c;
    --bg-sidebar: #121216;
    --bg-card: #1c1c21;
    --bg-card-hover: #25252e;
    --accent-primary: #f0f0f5;
    --accent-secondary: #8e8e93;

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Status Colors */
    --color-auto: #ef4444;
    /* Red */
    --color-immo: #f59e0b;
    /* Orange/Gold */
    --color-corporate: #3b82f6;
    /* Blue */
    --color-event-prive: #8b5cf6;
    /* Purple */
    --color-event-assoc: #d946ef;
    /* Magenta/Pink */

    --status-success: #10b981;
    --status-warning: #f59e0b;
    --status-danger: #ef4444;
    --status-info: #06b6d4;

    /* UI Tokens */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.7);
    --glass-bg: rgba(28, 28, 33, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: radial-gradient(circle at 50% 0%, #1a1a24 0%, var(--bg-main) 100%);
    animation: fadeIn 0.8s ease-out;
}

/* Sidebar Styling */
.sidebar-header {
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-width: 170px;
    height: auto;
    object-fit: contain;
    filter: brightness(1.2);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-primary);
    color: var(--bg-main);
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #444, #222);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: sticky;
    top: 0;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding: 1rem 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--glass-border);
    width: 300px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.search-box i {
    color: var(--text-muted);
    width: 18px;
}

.notifications {
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-auto);
    color: white;
    font-size: 0.6rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-main);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background-color: #ef4444;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    gap: 0.25rem;
    border-radius: var(--radius-sm);
}

.btn-xs i {
    width: 12px;
    height: 12px;
}

/* Loader */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 600px;
    max-width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal.modal-lg {
    width: 900px;
    max-width: 95%;
}

.modal.modal-md {
    width: 700px;
    max-width: 90%;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Form Grid */
.grid-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--accent-primary);
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Kanban View Styles */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    height: calc(100vh - 200px);
}

.kanban-column {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.kanban-column-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.kanban-count {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.kanban-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding: 0.5rem;
}

.project-kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition-smooth);
    cursor: grab;
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

p.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 600px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-2xl);
    position: relative;
    z-index: 1001;
}

.modal-content.modal-lg {
    width: 900px;
}

.modal-content.modal-md {
    width: 500px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.mobile-nav-item {
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    transition: 0.3s;
    padding: 8px;
    border-radius: 12px;
}

.mobile-nav-item.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.mobile-nav-item.action-btn {
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-20px);
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 1rem;
        padding-bottom: 90px;
        /* Space for mobile nav */
    }

    .mobile-nav {
        display: flex;
    }

    /* Grids to single column */
    .dashboard-grid,
    .dashboard-bottom-grid,
    /* Add this to stack "To Do" and "Recent Productions" */
    .finance-overview .dashboard-grid,
    .basket-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .finance-overview>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Cards */
    .stat-card,
    .project-card,
    .basket-card,
    .action-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem !important;
    }

    /* Tables */
    .table-container,
    .expenses-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        /* Ensure horizontal scroll works */
    }

    /* FIX: Force Data Tables to fit screen when converted to cards */
    .data-table {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Modals */
    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content.modal-lg,
    .modal-content.modal-md {
        width: 100% !important;
        max-width: 100% !important;
        height: 85vh;
        /* Slide up sheet feel */
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        margin: 0;
        overflow-y: auto;
        position: fixed;
        bottom: 0;
    }

    /* Hide top bar right elements to prevent overflow */
    .top-bar-right {
        display: none;
    }

    .app-container {
        overflow-x: hidden;
    }

    /* Kanban Mobile Optimization: Vertical Stack */
    .kanban-board {
        flex-direction: column !important;
        /* Stack columns vertically */
        overflow-x: hidden;
        /* Remove horizontal scroll */
        padding-bottom: 6rem;
        gap: 2rem;
        scroll-snap-type: none;
        /* Disable snap */
    }

    .kanban-column {
        min-width: 0 !important;
        width: 100% !important;
        /* Full width */
        scroll-snap-align: none;
        height: auto !important;
        max-height: none !important;
        margin-right: 0;
    }

    .kanban-cards {
        max-height: 400px;
        /* Limit height of each column so user can scroll to next column */
        overflow-y: auto;
    }

    /* Compact Header on Mobile */
    .top-bar {
        padding: 0.75rem 1rem !important;
        gap: 0.5rem;
    }

    .top-bar h1,
    .top-bar h2 {
        display: block !important;
        /* Show title for context */
        font-size: 1.1rem;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70%;
        /* Leave space for menu/search if needed */
    }

    .top-bar .action-btn {
        /* Assuming New Project button has this or similar class, or target generic button in header */
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

.project-kanban-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-premium);
}

.card-category-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    display: inline-block;
    text-transform: uppercase;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-kanban-card:hover .card-actions {
    opacity: 1;
}

/* Dashboard Stats Redesign */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card-premium {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

.stat-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0.5;
}

.stat-card-premium:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-icon {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Outfit';
}

.stat-trend {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up {
    color: var(--status-success);
}

.trend-down {
    color: var(--status-danger);
}

/* New Alert Styles */
.priority-glow,
.priority-glow-alt {
    border-color: var(--status-warning) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
    animation: pulse-glow 2s infinite ease-in-out;
}

.priority-glow-alt {
    border-image: linear-gradient(135deg, var(--status-warning), transparent) 1;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
    }

    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    }
}

.alert-card .stat-icon {
    background: rgba(255, 255, 255, 0.03);
}

/* Updated Calendar Styles */
.calendar-grid-premium {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-header-premium {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

.calendar-cell-premium {
    min-height: 120px;
    padding: 0.75rem;
    border: 0.5px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.calendar-cell-premium:hover {
    background: rgba(255, 255, 255, 0.03);
}

.calendar-cell-premium.today {
    background: rgba(255, 255, 255, 0.05);
}

.calendar-cell-premium.today .day-number {
    background: var(--accent-primary);
    color: var(--bg-main);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.event-dot-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.event-indicator {
    height: 6px;
    flex: 1;
    min-width: 20%;
    border-radius: 3px;
    opacity: 0.8;
}

.calendar-event-pills {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.calendar-event-pill {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid transparent;
}

.clickable-link {
    cursor: pointer;
    border-bottom: 1px dotted var(--text-muted);
    transition: 0.2s;
}

.clickable-link:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Partner & Sector Badges */
.badge-agence-com {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

/* Pink */
.badge-traiteur {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

/* Orange */
.badge-lieu-de-reception {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

/* Purple */
.badge-wedding-planner {
    background: rgba(232, 121, 249, 0.1);
    color: #e879f9;
}

/* Fuchsia */
.badge-photographe {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

/* Sky */
.badge-autre-partenaire {
    background: rgba(100, 116, 139, 0.1);
    color: #94a3b8;
}

/* Slate */

.type-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid currentColor;
    display: inline-block;
    vertical-align: middle;
}

.type-client {
    color: var(--color-corporate);
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
}

.type-partenaire {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.3);
    background: rgba(244, 114, 182, 0.05);
}

/* Responsiveness */
/* Responsiveness */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }

    .main-content {
        margin-left: 80px;
    }

    .logo-subtext,
    .nav-item span,
    .user-info,
    .sidebar-footer {
        display: none;
    }

    .nav-item {
        justify-content: center;
    }

    /* Fix Header Overlap */
    .top-bar h2 {
        font-size: 1.25rem;
        /* Smaller font on tablet */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo-text {
        font-size: 1.2rem;
        /* Reduce logo size */
    }

    .logo-text {
        display: none;
        /* Hide logo text on tablet to prevent overlap */
    }

    .logo-img {
        max-width: 40px;
        /* Constraint logo image size */
    }

    .top-bar {
        padding-left: 2rem;
        /* Ensure title doesn't hit logo */
    }

    .sidebar .logo {
        justify-content: center;
        /* Center the icon */
    }
}

@media (max-width: 768px) {

    /* Mobile Overrides already present, ensuring consistency */
    .top-bar {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .top-bar h2 {
        font-size: 1.1rem;
        width: 100%;
        order: 2;
        /* Move title below search on very small screens if needed, or just shrink */
        display: none;
        /* Hide page title on mobile to save space, rely on content headers */
    }

    .search-bar {
        width: 100%;
        order: 3;
    }

    .top-bar-right {
        width: 100%;
        justify-content: space-between;
        order: 1;
    }

    /* FIX: Remove left margin on mobile to prevent black band */
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .sidebar {
        display: none !important;
    }
}

/* Quote Card Optimization */
.quote-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.quote-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    justify-content: space-between;
    align-items: center;
}

/* Average Basket Analysis Styles */
.basket-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.basket-card {
    transition: var(--transition-smooth);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.basket-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.insight-box {
    animation: fadeIn 0.6s ease-out;
}

.basket-chart-container {
    position: relative;
    width: 100%;
}

/* --- Mobile Tables (Cards) --- */
@media (max-width: 768px) {
    .data-table thead {
        display: none;
        /* Hide headers */
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .data-table td:last-child {
        border-bottom: none;
        padding-top: 1rem;
        justify-content: flex-end;
        /* Actions aligned right */
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.75rem;
        margin-right: 1rem;
        text-align: left;
    }

    /* Contacts specific adjust */
    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .view-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .view-btns {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .view-btns .btn {
        flex: 1;
        justify-content: center;
    }
}

/* --- Finance Layout --- */
.finance-layout {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .finance-layout {
        grid-template-columns: 1fr;
        /* Stack on tablet/mobile */
    }

    .chart-container {
        height: 300px !important;
        /* Smaller chart height */
        padding: 1rem !important;
    }

    .alerts-container {
        margin-top: 0;
    }
}

@media (max-width: 768px) {

    /* Form Rows to Stack */
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    /* Stats Cards Grid */
    .dashboard-grid,
    .basket-cards-grid {
        grid-template-columns: 1fr !important;
    }

    /* Insight Box */
    .insight-box {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}