/**
 * Dash CRM - Modern 2026 Design System
 * Glass morphism, gradient mesh, brutalist typography
 */

/* ============================================================================
   CSS Variables & Theme
   ============================================================================ */

:root {
    /* Typography */
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', monospace;

    /* Sizing */
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.5rem;
    --text-4xl: 3.5rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-accent-hover: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #7c3aed 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    --gradient-mesh:
        radial-gradient(at 40% 20%, rgba(124, 58, 237, 0.2) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(124, 58, 237, 0.12) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(167, 139, 250, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 100%, rgba(124, 58, 237, 0.1) 0px, transparent 50%);

    /* Status colors - used consistently everywhere */
    --status-incoming: #6b7280;
    --status-discussion: #f59e0b;
    --status-planned: #3b82f6;
    --status-shot: #8b5cf6;
    --status-editing: #f97316;
    --status-invoice: #8b5cf6;
    --status-archived: #4b5563;

    /* Urgency colors */
    --urgency-safe: #22c55e;
    --urgency-soon: #f59e0b;
    --urgency-urgent: #f97316;
    --urgency-overdue: #ef4444;

    /* Estimate status colors */
    --estimate-draft: #6b7280;
    --estimate-sent: #3b82f6;
    --estimate-accepted: #22c55e;
    --estimate-declined: #ef4444;
    --estimate-expired: #f97316;

    /* Sidebar */
    --sidebar-width: 220px;
    --sidebar-width-collapsed: 60px;
}

/* Dark theme (default) - Deep purple with glass cards */
[data-theme="dark"] {
    --bg-base: #0f0a1a;
    --bg-secondary: #1a1035;
    --bg-tertiary: #150d25;
    --bg-elevated: #1a1035;

    /* Glass for all elements */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-bg-solid: rgba(20, 12, 35, 0.95);
    --glass-border: rgba(139, 92, 246, 0.15);
    --glass-border-hover: rgba(139, 92, 246, 0.3);

    /* Text on dark background - softer contrast for reduced eye strain */
    --text-primary: #e5e7eb;
    --text-secondary: rgba(229, 231, 235, 0.7);
    --text-muted: rgba(229, 231, 235, 0.5);

    /* Accent colors */
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-secondary: #c4b5fd;
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;

    /* Glows */
    --glow-accent: rgba(139, 92, 246, 0.4);
    --glow-secondary: rgba(168, 85, 247, 0.3);
    --glow-purple: rgba(139, 92, 246, 0.35);

    /* Shadows with purple tint */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.15);

    /* Glass cards on dark */
    --card-bg: rgba(30, 20, 50, 0.6);
    --card-bg-hover: rgba(40, 28, 65, 0.7);
    --card-text: #f3f4f6;
    --card-text-secondary: rgba(255, 255, 255, 0.7);
    --card-text-muted: rgba(255, 255, 255, 0.5);
    --card-border: rgba(139, 92, 246, 0.2);
    --card-shadow:
        0 4px 6px rgba(0, 0, 0, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(139, 92, 246, 0.1);
}

/* Light theme - soft lavender gradient */
[data-theme="light"] {
    --bg-base: #f5f3ff;
    --bg-secondary: #ede9fe;
    --bg-tertiary: #e0d8f0;
    --bg-elevated: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-bg-hover: rgba(255, 255, 255, 0.95);
    --glass-bg-solid: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(139, 92, 246, 0.1);
    --glass-border-hover: rgba(139, 92, 246, 0.2);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-secondary: #8b5cf6;
    --accent-purple: #7c3aed;
    --accent-orange: #f97316;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --glow-accent: rgba(124, 58, 237, 0.2);
    --glow-secondary: rgba(139, 92, 246, 0.2);
    --glow-purple: rgba(124, 58, 237, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.08);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-bg-hover: rgba(255, 255, 255, 0.95);
    --card-text: #1f2937;
    --card-text-secondary: #4b5563;
    --card-text-muted: #6b7280;
    --card-border: rgba(139, 92, 246, 0.1);
    --card-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ============================================================================
   Reset & Base
   ============================================================================ */

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

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated gradient background - flowing smoky mesh */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f0a1a 0%, #1a1035 50%, #150d25 100%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 90% 70%, rgba(167, 139, 250, 0.08) 0%, transparent 50%);
    animation: moveGradient 60s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes moveGradient {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    25% { transform: translate(30px, -20px) scale(1.05); opacity: 0.9; }
    50% { transform: translate(-20px, 30px) scale(0.95); opacity: 1; }
    75% { transform: translate(-30px, -10px) scale(1.02); opacity: 0.95; }
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--text-primary);
}

::selection {
    background: var(--accent);
    color: white;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: var(--text-2xl);
    font-weight: 800;
}

h2 {
    font-size: var(--text-lg);
    font-weight: 700;
}

h3 {
    font-size: var(--text-base);
    font-weight: 600;
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mono {
    font-family: var(--font-mono);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.opacity-50 { opacity: 0.5; }

.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-center { text-align: center; }
.text-right { text-align: right; }

code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--glass-bg);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

/* ============================================================================
   Layout
   ============================================================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.main-content {
    flex: 1;
    padding: var(--space-8) 0 var(--space-12);
    min-height: calc(100vh - 140px);
    animation: pageEnter 0.4s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--glass-border);
}

.page-header h1 {
    margin-bottom: 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

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

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* ============================================================================
   Navigation
   ============================================================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 var(--space-6);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--text-lg);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav-brand:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: var(--space-1);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg-hover);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--gradient-accent);
    box-shadow: 0 0 20px var(--glow-accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.nav-icon:hover {
    color: var(--text-primary);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
}

.nav-icon.active {
    background: var(--gradient-accent);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 20px var(--glow-accent);
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }
[data-theme="light"] .theme-icon-light { display: inline; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* Global Search */
.global-search {
    position: relative;
}

.global-search input {
    width: 200px;
    padding: var(--space-2) var(--space-4);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.global-search input:focus {
    outline: none;
    width: 280px;
    background: var(--glass-bg-hover);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow-accent);
}

.global-search input::placeholder {
    color: var(--text-muted);
}

.global-search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    overflow-y: auto;
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
}

.global-search-results.active {
    display: block;
}

.search-section {
    padding: var(--space-2);
}

.search-section:not(:last-child) {
    border-bottom: 1px solid var(--glass-border);
}

.search-section-title {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-result {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.search-result:hover {
    background: var(--glass-bg-hover);
}

.search-result-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-empty {
    padding: var(--space-6);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.search-hint {
    padding: var(--space-2) var(--space-3);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

.search-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
}

/* ============================================================================
   White Cards (floating on dark background)
   ============================================================================ */

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
    position: relative;
    color: var(--card-text);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


.card h2,
.card h3,
.card h4 {
    color: var(--card-text);
}

.card p,
.card .text-secondary {
    color: var(--card-text-secondary);
}

.card .text-muted {
    color: var(--card-text-muted);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--glass-border);
}

.card-header h2 {
    margin-bottom: 0;
    font-size: var(--text-base);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow:
        0 2px 4px rgba(124, 58, 237, 0.3),
        0 4px 12px rgba(124, 58, 237, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    box-shadow:
        0 4px 8px rgba(124, 58, 237, 0.4),
        0 8px 24px rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.btn-danger {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    transform: translateY(-1px);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: var(--space-3);
}

/* ============================================================================
   Forms
   ============================================================================ */

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow-accent);
    background: var(--glass-bg-hover);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-8);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.form-row:has(.form-group:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}

/* Checkbox inline */
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.checkbox-inline span {
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

/* Shoot date/time section */
.shoot-datetime-section {
    padding: var(--space-4);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.shoot-time-row {
    display: flex;
    gap: var(--space-4);
}

.time-input {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.time-input input[type="time"] {
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

.time-input input[type="time"]:focus {
    outline: none;
    border-color: var(--accent);
}

.form-inline {
    display: flex;
    gap: var(--space-3);
    align-items: flex-end;
}

.form-inline .form-group {
    margin-bottom: 0;
    flex: 1;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ============================================================================
   Tables
   ============================================================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.table th {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: var(--glass-bg);
}

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

.table tbody tr:hover {
    background: var(--glass-bg-hover);
}

.table td.mono {
    font-family: var(--font-mono);
}

.table td.actions {
    text-align: right;
    white-space: nowrap;
}

/* Subtle action buttons - visible only on row hover */
.table td.actions .btn {
    opacity: 0.3;
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
    transition: all 0.2s ease;
}

.table tr:hover td.actions .btn {
    opacity: 1;
    background: var(--glass-bg);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

.table td.actions .btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.table td.actions .btn-danger,
.table td.actions button[value="delete"] {
    color: var(--text-muted);
}

.table tr:hover td.actions .btn-danger,
.table tr:hover td.actions button[value="delete"] {
    color: var(--text-secondary);
}

.table td.actions .btn-danger:hover,
.table td.actions button[value="delete"]:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #f87171;
}

/* ============================================================================
   Status Badges
   ============================================================================ */

.badge {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.badge-incoming {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    color: #a78bfa;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.badge-discussion {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(252, 211, 77, 0.2));
    color: #fcd34d;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.badge-planned,
.badge-confirmed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    color: #34d399;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.badge-shot {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.2));
    color: #60a5fa;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.badge-editing {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.2));
    color: #c4b5fd;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.badge-invoice,
.badge-to_invoice {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(244, 114, 182, 0.2));
    color: #f472b6;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.2);
}

.badge-archived,
.badge-archive {
    background: var(--glass-bg);
    color: var(--text-muted);
}

.badge-tbc {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: var(--text-xs);
    padding: 2px 6px;
    margin-right: var(--space-2);
}

.shoot-time {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.badge-type {
    background: var(--glass-bg);
    color: var(--text-secondary);
    text-transform: none;
    font-weight: 500;
}

/* ============================================================================
   Stats Cards
   ============================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: left;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-2);
    text-shadow: 0 0 40px var(--glow-accent);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ============================================================================
   Alerts
   ============================================================================ */

.alert {
    font-size: var(--text-sm);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.1));
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(252, 211, 77, 0.1));
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* ============================================================================
   Toast Notifications
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    max-width: 400px;
    min-width: 280px;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.2);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    animation: toastSlideIn 0.3s ease;
}

.toast:hover {
    transform: translateX(-4px);
}

.toast-success {
    border-left: 3px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 3px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 3px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 3px solid var(--accent);
}

.toast-info .toast-icon {
    color: var(--accent);
}

.toast-icon {
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
}

.toast-close {
    color: var(--text-muted);
    font-size: var(--text-lg);
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.toast:hover .toast-close {
    opacity: 1;
}

.toast.fade-out {
    animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ============================================================================
   Empty States
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: var(--space-6);
    font-size: var(--text-lg);
}

/* ============================================================================
   Filters
   ============================================================================ */

.filters {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--gradient-accent);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 20px var(--glow-accent);
}

/* ============================================================================
   Kanban Board
   ============================================================================ */

.kanban-filters {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.kanban-filter {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.kanban-filter:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.kanban-filter.active {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 0 20px var(--glow-accent);
}

.kanban-filter.filter-licence.active {
    background: var(--gradient-purple);
    box-shadow: 0 0 20px var(--glow-accent);
}

.kanban-board {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-4);
    min-height: 500px;
}

.kanban-column {
    flex: 0 0 210px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.kanban-column:hover {
    border-color: var(--glass-border-hover);
}

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

.kanban-title {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.kanban-count {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.kanban-cards {
    flex: 1;
    padding: var(--space-2);
    overflow-y: auto;
    min-height: 80px;
}

.kanban-cards.drag-over {
    background: var(--glass-bg-hover);
    border-radius: var(--radius-sm);
}

.kanban-card {
    display: block;
    background: var(--glass-bg-solid);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-2);
    cursor: grab;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.kanban-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent);
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-md), 0 0 20px var(--glow-accent);
}

.kanban-card.dragging {
    opacity: 0.7;
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.kanban-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-1);
    margin-bottom: var(--space-1);
}

.kanban-card-type {
    font-size: 11px;
    flex-shrink: 0;
}

.kanban-card-title {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card-client {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card-category {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 1px 4px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: var(--space-1);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
}

.kanban-card-licence {
    border-left: 3px solid var(--accent-secondary);
}

.kanban-card-licence:hover {
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-md), 0 0 20px var(--glow-accent);
}

/* ============================================================================
   Estimates
   ============================================================================ */

.estimate-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--glass-border);
}

.estimate-row input,
.estimate-row select {
    font-size: var(--text-sm);
}

.estimate-total {
    background: var(--glass-bg);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--glass-border);
}

.estimate-total-label {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.estimate-total-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   Detail Pages
   ============================================================================ */

.detail-meta {
    display: flex;
    gap: var(--space-4);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
}

.detail-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.detail-value {
    font-size: var(--text-base);
    color: var(--text-primary);
}

.history-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: var(--text-sm);
}

.history-date {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 100px;
}

.history-changes {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.history-change-field {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.history-field-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.history-old-value {
    color: var(--text-muted);
    text-decoration: line-through;
}

.history-new-value {
    color: var(--accent);
    font-weight: 500;
}

/* Project Progress Bar */
.project-progress {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
    overflow-x: auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.progress-step-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--glass-bg-solid);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.progress-step-label {
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
}

.progress-step.completed .progress-step-marker {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.progress-step.completed .progress-step-label {
    color: var(--success);
}

.progress-step.current .progress-step-marker {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 12px var(--glow-accent);
}

.progress-step.current .progress-step-label {
    color: var(--accent);
    font-weight: 600;
}

.progress-step.archived .progress-step-marker {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

.progress-step-line {
    flex: 1;
    height: 2px;
    min-width: 20px;
    background: var(--glass-border);
    margin: 0 var(--space-2);
    margin-bottom: 20px;
    transition: background 0.2s ease;
}

.progress-step-line.completed {
    background: var(--success);
}

/* Interactive Timeline */
.project-progress-interactive .progress-step {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.project-progress-interactive .progress-step:hover {
    transform: scale(1.05);
}

.project-progress-interactive .progress-step:hover .progress-step-marker {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--glow-accent);
}

.project-progress-interactive .progress-step:not(.current):not(.completed):hover .progress-step-marker {
    background: rgba(91, 154, 167, 0.2);
}

.project-progress-interactive .progress-step:active {
    transform: scale(0.98);
}

/* Detail Grid Inner */
.detail-grid-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.detail-item {
    padding: var(--space-3);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
}

.detail-item-wide {
    grid-column: span 2;
}

.detail-value-highlight {
    color: var(--accent) !important;
    font-weight: 600;
    font-size: var(--text-lg);
}

.shoot-time-inline {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 2px 8px;
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.category-badge-inline {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(91, 154, 167, 0.15);
    border: 1px solid rgba(91, 154, 167, 0.3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--accent);
}

/* Day Buttons */
.day-buttons {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.day-btn {
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.day-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.day-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Restore Buttons */
.restore-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.restore-buttons .btn {
    flex: 1;
    min-width: 120px;
}

/* Tap Buttons Wrap */
.tap-buttons-wrap {
    flex-wrap: wrap;
    max-height: 150px;
    overflow-y: auto;
}

.tap-btn-pill {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
}

/* Client Link */
.client-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.client-link:hover {
    color: var(--accent);
}

/* ============================================================================
   Workflow Tasks
   ============================================================================ */

.tasks-progress {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.tasks-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--glass-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.tasks-progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.tasks-progress-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

.tasks-stages {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.task-stage {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.task-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--glass-bg);
    border-left: 4px solid var(--accent);
}

.task-stage-label {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.task-stage-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.task-list {
    padding: var(--space-2);
}

.task-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.task-item:hover {
    background: var(--glass-bg-hover);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-checkbox {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.task-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.task-checkbox input:checked + .task-checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.task-checkbox input:checked + .task-checkmark::after {
    content: '\\2713';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.task-checkbox:hover .task-checkmark {
    border-color: var(--accent);
}

.task-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.task-title {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.task-due {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding: 2px 6px;
    background: var(--glass-bg);
    border-radius: 4px;
    white-space: nowrap;
}

.task-due.overdue {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.task-due.soon {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.task-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-lg);
    cursor: pointer;
    padding: 0 var(--space-2);
    opacity: 0;
    transition: all 0.15s ease;
}

.task-item:hover .task-delete {
    opacity: 1;
}

.task-delete:hover {
    color: #ef4444;
}

.add-task-form {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-4);
    border-top: 1px solid var(--glass-border);
    margin-top: var(--space-4);
}

.add-task-input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.add-task-input:focus {
    outline: none;
    border-color: var(--accent);
}

.add-task-select {
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.empty-tasks {
    padding: var(--space-6);
    text-align: center;
}

/* ============================================================================
   Modal
   ============================================================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: var(--space-6);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--glass-bg-solid);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

/* Gradient border effect */
.modal::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: var(--gradient-accent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

.modal-backdrop.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.modal-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: var(--text-xl);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-lg {
    max-width: 600px;
}

/* ============================================================================
   Status Bar (Footer)
   ============================================================================ */

.status-bar {
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: var(--space-3) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    position: sticky;
    bottom: 0;
}

.status-left,
.status-right {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.status-date {
    color: var(--text-primary);
}

.status-time {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.status-sun {
    color: var(--text-muted);
}

.status-center {
    flex: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 var(--space-4);
}

.status-event {
    color: var(--text-secondary);
}

/* ============================================================================
   Auth Pages
   ============================================================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    width: 100%;
    max-width: 400px;
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: var(--gradient-accent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    pointer-events: none;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: var(--space-8);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-footer {
    margin-top: var(--space-6);
    text-align: center;
}

.totp-input {
    font-family: var(--font-mono) !important;
    font-size: var(--text-2xl) !important;
    text-align: center;
    letter-spacing: 0.5rem;
}

.qr-code {
    display: block;
    margin: var(--space-6) auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

/* ============================================================================
   Project Types
   ============================================================================ */

.type-selector {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.type-option {
    cursor: pointer;
    flex: 1;
}

.type-option input {
    display: none;
}

.type-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    transition: all 0.2s ease;
}

.type-option input:checked + .type-card {
    background: var(--gradient-accent);
    border-color: transparent;
    box-shadow: 0 0 25px var(--glow-accent);
}

.type-card.type-licence {
    border-color: var(--glass-border);
}

.type-option input:checked + .type-card.type-licence {
    background: var(--gradient-purple);
    box-shadow: 0 0 25px var(--glow-accent);
}

.type-icon {
    font-size: var(--text-xl);
}

.type-label {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
}

.type-badge {
    font-size: var(--text-sm);
}

.row-licence {
    border-left: 3px solid var(--accent-secondary);
}

/* Danger Zone */
.danger-zone {
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(239, 68, 68, 0.3);
}

.danger-zone h3 {
    color: #ef4444;
    margin-bottom: var(--space-4);
}

/* ============================================================================
   Settings
   ============================================================================ */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.settings-grid .card h2 {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-section {
    padding-top: var(--space-6);
    margin-top: var(--space-6);
    border-top: 1px solid var(--glass-border);
}

.settings-section:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.settings-section h3 {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
}

.preset-row {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-3);
}

.gcal-row {
    display: grid;
    grid-template-columns: 1fr 150px 40px auto;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-3);
}

.gcal-id-input {
    font-size: var(--text-xs);
}

.gcal-name-input {
    font-size: var(--text-sm);
}

.gcal-color-input {
    width: 40px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    cursor: pointer;
}

.gcal-color-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.gcal-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* ============================================================================
   Autocomplete
   ============================================================================ */

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 280px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: var(--shadow-lg);
}

.autocomplete-item {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--glass-border);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--glass-bg-hover);
}

.autocomplete-create {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--glass-bg);
}

.autocomplete-create:hover {
    background: var(--glass-bg-hover);
}

/* ============================================================================
   Quick Add Button & Menu
   ============================================================================ */

.quick-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: var(--text-xl);
    font-weight: 700;
    color: white;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--glow-accent);
}

.quick-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--glow-accent);
}

.quick-menu {
    position: fixed;
    top: 72px;
    right: var(--space-6);
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    display: none;
    flex-direction: column;
    gap: var(--space-1);
    z-index: 150;
    box-shadow: var(--shadow-lg);
}

.quick-menu.active {
    display: flex;
}

.quick-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-menu-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--glow-accent);
}

.quick-menu-licence:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px var(--glow-accent);
}

/* ============================================================================
   Tap Buttons
   ============================================================================ */

.tap-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tap-btn {
    min-width: 48px;
    min-height: 48px;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tap-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.tap-btn.selected {
    background: var(--gradient-accent);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px var(--glow-accent);
}

.tap-btn:active {
    transform: translateY(0);
}

/* ============================================================================
   Calculation Breakdown
   ============================================================================ */

.calc-breakdown {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-5) 0;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) 0;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}

.calc-row:last-child {
    border-bottom: none;
}

.calc-subtotal {
    font-weight: 600;
    color: var(--text-primary);
}

.calc-total {
    font-weight: 700;
    font-size: var(--text-base);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-total span:last-child {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-perparty {
    color: var(--text-muted);
    font-style: italic;
}

.calc-rush {
    color: #f59e0b;
}

/* ============================================================================
   Licence Items Table
   ============================================================================ */

.licence-items-table {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-3);
}

.licence-items-header {
    display: grid;
    grid-template-columns: 2fr 2fr 60px 80px 80px 32px;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg-solid);
    border-bottom: 1px solid var(--glass-border);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.licence-items-body {
    max-height: 240px;
    overflow-y: auto;
}

.licence-item-row {
    display: grid;
    grid-template-columns: 2fr 2fr 60px 80px 80px 32px;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--glass-border);
    align-items: center;
}

.licence-item-row:last-child {
    border-bottom: none;
}

.licence-item-row select,
.licence-item-row input {
    padding: var(--space-2);
    font-size: var(--text-sm);
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.licence-item-row select:focus,
.licence-item-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.licence-item-row input[type="number"] {
    text-align: right;
    font-family: var(--font-mono);
}

.licence-item-total {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    padding-right: var(--space-2);
}

.licence-item-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    opacity: 0.5;
    transition: all 0.15s ease;
}

.licence-item-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    opacity: 1;
}

.licence-items-table .btn-ghost {
    width: 100%;
    justify-content: center;
    border-radius: 0;
    border-top: 1px solid var(--glass-border);
}

/* ============================================================================
   Project Type Toggle & Compact Modal
   ============================================================================ */

.project-type-toggle {
    display: flex;
    gap: 2px;
    background: var(--glass-bg-solid);
    border-radius: var(--radius-md);
    padding: 2px;
    margin-bottom: var(--space-4);
}

.project-type-toggle .type-btn {
    flex: 1;
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.project-type-toggle .type-btn:hover {
    color: var(--text-primary);
}

.project-type-toggle .type-btn.active {
    background: var(--primary);
    color: white;
}

.form-group-title {
    margin-bottom: var(--space-4);
}

.input-title {
    font-size: var(--text-xl) !important;
    font-weight: 600 !important;
    padding: var(--space-3) var(--space-4) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--glass-border) !important;
    border-radius: 0 !important;
}

.input-title:focus {
    border-bottom-color: var(--primary) !important;
    outline: none;
}

.input-title::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-row-compact {
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.form-row-compact .form-group {
    margin-bottom: 0;
}

.form-row-compact label {
    font-size: 11px;
    margin-bottom: 2px;
}

.form-row-compact input,
.form-row-compact select {
    padding: var(--space-2);
    font-size: var(--text-sm);
}

.tap-buttons-compact {
    gap: var(--space-1);
}

.tap-buttons-compact .tap-btn {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    min-width: 36px;
}

.calc-breakdown-compact {
    padding: var(--space-3);
    margin: var(--space-3) 0;
}

.calc-breakdown-compact .calc-row {
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
}

/* ============================================================================
   Analytics Charts
   ============================================================================ */

.chart-container {
    padding: var(--space-5) 0;
}

.chart-container h3 {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    height: 180px;
    padding: var(--space-3) 0;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    height: 100%;
}

.bar-stack {
    flex: 1;
    width: 100%;
    max-width: 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    overflow: hidden;
}

.bar {
    width: 100%;
    min-height: 2px;
    transition: height 0.5s ease;
}

.bar-shoot {
    background: var(--gradient-accent);
}

.bar-licence {
    background: var(--gradient-purple);
}

.bar-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.chart-legend {
    display: flex;
    gap: var(--space-6);
    margin-top: var(--space-4);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-sm);
    margin-right: var(--space-2);
}

/* Split Bar */
.split-bar {
    display: flex;
    height: 10px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--glass-bg);
}

.split-shoot {
    background: var(--gradient-accent);
}

.split-licence {
    background: var(--gradient-purple);
}

/* Type Bar */
.type-bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--glass-border);
}

.type-bar-row:last-child {
    border-bottom: none;
}

.type-bar-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.type-bar-track {
    height: 8px;
    background: var(--glass-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.type-bar-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.type-bar-value {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    text-align: right;
}

/* ============================================================================
   Animations
   ============================================================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Staggered card animations */
.card {
    animation: fadeInUp 0.5s ease forwards;
}

.stats-grid .stat-card:nth-child(1) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.2s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.25s; }

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 2.5rem;
    }

    body::before {
        animation: none;
        background-size: 100% 100%;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .navbar {
        height: auto;
        padding: var(--space-3) var(--space-4);
        flex-direction: column;
        gap: var(--space-3);
    }

    .nav-left {
        width: 100%;
        flex-direction: column;
        gap: var(--space-3);
    }

    .nav-links {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: var(--space-2);
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .page-header {
        flex-direction: column;
        gap: var(--space-4);
        align-items: flex-start;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        flex-direction: column;
    }

    .kanban-column {
        flex: none;
        width: 100%;
    }

    .estimate-row {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }

    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 90vh;
        transform: translateY(100%);
    }

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

    .tap-buttons {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-2);
        -webkit-overflow-scrolling: touch;
    }

    .tap-btn {
        flex-shrink: 0;
    }

    .card {
        backdrop-filter: blur(10px);
    }

    .quick-menu {
        right: var(--space-4);
    }

    .type-bar-row {
        grid-template-columns: 80px 1fr 60px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-value {
        font-size: var(--text-2xl);
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================================
   Dashboard Layout
   ============================================================================ */

.dashboard {
    padding: var(--space-6);
    max-width: 1600px;
    margin: 0 auto;
}

/* Bento Grid - 6 columns */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: var(--space-4);
}

/* Card size utilities */
.card-1x1 { grid-column: span 1; grid-row: span 1; }
.card-2x1 { grid-column: span 2; grid-row: span 1; }
.card-2x2 { grid-column: span 2; grid-row: span 2; }
.card-2x3 { grid-column: span 2; grid-row: span 3; }
.card-3x2 { grid-column: span 3; grid-row: span 2; }
.card-4x2 { grid-column: span 4; grid-row: span 2; }
.card-1x2 { grid-column: span 1; grid-row: span 2; }
.card-1x3 { grid-column: span 1; grid-row: span 3; }
.card-6x1 { grid-column: span 6; grid-row: span 1; }

/* Legacy grid support */
.dashboard-grid {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.dashboard-top {
    grid-template-columns: 1fr 1.5fr 1fr;
}

.dashboard-top-4 {
    grid-template-columns: 1fr 1.2fr 1.5fr 1fr;
}

.dashboard-middle {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-bottom {
    grid-template-columns: 2fr 1fr;
}

/* Date Card */
.card-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-6);
}

/* Weather Card */
.card-weather {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-4);
}

.weather-current {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.weather-icon-lg {
    font-size: 2.5rem;
    line-height: 1;
}

.weather-info {
    display: flex;
    flex-direction: column;
}

.weather-temp {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.weather-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.weather-forecast {
    display: flex;
    gap: var(--space-1);
}

.forecast-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-2);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
}

.forecast-name {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.forecast-icon {
    font-size: 1.1rem;
}

.forecast-temps {
    display: flex;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
}

.forecast-high {
    color: var(--text-primary);
    font-weight: 600;
}

.forecast-low {
    color: var(--text-muted);
}

.weather-hourly {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.forecast-hour {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-2);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
}

.forecast-hour .forecast-temp {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

/* Weather NOW emphasis */
.forecast-now {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.forecast-now .forecast-name {
    color: var(--accent);
    font-weight: 600;
}

.forecast-now .forecast-temp {
    font-size: var(--text-lg);
    font-weight: 700;
}

.forecast-now .forecast-icon {
    font-size: 1.5rem;
}

.forecast-wind {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.forecast-wind-daily {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.7;
}

.forecast-wind-daily::after {
    content: ' m/s';
}

/* Weather later (muted) */
.forecast-later {
    opacity: 0.7;
}

.forecast-later .forecast-temp {
    font-size: var(--text-xs);
}

.forecast-later .forecast-icon {
    font-size: 1rem;
}

.date-display {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.date-day {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.date-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.date-month {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.date-weekday {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.date-time {
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    color: var(--text-secondary);
}

/* Revenue/Pipeline Cards */
.card-revenue,
.card-pipeline {
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
}

.card-revenue .card-header,
.card-pipeline .card-header {
    margin-bottom: var(--space-3);
}

.card-revenue .stat-value,
.card-pipeline .stat-value {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
}

.stat-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-accent {
    color: var(--accent-secondary);
}

.stat-trend {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

.stat-trend-up {
    color: #10b981;
}

.stat-trend-down {
    color: #ef4444;
}

.stat-trend-flat {
    color: var(--text-muted);
}

.filter-select {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Activity Lists */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--glass-bg-hover);
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.activity-date {
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.activity-date .date-num {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    line-height: 1;
}

.activity-date .date-mon {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
}

.activity-date.date-tbc {
    position: relative;
}

.date-tbc-badge {
    display: block;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    margin-bottom: 2px;
}

.activity-tbc {
    opacity: 0.8;
    border-left: 2px solid #f59e0b;
    padding-left: calc(var(--space-4) - 2px);
}

.activity-time {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-left: var(--space-2);
}

.activity-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    color: var(--accent);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 500;
    color: var(--text-primary);
}

.activity-meta {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.activity-meta .badge {
    font-size: var(--text-xs);
    padding: 2px 6px;
}

.activity-time {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    flex-shrink: 0;
}

.activity-badge {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    padding: var(--space-1) var(--space-2);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
}

.activity-badge.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.quick-stat {
    text-align: center;
    padding: var(--space-4);
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.quick-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    word-break: break-word;
    line-height: 1.2;
}

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

/* Bar Chart */
.card-chart {
    min-height: 300px;
}

.chart-container {
    height: 200px;
    display: flex;
    flex-direction: column;
}

.bar-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: var(--space-2);
    padding-bottom: var(--space-4);
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.bar-stack {
    width: 100%;
    max-width: 40px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.5s ease;
}

.bar-shoot {
    background: var(--gradient-accent);
}

.bar-licence {
    background: var(--accent-secondary);
    border-radius: 0;
}

.bar-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-2);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    padding-top: var(--space-3);
    border-top: 1px solid var(--glass-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-shoot {
    background: var(--gradient-accent);
}

.legend-licence {
    background: var(--accent-secondary);
}

/* ============================================================================
   Bento Dashboard Cards
   ============================================================================ */

/* Next Up Card (2x1) */
.card-next-up {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
}

.next-up-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.next-up-content {
    flex: 1;
    min-width: 0;
}

.next-up-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.next-up-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.next-up-meta {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.next-up-countdown {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    color: var(--accent);
    flex-shrink: 0;
}

.next-up-countdown.urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.next-up-countdown.soon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Next Up Stacked Card */
.card-next-up-stacked {
    display: flex;
    flex-direction: column;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
}

.card-next-up-stacked .next-up-main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
}

.card-next-up-stacked .next-up-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
}

.next-up-upcoming {
    display: flex;
    gap: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

.next-up-mini {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
}

.next-up-mini:hover {
    color: var(--text-primary);
}

.next-up-mini-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.next-up-mini-date {
    font-family: var(--font-mono);
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Pipeline Card (2x1) */
.card-pipeline-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    padding: var(--space-4);
}

.pipeline-column {
    display: flex;
    flex-direction: column;
    padding: var(--space-3);
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.pipeline-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.pipeline-value {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
}

.pipeline-to-invoice .pipeline-value {
    color: #f59e0b;
}

.pipeline-unpaid .pipeline-value {
    color: var(--accent-secondary);
}

.pipeline-unpaid.has-overdue .pipeline-value {
    color: #ef4444;
}

.pipeline-count {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.pipeline-total {
    grid-column: span 2;
    text-align: center;
    padding-top: var(--space-2);
    border-top: 1px solid var(--glass-border);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pipeline-total strong {
    color: var(--text-primary);
    font-family: var(--font-display);
}

/* Pipeline Stacked Card (1x1) */
.card-pipeline-stacked {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
}

.pipeline-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
}

.pipeline-row .pipeline-value {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: #f59e0b;
}

.pipeline-row .pipeline-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin: 0;
}

.pipeline-row:last-child .pipeline-value {
    color: var(--accent-secondary);
}

.pipeline-row.has-overdue .pipeline-value {
    color: #ef4444;
}

/* Invoices Card */
.card-invoices {
    display: flex;
    flex-direction: column;
}

.invoice-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.invoice-stat {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
}

.invoice-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--accent);
}

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

.invoice-overdue .invoice-stat-value {
    color: #ef4444;
}

.invoice-total {
    margin-top: auto;
    padding: var(--space-3);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    text-align: center;
}

.invoice-total-value {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.invoice-total-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Scrollable Card Content (2x2 cards) */
.card-scrollable {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-scrollable .activity-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 calc(var(--space-4) * -1);
    padding: 0 var(--space-4);
}

/* Needs Attention Card */
.attention-list {
    display: flex;
    flex-direction: column;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.attention-item:hover {
    background: var(--glass-bg-hover);
}

.attention-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.attention-icon.warning {
    background: rgba(245, 158, 11, 0.15);
}

.attention-icon.critical {
    background: rgba(239, 68, 68, 0.15);
}

.attention-content {
    flex: 1;
    min-width: 0;
}

.attention-title {
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attention-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.attention-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.attention-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.attention-badge.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Unscheduled Card */
.unscheduled-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
    border-left: 3px solid #f59e0b;
    margin-left: var(--space-2);
}

.unscheduled-item:hover {
    background: var(--glass-bg-hover);
}

.unscheduled-content {
    flex: 1;
    min-width: 0;
}

.unscheduled-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.unscheduled-client {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.unscheduled-days {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    padding: var(--space-1) var(--space-2);
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* Invoices Card (1x2 - tall narrow) */
.card-invoices-tall {
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
}

.invoices-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.invoice-stat {
    text-align: center;
    padding: var(--space-4);
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.invoice-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
}

.invoice-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
}

.invoice-stat.unpaid .invoice-stat-value {
    color: var(--accent-secondary);
}

.invoice-stat.overdue .invoice-stat-value {
    color: #ef4444;
}

.invoice-stat.overdue {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.invoices-list-mini {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.invoice-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.invoice-mini-number {
    font-family: var(--font-mono);
}

.invoice-mini-amount {
    color: #ef4444;
}

/* Revenue Chart (3x2) */
.card-revenue-chart {
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
}

.revenue-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.revenue-ytd {
    text-align: right;
}

.revenue-ytd-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
}

.revenue-ytd-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quarterly-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    min-height: 180px;
}

.quarter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 100px;
}

.quarter-bars {
    display: flex;
    gap: var(--space-1);
    height: 150px;
    align-items: flex-end;
}

.quarter-bar {
    width: 24px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.5s ease;
}

.quarter-bar.current-year {
    background: var(--gradient-accent);
}

.quarter-bar.prev-year {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.quarter-label {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-2);
}

.chart-legend-inline {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    padding-top: var(--space-3);
    border-top: 1px solid var(--glass-border);
}

/* Recent Activity Timeline (6x1) */
.card-activity-timeline {
    padding: var(--space-3) var(--space-4);
}

.activity-timeline {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-2);
}

.activity-timeline::-webkit-scrollbar {
    height: 4px;
}

.activity-timeline::-webkit-scrollbar-track {
    background: var(--glass-bg);
    border-radius: 2px;
}

.activity-timeline::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.timeline-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
    min-width: 0;
    max-width: 220px;
}

.timeline-item:hover {
    background: var(--glass-bg-hover);
}

.timeline-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.timeline-content {
    min-width: 0;
}

.timeline-title {
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.timeline-meta .badge {
    font-size: 9px;
    padding: 1px 4px;
}

/* Empty State for Bento Cards */
.bento-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    text-align: center;
    color: var(--text-muted);
    height: 100%;
}

.bento-empty-icon {
    font-size: 2rem;
    margin-bottom: var(--space-2);
    opacity: 0.5;
}

.bento-empty-text {
    font-size: var(--text-sm);
}

/* Card Header with Badge Count */
.card-header-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-count {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--accent);
    color: white;
    border-radius: 9999px;
}

.header-count.warning {
    background: #f59e0b;
}

.header-count.critical {
    background: #ef4444;
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    z-index: 100;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: none;
    color: white;
    font-size: var(--text-2xl);
    cursor: pointer;
    box-shadow: 0 4px 20px var(--glow-accent);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--glow-accent);
}

.fab.active {
    transform: rotate(45deg);
}

.fab-icon {
    transition: transform 0.3s ease;
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fab-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent);
}

.fab-item-licence {
    border-color: var(--accent-secondary);
}

.fab-item-licence:hover {
    border-color: var(--accent-secondary);
}

/* Location Map */
.location-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: var(--space-3);
    align-items: start;
}

.location-input {
    flex: 1;
}

.location-map-inline {
    width: 150px;
    height: 100px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.location-map {
    height: 150px;
    border-radius: var(--radius-md);
    margin-top: var(--space-3);
    background: var(--glass-bg);
    display: none;
}

.location-map.leaflet-container {
    display: block;
}

@media (max-width: 480px) {
    .location-row {
        grid-template-columns: 1fr;
    }

    .location-map-inline {
        width: 100%;
        height: 120px;
    }
}

/* Tap Button Variants */
.tap-buttons-wrap {
    flex-wrap: wrap;
}

.tap-buttons-secondary {
    margin-top: var(--space-2);
    opacity: 0.7;
}

.tap-btn-sm {
    min-width: 40px;
    min-height: 40px;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
}

.tap-btn-pill {
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    min-width: auto;
    min-height: auto;
}

.tap-btn-xs {
    padding: 4px 10px;
    font-size: 10px;
    min-width: auto;
    min-height: 28px;
}

.tap-btn-toggle {
    background: transparent;
    border: 1px dashed var(--glass-border);
    color: var(--text-muted);
    min-width: 36px;
}

.tap-btn-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.tap-buttons-compact {
    gap: 4px;
}

.tap-buttons-compact .tap-btn {
    padding: 4px 10px;
    font-size: 10px;
    min-width: auto;
    min-height: 28px;
}

/* Inline Client Form */
.inline-client-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.inline-client-form .form-group {
    margin-bottom: var(--space-3);
}

.inline-client-form .form-row {
    margin-bottom: var(--space-2);
}

.btn-group {
    display: flex;
    gap: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    background: var(--glass-bg);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* Project Map */
.project-map {
    height: 200px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    overflow: hidden;
}

/* ============================================================================
   Compact Kanban Board
   ============================================================================ */

.container-full {
    width: 100%;
    padding: 0 var(--space-4);
    max-width: 100%;
}

.kanban-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--glass-border);
}

.kanban-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.kanban-title-row h1 {
    font-size: var(--text-xl);
    margin: 0;
}

.kanban-filters-inline {
    display: flex;
    gap: var(--space-1);
}

.kf {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.kf:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.kf.active {
    background: var(--gradient-accent);
    color: white;
}

.kf-licence.active {
    background: var(--gradient-purple);
}

/* Compact Board */
.kanban-board-compact {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: var(--space-4);
    min-height: calc(100vh - 180px);
}

.kcolumn {
    flex: 1 1 0;
    min-width: 180px;
    max-width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.kcolumn:nth-child(1) { background: rgba(139, 92, 246, 0.03); }
.kcolumn:nth-child(2) { background: rgba(245, 158, 11, 0.03); }
.kcolumn:nth-child(3) { background: rgba(16, 185, 129, 0.03); }
.kcolumn:nth-child(4) { background: rgba(59, 130, 246, 0.03); }
.kcolumn:nth-child(5) { background: rgba(139, 92, 246, 0.03); }
.kcolumn:nth-child(6) { background: rgba(236, 72, 153, 0.03); }
.kcolumn:nth-child(7) { background: rgba(100, 100, 100, 0.03); }

.kcolumn-empty {
    opacity: 0.6;
}

.kcolumn-empty .kcolumn-cards {
    min-height: 40px;
}

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

.kcolumn-name {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.kcolumn-count {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 1px 5px;
    border-radius: var(--radius-full);
}

.kcolumn-cards {
    flex: 1;
    padding: 4px;
    overflow-y: auto;
    min-height: 100px;
}

.kcolumn-cards.drag-over {
    background: var(--glass-bg-hover);
}

/* Compact Cards */
.kcard {
    position: relative;
    display: block;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: grab;
    transition: all 0.15s ease;
    color: inherit;
}

.kcard-link {
    display: block;
    padding: 6px 8px;
    padding-right: 28px;
    text-decoration: none;
    color: inherit;
}

.kcard:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.kcard.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.kcard-licence {
    border-left: 2px solid var(--accent-secondary);
}

/* Archive/Restore button on cards */
.kcard-archive,
.kcard-restore {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kcard:hover .kcard-archive,
.kcard:hover .kcard-restore {
    opacity: 0.6;
}

.kcard-archive:hover {
    opacity: 1 !important;
    background: var(--success);
    color: white;
}

.kcard-restore:hover {
    opacity: 1 !important;
    background: var(--accent);
    color: white;
}

/* Archive View */
.archive-filters {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.archive-search {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.archive-search input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.archive-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--glow-accent);
}

.archive-search input::placeholder {
    color: var(--text-muted);
}

.archive-year-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.year-btn {
    padding: var(--space-1) var(--space-3);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all 0.15s ease;
}

.year-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent);
}

.year-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.archive-count {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-left: auto;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}

.archive-grid .kcard {
    margin-bottom: 0;
}

.archive-grid .kcard-restore {
    opacity: 0.4;
}

.kcard-year {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 1px 4px;
    border-radius: 2px;
}

.kcard-top {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 2px;
}

.kcard-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kcard-cat {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    color: white;
    padding: 1px 3px;
    border-radius: 2px;
    line-height: 1;
}

.kcard-client {
    font-size: 10px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.kcard-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.kcard-due {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 2px;
}

.kcard-due.due-overdue {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.kcard-due.due-today {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.kcard-due.due-soon {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.kcard-due.due-week {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.kcard-due.due-later {
    color: var(--text-muted);
}

.kcard-due.due-none {
    color: var(--text-muted);
    font-style: italic;
}

.kcard-meta {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-secondary);
    display: flex;
    gap: 4px;
}

.kcard-tbc {
    border-color: rgba(245, 158, 11, 0.3);
}

.kcard-tbc-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 4px;
    font-weight: 600;
    vertical-align: middle;
}

.kcard-time {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Kanban Responsive */
@media (max-width: 1440px) {
    .kcolumn {
        flex: 0 0 170px;
        min-width: 170px;
    }
}

@media (max-width: 1200px) {
    .dashboard-top-4 {
        grid-template-columns: 1fr 1fr;
    }

    .kcolumn {
        flex: 0 0 160px;
        min-width: 160px;
    }
}

@media (max-width: 768px) {
    .kanban-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .kanban-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .kanban-board-compact {
        flex-direction: column;
    }

    .kcolumn {
        flex: none;
        width: 100%;
        min-width: 100%;
    }

    .kcolumn-empty {
        display: none;
    }
}

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

    body::before {
        animation: none;
    }
}

/* Dashboard Responsive */
@media (max-width: 1400px) {
    /* Bento grid - 4 columns on medium screens */
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .card-6x1 { grid-column: span 4; }
    .card-3x2 { grid-column: span 2; }
}

@media (max-width: 1024px) {
    .dashboard-top,
    .dashboard-middle {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-bottom {
        grid-template-columns: 1fr;
    }

    .card-date {
        grid-column: span 2;
    }

    /* Bento grid - 2 columns on tablets */
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-1x1 { grid-column: span 1; }
    .card-2x1 { grid-column: span 2; }
    .card-2x2 { grid-column: span 2; }
    .card-3x2 { grid-column: span 2; }
    .card-1x2 { grid-column: span 1; }
    .card-6x1 { grid-column: span 2; }
}

@media (max-width: 768px) {
    .dashboard {
        padding: var(--space-4);
    }

    .dashboard-top,
    .dashboard-top-4,
    .dashboard-middle,
    .dashboard-bottom {
        grid-template-columns: 1fr;
    }

    .card-date,
    .card-weather {
        grid-column: span 1;
    }

    .date-day {
        font-size: var(--text-3xl);
    }

    .fab-container {
        bottom: var(--space-6);
        right: var(--space-4);
    }

    /* Bento grid - single column on mobile */
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .card-1x1,
    .card-2x1,
    .card-2x2,
    .card-3x2,
    .card-1x2,
    .card-6x1 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .card-2x2,
    .card-3x2 {
        min-height: 280px;
    }

    .card-1x2 {
        min-height: 200px;
    }

    /* Stack Next Up card content vertically */
    .card-next-up {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .next-up-countdown {
        align-self: flex-end;
    }

    /* Horizontal scroll for activity timeline */
    .activity-timeline {
        flex-wrap: nowrap;
    }
}

/* ============================================================================
   Top Navigation
   ============================================================================ */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 10, 26, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    z-index: 100;
}

.top-nav-inner {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    gap: var(--space-8);
}

.top-nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

.top-nav-logo span {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex: 1;
}

.top-nav-link {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.15s ease;
}

.top-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.top-nav-link.active {
    background: var(--accent);
    color: #000;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Search button in nav */
.nav-search-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 200px;
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: var(--text-sm);
}

.nav-search-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--glow-accent);
}

.nav-search-text {
    flex: 1;
    text-align: left;
    color: rgba(255, 255, 255, 0.5);
}

.nav-search-hint {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.5);
}

/* Icon buttons in nav */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-icon-btn.active {
    color: var(--accent);
}

/* Theme toggle icons */
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }
[data-theme="light"] .theme-icon-light { display: block; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* Quick add button */
.quick-add-wrapper {
    position: relative;
}

.quick-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px var(--glow-accent);
}

.quick-add-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 200px;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 200;
}

.quick-add-wrapper:hover .quick-add-dropdown,
.quick-add-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-add-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all 0.15s ease;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.quick-add-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.quick-add-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.quick-add-item:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.quick-add-shortcut {
    margin-left: auto;
    padding: 2px 6px;
    background: var(--glass-bg);
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* Notifications dropdown */
.notifications-wrapper {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: white;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--glass-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.notifications-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.notifications-header h4 {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-empty {
    padding: var(--space-6);
    text-align: center;
    color: var(--text-muted);
}

.notification-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: var(--glass-bg-hover);
}

.notification-item.unread {
    background: rgba(139, 92, 246, 0.08);
}

.notification-item.unread:hover {
    background: rgba(139, 92, 246, 0.12);
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon-invoice_paid {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.notification-icon-estimate_viewed {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 500;
    font-size: var(--text-sm);
    margin-bottom: 2px;
}

.notification-message {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notifications-footer {
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.notifications-footer a {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-decoration: none;
}

.notifications-footer a:hover {
    color: var(--primary);
}

/* Main content with top nav */
.main-content {
    padding-top: 60px;
    min-height: 100vh;
}

.main-content-guest {
    padding-top: 0;
}

/* ============================================================================
   Filters & Form Elements
   ============================================================================ */

.filters-card {
    padding: var(--space-4);
    margin-bottom: var(--space-6);
}

.filters-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.filter-item {
    flex-shrink: 0;
}

.filter-item.filter-search {
    flex: 1;
    min-width: 200px;
}

.form-select,
.form-input {
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    transition: all 0.15s ease;
    min-width: 150px;
}

.form-select {
    appearance: none;
    padding-right: var(--space-8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-2) center;
    cursor: pointer;
}

.form-input {
    width: 100%;
}

.form-select:hover,
.form-input:hover {
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-hover);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow-accent);
}

.form-select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: var(--space-2);
}

/* Table Card */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table-card .data-table {
    margin: 0;
}

/* Empty State Card */
.empty-state-card {
    padding: var(--space-12);
}

.empty-state {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    margin-bottom: var(--space-6);
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* Icon Button */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.btn-icon.btn-danger:hover {
    color: var(--urgency-overdue);
    background: rgba(239, 68, 68, 0.1);
}

/* Table Title */
.table-title {
    font-weight: 500;
    color: var(--text-primary);
}

/* Actions Cell */
.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn-icon {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.clickable-row:hover .actions-cell .btn-icon {
    opacity: 1;
}

/* Stat Card Icon positioning */
.stat-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.25s ease;
}

.stat-card-icon {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    opacity: 0.5;
    color: var(--card-text-muted);
}

.stat-card-value {
    font-size: var(--text-4xl);
    font-weight: 800;
    font-family: var(--font-display);
    line-height: 1;
    margin-bottom: var(--space-2);
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-label {
    font-size: var(--text-xs);
    color: var(--card-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--glass-border-hover);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 16px 48px rgba(0, 0, 0, 0.25),
        0 0 80px rgba(139, 92, 246, 0.2);
}

/* ============================================================================
   Command Palette - Dark Alfred Style
   ============================================================================ */

.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.command-palette-overlay.open {
    opacity: 1;
    visibility: visible;
}

.command-palette-modal {
    width: 100%;
    max-width: 600px;
    background: rgba(25, 20, 45, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.1),
        0 25px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    max-height: 500px;
    transform: scale(0.95) translateY(-10px);
    transition: transform 0.2s ease;
}

.command-palette-overlay.open .command-palette-modal {
    transform: scale(1) translateY(0);
}

.command-palette-modal input {
    width: 100%;
    padding: 18px 20px;
    font-size: 18px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    font-family: var(--font-body);
    background: transparent;
    color: #f3f4f6;
}

.command-palette-modal input:focus {
    border-bottom-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 1px 0 0 rgba(139, 92, 246, 0.2);
}

.command-palette-modal input::placeholder {
    color: #6b7280;
}

.command-palette-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.command-palette-results::-webkit-scrollbar {
    width: 6px;
}

.command-palette-results::-webkit-scrollbar-track {
    background: transparent;
}

.command-palette-results::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
}

.command-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    padding: 14px 20px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.command-item {
    padding: 10px 20px;
    margin: 0 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #d1d5db;
    transition: all 0.15s ease;
}

.command-item:hover,
.command-item.selected {
    background: rgba(139, 92, 246, 0.2);
    color: #fff;
}

.command-item span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.command-item .command-icon {
    color: #a78bfa;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.command-item span:last-child:not(:first-child) {
    color: #6b7280;
    font-size: 12px;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.command-item .text-muted {
    color: #6b7280;
    font-size: 12px;
    background: none;
    padding: 0;
}

/* Recent items section */
.command-recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.command-recent-item .recent-icon {
    color: #a78bfa;
    font-size: 14px;
}

.command-recent-item .recent-type {
    font-size: 10px;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: auto;
}

/* Quick Entry Card Styles */
.quick-entry-card {
    margin: 8px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.quick-entry-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.quick-entry-icon {
    font-size: 18px;
}

.quick-entry-title {
    font-weight: 600;
    color: #e5e7eb;
    font-size: 14px;
}

.quick-entry-form {
    padding: 12px 16px;
}

.quick-entry-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-entry-row:last-child {
    border-bottom: none;
}

.field-label {
    width: 70px;
    flex-shrink: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    padding-top: 2px;
}

.field-value-wrapper {
    flex: 1;
    position: relative;
}

.field-value {
    color: #f3f4f6;
    font-size: 14px;
}

.field-value.empty {
    color: #6b7280;
    font-style: italic;
}

.quick-entry-badge {
    display: inline-block;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 8px;
    vertical-align: middle;
}

.quick-entry-badge.existing {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.quick-entry-badge.new-client {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Client Suggestions Dropdown */
.client-suggestions {
    position: absolute;
    top: 100%;
    left: -8px;
    right: -8px;
    background: rgba(30, 25, 55, 0.98);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    margin-top: 6px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.client-suggestion {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.client-suggestion:last-child {
    border-bottom: none;
}

.client-suggestion:hover,
.client-suggestion.highlighted {
    background: rgba(139, 92, 246, 0.3);
}

.client-suggestion .company-name {
    color: #f3f4f6;
    font-size: 14px;
}

.client-suggestion .company-type {
    color: #9ca3af;
    font-size: 12px;
}

.quick-entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-entry-footer .hint {
    font-size: 12px;
    color: #9ca3af;
}

.quick-entry-footer .hint.muted {
    color: #6b7280;
}

.quick-entry-footer kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #d1d5db;
    margin-right: 4px;
}

/* Quick Entry Help */
.quick-entry-help {
    padding: 20px;
    text-align: center;
}

.quick-entry-help .help-title {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.quick-entry-help p {
    color: #9ca3af;
    margin: 0 0 16px 0;
}

.quick-entry-help code {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.quick-entry-help .help-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-entry-help .example {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 6px;
}

.quick-entry-help .help-hint {
    font-size: 13px;
    color: #6b7280;
}

/* ============================================================================
   Status Badges (consistent colors)
   ============================================================================ */

.status-incoming { --status-color: var(--status-incoming); }
.status-discussion { --status-color: var(--status-discussion); }
.status-planned { --status-color: var(--status-planned); }
.status-shot { --status-color: var(--status-shot); }
.status-editing { --status-color: var(--status-editing); }
.status-invoice { --status-color: var(--status-invoice); }
.status-archived { --status-color: var(--status-archived); }

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    background: color-mix(in srgb, var(--status-color) 20%, transparent);
    color: var(--status-color);
    border: 1px solid color-mix(in srgb, var(--status-color) 30%, transparent);
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-color);
}

/* Urgency indicators */
.urgency-safe { border-left: 3px solid var(--urgency-safe); }
.urgency-soon { border-left: 3px solid var(--urgency-soon); }
.urgency-urgent { border-left: 3px solid var(--urgency-urgent); }
.urgency-overdue { border-left: 3px solid var(--urgency-overdue); }

.urgency-overdue {
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

/* Estimate status badges */
.badge-estimate-draft { background: rgba(107, 114, 128, 0.15); color: var(--estimate-draft); }
.badge-estimate-sent { background: rgba(59, 130, 246, 0.15); color: var(--estimate-sent); }
.badge-estimate-accepted { background: rgba(34, 197, 94, 0.15); color: var(--estimate-accepted); }
.badge-estimate-declined { background: rgba(239, 68, 68, 0.15); color: var(--estimate-declined); }
.badge-estimate-expired { background: rgba(249, 115, 22, 0.15); color: var(--estimate-expired); }

/* ============================================================================
   Quick Add Menu
   ============================================================================ */

.quick-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-size: var(--text-xl);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.quick-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.quick-add-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 200px;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.quick-add-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-add-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.1s ease;
}

.quick-add-item:hover {
    background: var(--glass-bg-hover);
}

.quick-add-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* ============================================================================
   Enhanced Cards (floating on dark, high contrast)
   ============================================================================ */

.card-floating {
    background: var(--card-bg, var(--glass-bg-solid));
    color: var(--card-text, var(--text-primary));
    border-radius: var(--radius-xl);
    box-shadow: var(--card-shadow, var(--shadow-lg));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-floating::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(139, 92, 246, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card-floating:hover {
    transform: translateY(-4px) rotateX(2deg);
    box-shadow: var(--shadow-lg), 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-floating .card-text-secondary {
    color: var(--card-text-secondary, var(--text-secondary));
}

/* ============================================================================
   Micro-interactions
   ============================================================================ */

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

.btn-primary {
    background: var(--gradient-accent);
    border: none;
    color: #000;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

/* Checkbox animation */
input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkBounce 0.2s ease;
}

@keyframes checkBounce {
    0% { transform: rotate(45deg) scale(0); }
    50% { transform: rotate(45deg) scale(1.2); }
    100% { transform: rotate(45deg) scale(1); }
}

/* Modal animations */
.modal {
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================================
   Empty States
   ============================================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-10);
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.empty-state p {
    margin-bottom: var(--space-4);
}

.empty-state .btn {
    margin-top: var(--space-2);
}

/* ============================================================================
   Confirmation Dialog
   ============================================================================ */

.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.confirm-dialog-overlay.open {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    width: 100%;
    max-width: 400px;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    padding: var(--space-6);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.confirm-dialog-overlay.open .confirm-dialog {
    transform: scale(1);
}

.confirm-dialog h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.confirm-dialog p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.confirm-dialog-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.confirm-dialog .btn-cancel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.confirm-dialog .btn-confirm-danger {
    background: #ef4444;
    color: white;
}

/* ============================================================================
   Data Tables (inside white cards)
   ============================================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.data-table th,
.data-table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    color: var(--card-text);
}

.data-table th {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--card-text-muted);
    background: rgba(139, 92, 246, 0.05);
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.08);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Text Utility Colors */
.text-error {
    color: var(--accent-rose, #f43f5e);
}

.text-success {
    color: var(--accent-emerald, #10b981);
}

.text-warning {
    color: var(--accent-amber, #f59e0b);
}

.text-orange {
    color: var(--accent-orange, #f97316);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--card-text-secondary);
}

.btn-ghost:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: transparent;
    color: var(--card-text);
}

/* Empty State inside cards */
.card .empty-state h3 {
    color: var(--card-text);
}

.card .empty-state p {
    color: var(--card-text-secondary);
}

.card .empty-state-icon {
    color: var(--card-text-muted);
}

/* Badge styles for inside white cards */
.badge-muted {
    background: rgba(107, 114, 128, 0.2);
    color: rgba(156, 163, 175, 1);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-error {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Light theme badge overrides */
[data-theme="light"] .badge-muted { color: #4b5563; }
[data-theme="light"] .badge-info { color: #2563eb; }
[data-theme="light"] .badge-success { color: #059669; }
[data-theme="light"] .badge-error { color: #dc2626; }
[data-theme="light"] .badge-warning { color: #d97706; }

/* Clickable Row */
.clickable-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.clickable-row:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ============================================================================
   Modern 2026 Utilities
   ============================================================================ */

/* Gradient text for key numbers */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-emerald {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Large display numbers */
.text-display {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1;
}

.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-7xl { font-size: 4.5rem; }

/* Subtle glow on hover */
.hover-glow:hover {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* Glass surface for overlays */
.glass-surface {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Accent border glow */
.border-glow {
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.1),
        0 0 20px rgba(139, 92, 246, 0.15);
}

/* Smooth inner gradient */
.card-gradient {
    background: linear-gradient(
        180deg,
        var(--card-bg) 0%,
        rgba(139, 92, 246, 0.03) 100%
    );
}

/* Dashboard Settings Button */
.dashboard-settings-btn {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.dashboard-settings-btn:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    transform: rotate(45deg);
}

.dashboard {
    position: relative;
}

/* Dashboard Minimap */
.modal-wide {
    max-width: 600px;
}

.dashboard-minimap {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 48px);
    gap: 8px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.minimap-card {
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 2px solid transparent;
}

.minimap-card:hover {
    transform: scale(1.02);
    border-color: var(--text);
}

.minimap-card.minimap-hidden {
    background: var(--glass-bg);
    opacity: 0.4;
}

.minimap-card.minimap-hidden .minimap-label {
    text-decoration: line-through;
    opacity: 0.6;
}

.minimap-label {
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-align: center;
    padding: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.minimap-card.minimap-hidden .minimap-label {
    color: var(--text-muted);
    text-shadow: none;
}

.minimap-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.minimap-card.minimap-hidden .minimap-toggle {
    background: var(--border);
}

.minimap-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.minimap-card.minimap-hidden .minimap-toggle::after {
    display: none;
}

/* Portal deliverable status badges */
.portal-status-gallery { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.portal-status-download { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.portal-status-preview { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.portal-status-other { background: var(--glass-bg); color: var(--text-muted); }

/* Deliverables Section */
.deliverable-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3);
    border-bottom: 1px solid var(--card-border);
    transition: background 0.2s;
}

.deliverable-item:last-child {
    border-bottom: none;
}

.deliverable-item:hover {
    background: var(--glass-bg);
}

.deliverable-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-primary);
    text-decoration: none;
    flex: 1;
}

.deliverable-link:hover {
    color: var(--accent);
}

.deliverable-link svg {
    opacity: 0.5;
}

.deliverable-link:hover svg {
    opacity: 1;
}

.deliverable-type-badge {
    font-size: var(--text-xs);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.deliverable-type-badge.badge-gallery { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.deliverable-type-badge.badge-download { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.deliverable-type-badge.badge-preview { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.deliverable-type-badge.badge-other { background: var(--glass-bg); color: var(--text-muted); }

.deliverable-title {
    font-weight: 500;
}

.deliverable-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.deliverable-visibility {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.deliverable-visibility input {
    display: none;
}

.visibility-icon {
    font-size: 16px;
    opacity: 0.7;
}

.deliverable-visibility:hover .visibility-icon {
    opacity: 1;
}

.btn-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Status Timeline (Mini) */
.status-timeline {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 100px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glass-bg);
    transition: all 0.2s;
}

.status-dot.completed {
    background: var(--accent);
}

.status-dot.current {
    width: 12px;
    height: 12px;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Status-specific colors for current dot */
.status-dot.current.status-incoming {
    background: #a78bfa;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}
.status-dot.current.status-discussion {
    background: #fcd34d;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}
.status-dot.current.status-confirmed {
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}
.status-dot.current.status-shot {
    background: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
.status-dot.current.status-editing {
    background: #c4b5fd;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}
.status-dot.current.status-to_invoice {
    background: #f472b6;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3);
}
.status-dot.current.status-archive {
    background: var(--text-muted);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.3);
}

/* Tooltip for status dots */
.status-dot[data-tooltip] {
    position: relative;
}
.status-dot[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 4px;
}

/* Tooltip for status timeline */
.status-timeline[title] {
    cursor: pointer;
}

/* Search indicator (loading spinner) */
.search-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Outcome Options (Archive Modal) */
.outcome-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.outcome-option {
    display: block;
    cursor: pointer;
}

.outcome-option input {
    display: none;
}

.outcome-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.15s;
}

.outcome-option:hover .outcome-label {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

.outcome-option.selected .outcome-label,
.outcome-option input:checked + .outcome-label {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.outcome-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.modal-sm {
    max-width: 420px;
}

/* Inline Edit Row */
.inline-edit-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-edit-row input {
    width: 120px;
}

.btn-ghost {
    background: transparent;
    border: none;
    padding: 4px 6px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.btn-ghost:hover {
    opacity: 1;
    background: transparent;
}

/* Location Details Grid */
.location-details-grid {
    display: grid;
    gap: 16px;
    background: var(--glass-bg);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.location-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-detail-item .detail-value {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.location-detail-item textarea,
.location-detail-item input {
    width: 100%;
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    position: relative;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid;
}

.tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.6;
    color: inherit;
    padding: 0;
    margin-left: 2px;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-add-btn {
    font-size: 12px;
    padding: 4px 10px;
}

.tag-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 250px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tag-dropdown input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    padding: 10px 12px;
    background: transparent;
}

.tag-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.tag-dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.1s;
}

.tag-dropdown-item:hover {
    background: var(--glass-bg);
}

.tag-dropdown-item.tag-create {
    color: var(--accent);
    font-weight: 500;
}

.tags-edit-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tags-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-add-wrapper {
    position: relative;
}

.tag-dropdown-edit {
    position: absolute;
    top: 100%;
    left: 0;
}
