/* ═══════════════════════════════════════════════════════════════════════════
   BOOKINGPIPELINE DESIGN SYSTEM v2.0
   Premium, trust-building aesthetic inspired by Linear, Stripe, and Apple
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* ─────────────────────────────────────────────────────────────────────────
       COLOR TOKENS
       ───────────────────────────────────────────────────────────────────────── */
    
    /* Primary Brand - Deep trustworthy blue */
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-300: #93c5fd;
    --color-primary-400: #60a5fa;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-800: #1e40af;
    --color-primary-900: #1e3a8a;
    
    /* Neutral - Slate gray scale for text and backgrounds */
    --color-neutral-0: #ffffff;
    --color-neutral-25: #fcfcfd;
    --color-neutral-50: #f8fafc;
    --color-neutral-100: #f1f5f9;
    --color-neutral-200: #e2e8f0;
    --color-neutral-300: #cbd5e1;
    --color-neutral-400: #94a3b8;
    --color-neutral-500: #64748b;
    --color-neutral-600: #475569;
    --color-neutral-700: #334155;
    --color-neutral-800: #1e293b;
    --color-neutral-900: #0f172a;
    --color-neutral-950: #020617;
    
    /* Success - Green */
    --color-success-50: #ecfdf5;
    --color-success-100: #d1fae5;
    --color-success-500: #10b981;
    --color-success-600: #059669;
    --color-success-700: #047857;
    
    /* Warning - Amber */
    --color-warning-50: #fffbeb;
    --color-warning-100: #fef3c7;
    --color-warning-500: #f59e0b;
    --color-warning-600: #d97706;
    --color-warning-700: #b45309;
    
    /* Error - Red */
    --color-error-50: #fef2f2;
    --color-error-100: #fee2e2;
    --color-error-500: #ef4444;
    --color-error-600: #dc2626;
    --color-error-700: #b91c1c;
    
    /* Info - Indigo */
    --color-info-50: #eef2ff;
    --color-info-100: #e0e7ff;
    --color-info-500: #6366f1;
    --color-info-600: #4f46e5;
    
    /* Legacy color aliases for backwards compatibility */
    --blue-50: var(--color-primary-50);
    --blue-100: var(--color-primary-100);
    --blue-500: var(--color-primary-500);
    --blue-600: var(--color-primary-600);
    --blue-700: var(--color-primary-700);
    --blue-800: var(--color-primary-800);
    --blue-900: var(--color-primary-900);
    
    --navy-700: var(--color-neutral-700);
    --navy-800: var(--color-neutral-800);
    --navy-900: var(--color-neutral-900);
    
    --gray-50: var(--color-neutral-50);
    --gray-100: var(--color-neutral-100);
    --gray-200: var(--color-neutral-200);
    --gray-300: var(--color-neutral-300);
    --gray-400: var(--color-neutral-400);
    --gray-500: var(--color-neutral-500);
    --gray-600: var(--color-neutral-600);
    --gray-700: var(--color-neutral-700);
    --gray-800: var(--color-neutral-800);
    --gray-900: var(--color-neutral-900);
    
    --green-50: var(--color-success-50);
    --green-100: var(--color-success-100);
    --green-500: var(--color-success-500);
    --green-600: var(--color-success-600);
    --green-700: var(--color-success-700);
    
    --red-50: var(--color-error-50);
    --red-100: var(--color-error-100);
    --red-500: var(--color-error-500);
    --red-600: var(--color-error-600);
    --red-700: var(--color-error-700);
    
    --yellow-50: var(--color-warning-50);
    --yellow-100: var(--color-warning-100);
    --yellow-500: var(--color-warning-500);
    --yellow-600: var(--color-warning-600);
    
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-600: #9333ea;
    --purple-700: #7e22ce;
    
    --indigo-50: var(--color-info-50);
    --indigo-100: var(--color-info-100);
    --indigo-600: var(--color-info-600);
    
    /* ─────────────────────────────────────────────────────────────────────────
       SPACING SCALE (4px base unit)
       ───────────────────────────────────────────────────────────────────────── */
    --space-0: 0;
    --space-px: 1px;
    --space-0-5: 0.125rem;  /* 2px */
    --space-1: 0.25rem;     /* 4px */
    --space-1-5: 0.375rem;  /* 6px */
    --space-2: 0.5rem;      /* 8px */
    --space-2-5: 0.625rem;  /* 10px */
    --space-3: 0.75rem;     /* 12px */
    --space-3-5: 0.875rem;  /* 14px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-7: 1.75rem;     /* 28px */
    --space-8: 2rem;        /* 32px */
    --space-9: 2.25rem;     /* 36px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-14: 3.5rem;     /* 56px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;       /* 80px */
    --space-24: 6rem;       /* 96px */
    
    /* ─────────────────────────────────────────────────────────────────────────
       TYPOGRAPHY SCALE
       ───────────────────────────────────────────────────────────────────────── */
    --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 'Cascadia Code', monospace;
    
    /* Font sizes */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.8125rem;   /* 13px */
    --text-base: 0.875rem;  /* 14px */
    --text-md: 0.9375rem;   /* 15px */
    --text-lg: 1rem;        /* 16px */
    --text-xl: 1.125rem;    /* 18px */
    --text-2xl: 1.25rem;    /* 20px */
    --text-3xl: 1.5rem;     /* 24px */
    --text-4xl: 1.875rem;   /* 30px */
    --text-5xl: 2.25rem;    /* 36px */
    --text-6xl: 3rem;       /* 48px */
    
    /* Line heights */
    --leading-none: 1;
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Font weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Letter spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    
    /* ─────────────────────────────────────────────────────────────────────────
       SHADOWS
       ───────────────────────────────────────────────────────────────────────── */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    
    /* Colored shadows for interactive elements */
    --shadow-primary-sm: 0 1px 3px 0 rgba(37, 99, 235, 0.2), 0 1px 2px -1px rgba(37, 99, 235, 0.15);
    --shadow-primary-md: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -2px rgba(37, 99, 235, 0.15);
    
    /* Focus ring */
    --ring-offset: 2px;
    --ring-width: 2px;
    --ring-color: rgba(59, 130, 246, 0.5);
    
    /* ─────────────────────────────────────────────────────────────────────────
       BORDER RADIUS
       ───────────────────────────────────────────────────────────────────────── */
    --radius-none: 0;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-3xl: 20px;
    --radius-full: 9999px;
    
    /* ─────────────────────────────────────────────────────────────────────────
       TRANSITIONS & ANIMATIONS
       ───────────────────────────────────────────────────────────────────────── */
    /* Durations */
    --duration-instant: 50ms;
    --duration-fast: 100ms;
    --duration-normal: 150ms;
    --duration-moderate: 200ms;
    --duration-slow: 300ms;
    --duration-slower: 400ms;
    --duration-slowest: 500ms;
    
    /* Easing functions */
    --ease-linear: linear;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Composite transitions */
    --transition-fast: var(--duration-fast) var(--ease-out);
    --transition-base: var(--duration-normal) var(--ease-out);
    --transition-moderate: var(--duration-moderate) var(--ease-out);
    --transition-slow: var(--duration-slow) var(--ease-out);
    --transition-colors: color var(--duration-normal) var(--ease-out), 
                         background-color var(--duration-normal) var(--ease-out), 
                         border-color var(--duration-normal) var(--ease-out);
    --transition-transform: transform var(--duration-normal) var(--ease-out);
    --transition-opacity: opacity var(--duration-normal) var(--ease-out);
    --transition-shadow: box-shadow var(--duration-normal) var(--ease-out);
    --transition-all: all var(--duration-normal) var(--ease-out);
    
    /* ─────────────────────────────────────────────────────────────────────────
       Z-INDEX SCALE
       ───────────────────────────────────────────────────────────────────────── */
    --z-below: -1;
    --z-base: 0;
    --z-raised: 1;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-popover: 60;
    --z-tooltip: 70;
    --z-toast: 80;
    --z-max: 9999;
}

/* Dark mode support (future-proofing) */
@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode variables - placeholder for future implementation */
        --dark-mode-enabled: 1;
    }
}

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

/* Improved Base Typography */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Better Font Sizing */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.text-3xl { font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.02em; }

/* Prevent zoom on input focus (mobile) */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Utility Classes */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM DESIGN SYSTEM - Clean, Professional, Trust-building
   ═══════════════════════════════════════════════════════════════════ */

/* App Loading Screen */
.app-loading-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    position: relative;
    overflow: hidden;
}

.app-loading-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
}

.app-loading-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.app-loading-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.app-loading-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.app-loading-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: app-spin 0.8s linear infinite;
}

@keyframes app-spin {
    to { transform: rotate(360deg); }
}

.app-loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

/* Premium Input Styling */
.input-premium {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.15s;
    color: #171717;
}
.input-premium:hover { border-color: #d4d4d4; }
.input-premium:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.input-premium::placeholder { color: #a3a3a3; }
.input-premium:disabled { 
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Login Error Display */
.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* Button Spinner */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Button Success State */
.btn-success-state {
    background: #059669 !important;
    border-color: #059669 !important;
}

/* Skeleton Loaders */
.skeleton {
    background: #f5f5f5;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

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

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 60%;
}

.skeleton-title {
    height: 1.5rem;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

/* Enhanced KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.kpi-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

/* Premium: No hover transforms or gradient decorations */
.kpi-card:hover {
    border-color: var(--gray-300);
}

.kpi-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.kpi-change {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    margin-top: 0.625rem;
    font-weight: 500;
}

.kpi-change.positive { color: var(--green-600); }
.kpi-change.negative { color: var(--red-600); }
.kpi-change.neutral { color: var(--gray-500); }

/* Quick Action Cards */
.quick-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.quick-action:hover {
    background: var(--gray-50);
    border-color: var(--blue-300);
    transform: translateX(4px);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-action-content h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.125rem;
}

.quick-action-content p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Conversation List */
.conversation-list {
    display: flex;
    flex-direction: column;
}

.conversation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.conversation-item:hover {
    background: var(--gray-50);
}

.conversation-item.active {
    background: var(--blue-50);
    border-left: 3px solid var(--blue-500);
    padding-left: calc(1rem - 3px);
}

.conversation-item.unread::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--blue-500);
    border-radius: 50%;
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
}

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

.conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.conversation-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9375rem;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.conversation-preview {
    font-size: 0.875rem;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-bubble {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 18px;
    font-size: 0.9375rem;
    line-height: 1.5;
    animation: bubbleIn 0.2s ease-out;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble.incoming {
    background: var(--gray-100);
    color: var(--gray-900);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-bubble.outgoing {
    background: var(--blue-600);
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-bubble.ai {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-900);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-bubble-label {
    font-size: 0.6875rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.chat-bubble-text {
    font-size: 0.9375rem;
    line-height: 1.5;
}

.chat-bubble-time {
    font-size: 0.6875rem;
    color: var(--gray-400);
    margin-top: 0.375rem;
}

.chat-bubble.outgoing .chat-bubble-time {
    color: rgba(255,255,255,0.7);
}

/* Booking Confirmation Card */
.booking-confirmation-card {
    margin-top: 0.75rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid #ddd6fe;
    border-radius: 12px;
}

.booking-confirmation-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 0.5rem;
}

.booking-confirmation-time {
    font-size: 0.9375rem;
    color: #4c1d95;
    font-weight: 500;
}

.booking-confirmation-id {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.booking-confirmation-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

/* Status Tags */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-tag.new {
    background: var(--blue-100);
    color: var(--blue-700);
}

.status-tag.responded {
    background: var(--yellow-100);
    color: var(--yellow-700);
}

.status-tag.booked {
    background: var(--purple-100);
    color: var(--purple-700);
}

.status-tag.won {
    background: var(--green-100);
    color: var(--green-700);
}

.status-tag.lost {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.375rem;
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    max-width: 320px;
}

/* Progress Indicator */
.progress-ring {
    width: 60px;
    height: 60px;
    position: relative;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 6;
}

.progress-ring-progress {
    fill: none;
    stroke: var(--green-500);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM - Premium with Progress
   ═══════════════════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--color-neutral-0);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 320px;
    max-width: 100%;
    pointer-events: all;
    animation: toast-slide-in 0.4s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

/* Toast progress bar */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toast-progress 4s linear forwards;
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast.toast-success {
    border-left: 4px solid var(--color-success-500);
    color: var(--color-success-600);
}

.toast.toast-error {
    border-left: 4px solid var(--color-error-500);
    color: var(--color-error-600);
}

.toast.toast-info {
    border-left: 4px solid var(--color-primary-500);
    color: var(--color-primary-600);
}

.toast.toast-warning {
    border-left: 4px solid var(--color-warning-500);
    color: var(--color-warning-600);
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

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

.toast-title {
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
    font-size: var(--text-base);
    margin-bottom: var(--space-0-5);
    line-height: var(--leading-snug);
}

.toast-message {
    color: var(--color-neutral-600);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--color-neutral-400);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition-colors), var(--transition-transform);
    margin: -2px -4px 0 0;
}

.toast-close:hover {
    color: var(--color-neutral-600);
    background: var(--color-neutral-100);
}

.toast-close:active {
    transform: scale(0.95);
}

@keyframes toast-slide-in {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-exit {
    animation: toast-slide-out 0.3s var(--ease-in) forwards;
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONNECTION STATUS INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1-5) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    transition: var(--transition-colors);
}

.connection-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.connection-status.live {
    background: var(--color-success-50);
    color: var(--color-success-700);
}

.connection-status.live .connection-status-dot {
    background: var(--color-success-500);
    animation: pulse-dot 2s ease-in-out infinite;
}

.connection-status.reconnecting {
    background: var(--color-warning-50);
    color: var(--color-warning-700);
}

.connection-status.reconnecting .connection-status-dot {
    background: var(--color-warning-500);
    animation: pulse-dot 0.8s ease-in-out infinite;
}

.connection-status.offline {
    background: var(--color-neutral-100);
    color: var(--color-neutral-600);
}

.connection-status.offline .connection-status-dot {
    background: var(--color-neutral-400);
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED SKELETON LOADERS
   ═══════════════════════════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-neutral-100) 0%,
        var(--color-neutral-200) 20%,
        var(--color-neutral-100) 40%,
        var(--color-neutral-100) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

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

.skeleton-text {
    height: 14px;
    margin-bottom: var(--space-2);
    border-radius: var(--radius-sm);
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 65%;
}

.skeleton-text-sm {
    height: 12px;
}

.skeleton-text-lg {
    height: 18px;
}

.skeleton-title {
    height: 24px;
    width: 45%;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-md);
}

.skeleton-card {
    height: 140px;
    border-radius: var(--radius-xl);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.skeleton-avatar-lg {
    width: 48px;
    height: 48px;
}

.skeleton-button {
    height: 36px;
    width: 100px;
    border-radius: var(--radius-md);
}

.skeleton-badge {
    height: 22px;
    width: 60px;
    border-radius: var(--radius-full);
}

/* Skeleton row for conversation list */
.skeleton-conversation-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-neutral-100);
}

.skeleton-conversation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAGGERED LIST ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.stagger-item {
    animation: stagger-fade-in 0.4s var(--ease-out) backwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.02s; }
.stagger-item:nth-child(2) { animation-delay: 0.04s; }
.stagger-item:nth-child(3) { animation-delay: 0.06s; }
.stagger-item:nth-child(4) { animation-delay: 0.08s; }
.stagger-item:nth-child(5) { animation-delay: 0.1s; }
.stagger-item:nth-child(6) { animation-delay: 0.12s; }
.stagger-item:nth-child(7) { animation-delay: 0.14s; }
.stagger-item:nth-child(8) { animation-delay: 0.16s; }
.stagger-item:nth-child(9) { animation-delay: 0.18s; }
.stagger-item:nth-child(10) { animation-delay: 0.2s; }

@keyframes stagger-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* List item insert animation */
.list-item-enter {
    animation: list-item-insert 0.3s var(--ease-spring);
}

@keyframes list-item-insert {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 200px;
    }
}

/* Optimistic UI States */
.message-sending {
    opacity: 0.6;
    position: relative;
}

.message-sending::after {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--blue-600);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner-rotate 0.6s linear infinite;
}

@keyframes spinner-rotate {
    to { transform: translateY(-50%) rotate(360deg); }
}

.message-failed {
    opacity: 0.5;
    position: relative;
}

.message-failed::after {
    content: '!';
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: #f59e0b;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading button state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: not-allowed;
}

.btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner-rotate 0.6s linear infinite;
    color: white;
}

/* Professional button enhancements */
.btn {
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn:not(:disabled):not(.btn-loading):hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:not(:disabled):not(.btn-loading):active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn:focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
}

/* Ripple effect for professional interaction */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Disabled state */
.btn:disabled:not(.btn-loading) {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Smooth modal animations */
.modal-overlay {
    animation: modal-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal {
    animation: modal-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Professional page transitions */
.animate-in {
    animation: page-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Conversation item interactions */
.conversation-item {
    transition: all var(--transition-fast);
}

.conversation-item:hover {
    background: var(--gray-50);
    transform: translateX(2px);
}

.conversation-item.active {
    background: var(--blue-50);
    border-left: 3px solid var(--blue-600);
}

/* Smooth list animations */
.stat-card,
.lead-card,
.booking-card {
    animation: card-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

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

@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Professional link hover */
a:not(.btn):not(.nav-item) {
    transition: color var(--transition-fast);
}

a:not(.btn):not(.nav-item):hover {
    color: var(--blue-600);
}

/* Enhanced form field interactions */
.form-input,
.form-select,
.form-textarea {
    transition: all var(--transition-fast);
}

.form-input:hover:not(:focus),
.form-select:hover:not(:focus),
.form-textarea:hover:not(:focus) {
    border-color: var(--gray-400);
}

/* Badge pulse for notifications */
.badge {
    animation: badge-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Subtle success state animation */
.success-flash {
    animation: success-flash 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes success-flash {
    0% {
        background-color: var(--green-100);
    }
    100% {
        background-color: transparent;
    }
}
.gap-6 { gap: 1.5rem; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-6xl { max-width: 72rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.bg-gray-50 { background: var(--gray-50); }
.bg-white { background: white; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-900 { color: var(--gray-900); }
.text-blue-600 { color: var(--blue-600); }
.rounded-lg { border-radius: 0.5rem; }
.cursor-pointer { cursor: pointer; }
.bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--blue-50), var(--indigo-100));
}
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-gray-100:hover { background: var(--gray-100); }

/* Cards - Premium Design */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

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

.dashboard-lead-item:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM SYSTEM - Clean and Accessible
   ═══════════════════════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-700);
    margin-bottom: var(--space-2);
}

.form-label-required::after {
    content: ' *';
    color: var(--color-error-500);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    margin-top: var(--space-1);
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-700);
    margin-bottom: var(--space-2);
}

.form-input,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-2-5) var(--space-3);
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color var(--duration-normal) var(--ease-out), 
                box-shadow var(--duration-normal) var(--ease-out),
                background-color var(--duration-normal) var(--ease-out);
    background: var(--color-neutral-0);
    color: var(--color-neutral-900);
    line-height: var(--leading-normal);
}

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

.form-input:hover,
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--color-neutral-400);
}

.form-input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Input validation states */
.form-input.is-valid,
.form-group.is-valid input {
    border-color: var(--color-success-500);
}

.form-input.is-valid:focus,
.form-group.is-valid input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.form-input.is-invalid,
.form-group.is-invalid input {
    border-color: var(--color-error-500);
}

.form-input.is-invalid:focus,
.form-group.is-invalid input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--color-error-600);
    margin-top: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.form-input:disabled,
.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
    background: var(--color-neutral-100);
    cursor: not-allowed;
    opacity: 0.7;
    color: var(--color-neutral-500);
}

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

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neutral-400);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.input-with-icon input {
    padding-left: var(--space-10);
}

/* Input group */
.input-group {
    display: flex;
    gap: var(--space-2);
}

.input-group > .form-input {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS PAGE - Control Center Layout
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-8);
    max-width: 1200px;
}

.settings-nav {
    position: sticky;
    top: var(--space-6);
    height: fit-content;
}

.settings-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2-5) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-neutral-600);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.settings-nav-item:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-900);
}

.settings-nav-item.active {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
}

.settings-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    width: 3px;
    height: 24px;
    background: var(--color-primary-600);
    border-radius: 0 2px 2px 0;
}

.settings-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

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

.settings-section {
    background: var(--color-neutral-0);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-neutral-200);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-neutral-200);
}

.settings-section-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
    margin-bottom: var(--space-1);
}

.settings-section-description {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
}

.settings-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-neutral-100);
}

.settings-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-row:first-child {
    padding-top: 0;
}

.settings-row-label {
    flex: 1;
    max-width: 50%;
}

.settings-row-label h4 {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-neutral-900);
    margin-bottom: var(--space-0-5);
}

.settings-row-label p {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
    line-height: var(--leading-relaxed);
}

.settings-row-control {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Mobile responsive settings */
@media (max-width: 768px) {
    .settings-layout {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .settings-nav {
        position: static;
        overflow-x: auto;
    }
    
    .settings-nav-list {
        flex-direction: row;
        gap: var(--space-1);
    }
    
    .settings-nav-item {
        white-space: nowrap;
        padding: var(--space-2) var(--space-3);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTON SYSTEM - Premium with Depth and Polish
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
    padding: var(--space-2-5) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    justify-content: center;
    position: relative;
    overflow: hidden;
    letter-spacing: var(--tracking-wide);
    line-height: var(--leading-tight);
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Subtle inner glow effect on buttons */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    opacity: 1;
    transition: opacity var(--duration-fast) var(--ease-out);
    pointer-events: none;
}

.btn:hover::before {
    opacity: 0;
}

/* Focus ring for accessibility */
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--ring-offset) var(--color-neutral-0), 
                0 0 0 calc(var(--ring-offset) + var(--ring-width)) var(--ring-color);
}

/* Primary Button - The main CTA */
.btn-primary {
    background: var(--color-primary-600);
    color: var(--color-neutral-0);
    box-shadow: var(--shadow-sm), 
                inset 0 1px 0 rgba(255,255,255,0.1),
                0 0 0 0 rgba(37, 99, 235, 0);
}

.btn-primary:hover {
    background: var(--color-primary-700);
    box-shadow: var(--shadow-md), 
                inset 0 1px 0 rgba(255,255,255,0.1),
                0 0 0 4px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    background: var(--color-primary-800);
    box-shadow: var(--shadow-sm), inset 0 1px 2px rgba(0,0,0,0.1);
}

/* Secondary Button */
.btn-secondary {
    background: var(--color-neutral-0);
    color: var(--color-neutral-700);
    border: 1px solid var(--color-neutral-300);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-400);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
    background: var(--color-neutral-100);
}

/* Outline/Ghost Button */
.btn-outline {
    background: transparent;
    border: 1px solid var(--color-neutral-300);
    color: var(--color-neutral-700);
}

.btn-outline:hover {
    background: var(--color-neutral-0);
    border-color: var(--color-primary-500);
    color: var(--color-primary-600);
    box-shadow: var(--shadow-sm);
}

.btn-outline:active {
    background: var(--color-primary-50);
}

/* Ghost Button - No border */
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--color-neutral-600);
    box-shadow: none;
}

.btn-ghost::before {
    display: none;
}

.btn-ghost:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-900);
}

.btn-ghost:active {
    background: var(--color-neutral-200);
}

/* Danger Button */
.btn-danger {
    background: var(--color-error-600);
    color: var(--color-neutral-0);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background: var(--color-error-700);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: translateY(0);
    background: var(--color-error-800);
}

/* Success Button */
.btn-success {
    background: var(--color-success-600);
    color: var(--color-neutral-0);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: var(--color-success-700);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Button Sizes */
.btn-xs {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    gap: var(--space-1);
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: var(--space-1-5) var(--space-3);
    font-size: var(--text-sm);
    gap: var(--space-1-5);
}

.btn-lg {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-lg);
    gap: var(--space-2-5);
    border-radius: var(--radius-xl);
}

/* Full width button */
.btn-block {
    width: 100%;
}

/* Icon only button */
.btn-icon {
    padding: var(--space-2);
    width: 36px;
    height: 36px;
}

.btn-icon.btn-sm {
    padding: var(--space-1-5);
    width: 28px;
    height: 28px;
}

.btn-icon.btn-lg {
    padding: var(--space-2-5);
    width: 44px;
    height: 44px;
}

/* Button Loading State */
.btn-loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

.btn-primary.btn-loading::after,
.btn-danger.btn-loading::after,
.btn-success.btn-loading::after {
    border-color: rgba(255,255,255,0.3);
    border-right-color: var(--color-neutral-0);
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Disabled state */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

.btn:disabled::before {
    display: none;
}

/* Enhanced Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-600) 0%, var(--indigo-600) 100%);
    transition: width var(--transition-slow);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Professional Sidebar with Gradient */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 40;
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-xl);
}

.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

/* Smooth scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.25rem;
    transition: all var(--transition-base);
    position: relative;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--blue-500);
    border-radius: 0 3px 3px 0;
    transition: height var(--transition-base);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(2px);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-item.active::before {
    height: 60%;
}

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

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer > div {
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
}

.sidebar-footer > div:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 30;
}

.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* KPI Card Enhancements - Icon support */
.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon.leads { background: var(--blue-100); color: var(--blue-600); }
.kpi-icon.bookings { background: var(--green-100); color: var(--green-600); }
.kpi-icon.status { background: var(--amber-100); color: var(--amber-600); }
.kpi-icon.revenue { background: var(--purple-100); color: var(--purple-600); }

/* Enhanced Activity Feed */
.activity-feed {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.activity-item {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: start;
    gap: 1.125rem;
    transition: all var(--transition-fast);
}

.activity-item:hover {
    background: var(--gray-50);
}

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

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.activity-icon.success {
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
    color: var(--green-600);
}

.activity-icon.info {
    background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
    color: var(--blue-600);
}

.activity-icon.warning {
    background: linear-gradient(135deg, var(--yellow-50), var(--yellow-100));
    color: var(--yellow-600);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
}

.activity-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Status Widget */
.status-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--green-600);
}

/* Professional Badge System */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    margin-left: auto;
    box-shadow: var(--shadow-xs);
    letter-spacing: 0.01em;
}

/* Enhanced Table Styles */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

th {
    text-align: left;
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9375rem;
    color: var(--gray-700);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: all var(--transition-fast);
}

tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.002);
}

/* Professional Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    animation: fadeIn var(--transition-slow);
}

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

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.75rem;
    color: var(--gray-300);
    opacity: 0.7;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.empty-state-description {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Professional Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
    animation: fadeIn var(--transition-base);
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: slideUp var(--transition-slow);
    border: 1px solid var(--gray-200);
}

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

.modal-header {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, white 0%, var(--gray-50) 100%);
}

.modal-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-close {
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--gray-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--gray-50);
}

/* Professional Conversation Styles */
.conversation-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.25rem;
    height: calc(100vh - 4rem);
}

.conversation-list {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.conversation-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.conversation-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--blue-600);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.conversation-item:hover {
    background: var(--gray-50);
}

.conversation-item:hover::before {
    transform: scaleX(1);
}

.conversation-item.active {
    background: linear-gradient(90deg, var(--blue-50) 0%, white 100%);
    border-left: 3px solid var(--blue-600);
}

.conversation-item.active::before {
    transform: scaleX(1);
}

.conversation-chat {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.chat-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(180deg, white 0%, var(--gray-50) 100%);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
    background: linear-gradient(180deg, var(--gray-50) 0%, white 50%);
}

/* Smooth scrollbar for messages */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.message {
    margin-bottom: 1.25rem;
    animation: messageSlide var(--transition-base);
}

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

.message-bubble {
    max-width: 70%;
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    line-height: 1.5;
    box-shadow: var(--shadow-xs);
    position: relative;
}

.message.incoming .message-bubble {
    background: white;
    color: var(--gray-900);
    border: 1px solid var(--gray-200);
    border-bottom-left-radius: 4px;
}

.message.outgoing {
    display: flex;
    justify-content: flex-end;
}

.message.outgoing .message-bubble {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    border-bottom-right-radius: 4px;
}

/* Enhanced AI Message Styling */
.message.ai-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(102, 126, 234, 0.4);
    position: relative;
}

.message.ai-message .message-bubble::after {
    content: 'AI';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.chat-input {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--gray-200);
    background: white;
}

.quick-replies {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

/* Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--gray-200);
    border: 1px solid var(--gray-200);
}

/* Professional Calendar Day Cells */
.calendar-day-cell {
    background: white;
    padding: 0.75rem;
    min-height: 120px;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    transition: all 0.2s;
}

.calendar-day-cell:not(.empty):hover {
    background: var(--gray-50);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.calendar-day-cell.empty {
    background: var(--gray-50);
    cursor: default !important;
}

.calendar-day-cell.today {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #3b82f6;
}

.calendar-day-cell.past {
    opacity: 0.6;
}

.calendar-booking-item {
    background: white;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.calendar-booking-item:hover {
    background: #eff6ff;
    box-shadow: 0 2px 6px rgba(59,130,246,0.15);
    transform: translateX(2px);
}

/* Professional Booking List Item */
.booking-list-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
}

.booking-list-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.booking-list-item.past {
    opacity: 0.7;
}

.booking-list-item.past:hover {
    transform: none;
}

.calendar-day {
    background: white;
    padding: 0.5rem;
    min-height: 100px;
    font-size: 0.875rem;
}

.calendar-day-header {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.booking-item {
    padding: 0.375rem 0.5rem;
    background: var(--blue-50);
    border-left: 3px solid var(--blue-600);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════ */

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .content-header > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .content-header .btn {
        flex: 1;
        min-width: 140px;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4.5rem;
    }

    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        background: white;
        border-bottom: 1px solid var(--gray-200);
        padding: 0.75rem 1rem;
        justify-content: space-between;
        align-items: center;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-card {
        padding: 1rem;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }

    .conversation-layout {
        grid-template-columns: 1fr;
        height: calc(100vh - 5rem);
    }

    .conversation-list {
        display: none;
        max-height: 50vh;
    }

    .conversation-list.mobile-show {
        display: block;
    }

    .conversation-chat.mobile-hide {
        display: none;
    }
    
    .conversation-chat {
        height: calc(100vh - 5rem);
    }
    
    /* Chat input on mobile */
    .chat-input {
        padding: 0.75rem;
    }
    
    .quick-replies {
        display: none;
    }
    
    /* Cards on mobile */
    .card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    /* Modal on mobile */
    .modal {
        margin: 0;
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .modal-overlay {
        padding: 0;
    }
    
    /* Buttons on mobile */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Form elements on mobile */
    .form-group label {
        font-size: 0.875rem;
    }
    
    /* Page headers on mobile */
    .text-3xl, .text-2xl {
        font-size: 1.5rem;
    }
    
    h1.text-3xl {
        font-size: 1.5rem;
    }
    
    /* Hide less important elements on mobile */
    .mobile-hide-optional {
        display: none;
    }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
        padding-top: 4rem;
    }
    
    .kpi-card {
        padding: 0.875rem;
    }
    
    .kpi-label {
        font-size: 0.75rem;
    }
    
    .kpi-value {
        font-size: 1.25rem;
    }
    
    .card {
        padding: 0.875rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 0.875rem 1rem;
    }
    
    /* Stack buttons vertically on very small screens */
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Simplify tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   LOGIN / ONBOARDING MOBILE STYLES
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Login page - hide left panel, full width form */
    .hidden.lg\:flex {
        display: none !important;
    }
    
    /* Onboarding form on mobile */
    #onboarding-content .card {
        padding: 1.25rem;
    }
    
    #onboarding-content h2 {
        font-size: 1.5rem;
    }
    
    #onboarding-content .form-group input {
        padding: 0.875rem 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.3s ease;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.3s;
    border-radius: 999px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--blue-600);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Professional Tag System */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

.tag.success {
    background: var(--green-50);
    color: var(--green-700);
    border-color: var(--green-100);
}

.tag.warning {
    background: var(--yellow-50);
    color: var(--yellow-700);
    border-color: var(--yellow-100);
}

.tag.error {
    background: var(--red-50);
    color: var(--red-700);
    border-color: var(--red-100);
}

.tag.info {
    background: var(--blue-50);
    color: var(--blue-700);
    border-color: var(--blue-100);
}

.tag.primary {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: white;
    box-shadow: var(--shadow-xs);
}

/* Calendar Styles */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.calendar-grid {
    width: fit-content;
    max-width: 1400px;
    margin: 0 auto;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--gray-800);
}

.calendar-weekdays > div {
    text-align: center;
    font-weight: 700;
    font-size: 0.9375rem;
    color: white;
    padding: 0.875rem;
    border-right: 1px solid var(--gray-700);
}

.calendar-weekdays > div:last-child {
    border-right: none;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.calendar-day {
    aspect-ratio: 1;
    min-height: 180px;
    padding: 1rem;
    background: white;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gray-300);
    border-bottom: 1px solid var(--gray-300);
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:nth-last-child(-n+7) {
    border-bottom: none;
}

.calendar-day:hover:not(.calendar-day-empty) {
    background: var(--blue-50);
}

.calendar-day-empty {
    background: var(--gray-50);
    cursor: default;
}

.calendar-day-today {
    background: #eff6ff;
}

.calendar-day-today .calendar-day-number {
    background: var(--blue-600);
    color: white;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-day-number {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.calendar-bookings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.calendar-booking {
    background: var(--blue-600);
    color: white;
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    line-height: 1.4;
}

.calendar-booking:hover {
    background: var(--blue-700);
    transform: translateX(2px);
}

.calendar-booking-time {
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.calendar-booking-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.95;
}

.calendar-booking-more {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 600;
    padding: 0.5rem;
    text-align: center;
    background: var(--gray-100);
    border-radius: 4px;
    margin-top: 0.375rem;
}

/* Button Group */
.btn-group {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOGGLE SWITCH - Smooth and Accessible
   ═══════════════════════════════════════════════════════════════════════════ */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-neutral-300);
    transition: background-color var(--duration-moderate) var(--ease-out),
                box-shadow var(--duration-moderate) var(--ease-out);
    border-radius: var(--radius-full);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--color-neutral-0);
    transition: transform var(--duration-moderate) var(--ease-spring);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.switch:hover .slider {
    background-color: var(--color-neutral-400);
}

.switch input:focus-visible + .slider {
    box-shadow: 0 0 0 var(--ring-offset) var(--color-neutral-0), 
                0 0 0 calc(var(--ring-offset) + var(--ring-width)) var(--ring-color);
}

.switch input:checked + .slider {
    background-color: var(--color-primary-600);
}

.switch:hover input:checked + .slider {
    background-color: var(--color-primary-700);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

.switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Switch sizes */
.switch-sm {
    width: 36px;
    height: 20px;
}

.switch-sm .slider:before {
    height: 14px;
    width: 14px;
}

.switch-sm input:checked + .slider:before {
    transform: translateX(16px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES & PILLS - Status Indicators
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-0-5) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    line-height: var(--leading-tight);
    white-space: nowrap;
}

.badge-sm {
    padding: 2px var(--space-1-5);
    font-size: 11px;
}

.badge-lg {
    padding: var(--space-1) var(--space-2-5);
    font-size: var(--text-sm);
}

/* Badge colors */
.badge-gray {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.badge-primary {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

.badge-success {
    background: var(--color-success-100);
    color: var(--color-success-700);
}

.badge-warning {
    background: var(--color-warning-100);
    color: var(--color-warning-700);
}

.badge-error {
    background: var(--color-error-100);
    color: var(--color-error-700);
}

.badge-info {
    background: var(--color-info-100);
    color: var(--color-info-600);
}

/* Outline badge for navigation pills */
.badge-outline {
    background: transparent;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.badge-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.badge-outline.active {
    background: var(--blue-50);
    border-color: var(--blue-200);
    color: var(--blue-700);
}

/* Dot indicator */
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-success .badge-dot {
    background: var(--color-success-500);
}

.badge-warning .badge-dot {
    background: var(--color-warning-500);
}

.badge-error .badge-dot {
    background: var(--color-error-500);
}

/* Pulsing dot for live status */
.badge-dot.pulse {
    animation: badge-pulse 2s ease-in-out infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   TABS - Clean Navigation
   ═══════════════════════════════════════════════════════════════════════════ */
.tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--color-neutral-200);
    padding-bottom: 0;
}

.tab {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-neutral-500);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color var(--duration-normal) var(--ease-out);
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background-color var(--duration-normal) var(--ease-out);
}

.tab:hover {
    color: var(--color-neutral-700);
}

.tab.active {
    color: var(--color-primary-600);
}

.tab.active::after {
    background: var(--color-primary-600);
}

/* Pill tabs variant */
.tabs-pills {
    border-bottom: none;
    background: var(--color-neutral-100);
    padding: var(--space-1);
    border-radius: var(--radius-lg);
    gap: var(--space-1);
}

.tabs-pills .tab {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.tabs-pills .tab::after {
    display: none;
}

.tabs-pills .tab.active {
    background: var(--color-neutral-0);
    color: var(--color-neutral-900);
    box-shadow: var(--shadow-sm);
}

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

.btn-group .btn + .btn {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Professional Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--blue-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

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

/* Focus States - Accessibility */
*:focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
}

/* ========================================
   PROFESSIONAL POLISH - Extra refinements
   ======================================== */

/* Improved text rendering for all headings */
h1, h2, h3, h4, h5, h6, .font-semibold, .font-bold {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle hover states for clickable elements */
.clickable {
    cursor: pointer;
    transition: all var(--transition-base);
}

.clickable:hover {
    opacity: 0.85;
}

/* Consistent section spacing */
.section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Tag/chip styles for consistent labeling */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: var(--gray-100);
    color: var(--gray-700);
    white-space: nowrap;
}

.tag.success {
    background: var(--green-100);
    color: var(--green-700);
}

.tag.warning {
    background: var(--yellow-100);
    color: var(--yellow-700);
}

.tag.info {
    background: var(--blue-100);
    color: var(--blue-700);
}

.tag.danger {
    background: var(--red-100);
    color: var(--red-700);
}

.tag.purple {
    background: var(--purple-100);
    color: var(--purple-700);
}

/* Improved stat display */
.stat-highlight {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Subtle dividers */
.divider {
    height: 1px;
    background: var(--gray-200);
    margin: 1.5rem 0;
}

.divider-vertical {
    width: 1px;
    background: var(--gray-200);
    margin: 0 1rem;
    align-self: stretch;
}

/* Icon containers for consistent sizing */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-container.sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.icon-container.md {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.icon-container.lg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

/* Success/info/warning backgrounds for icons */
.icon-container.success {
    background: var(--green-100);
    color: var(--green-600);
}

.icon-container.info {
    background: var(--blue-100);
    color: var(--blue-600);
}

.icon-container.warning {
    background: var(--yellow-100);
    color: var(--yellow-600);
}

.icon-container.danger {
    background: var(--red-100);
    color: var(--red-600);
}

/* Truncate text with ellipsis */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth scrolling */
.scroll-smooth {
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep scrollable */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Improved button group styling */
.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-group-tight {
    display: flex;
}

.btn-group-tight .btn {
    border-radius: 0;
}

.btn-group-tight .btn:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group-tight .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Quick action cards */
.action-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.action-card:hover {
    border-color: var(--blue-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.action-card.selected {
    border-color: var(--blue-600);
    background: var(--blue-50);
}

/* Improved input placeholder styling */
::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

/* Better search input */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.search-input-wrapper input {
    padding-left: 2.5rem;
}

/* Loading pulse animation */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Success animation */
@keyframes success-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-pop {
    animation: success-pop 0.3s ease-out;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }
    
    .nav-item {
        min-height: 44px;
    }
    
    /* Better card spacing on mobile */
    .card {
        padding: 1.25rem;
    }
    
    /* Stack KPI cards vertically */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Two column KPI on tablets */
    @media (min-width: 480px) {
        .kpi-grid {
            grid-template-columns: 1fr 1fr;
        }
    }
    
    /* Full-width buttons on mobile */
    .btn-mobile-full {
        width: 100%;
    }
    
    /* Conversation layout stacked */
    .conversation-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .conversation-list {
        max-height: 50vh;
    }
    
    .conversation-chat {
        min-height: 50vh;
    }
    
    /* Sidebar slide-in on mobile */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    /* Mobile header always visible */
    .mobile-header {
        display: flex;
    }
    
    /* Stack dashboard sections */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    /* Horizontal scroll for pipeline on mobile */
    .pipeline-kanban {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .pipeline-kanban > div {
        min-width: 280px;
        flex-shrink: 0;
    }
    
    /* Hide table on mobile, show cards instead */
    .table-container {
        display: none;
    }
    
    .mobile-lead-cards {
        display: block;
    }
    
    /* Stack form fields */
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Larger text for readability */
    .kpi-value {
        font-size: 1.75rem;
    }
    
    /* Modal full screen on mobile */
    .modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .modal-overlay {
        padding: 0;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
}

/* Selection Styling */
::selection {
    background: var(--blue-100);
    color: var(--blue-900);
}

/* Smooth Page Transitions */
.page-transition {
    animation: pageSlide var(--transition-base);
}

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

/* Dashboard Conversion Funnel Animation */
.funnel-bar {
    animation: fillBar 1s ease-out forwards;
    transform-origin: left;
}

@keyframes fillBar {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* ========================================
   TRADIE-FOCUSED ENHANCEMENTS
   ======================================== */

/* Quick action styles for one-tap actions */
.quick-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.quick-action:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-100);
    color: var(--blue-600);
}

.quick-action-label {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9375rem;
}

/* Status badges for clear job status */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.new {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.responded {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.booked {
    background: #e0e7ff;
    color: #5b21b6;
}

.status-badge.won {
    background: #dcfce7;
    color: #166534;
}

.status-badge.lost {
    background: #fee2e2;
    color: #991b1b;
}

/* Phone-tap friendly link style */
.phone-link {
    color: var(--blue-600);
    font-weight: 600;
    text-decoration: none;
    padding: 0.25rem 0;
}

.phone-link:hover {
    text-decoration: underline;
}

/* Revenue highlight for motivation */
.revenue-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9375rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Calming success state */
.success-state {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.success-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: success-pop 0.3s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════
   UI POLISH - Setup Banner, Demo Mode, Status Indicators
   ═══════════════════════════════════════════════════════════════════ */

/* Setup Progress Banner */
.setup-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--blue-50) 0%, #fff 100%);
    border: 1px solid var(--blue-200);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.setup-banner-steps {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.setup-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--gray-200);
    transition: all 0.15s ease;
    cursor: pointer;
    flex: 1;
    min-width: 140px;
}

.setup-step:hover {
    border-color: var(--blue-300);
    background: var(--blue-50);
}

.setup-step.complete {
    background: var(--green-50);
    border-color: var(--green-200);
}

.setup-step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setup-step.complete .setup-step-icon {
    background: var(--green-500);
    color: white;
}

.setup-step:not(.complete) .setup-step-icon {
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    color: var(--gray-400);
}

.setup-step-text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
}

.setup-step.complete .setup-step-text {
    color: var(--green-700);
}

.setup-step-action {
    font-size: 0.75rem;
    color: var(--blue-600);
    font-weight: 500;
    margin-left: auto;
}

.setup-banner-dismiss {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.15s;
}

.setup-banner-dismiss:hover {
    color: var(--gray-600);
}

/* Demo Mode Badge (Sidebar) */
.demo-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.75rem 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.demo-badge:hover {
    background: rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.5);
}

.demo-badge-icon {
    width: 16px;
    height: 16px;
}

.demo-badge-tooltip {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-900);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
}

.demo-badge:hover .demo-badge-tooltip {
    opacity: 1;
}

/* Status Dots for Sidebar */
.sidebar-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-status-dot.connected {
    background: var(--green-500);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.sidebar-status-dot.demo {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}

.sidebar-status-dot.error {
    background: var(--red-500);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

/* KPI Card Improvements */
.kpi-card.empty-state .kpi-value {
    color: var(--gray-400);
    font-size: 1.5rem;
}

.kpi-card .kpi-tooltip {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    cursor: help;
    opacity: 0;
    transition: opacity 0.15s;
}

.kpi-card:hover .kpi-tooltip {
    opacity: 1;
}

/* Page Header Pattern */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header-left {
    flex: 1;
    min-width: 200px;
}

.page-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-header-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.page-header-status.live {
    background: var(--green-100);
    color: var(--green-700);
}

.page-header-status.demo {
    background: var(--yellow-100);
    color: var(--yellow-600);
}

.page-header-status.error {
    background: var(--red-100);
    color: var(--red-700);
}

/* Mobile: Collapse setup banner */
@media (max-width: 768px) {
    .setup-banner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .setup-banner-steps {
        flex-direction: column;
    }
    
    .setup-step {
        min-width: unset;
    }
    
    .page-header {
        flex-direction: column;
    }
    
    .page-header-actions {
        width: 100%;
    }
    
    .page-header-actions .btn {
        flex: 1;
    }
}

/* Print styles for receipts/invoices */
@media print {
    .sidebar,
    .mobile-header,
    .btn,
    .nav-item,
    .setup-banner,
    .demo-badge {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* =============================================
   LOGIN INSIGHTS CAROUSEL
   ============================================= */

#insights-carousel {
    position: relative;
}

.insight-slide {
    transition: opacity 0.5s ease-in-out;
}

.insight-slide.active {
    opacity: 1 !important;
    position: relative !important;
}

.carousel-dot {
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    transform: scale(1.2);
}

.carousel-dot.active {
    opacity: 1 !important;
    transform: scale(1.1);
}

/* =============================================
   SETTINGS PAGE - SIDEBAR LAYOUT
   ============================================= */

.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

.settings-nav {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    position: sticky;
    top: 1.5rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.settings-nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.settings-nav-item.active {
    background: var(--blue-50);
    color: var(--blue-700);
}

.settings-nav-item.active i {
    color: var(--blue-600);
}

.settings-nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0;
}

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

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section-header {
    margin-bottom: 0.5rem;
}

.settings-section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.settings-section-header p {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.settings-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.settings-info-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.settings-info-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 0.375rem;
}

.settings-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.settings-toggle-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.settings-toggle-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-toggle-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.125rem;
}

.settings-toggle-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Mobile: Stack Settings layout */
@media (max-width: 768px) {
    .settings-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .settings-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.375rem;
    }
    
    .settings-nav-item {
        flex: 1 1 auto;
        min-width: fit-content;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        justify-content: center;
    }
    
    .settings-nav-item span {
        display: none;
    }
    
    .settings-nav-divider {
        display: none;
    }
}
