/* ==============================================================================
   AVALME BINARYPLATE - Custom CSS
   ============================================================================== */

/* ==============================================================================
   DESIGN TOKENS — Variables centralizadas
   ============================================================================== */
:root {
    /* ── Brand / Primary ── */
    --primary: #5b6ef5;
    --primary-dark: #4a5cd4;
    --indigo: #6366f1;
    --indigo-dark: #4f46e5;
    --indigo-light: #e0e7ff;
    --indigo-lightest: #eef2ff;
    --violet: #8b5cf6;
    --violet-dark: #7c3aed;
    --violet-light: #a78bfa;
    --purple: #673ab7;
    --purple-accent: #764ba2;
    --blue-accent: #667eea;

    /* ── Semantic Colors ── */
    --success: #10b981;
    --success-dark: #059669;
    --success-medium: #16a34a;
    --success-light: #22c55e;
    --success-pale: #34d399;
    --success-bg: #d1fae5;
    --success-bg-light: #ecfdf5;
    --success-bg-lighter: #f0fdf4;
    --success-bg-lightest: #dcfce7;
    --success-bg-soft: #bbf7d0;
    --success-bg-pastel: #a7f3d0;

    --error: #ef4444;
    --error-dark: #dc2626;
    --error-rose: #f43f5e;
    --error-pink-dark: #db2777;
    --error-bg: #fee2e2;
    --error-bg-light: #fef2f2;

    --warning: #f59e0b;
    --warning-dark: #d97706;
    --warning-amber: #b45309;
    --warning-light: #fbbf24;
    --warning-pale: #fcd34d;
    --warning-bg: #fef3c7;
    --warning-bg-light: #fde68a;

    --info: #3b82f6;
    --info-dark: #2563eb;
    --info-darker: #1d4ed8;
    --info-light: #60a5fa;
    --info-bg: #dbeafe;
    --info-bg-light: #bfdbfe;
    --info-bg-lighter: #eff6ff;

    --pink: #ec4899;
    --pink-bg: #fce7f3;
    --pink-bg-light: #fbcfe8;

    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-light: #fb923c;

    --teal: #14b8a6;

    --purple-light: #a855f7;
    --purple-bg: #f3e8ff;
    --purple-bg-light: #e9d5ff;
    --purple-bg-lighter: #faf5ff;
    --purple-soft: #a5b4fc;
    --purple-bg-indigo: #c7d2fe;

    /* ── Neutrals ── */
    --text-primary: #1e293b;
    --text-primary-alt: #1f2937;
    --text-secondary: #64748b;
    --text-tertiary: #475569;
    --text-muted: #334155;
    --text-disabled: #94a3b8;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #374151;

    --border-light: #e2e8f0;
    --border-default: #e5e7eb;
    --border-dark: #cbd5e1;
    --border-muted: #d1d5db;

    --bg-page: #f8fafc;
    --bg-subtle: #f1f5f9;
    --bg-muted: #f9fafb;
    --bg-skeleton: #e8e8e8;
    --bg-skeleton-alt: #f5f5f5;
    --surface: #ffffff;

    /* ── Primary Alpha (opacity variants) ── */
    --indigo-alpha-3: rgba(99, 102, 241, 0.03);
    --indigo-alpha-4: rgba(99, 102, 241, 0.04);
    --indigo-alpha-5: rgba(99, 102, 241, 0.05);
    --indigo-alpha-8: rgba(99, 102, 241, 0.08);
    --indigo-alpha-10: rgba(99, 102, 241, 0.1);
    --indigo-alpha-12: rgba(99, 102, 241, 0.12);
    --indigo-alpha-15: rgba(99, 102, 241, 0.15);
    --indigo-alpha-20: rgba(99, 102, 241, 0.2);
    --indigo-alpha-25: rgba(99, 102, 241, 0.25);
    --indigo-alpha-30: rgba(99, 102, 241, 0.3);
    --indigo-alpha-35: rgba(99, 102, 241, 0.35);
    --indigo-alpha-40: rgba(99, 102, 241, 0.4);
    --indigo-darker: #4338ca;

    --violet-darker: #6d28d9;
    --violet-alpha-3: rgba(139, 92, 246, 0.03);

    --primary-alpha-10: rgba(91, 110, 245, 0.1);

    --pink-alpha-10: rgba(236, 72, 153, 0.1);
    --pink-alpha-15: rgba(236, 72, 153, 0.15);

    --success-darker: #166534;
    --success-alpha-40: rgba(16, 185, 129, 0.4);
    --success-dark-alpha-15: rgba(5, 150, 105, 0.15);

    --teal-dark: #0d9488;

    --gray-100: #f3f4f6;

    --orange-pastel: #ffedd5;
    --error-pastel: #fecaca;

    --blue-accent-alpha-10: rgba(102, 126, 234, 0.1);

    --violet-alpha-10: rgba(139, 92, 246, 0.1);
    --violet-alpha-15: rgba(139, 92, 246, 0.15);

    --purple-alpha-10: rgba(103, 58, 183, 0.1);

    --error-alpha-10: rgba(239, 68, 68, 0.1);
    --error-alpha-15: rgba(239, 68, 68, 0.15);
    --error-alpha-20: rgba(239, 68, 68, 0.2);
    --error-alpha-40: rgba(239, 68, 68, 0.4);

    --success-alpha-10: rgba(16, 185, 129, 0.1);
    --success-alpha-15: rgba(16, 185, 129, 0.15);
    --success-alpha-20: rgba(16, 185, 129, 0.2);
    --success-alpha-30: rgba(16, 185, 129, 0.3);
    --success-light-alpha-10: rgba(34, 197, 94, 0.1);
    --success-light-alpha-15: rgba(34, 197, 94, 0.15);
    --success-light-alpha-18: rgba(34, 197, 94, 0.18);
    --success-light-alpha-20: rgba(34, 197, 94, 0.2);
    --success-light-alpha-40: rgba(34, 197, 94, 0.4);

    --info-alpha-10: rgba(59, 130, 246, 0.1);
    --info-alpha-15: rgba(59, 130, 246, 0.15);
    --info-alpha-18: rgba(59, 130, 246, 0.18);
    --info-alpha-20: rgba(59, 130, 246, 0.2);
    --info-alpha-40: rgba(59, 130, 246, 0.4);

    --warning-alpha-10: rgba(245, 158, 11, 0.1);
    --warning-alpha-15: rgba(245, 158, 11, 0.15);
    --warning-alpha-18: rgba(245, 158, 11, 0.18);
    --warning-alpha-20: rgba(245, 158, 11, 0.2);
    --warning-alpha-40: rgba(245, 158, 11, 0.4);

    --gray-alpha-10: rgba(107, 114, 128, 0.1);
    --gray-alpha-18: rgba(107, 114, 128, 0.18);
    --gray-alpha-20: rgba(107, 114, 128, 0.2);
    --gray-alpha-40: rgba(107, 114, 128, 0.4);

    /* Text tonos oscuros (equivalentes en :root); usado por status-chip variants */
    --success-text-dark: #15803d;
    --gray-text-dark: #4b5563;

    --orange-alpha-15: rgba(249, 115, 22, 0.15);

    --black-alpha-4: rgba(0, 0, 0, 0.04);
    --black-alpha-6: rgba(0, 0, 0, 0.06);
    --black-alpha-8: rgba(0, 0, 0, 0.08);
    --black-alpha-10: rgba(0, 0, 0, 0.1);
    --black-alpha-12: rgba(0, 0, 0, 0.12);
    --black-alpha-15: rgba(0, 0, 0, 0.15);
    --black-alpha-20: rgba(0, 0, 0, 0.2);
    --black-alpha-30: rgba(0, 0, 0, 0.3);
    --white-alpha-6: rgba(255, 255, 255, 0.06);
    --white-alpha-15: rgba(255, 255, 255, 0.15);
    --white-alpha-20: rgba(255, 255, 255, 0.2);
    --white-alpha-30: rgba(255, 255, 255, 0.3);
    --white-alpha-80: rgba(255, 255, 255, 0.8);

    /* ── Gradients ── */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-pink: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-orange: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-green: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

    /* ── Shadows ── */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);

    /* ── Spacing ── */
    --spacing-xs: 0.25rem;
    /* 4px */
    --spacing-sm: 0.5rem;
    /* 8px */
    --spacing-md: 0.75rem;
    /* 12px */
    --spacing-lg: 1rem;
    /* 16px */
    --spacing-xl: 1.5rem;
    /* 24px */
    --spacing-2xl: 2rem;
    /* 32px */

    /* ── Border Radius ── */
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ==============================================================================
   DARK MODE — Override all custom tokens when MudBlazor activates dark theme
   MudBlazor applies .mud-theme-dark to <body>, its --mud-palette-* vars auto-switch.
   Our custom vars need manual override here.
   ============================================================================== */
.mud-theme-dark {
    /* ── Brand / Primary (lighter for dark bg) ── */
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --indigo: #818cf8;
    --indigo-dark: #6366f1;
    --indigo-light: rgba(129, 140, 248, 0.15);
    --indigo-lightest: rgba(129, 140, 248, 0.08);
    --violet: #a78bfa;
    --violet-dark: #8b5cf6;
    --violet-light: #c4b5fd;
    --purple: #9575cd;
    --purple-accent: #a78bfa;
    --blue-accent: #818cf8;

    /* ── Semantic Colors (lighter/brighter for dark bg) ── */
    --success: #34d399;
    --success-dark: #10b981;
    --success-medium: #22c55e;
    --success-light: #6ee7b7;
    --success-pale: #a7f3d0;
    --success-bg: rgba(52, 211, 153, 0.12);
    --success-bg-light: rgba(52, 211, 153, 0.08);
    --success-bg-lighter: rgba(52, 211, 153, 0.06);
    --success-bg-lightest: rgba(52, 211, 153, 0.04);
    --success-bg-soft: rgba(52, 211, 153, 0.15);
    --success-bg-pastel: rgba(52, 211, 153, 0.10);

    --error: #f87171;
    --error-dark: #ef4444;
    --error-rose: #fb7185;
    --error-pink-dark: #f472b6;
    --error-bg: rgba(248, 113, 113, 0.12);
    --error-bg-light: rgba(248, 113, 113, 0.08);

    --warning: #fbbf24;
    --warning-dark: #f59e0b;
    --warning-amber: #d97706;
    --warning-light: #fcd34d;
    --warning-pale: #fde68a;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --warning-bg-light: rgba(251, 191, 36, 0.08);

    --info: #60a5fa;
    --info-dark: #3b82f6;
    --info-darker: #2563eb;
    --info-light: #93bbfd;
    --info-bg: rgba(96, 165, 250, 0.12);
    --info-bg-light: rgba(96, 165, 250, 0.08);
    --info-bg-lighter: rgba(96, 165, 250, 0.06);

    --pink: #f472b6;
    --pink-bg: rgba(244, 114, 182, 0.12);
    --pink-bg-light: rgba(244, 114, 182, 0.08);

    --orange: #fb923c;
    --orange-dark: #f97316;
    --orange-light: #fdba74;

    --teal: #2dd4bf;

    --purple-light: #c084fc;
    --purple-bg: rgba(192, 132, 252, 0.12);
    --purple-bg-light: rgba(192, 132, 252, 0.08);
    --purple-bg-lighter: rgba(192, 132, 252, 0.06);
    --purple-soft: #a5b4fc;
    --purple-bg-indigo: rgba(165, 180, 252, 0.15);

    /* ── Neutrals (inverted for dark bg) ── */
    --text-primary: #f1f5f9;
    --text-primary-alt: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-tertiary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-disabled: #475569;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;

    --border-light: #334155;
    --border-default: #374151;
    --border-dark: #475569;
    --border-muted: #374151;

    --bg-page: #0f172a;
    --bg-subtle: #1e293b;
    --bg-muted: #1e293b;
    --bg-skeleton: #334155;
    --bg-skeleton-alt: #1e293b;
    --surface: #1e293b;

    /* ── Primary Alpha (adjusted for dark bg) ── */
    --indigo-alpha-3: rgba(129, 140, 248, 0.03);
    --indigo-alpha-4: rgba(129, 140, 248, 0.04);
    --indigo-alpha-5: rgba(129, 140, 248, 0.06);
    --indigo-alpha-8: rgba(129, 140, 248, 0.08);
    --indigo-alpha-10: rgba(129, 140, 248, 0.10);
    --indigo-alpha-12: rgba(129, 140, 248, 0.12);
    --indigo-alpha-15: rgba(129, 140, 248, 0.15);
    --indigo-alpha-20: rgba(129, 140, 248, 0.20);
    --indigo-alpha-25: rgba(129, 140, 248, 0.25);
    --indigo-alpha-30: rgba(129, 140, 248, 0.28);
    --indigo-alpha-35: rgba(129, 140, 248, 0.32);
    --indigo-alpha-40: rgba(129, 140, 248, 0.35);
    --indigo-darker: #6366f1;

    --violet-darker: #8b5cf6;
    --violet-alpha-3: rgba(167, 139, 250, 0.03);

    --primary-alpha-10: rgba(129, 140, 248, 0.10);

    --pink-alpha-10: rgba(244, 114, 182, 0.10);
    --pink-alpha-15: rgba(244, 114, 182, 0.15);

    --success-darker: #22c55e;
    --success-alpha-40: rgba(52, 211, 153, 0.4);
    --success-dark-alpha-15: rgba(52, 211, 153, 0.15);

    --teal-dark: #14b8a6;

    --gray-100: #1e293b;

    --orange-pastel: rgba(251, 146, 60, 0.20);
    --error-pastel: rgba(248, 113, 113, 0.25);

    --blue-accent-alpha-10: rgba(129, 140, 248, 0.10);

    --violet-alpha-10: rgba(167, 139, 250, 0.10);
    --violet-alpha-15: rgba(167, 139, 250, 0.15);

    --purple-alpha-10: rgba(149, 117, 205, 0.10);

    --error-alpha-10: rgba(248, 113, 113, 0.10);
    --error-alpha-15: rgba(248, 113, 113, 0.15);
    --error-alpha-20: rgba(248, 113, 113, 0.20);
    --error-alpha-40: rgba(248, 113, 113, 0.40);

    --success-alpha-10: rgba(52, 211, 153, 0.10);
    --success-alpha-15: rgba(52, 211, 153, 0.15);
    --success-alpha-20: rgba(52, 211, 153, 0.20);
    --success-alpha-30: rgba(52, 211, 153, 0.25);
    --success-light-alpha-10: rgba(110, 231, 183, 0.10);
    --success-light-alpha-15: rgba(110, 231, 183, 0.15);
    --success-light-alpha-18: rgba(110, 231, 183, 0.18);
    --success-light-alpha-20: rgba(110, 231, 183, 0.20);
    --success-light-alpha-40: rgba(110, 231, 183, 0.40);

    --info-alpha-10: rgba(96, 165, 250, 0.10);
    --info-alpha-15: rgba(96, 165, 250, 0.15);
    --info-alpha-18: rgba(96, 165, 250, 0.18);
    --info-alpha-20: rgba(96, 165, 250, 0.20);
    --info-alpha-40: rgba(96, 165, 250, 0.40);

    --warning-alpha-10: rgba(251, 191, 36, 0.10);
    --warning-alpha-15: rgba(251, 191, 36, 0.15);
    --warning-alpha-18: rgba(251, 191, 36, 0.18);
    --warning-alpha-20: rgba(251, 191, 36, 0.20);
    --warning-alpha-40: rgba(251, 191, 36, 0.40);

    --gray-alpha-10: rgba(156, 163, 175, 0.10);
    --gray-alpha-18: rgba(156, 163, 175, 0.18);
    --gray-alpha-20: rgba(156, 163, 175, 0.20);
    --gray-alpha-40: rgba(156, 163, 175, 0.40);

    /* Text tonos oscuros adaptados a dark mode (colores más claros para contraste) */
    --success-text-dark: #86efac;
    --gray-text-dark: #cbd5e1;

    --orange-alpha-15: rgba(251, 146, 60, 0.15);

    --black-alpha-4: rgba(0, 0, 0, 0.15);
    --black-alpha-6: rgba(0, 0, 0, 0.20);
    --black-alpha-8: rgba(0, 0, 0, 0.25);
    --black-alpha-10: rgba(0, 0, 0, 0.30);
    --black-alpha-12: rgba(0, 0, 0, 0.35);
    --black-alpha-15: rgba(0, 0, 0, 0.40);
    --black-alpha-20: rgba(0, 0, 0, 0.50);
    --black-alpha-30: rgba(0, 0, 0, 0.60);
    --white-alpha-6: rgba(255, 255, 255, 0.03);
    --white-alpha-15: rgba(255, 255, 255, 0.08);
    --white-alpha-20: rgba(255, 255, 255, 0.10);
    --white-alpha-30: rgba(255, 255, 255, 0.15);
    --white-alpha-80: rgba(255, 255, 255, 0.40);

    /* ── Gradients (slightly lighter for dark bg) ── */
    --gradient-primary: linear-gradient(135deg, #7c8cf5 0%, #8b5fbf 100%);
    --gradient-purple: linear-gradient(135deg, #7c8cf5 0%, #8b5fbf 100%);
    --gradient-pink: linear-gradient(135deg, #f472b6 0%, #f87171 100%);
    --gradient-blue: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
    --gradient-orange: linear-gradient(135deg, #fb923c 0%, #fbbf24 100%);
    --gradient-green: linear-gradient(135deg, #34d399 0%, #2dd4bf 100%);

    /* ── Shadows (stronger for dark bg) ── */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ── Dark mode: hardcoded surface/background overrides ── */
/* Elements that use hardcoded var(--mud-palette-white) or white for background */
.mud-theme-dark .dialog-premium-body {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.mud-theme-dark .dialog-section {
    background: #1e293b;
    border-color: #334155;
}

.mud-theme-dark .dialog-section-header {
    border-bottom-color: #334155;
}

.mud-theme-dark .dialog-premium-footer {
    background: #1e293b;
    border-top-color: #334155;
}

.mud-theme-dark .dialog-btn-ghost {
    border-color: #475569;
    color: #94a3b8;
}

.mud-theme-dark .dialog-btn-ghost:hover {
    background: #334155;
    border-color: #64748b;
}

.mud-theme-dark .section-title {
    color: var(--primary);
}

.mud-theme-dark .styled-table .mud-table-head .mud-table-row {
    background: linear-gradient(180deg, rgba(129, 140, 248, 0.08) 0%, rgba(129, 140, 248, 0.03) 100%) !important;
}

.mud-theme-dark .styled-table .mud-table-body .mud-table-row:hover {
    background: rgba(129, 140, 248, 0.06) !important;
}

.mud-theme-dark .table-row-avatar {
    box-shadow: 0 2px 8px var(--black-alpha-30);
}

.mud-theme-dark .data-tile {
    background: #1e293b;
    border-color: #334155;
}

.mud-theme-dark .data-tile:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px var(--black-alpha-30);
}

.mud-theme-dark .filter-panel {
    background: #1e293b;
    border-color: #334155;
}

.mud-theme-dark .selection-toolbar {
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.2);
}

.mud-theme-dark .empty-state {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

.mud-theme-dark .shadow-card {
    box-shadow: 0 4px 20px var(--black-alpha-30) !important;
}

/* ── Dark mode: skeleton shimmer adapted ── */
.mud-theme-dark .skeleton-avatar,
.mud-theme-dark .skeleton-line,
.mud-theme-dark .skeleton-badge,
.mud-theme-dark .skeleton-detail,
.mud-theme-dark .crm-skeleton-container [class*="skeleton"] {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%) !important;
    background-size: 200% 100%;
}

/* ==============================================================================
   SECTION 1: Global utilities & components
   ============================================================================== */

/* ========== Global: gradient buttons → white icons ========== */
/* Any button with gradient background and color: white needs its .mud-icon-root to be white too */
.bp-btn-primary .mud-icon-root,
.dialog-btn-primary .mud-icon-root,
.dialog-btn-danger .mud-icon-root,
.dialog-btn-outline .mud-icon-root,
.task-add-btn .mud-icon-root,
.task-add-btn-mud .mud-icon-root,
.crm-settings-add-btn .mud-icon-root,
.crm-professional-add-company-btn .mud-icon-root,
.crm-professional-create-industry-btn .mud-icon-root,
.lead-add-btn .mud-icon-root,
.lead-edit-btn .mud-icon-root,
.lead-empty-btn .mud-icon-root,
.crm-lead-add-btn .mud-icon-root,
.crm-lead-convert-btn .mud-icon-root,
.crm-lead-empty-btn .mud-icon-root,
.crm-opp-add-btn .mud-icon-root,
.crm-opp-win-btn .mud-icon-root,
.crm-opp-lose-btn .mud-icon-root,
.crm-opp-empty-btn .mud-icon-root,
.crm-ls-add-campaign-btn .mud-icon-root,
.contact-view-edit-btn .mud-icon-root,
.contact-view-department-add-btn .mud-icon-root,
.personal-info-edit-btn .mud-icon-root,
.section-edit-btn .mud-icon-root,
.edit-btn .mud-icon-root,
.upload-btn .mud-icon-root,
.back-btn .mud-icon-root,
.generate-btn .mud-icon-root,
.family-edit-btn-submit .mud-icon-root,
.marriage-edit-btn-submit .mud-icon-root,
.pet-edit-btn-submit .mud-icon-root,
.hobbies-tab-add-person-hobby .mud-icon-root,
.pets-tab-add-person-pet .mud-icon-root,
.generic-form-create-form-btn .mud-icon-root,
.generic-form-banner-btn .mud-icon-root,
.generic-form-create-first-btn .mud-icon-root,
.generic-form-create-form-final-btn .mud-icon-root,
.generic-form-btn-primary .mud-icon-root,
.inbox-empty-btn .mud-icon-root,
.dialog-task-target-btn .mud-icon-root {
    color: white;
}

/* ========== BP Styled Table ========== */
.styled-table .mud-table-toolbar {
    display: none;
}

.styled-table.mud-table {
    border: none !important;
    box-shadow: none !important;
}

.styled-table .mud-table-head .mud-table-row,
.styled-table .mud-table-head .mud-table-row th,
.styled-table.mud-table-sticky-header .mud-table-head .mud-table-row,
.styled-table.mud-table-sticky-header .mud-table-head .mud-table-row th {
    background: var(--indigo-alpha-3) !important;
}

.styled-table .mud-table-head .mud-table-cell {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--black-alpha-6);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.styled-table .mud-table-body .mud-table-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--black-alpha-4);
}

.styled-table .mud-table-body .mud-table-row:hover {
    background: var(--indigo-alpha-4) !important;
}

.styled-table .mud-table-body .mud-table-cell:first-child {
    position: relative;
}

.styled-table .mud-table-body .mud-table-cell:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--indigo) 0%, var(--violet) 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.styled-table .mud-table-body .mud-table-row:hover .mud-table-cell:first-child::before {
    transform: scaleY(1);
}

.styled-table .mud-table-body .mud-table-cell {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: none;
    white-space: nowrap;
}

.styled-table .mud-table-pagination {
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* BP Styled Table - variant with visible toolbar */
.styled-table.show-toolbar .mud-table-toolbar {
    display: flex !important;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--black-alpha-6);
}

/* ── Styled Table — variante con bordes internos (bordered) ── */
/* Uso: Class="styled-table bordered" */
.styled-table.bordered .mud-table-head .mud-table-cell {
    border-right: 1px solid var(--black-alpha-6);
}

.styled-table.bordered .mud-table-head .mud-table-cell:last-child {
    border-right: none;
}

.styled-table.bordered .mud-table-body .mud-table-cell {
    border-right: 1px solid var(--black-alpha-4);
    border-bottom: 1px solid var(--black-alpha-4);
}

.styled-table.bordered .mud-table-body .mud-table-cell:last-child {
    border-right: none;
}

.styled-table.bordered .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: none;
}

/* ── Celdas con contenido centrado ── */

/* CENTRADO AUTOMÁTICO (vía :has()) — detecta celdas con elementos UI típicos que deben ir centrados */
/* Switches, checkboxes, chips, badges, iconos de acción, botones — TODOS se centran automáticamente */
.styled-table .mud-table-cell:has(.mud-switch),
.styled-table .mud-table-cell:has(.mud-checkbox),
.styled-table .mud-table-cell:has(.mud-chip),
.styled-table .mud-table-cell:has(.row-actions),
.styled-table .mud-table-cell:has(.tenant-actions),
.styled-table .mud-table-cell:has(.row-action-btn),
.styled-table .mud-table-cell:has(.tenant-action-btn),
.styled-table .mud-table-cell:has(.badge),
.styled-table .mud-table-cell:has(.status-badge),
.styled-table .mud-table-cell:has(.mud-icon-button) {
    text-align: center;
}

/* El MudStack contenedor (display: flex, row) puede extenderse más allá del ancho de los botones.
   Usamos justify-content: center para centrar los botones DENTRO del contenedor,
   independientemente del ancho que tome el contenedor en la celda. */
.styled-table .mud-table-cell .row-actions,
.styled-table .mud-table-cell .tenant-actions {
    justify-content: center;
}

/* Dentro de celda auto-centrada con switch/checkbox:
   Los mud-input-control ocupan todo el ancho del td, entonces centramos el switch/checkbox
   directamente usando margin auto */
.styled-table .mud-table-cell:has(.mud-switch) .mud-input-control,
.styled-table .mud-table-cell:has(.mud-checkbox) .mud-input-control {
    display: inline-flex;
    justify-content: center;
}

.styled-table .mud-table-cell:has(.mud-switch) .mud-switch,
.styled-table .mud-table-cell:has(.mud-checkbox) label {
    margin-left: auto;
    margin-right: auto;
}

/* CENTRADO MANUAL (.cell-center) — para casos donde :has() no aplica:
   texto corto tipo "Yes/No", "Active/Inactive", valores booleanos, counts, etc. */
/* Uso: Class="cell-center" en MudTh/MudTd */
.styled-table .mud-table-cell.cell-center {
    text-align: center;
}

.styled-table .mud-table-cell.cell-center>* {
    margin-left: auto;
    margin-right: auto;
}

/* ── MudCard dentro de celdas: transparente para no romper zebra striping ── */
.styled-table .mud-table-body .mud-table-cell .mud-card {
    background: transparent !important;
    box-shadow: none !important;
}

.styled-table .mud-table-body .mud-table-cell .mud-card-header {
    background: transparent !important;
    padding: 0 !important;
}

/* Avatar en celdas de tabla — tamaño un poco más grande para mejor visibilidad */
.styled-table .mud-table-body .mud-table-cell .mud-card-header-avatar .mud-avatar,
.styled-table .mud-table-body .mud-table-cell .mud-avatar-small {
    width: 40px !important;
    height: 40px !important;
}

/* ── Styled Table Pager — restyle MudTablePager ──
   Restaurado al punto donde el orden estaba correcto, antes de tocar espacios/bordes.
   Desde aquí se irán agregando ajustes paso a paso. */

/* Toolbar como flex horizontal, 1 sola línea — reducir min-height del mud-toolbar */
.styled-table .mud-table-pagination-toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.5rem;
    min-height: unset !important;
}

/* [1] Spacer → ocultar */
.styled-table .mud-table-pagination-toolbar>.mud-table-pagination-spacer {
    display: none !important;
    flex: unset !important;
}

/* [3] Caption "1-10 | 141" → primer bloque (izquierda) */
.styled-table .mud-table-pagination-toolbar>.mud-table-pagination-caption {
    order: 1;
    margin-right: auto;
}

.styled-table .mud-table-page-number-information {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* [4] Actions (flechas) → segundo bloque (centro) */
.styled-table .mud-table-pagination-toolbar>.mud-table-pagination-actions {
    order: 2;
    margin-right: auto;
    display: flex;
    gap: 0.25rem;
}

/* [2] Display "Rows per page:" + select → tercer bloque (derecha) */
.styled-table .mud-table-pagination-toolbar>.mud-table-pagination-display {
    order: 3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Texto "Rows per page:" */
.styled-table .mud-table-pagination-information {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Estilizar los botones de navegación (first, prev, next, last) como en task-page-btn */
.styled-table .mud-table-pagination-actions .mud-button-root {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border: 1px solid var(--border-light);
    background: var(--surface);
    border-radius: 6px;
    color: var(--text-tertiary);
    padding: 0;
    transition: all 0.2s ease;
}

.styled-table .mud-table-pagination-actions .mud-button-root:hover:not(:disabled) {
    background: var(--bg-subtle);
    border-color: var(--border-dark);
    color: var(--text-primary);
}

.styled-table .mud-table-pagination-actions .mud-button-root:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Select de "Rows per page" — SIN borde, estilo minimalista */
.styled-table .mud-table-pagination-select,
.styled-table .mud-table-pagination-select .mud-input-control,
.styled-table .mud-table-pagination-select .mud-input,
.styled-table .mud-table-pagination-select .mud-select-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-top: 0;
    padding-bottom: 0;
    min-height: unset;
    height: auto;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

/* Ocultar el border del input underline y outlined de MudBlazor en el select del pager */
.styled-table .mud-table-pagination-select .mud-input-slot,
.styled-table .mud-table-pagination-select .mud-input-outlined-border,
.styled-table .mud-table-pagination-select .mud-input.mud-input-underline:before,
.styled-table .mud-table-pagination-select .mud-input.mud-input-underline:after {
    border: none !important;
    display: none;
}

/* Responsive */
@media (max-width: 640px) {
    .styled-table .mud-table-pagination-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .styled-table .mud-table-pagination-toolbar>* {
        order: unset !important;
        margin: 0 !important;
    }
}

/* ========== Utility classes globales ========== */
/* Search input que se expande para ocupar el espacio disponible en un action bar */
.search-input-mud.expand-search {
    flex: 1;
    min-width: 300px;
}

/* Tabla con texto sin wrap — alternativa a Style="text-wrap:nowrap" */
.styled-table.nowrap {
    text-wrap: nowrap;
}

/* Columna de tabla estrecha (50px fija) — para checkbox / icono / numeración
   como primera columna. Aplicar en par sobre MudTh + MudTd de la misma columna. */
.col-narrow {
    width: 50px;
}

/* Columna de tabla que absorbe el espacio sobrante — para la columna principal
   (título/nombre) cuando el resto tiene ancho fijo o auto. Aplicar en par sobre
   MudTh + MudTd. Equivalente a Style="width: 90%;" pero sin inline style. */
.col-stretch {
    width: 100%;
}

/* Botones "Add" con estilo rounded custom (reemplaza Style inline en MudButton) */
.bp-btn-rounded {
    border-radius: 10px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

/* ========== BP Tabs ========== */
.styled-tabs .mud-tabs-tabbar-content {
    margin: 10px;
    border-bottom: 1px solid var(--black-alpha-8);
}

/* Separation between individual tab buttons */
.styled-tabs .mud-tab {
    margin: 0 4px;
    border-radius: 8px 8px 0 0;
}

.styled-tabs .mud-tab:first-child {
    margin-left: 0;
}

.styled-tabs .mud-tab:last-child {
    margin-right: 0;
}

/* BP Tabs - variant with centered toolbar (used in wizards/complex forms) */
.styled-tabs.styled-tabs-centered .mud-tabs-toolbar {
    justify-content: center;
}

/* ========== BP Shadow Card (MudPaper with rounded corners + shadow) ========== */
/* Use alongside MudBlazor padding utilities (pa-4, pa-6, etc.) */
.shadow-card {
    border-radius: var(--radius-xl, 16px) !important;
    box-shadow: var(--shadow-card, 0 4px 20px var(--black-alpha-8)) !important;
}

/* ========== BpFileUpload ========== */
/* Usado por Shared/FileUpload/BpFileUpload.razor.
   Antes vivía como <style> block dentro del razor — movido aquí por regla §1 (no <style> blocks).
   ⚠️ Regla GLOBAL: afecta TODOS los MudListItem del proyecto, no solo los de BpFileUpload.
   Se mantiene global para preservar comportamiento visual existente (mover sin scopar). */
.mud-list-item {
    padding-top: 0px;
    padding-bottom: 0px;
}

/* ========== MudSelect / MudMenu dropdown items ========== */
/* Restaura padding vertical cómodo a los items de dropdowns (MudSelect, MudMenu,
   MudAutocomplete), que quedan renderizados dentro de .mud-popover.
   Específico por especificidad (2 clases > 1 clase del override global zero-padding).
   Excluye .mud-list-item-dense para respetar selects con Dense="true".
   Excluye BpFileUpload — no rinde dentro de popover, mantiene padding 0. */
.mud-popover .mud-list-item:not(.mud-list-item-dense) {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* ========== PhoneInputIntl — integración de intl-tel-input con tema MudBlazor ========== */
/* Usado por el componente Shared/Components/IntlTelInput/PhoneInputIntl.razor.
   Antes vivía como <style> block dentro del razor — movido aquí por regla §1 (no <style> blocks). */

/* Sobreescribir variables CSS de intl-tel-input con paleta MudBlazor.
   Se aplica tanto al componente como al dropdown (que se renderiza en body). */
.phone-input,
.iti--container {
    --iti-hover-color: var(--mud-palette-action-default-hover);
    --iti-border-color: var(--mud-palette-lines-default);
    --iti-dialcode-color: var(--mud-palette-text-secondary);
    --iti-dropdown-bg: var(--mud-palette-surface);
    --iti-icon-color: var(--mud-palette-action-default);
}

/* Dropdown del selector de país — z-index alto para quedar encima de MudDialogs y otros overlays.
   Nota: z-index NO resuelve overflow:hidden del contenedor padre — solo apilamiento. */
.iti--container {
    z-index: 9999;
}

/* Input: fondo transparente y color de texto del tema.
   padding-left forzado para evitar que el primer dígito escrito se superponga al dial code
   en países con prefijo de 3 dígitos (+358, +351, +353, +1809, etc.). La librería
   intl-tel-input calcula el padding para dial codes de 2 dígitos máximo ("+1", "+52") — este
   override garantiza espacio suficiente para hasta 4 caracteres. */
.phone-input .iti__tel-input {
    background: transparent !important;
    color: var(--mud-palette-text-primary) !important;
    padding-left: 90px !important;
}

/* Placeholder */
.phone-input .iti__tel-input::placeholder {
    color: var(--mud-palette-text-disabled) !important;
}

/* Código de marcación junto a la bandera */
.phone-input .iti .iti__selected-dial-code {
    color: var(--mud-palette-text-secondary);
}

/* Dropdown: campo de búsqueda */
.iti--container .iti__search-input {
    background-color: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-color: var(--mud-palette-lines-default) !important;
}

/* Dropdown: nombre de país y dial code */
.iti--container .iti__country-name {
    color: var(--mud-palette-text-primary);
}

.iti--container .iti__dial-code {
    color: var(--mud-palette-text-secondary);
}

/* Dropdown: mensaje sin resultados */
.iti--container .iti__no-results {
    color: var(--mud-palette-text-secondary);
}

/* Dropdown: borde y sombra con tema */
.iti--container .iti__dropdown-content {
    border-color: var(--mud-palette-lines-default);
    box-shadow: var(--mud-elevation-8);
}

/* Label siempre en posición shrunk (flotante) sobre el borde outlined */
.phone-input-shrink.mud-input-control .mud-input-label-outlined {
    transform: translate(14px, -6px) scale(0.75) !important;
    background-color: var(--mud-palette-surface);
    padding: 0 4px;
}

/* Margin.Normal (default) — mismo padding que MudBlazor Outlined Normal */
.phone-margin-normal .iti__tel-input {
    padding-top: 16.5px !important;
    padding-bottom: 16.5px !important;
}

/* Margin.Dense — mismo padding que MudBlazor Outlined Dense */
.phone-margin-dense .iti__tel-input {
    padding-top: 8.5px !important;
    padding-bottom: 8.5px !important;
}

/* ========== Utility Classes (no prefix — universal semantics) ========== */

/* Font weight */
.fw-400 {
    font-weight: 400;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

/* Text alignment */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-justify {
    text-align: justify;
}

/* Text color (via MudBlazor theme vars) */
.text-muted {
    color: var(--mud-palette-text-secondary);
}

.text-primary {
    color: var(--mud-palette-primary);
}

.text-error {
    color: var(--mud-palette-error);
}

.text-success {
    color: var(--mud-palette-success);
}

.text-warning {
    color: var(--mud-palette-warning);
}

.text-info {
    color: var(--mud-palette-info);
}

/* Text transform */
.text-uppercase {
    text-transform: uppercase;
}

.text-lowercase {
    text-transform: lowercase;
}

.text-capitalize {
    text-transform: capitalize;
}

/* Font family monospace — alternativa semántica a <code> cuando solo se busca la apariencia */
.text-mono {
    font-family: 'Consolas', 'Courier New', monospace;
}

/* Sizing */
.w-100 {
    width: 100%;
}

.w-auto {
    width: auto;
}

.w-max {
    width: max-content;
}

.h-100 {
    height: 100%;
}

.h-auto {
    height: auto;
}

/* Vertical alignment (inline elements) */
.align-middle {
    vertical-align: middle;
}

.align-top {
    vertical-align: top;
}

.align-bottom {
    vertical-align: bottom;
}

.align-baseline {
    vertical-align: baseline;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.overflow-scroll {
    overflow: scroll;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

.cursor-default {
    cursor: default;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* Letter spacing */
.ls-tight {
    letter-spacing: -0.02em;
}

.ls-normal {
    letter-spacing: 0;
}

.ls-wide {
    letter-spacing: 0.05em;
}

.ls-wider {
    letter-spacing: 0.1em;
}

/* Word break */
.nowrap {
    white-space: nowrap;
}

.text-wrap {
    white-space: normal;
}

/* ==============================================================================
   SECTION 2: Contact Manager / CRM / Shared (from contactManager.css)
   ============================================================================== */
/* =============================================
   CRM CONTACT DETAIL VIEW
   Prefix: contact-view-, personal-info-, crm-contact-detail-
   Used by: ViewContactComponent.razor
   ============================================= */

/* --cm-primary variables unificadas en :root principal (línea 1) */

/* =============================================
   SKELETON LOADING STYLES
   ============================================= */
.crm-skeleton-container {
    padding: 1rem;
}

.crm-skeleton-back,
.crm-skeleton-profile,
.crm-skeleton-tabs,
.crm-skeleton-content,
.crm-skeleton-line,
.crm-skeleton-avatar,
.crm-skeleton-tab,
.crm-skeleton-card {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-subtle) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.crm-skeleton-back {
    height: 48px;
    margin-bottom: 1rem;
}

.crm-skeleton-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.crm-skeleton-avatar {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    flex-shrink: 0;
}

.crm-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-skeleton-line {
    height: 20px;
}

.crm-skeleton-line.w-60 {
    width: 60%;
}

.crm-skeleton-line.w-40 {
    width: 40%;
}

.crm-skeleton-line.w-30 {
    width: 30%;
}

.crm-skeleton-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.crm-skeleton-tab {
    width: 120px;
    height: 40px;
    border-radius: 8px;
}

.crm-skeleton-content {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
}

.crm-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.crm-skeleton-card {
    height: 120px;
    border-radius: 10px;
}

/* =============================================
   CM - CONTACT MANAGER SECTION HEADER
   ============================================= */

.cm-section-header {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border-left: 4px solid var(--mud-palette-primary);
    box-shadow: 0 2px 8px var(--black-alpha-4);
}

.cm-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--mud-palette-primary);
    text-transform: uppercase;
    margin: 0 0 0.375rem 0;
}

.cm-section-subtitle {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

/* =============================================
   CV - CONTACT VIEW COMPONENT STYLES
   ============================================= */

/* ========== BACK CARD ========== */
.contact-view-back-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.contact-view-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-back-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border-color: var(--border-dark);
}

/* ========== PROFILE CARD ========== */
.contact-view-profile-card {
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--black-alpha-6);
    box-shadow: 0 4px 16px var(--black-alpha-6);
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.contact-view-edit-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.contact-view-edit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-40);
}

.contact-view-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.contact-view-avatar {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 8px 24px var(--indigo-alpha-30);
}

.contact-view-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 24px var(--black-alpha-15);
}

.contact-view-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-upload-btn:hover {
    background: var(--border-light);
    color: var(--text-muted);
}

.contact-view-favorite-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-disabled);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--black-alpha-10);
}

.contact-view-favorite-btn:hover {
    color: var(--warning);
    border-color: var(--warning);
    background: var(--mud-palette-surface);
}

.contact-view-favorite-btn.active {
    color: var(--warning);
    background: rgba(251, 191, 36, 0.15);
    border-color: var(--warning-light);
}

.contact-view-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.contact-view-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-view-profile-title {
    font-size: 1rem;
    color: var(--text-secondary);
}

.contact-view-profile-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px var(--black-alpha-8);
}

.contact-view-profile-badge.personal {
    background: linear-gradient(135deg, var(--info-bg), var(--info-bg-light));
    color: var(--info-darker);
}

.contact-view-profile-badge.business {
    background: linear-gradient(135deg, var(--success-bg), var(--success-bg-pastel));
    color: #047857;
}

.contact-view-profile-badge.vip {
    background: linear-gradient(135deg, var(--warning-bg), var(--warning-bg-light));
    color: var(--warning-amber);
}

.contact-view-profile-badge.client {
    background: linear-gradient(135deg, var(--success-bg), var(--success-bg-pastel));
    color: #047857;
}

.contact-view-profile-badge.lead {
    background: linear-gradient(135deg, var(--indigo-light), var(--purple-bg-indigo));
    color: var(--indigo-darker);
}

.contact-view-profile-badge.partner {
    background: linear-gradient(135deg, var(--pink-bg), var(--pink-bg-light));
    color: #be185d;
}

.contact-view-profile-badge.vendor {
    background: linear-gradient(135deg, var(--orange-pastel), #fed7aa);
    color: #c2410c;
}

.contact-view-profile-badge.individual {
    background: linear-gradient(135deg, var(--info-bg), var(--info-bg-light));
    color: var(--info-darker);
}

.contact-view-profile-badge.company {
    background: linear-gradient(135deg, var(--purple-bg), var(--purple-bg-light));
    color: var(--violet-dark);
}

/* ========== DETAIL TABS ========== */
.contact-view-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--mud-palette-surface);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.contact-view-detail-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-detail-tab-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.contact-view-detail-tab-btn.active {
    background: linear-gradient(135deg, var(--indigo-lightest), var(--indigo-light));
    color: var(--indigo);
    border-color: var(--purple-bg-indigo);
    font-weight: 600;
}

/* ========== CONTENT CARD ========== */
.contact-view-content-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    border: 1px solid var(--black-alpha-4);
}

.contact-view-content-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Override absolute positioning for edit button inside content title */
.contact-view-content-title .contact-view-edit-btn {
    position: static;
    flex-shrink: 0;
}

/* ========== STATUS GRID (AVALME) ========== */
.contact-view-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-view-status-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--mud-palette-background);
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
}

.contact-view-status-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
}

.contact-view-status-value {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    font-weight: 500;
}

.contact-view-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    width: fit-content;
}

.contact-view-status-badge.connected {
    background: linear-gradient(135deg, var(--success-bg), var(--success-bg-pastel));
    color: #047857;
}

.contact-view-status-badge.pending {
    background: linear-gradient(135deg, var(--warning-bg), var(--warning-bg-light));
    color: var(--warning-amber);
}

.contact-view-status-badge.not-connected {
    background: linear-gradient(135deg, var(--bg-subtle), var(--border-light));
    color: var(--text-secondary);
}

/* ========== ACTIONS SECTION ========== */
.contact-view-actions-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--bg-subtle);
}

.contact-view-actions-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-view-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-view-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.contact-view-action-btn.primary {
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    color: white;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.contact-view-action-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-40);
}

.contact-view-action-btn.secondary {
    background: var(--bg-subtle);
    color: var(--text-tertiary);
    border: 1px solid var(--border-light);
}

.contact-view-action-btn.secondary:hover:not(:disabled) {
    background: var(--border-light);
}

.contact-view-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== CONNECTIONS LIST ========== */
.contact-view-connections-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-view-connection-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--bg-page);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.contact-view-connection-item:hover {
    background: var(--bg-subtle);
    border-color: var(--border-light);
}

.contact-view-connection-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.contact-view-connection-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.contact-view-connection-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-view-connection-relationship {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ========== FORM SECTIONS ========== */

.contact-view-form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}


.contact-view-form-section-title .mud-icon-root {
    color: var(--indigo);
}

.contact-view-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.contact-view-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.contact-view-form-group.full-width {
    grid-column: 1 / -1;
}

.contact-view-form-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-disabled);
}

.contact-view-form-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    background: var(--bg-page);
    border-radius: 6px;
    border: 1px solid var(--bg-subtle);
    display: flex;
    align-items: center;
    min-height: 40px;
}

.contact-view-form-value.empty {
    color: var(--text-disabled);
    font-style: italic;
}

/* =============================================
   PI - PERSONAL INFORMATION SECTION STYLES
   ============================================= */




.personal-info-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: var(--indigo-lightest);
    border: 1px solid var(--purple-bg-indigo);
    border-radius: 6px;
    color: var(--indigo);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.personal-info-edit-btn:hover {
    background: var(--indigo);
    color: white;
    border-color: var(--indigo);
}











.personal-info-link:hover {
    text-decoration: underline;
}


.personal-info-days-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.personal-info-day-tag {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.personal-info-day-tag.weekday {
    background: linear-gradient(135deg, var(--indigo-lightest), var(--indigo-light));
    color: var(--indigo);
}

.personal-info-day-tag.weekend {
    background: linear-gradient(135deg, var(--warning-bg), var(--warning-bg-light));
    color: var(--warning-amber);
}

/* =============================================
   MULTI-ENTRY LIST STYLES (Email, Phone, Address)
   ============================================= */

.crm-contact-detail-multi-entry-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.crm-contact-detail-multi-entry-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--bg-page);
    border-radius: 10px;
    border: 1px solid transparent;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.crm-contact-detail-multi-entry-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--violet-dark), var(--indigo));
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px 0 0 10px;
}

.crm-contact-detail-multi-entry-row:hover {
    background: var(--bg-subtle);
    border-color: var(--border-light);
    box-shadow: 0 2px 8px var(--indigo-alpha-10);
}

.crm-contact-detail-multi-entry-row:hover::before {
    transform: scaleY(1);
}

.crm-contact-detail-multi-entry-row.primary {
    background: #fefce8;
    border-color: #fef08a;
}

.crm-contact-detail-multi-entry-row.primary::before {
    background: linear-gradient(180deg, #eab308, #ca8a04);
    transform: scaleY(1);
}

.crm-contact-detail-entry-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--indigo-lightest), var(--indigo-light));
    color: var(--indigo);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.crm-contact-detail-multi-entry-row:hover .crm-contact-detail-entry-icon {
    background: linear-gradient(135deg, var(--violet-dark), var(--indigo));
    color: white;
}

.crm-contact-detail-multi-entry-row.primary .crm-contact-detail-entry-icon {
    background: linear-gradient(135deg, var(--warning-bg), var(--warning-bg-light));
    color: var(--warning-dark);
}

.crm-contact-detail-entry-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.crm-contact-detail-entry-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.crm-contact-detail-entry-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.crm-contact-detail-primary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--warning-bg), var(--warning-bg-light));
    color: var(--warning-amber);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid var(--warning-pale);
    flex-shrink: 0;
}

/* =============================================
   EMPTY STATE STYLES
   ============================================= */

.crm-empty-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 16px;
    gap: 0.75rem;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-surface);
    border: 2px dashed var(--mud-palette-lines-default);
}

.crm-empty-state-box.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.04) 0%, rgba(168, 85, 247, 0.04) 100%);
    border-color: var(--violet-alpha-15);
}

.crm-empty-state-box.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(96, 165, 250, 0.04) 100%);
    border-color: var(--info-alpha-15);
}

.crm-empty-state-box.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.04) 0%, rgba(74, 222, 128, 0.04) 100%);
    border-color: var(--success-light-alpha-15);
}

.crm-empty-state-box.orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.04) 0%, rgba(251, 146, 60, 0.04) 100%);
    border-color: var(--orange-alpha-15);
}

.crm-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo-alpha-12) 0%, rgba(139, 92, 246, 0.12) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    position: relative;
    box-shadow: 0 4px 16px var(--black-alpha-6);
}

.crm-empty-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed var(--indigo-alpha-20);
    animation: emptyIconPulse 3s ease-in-out infinite;
}

@keyframes emptyIconPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.crm-empty-icon .mud-icon-root {
    color: var(--indigo);
    font-size: 2rem;
}

.crm-empty-state-box.purple .crm-empty-icon {
    background: linear-gradient(135deg, var(--violet-alpha-15) 0%, rgba(168, 85, 247, 0.15) 100%);
}

.crm-empty-state-box.purple .crm-empty-icon::before {
    border-color: rgba(139, 92, 246, 0.25);
}

.crm-empty-state-box.purple .crm-empty-icon .mud-icon-root {
    color: var(--violet);
}

.crm-empty-state-box.blue .crm-empty-icon {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(96, 165, 250, 0.15) 100%);
}

.crm-empty-state-box.blue .crm-empty-icon::before {
    border-color: rgba(59, 130, 246, 0.25);
}

.crm-empty-state-box.blue .crm-empty-icon .mud-icon-root {
    color: var(--info);
}

.crm-empty-state-box.green .crm-empty-icon {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, rgba(52, 211, 153, 0.15) 100%);
}

.crm-empty-state-box.green .crm-empty-icon::before {
    border-color: rgba(16, 185, 129, 0.25);
}

.crm-empty-state-box.green .crm-empty-icon .mud-icon-root {
    color: var(--success);
}

.crm-empty-state-box.orange .crm-empty-icon {
    background: linear-gradient(135deg, var(--orange-alpha-15) 0%, rgba(251, 146, 60, 0.15) 100%);
}

.crm-empty-state-box.orange .crm-empty-icon::before {
    border-color: rgba(249, 115, 22, 0.25);
}

.crm-empty-state-box.orange .crm-empty-icon .mud-icon-root {
    color: var(--orange);
}

.crm-empty-content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    text-align: center;
    max-width: 280px;
}

.crm-empty-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary-alt);
    letter-spacing: -0.01em;
}

.crm-empty-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.crm-empty-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--indigo-alpha-35);
}

.crm-empty-action .mud-icon-root {
    font-size: 1.125rem;
}

.crm-empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

/* Orange themed empty action button */
.crm-empty-state-box.orange .crm-empty-action {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.crm-empty-state-box.orange .crm-empty-action:hover {
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.45);
}

/* Green themed empty action button */
.crm-empty-state-box.green .crm-empty-action {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.crm-empty-state-box.green .crm-empty-action:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* =============================================
   FAMILY LIST STYLES
   ============================================= */

.contact-view-family-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-view-family-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--bg-page);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.contact-view-family-item:hover {
    background: var(--bg-subtle);
    border-color: var(--border-light);
}

.contact-view-family-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.contact-view-family-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.contact-view-family-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-view-family-relationship {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.contact-view-family-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.contact-view-family-item:hover .contact-view-family-actions {
    opacity: 1;
}


.contact-view-icon-btn:hover {
    background: var(--error-bg);
    color: var(--error);
}

/* =============================================
   MESSAGING LIST STYLES
   ============================================= */

.crm-contact-detail-messaging-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-contact-detail-messaging-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.crm-contact-detail-messaging-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--indigo-alpha-10);
}

.crm-contact-detail-messaging-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Messaging App Icon Colors */
.crm-contact-detail-messaging-icon.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.crm-contact-detail-messaging-icon.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.crm-contact-detail-messaging-icon.signal {
    background: linear-gradient(135deg, #3a76f0 0%, #2c5fc5 100%);
}

.crm-contact-detail-messaging-icon.messenger {
    background: linear-gradient(135deg, #00b2ff 0%, #006aff 50%, #9b36ff 100%);
}

.crm-contact-detail-messaging-icon.imessage {
    background: linear-gradient(135deg, #34c759 0%, #30b350 100%);
}

.crm-contact-detail-messaging-icon.slack {
    background: linear-gradient(135deg, #4a154b 0%, #611f69 100%);
}

.crm-contact-detail-messaging-icon.discord {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
}

.crm-contact-detail-messaging-icon.skype {
    background: linear-gradient(135deg, #00aff0 0%, #0078d7 100%);
}

.crm-contact-detail-messaging-icon.teams {
    background: linear-gradient(135deg, #5059c9 0%, #4b32c3 100%);
}

.crm-contact-detail-messaging-icon.zoom {
    background: linear-gradient(135deg, #2d8cff 0%, #0b5cff 100%);
}

.crm-contact-detail-messaging-icon.other {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
}

/* Social Media Platform Icons */
.crm-contact-detail-messaging-icon.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.crm-contact-detail-messaging-icon.twitter,
.crm-contact-detail-messaging-icon.x {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8ddb 100%);
}

.crm-contact-detail-messaging-icon.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.crm-contact-detail-messaging-icon.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.crm-contact-detail-messaging-icon.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.crm-contact-detail-messaging-icon.tiktok {
    background: linear-gradient(135deg, #000000 0%, #25f4ee 50%, #fe2c55 100%);
}

.crm-contact-detail-messaging-icon.pinterest {
    background: linear-gradient(135deg, #e60023 0%, #ad081b 100%);
}

.crm-contact-detail-messaging-icon.snapchat {
    background: linear-gradient(135deg, #fffc00 0%, #ffeb3b 100%);
    color: #000;
}

.crm-contact-detail-messaging-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.crm-contact-detail-messaging-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.crm-contact-detail-messaging-handle {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================
   TASK LIST STYLES
   ============================================= */

.contact-view-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-view-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-page);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.contact-view-task-item:hover {
    background: var(--bg-subtle);
    border-color: var(--border-light);
}

.contact-view-task-item.overdue {
    background: var(--error-bg-light);
    border-color: var(--error-pastel);
}

.contact-view-task-checkbox {
    flex-shrink: 0;
}

.contact-view-task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.contact-view-task-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-view-task-due {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.contact-view-task-priority {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.contact-view-task-priority.priority-high {
    background: var(--error-bg-light);
    color: var(--error-dark);
}

.contact-view-task-priority.priority-medium {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.contact-view-task-priority.priority-low {
    background: var(--info-bg);
    color: var(--info-dark);
}

/* =============================================
   FOLLOW-UP LIST STYLES
   ============================================= */

.contact-view-followup-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-view-followup-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-page);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.contact-view-followup-item:hover {
    background: var(--bg-subtle);
    border-color: var(--border-light);
}

.contact-view-followup-item.completed {
    opacity: 0.6;
}

.contact-view-followup-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--indigo-lightest), var(--indigo-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo);
    flex-shrink: 0;
}

.contact-view-followup-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-view-followup-type {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-view-followup-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.contact-view-followup-notes {
    font-size: 0.8125rem;
    color: var(--text-disabled);
    margin-top: 0.25rem;
}

/* =============================================
   NOT FOUND STYLES
   ============================================= */

.contact-view-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.contact-view-not-found-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-disabled);
    margin-bottom: 1.5rem;
}

.contact-view-not-found h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
}

.contact-view-not-found p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
}

/* =============================================
   ADDITIONAL EMPTY STATE COLORS
   ============================================= */

.crm-empty-state-box.pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.04) 0%, rgba(244, 114, 182, 0.04) 100%);
    border-color: var(--pink-alpha-15);
}

.crm-empty-state-box.pink .crm-empty-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(244, 114, 182, 0.12) 100%);
}

.crm-empty-state-box.pink .crm-empty-icon .mud-icon-root {
    color: var(--pink);
}

.crm-empty-state-box.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.04) 0%, rgba(45, 212, 191, 0.04) 100%);
    border-color: rgba(20, 184, 166, 0.15);
}

.crm-empty-state-box.teal .crm-empty-icon {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12) 0%, rgba(45, 212, 191, 0.12) 100%);
}

.crm-empty-state-box.teal .crm-empty-icon .mud-icon-root {
    color: var(--teal);
}

.crm-empty-state-box.indigo {
    background: linear-gradient(135deg, var(--indigo-alpha-4) 0%, rgba(129, 140, 248, 0.04) 100%);
    border-color: var(--indigo-alpha-15);
}

.crm-empty-state-box.indigo .crm-empty-icon {
    background: linear-gradient(135deg, var(--indigo-alpha-12) 0%, rgba(129, 140, 248, 0.12) 100%);
}

.crm-empty-state-box.indigo .crm-empty-icon .mud-icon-root {
    color: var(--indigo);
}

/* =============================================
   RESPONSIVE STYLES
   ============================================= */

@media (max-width: 768px) {
    .contact-view-profile-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .contact-view-edit-btn {
        position: static;
        margin-bottom: 1rem;
    }

    .contact-view-detail-tabs {
        justify-content: center;
    }

    .contact-view-form-grid {
        grid-template-columns: 1fr;
    }

    .personal-info-grid-2,
    .personal-info-grid-3,
    .personal-info-grid-4,
    .personal-info-grid-5 {
        grid-template-columns: 1fr;
    }

    .contact-view-status-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   PI - PERSONAL INFORMATION SECTION STYLES
   Used by: ViewContactComponent.razor
   ============================================= */

/* Section Card */

.personal-info-section-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 2px 8px var(--black-alpha-4);
}

/* Section Header */


/* Edit Button - Hidden by default, shown on hover */
.personal-info-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(8px);
}

.personal-info-section-card:hover .personal-info-edit-btn {
    opacity: 1;
    transform: translateX(0);
}

.personal-info-edit-btn:hover {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet-dark) 100%);
    border-color: var(--indigo);
    color: white;
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
    transform: translateY(-1px);
}

.personal-info-edit-btn:active {
    transform: translateY(0) scale(0.98);
}

.personal-info-edit-btn .mud-icon-root {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.personal-info-edit-btn:hover .mud-icon-root {
    transform: rotate(-5deg) scale(1.1);
}

/* Grid Layouts */






/* Field Styles */




.personal-info-link:hover {
    color: var(--indigo-dark);
    text-decoration: underline;
}


/* Communication Preferences - Enhanced Field Styles */
.personal-info-comm-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.personal-info-comm-field:hover {
    border-color: var(--purple-bg-indigo);
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    box-shadow: 0 2px 8px var(--indigo-alpha-8);
}

.personal-info-comm-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.personal-info-comm-icon.languages {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.personal-info-comm-icon.preferred-lang {
    background: linear-gradient(135deg, var(--violet) 0%, var(--violet-darker) 100%);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}

.personal-info-comm-icon.method {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    box-shadow: 0 3px 10px rgba(20, 184, 166, 0.3);
}

.personal-info-comm-icon.time {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.personal-info-comm-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.personal-info-comm-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-disabled);
}

.personal-info-comm-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.personal-info-comm-value.empty {
    color: var(--text-disabled);
    font-style: italic;
}

/* Communication Grid */
.personal-info-comm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 992px) {
    .personal-info-comm-grid {
        grid-template-columns: 1fr;
    }
}

/* Day Tags - Enhanced */
.personal-info-days-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border-radius: 12px;
    border: 1px solid var(--purple-bg-light);
}

.personal-info-days-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.personal-info-days-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--violet-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.personal-info-days-icon .mud-icon-root {
    font-size: 0.875rem;
}

.personal-info-days-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--violet-dark);
}

.personal-info-days-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.personal-info-day-tag {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
}

.personal-info-day-tag:hover {
    transform: translateY(-1px);
}

.personal-info-day-tag.weekday {
    background: linear-gradient(135deg, var(--indigo-lightest), var(--indigo-light));
    color: var(--indigo-dark);
    border: 1px solid var(--purple-bg-indigo);
    box-shadow: 0 2px 4px var(--indigo-alpha-10);
}

.personal-info-day-tag.weekday:hover {
    background: linear-gradient(135deg, var(--indigo-light), var(--purple-bg-indigo));
    box-shadow: 0 4px 8px var(--indigo-alpha-15);
}

.personal-info-day-tag.weekend {
    background: linear-gradient(135deg, var(--warning-bg), var(--warning-bg-light));
    color: #92400e;
    border: 1px solid var(--warning-pale);
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.15);
}

.personal-info-day-tag.weekend:hover {
    background: linear-gradient(135deg, var(--warning-bg-light), var(--warning-pale));
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
}

/* Skills & Certifications Grid */
.personal-info-skills-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.personal-info-skill-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.personal-info-skill-card:hover {
    border-color: var(--success-bg-pastel);
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--success-bg-lighter) 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.personal-info-skill-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
}

.personal-info-skill-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.personal-info-skill-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.personal-info-skill-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
}

.personal-info-skill-value.empty {
    color: var(--text-disabled);
    font-style: italic;
}

/* Skills Tags Container */
.personal-info-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.personal-info-skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, var(--success-bg-light), var(--success-bg));
    color: var(--success-dark);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--success-bg-pastel);
}

.personal-info-skill-tag:hover {
    background: linear-gradient(135deg, var(--success-bg), var(--success-bg-pastel));
}

/* Notes Section Styles */
.personal-info-notes-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.personal-info-note-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border-radius: 12px;
    border: 1px solid var(--purple-bg-light);
    transition: all 0.2s ease;
}

.personal-info-note-card:hover {
    border-color: #d8b4fe;
    box-shadow: 0 2px 8px var(--violet-alpha-10);
}

.personal-info-note-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}

.personal-info-note-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.personal-info-note-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--violet-dark);
}

.personal-info-note-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 60px;
}

.personal-info-note-value.empty {
    color: var(--violet-light);
    font-style: italic;
}

/* ========== TASK LIST STYLES ========== */

/* Task Stats Grid */

@media (max-width: 768px) {
    .task-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


.task-stat-card:hover {
    border-color: var(--purple-bg-indigo);
    box-shadow: 0 2px 8px var(--indigo-alpha-10);
}


.task-stat-icon.blue {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

.task-stat-icon.amber {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
}

.task-stat-icon.green {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%);
    box-shadow: 0 3px 8px rgba(34, 197, 94, 0.3);
}

.task-stat-icon.red {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
}

.task-stat-info {
    display: flex;
    flex-direction: column;
}



/* Task Filter Bar */
.task-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.375rem;
    background: var(--bg-subtle);
    border-radius: 10px;
}

/* ALTERNATIVA A: tabs compactos sin borde

    .task-filter-btn:hover {
        color: var(--text-muted);
        background: rgba(255, 255, 255, 0.5);
    }

    .task-filter-btn.active {
        background: white;
        color: var(--indigo);
        box-shadow: 0 1px 3px var(--black-alpha-10);
    }
*/

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.task-item:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 2px 8px var(--black-alpha-8);
}

.task-item.completed {
    opacity: 0.7;
    background: var(--mud-palette-background);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--mud-palette-text-secondary);
}

.task-item.overdue {
    border-left: 4px solid var(--error) !important;
}

.task-item.overdue:not(.completed) {
    background: linear-gradient(90deg, var(--error-bg-light) 0%, white 100%);
}

.task-checkbox {
    padding-top: 0.125rem;
}

.task-content {
    flex: 1;
    min-width: 0;
}


.task-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}


.task-priority.priority-high {
    background: linear-gradient(135deg, var(--error-bg-light), var(--error-bg));
    color: var(--error-dark);
    border: 1px solid var(--error-pastel);
}

.task-priority.priority-medium {
    background: linear-gradient(135deg, #fffbeb, var(--warning-bg));
    color: var(--warning-dark);
    border: 1px solid var(--warning-bg-light);
}

.task-priority.priority-low {
    background: linear-gradient(135deg, var(--info-bg-lighter), var(--info-bg));
    color: var(--info-dark);
    border: 1px solid var(--info-bg-light);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.task-meta .overdue {
    color: var(--error);
    font-weight: 600;
}

.task-due {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.task-due.overdue {
    color: var(--error) !important;
    font-weight: 600;
    background: var(--error-alpha-10);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.task-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.task-category {
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.task-description {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.5;
}

.task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-action-btn:hover {
    background: var(--indigo-light);
    color: var(--indigo);
}

.task-action-btn.delete:hover {
    background: var(--error-bg);
    color: var(--error);
}

/* Task Add Button - MudButton Style */
.task-add-btn-mud {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%) !important;
    box-shadow: 0 2px 8px var(--indigo-alpha-25) !important;
    border-radius: 8px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
}

.task-add-btn-mud:hover {
    background: linear-gradient(135deg, var(--indigo-dark) 0%, var(--violet-dark) 100%) !important;
    box-shadow: 0 4px 16px var(--indigo-alpha-40) !important;
    transform: translateY(-1px);
}

/* Fallback for regular button */
.task-add-btn,
button.task-add-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%) !important;
    border: none;
    border-radius: 8px;
    color: white !important;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--indigo-alpha-25);
    transform: none !important;
}

.task-add-btn:hover,
button.task-add-btn:hover {
    background: linear-gradient(135deg, var(--indigo-dark) 0%, var(--violet-dark) 100%) !important;
    box-shadow: 0 4px 16px var(--indigo-alpha-40);
    transform: translateY(-1px) !important;
}

.task-add-btn:active,
button.task-add-btn:active {
    transform: translateY(0) scale(0.98) !important;
}

.task-add-btn .mud-icon-root,
button.task-add-btn .mud-icon-root {
    font-size: 1rem;
}

/* Task Loading State */
.task-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Task Pagination */
.task-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.task-pagination-info {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.task-pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 6px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-page-btn:hover:not(:disabled) {
    background: var(--bg-subtle);
    border-color: var(--border-dark);
    color: var(--text-primary);
}

.task-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.task-page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0.5rem;
}

.task-page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 6px;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-page-num:hover:not(.active) {
    background: var(--bg-subtle);
    border-color: var(--border-dark);
}

.task-page-num.active {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-color: var(--indigo);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.task-page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-disabled);
    font-size: 0.875rem;
}

.task-pagination-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.task-page-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-page-select:hover {
    border-color: var(--border-dark);
}

.task-page-select:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-alpha-10);
}

/* Responsive Pagination */
@media (max-width: 640px) {
    .task-pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .task-pagination-controls {
        justify-content: center;
    }

    .task-pagination-size {
        justify-content: center;
    }

    .task-page-numbers {
        display: none;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .personal-info-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {

    .personal-info-grid-4,
    .personal-info-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .personal-info-grid-2,
    .personal-info-grid-3,
    .personal-info-grid-4,
    .personal-info-grid-5 {
        grid-template-columns: 1fr;
    }

    .personal-info-section-card {
        padding: 1rem;
    }

    /* Always show edit button on mobile */
    .personal-info-edit-btn {
        opacity: 1;
        transform: translateX(0);
    }
}

.crm-personal-info-dialog-header {
    display: flex;
    align-items: center;
}

.crm-personal-info-dialog-content {
    min-width: 500px;
    padding: 1rem 0;
}

.crm-personal-info-dialog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.crm-personal-info-dialog-field {
    min-width: 0;
}

@media (max-width: 600px) {
    .crm-personal-info-dialog-content {
        min-width: 100%;
    }

    .crm-personal-info-dialog-grid {
        grid-template-columns: 1fr;
    }
}


/* =============================================
   CRM EDIT DIALOG - Ultra Modern Design
   Unique prefix: dialog-
   Used by: EmailEditDialog, PhoneEditDialog
   ============================================= */

.dialog-premium .mud-dialog {
    border-radius: 24px;
    overflow: hidden;
    background: var(--mud-palette-white);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 16px rgba(0, 0, 0, 0.06), 0 24px 48px rgba(0, 0, 0, 0.08);
    max-width: 560px;
    width: 100%;
}

.dialog-premium .mud-dialog-title,
.dialog-premium .mud-dialog-content,
.dialog-premium .mud-dialog-actions {
    padding: 0 !important;
    background: transparent;
}

/* ========== HEADER ========== */
.dialog-premium-header {
    position: relative;
    padding: 1.75rem 2rem;
    overflow: hidden;
}

.dialog-theme .dialog-premium-header {
    background: linear-gradient(135deg, var(--indigo-dark) 0%, var(--violet-dark) 50%, var(--purple-light) 100%);
}

/* Variante warning del header premium — para RemoveConfirmationDialog (desvinculación, reversible) */
.dialog-premium-header.dialog-premium-header-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
}

/* Variante danger del header premium — para DeleteConfirmationDialog (destructiva, irreversible) */
.dialog-premium-header.dialog-premium-header-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
}

/* Variante success del header premium — para dialogs de confirmación positiva (GenericDialog con Color.Success) */
.dialog-premium-header.dialog-premium-header-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}

.dialog-header-bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.dialog-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
}

.dialog-orb-1 {
    width: 200px;
    height: 200px;
    background: #c4b5fd;
    top: -60px;
    right: -40px;
    animation: dialog-float1 6s ease-in-out infinite;
}

.dialog-orb-2 {
    width: 150px;
    height: 150px;
    background: var(--violet-light);
    bottom: -40px;
    left: 20%;
    animation: dialog-float2 8s ease-in-out infinite;
}

@keyframes dialog-float1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, 10px) scale(1.1);
    }
}

@keyframes dialog-float2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(15px, -15px) scale(0.9);
    }
}

.dialog-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.dialog-header-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 1;
}

.dialog-icon-container {
    position: relative;
    flex-shrink: 0;
}

.dialog-icon-glow {
    position: absolute;
    inset: -8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    filter: blur(12px);
    animation: dialog-glow-pulse 2s ease-in-out infinite;
}

@keyframes dialog-glow-pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.dialog-icon-box {
    position: relative;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-alpha-15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    color: white;
}

.dialog-header-info {
    flex: 1;
    min-width: 0;
}

.dialog-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    background: var(--white-alpha-15);
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: white;
    margin-bottom: 0.625rem;
}

.dialog-tag-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: dialog-blink 1.5s ease-in-out infinite;
}

@keyframes dialog-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.dialog-header-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.dialog-header-desc {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.dialog-header-desc strong {
    color: white;
    font-weight: 600;
}

.dialog-header-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background: var(--white-alpha-15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
    margin-right: 2rem;
}

/* Close Button */
.dialog-premium .mud-dialog-close-button {
    position: absolute !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    color: white !important;
    background: var(--white-alpha-15) !important;
    border-radius: 8px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    z-index: 100 !important;
    transition: all 0.2s ease !important;
}

.dialog-premium .mud-dialog-close-button:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.05);
}

.dialog-premium .mud-dialog-close-button .mud-icon-root {
    font-size: 1.125rem !important;
}

.dialog-counter-num {
    font-size: 1.375rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dialog-counter-label {
    font-size: 0.5625rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.125rem;
}

/* ========== BODY ========== */
.dialog-premium-body {
    padding: 1.5rem;
    background: linear-gradient(180deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Panel interno con fondo sutil — usado para envolver MudTreeView, MudList u
   otros contenedores secundarios dentro del body de un dialog premium.
   Compone con utilities: `Class="pa-2 rounded-lg dialog-inner-panel"`.
   El token dark-mode `--mud-palette-background-grey` da contraste correcto
   contra el gradient del .dialog-premium-body. */
.dialog-inner-panel {
    background-color: var(--mud-palette-background-grey);
}

/* Input visualmente "inactivo" — usado en páginas View/Details (§23.4).
   Replica el look de MudBlazor Disabled (color disabled token, cursor default,
   fondo gris) pero conserva la legibilidad del ReadOnly. Compone con
   MudTextField ReadOnly=true.
   Uso: `<MudTextField ReadOnly="true" Class="readonly-input" ... />` */
.readonly-input .mud-input-control-input-container {
    background-color: var(--mud-palette-background-grey) !important;
    border-radius: 4px;
}

.readonly-input .mud-input input,
.readonly-input .mud-input textarea,
.readonly-input .mud-select-input {
    color: var(--mud-palette-text-secondary) !important;
    cursor: default !important;
}

.readonly-input .mud-input-label,
.readonly-input .mud-input-adornment .mud-icon-root {
    color: var(--mud-palette-action-disabled) !important;
}

.readonly-input .mud-input-outlined-border {
    border-color: var(--mud-palette-action-disabled) !important;
    border-style: solid !important;
}

/* Section Content Padding */
.dialog-task-section .dialog-section-header+* {
    padding: 1rem 1.25rem;
}

.dialog-task-section .dialog-section-header+.dialog-task-templates-list {
    padding: 1rem 1.25rem;
}

.dialog-task-section .dialog-items-list {
    padding: 0.75rem 1.25rem;
}

.dialog-task-section .dialog-add-more-btn {
    margin: 0 1.25rem 1rem;
}

.dialog-task-section .dialog-form-grid {
    padding: 1rem 1.25rem;
}

.dialog-task-section .dialog-form-grid+.dialog-form-grid {
    padding-top: 0;
}

.dialog-task-section .dialog-task-reminder-info {
    margin: 0 1.25rem 1rem;
}

/* Form Grid - for form-based dialogs */

.dialog-form-grid.one-column {
    grid-template-columns: repeat(1, 1fr) !important;
}


.dialog-form-field:only-child,
.dialog-form-field.dialog-full-width {
    grid-column: 1 / -1;
}


.dialog-form-input .mud-input-control-input-container {
    margin-top: 0 !important;
}

.dialog-form-input .mud-input-outlined-border {
    border-color: var(--border-light) !important;
    transition: all 0.2s ease !important;
}

.dialog-form-input:hover .mud-input-outlined-border {
    border-color: var(--border-dark) !important;
}

.dialog-form-input.mud-input-root-focused .mud-input-outlined-border,
.dialog-form-input .mud-input:focus-within .mud-input-outlined-border {
    border-color: var(--violet-light) !important;
    border-width: 2px !important;
}

.dialog-form-input .mud-input-label {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

.dialog-form-input .mud-input-label-inputcontrol {
    font-size: 0.875rem !important;
}

.dialog-form-input input,
.dialog-form-input .mud-select-input {
    font-size: 0.9375rem !important;
    color: var(--text-primary) !important;
}

/* Solo ajusta font-size; el color lo gobierna MudBlazor:
   - Estado normal → var(--mud-palette-text-secondary) (gris muted)
   - Estado error (.mud-input-error cascade) → var(--mud-palette-error) (rojo)
   Antes forzábamos `color: var(--text-disabled) !important` y anulaba el rojo de error. */
.dialog-form-input .mud-input-helper-text {
    font-size: 0.75rem !important;
}

@media (max-width: 600px) {
    .dialog-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Zero State */
.dialog-zero-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
}

.dialog-zero-visual {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
}

.dialog-zero-rings {
    position: absolute;
    inset: 0;
}

.dialog-ring {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    animation: dialog-ring-expand 3s ease-out infinite;
}

.dialog-theme .dialog-ring {
    border-color: var(--violet-light);
}

.dialog-ring-1 {
    inset: 0;
    animation-delay: 0s;
}

.dialog-ring-2 {
    inset: -10px;
    animation-delay: 1s;
}

.dialog-ring-3 {
    inset: -20px;
    animation-delay: 2s;
}

@keyframes dialog-ring-expand {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.dialog-zero-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dialog-theme .dialog-zero-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: var(--violet-dark);
}

.dialog-zero-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dialog-zero-text {
    margin: 0.5rem 0 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.dialog-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-theme .dialog-cta-btn {
    background: linear-gradient(135deg, var(--violet-dark), var(--violet-darker));
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.dialog-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.45);
}

.dialog-cta-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

/* Items List */
.dialog-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* ========== ROW STYLES (Shared) ========== */
.dialog-email-row,
.dialog-phone-row,
.dialog-address-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-white);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    transition: all 0.2s ease;
    animation: dialog-row-in 0.3s ease backwards;
    animation-delay: calc(var(--i) * 0.05s);
}

.dialog-email-row,
.dialog-phone-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Phone Input Wrapper with IntlPhoneInput */
.dialog-phone-input-wrapper {
    flex: 1;
    min-width: 240px;
}

.dialog-phone-input-wrapper .intl-phone-wrapper {
    gap: 0;
}

.dialog-phone-input-wrapper .intl-phone-input {
    min-height: 46px;
    background: var(--mud-palette-surface);
    border-width: 1.5px;
}

.dialog-phone-input-wrapper .intl-phone-country-selector {
    padding: 0.625rem 0.5rem 0.625rem 0.875rem;
    gap: 0.5rem;
}

.dialog-phone-input-wrapper .intl-phone-flag-img {
    width: 22px;
    height: 16px;
}

.dialog-phone-input-wrapper .intl-phone-dial-code {
    font-size: 0.875rem;
    min-width: 34px;
}

.intl-phone-number-input-label label:first-of-type {
    z-index: 99 !important;
    font-size: 11px !important;
    top: -21px !important;
}

.dialog-phone-input-wrapper .intl-phone-number-input {
    /*padding: 0.625rem 0.875rem;
        font-size: 0.9375rem;*/
    padding: 0 0 0 5px !important;
    margin: 0 !important;
}

.dialog-phone-input-wrapper .intl-phone-number-input .mud-input {
    margin-top: 0 !important;
}

.dialog-phone-input-wrapper .intl-phone-number-input .mud-input.mud-input-underline:after {
    border-bottom: 0px !important;
}

.dialog-phone-input-wrapper .intl-phone-number-input .mud-input.mud-input-underline:before {
    border-bottom: 0px !important;
}

.dialog-phone-input-wrapper .intl-phone-country-list {
    max-height: 240px;
}

/* Primary row styling */
.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-input {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.3) 0%, rgba(253, 230, 138, 0.15) 100%);
    border-color: var(--warning-pale);
}

.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-wrapper.focused .intl-phone-input,
.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-wrapper.dropdown-open .intl-phone-input {
    border-color: var(--warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12), 0 4px 16px var(--warning-alpha-10);
}

.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-dropdown {
    border-color: var(--warning);
}

.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-dropdown-header::after {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
}

.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-country-item::before {
    background: var(--warning);
}

.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-country-dial {
    color: var(--warning-dark);
    background: var(--warning-alpha-10);
}

.dialog-phone-row.dialog-is-primary .dialog-phone-input-wrapper .intl-phone-country-check {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Phone Row Right Section */
.dialog-phone-row-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Phone Type Select */
.dialog-phone-type-select {
    min-width: 110px;
}

.dialog-phone-type-select .mud-input-outlined-border {
    border-color: var(--border-light) !important;
    border-radius: 8px !important;
}

.dialog-phone-type-select:hover .mud-input-outlined-border {
    border-color: var(--border-dark) !important;
}

.dialog-phone-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dialog-phone-type-option .mud-icon-root {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Phone Actions */
.dialog-phone-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.dialog-phone-actions .dialog-set-primary-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dialog-phone-actions .dialog-set-primary-btn:hover {
    background: linear-gradient(135deg, var(--warning-bg) 0%, #fef9c3 100%);
    border-color: var(--warning-pale);
    color: var(--warning-amber);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.dialog-phone-actions .dialog-set-primary-btn .mud-icon-root {
    font-size: 0.875rem;
    color: var(--warning);
}

.dialog-phone-actions .dialog-status-badge {
    padding: 0.375rem 0.625rem;
    font-size: 0.6875rem;
}

@media (max-width: 580px) {
    .dialog-phone-row {
        flex-direction: column;
        align-items: stretch;
    }

    .dialog-phone-input-wrapper {
        width: 100%;
    }

    .dialog-phone-input-wrapper .intl-phone-dropdown {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        min-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 50vh;
    }

    .dialog-phone-row-right {
        justify-content: space-between;
    }
}

@keyframes dialog-row-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dialog-email-row:hover,
.dialog-phone-row:hover,
.dialog-address-row:hover {
    border-color: var(--purple-bg-indigo);
    box-shadow: 0 4px 12px var(--black-alpha-4);
}

.dialog-email-row.dialog-is-primary,
.dialog-phone-row.dialog-is-primary,
.dialog-address-row.dialog-is-primary {
    background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
    border-color: var(--warning-pale);
}

/* Row Avatar */
.dialog-row-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dialog-email-row:hover .dialog-row-avatar,
.dialog-phone-row:hover .dialog-row-avatar,
.dialog-address-row:hover .dialog-row-avatar {
    transform: scale(1.05);
}

.dialog-row-avatar .mud-icon-root {
    font-size: 1.25rem;
}

/* Email Type Colors */
.dialog-row-avatar.dialog-type-work {
    background: var(--error-bg);
    color: var(--error-dark);
}

.dialog-row-avatar.dialog-type-personal {
    background: var(--success-bg);
    color: var(--success-dark);
}

.dialog-row-avatar.dialog-type-other {
    background: var(--indigo-light);
    color: var(--indigo-dark);
}

/* Phone Type Colors */
.dialog-row-avatar.dialog-type-mobile {
    background: var(--info-bg);
    color: var(--info-dark);
}

.dialog-row-avatar.dialog-type-home {
    background: var(--success-bg);
    color: var(--success-dark);
}

.dialog-row-avatar.dialog-type-fax {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

/* Address Type Colors */
.dialog-row-avatar.dialog-type-home {
    background: var(--success-bg);
    color: var(--success-dark);
}

.dialog-row-avatar.dialog-type-mailing {
    background: var(--indigo-light);
    color: var(--indigo-dark);
}

.dialog-row-avatar.dialog-type-billing {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.dialog-row-avatar.dialog-type-shipping {
    background: var(--info-bg);
    color: var(--info-dark);
}

/* Row Content */
.dialog-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dialog-row-main {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.dialog-type-badge {
    display: inline-flex;
    padding: 0.1875rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* Email Type Badge Colors */
.dialog-type-badge.dialog-type-work {
    background: var(--error-bg-light);
    color: var(--error-dark);
}

.dialog-type-badge.dialog-type-personal {
    background: var(--success-bg-light);
    color: var(--success-dark);
}

.dialog-type-badge.dialog-type-other {
    background: var(--indigo-lightest);
    color: var(--indigo-dark);
}

/* Phone Type Badge Colors */
.dialog-type-badge.dialog-type-mobile {
    background: var(--info-bg-lighter);
    color: var(--info-dark);
}

.dialog-type-badge.dialog-type-home {
    background: var(--success-bg-light);
    color: var(--success-dark);
}

.dialog-type-badge.dialog-type-fax {
    background: #fffbeb;
    color: var(--warning-dark);
}

/* Address Type Badge Colors */
.dialog-type-badge.dialog-type-home {
    background: var(--success-bg-light);
    color: var(--success-dark);
}

.dialog-type-badge.dialog-type-mailing {
    background: var(--indigo-lightest);
    color: var(--indigo-dark);
}

.dialog-type-badge.dialog-type-billing {
    background: #fffbeb;
    color: var(--warning-dark);
}

.dialog-type-badge.dialog-type-shipping {
    background: var(--info-bg-lighter);
    color: var(--info-dark);
}

/* Social Media Type Badge Colors */
.dialog-type-badge.dialog-type-platform {
    background: var(--success-bg-lighter);
    color: var(--success-medium);
}

.dialog-type-badge.dialog-type-username {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.dialog-type-badge.dialog-type-url {
    background: var(--indigo-light);
    color: var(--indigo-dark);
}

/* Social Media Type Avatar Colors */
.dialog-row-avatar.dialog-type-platform {
    background: var(--success-bg);
    color: var(--success-dark);
}

.dialog-row-avatar.dialog-type-username {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.dialog-row-avatar.dialog-type-url {
    background: var(--indigo-light);
    color: var(--indigo-dark);
}

/* Social Media Dialog Row */
.dialog-social-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--black-alpha-4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dialog-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    animation-delay: calc(var(--i) * 0.08s);
}

.dialog-social-row:hover {
    border-color: var(--purple-bg-indigo);
    box-shadow: 0 4px 16px var(--indigo-alpha-12);
    transform: translateY(-1px);
}

/* Social Media Icon Preview in Header */
.dialog-social-icon-preview {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px var(--black-alpha-15);
    transition: all 0.3s ease;
}

.dialog-social-icon-preview.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.dialog-social-icon-preview.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8ddb 100%);
}

.dialog-social-icon-preview.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.dialog-social-icon-preview.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.dialog-social-icon-preview.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.dialog-social-icon-preview.tiktok {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.dialog-social-icon-preview.pinterest {
    background: linear-gradient(135deg, #e60023 0%, #ad081b 100%);
}

.dialog-social-icon-preview.snapchat {
    background: linear-gradient(135deg, #fffc00 0%, #ffeb3b 100%);
    color: #000;
}

.dialog-social-icon-preview.other {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
}

/* Social Media Preview Section */
.dialog-social-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--indigo-alpha-5) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid var(--indigo-alpha-15);
    border-radius: 16px;
    animation: dialog-fade-in 0.3s ease;
}

.dialog-preview-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--indigo);
}

.dialog-preview-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--black-alpha-6);
}

.dialog-preview-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.dialog-preview-icon.telegram {
    color: #0088cc;
}

.dialog-preview-icon.whatsapp {
    color: #25d366;
}

.dialog-preview-icon.signal {
    color: #3a76f0;
}

.dialog-preview-icon.messenger {
    color: #0084ff;
}

.dialog-preview-icon.imessage {
    color: #34c759;
}

.dialog-preview-icon.slack {
    color: #4a154b;
}

.dialog-preview-icon.discord {
    color: #5865f2;
}

.dialog-preview-icon.skype {
    color: #00aff0;
}

.dialog-preview-icon.teams {
    color: #6264a7;
}

.dialog-preview-icon.zoom {
    color: #2d8cff;
}

.dialog-preview-icon.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.dialog-preview-icon.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8ddb 100%);
}

.dialog-preview-icon.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.dialog-preview-icon.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.dialog-preview-icon.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.dialog-preview-icon.tiktok {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.dialog-preview-icon.pinterest {
    background: linear-gradient(135deg, #e60023 0%, #ad081b 100%);
}

.dialog-preview-icon.snapchat {
    background: linear-gradient(135deg, #fffc00 0%, #ffeb3b 100%);
    color: #000;
}

.dialog-preview-icon.other {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
}

.dialog-preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.dialog-preview-platform {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-disabled);
}

.dialog-preview-username {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dialog-preview-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dialog-preview-link:hover {
    background: var(--indigo);
    color: white;
}

/* Inline Select for Social Dialog */
.dialog-inline-select {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
}

.dialog-inline-select .mud-input-control-input-container {
    margin-top: 0 !important;
}

.dialog-inline-select .mud-input {
    margin-top: 0 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.dialog-inline-select .mud-select-input {
    padding: 0 !important;
}

@keyframes dialog-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inline Input */
.dialog-inline-input {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
}

.dialog-inline-input .mud-input-control-input-container {
    margin-top: 0 !important;
}

.dialog-inline-input .mud-input {
    margin-top: 0 !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    background: var(--bg-page) !important;
    transition: all 0.2s ease !important;
}

.dialog-inline-input .mud-input:hover {
    border-color: var(--border-dark) !important;
    background: var(--mud-palette-white) !important;
}

.dialog-inline-input .mud-input:focus-within {
    border-color: var(--violet-light) !important;
    background: var(--mud-palette-white) !important;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
}

.dialog-inline-input input {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    padding: 0.5rem 0.75rem !important;
}

.dialog-inline-input input::placeholder {
    color: var(--text-disabled);
    font-weight: 400;
}

.dialog-row-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dialog-row-meta .mud-icon-root {
    font-size: 0.875rem;
    color: var(--text-disabled);
}

/* Row Right */
.dialog-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    flex-shrink: 0;
}

.dialog-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.dialog-status-badge.dialog-status-primary {
    background: var(--warning-bg);
    color: var(--warning-amber);
    border: 1px solid var(--warning-pale);
}

.dialog-status-badge.dialog-status-primary .mud-icon-root {
    font-size: 0.75rem;
    color: var(--warning);
}

.dialog-set-primary-btn {
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: white;
    color: var(--text-secondary);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-set-primary-btn:hover {
    background: var(--warning-bg);
    border-color: var(--warning-pale);
    color: var(--warning-amber);
}

/* Action Group - groups Primary/SetPrimary with Remove button */
.dialog-action-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Remove Button */
.dialog-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.25rem;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: white;
    color: var(--text-disabled);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dialog-remove-btn:hover {
    background: var(--error-bg-light);
    border-color: #fca5a5;
    color: var(--error-dark);
    transform: scale(1.05);
}

.dialog-remove-btn:active {
    transform: scale(0.95);
}

.dialog-remove-btn .mud-icon-root {
    font-size: 1.125rem;
}

.dialog-remove-btn:disabled,
.dialog-remove-btn.dialog-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg-subtle);
    border-color: var(--border-light);
    color: var(--border-dark);
}

.dialog-remove-btn:disabled:hover,
.dialog-remove-btn.dialog-disabled:hover {
    transform: none;
    background: var(--bg-subtle);
    border-color: var(--border-light);
    color: var(--border-dark);
}

/* Edit Button */
.dialog-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.dialog-edit-btn:hover {
    background: var(--indigo-lightest);
    border-color: var(--purple-bg-indigo);
    color: var(--indigo);
    transform: scale(1.05);
}

.dialog-edit-btn:active {
    transform: scale(0.95);
}

.dialog-edit-btn .mud-icon-root {
    font-size: 1.125rem;
}

/* Type Dropdown */
.dialog-type-dropdown {
    margin: 0 !important;
    min-width: 80px !important;
}

.dialog-type-dropdown .mud-input-control-input-container {
    margin-top: 0 !important;
}

.dialog-type-dropdown .mud-input {
    margin-top: 0 !important;
}

.dialog-type-dropdown .mud-select-input {
    font-size: 0.6875rem !important;
    color: var(--text-secondary) !important;
    padding: 0 !important;
}

.dialog-type-dropdown .mud-list-item {
    min-height: 32px !important;
    padding: 0.375rem 0.75rem !important;
}

.dialog-type-dropdown .mud-list-item-text {
    font-size: 0.75rem !important;
}

/* Add More Button */
.dialog-add-more-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    margin-top: 0.875rem;
    background: white;
    border: 2px dashed var(--border-muted);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-theme .dialog-add-more-btn:hover {
    border-color: var(--violet-dark);
    border-style: solid;
    background: linear-gradient(135deg, var(--purple-bg-lighter), var(--purple-bg));
    color: var(--violet-dark);
    transform: translateY(-1px);
}

.dialog-add-icon-wrap {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dialog-theme .dialog-add-more-btn:hover .dialog-add-icon-wrap {
    background: var(--violet-dark);
    color: white;
}

.dialog-arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s ease;
}

.dialog-add-more-btn:hover .dialog-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ========== ADDRESS SPECIFIC ========== */
.dialog-address-content {
    flex: 1;
}

.dialog-address-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.dialog-address-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.5rem;
}

@media (max-width: 580px) {
    .dialog-address-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== FOOTER ========== */
.dialog-premium-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid var(--border-light);
    width: 100%;
}

.dialog-premium-footer .mud-card-actions {
    width: 100%;
    justify-content: flex-end;
}

/* Variante stacked del footer premium — hint y botones en rows separadas
   (usado cuando el hint es demasiado largo para compartir row con los botones) */
.dialog-premium-footer.dialog-premium-footer-stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.dialog-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dialog-hint-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warning-bg);
    border-radius: 6px;
    color: var(--warning);
}

.dialog-footer-btns {
    display: flex;
    gap: 0.625rem;
}


.dialog-btn-ghost:hover {
    background: var(--bg-page);
    border-color: var(--border-dark);
}


.dialog-btn-danger:hover {
    background: #FEE2E2;
    border-color: #F87171;
}

.dialog-btn-danger .mud-icon-root {
    font-size: 1rem;
}

.dialog-btn-outline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    background: transparent;
    border: 2px solid var(--indigo);
    border-radius: 10px;
    color: var(--indigo);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-btn-outline:hover {
    background: var(--indigo-alpha-8);
    border-color: var(--indigo-dark);
    color: var(--indigo-dark);
}

.dialog-btn-outline .mud-icon-root {
    font-size: 1rem;
}

.dialog-btn-solid {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-theme .dialog-btn-solid {
    background: linear-gradient(135deg, var(--violet-dark), var(--violet-darker));
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.dialog-btn-solid:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.dialog-btn-solid:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Variante warning del botón solid — para RemoveConfirmationDialog (desvinculación, reversible) */
.dialog-btn-solid.dialog-btn-solid-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.dialog-btn-solid.dialog-btn-solid-warning:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* Variante danger del botón solid — para DeleteConfirmationDialog (destructiva, irreversible) */
.dialog-btn-solid.dialog-btn-solid-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.dialog-btn-solid.dialog-btn-solid-danger:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

/* Variante success del botón solid — para dialogs de confirmación positiva */
.dialog-btn-solid.dialog-btn-solid-success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.dialog-btn-solid.dialog-btn-solid-success:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.dialog-loading-spin {
    width: 16px;
    height: 16px;
    border: 2px solid var(--white-alpha-30);
    border-top-color: white;
    border-radius: 50%;
    animation: dialog-spin 0.7s linear infinite;
}

@keyframes dialog-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== PROFESSIONAL DIALOG STYLES ========== */

/* Professional Dialog Body */
.crm-professional-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Section Styles */
.crm-professional-section {
    background: linear-gradient(135deg, #fefefe 0%, #fafbfc 100%);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.crm-professional-section:hover {
    border-color: var(--purple-bg-indigo);
    box-shadow: 0 4px 20px var(--indigo-alpha-8);
}

.crm-professional-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.crm-professional-section-header .mud-icon-root {
    color: var(--indigo);
}

/* Company Row */
.crm-professional-company-row {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    align-items: flex-start;
}

.crm-professional-company-row .crm-professional-field {
    flex: 1;
}

/* Add Company Button */
.crm-professional-add-company-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    border: 1px solid var(--purple-bg-indigo);
    border-radius: 10px;
    color: var(--indigo);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 40px;
}

.crm-professional-add-company-btn:hover {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet-dark) 100%);
    color: white;
    border-color: var(--indigo);
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
    transform: translateY(-1px);
}

.crm-professional-add-company-btn:hover .mud-icon-root {
    transform: rotate(90deg);
}

.crm-professional-add-company-btn .mud-icon-root {
    transition: transform 0.3s ease;
}

/* Company Option in Autocomplete */
.crm-professional-company-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.crm-professional-company-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo);
    flex-shrink: 0;
}

.crm-professional-company-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-professional-company-option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.crm-professional-company-option-dba {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* No Results */
.crm-professional-no-results {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.crm-professional-no-results .mud-icon-root {
    color: var(--text-disabled);
}

/* New Company Form */
.crm-professional-new-company-form {
    margin: 0 1.25rem 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    border-radius: 12px;
    border: 1px solid var(--purple-bg-indigo);
    animation: crm-professional-slide-down 0.3s ease;
}

@keyframes crm-professional-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-professional-new-company-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--indigo-alpha-20);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--indigo-darker);
}

.crm-professional-new-company-header .mud-icon-root {
    color: var(--indigo);
}

/* Form Grid */
.crm-professional-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.25rem;
}

.crm-professional-field {
    background: white;
    border-radius: 10px;
}

.crm-professional-field-full {
    grid-column: 1 / -1;
}

.crm-professional-field .mud-input-control {
    background: white;
}

/* New Company Actions */
.crm-professional-new-company-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--indigo-alpha-20);
}

/* Company Preview Card */
.crm-professional-company-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 1.25rem 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    border-radius: 12px;
    border: 1px solid var(--purple-bg-indigo);
    animation: crm-professional-fade-in 0.3s ease;
}

@keyframes crm-professional-fade-in {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.crm-professional-company-preview-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
    flex-shrink: 0;
}

.crm-professional-company-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.crm-professional-company-preview-name {
    font-size: 1rem;
    font-weight: 700;
    color: #3730a3;
}

.crm-professional-company-preview-dba {
    font-size: 0.8125rem;
    color: var(--indigo-darker);
}

.crm-professional-company-preview-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.375rem;
}

.crm-professional-company-preview-details span,
.crm-professional-company-preview-details a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--indigo-dark);
}

.crm-professional-company-preview-details a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.crm-professional-company-preview-details a:hover {
    color: #3730a3;
    text-decoration: underline;
}

.crm-professional-company-preview-details .mud-icon-root {
    font-size: 0.875rem !important;
}

/* ========== INDUSTRY MULTISELECT ========== */
.crm-professional-industry-container {
    margin: 0 1.25rem 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--success-bg-lighter) 0%, var(--success-bg-lightest) 100%);
    border-radius: 14px;
    border: 1px solid var(--success-bg-soft);
    transition: all 0.3s ease;
}

.crm-professional-industry-container.crm-professional-industry-disabled {
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border-color: var(--border-light);
    opacity: 0.7;
}

.crm-professional-industry-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--success-darker);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.crm-professional-industry-disabled .crm-professional-industry-label {
    color: var(--text-secondary);
}

.crm-professional-industry-label .mud-icon-root {
    color: var(--success-light);
}

.crm-professional-industry-disabled .crm-professional-industry-label .mud-icon-root {
    color: var(--text-disabled);
}

.crm-professional-industry-hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: normal;
    margin-left: 0.25rem;
}

.crm-professional-industry-row {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.crm-professional-add-industry-btn,
.crm-professional-create-industry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, var(--success-bg-lightest) 0%, var(--success-bg-soft) 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--success-darker);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.crm-professional-add-industry-btn:hover:not(:disabled),
.crm-professional-create-industry-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%);
    color: white;
    border-color: var(--success-light);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

.crm-professional-add-industry-btn:disabled,
.crm-professional-create-industry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.crm-professional-add-industry-btn .mud-icon-root,
.crm-professional-create-industry-btn .mud-icon-root {
    transition: transform 0.3s ease;
}

.crm-professional-add-industry-btn:hover:not(:disabled) .mud-icon-root {
    transform: rotate(90deg);
}

/* Industry Option in Autocomplete */
.crm-professional-industry-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem;
}

.crm-professional-industry-option .mud-icon-root {
    color: var(--success-light);
}

/* New Industry Form */
.crm-professional-new-industry-form {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--success-bg-soft);
    animation: crm-professional-slide-down 0.3s ease;
}

.crm-professional-new-industry-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success-darker);
}

.crm-professional-new-industry-header .mud-icon-root {
    color: var(--success-light);
}

.crm-professional-new-industry-inputs {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.crm-professional-save-industry-btn {
    height: 40px;
    min-width: auto;
    padding: 0.5rem 1rem !important;
}

/* Selected Industries */
.crm-professional-selected-industries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--success-bg-soft);
}

.crm-professional-industry-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--success-darker) 0%, #15803d 100%);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: white;
    animation: crm-professional-fade-in 0.3s ease;
}

.crm-professional-industry-chip .mud-icon-root {
    font-size: 0.875rem !important;
    color: var(--white-alpha-80);
}

.crm-professional-industry-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin-left: 0.125rem;
    background: var(--white-alpha-20);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-professional-industry-chip-remove:hover {
    background: rgba(255, 255, 255, 0.35);
}

.crm-professional-industry-chip-remove .mud-icon-root {
    font-size: 0.75rem !important;
    color: white;
}

/* Responsive */
@media (max-width: 600px) {
    .crm-professional-industry-row {
        flex-direction: column;
    }

    .crm-professional-add-industry-btn,
    .crm-professional-create-industry-btn {
        width: 100%;
        justify-content: center;
    }

    .crm-professional-new-industry-inputs {
        flex-direction: column;
    }

    .crm-professional-save-industry-btn {
        width: 100%;
    }
}

/* ========== EDUCATION - OTHER DEGREE ========== */
.crm-education-other-degree-container {
    margin: 1rem 1.25rem 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    border-radius: 12px;
    border: 1px solid var(--warning-pale);
    animation: crm-professional-slide-down 0.3s ease;
}

.crm-education-other-degree-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
}

.crm-education-other-degree-header .mud-icon-root {
    color: var(--warning);
}

.crm-education-other-degree-container .dialog-form-input {
    background: white;
    border-radius: 8px;
}

.crm-education-other-degree-container .mud-input-outlined-border {
    border-color: var(--warning-pale) !important;
}

.crm-education-other-degree-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--warning) !important;
}

.crm-education-other-degree-container .mud-input-outlined.mud-input-outlined-focused .mud-input-outlined-border {
    border-color: var(--warning-dark) !important;
}

/* Section Header Colors */
.crm-professional-section:nth-child(1) .crm-professional-section-header {
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    border-bottom-color: var(--purple-bg-indigo);
}

.crm-professional-section:nth-child(1) .crm-professional-section-header .mud-icon-root {
    color: var(--indigo);
}

.crm-professional-section:nth-child(2) .crm-professional-section-header {
    background: linear-gradient(135deg, var(--success-bg-lighter) 0%, var(--success-bg-lightest) 100%);
    border-bottom-color: var(--success-bg-soft);
}

.crm-professional-section:nth-child(2) .crm-professional-section-header .mud-icon-root {
    color: var(--success-light);
}

/* Sectioned Body for Details Dialog */
.dialog-sectioned-body {
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: linear-gradient(180deg, var(--bg-page) 0%, var(--mud-palette-white) 100%);
}

/* Enhanced Section Styling */
.dialog-section {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px var(--black-alpha-4);
}

.dialog-section:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--black-alpha-6);
}

.dialog-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--bg-subtle);
}

/* Section Description Text */
.dialog-section-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    padding: 0 1.25rem;
}

/* Section Color Themes */
.dialog-section:nth-child(1) .dialog-section-header {
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    color: var(--indigo-darker);
    border-bottom-color: var(--purple-bg-indigo);
}

/*.dialog-section:nth-child(1) .dialog-section-header .mud-icon-root {
    color: var(--indigo);
}

.dialog-section:nth-child(2) .dialog-section-header {
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    color: #92400e;
    border-bottom-color: var(--warning-pale);
}

.dialog-section:nth-child(2) .dialog-section-header .mud-icon-root {
    color: var(--warning);
}

.dialog-section:nth-child(3) .dialog-section-header {
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    color: #9d174d;
    border-bottom-color: #f9a8d4;
}

.dialog-section:nth-child(3) .dialog-section-header .mud-icon-root {
    color: var(--pink);
}

.dialog-section:nth-child(4) .dialog-section-header {
    background: linear-gradient(135deg, var(--success-bg) 0%, var(--success-bg-pastel) 100%);
    color: var(--success-darker);
    border-bottom-color: #86efac;
}

.dialog-section:nth-child(4) .dialog-section-header .mud-icon-root {
    color: var(--success-light);
}*/

/* Grid Layouts */
.dialog-grid-1 {
    grid-template-columns: 1fr !important;
}

.dialog-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.dialog-grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.dialog-form-grid {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.dialog-form-field {
    position: relative;
}

/* NOTA: el bloque `.dialog-form-input { background / border-radius / box-shadow }`
   fue eliminado aquí. Generaba una "burbuja" gris redondeada que envolvía el input
   + el helper-text (mensaje de error) cuando el input tenía focus.
   Las reglas de border/hover/focus ya están definidas antes (línea ~3832) sin
   ese wrapper visual — basta con eso para el look outlined del input. */

/* Wide Dialog */
.dialog-wide {
    max-width: 720px !important;
}

.dialog-wide .mud-dialog-content {
    max-height: 70vh;
    overflow-y: auto;
}

/* Compact Dialog — tamaño reducido (480px fijo) para diálogos cortos:
   confirmations (Remove/Delete/Save), alerts, dialogs con un solo mensaje + 2 botones.
   Par semántico con .dialog-wide (720px). */
.dialog-compact {
    width: 480px !important;
}

.dialog-compact .mud-dialog-content {
    max-height: 70vh;
    overflow-y: auto;
}

/* Professional Header Variant */
.dialog-header-professional {
    background: linear-gradient(135deg, #0ea5e9 0%, var(--indigo) 50%, var(--violet) 100%) !important;
}

.dialog-header-professional .dialog-orb-1 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.4), transparent 70%);
}

.dialog-header-professional .dialog-orb-2 {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
}

/* Responsive */
@media (max-width: 640px) {
    .crm-professional-company-row {
        flex-direction: column;
    }

    .crm-professional-add-company-btn {
        width: 100%;
        justify-content: center;
    }

    .crm-professional-form-grid {
        grid-template-columns: 1fr;
    }

    .dialog-grid-2,
    .dialog-grid-3 {
        grid-template-columns: 1fr !important;
    }

    .crm-professional-company-preview {
        flex-direction: column;
        text-align: center;
    }

    .crm-professional-company-preview-details {
        justify-content: center;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 580px) {
    .dialog-premium-header {
        padding: 1.25rem;
    }

    .dialog-header-counter {
        display: none;
    }

    .dialog-premium-body {
        padding: 1rem;
    }

    .dialog-card-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .dialog-type-indicator {
        display: none;
    }

    .dialog-fields-area {
        flex-direction: column;
        width: 100%;
    }

    .dialog-type-field {
        width: 100%;
    }

    .dialog-action-btns {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.625rem;
        border-top: 1px solid var(--bg-subtle);
    }

    .dialog-premium-footer {
        flex-direction: column;
        gap: 0.875rem;
    }

    .dialog-footer-hint {
        order: 2;
        font-size: 0.6875rem;
    }

    .dialog-footer-btns {
        width: 100%;
    }

    .dialog-footer-btns button {
        flex: 1;
        justify-content: center;
    }
}

/* =============================================
   TASK DIALOG STYLES
   Prefix: dialog-task-
   Used by: TaskDialog.razor
   ============================================= */

/* Task Dialog Body */
.dialog-task-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Task Section */
.dialog-task-section {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px var(--black-alpha-4);
}

.dialog-task-section:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--black-alpha-6);
}

/* Task Templates */
.dialog-task-templates {
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border-radius: 16px;
    border: 1px solid var(--purple-bg-light);
    padding: 1rem 1.25rem;
    animation: dialog-fade-in 0.3s ease;
}

.dialog-task-templates-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--violet-dark);
    margin-bottom: 0.75rem;
}

.dialog-task-templates-label .mud-icon-root {
    color: var(--purple-light);
}

.dialog-task-templates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dialog-task-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: white;
    border: 1px solid #d8b4fe;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--violet-dark);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px var(--violet-alpha-10);
}

.dialog-task-template-btn:hover {
    background: linear-gradient(135deg, var(--violet-dark) 0%, var(--purple-light) 100%);
    border-color: var(--violet-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.dialog-task-template-btn:active {
    transform: translateY(0);
}

.dialog-task-template-btn.active {
    background: linear-gradient(135deg, var(--violet-dark) 0%, var(--purple-light) 100%);
    border-color: var(--violet-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35), inset 0 0 0 2px var(--white-alpha-20);
}

.dialog-task-template-btn.active .mud-icon-root {
    animation: dialog-bounce 0.5s ease;
}

@keyframes dialog-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.dialog-task-template-btn .mud-icon-root {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.dialog-task-template-btn:hover .mud-icon-root {
    transform: scale(1.1);
}

/* Select Item with Icon */
.dialog-select-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Priority Dots */
.dialog-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--white-alpha-80);
}

.dialog-priority-dot.dialog-priority-high {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    box-shadow: 0 0 0 2px var(--white-alpha-80), 0 2px 4px rgba(239, 68, 68, 0.4);
}

.dialog-priority-dot.dialog-priority-medium {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    box-shadow: 0 0 0 2px var(--white-alpha-80), 0 2px 4px rgba(245, 158, 11, 0.4);
}

.dialog-priority-dot.dialog-priority-low {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    box-shadow: 0 0 0 2px var(--white-alpha-80), 0 2px 4px rgba(59, 130, 246, 0.4);
}

/* Target Type Selection */
.dialog-task-target-section {
    padding: 0.25rem 0;
}

.dialog-task-target-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dialog-task-target-toggle {
    display: flex;
    gap: 0.75rem;
}

.dialog-task-target-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-task-target-btn:hover {
    border-color: var(--violet-light);
    color: var(--violet-dark);
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
}

.dialog-task-target-btn.active {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: var(--violet-dark);
    color: var(--violet-darker);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.dialog-task-target-btn .mud-icon-root {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.dialog-task-target-btn:hover .mud-icon-root,
.dialog-task-target-btn.active .mud-icon-root {
    transform: scale(1.1);
}

/* Contact Option in Autocomplete */
.dialog-contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
}

.dialog-contact-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.75rem !important;
}

.dialog-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.dialog-contact-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dialog-contact-company {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Family Group Option */
.dialog-family-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
}

.dialog-family-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    color: var(--pink);
    flex-shrink: 0;
}

.dialog-family-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.dialog-family-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dialog-family-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Family Group Preview */
.dialog-family-preview {
    background: linear-gradient(135deg, var(--success-bg-lighter) 0%, var(--success-bg-lightest) 100%);
    border: 1px solid var(--success-bg-soft);
    border-radius: 12px;
    padding: 1rem;
    animation: dialog-fade-in 0.3s ease;
}

.dialog-family-preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success-darker);
    margin-bottom: 0.75rem;
}

.dialog-family-preview-header .mud-icon-root {
    color: var(--success-light);
}

.dialog-family-preview-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dialog-family-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem 0.25rem 0.25rem;
    background: white;
    border: 1px solid var(--success-bg-pastel);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success-darker);
    transition: all 0.2s ease;
}

.dialog-family-member-chip:hover {
    border-color: var(--success-light);
    box-shadow: 0 2px 4px var(--success-light-alpha-15);
}

.dialog-member-avatar {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.625rem !important;
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%) !important;
    color: white !important;
}

.dialog-family-member-chip.dialog-more {
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--success-bg-lightest) 0%, var(--success-bg-soft) 100%);
    color: #15803d;
    font-weight: 600;
}

/* Assignee Option in Autocomplete */
.dialog-assignee-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
    width: 100%;
}

.dialog-assignee-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.dialog-assignee-icon.dialog-assignee-contact {
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    color: var(--indigo);
}

.dialog-assignee-icon.dialog-assignee-family {
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    color: var(--pink);
}

.dialog-assignee-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.dialog-assignee-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dialog-assignee-subtitle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dialog-assignee-subtitle .mud-icon-root {
    font-size: 0.875rem;
    color: var(--text-disabled);
}

.dialog-assignee-type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.dialog-assignee-type-badge.dialog-type-contact {
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    color: var(--indigo-dark);
    border: 1px solid var(--purple-bg-indigo);
}

.dialog-assignee-type-badge.dialog-type-family {
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    color: var(--error-pink-dark);
    border: 1px solid #f9a8d4;
}

/* Recurring Task Info */
.dialog-task-recurring-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--violet-darker);
    animation: dialog-fade-in 0.3s ease;
}

.dialog-task-recurring-info .mud-icon-root {
    color: var(--violet-dark);
    animation: dialog-spin 3s linear infinite;
}

/* Reminder Info */
.dialog-task-reminder-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    border: 1px solid var(--warning-pale);
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #92400e;
    animation: dialog-fade-in 0.3s ease;
    margin-top: 0.5rem;
}

.dialog-task-reminder-info .mud-icon-root {
    color: var(--warning);
    animation: dialog-bell-ring 2s ease-in-out infinite;
}

@keyframes dialog-bell-ring {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    30% {
        transform: rotate(10deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

/* Switch Field Styling */
.dialog-switch-field {
    padding: 0.5rem 0;
}

.dialog-switch-field .mud-switch {
    margin: 0;
}

/* Task Dialog Responsive */
@media (max-width: 580px) {
    .dialog-task-templates-list {
        gap: 0.375rem;
    }

    .dialog-task-template-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .dialog-task-target-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dialog-task-target-btn {
        padding: 0.75rem;
    }

    .dialog-family-preview-members {
        gap: 0.375rem;
    }

    .dialog-family-member-chip {
        font-size: 0.6875rem;
    }
}

/* DateTime Group - Premium Combined Date & Time Picker */
.dialog-datetime-group {
    grid-column: 1 / -1;
    position: relative;
}

.dialog-datetime-label {
    position: absolute;
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--indigo);
    background: linear-gradient(180deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: 0 1px 2px var(--black-alpha-4);
}

.dialog-datetime-label::before {
    content: '\1F4C5';
    font-size: 0.625rem;
}

.dialog-datetime-inputs {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px var(--black-alpha-4), 0 2px 4px rgba(0, 0, 0, 0.02), inset 0 1px 0 var(--white-alpha-80);
}

.dialog-datetime-inputs:hover {
    border-color: var(--purple-bg-indigo);
    box-shadow: 0 2px 8px var(--indigo-alpha-8), 0 4px 12px var(--black-alpha-4), inset 0 1px 0 var(--white-alpha-80);
}

.dialog-datetime-inputs:focus-within {
    background: var(--mud-palette-white);
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px var(--indigo-alpha-12), 0 4px 16px var(--indigo-alpha-10), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.dialog-datetime-inputs .dialog-datetime-date {
    flex: 1.3;
    min-width: 0;
    position: relative;
}

.dialog-datetime-inputs .dialog-datetime-date::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--border-light) 20%, var(--border-light) 80%, transparent 100%);
}

.dialog-datetime-inputs .dialog-datetime-time {
    flex: 1;
    min-width: 0;
}

.dialog-datetime-inputs .mud-input-outlined-border {
    border: none !important;
    border-radius: 0 !important;
}

.dialog-datetime-inputs .mud-input-control {
    margin: 0 !important;
}

.dialog-datetime-inputs .mud-input-slot {
    padding: 0.875rem 1rem !important;
    font-weight: 500;
    color: var(--text-primary);
}

.dialog-datetime-inputs .mud-input-slot::placeholder {
    color: var(--text-disabled);
    font-weight: 400;
}

.dialog-datetime-inputs .dialog-form-input {
    background: transparent;
    border-radius: 0;
}

.dialog-datetime-inputs .dialog-form-input:focus-within {
    background: transparent;
    box-shadow: none;
}

.dialog-datetime-inputs .mud-picker-input-button {
    color: var(--indigo);
    transition: all 0.2s ease;
}

.dialog-datetime-inputs .mud-picker-input-button:hover {
    color: var(--indigo-dark);
    background: var(--indigo-alpha-8);
}

.dialog-datetime-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    background: linear-gradient(180deg, var(--bg-subtle) 0%, #e8ecf1 100%);
    color: var(--indigo);
    position: relative;
}

.dialog-datetime-separator::before,
.dialog-datetime-separator::after {
    content: '';
    position: absolute;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--border-dark) 50%, transparent 100%);
}

.dialog-datetime-separator::before {
    left: 0;
}

.dialog-datetime-separator::after {
    right: 0;
}

.dialog-datetime-separator .mud-icon-root {
    font-size: 1.25rem;
    filter: drop-shadow(0 1px 1px var(--indigo-alpha-20));
}

/* Responsive adjustments for datetime group */
@media (max-width: 480px) {
    .dialog-datetime-inputs {
        flex-direction: column;
    }

    .dialog-datetime-inputs .dialog-datetime-date::after {
        display: none;
    }

    .dialog-datetime-separator {
        padding: 0.5rem;
        background: linear-gradient(90deg, var(--bg-subtle) 0%, #e8ecf1 50%, var(--bg-subtle) 100%);
    }

    .dialog-datetime-separator::before,
    .dialog-datetime-separator::after {
        top: 0;
        bottom: auto;
        left: 15%;
        right: 15%;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, var(--border-dark) 50%, transparent 100%);
    }

    .dialog-datetime-separator::before {
        top: 0;
    }

    .dialog-datetime-separator::after {
        top: auto;
        bottom: 0;
    }

    .dialog-datetime-inputs .dialog-datetime-date,
    .dialog-datetime-inputs .dialog-datetime-time {
        flex: 1;
    }
}

/* ============================================
   Task Reminder Snackbar - Premium Design
   ============================================ */

.task-reminder-snackbar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 420px;
    width: calc(100vw - 48px);
}

.task-reminder-snackbar.slide-in {
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.task-reminder-snackbar.slide-out {
    animation: slideOutDown 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(100%) scale(0.9);
    }
}

.task-reminder-container {
    background: linear-gradient(145deg, #1e1e2e 0%, #2d2d44 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 8px 24px var(--black-alpha-30), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Header */
.task-reminder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--black-alpha-20);
    border-bottom: 1px solid var(--white-alpha-6);
}

.task-reminder-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-reminder-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-radius: 8px;
    color: white;
}

.task-reminder-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--error);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1e1e2e;
}

.task-reminder-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--mud-palette-white);
    letter-spacing: 0.3px;
}

.task-reminder-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-reminder-page-info {
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 500;
}

.task-reminder-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--white-alpha-6);
    border-radius: 6px;
    color: #a1a1aa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-reminder-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

/* Content */
.task-reminder-content {
    padding: 16px;
}

.task-reminder-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--white-alpha-6);
    animation: fadeInCard 0.3s ease;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-reminder-card.priority-high {
    border-left: 3px solid var(--error);
}

.task-reminder-card.priority-medium {
    border-left: 3px solid var(--warning);
}

.task-reminder-card.priority-low {
    border-left: 3px solid var(--success-light);
}

.task-reminder-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.task-reminder-type {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--indigo-alpha-15);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--purple-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-reminder-type .mud-icon-root {
    font-size: 14px;
}

.task-reminder-priority {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #a1a1aa;
}

.task-reminder-priority .priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.priority-high .task-reminder-priority .priority-dot {
    background: var(--error);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.priority-medium .task-reminder-priority .priority-dot {
    background: var(--warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.priority-low .task-reminder-priority .priority-dot {
    background: var(--success-light);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.task-reminder-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--mud-palette-white);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.task-reminder-card-desc {
    font-size: 13px;
    color: #a1a1aa;
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-reminder-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.task-reminder-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #71717a;
}

.task-reminder-meta-item .mud-icon-root {
    font-size: 14px;
    color: var(--indigo);
}

.task-reminder-card-actions {
    display: flex;
    gap: 10px;
}

.task-reminder-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-reminder-action-btn.secondary {
    background: var(--white-alpha-6);
    color: #a1a1aa;
}

.task-reminder-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.task-reminder-action-btn.primary {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    color: white;
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
}

.task-reminder-action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--indigo-alpha-40);
}

/* Pagination */
.task-reminder-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--white-alpha-6);
}

.task-reminder-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--white-alpha-6);
    border-radius: 8px;
    color: #a1a1aa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-reminder-nav-btn:hover:not(:disabled) {
    background: var(--indigo-alpha-20);
    color: var(--purple-soft);
}

.task-reminder-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.task-reminder-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-reminder-dot {
    width: 8px;
    height: 8px;
    border: none;
    background: var(--white-alpha-20);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.task-reminder-dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.task-reminder-dot.active {
    width: 24px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
}

/* Footer */
.task-reminder-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--black-alpha-15);
    border-top: 1px solid var(--white-alpha-6);
}

.task-reminder-footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #71717a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-reminder-footer-btn:hover {
    background: var(--white-alpha-6);
    color: #a1a1aa;
}

.task-reminder-footer-btn .mud-icon-root {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 480px) {
    .task-reminder-snackbar {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        width: auto;
    }

    .task-reminder-card-actions {
        flex-direction: column;
    }

    .task-reminder-action-btn {
        padding: 12px;
    }
}

/* =============================================
   CLP - CONTACTS LIST PAGE STYLES
   Prefix:
   Used by: Contacts.razor
   ============================================= */

/* Design tokens centralizados en :root al inicio del archivo */

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.greeting {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.greeting-user {
    font-size: 1.125rem;
    color: var(--mud-palette-text-secondary);
}

/* Tabs Container */
.tabs-container {
    background: var(--mud-palette-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    overflow-x: auto;
    background: var(--mud-palette-background);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(91, 110, 245, 0.3);
}

.tab-content {
    padding: 1.5rem;
}

/* Section Header */
.section-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--mud-palette-text-secondary);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-icon.purple {
    background: var(--gradient-purple);
}

.stat-icon.pink {
    background: var(--gradient-pink);
}

.stat-icon.blue {
    background: var(--gradient-blue);
}

.stat-icon.orange {
    background: var(--gradient-orange);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.25rem;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.stat-change.positive {
    background: var(--success-alpha-10);
    color: var(--success);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.chart-body {
    padding: 1.5rem;
}

/* Funnel Chart */
.funnel-stage {
    margin-bottom: 0.75rem;
}

.funnel-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.funnel-bar:hover {
    transform: translateX(4px);
}

.funnel-label {
    font-size: 0.875rem;
}

.funnel-value {
    font-size: 1rem;
    font-weight: 700;
}

/* Lead Sources */
.source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.source-item:last-child {
    border-bottom: none;
}

.source-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.source-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.source-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.source-count {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.125rem;
}

.source-percentage {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

/* Lead Generation Channels Grid — CSS MUERTO (0 razor lo usa, comentado para cleanup)
.lead-gen-channel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
}

.lead-gen-channel-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
}

    .lead-gen-channel-card:hover {
        border-color: #e0e0e0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

.lead-gen-channel-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .lead-gen-channel-icon img, .lead-gen-channel-icon svg {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.lead-gen-channel-icon-facebook {
    color: #1877F2;
}

.lead-gen-channel-icon-instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-gen-channel-icon-whatsapp {
    color: #25D366;
}

.lead-gen-channel-icon-forms {
    color: #673AB7;
}

.lead-gen-channel-icon-landing {
    color: #607D8B;
}

.lead-gen-channel-icon-webhooks {
    color: #00BCD4;
}

.lead-gen-channel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.5rem;
}

.lead-gen-channel-desc {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.lead-gen-channel-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.lead-gen-channel-btn-connect {
    background: #4285f4;
    color: white;
}

    .lead-gen-channel-btn-connect:hover {
        background: #3367d6;
    }

.lead-gen-channel-btn-manage {
    background: #34a853;
    color: white;
}

    .lead-gen-channel-btn-manage:hover {
        background: #2d9248;
    }
*/

/* Multi-Entry List (Emails, Phones) */
.multi-entry-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.multi-entry-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, #fafbfc 100%);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.multi-entry-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--indigo) 0%, var(--purple-light) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.multi-entry-row:hover {
    border-color: var(--indigo-alpha-30);
    box-shadow: 0 8px 24px var(--indigo-alpha-10), 0 16px 40px var(--black-alpha-6);
    transform: translateY(-2px);
}

.multi-entry-row:hover::before {
    transform: scaleY(1);
}

.multi-entry-row.is-primary {
    border-color: var(--warning-light);
    background: linear-gradient(135deg, #fffbeb 0%, var(--warning-bg) 100%);
}

.multi-entry-row.is-primary::before {
    background: linear-gradient(180deg, var(--warning) 0%, var(--warning-light) 100%);
    transform: scaleY(1);
}

.multi-entry-row.is-primary::after {
    content: '★ PRIMARY';
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: white;
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-light) 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.multi-entry-fields {
    display: flex;
    flex: 1;
    gap: 0.875rem;
    align-items: center;
    padding-left: 0.25rem;
}

.multi-entry-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.multi-entry-actions .mud-icon-button {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.multi-entry-actions .mud-icon-button:hover {
    transform: scale(1.15);
    background: var(--indigo-alpha-10);
}

/* Family Group Selector */
.family-group-selector {
    padding: 1rem 0;
}

.family-group-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.family-group-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--mud-palette-background);
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.family-group-card:hover {
    border-color: var(--blue-accent);
    background: var(--mud-palette-surface);
}

.family-group-card.selected {
    border-color: var(--blue-accent);
    background: rgba(102, 126, 234, 0.08);
}

.family-group-card.new-group {
    border-style: dashed;
}

.family-group-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.family-group-card.new-group .family-group-icon {
    background: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

.family-group-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.family-group-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.family-group-count {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.new-group-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--mud-palette-background);
    border-radius: 8px;
}

.new-group-form .mud-input-control {
    flex: 1;
}

/* Family Members List */
.empty-family {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.75rem;
    background: var(--mud-palette-background);
    border-radius: 10px;
    border: 2px dashed var(--mud-palette-lines-default);
}

.family-members-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.family-member-card {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 1rem;
}

.family-member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.family-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.family-member-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.family-member-group-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--blue-accent-alpha-10);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--blue-accent);
}

/* Family Members Relationship List */
.family-members-relationship-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.family-member-relationship-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.family-member-relationship-row:hover {
    border-color: var(--blue-accent);
    background: var(--mud-palette-surface);
}

.family-member-info-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.family-member-avatar-small {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.family-member-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.family-member-name-compact {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.family-member-role {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.relationship-selector {
    flex-shrink: 0;
}

/* Lead Sources Grid Tab */
.lead-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.lead-source-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.lead-source-card:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.lead-source-card.inactive {
    opacity: 0.6;
}

.lead-source-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lead-source-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lead-source-info {
    flex: 1;
    min-width: 0;
}

.lead-source-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.25rem;
}

.lead-source-desc {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lead-source-actions {
    flex-shrink: 0;
}

.lead-source-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lead-source-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value-lg {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.stat-label-sm {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-badge.active {
    background: var(--success-alpha-10);
    color: var(--success);
}

.stat-badge.inactive {
    background: rgba(156, 163, 175, 0.1);
    color: var(--gray-500);
}

.delete-item {
    color: var(--error) !important;
}

.delete-item:hover {
    background: var(--error-alpha-10) !important;
}


.empty-state h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 1.5rem;
}

/* Monthly Performance Card */
.performance-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
}

/* Recent Activity */
.activity-feed {
    padding: 0 1.5rem 1.5rem;
}


.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.green {
    background: var(--success-alpha-10);
    color: var(--success);
}

.activity-icon.blue {
    background: var(--primary-alpha-10);
    color: #5b6ef5;
}

.activity-icon.purple {
    background: var(--violet-alpha-10);
    color: var(--violet);
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    text-transform: capitalize;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.25rem;
}

/* Contact Actions */
.action-bar {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: var(--mud-palette-text-disabled);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 45px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-lg);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.search-input::placeholder {
    color: var(--mud-palette-text-disabled);
}

/* ── search-input-mud: variante MudBlazor (MudTextField con Adornment.Start) ── */
/* Aplica los mismos bordes redondeados y altura que .search-input sin interferir con ella */
.search-input-mud .mud-input-outlined-border {
    border-radius: var(--radius-lg) !important;
}

.search-input-mud .mud-input.mud-input-outlined {
    border-radius: var(--radius-lg);
}

/* Altura del input: intermedia entre el default de MudBlazor y .search-input */
.search-input-mud .mud-input.mud-input-outlined input,
.search-input-mud .mud-input.mud-input-outlined .mud-input-slot {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    min-height: 1.4375em;
}

.search-input-mud .mud-input.mud-input-outlined:hover:not(.mud-disabled):not(.mud-input-error) .mud-input-outlined-border {
    border-color: var(--primary);
}

.search-input-mud.mud-input-control .mud-input.mud-input-outlined.mud-shrink .mud-input-outlined-border,
.search-input-mud .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.action-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.75;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
}

/* Sobrescribir el uppercase default de MudButton cuando se aplica .bp-btn */
.bp-btn .mud-button-label {
    text-transform: none;
    letter-spacing: 0;
}

.bp-btn:active {
    transform: scale(0.98);
}

.bp-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.bp-btn-primary:hover {
    box-shadow: 0 10px 25px var(--black-alpha-10);
    transform: translateY(-2px);
}

.bp-btn-secondary {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
}

.bp-btn-secondary:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Sort Container */
.sort-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sort-select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 0.5rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 160px;
}

.sort-select:hover {
    border-color: var(--primary);
    background: var(--mud-palette-action-default-hover);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

/* Filter Panel */
.filter-panel {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.filter-panel-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--mud-palette-text-primary);
}

.filter-panel-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

.filter-select {
    padding: var(--spacing-md);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 0.5rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.filter-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.filter-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: var(--spacing-xs);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-secondary);
    transition: all 0.15s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--primary);
}

/* Selection Toolbar */
.selection-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.selection-info {
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selection-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--white-alpha-20);
    border: 1px solid var(--white-alpha-30);
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.selection-btn:hover {
    background: var(--white-alpha-30);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.selection-btn:active {
    transform: scale(0.98);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 0.5rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination-btn:not(:disabled):hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.pagination-select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 0.5rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 70px;
}

.pagination-select:hover {
    border-color: var(--primary);
    background: var(--mud-palette-action-default-hover);
}

.pagination-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

/* Contacts Card Container */
.data-container {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.data-container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--mud-palette-background);
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--mud-palette-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--mud-palette-action-default-hover);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

/* Contacts Container */
.list-wrapper {
    padding: var(--spacing-xl);
    min-height: 400px;
}

/* Grid View */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.data-tile {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.data-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--black-alpha-10);
    border-color: var(--primary);
}

.data-tile .data-tile-checkbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.data-tile:hover .data-tile-checkbox,
.data-tile .data-tile-checkbox.checked,
.has-selection .data-tile .data-tile-checkbox {
    opacity: 1;
}

.data-tile .data-tile-checkbox .mud-checkbox {
    margin: 0;
    padding: 0;
}

.data-tile .data-tile-actions {
    display: flex;
    gap: 0.25rem;
}

.data-tile .data-tile-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.data-tile .data-tile-action:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--blue-accent);
}

.data-tile .data-tile-action.delete:hover {
    background: var(--error-bg-light);
    color: var(--error);
}

.data-tile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.list-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.data-tile-info {
    flex: 1;
    min-width: 0;
}

.data-tile-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-tile-position {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-tile-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.data-tile-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.data-tile-detail svg {
    color: var(--mud-palette-text-disabled);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Connected Users */
.data-tile-connected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.5rem 0;
}

.connected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--indigo-alpha-10);
    color: var(--primary);
    border: 1px solid var(--indigo-alpha-20);
}

.connected-chip.small {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.not-connected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--black-alpha-4);
    color: var(--mud-palette-text-secondary);
    border: 1px solid var(--black-alpha-8);
}

.not-connected-chip.small {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.data-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.data-tile-footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.list-priority-badge .priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.list-priority-badge.priority-high {
    background: var(--error-alpha-10);
    color: var(--error-dark);
}

.list-priority-badge.priority-high .priority-dot {
    background: var(--error);
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}

.list-priority-badge.priority-medium {
    background: var(--warning-alpha-10);
    color: var(--warning-dark);
}

.list-priority-badge.priority-medium .priority-dot {
    background: var(--warning);
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.5);
}

.list-priority-badge.priority-low {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-medium);
}

.list-priority-badge.priority-low .priority-dot {
    background: var(--success-light);
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.list-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.list-badge.client {
    background: var(--primary-alpha-10);
    color: var(--primary);
}

.list-badge.lead {
    background: var(--success-alpha-10);
    color: var(--success);
}

.list-badge.partner {
    background: var(--warning-alpha-10);
    color: var(--warning);
}

.list-badge.vip {
    background: var(--error-alpha-10);
    color: var(--error);
}

/* List View */
.list-rows {
    padding: 0;
}

.list-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-detail-item:hover {
    background: var(--mud-palette-action-default-hover);
}

.list-detail-item:last-child {
    border-bottom: none;
}

.list-detail-item .list-avatar {
    width: 50px;
    height: 50px;
    font-size: 1rem;
}

.list-detail-info {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1fr auto;
    gap: 1rem;
    align-items: center;
}

.list-detail h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.25rem;
}

.list-detail p {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border-radius: 16px;
    border: 2px dashed var(--mud-palette-lines-default);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--border-light) 0%, var(--border-dark) 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.empty-state-icon .mud-icon-root {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.75rem 0;
}

.empty-state-description {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
    max-width: 400px;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.empty-state-description strong {
    color: var(--primary);
    font-weight: 600;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.empty-state-actions .mud-button-root {
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .empty-state {
        padding: 2rem 1rem;
        min-height: 300px;
    }

    .empty-state-icon {
        width: 64px;
        height: 64px;
    }

    .empty-state-icon .mud-icon-root {
        font-size: 2rem;
    }

    .empty-state-title {
        font-size: 1.25rem;
    }

    .empty-state-description {
        font-size: 0.875rem;
    }

    .empty-state-actions {
        flex-direction: column;
        width: 100%;
    }

    .empty-state-actions .mud-button-root {
        width: 100%;
    }
}

/* =============================================
   FAMILY COMPONENT STYLES
   Prefix: family-member-
   ============================================= */

/* Family Group Card */
.family-member-group-card {
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border: 1px solid var(--purple-bg-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.family-member-group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--purple-bg-light);
}

.family-member-group-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--violet-dark) 100%);
    border-radius: 14px;
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.family-member-group-info {
    flex: 1;
}

.family-member-group-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary-alt);
    margin: 0 0 0.25rem 0;
}

.family-member-group-count {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.family-member-group-actions {
    display: flex;
    gap: 0.25rem;
}

/* Family Members Grid */
.family-member-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.family-member-member-card {
    background: white;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.family-member-member-card:hover {
    border-color: var(--purple-light);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px);
}

.family-member-member-card.current {
    background: linear-gradient(135deg, var(--info-bg) 0%, var(--info-bg-light) 100%);
    border-color: var(--info);
}

.family-member-member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    position: relative;
    overflow: hidden;
}

.family-member-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.family-member-member-current-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: var(--info);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.family-member-member-current-badge .mud-icon-root {
    font-size: 0.875rem;
    color: white;
}

.family-member-member-info {
    text-align: center;
}

.family-member-member-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary-alt);
    margin-bottom: 0.125rem;
}

.family-member-member-role {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.family-member-member-relationship {
    margin-top: 0.25rem;
}

.family-member-member-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.family-member-member-card:hover .family-member-member-actions {
    opacity: 1;
}

/* No Family Group Card */
.family-member-no-group-card {
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border: 2px dashed var(--border-dark);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.family-member-no-group-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--border-light) 0%, var(--border-dark) 100%);
    border-radius: 50%;
}

.family-member-no-group-icon .mud-icon-root {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

.family-member-no-group-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary-alt);
    margin: 0 0 0.5rem 0;
}

.family-member-no-group-desc {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin: 0 0 1.5rem 0;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Family List */
.family-member-family-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.family-member-family-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.family-member-family-item:hover {
    border-color: var(--pink);
    box-shadow: 0 2px 8px var(--pink-alpha-10);
}

.family-member-family-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.family-member-family-details {
    flex: 1;
    min-width: 0;
}

.family-member-family-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary-alt);
    margin-bottom: 0.125rem;
}

.family-member-family-relationship {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.375rem;
}

.family-member-family-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.family-member-contact-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.family-member-contact-item .mud-icon-root {
    font-size: 0.875rem;
}

.family-member-family-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.family-member-family-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.family-member-family-item:hover .family-member-family-actions {
    opacity: 1;
}

/* Avatar Colors for Family */
.family-member-avatar-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.family-member-avatar-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.family-member-avatar-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.family-member-avatar-purple {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--violet-dark) 100%);
}

.family-member-avatar-orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.family-member-avatar-teal {
    background: linear-gradient(135deg, var(--teal) 0%, #06b6d4 100%);
}

/* Family Groups List */
.family-member-groups-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.family-member-group-list-item {
    background: white;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.family-member-group-list-item:hover {
    border-color: var(--purple-light);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.1);
}

.family-member-group-list-item.expanded {
    border-color: var(--purple-light);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.15);
}

.family-member-group-data-container-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.family-member-group-data-container-header:hover {
    background: var(--purple-bg-lighter);
}

.family-member-group-list-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
    flex-shrink: 0;
}

.family-member-group-color-pink {
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-pink-dark) 100%);
}

.family-member-group-color-blue {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
}

.family-member-group-color-green {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
}

.family-member-group-color-purple {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--violet-dark) 100%);
}

.family-member-group-color-orange {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
}

.family-member-group-color-teal {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
}

.family-member-group-list-info {
    flex: 1;
    min-width: 0;
}

.family-member-group-list-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary-alt);
    margin-bottom: 0.25rem;
}

.family-member-group-list-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.family-member-group-list-meta .mud-icon-root {
    font-size: 0.875rem;
}

.family-member-group-list-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.family-member-group-list-item:hover .family-member-group-list-actions {
    opacity: 1;
}

.family-member-group-list-expand {
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.family-member-group-list-item.expanded .family-member-group-list-expand {
    color: var(--violet-dark);
}

/* Family Group Members (expanded) */
.family-member-group-list-members {
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border-top: 1px solid var(--purple-bg-light);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.family-member-group-member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--purple-bg-light);
    transition: all 0.2s ease;
}

.family-member-group-member-item:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 6px var(--violet-alpha-10);
}

.family-member-group-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.family-member-group-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.family-member-group-member-info {
    flex: 1;
    min-width: 0;
}

.family-member-group-member-name {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary-alt);
}

.family-member-group-member-role {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.family-member-group-member-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.family-member-group-member-item:hover .family-member-group-member-actions {
    opacity: 1;
}

/* Stats Grid */
.family-member-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.family-member-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-default);
    border-radius: 12px;
}

.family-member-stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
}

.family-member-stat-icon.purple {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--violet-dark) 100%);
}

.family-member-stat-icon.pink {
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-pink-dark) 100%);
}

.family-member-stat-icon.blue {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
}

.family-member-stat-info {
    display: flex;
    flex-direction: column;
}

.family-member-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary-alt);
    line-height: 1;
}

.family-member-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* =============================================
   HOBBIES SECTION STYLES
   ============================================= */

/* Section Container Enhancements */
.family-member-hobby-section {
    position: relative;
    overflow: hidden;
}

.family-member-hobby-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.family-member-pet-section {
    position: relative;
    overflow: hidden;
}

.family-member-pet-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Section Icon Wrapper */
.family-member-section-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
    margin-right: 0.75rem;
    box-shadow: 0 4px 10px var(--black-alpha-15);
}

.family-member-section-icon-wrapper.family-member-hobby-theme {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.family-member-section-icon-wrapper.family-member-pet-theme {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    box-shadow: 0 4px 10px var(--success-alpha-30);
}

/* Section Count Badge */
.family-member-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
    margin-left: 0.75rem;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.35);
}

.family-member-section-count.family-member-pet-count {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-pale) 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

/* Add Button Hover Enhancements */
.family-member-add-btn-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    gap: 0.375rem !important;
}

.family-member-add-btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    background: linear-gradient(135deg, #fff7ed 0%, var(--orange-pastel) 100%) !important;
    border-color: var(--orange) !important;
    color: var(--orange-dark) !important;
}

.family-member-add-btn-hover.family-member-pet-btn:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, var(--success-bg-light) 0%, var(--success-bg) 100%) !important;
    border-color: var(--success) !important;
    color: var(--success-dark) !important;
}

/* Skill Chip Styling */
.family-member-skill-chip {
    font-size: 0.6875rem !important;
    height: auto !important;
    padding: 0.125rem 0.5rem !important;
}

.family-member-hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.family-member-hobby-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, #fafafa 100%);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.family-member-hobby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 50%, #fdba74 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.family-member-hobby-card:hover {
    border-color: #fdba74;
    box-shadow: 0 8px 24px var(--orange-alpha-15);
    transform: translateY(-2px);
}

.family-member-hobby-card:hover::before {
    opacity: 1;
}

.family-member-hobby-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--black-alpha-15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.family-member-hobby-card:hover .family-member-hobby-icon {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 6px 16px var(--black-alpha-20);
}

.family-member-hobby-sports {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.family-member-hobby-arts {
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-pink-dark) 100%);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.family-member-hobby-music {
    background: linear-gradient(135deg, var(--violet) 0%, var(--violet-dark) 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.family-member-hobby-reading {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
    box-shadow: 0 4px 12px var(--indigo-alpha-35);
}

.family-member-hobby-gaming {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.family-member-hobby-outdoor {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.family-member-hobby-cooking {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.family-member-hobby-travel {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.family-member-hobby-tech {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.family-member-hobby-other {
    background: linear-gradient(135deg, var(--gray-500) 0%, #4b5563 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35);
}

.family-member-hobby-info {
    flex: 1;
    min-width: 0;
}

.family-member-hobby-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary-alt);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.family-member-hobby-category {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-weight: 500;
}

.family-member-hobby-frequency {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--orange);
    background: linear-gradient(135deg, #fff7ed 0%, var(--orange-pastel) 100%);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #fed7aa;
}

.family-member-hobby-frequency .mud-icon-root {
    font-size: 0.875rem;
}

.family-member-hobby-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.family-member-hobby-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.family-member-hobby-card:hover .family-member-hobby-actions {
    opacity: 1;
    transform: translateX(0);
}

.family-member-hobby-actions .mud-icon-button {
    background: white !important;
    border: 1px solid var(--border-default) !important;
    border-radius: 8px !important;
}

.family-member-hobby-actions .mud-icon-button:hover {
    background: var(--bg-muted) !important;
    border-color: var(--border-muted) !important;
}

/* =============================================
   PETS SECTION STYLES
   ============================================= */

.family-member-pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.family-member-pet-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, var(--mud-palette-white) 0%, #f8fffe 100%);
    border: 1px solid var(--success-bg);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.family-member-pet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--success) 0%, var(--success-pale) 50%, #6ee7b7 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.family-member-pet-card:hover {
    border-color: #6ee7b7;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.18);
    transform: translateY(-3px);
}

.family-member-pet-card:hover::before {
    opacity: 1;
}

.family-member-pet-avatar {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--black-alpha-15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.family-member-pet-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--white-alpha-30);
}

.family-member-pet-card:hover .family-member-pet-avatar {
    transform: scale(1.08);
    box-shadow: 0 8px 24px var(--black-alpha-20);
}

.family-member-pet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.family-member-pet-avatar .mud-icon-root {
    font-size: 2rem;
}

.family-member-pet-dog {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.family-member-pet-cat {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--violet-dark) 100%);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.family-member-pet-bird {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.family-member-pet-fish {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.family-member-pet-rabbit {
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-pink-dark) 100%);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.family-member-pet-hamster {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.family-member-pet-reptile {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    box-shadow: 0 6px 20px var(--success-alpha-40);
}

.family-member-pet-other {
    background: linear-gradient(135deg, var(--gray-500) 0%, #4b5563 100%);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.family-member-pet-info {
    flex: 1;
    min-width: 0;
}

.family-member-pet-name {
    display: block;
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--text-primary-alt);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.family-member-pet-type {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.family-member-pet-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.family-member-pet-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.family-member-pet-detail .mud-icon-root {
    font-size: 1rem;
    color: var(--gray-500);
}

.family-member-pet-service-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.family-member-pet-actions {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.375rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.family-member-pet-card:hover .family-member-pet-actions {
    opacity: 1;
    transform: translateY(0);
}

.family-member-pet-actions .mud-icon-button {
    background: white !important;
    border: 1px solid var(--success-bg) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px var(--black-alpha-6);
}

.family-member-pet-actions .mud-icon-button:hover {
    background: var(--success-bg-lighter) !important;
    border-color: var(--success-bg-pastel) !important;
}

/* Empty State Colors */
.crm-empty-state-box.orange {
    background: linear-gradient(145deg, #fff7ed 0%, var(--orange-pastel) 50%, #fed7aa 100%);
    border: 2px dashed var(--orange-light);
    border-radius: 20px;
}

.crm-empty-state-box.green {
    background: linear-gradient(145deg, var(--success-bg-lighter) 0%, var(--success-bg-lightest) 50%, var(--success-bg-soft) 100%);
    border: 2px dashed var(--success-pale);
    border-radius: 20px;
}

/* =============================================
   HOBBY EDIT DIALOG STYLES
   Prefix: hobby-edit-
   ============================================= */

.hobby-edit-dialog {
    border-radius: 24px !important;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.hobby-edit-dialog .mud-dialog-content {
    padding: 0 !important;
}

.hobby-edit-dialog .mud-dialog-title {
    padding: 0 !important;
    margin: 0 !important;
}

.hobby-edit-dialog .mud-dialog-actions {
    padding: 0 !important;
}

.hobby-edit-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #fff7ed 0%, var(--orange-pastel) 50%, #fed7aa 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.hobby-edit-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--orange-alpha-15) 0%, transparent 70%);
    pointer-events: none;
}

.hobby-edit-header-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
    position: relative;
    z-index: 1;
}

.hobby-edit-header-icon .mud-icon-root {
    font-size: 1.75rem;
}

.hobby-edit-header-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.hobby-edit-header-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary-alt);
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.02em;
}

.hobby-edit-header-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin: 0;
    font-weight: 500;
}

.hobby-edit-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--mud-palette-white);
}

.hobby-edit-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.hobby-edit-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hobby-edit-label.hobby-edit-required::after {
    content: " *";
    color: var(--error);
}

.hobby-edit-input,
.hobby-edit-select {
    border-radius: 12px !important;
}

.hobby-edit-input .mud-input-outlined-border,
.hobby-edit-select .mud-input-outlined-border {
    border-radius: 12px !important;
}

.hobby-edit-select-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hobby-edit-select-item .mud-icon-root {
    color: var(--orange);
}

.hobby-edit-skill-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.hobby-edit-skill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 4px var(--black-alpha-20);
}

.hobby-edit-skill-item.beginner .hobby-edit-skill-dot {
    background: linear-gradient(135deg, var(--gray-400) 0%, var(--gray-500) 100%);
}

.hobby-edit-skill-item.intermediate .hobby-edit-skill-dot {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
}

.hobby-edit-skill-item.advanced .hobby-edit-skill-dot {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
}

.hobby-edit-skill-item.expert .hobby-edit-skill-dot {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
}

.hobby-edit-frequency-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.hobby-edit-frequency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: linear-gradient(145deg, var(--mud-palette-white) 0%, var(--bg-muted) 100%);
    border: 2px solid var(--border-default);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-500);
}

.hobby-edit-frequency-item .mud-icon-root {
    font-size: 1.5rem;
    transition: transform 0.25s ease;
}

.hobby-edit-frequency-item:hover {
    border-color: var(--orange-light);
    background: linear-gradient(145deg, #fff7ed 0%, var(--orange-pastel) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--orange-alpha-15);
}

.hobby-edit-frequency-item:hover .mud-icon-root {
    transform: scale(1.1);
}

.hobby-edit-frequency-item.selected {
    border-color: var(--orange);
    background: linear-gradient(145deg, #fff7ed 0%, var(--orange-pastel) 100%);
    color: var(--orange-dark);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.25);
}

.hobby-edit-frequency-item.selected .mud-icon-root {
    color: var(--orange);
}

.hobby-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(180deg, var(--bg-muted) 0%, var(--gray-100) 100%);
    border-top: 1px solid var(--border-default);
}



.hobby-edit-btn-cancel {
    border-radius: 10px !important;
}

.hobby-edit-btn-submit {
    border-radius: 10px !important;
    padding: 0.5rem 1.25rem !important;
}

/* =============================================
   PET EDIT DIALOG STYLES
   Prefix: pet-edit-
   ============================================= */

.pet-edit-dialog {
    border-radius: 24px !important;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.pet-edit-dialog .mud-dialog-content {
    padding: 0 !important;
}

.pet-edit-dialog .mud-dialog-title {
    padding: 0 !important;
    margin: 0 !important;
}

.pet-edit-dialog .mud-dialog-actions {
    padding: 0 !important;
}

.pet-edit-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, var(--success-bg-light) 0%, var(--success-bg) 50%, var(--success-bg-pastel) 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.pet-edit-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--success-alpha-15) 0%, transparent 70%);
    pointer-events: none;
}

.pet-edit-header::after {
    content: '🐾';
    position: absolute;
    right: 2rem;
    bottom: 0.5rem;
    font-size: 3rem;
    opacity: 0.15;
    pointer-events: none;
}

.pet-edit-header-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-radius: 18px;
    color: white;
    box-shadow: 0 8px 24px var(--success-alpha-40);
    position: relative;
    z-index: 1;
}

.pet-edit-header-icon .mud-icon-root {
    font-size: 1.875rem;
}

.pet-edit-header-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.pet-edit-header-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary-alt);
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.02em;
}

.pet-edit-header-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin: 0;
    font-weight: 500;
}

.pet-edit-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    background: var(--mud-palette-white);
}

.pet-edit-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pet-edit-row {
    display: flex;
    gap: 1.25rem;
}

.pet-edit-flex-1 {
    flex: 1;
}

.pet-edit-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pet-edit-label.pet-edit-required::after {
    content: " *";
    color: var(--error);
}

.pet-edit-input,
.pet-edit-select {
    border-radius: 12px !important;
}

.pet-edit-input .mud-input-outlined-border,
.pet-edit-select .mud-input-outlined-border {
    border-radius: 12px !important;
}

.pet-edit-pet-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.875rem;
}

.pet-edit-pet-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 0.75rem;
    background: linear-gradient(145deg, var(--mud-palette-white) 0%, var(--bg-muted) 100%);
    border: 2px solid var(--border-default);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-500);
}

.pet-edit-pet-type .mud-icon-root {
    transition: transform 0.3s ease;
}

.pet-edit-pet-type:hover {
    border-color: var(--success-pale);
    background: linear-gradient(145deg, var(--success-bg-light) 0%, var(--success-bg) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--success-alpha-20);
}

.pet-edit-pet-type:hover .mud-icon-root {
    transform: scale(1.15);
}

.pet-edit-pet-type.selected {
    border-color: var(--success);
    background: linear-gradient(145deg, var(--success-bg-light) 0%, var(--success-bg) 100%);
    color: var(--success-dark);
    box-shadow: 0 6px 20px var(--success-alpha-30);
}

.pet-edit-pet-type.selected .pet-edit-pet-type-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--black-alpha-20);
}

.pet-edit-pet-type-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px var(--black-alpha-15);
}

.pet-edit-checkbox-card {
    background: linear-gradient(145deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
    border: 2px solid #93c5fd;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    transition: all 0.25s ease;
}

.pet-edit-checkbox-card:hover {
    border-color: var(--info-light);
    box-shadow: 0 4px 12px var(--info-alpha-15);
}

.pet-edit-checkbox-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.pet-edit-checkbox-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.pet-edit-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pet-edit-checkbox-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary-alt);
}

.pet-edit-checkbox-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.pet-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(180deg, var(--bg-muted) 0%, var(--gray-100) 100%);
    border-top: 1px solid var(--border-default);
}

.pet-edit-btn-cancel {
    border-radius: 12px !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 600 !important;
}

.pet-edit-btn-submit {
    border-radius: 12px !important;
    padding: 0.625rem 1.75rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.25s ease !important;
}

.pet-edit-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--success-alpha-40) !important;
}

/* Gender Selector for Pets */
.pet-edit-gender-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.pet-edit-gender-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(145deg, var(--mud-palette-white) 0%, var(--bg-muted) 100%);
    border: 2px solid var(--border-default);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
}

.pet-edit-gender-item:hover {
    border-color: var(--purple-soft);
    background: linear-gradient(145deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
}

.pet-edit-gender-item.selected {
    border-color: var(--indigo);
    background: linear-gradient(145deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    color: var(--indigo-dark);
    box-shadow: 0 4px 12px var(--indigo-alpha-25);
}

.pet-edit-gender-icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .family-member-hobbies-grid {
        grid-template-columns: 1fr;
    }

    .family-member-pets-grid {
        grid-template-columns: 1fr;
    }

    .family-member-hobby-card {
        padding: 1rem;
    }

    .family-member-pet-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .family-member-pet-info {
        text-align: center;
    }

    .family-member-pet-details {
        justify-content: center;
    }

    .family-member-pet-actions {
        position: static;
        margin-top: 1rem;
    }

    .family-member-section-icon-wrapper {
        width: 28px;
        height: 28px;
        margin-right: 0.5rem;
    }

    .family-member-section-count {
        font-size: 0.6875rem;
        min-width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hobby-edit-frequency-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pet-edit-pet-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .pet-edit-gender-grid {
        grid-template-columns: 1fr;
    }

    .pet-edit-row {
        flex-direction: column;
    }

    .pet-edit-header::after {
        display: none;
    }

    .family-member-hobby-icon {
        width: 44px;
        height: 44px;
    }

    .family-member-hobby-name {
        font-size: 0.9375rem;
    }

    .family-member-hobby-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }

    .family-member-pet-avatar {
        width: 64px;
        height: 64px;
    }

    .crm-empty-state-box.orange,
    .crm-empty-state-box.green {
        padding: 1.5rem 1rem;
    }

    .crm-empty-icon {
        width: 60px;
        height: 60px;
    }

    .crm-empty-title {
        font-size: 1rem;
    }

    .crm-empty-action {
        padding: 0.5rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .family-member-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .family-member-stats-grid {
        grid-template-columns: 1fr;
    }

    .family-member-family-item {
        flex-wrap: wrap;
    }

    .family-member-family-badges {
        width: 100%;
        margin-top: 0.5rem;
    }

    .family-member-family-actions {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .family-member-members-grid {
        grid-template-columns: 1fr;
    }

    .family-member-group-header {
        flex-wrap: wrap;
    }

    .family-member-group-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Avatar Colors */
.avatar-pink {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.avatar-blue {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.avatar-green {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.avatar-purple {
    background: linear-gradient(135deg, var(--blue-accent), var(--purple-accent));
}

.avatar-orange {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

/* Agregado — era referenciado por código C# (AvalmeServices, ViewAvalmeService,
   Family picker, etc.) pero la clase no existía en CSS. Valor del teal-500
   Tailwind (#14b8a6) degradado a cyan-400 (#22d3ee) para el gradient. */
.avatar-teal {
    background: linear-gradient(135deg, #14b8a6, #22d3ee);
}

/* Settings */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 0.5rem;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-tab:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--primary);
}

.settings-tab.active {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Category Types */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.category-content {
    flex: 1;
    min-width: 0;
}

.category-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.category-card p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.system-default-badge {
    flex-shrink: 0;
    padding: 0.375rem 0.75rem;
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

/* Contact Types */
.contact-types-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-type-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: all 0.2s ease;
}

.contact-type-card:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 2px 8px var(--blue-accent-alpha-10);
}

.contact-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-type-info {
    flex: 1;
    min-width: 0;
}

.contact-type-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.25rem;
}

.contact-type-info p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.contact-type-count {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.add-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 10px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.add-type-btn:hover {
    border-color: var(--blue-accent);
    color: var(--blue-accent);
    background: rgba(102, 126, 234, 0.05);
}

.field-meta {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

/* Custom Fields */
.custom-fields-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-field-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.custom-field-card:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 2px 8px var(--blue-accent-alpha-10);
}

.custom-field-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-field-info {
    flex: 1;
    min-width: 0;
}

.custom-field-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.25rem;
}

.custom-field-info p {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

.custom-field-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-field-card:hover .custom-field-actions {
    opacity: 1;
}

/* Hover Actions */
.hoverable {
    position: relative;
}

.hover-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.hoverable:hover .hover-actions {
    opacity: 1;
}

.hoverable:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 2px 8px var(--blue-accent-alpha-10);
}

/* Lead Statuses */
.lead-statuses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lead-status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
    cursor: grab;
}

.lead-status-card:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 2px 8px var(--blue-accent-alpha-10);
}

.lead-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lead-status-info {
    flex: 1;
    min-width: 0;
}

.lead-status-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.125rem;
}

.lead-status-info p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

/* General Settings */
.general-settings {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {}

.settings-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 1.25rem;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-info {
    flex: 1;
    min-width: 0;
}

.settings-row-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.25rem;
}

.settings-row-info p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

.settings-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.settings-select:hover {
    border-color: var(--blue-accent);
}

.settings-select:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Settings Cards Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.settings-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-card:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 4px 12px var(--blue-accent-alpha-10);
}

.settings-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.settings-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--blue-accent-alpha-10) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--blue-accent);
}

.settings-card-content {
    flex: 1;
    min-width: 0;
}

.settings-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.25rem;
}

.settings-card p {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.settings-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--blue-accent-alpha-10);
    color: var(--blue-accent);
}

.settings-card-badge.system {
    background: rgba(156, 163, 175, 0.1);
    color: var(--gray-500);
}

/* Settings List Items */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.settings-item:hover {
    border-color: var(--blue-accent);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-item-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.settings-item-info h5 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.125rem;
}

.settings-item-info p {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

.settings-item-actions {
    display: flex;
    gap: 0.25rem;
}

/* Settings Table */
.settings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    overflow: hidden;
}

.settings-table thead {
    background: var(--mud-palette-background);
}

.settings-table th {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.settings-table td {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.settings-table tr:last-child td {
    border-bottom: none;
}

.settings-table tr:hover td {
    background: var(--mud-palette-action-default-hover);
}

/* Status Pipeline */
.pipeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pipeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    cursor: grab;
    transition: all 0.2s ease;
}

.pipeline-item:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 2px 8px var(--blue-accent-alpha-10);
}

.pipeline-drag {
    color: var(--mud-palette-text-disabled);
    cursor: grab;
}

.pipeline-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.pipeline-content {
    flex: 1;
}

.pipeline-content h5 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

.pipeline-content span {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Contact Detail View Styles */
.back-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--black-alpha-6);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.back-btn:hover {
    border-color: var(--purple-soft);
    color: var(--indigo);
    box-shadow: 0 4px 12px var(--indigo-alpha-10);
}

/* Profile Card */
.profile-card {
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, #fafbfc 100%);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 4px 16px var(--black-alpha-4), 0 16px 48px var(--black-alpha-6);
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--indigo) 0%, var(--violet) 50%, var(--purple-light) 100%);
}

.profile-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--indigo-alpha-4) 0%, transparent 70%);
    pointer-events: none;
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 50%, var(--purple-light) 100%);
    flex-shrink: 0;
    box-shadow: 0 8px 24px var(--indigo-alpha-35), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.avatar-lg:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

/* ========== Avatar preview — Account/Manage/Avatar.razor ========== */
/* Preview circular de 200×200 para el avatar del usuario.
   Selectores compuestos (.mud-avatar.X) necesarios para superar la especificidad
   de .mud-avatar.mud-avatar-medium (40×40) de MudBlazor. */
.avatar-preview-img {
    border-radius: 50%;
}

.mud-avatar.avatar-preview-fallback {
    height: 200px;
    width: 200px;
}

.avatar-preview-fallback .mud-icon-root {
    font-size: 6rem;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.upload-btn:hover {
    border-color: var(--purple-soft);
    color: var(--indigo);
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.profile-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.profile-name {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    letter-spacing: -0.03em;
}

.profile-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
    font-weight: 500;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, var(--success-bg) 0%, var(--success-bg-pastel) 100%);
    color: var(--success-dark);
    box-shadow: 0 2px 6px var(--success-alpha-15);
}

.profile-badge.lead {
    background: linear-gradient(135deg, var(--orange-pastel) 0%, #fed7aa 100%);
    color: var(--orange-dark);
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.15);
}

.profile-badge.partner {
    background: linear-gradient(135deg, var(--success-bg-lightest) 0%, var(--success-bg-soft) 100%);
    color: var(--success-medium);
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}

.profile-badge.vendor {
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    color: var(--error-pink-dark);
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.15);
}

.profile-badge.vip {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: var(--violet-dark);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.15);
}

/* Tab Navigation */

.detail-tabs::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, transparent 50%);
    border-radius: 20px;
    pointer-events: none;
}

.detail-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.detail-tab-btn .mud-icon-root {
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-tab-btn:hover {
    background: rgba(99, 102, 241, 0.06);
    color: var(--indigo);
}

.detail-tab-btn:hover .mud-icon-root {
    transform: scale(1.15) rotate(-3deg);
    color: var(--indigo);
}

.detail-tab-btn.active {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 50%, var(--purple-light) 100%);
    color: white;
    box-shadow: 0 4px 14px var(--indigo-alpha-40), 0 2px 6px rgba(139, 92, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.detail-tab-btn.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--white-alpha-15) 0%, transparent 50%);
    border-radius: 14px;
    pointer-events: none;
}

.detail-tab-btn.active .mud-icon-root {
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* Content Card */
.content-card {
    background: linear-gradient(180deg, var(--mud-palette-white) 0%, #fafbfc 100%);
    border-radius: 24px;
    padding: 2rem 2.5rem 2.5rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 4px 16px var(--black-alpha-4), 0 16px 48px var(--black-alpha-6);
    border: 1px solid rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--indigo) 0%, var(--violet) 25%, var(--purple-light) 50%, var(--pink) 75%, var(--error-rose) 100%);
    background-size: 200% 100%;
    animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.content-card::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, var(--indigo-alpha-3) 0%, transparent 100%);
    pointer-events: none;
}

.content-title {
    display: none;
    align-items: center;
    gap: 0.875rem;
    z-index: 1;
}

.content-title::before,
.content-title::after {
    display: none;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border-radius: 16px;
    margin-bottom: 1.75rem;
    border: 1px solid var(--border-light);
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.25s ease;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--black-alpha-6);
    border-color: var(--purple-soft);
}

.status-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: fit-content;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.25rem;
}

.status-badge.not-connected {
    background: linear-gradient(135deg, var(--error-bg-light) 0%, var(--error-bg) 100%);
    color: var(--error-dark);
}

.status-badge.not-connected::before {
    background: var(--error-dark);
}

.status-badge.connected {
    background: linear-gradient(135deg, var(--success-bg-lighter) 0%, var(--success-bg-lightest) 100%);
    color: var(--success-medium);
}

.status-badge.connected::before {
    background: var(--success-medium);
}

.status-badge.pending {
    background: linear-gradient(135deg, #fffbeb 0%, var(--warning-bg) 100%);
    color: var(--warning-dark);
}

.status-badge.pending::before {
    background: var(--warning-dark);
}

.actions-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.actions-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.actions-row {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--indigo-alpha-40);
}

.action-btn.secondary {
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    color: var(--text-tertiary);
    border: 1px solid var(--border-light);
}

.action-btn.secondary:hover {
    border-color: var(--purple-soft);
    color: var(--indigo);
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

/* Form Sections */
.form-section {
    margin-bottom: 1.75rem;
    padding: 1.5rem 1.75rem 1.75rem;
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, #fafbfc 100%);
    border-radius: 18px;
    border: 1px solid var(--border-light);
    position: relative;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--indigo) 0%, var(--purple-light) 100%);
    border-radius: 18px 0 0 18px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--indigo-alpha-8), 0 16px 48px var(--black-alpha-6);
    border-color: var(--indigo-alpha-20);
}

.form-section:hover::before {
    transform: scaleY(1);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--bg-subtle);
    letter-spacing: -0.02em;
}

.form-section-title .mud-icon-root {
    color: white;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    padding: 0.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--indigo-alpha-30), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.form-section:hover .form-section-title .mud-icon-root {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 4px 14px var(--indigo-alpha-40);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.75rem;
}

.form-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-value:hover {
    border-color: var(--purple-soft);
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, rgba(99, 102, 241, 0.02) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--black-alpha-4);
}

.form-value.empty {
    color: var(--text-disabled);
    font-style: italic;
}

.form-value a {
    color: var(--indigo);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.form-value a:hover {
    color: var(--violet);
}

/* Personal Information Sections */
.personal-info-section-card {
    background: var(--mud-palette-white);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-default);
}

.personal-info-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bg-subtle);
}

.personal-info-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.personal-info-section-title .mud-icon-root {
    color: var(--gray-500);
    font-size: 1.125rem;
}

.personal-info-section-icon {
    display: none;
}

.personal-info-grid {
    display: grid;
    gap: 1rem 1.5rem;
}

.personal-info-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.personal-info-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.personal-info-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.personal-info-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.personal-info-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.personal-info-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.personal-info-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.personal-info-link {
    color: var(--indigo);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.personal-info-link:hover {
    color: var(--violet);
}

.personal-info-link:hover::after {
    content: '→';
    margin-left: 0.25rem;
}

.personal-info-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.625rem;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.personal-info-grid-1 {
    grid-template-columns: 1fr;
}

.personal-info-input {
    width: 100%;
}

.personal-info-input .mud-input-outlined-border {
    border-radius: 12px !important;
    border-color: var(--border-light) !important;
    transition: all 0.25s ease !important;
}

.personal-info-input:hover .mud-input-outlined-border {
    border-color: var(--purple-soft) !important;
}

.personal-info-input:focus-within .mud-input-outlined-border {
    border-color: var(--indigo) !important;
    box-shadow: 0 0 0 3px var(--indigo-alpha-12) !important;
}

.personal-info-input .mud-input-slot {
    background: #fafbfc !important;
    border-radius: 12px !important;
}

.personal-info-action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.875rem;
    padding: 1.5rem 0 0 0;
    margin-top: 1.75rem;
    border-top: 1px solid var(--bg-subtle);
    position: relative;
    z-index: 1;
}

.personal-info-action-buttons .mud-button-filled {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%) !important;
    box-shadow: 0 4px 14px var(--indigo-alpha-35), inset 0 1px 0 var(--white-alpha-15) !important;
    border-radius: 12px !important;
    transition: all 0.25s ease !important;
}

.personal-info-action-buttons .mud-button-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45) !important;
}

.personal-info-action-buttons .mud-button-outlined {
    border-radius: 12px !important;
    border-color: var(--border-light) !important;
    transition: all 0.25s ease !important;
}

.personal-info-action-buttons .mud-button-outlined:hover {
    background: var(--bg-page) !important;
    border-color: var(--border-dark) !important;
}

.upload-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.upload-btn.secondary:hover {
    background: linear-gradient(135deg, var(--error-bg-light) 0%, var(--error-bg) 100%);
    color: var(--error);
    border-color: var(--error-pastel);
}

.edit-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.125rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--indigo-alpha-30), inset 0 1px 0 var(--white-alpha-15);
    z-index: 10;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--indigo-alpha-40);
}

.edit-btn .mud-icon-root {
    transition: transform 0.3s ease;
}

.edit-btn:hover .mud-icon-root {
    transform: rotate(-10deg);
}

/* Info Grid & Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

.info-group {
    background: var(--mud-palette-white);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border-default);
}

.info-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.info-group h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--gray-600);
    text-transform: uppercase;
    margin: 0;
}

.section-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo-alpha-8) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: var(--indigo);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-edit-btn:hover {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    color: white;
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 4px 12px var(--indigo-alpha-35);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.info-row:hover {
    background: var(--indigo-alpha-3);
}

.info-row:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-light) 20%, var(--border-light) 80%, transparent 100%);
}

.info-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
}

/* Lead Status Dropdown Styles */
.lead-status-container {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lead-status-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.375rem;
    display: block;
}

.lead-status-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    transition: all 0.2s ease;
}

.lead-status-select:hover {
    border-color: var(--primary);
}

.lead-status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.lead-status-select.status-new {
    background-color: var(--indigo-alpha-10);
    border-color: var(--indigo);
    color: var(--indigo);
}

.lead-status-select.status-attempted {
    background-color: var(--warning-alpha-10);
    border-color: var(--warning);
    color: var(--warning-dark);
}

.lead-status-select.status-contacted {
    background-color: var(--info-alpha-10);
    border-color: var(--info);
    color: var(--info-dark);
}

.lead-status-select.status-qualified {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: var(--success-light);
    color: var(--success-medium);
}

.lead-status-select.status-unqualified {
    background-color: var(--error-alpha-10);
    border-color: var(--error);
    color: var(--error-dark);
}

/* Lead Status Badge */
.lead-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lead-status-badge.new {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.lead-status-badge.attempted {
    background: var(--warning-alpha-10);
    color: var(--warning-dark);
}

.lead-status-badge.contacted {
    background: var(--info-alpha-10);
    color: var(--info-dark);
}

.lead-status-badge.qualified {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-medium);
}

.lead-status-badge.unqualified {
    background: var(--error-alpha-10);
    color: var(--error-dark);
}

/* Tasks Tab Styles */
.task-filters {
    margin-bottom: 1.5rem;
}

.task-filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ALTERNATIVA B: pill redondeado con borde (activo) */
.task-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-filter-btn:hover {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

.task-filter-btn.active {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: white;
}

.task-filter-btn.active .task-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.task-count {
    padding: 0.125rem 0.5rem;
    background: var(--mud-palette-background);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-count-danger {
    background: var(--error-alpha-10);
    color: var(--error-dark);
}

.task-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.task-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
}

.task-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-stat-icon.blue {
    background: var(--info-alpha-10);
    color: var(--info);
}

.task-stat-icon.orange {
    background: var(--warning-alpha-10);
    color: var(--warning);
}

.task-stat-icon.green {
    background: var(--success-alpha-10);
    color: var(--success);
}

.task-stat-icon.red {
    background: var(--error-alpha-10);
    color: var(--error);
}

.task-stat-info {
    display: flex;
    flex-direction: column;
}

.task-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.task-stat-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.task-item:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-item.completed {
    opacity: 0.7;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--mud-palette-text-secondary);
}

.task-item.overdue {
    border-left: 3px solid var(--error);
}

.task-checkbox {
    padding-top: 0.125rem;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.task-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.task-priority {
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-priority.priority-high {
    background: var(--error-alpha-10);
    color: var(--error-dark);
}

.task-priority.priority-medium {
    background: var(--warning-alpha-10);
    color: var(--warning-dark);
}

.task-priority.priority-low {
    background: var(--info-alpha-10);
    color: var(--info);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.task-meta .overdue {
    color: var(--error);
    font-weight: 500;
}

.task-family-group {
    color: var(--mud-palette-primary) !important;
}

.task-recurring {
    padding: 0.125rem 0.5rem;
    background: rgba(var(--mud-palette-info-rgb), 0.1);
    border-radius: 4px;
    color: var(--mud-palette-info) !important;
    text-transform: capitalize;
}

.task-description {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.5;
}

.task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--mud-palette-surface);
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: 12px;
    color: var(--mud-palette-text-secondary);
}

.task-empty h4 {
    margin: 1rem 0 0.5rem;
    font-size: 1.125rem;
    color: var(--mud-palette-text-primary);
}

.task-empty p {
    margin: 0;
    font-size: 0.875rem;
}

/* ── Status Change Dialog ── */
.task-comment-overlay {
    position: fixed;
    inset: 0;
    background: var(--black-alpha-30);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    animation: overlay-in 0.15s ease-out;
}

@keyframes overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.task-comment-box {
    background: var(--mud-palette-surface);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    animation: dialog-enter 0.2s ease-out;
}

@keyframes dialog-enter {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Dialog header */
.dialog-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dialog-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--indigo-alpha-10);
    color: var(--indigo);
    flex-shrink: 0;
}

.task-comment-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 650;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.task-comment-subtitle {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.current-status {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* Status chip buttons */
.status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.875rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border: 1.5px solid transparent;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1;
    letter-spacing: 0.01em;
}

.status-chip-icon {
    font-size: 14px !important;
    width: 14px;
    height: 14px;
}

.status-chip.status-pending {
    background: var(--warning-alpha-10);
    color: var(--warning-amber);
    border-color: var(--warning-alpha-20);
}

.status-chip.status-pending:hover {
    background: var(--warning-alpha-18);
    border-color: var(--warning-alpha-40);
}

.status-chip.status-inprogress {
    background: var(--info-alpha-10);
    color: var(--info-darker);
    border-color: var(--info-alpha-20);
}

.status-chip.status-inprogress:hover {
    background: var(--info-alpha-18);
    border-color: var(--info-alpha-40);
}

.status-chip.status-completed {
    background: var(--success-light-alpha-10);
    color: var(--success-text-dark);
    border-color: var(--success-light-alpha-20);
}

.status-chip.status-completed:hover {
    background: var(--success-light-alpha-18);
    border-color: var(--success-light-alpha-40);
}

.status-chip.status-cancelled {
    background: var(--gray-alpha-10);
    color: var(--gray-text-dark);
    border-color: var(--gray-alpha-20);
}

.status-chip.status-cancelled:hover {
    background: var(--gray-alpha-18);
    border-color: var(--gray-alpha-40);
}

.status-chip.selected {
    color: var(--mud-palette-white);
    border-color: transparent;
    box-shadow: 0 1px 4px var(--black-alpha-12);
}

.status-chip.selected.status-pending {
    background: var(--warning);
}

.status-chip.selected.status-inprogress {
    background: var(--info);
}

.status-chip.selected.status-completed {
    background: var(--success-light);
}

.status-chip.selected.status-cancelled {
    background: var(--gray-500);
}

/* ═════ Aliases semánticos de .status-chip (§19.X) ═════
   Los 4 variantes originales (status-pending/inprogress/completed/cancelled)
   describen el ESTADO DE UN FLUJO.
   Estos aliases permiten rotular por SEVERIDAD/SEMÁNTICA para casos donde
   la semántica-flujo no aplica (errores, éxitos, advertencias, info neutra).
   Usar el que exprese mejor la intención del dato:
     - "Tarea está pendiente" → status-pending (estado de flujo)
     - "Operación completada con éxito" → status-success (severidad)
     - "Usuario rechazado / error" → status-error (severidad destructiva)
*/

/* status-warning = alias de status-pending (ambos amber) */
.status-chip.status-warning {
    background: var(--warning-alpha-10);
    color: var(--warning-amber);
    border-color: var(--warning-alpha-20);
}
.status-chip.status-warning:hover {
    background: var(--warning-alpha-18);
    border-color: var(--warning-alpha-40);
}
.status-chip.selected.status-warning { background: var(--warning); }

/* status-info = alias de status-inprogress (ambos blue) */
.status-chip.status-info {
    background: var(--info-alpha-10);
    color: var(--info-darker);
    border-color: var(--info-alpha-20);
}
.status-chip.status-info:hover {
    background: var(--info-alpha-18);
    border-color: var(--info-alpha-40);
}
.status-chip.selected.status-info { background: var(--info); }

/* status-success = alias de status-completed (ambos green) */
.status-chip.status-success {
    background: var(--success-light-alpha-10);
    color: var(--success-text-dark);
    border-color: var(--success-light-alpha-20);
}
.status-chip.status-success:hover {
    background: var(--success-light-alpha-18);
    border-color: var(--success-light-alpha-40);
}
.status-chip.selected.status-success { background: var(--success-light); }

/* status-default = alias de status-cancelled (ambos gray — "sin estado asignado") */
.status-chip.status-default {
    background: var(--gray-alpha-10);
    color: var(--gray-text-dark);
    border-color: var(--gray-alpha-20);
}
.status-chip.status-default:hover {
    background: var(--gray-alpha-18);
    border-color: var(--gray-alpha-40);
}
.status-chip.selected.status-default { background: var(--gray-500); }

/* status-error = NUEVA variante (rojo) — no existía en la paleta original.
   Para rechazos, fallas, errores destructivos. Distinta de status-default (gris). */
.status-chip.status-error {
    background: var(--error-alpha-10);
    color: var(--error-dark);
    border-color: var(--error-alpha-20);
}
.status-chip.status-error:hover {
    background: var(--error-alpha-15);
    border-color: var(--error-alpha-40);
}
.status-chip.selected.status-error { background: var(--error); }

/* Comment textarea */
.comment-section {
    margin-bottom: 0.875rem;
}

.comment-textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    box-sizing: border-box;
}

.comment-textarea::placeholder {
    color: var(--mud-palette-text-disabled);
    font-size: 0.775rem;
}

.comment-textarea:focus {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-alpha-12);
}

/* Dialog action buttons */
.task-comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.dialog-btn {
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.dialog-btn-ghost {
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border-radius: 10px;
}

.dialog-btn-ghost:hover {
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
}

.dialog-btn-primary {
    background: var(--indigo);
    color: var(--mud-palette-white);
}

.dialog-btn-primary:hover:not(:disabled) {
    background: var(--indigo-dark);
}

.dialog-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.task-item.cancelled {
    opacity: 0.6;
}

.task-item.cancelled .task-title {
    text-decoration: line-through;
    color: var(--mud-palette-text-secondary);
}

.task-stat-icon.grey {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-500);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .personal-info-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .personal-info-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid.three-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .data-grid {
        grid-template-columns: 1fr;
    }

    .list-detail-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .task-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .task-filter-group {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid.three-cols {
        grid-template-columns: 1fr;
    }

    .personal-info-grid-5,
    .personal-info-grid-4,
    .personal-info-grid-3,
    .personal-info-grid-2,
    .personal-info-grid-1 {
        grid-template-columns: 1fr;
    }

    .personal-info-section-card {
        padding: 1rem 1.25rem;
    }

    .personal-info-action-buttons {
        flex-direction: column;
    }

    .personal-info-action-buttons button {
        width: 100%;
    }
}

/* =============================================
   ACTIVITY TIMELINE / FOLLOW-UP COMPONENT
   ============================================= */

/* Activity Toolbar */
.activity-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.activity-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.activity-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Activity Search Bar */
.activity-search-bar {
    margin-bottom: 1rem;
}

.activity-search-bar .mud-input-control {
    background: var(--mud-palette-surface);
}

/* Activity Filter Panel */
.activity-filter-panel {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.activity-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.activity-filter-row .mud-input-control {
    min-width: 160px;
}

/* Activity Loading */
.activity-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--mud-palette-text-secondary);
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Date Group Header */
.activity-date-header {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0 1rem;
}

.activity-date-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    box-shadow: 0 2px 6px var(--black-alpha-6);
}

/* Activity Item */
.activity-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1.5rem;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 1.75rem;
    bottom: 0;
    width: 2px;
    background: var(--mud-palette-lines-default);
}

.activity-item:last-child::before {
    display: none;
}

/* Activity Item Header */
.activity-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.activity-type-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.activity-type-icon {
    position: absolute;
    left: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-surface);
    border: 2px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
    z-index: 1;
}

.activity-type-icon.email {
    background: linear-gradient(135deg, var(--info-bg) 0%, var(--info-bg-light) 100%);
    border-color: #93c5fd;
    color: var(--info-dark);
}

.activity-type-icon.meeting {
    background: linear-gradient(135deg, var(--success-bg) 0%, var(--success-bg-pastel) 100%);
    border-color: #6ee7b7;
    color: var(--success-dark);
}

.activity-type-icon.call {
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    border-color: var(--warning-pale);
    color: var(--warning-dark);
}

.activity-type-icon.note {
    background: linear-gradient(135deg, var(--indigo-light) 0%, var(--purple-bg-indigo) 100%);
    border-color: var(--purple-soft);
    color: var(--indigo-dark);
}

.activity-type-icon.task {
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    border-color: #f9a8d4;
    color: var(--error-pink-dark);
}

.activity-type-icon.item.created,
.activity-type-icon[class*="item created"] {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    border-color: #5eead4;
    color: var(--teal-dark);
}

.activity-type-icon.family.member.added,
.activity-type-icon[class*="family member added"] {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    border-color: #5eead4;
    color: var(--teal-dark);
}

.activity-type-icon.family.group.created,
.activity-type-icon[class*="family group created"] {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    border-color: #5eead4;
    color: var(--teal-dark);
}

.activity-type-icon.family.member.left,
.activity-type-icon[class*="family member left"] {
    background: linear-gradient(135deg, var(--border-default) 0%, var(--border-muted) 100%);
    border-color: var(--gray-400);
    color: var(--gray-500);
}

.activity-type-icon.marriage.created,
.activity-type-icon[class*="marriage created"] {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.12) 0%, rgba(225, 29, 72, 0.12) 100%);
    border-color: rgba(244, 63, 94, 0.25);
    color: #be123c;
}

.activity-type-icon.divorced {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(71, 85, 105, 0.12) 100%);
    border-color: rgba(100, 116, 139, 0.25);
    color: var(--text-tertiary);
}

.activity-type-icon.widowed {
    background: linear-gradient(135deg, var(--indigo-alpha-12) 0%, rgba(79, 70, 229, 0.12) 100%);
    border-color: var(--indigo-alpha-25);
    color: var(--indigo-darker);
}

.activity-type-icon.marriage.annulled,
.activity-type-icon[class*="marriage annulled"] {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(234, 88, 12, 0.12) 100%);
    border-color: rgba(249, 115, 22, 0.25);
    color: #c2410c;
}

.activity-type-icon.separated {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(202, 138, 4, 0.12) 100%);
    border-color: rgba(234, 179, 8, 0.25);
    color: #a16207;
}



.activity-type-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    text-transform: capitalize;
}

.activity-timestamp {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.activity-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.activity-reminder-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: #FEF9C3;
    border: 1px solid #FDE047;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #854D0E;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.activity-reminder-badge:hover {
    background: #FEF08A;
    border-color: #FACC15;
    box-shadow: 0 2px 6px rgba(250, 204, 21, 0.2);
}

.activity-reminder-badge .mud-icon-root {
    color: #CA8A04;
    font-size: 0.875rem;
}

/* Past reminder styling */
.activity-reminder-badge.past {
    background: #FEE2E2;
    border-color: var(--error-pastel);
    color: #991B1B;
}

.activity-reminder-badge.past .mud-icon-root {
    color: #DC2626;
}

/* Activity Card */
.activity-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.activity-card:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 4px 12px var(--black-alpha-8);
}

.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.activity-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.activity-avatar.purple {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
}

.activity-avatar.blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.activity-avatar.green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.activity-avatar.orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.activity-avatar.pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.activity-avatar.teal {
    background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%);
}

.activity-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.activity-user-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.activity-action-text {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 400;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.5rem;
}

.activity-meta .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-disabled);
}

.activity-subject {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.5rem;
}

.activity-description {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.6;
    max-height: 3.2em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.activity-description.expanded {
    max-height: none;
}

.activity-show-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--mud-palette-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.activity-show-more:hover {
    color: var(--mud-palette-primary-darken);
}

/* Activity Attachments */
.activity-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.activity-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--mud-palette-background);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-attachment:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-primary);
}

/* Activity Footer */
.activity-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.activity-reaction-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.activity-reaction-btn:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

.activity-reactions {
    display: flex;
    gap: 0.25rem;
}

.activity-reaction {
    font-size: 1rem;
    cursor: pointer;
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.activity-reaction:hover {
    background: var(--mud-palette-action-default-hover);
}

.activity-delete-item {
    color: var(--error) !important;
}

.activity-delete-item:hover {
    background: var(--error-alpha-10) !important;
}

/* Activity Menu Items */
.activity-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0;
    min-width: 160px;
}

.activity-menu-item span {
    flex: 1;
    font-size: 0.875rem;
}

.activity-menu-item.has-submenu .submenu-arrow {
    color: var(--mud-palette-text-secondary);
    margin-left: auto;
}

.activity-menu-item .mud-icon-root {
    font-size: 1.125rem;
    color: var(--mud-palette-text-secondary);
}

.activity-delete-item .activity-menu-item .mud-icon-root {
    color: var(--error);
}

/* Load More Button */
/* Activity Timeline Container - Scrollable */
.activity-timeline-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-right: 0.5rem;
}

/* Custom scrollbar for the timeline container */
.activity-timeline-container::-webkit-scrollbar {
    width: 6px;
}

.activity-timeline-container::-webkit-scrollbar-track {
    background: var(--mud-palette-background);
    border-radius: 3px;
}

.activity-timeline-container::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
}

.activity-timeline-container::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-text-secondary);
}

/* Load more indicator for scroll pagination */
.activity-load-more-scroll {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

/* Scroll hint indicator */
.activity-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    color: var(--mud-palette-text-disabled);
    font-size: 0.75rem;
    opacity: 0.7;
    animation: bounceHint 2s ease-in-out infinite;
}

@keyframes bounceHint {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(4px);
    }
}

.activity-load-more {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

/* =============================================
   ACTIVITY COMMENT SECTION (Trello-style)
   ============================================= */

.activity-comment-section {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.activity-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-background-gray);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.activity-comment-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.activity-toggle-details {
    background: none;
    border: none;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.activity-toggle-details:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--mud-palette-primary);
}

.activity-comment-input-wrapper {
    padding: 0;
}

/* Rich Text Toolbar */
.activity-text-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0.375rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 28px;
    height: 28px;
}

.toolbar-btn:hover {
    background: var(--black-alpha-6);
    color: var(--mud-palette-text-primary);
}

.toolbar-btn.active {
    background: var(--mud-palette-primary-lighten);
    color: var(--mud-palette-primary);
}

.toolbar-btn.font-btn {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
}

.toolbar-btn.font-btn span {
    margin-right: 2px;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--mud-palette-lines-default);
    margin: 0 0.375rem;
}

.toolbar-spacer {
    flex: 1;
}

.toolbar-right {
    margin-left: auto;
}

/* Comment Textarea */
.activity-comment-textarea {
    padding: 0;
}

.activity-comment-textarea .mud-input-control {
    margin: 0;
}

.activity-comment-textarea .mud-input-slot {
    padding: 0.75rem 1rem !important;
}

.activity-comment-textarea .mud-input {
    font-size: 0.875rem;
    line-height: 1.5;
}

.activity-comment-textarea .mud-input::placeholder {
    color: var(--mud-palette-text-disabled);
}

.activity-comment-textarea textarea {
    resize: none;
    min-height: 60px;
}

/* Action Bar */
.activity-comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.625rem 1rem;
    background: var(--mud-palette-background-gray);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.activity-comment-actions .mud-button-filled {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: none;
    padding: 0.375rem 1rem;
    min-height: 32px;
}

.activity-comment-actions .watch-checkbox {
    margin-left: 0;
}

.activity-comment-actions .watch-checkbox .mud-typography {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Dark mode adjustments */
.mud-theme-dark .activity-comment-header {
    background: rgba(255, 255, 255, 0.03);
}

.mud-theme-dark .activity-text-toolbar {
    background: rgba(255, 255, 255, 0.02);
}

.mud-theme-dark .toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mud-theme-dark .activity-toggle-details:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mud-theme-dark .activity-comment-actions {
    background: rgba(255, 255, 255, 0.03);
}

/* Responsive */
@media (max-width: 768px) {
    .activity-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .activity-toolbar-left {
        justify-content: center;
    }

    .activity-toolbar-right {
        justify-content: center;
    }

    .activity-filter-row {
        flex-direction: column;
    }

    .activity-filter-row .mud-input-control {
        width: 100%;
    }

    .activity-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* =============================================
   CONTACT LIST SKELETON LOADING
   ============================================= */

/* Skeleton Animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton-pulse {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Grid Skeleton Card */
.data-tile-skeleton {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.w-70 {
    width: 70%;
}

.skeleton-line.w-60 {
    width: 60%;
}

.skeleton-line.w-50 {
    width: 50%;
}

.skeleton-line.w-40 {
    width: 40%;
}

.skeleton-line.w-30 {
    width: 30%;
}

.skeleton-details {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-top: 0.25rem;
}

.skeleton-detail {
    height: 16px;
    width: 85%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-detail:nth-child(2) {
    width: 70%;
    animation-delay: 0.1s;
}

.skeleton-detail:nth-child(3) {
    width: 60%;
    animation-delay: 0.2s;
}

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin-top: 0.25rem;
}

.skeleton-badge {
    width: 60px;
    height: 24px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* List Skeleton Row */
.list-detail-skeleton {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.skeleton-list-info {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1fr;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .skeleton-list-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Summary Tab Skeleton */
.stat-card-skeleton {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skeleton-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Chart Skeleton */
.chart-card-skeleton {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    overflow: hidden;
}

.skeleton-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.skeleton-chart-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-funnel-bar {
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-funnel-bar:nth-child(1) {
    animation-delay: 0s;
}

.skeleton-funnel-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.skeleton-funnel-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.skeleton-funnel-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.skeleton-funnel-bar:nth-child(5) {
    animation-delay: 0.4s;
}

.skeleton-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Source List Skeleton */
.skeleton-source-list {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.skeleton-source-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.skeleton-source-item:last-child {
    border-bottom: none;
}

.skeleton-source-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-source-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Line Chart Skeleton */
.skeleton-line-chart {
    height: 250px;
    margin: 1.5rem;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 400px 100%;
    animation: skeleton-shimmer 2s ease-in-out infinite;
}

/* Activity Skeleton */
.skeleton-activity-list {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.skeleton-activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.skeleton-activity-item:last-child {
    border-bottom: none;
}

.skeleton-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--bg-skeleton-alt) 50%, var(--bg-skeleton) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .stats-grid .stat-card-skeleton {
        padding: 1.25rem;
    }

    .skeleton-stat-icon {
        width: 50px;
        height: 50px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTERNATIONAL PHONE INPUT - PREMIUM DESIGN
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* Wrapper */
.intl-phone-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Floating Label */
.intl-phone-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-disabled);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    background: transparent;
    padding: 0 0.25rem;
}

.intl-phone-label.active {
    top: -0.625rem;
    left: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--indigo);
    background: linear-gradient(to bottom, transparent 50%, var(--mud-palette-surface, var(--mud-palette-white)) 50%);
}

.intl-phone-wrapper.error .intl-phone-label.active {
    color: var(--error);
}

/* Main Input Container */
.intl-phone-input {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--mud-palette-surface, var(--mud-palette-white));
    border: 2px solid var(--border-light);
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 52px;
}

.intl-phone-input::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--indigo-alpha-3) 0%, var(--violet-alpha-3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* Allow clicks to pass through */
}

.intl-phone-wrapper.focused .intl-phone-input::before {
    opacity: 1;
}

.intl-phone-wrapper:hover:not(.disabled) .intl-phone-input {
    border-color: var(--purple-bg-indigo);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.06);
}

.intl-phone-wrapper.focused .intl-phone-input {
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px var(--indigo-alpha-10), 0 8px 32px var(--indigo-alpha-12);
}

.intl-phone-wrapper.dropdown-open .intl-phone-input {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-alpha-10);
}

.intl-phone-wrapper.error .intl-phone-input {
    border-color: #fca5a5;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02) 0%, transparent 100%);
}

.intl-phone-wrapper.error.focused .intl-phone-input {
    border-color: var(--error);
    box-shadow: 0 0 0 4px var(--error-alpha-10), 0 8px 32px rgba(239, 68, 68, 0.12);
}

.intl-phone-wrapper.disabled .intl-phone-input {
    background: var(--bg-page);
    border-color: var(--border-light);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Country Selector */
.intl-phone-country-selector {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 0.625rem 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.intl-phone-country-selector:hover {
    background: var(--indigo-alpha-4);
}

.intl-phone-country-selector:active {
    background: var(--indigo-alpha-8);
}

.intl-phone-wrapper.disabled .intl-phone-country-selector {
    cursor: not-allowed;
    pointer-events: none;
}

/* Flag Wrapper */
.intl-phone-flag-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intl-phone-flag-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
}

.intl-phone-country-selector:hover .intl-phone-flag-img {
    transform: scale(1.1);
}

/* Dial Code */
.intl-phone-dial-code {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary, var(--text-primary));
    min-width: 40px;
    letter-spacing: 0.01em;
}

/* Arrow */
.intl-phone-arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.1);
    transition: all 0.2s ease;
}

.intl-phone-country-selector:hover .intl-phone-arrow-container {
    background: var(--indigo-alpha-12);
}

.intl-phone-arrow {
    color: var(--text-secondary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.intl-phone-arrow.open {
    transform: rotate(180deg);
    color: var(--indigo);
}

/* Separator */
.intl-phone-separator {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, var(--border-light) 20%, var(--border-light) 80%, transparent);
    flex-shrink: 0;
    margin: 0 0.125rem;
}

/* Phone Number Input */
.intl-phone-number-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary, var(--text-primary));
    background: transparent;
    min-width: 0;
    letter-spacing: 0.02em;
}

.intl-phone-number-input::placeholder {
    color: var(--text-disabled);
    font-weight: 400;
}

.intl-phone-number-input:disabled {
    cursor: not-allowed;
}

/* Clear Button */
.intl-phone-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 0.75rem;
    border: none;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    color: var(--text-disabled);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.intl-phone-clear:hover {
    background: var(--error-alpha-10);
    color: var(--error);
    transform: scale(1.05);
}

.intl-phone-clear:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE DROPDOWN
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.intl-phone-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    background: var(--mud-palette-surface, var(--mud-palette-white));
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 12px 40px var(--black-alpha-15), 0 4px 16px var(--black-alpha-8);
    z-index: 999999;
    overflow: hidden;
    animation: intl-dropdown-enter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
}

@keyframes intl-dropdown-enter {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Header */
.intl-phone-dropdown-header {
    position: relative;
    background: #fafafa;
    border-bottom: 1px solid var(--border-light);
}

/* Search */
.intl-phone-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.intl-phone-search-icon {
    color: var(--text-disabled);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.intl-phone-search:focus-within .intl-phone-search-icon {
    color: var(--indigo);
}

.intl-phone-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary, var(--text-primary));
    padding: 0;
}

.intl-phone-search input::placeholder {
    color: var(--text-disabled);
    font-weight: 400;
}

.intl-phone-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.intl-phone-search-clear:hover {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-tertiary);
}

/* Country List */
.intl-phone-country-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
}

/* No Results */
.intl-phone-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 0.75rem;
    color: var(--text-disabled);
}

.intl-phone-no-results span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Country Item */
.intl-phone-country-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.intl-phone-country-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--indigo);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.intl-phone-country-item:hover {
    background: var(--bg-page);
}

.intl-phone-country-item:hover::before {
    transform: scaleY(1);
}

.intl-phone-country-item.selected {
    background: var(--indigo-lightest);
}

.intl-phone-country-item.selected::before {
    transform: scaleY(1);
}

.intl-phone-country-item:active {
    background: var(--indigo-light);
}

/* Flag in Country List */
.intl-phone-list-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 2px var(--black-alpha-10);
    flex-shrink: 0;
}

/* Country Name */
.intl-phone-country-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary, var(--text-primary));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dial Code */
.intl-phone-country-dial {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--indigo);
    flex-shrink: 0;
}

/* Check Mark */
.intl-phone-country-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--indigo);
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE HELPER & ERROR TEXT
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.intl-phone-helper {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.intl-phone-error-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--error);
    margin-left: 0.25rem;
}

.intl-phone-error-text svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE BACKDROP
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.intl-phone-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.intl-phone-country-list::-webkit-scrollbar {
    width: 8px;
}

.intl-phone-country-list::-webkit-scrollbar-track {
    background: var(--bg-subtle);
    border-radius: 4px;
    margin: 4px 0;
}

.intl-phone-country-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--purple-bg-indigo) 0%, var(--purple-soft) 100%);
    border-radius: 4px;
    border: 2px solid var(--bg-subtle);
}

.intl-phone-country-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--purple-soft) 0%, #818cf8 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE DARK MODE SUPPORT
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.mud-theme-dark .intl-phone-input {
    border-color: var(--text-muted);
    background: var(--text-primary);
}

.mud-theme-dark .intl-phone-wrapper:hover:not(.disabled) .intl-phone-input {
    border-color: var(--indigo-dark);
    box-shadow: 0 4px 20px var(--indigo-alpha-10);
}

.mud-theme-dark .intl-phone-dial-code,
.mud-theme-dark .intl-phone-number-input {
    color: var(--bg-subtle);
}

.mud-theme-dark .intl-phone-number-input::placeholder {
    color: var(--text-secondary);
}

.mud-theme-dark .intl-phone-separator {
    background: linear-gradient(to bottom, transparent, var(--text-muted) 20%, var(--text-muted) 80%, transparent);
}

.mud-theme-dark .intl-phone-dropdown {
    background: var(--text-primary);
    border-color: var(--indigo);
}

.mud-theme-dark .intl-phone-dropdown-header {
    background: linear-gradient(135deg, #0f172a 0%, var(--text-primary) 100%);
    border-color: var(--text-muted);
}

.mud-theme-dark .intl-phone-country-name {
    color: var(--bg-subtle);
}

.mud-theme-dark .intl-phone-country-flag {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-muted) 100%);
}

.mud-theme-dark .intl-phone-country-list::-webkit-scrollbar-track {
    background: var(--text-primary);
}

.mud-theme-dark .intl-phone-country-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--indigo-dark) 0%, var(--indigo) 100%);
    border-color: var(--text-primary);
}

.mud-theme-dark .intl-phone-label.active {
    background: linear-gradient(to bottom, transparent 50%, var(--text-primary) 50%);
}

.mud-theme-dark .intl-phone-search input {
    color: var(--bg-subtle);
}

.mud-theme-dark .intl-phone-clear {
    background: rgba(148, 163, 184, 0.15);
}

.mud-theme-dark .intl-phone-search-clear {
    background: rgba(148, 163, 184, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .intl-phone-input {
        min-height: 48px;
    }

    .intl-phone-flag {
        font-size: 1.25rem;
    }

    .intl-phone-dial-code {
        font-size: 0.875rem;
        min-width: 36px;
    }

    .intl-phone-number-input {
        font-size: 0.9375rem;
        padding: 0.75rem 0.875rem;
    }

    .intl-phone-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        max-height: 60vh;
        border: 2px solid var(--indigo);
    }

    .intl-phone-country-list {
        max-height: calc(60vh - 80px);
    }
}

/* ============================================
   International Phone Display Component
   ============================================ */
.intl-phone-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

/* Flag */
.intl-phone-display-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 2px var(--black-alpha-10);
}

.intl-phone-display-flag img,
.intl-phone-display-flag-img {
    width: 22px !important;
    max-width: 22px !important;
    height: 16px !important;
    max-height: 16px !important;
    object-fit: cover;
    display: block;
}

/* Dial Code */
.intl-phone-display-code {
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

/* Number */
.intl-phone-display-number {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Copy Button */
.intl-phone-display-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-disabled);
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.intl-phone-display:hover .intl-phone-display-copy {
    opacity: 1;
}

.intl-phone-display-copy:hover {
    background: var(--bg-subtle);
    color: var(--indigo);
}

.intl-phone-display-copy .mud-icon-root {
    font-size: 0.875rem;
}

/* Size Variants */
.intl-phone-display-sm {
    font-size: 0.8125rem;
    gap: 0.375rem;
}

.intl-phone-display-sm .intl-phone-display-flag {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
}

.intl-phone-display-sm .intl-phone-display-flag img,
.intl-phone-display-sm .intl-phone-display-flag-img {
    width: 18px !important;
    max-width: 18px !important;
    height: 13px !important;
    max-height: 13px !important;
}

.intl-phone-display-sm .intl-phone-display-copy {
    width: 20px;
    height: 20px;
}

.intl-phone-display-lg {
    font-size: 1.125rem;
    gap: 0.625rem;
}

.intl-phone-display-lg .intl-phone-display-flag {
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
}

.intl-phone-display-lg .intl-phone-display-flag img,
.intl-phone-display-lg .intl-phone-display-flag-img {
    width: 26px !important;
    max-width: 26px !important;
    height: 18px !important;
    max-height: 18px !important;
}

.intl-phone-display-lg .intl-phone-display-copy {
    width: 28px;
    height: 28px;
}

/* Chip Variant */
.intl-phone-display-chip {
    background: var(--bg-subtle);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.intl-phone-display-chip:hover {
    background: var(--border-light);
}

.intl-phone-display-chip .intl-phone-display-copy {
    opacity: 1;
    margin-left: 0.25rem;
}

/* Badge Variant */
.intl-phone-display-badge {
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    border: 1px solid var(--purple-bg-indigo);
}

.intl-phone-display-badge .intl-phone-display-code {
    color: var(--indigo);
}

.intl-phone-display-badge .intl-phone-display-number {
    color: #3730a3;
}

.intl-phone-display-badge .intl-phone-display-copy {
    opacity: 1;
}

.intl-phone-display-badge .intl-phone-display-copy:hover {
    background: var(--indigo-alpha-10);
}

/* Inline Variant */
.intl-phone-display-inline {
    gap: 0.375rem;
}

.intl-phone-display-inline .intl-phone-display-flag {
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 12px !important;
    min-height: 12px !important;
    max-height: 12px !important;
}

.intl-phone-display-inline .intl-phone-display-flag img,
.intl-phone-display-inline .intl-phone-display-flag-img {
    width: 16px !important;
    max-width: 16px !important;
    height: 12px !important;
    max-height: 12px !important;
}

.intl-phone-display-inline .intl-phone-display-code {
    font-size: 0.8125rem;
}

.intl-phone-display-inline .intl-phone-display-number {
    font-size: 0.875rem;
}

/* Link-style when clickable */
a .intl-phone-display,
.intl-phone-display-clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

a .intl-phone-display:hover .intl-phone-display-number,
.intl-phone-display-clickable:hover .intl-phone-display-number {
    color: var(--indigo);
    text-decoration: underline;
}

/* ========================================
   Family Edit Dialog Styles
   ======================================== */

/* Dialog Base */
.family-edit-dialog {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.family-edit-dialog .mud-dialog-title {
    padding: 0 !important;
}

.family-edit-dialog .mud-dialog-content {
    padding: 0 !important;
}

.family-edit-dialog .mud-dialog-actions {
    padding: 0 !important;
}

/* Hide default MudDialog close button */
.family-edit-dialog .mud-dialog-close-button {
    display: none !important;
}

/* Header */
.family-edit-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-pink-dark) 50%, #be185d 100%);
    color: white;
}

.family-edit-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--white-alpha-20);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.family-edit-header-content {
    flex: 1;
}

.family-edit-header-close-btn {
    color: white !important;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
}

.family-edit-header-close-btn:hover {
    opacity: 1;
    background: var(--white-alpha-20) !important;
}

.family-edit-header-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.family-edit-header-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

/* Body */
.family-edit-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 65vh;
    overflow-y: auto;
}

/* Option Tabs */
.family-edit-option-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.family-edit-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 2px solid transparent;
}

.family-edit-tab:hover {
    background: var(--indigo-alpha-8);
    color: var(--indigo-dark);
}

.family-edit-tab.family-edit-tab-active {
    background: white;
    color: var(--indigo-dark);
    border-color: var(--indigo);
    box-shadow: 0 2px 8px var(--indigo-alpha-15);
}

.family-edit-tab .mud-icon-root {
    font-size: 1.125rem;
}

/* Contact family badges */
.family-edit-contact-family.family-edit-has-family {
    color: var(--success-dark);
}

.family-edit-contact-family.family-edit-has-family .mud-icon-root {
    color: var(--success);
}

.family-edit-contact-family.family-edit-no-family {
    color: var(--gray-500);
}

/* My Role Section */
.family-edit-my-role-section {
    margin-top: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--success-bg-lighter) 0%, var(--success-bg-lightest) 100%);
    border: 1px solid var(--success-bg-soft);
    border-radius: 10px;
}

/* Family Hint with Icon */
.family-edit-family-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.family-edit-family-hint .mud-icon-root {
    color: var(--info);
    flex-shrink: 0;
}

/* Create Family Prompt (for contact without family) */
.family-edit-create-family-prompt {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.family-edit-create-family-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--info), var(--info-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.family-edit-create-family-icon .mud-icon-root {
    color: white;
}

.family-edit-create-family-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
}

.family-edit-create-family-content p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--info);
}

/* Roles Section */
.family-edit-roles-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--info-bg-light);
}

/* New Family Card (for Option 2) */
.family-edit-new-family-card {
    background: linear-gradient(145deg, var(--success-bg-lighter) 0%, var(--success-bg-lightest) 50%, var(--success-bg-soft) 100%);
    border: 2px solid #86efac;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.1), 0 2px 4px -1px rgba(34, 197, 94, 0.06);
}

.family-edit-new-family-card .family-edit-card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%);
    color: white;
    border-radius: 14px 14px 0 0;
}

.family-edit-new-family-card .family-edit-card-header .mud-icon-root {
    color: white;
}

.family-edit-new-family-card .family-edit-card-header span {
    color: white;
}

.family-edit-new-family-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px dashed #86efac;
}

.family-edit-new-family-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--success-light), var(--success-medium));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.family-edit-new-family-icon .mud-icon-root {
    color: white;
}

.family-edit-new-family-text h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--success-darker);
}

.family-edit-new-family-text p {
    margin: 0;
    font-size: 0.8125rem;
    color: #15803d;
}

.family-edit-new-family-card>.family-edit-section,
.family-edit-new-family-card>.family-edit-household-roles-section,
.family-edit-new-family-card>.family-edit-additional-members-section {
    padding: 0 1.25rem;
    margin: 1rem 0;
}

.family-edit-additional-members-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin: 0 0 0.75rem 0;
}

/* Notes Section */
.family-edit-notes-section {
    margin-top: 0.5rem;
}

/* Section */
.family-edit-section {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.family-edit-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
}

.family-edit-label.family-edit-required::after {
    content: " *";
    color: var(--error);
}

/* Row layout */
.family-edit-row {
    display: flex;
    gap: 1rem;
}

.family-edit-flex-1 {
    flex: 1;
}

/* Cards */
.family-edit-card {
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1rem;
}

.family-edit-card.family-edit-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.family-edit-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.family-edit-card-header .mud-icon-root {
    color: var(--indigo);
}

.family-edit-marriage-card {
    background: linear-gradient(135deg, #fdf2f8 0%, var(--pink-bg) 100%);
    border-color: var(--pink-bg-light);
}

.family-edit-marriage-card .family-edit-card-header .mud-icon-root {
    color: var(--pink);
}

.family-edit-contact-card {
    background: linear-gradient(135deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
    border-color: var(--info-bg-light);
}

.family-edit-contact-card .family-edit-card-header .mud-icon-root {
    color: var(--info);
}

/* Marriage Section */
.family-edit-marriage-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fdf2f8 0%, var(--pink-bg) 100%);
    border: 1px solid var(--pink-bg-light);
    border-radius: 10px;
}

.family-edit-marriage-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #be185d;
    font-size: 0.875rem;
    margin-bottom: 0.875rem;
}

.family-edit-marriage-header .mud-icon-root {
    color: var(--pink);
}

/* Contact Option in Autocomplete */
.family-edit-contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
}

.family-edit-contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.family-edit-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.family-edit-contact-name {
    font-weight: 500;
    color: var(--text-primary-alt);
}

.family-edit-contact-family {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.family-edit-contact-family .mud-icon-root {
    font-size: 0.875rem;
}

/* Family Members Section */
.family-edit-family-members-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--info-bg-light);
}

.family-edit-family-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.family-edit-family-header .mud-icon-root {
    color: var(--info);
}

.family-edit-member-count {
    margin-left: auto;
    font-size: 0.6875rem !important;
    height: 22px !important;
}

.family-edit-family-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin: 0 0 0.75rem 0;
}

.family-edit-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.family-edit-member-card {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-default);
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.family-edit-member-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.family-edit-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f472b6, var(--pink));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.family-edit-member-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.family-edit-member-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary-alt);
}

.family-edit-member-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.family-edit-member-relation-select {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.family-edit-label-small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
}

.family-edit-select-group-sm {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.family-edit-select-item-sm {
    padding-left: 0.625rem;
    font-size: 0.8125rem;
}

/* Member Marriage Details */
.family-edit-member-marriage-details {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #fdf2f8 0%, var(--pink-bg) 100%);
    border: 1px solid var(--pink-bg-light);
    border-radius: 8px;
}

.family-edit-member-marriage-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: #be185d;
    font-size: 0.75rem;
    margin-bottom: 0.625rem;
}

.family-edit-member-marriage-header .mud-icon-root {
    color: var(--pink);
    font-size: 0.875rem;
}

.family-edit-input-small {
    background: white;
    font-size: 0.8125rem;
}

/* New Family Form */
.family-edit-new-family-form {
    margin-top: 0.875rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
    border: 1px solid var(--info-bg-light);
    border-radius: 10px;
}

.family-edit-additional-members-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--info-bg-light);
}

.family-edit-additional-members-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.family-edit-additional-members-header .mud-icon-root {
    color: var(--info);
}

.family-edit-member-count-sm {
    margin-left: auto;
    font-size: 0.625rem !important;
    height: 18px !important;
}

.family-edit-new-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.family-edit-new-member-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-default);
}

.family-edit-select-small {
    background: white;
    font-size: 0.8125rem;
}

.family-edit-add-member-btn {
    border-radius: 6px !important;
    font-size: 0.8125rem !important;
}

/* No Family Section */
.family-edit-no-family-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--info-bg-light);
}

.family-edit-no-family-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--warning-bg);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #92400e;
    margin-bottom: 0.75rem;
}

.family-edit-no-family-message .mud-icon-root {
    color: var(--warning);
}

.family-edit-create-family-option {
    padding: 0.5rem;
}

.family-edit-checkbox {
    margin: 0 !important;
}

/* Family Group Section in New Contact */
.family-edit-family-group-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--success-bg-soft);
}

.family-edit-family-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--success-darker);
    font-size: 0.8125rem;
    margin-bottom: 0.625rem;
}

.family-edit-family-group-header .mud-icon-root {
    color: var(--success-light);
}

.family-edit-optional-chip {
    margin-left: auto;
    font-size: 0.625rem !important;
    height: 18px !important;
    background: var(--border-default) !important;
    color: var(--gray-500) !important;
}

/* New Contact Card - Enhanced Styles */
.family-edit-new-contact-card {
    background: linear-gradient(145deg, var(--success-bg-light) 0%, var(--success-bg) 50%, var(--success-bg-pastel) 100%);
    border: 2px solid #6ee7b7;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 6px -1px var(--success-alpha-10), 0 2px 4px -1px rgba(16, 185, 129, 0.06);
}

.family-edit-new-contact-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
    border-top-right-radius: 16px;
    border-top-left-radius: 16px;
}

.family-edit-new-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--white-alpha-20);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.family-edit-new-contact-icon .mud-icon-root {
    color: white;
}

.family-edit-new-contact-title-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.family-edit-new-contact-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.family-edit-new-contact-subtitle {
    font-size: 0.75rem;
    opacity: 0.85;
}

.family-edit-new-contact-form {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(to bottom, rgba(209, 250, 229, 0.3) 0%, rgba(167, 243, 208, 0.2) 100%);
}

.family-edit-new-contact-form>.family-edit-section,
.family-edit-new-contact-form>.family-edit-new-contact-section,
.family-edit-new-contact-form>.family-edit-new-contact-marriage-section,
.family-edit-new-contact-form>.family-edit-new-contact-family-section {
    display: block !important;
    visibility: visible !important;
}

.family-edit-new-contact-section {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--success-bg);
    margin-top: 0;
}

.family-edit-new-contact-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #047857;
    font-size: 0.8125rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--success-bg);
}

.family-edit-new-contact-section .family-edit-row {
    display: flex;
    gap: 1rem;
}

.family-edit-new-contact-section .family-edit-section {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.family-edit-new-contact-section-header .mud-icon-root {
    color: var(--success);
}

.family-edit-new-contact-section-header.family-edit-marriage-theme {
    color: #be185d;
    border-bottom-color: var(--pink-bg-light);
}

.family-edit-new-contact-section-header.family-edit-marriage-theme .mud-icon-root {
    color: var(--pink);
}

.family-edit-new-contact-section-header.family-edit-family-theme {
    color: #1e40af;
    border-bottom-color: var(--info-bg-light);
}

.family-edit-new-contact-section-header.family-edit-family-theme .mud-icon-root {
    color: var(--info);
}

.family-edit-new-contact-section-header.family-edit-roles-theme {
    color: var(--violet-dark);
    border-bottom-color: #ddd6fe;
}

.family-edit-new-contact-section-header.family-edit-roles-theme .mud-icon-root {
    color: var(--violet);
}

/* Household Roles Section */
.family-edit-household-roles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.family-edit-role-checkbox {
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border: 1px solid var(--purple-bg-light);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}

.family-edit-role-checkbox:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 8px var(--violet-alpha-10);
}

.family-edit-role-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.family-edit-role-icon {
    flex-shrink: 0;
    padding: 0.375rem;
    border-radius: 8px;
    margin-top: 2px;
}

.family-edit-role-icon-head {
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    color: var(--warning-dark) !important;
}

.family-edit-role-icon-primary {
    background: linear-gradient(135deg, var(--info-bg) 0%, var(--info-bg-light) 100%);
    color: var(--info-dark) !important;
}

.family-edit-role-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.family-edit-role-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary-alt);
}

.family-edit-role-description {
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.family-edit-new-contact-input {
    background: var(--bg-muted) !important;
    border-radius: 8px;
}

.family-edit-new-contact-select {
    background: var(--bg-muted) !important;
    border-radius: 8px;
}

.family-edit-new-contact-marriage-section {
    background: linear-gradient(135deg, #fdf2f8 0%, var(--pink-bg) 100%);
    border: 1px solid var(--pink-bg-light);
    border-radius: 12px;
    padding: 1rem;
}

.family-edit-new-contact-family-section {
    background: linear-gradient(135deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
    border: 1px solid var(--info-bg-light);
    border-radius: 12px;
    padding: 1rem;
}

.family-edit-new-contact-family-checkbox {
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.family-edit-checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.family-edit-new-family-group-form {
    margin-top: 0.875rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--info-bg-light);
}

.family-edit-household-roles-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border-radius: 10px;
    border: 1px solid var(--purple-bg-light);
}

.family-edit-household-roles-section .family-edit-new-contact-section-header {
    margin-bottom: 0.75rem;
}

/* Family Group Card (Separate Section - Required) */
.family-edit-family-group-card {
    background: linear-gradient(145deg, var(--info-bg-lighter) 0%, var(--info-bg) 50%, var(--info-bg-light) 100%);
    border: 2px solid var(--info);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px var(--info-alpha-15);
}

.family-edit-family-group-card .family-edit-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.95rem;
}

.family-edit-family-group-card .family-edit-card-header .mud-icon-root {
    color: var(--info);
}

.family-edit-required-chip {
    margin-left: auto;
    font-size: 0.625rem !important;
    height: 18px !important;
    background: linear-gradient(135deg, var(--error-bg) 0%, var(--error-pastel) 100%) !important;
    color: var(--error-dark) !important;
    border: 1px solid #fca5a5 !important;
    font-weight: 600 !important;
}

.family-edit-family-group-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--info-bg-light);
    color: #1e40af;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.family-edit-family-group-hint .mud-icon-root {
    color: var(--info);
    flex-shrink: 0;
}

.family-edit-family-group-form {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--info-bg-light);
}

.family-edit-family-group-checkbox {
    padding: 0.625rem 0.875rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    margin-bottom: 0.75rem;
}

.family-edit-family-group-card.family-edit-family-required {
    border-color: var(--error-dark);
    background: linear-gradient(145deg, var(--error-bg-light) 0%, var(--error-bg) 50%, var(--error-pastel) 100%);
}

.family-edit-family-group-card.family-edit-family-required .family-edit-card-header {
    color: #991b1b;
}

.family-edit-family-group-card.family-edit-family-required .family-edit-card-header .mud-icon-root {
    color: var(--error-dark);
}

.family-edit-hint-required {
    background: var(--error-bg-light);
    border-color: var(--error-pastel);
    color: #991b1b;
}

.family-edit-hint-required .mud-icon-root {
    color: var(--error-dark);
}

/* Family Group Autocomplete */
.family-edit-family-autocomplete {
    background: white;
}

.family-edit-family-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.family-edit-family-option-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
    border-radius: 8px;
    color: var(--info);
    flex-shrink: 0;
}

.family-edit-family-option-icon.family-edit-new-icon {
    background: linear-gradient(135deg, var(--success-bg-light) 0%, var(--success-bg) 100%);
    color: var(--success);
}

.family-edit-family-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.family-edit-family-option-name {
    font-weight: 500;
    color: var(--text-primary-alt);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-edit-family-option-members {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.family-edit-family-option-hint {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 500;
}

.family-edit-family-new-option {
    border-top: 1px dashed var(--border-muted);
    margin-top: 0.25rem;
    padding-top: 0.75rem;
}

.family-edit-family-no-items {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.family-edit-new-family-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--success-bg-light) 0%, var(--success-bg) 100%);
    border: 1px solid var(--success-bg-pastel);
    border-radius: 8px;
    color: #047857;
    font-size: 0.8125rem;
}

.family-edit-new-family-indicator .mud-icon-root {
    color: var(--success);
}

.family-edit-existing-family-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
    border: 1px solid var(--info-bg-light);
    border-radius: 8px;
    color: #1e40af;
    font-size: 0.8125rem;
}

.family-edit-existing-family-indicator .mud-icon-root {
    color: var(--info);
}

.family-edit-family-group-form .family-edit-section {
    margin-bottom: 1rem;
}

.family-edit-family-group-form .family-edit-section:last-child {
    margin-bottom: 0;
}

.family-edit-family-group-card .family-edit-household-roles-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--purple-bg-lighter) 0%, var(--purple-bg) 100%);
    border-radius: 10px;
    border: 1px solid var(--purple-bg-light);
}

/* Divider Section */
.family-edit-divider-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.family-edit-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-muted);
}

.family-edit-divider-text {
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Select Groups */
.family-edit-select-group {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.family-edit-select-item {
    padding-left: 0.75rem;
}

/* Inputs */
.family-edit-input,
.family-edit-select {
    background: white;
}

.family-edit-textarea {
    background: white;
}

/* Footer */
.family-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-muted);
    border-top: 1px solid var(--border-default);
}

.family-edit-btn-cancel {
    border-radius: 8px !important;
    padding: 0.5rem 1.25rem !important;
}

.family-edit-btn-submit {
    border-radius: 8px !important;
    padding: 0.5rem 1.5rem !important;
    background: linear-gradient(135deg, var(--indigo), var(--violet)) !important;
    gap: 0.5rem;
}

.family-edit-btn-submit:disabled {
    opacity: 0.6;
}

.family-edit-spinner {
    width: 18px !important;
    height: 18px !important;
    margin-right: 0.25rem;
}

/* Scrollbar */
.family-edit-body::-webkit-scrollbar {
    width: 6px;
}

.family-edit-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.family-edit-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.family-edit-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Family Edit Dialog Responsive */
@media (max-width: 640px) {
    .family-edit-row {
        flex-direction: column;
    }

    .family-edit-header {
        padding: 1rem;
    }

    .family-edit-header-icon {
        width: 40px;
        height: 40px;
    }

    .family-edit-header-title {
        font-size: 1.125rem;
    }

    .family-edit-body {
        padding: 1rem;
    }

    .family-edit-new-contact-header {
        padding: 0.875rem 1rem;
    }

    .family-edit-new-contact-icon {
        width: 36px;
        height: 36px;
    }

    .family-edit-new-contact-form {
        padding: 1rem;
    }

    .family-edit-footer {
        padding: 0.875rem 1rem;
        flex-direction: column-reverse;
    }

    .family-edit-btn-cancel,
    .family-edit-btn-submit {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
   MARRIAGE HISTORY SECTION STYLES
   ============================================= */

/* Section Container */
.medical-history-marriage-section {
    position: relative;
    overflow: hidden;
}

.medical-history-marriage-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Section Icon Wrapper - Rose Theme */
.family-member-section-icon-wrapper.medical-history-marriage-theme {
    background: linear-gradient(135deg, var(--error-rose) 0%, #e11d48 100%);
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.35);
}

/* Section Count Badge */
.medical-history-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, var(--error-rose) 0%, #fb7185 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
    margin-left: 0.75rem;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

/* Add Button Hover */
.medical-history-add-btn-hover:hover {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.1) 0%, rgba(225, 29, 72, 0.1) 100%);
    border-color: var(--error-rose);
    color: #e11d48;
}

/* Timeline Container */
.medical-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
}

/* Timeline Item */
.medical-history-timeline-item {
    display: flex;
    gap: 1.25rem;
    position: relative;
}

.medical-history-timeline-item:last-child .medical-history-timeline-line {
    display: none;
}

/* Timeline Connector */
.medical-history-timeline-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.medical-history-timeline-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
    box-shadow: 0 4px 12px var(--black-alpha-15);
    transition: all 0.3s ease;
}

.medical-history-timeline-dot .mud-icon-root {
    font-size: 1.125rem;
}

.medical-history-timeline-line {
    width: 3px;
    flex: 1;
    min-height: 1.5rem;
    background: linear-gradient(180deg, #fda4af 0%, #fecdd3 100%);
    border-radius: 2px;
}

/* Status Colors for Timeline Dot */
.medical-history-timeline-dot.medical-history-status-married {
    background: linear-gradient(135deg, var(--error-rose) 0%, #e11d48 100%);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}

.medical-history-timeline-dot.medical-history-status-divorced {
    background: linear-gradient(135deg, var(--text-secondary) 0%, var(--text-tertiary) 100%);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

.medical-history-timeline-dot.medical-history-status-widowed {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
    box-shadow: 0 4px 12px var(--indigo-alpha-40);
}

.medical-history-timeline-dot.medical-history-status-annulled {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.medical-history-timeline-dot.medical-history-status-separated {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.medical-history-timeline-dot.medical-history-status-other {
    background: linear-gradient(135deg, var(--gray-400) 0%, var(--gray-500) 100%);
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.4);
}

/* Marriage Card */
.medical-history-marriage-card {
    flex: 1;
    background: white;
    border: 1px solid #fecdd3;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.08);
}

.medical-history-marriage-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 7px;
    right: 7px;
    height: 4px;
    background: linear-gradient(90deg, var(--error-rose) 0%, #fb7185 50%, #fda4af 100%);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.medical-history-marriage-card:hover {
    border-color: #fb7185;
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.15);
    transform: translateY(-2px);
}

.medical-history-marriage-card:hover::before {
    opacity: 1;
}

.medical-history-marriage-card.active {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: var(--error-rose);
}

.medical-history-marriage-card.active::before {
    opacity: 1;
}

/* Marriage Header */
.medical-history-marriage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Partners Display */
.medical-history-partners {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.medical-history-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.medical-history-partner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 700;
    color: white;
    transition: transform 0.3s ease;
}

.medical-history-marriage-card:hover .medical-history-partner-avatar {
    transform: scale(1.05);
}

.medical-history-partner-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    max-width: 90px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hearts Connector */
.medical-history-hearts-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

.medical-history-heart-icon {
    color: var(--error-rose);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.15);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.1);
    }
}

.medical-history-marriage-card:not(.active) .medical-history-heart-icon {
    animation: none;
    color: var(--gray-400);
}

/* Status Badge */
.medical-history-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.medical-history-status-badge.medical-history-status-married {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.12) 0%, rgba(225, 29, 72, 0.12) 100%);
    color: #be123c;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.medical-history-status-badge.medical-history-status-divorced {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(71, 85, 105, 0.12) 100%);
    color: var(--text-tertiary);
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.medical-history-status-badge.medical-history-status-widowed {
    background: linear-gradient(135deg, var(--indigo-alpha-12) 0%, rgba(79, 70, 229, 0.12) 100%);
    color: var(--indigo-darker);
    border: 1px solid var(--indigo-alpha-25);
}

.medical-history-status-badge.medical-history-status-annulled {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(234, 88, 12, 0.12) 100%);
    color: #c2410c;
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.medical-history-status-badge.medical-history-status-separated {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(202, 138, 4, 0.12) 100%);
    color: #a16207;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.medical-history-status-badge.medical-history-status-other {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.12) 0%, rgba(107, 114, 128, 0.12) 100%);
    color: #4b5563;
    border: 1px solid rgba(156, 163, 175, 0.25);
}

/* Marriage Details */
.medical-history-marriage-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.medical-history-date-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.medical-history-date-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fafafa 0%, var(--bg-skeleton-alt) 100%);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.medical-history-date-item:hover {
    background: white;
    border-color: var(--border-muted);
}

.medical-history-date-item .mud-icon-root {
    color: var(--error-rose);
    font-size: 1.25rem;
}

.medical-history-date-item.end .mud-icon-root {
    color: var(--text-secondary);
}

.medical-history-date-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.medical-history-date-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
}

.medical-history-date-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary-alt);
}

.medical-history-date-separator {
    display: flex;
    align-items: center;
    color: var(--border-muted);
}

.medical-history-date-separator .mud-icon-root {
    font-size: 1rem;
}

/* Duration */
.medical-history-duration {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.06) 0%, rgba(251, 113, 133, 0.06) 100%);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #be123c;
    width: fit-content;
}

.medical-history-duration .mud-icon-root {
    font-size: 1rem;
    color: var(--error-rose);
}

/* Marriage Actions */
.medical-history-marriage-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.medical-history-marriage-card:hover .medical-history-marriage-actions {
    opacity: 1;
}

/* Empty State - Rose Theme */
.crm-empty-state-box.rose {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.04) 0%, rgba(251, 113, 133, 0.04) 100%);
    border-color: rgba(244, 63, 94, 0.15);
}

.crm-empty-state-box.rose .crm-empty-icon {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.12) 0%, rgba(251, 113, 133, 0.12) 100%);
}

.crm-empty-state-box.rose .crm-empty-icon::before {
    border-color: rgba(244, 63, 94, 0.25);
}

.crm-empty-state-box.rose .crm-empty-icon .mud-icon-root {
    color: var(--error-rose);
}

.medical-history-rose-btn,
.crm-empty-state-box.rose .crm-empty-action {
    background: linear-gradient(135deg, var(--error-rose) 0%, #e11d48 100%);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.medical-history-rose-btn:hover,
.crm-empty-state-box.rose .crm-empty-action:hover {
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.45);
    transform: translateY(-1px);
}

/* Marriage History Responsive */
@media (max-width: 768px) {
    .medical-history-marriage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .medical-history-partners {
        width: 100%;
        justify-content: center;
    }

    .medical-history-status-badge {
        align-self: center;
    }

    .medical-history-date-range {
        flex-direction: column;
        align-items: stretch;
    }

    .medical-history-date-separator {
        transform: rotate(90deg);
        align-self: center;
    }

    .medical-history-date-item {
        justify-content: flex-start;
    }

    .medical-history-timeline-item {
        gap: 0.75rem;
    }

    .medical-history-timeline-dot {
        width: 32px;
        height: 32px;
    }

    .medical-history-timeline-dot .mud-icon-root {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .medical-history-partner-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.8125rem;
    }

    .medical-history-partner-name {
        font-size: 0.75rem;
        max-width: 70px;
    }

    .medical-history-marriage-card {
        padding: 1rem;
    }

    .medical-history-marriage-actions {
        position: static;
        opacity: 1;
        margin-top: 1rem;
        justify-content: flex-end;
    }
}

/* =====================================================
   ADD PERSON TYPE DIALOG STYLES
   ===================================================== */

/* ===== MODAL CONTENT WRAPPER ===== */
.contact-type-modal {
    background: var(--mud-palette-surface, var(--mud-palette-white));
    border-radius: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* ===== MODAL HEADER ===== */
.contact-type-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default, var(--border-default));
    flex-shrink: 0;
    background: var(--mud-palette-surface, var(--mud-palette-white));
}

.contact-type-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary, var(--text-primary-alt));
}

.contact-type-modal .modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--mud-palette-text-secondary, var(--gray-500));
    border-radius: 8px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-type-modal .modal-close:hover {
    background: var(--mud-palette-action-default-hover, var(--gray-100));
    color: var(--mud-palette-text-primary, var(--text-primary-alt));
}

/* ===== MODAL BODY ===== */
.contact-type-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* ===== FORM GROUP ===== */
.contact-type-modal .form-group {
    margin-bottom: 1.25rem;
}

.contact-type-modal .form-group:last-child {
    margin-bottom: 0;
}

.contact-type-modal .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary, var(--gray-600));
    margin-bottom: 0.5rem;
}

.contact-type-modal .form-group input,
.contact-type-modal .form-group textarea,
.contact-type-modal .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default, var(--border-muted));
    border-radius: 8px;
    background: var(--mud-palette-surface, var(--mud-palette-white));
    color: var(--mud-palette-text-primary, var(--text-primary-alt));
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.contact-type-modal .form-group input:hover,
.contact-type-modal .form-group textarea:hover,
.contact-type-modal .form-group select:hover {
    border-color: var(--blue-accent);
}

.contact-type-modal .form-group input:focus,
.contact-type-modal .form-group textarea:focus,
.contact-type-modal .form-group select:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.contact-type-modal .form-group input::placeholder,
.contact-type-modal .form-group textarea::placeholder {
    color: var(--mud-palette-text-disabled, var(--gray-400));
}

.contact-type-modal .form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.contact-type-modal .form-group small {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary, var(--gray-500));
}

.contact-type-modal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== MODAL FOOTER ===== */
.contact-type-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--mud-palette-lines-default, var(--border-default));
    background: var(--mud-palette-surface, var(--mud-palette-white));
    flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.contact-type-modal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.contact-type-modal .btn-secondary {
    background: var(--mud-palette-surface, var(--mud-palette-white));
    color: var(--mud-palette-text-primary, var(--gray-600));
    border: 1px solid var(--mud-palette-lines-default, var(--border-muted));
}

.contact-type-modal .btn-secondary:hover {
    background: var(--mud-palette-action-default-hover, var(--bg-muted));
    border-color: var(--blue-accent);
    color: var(--blue-accent);
}

.contact-type-modal .btn-primary {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    color: white;
    border: none;
}

.contact-type-modal .btn-primary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.contact-type-modal .btn-primary:active {
    transform: translateY(0);
}

.contact-type-modal .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =====================================================
   CRM DIALOG FORM STYLES (Shared)
   ===================================================== */

/* Form section container */
.dialog-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form row */
.dialog-form-row {
    width: 100%;
}

/* Form input styling */
.dialog-input {
    width: 100%;
}

/* Select option with icon */
.dialog-select-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dialog-select-option .mud-icon-root {
    color: var(--mud-palette-text-secondary, var(--gray-500));
}

/* Color option with dot */
.dialog-color-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dialog-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =====================================================
   VIEW COMPANY STYLES
   ===================================================== */

/* Company Profile Card */
.contact-view-profile-card.company-profile .contact-view-avatar.company-avatar {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
    color: white;
}

.contact-view-company-year {
    display: inline-flex;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-left: 0.75rem;
}

/* Company Connection Avatar */
.contact-view-connection-avatar.company {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
    color: white;
}

/* Core Identity Styles */
.contact-view-company-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-view-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.contact-view-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-view-stat-icon.blue {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
}

.contact-view-stat-icon.green {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%);
}

.contact-view-stat-icon.purple {
    background: linear-gradient(135deg, var(--violet) 0%, var(--violet-darker) 100%);
}

.contact-view-stat-info {
    display: flex;
    flex-direction: column;
}

.contact-view-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-view-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Mask Toggle */
.contact-view-info-value.masked {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-view-toggle-mask {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.contact-view-toggle-mask:hover {
    background: var(--bg-subtle);
    color: var(--info);
}

/* Badge Styles */
.contact-view-badge.structure {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    color: var(--indigo-darker);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* =====================================================
   CORE IDENTITY - PREMIUM CARD STYLES
   ===================================================== */

.contact-view-identity-cards {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-view-identity-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.contact-view-identity-card:hover {
    box-shadow: 0 8px 24px var(--black-alpha-8);
    transform: translateY(-2px);
}

.contact-view-identity-card.primary-card {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    border: none;
}

.contact-view-identity-card.primary-card .contact-view-identity-card-header {
    border-bottom-color: var(--white-alpha-20);
}

.contact-view-identity-card.primary-card .contact-view-identity-card-icon {
    background: var(--white-alpha-20);
    color: white;
}

.contact-view-identity-card.primary-card .contact-view-identity-card-title {
    color: rgba(255, 255, 255, 0.9);
}

.contact-view-identity-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bg-subtle);
}

.contact-view-identity-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-view-identity-card-icon.tax {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
}

.contact-view-identity-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.contact-view-identity-card-body {
    padding: 1.25rem;
}

/* Primary Card Content */
.contact-view-identity-main-value {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-view-identity-business-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.contact-view-identity-dba {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--white-alpha-80);
    padding: 0.375rem 0.75rem;
    background: var(--white-alpha-15);
    border-radius: 20px;
    width: fit-content;
}

/* Tax Card Content */
.contact-view-identity-tax-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-view-identity-tax-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contact-view-identity-tax-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.contact-view-identity-ein {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 0.05em;
}

.contact-view-identity-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.contact-view-identity-toggle-btn:hover {
    background: var(--border-light);
    color: var(--info);
}

.contact-view-identity-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--success-bg) 0%, var(--success-bg-pastel) 100%);
    color: var(--success-dark);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.contact-view-identity-not-provided {
    font-size: 0.9375rem;
    color: var(--text-disabled);
    font-style: italic;
}

/* Info Grid Cards */
.contact-view-identity-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-view-identity-info-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.contact-view-identity-info-card:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--black-alpha-6);
}

.contact-view-identity-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-view-identity-info-icon.structure {
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    color: var(--indigo);
}

.contact-view-identity-info-icon.founded {
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    color: var(--warning-dark);
}

.contact-view-identity-info-icon.employees {
    background: linear-gradient(135deg, var(--info-bg) 0%, var(--info-bg-light) 100%);
    color: var(--info-dark);
}

.contact-view-identity-info-content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.contact-view-identity-info-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-disabled);
}

.contact-view-identity-info-value {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.contact-view-identity-info-value.empty {
    color: var(--text-disabled);
    font-style: italic;
    font-size: 0.875rem;
}

/* Structure Badge */
.contact-view-identity-structure-badge {
    display: inline-flex;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.contact-view-identity-structure-badge.corporation {
    background: linear-gradient(135deg, var(--info-bg) 0%, var(--info-bg-light) 100%);
    color: var(--info-darker);
}

.contact-view-identity-structure-badge.s-corp {
    background: linear-gradient(135deg, var(--indigo-light) 0%, var(--purple-bg-indigo) 100%);
    color: var(--indigo-darker);
}

.contact-view-identity-structure-badge.llc {
    background: linear-gradient(135deg, var(--success-bg) 0%, var(--success-bg-pastel) 100%);
    color: var(--success-dark);
}

.contact-view-identity-structure-badge.partnership {
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    color: #be185d;
}

.contact-view-identity-structure-badge.sole-prop {
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    color: var(--warning-amber);
}

.contact-view-identity-structure-badge.non-profit {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    color: #0f766e;
}

.contact-view-identity-structure-badge.default {
    background: var(--bg-subtle);
    color: var(--text-tertiary);
}

/* Year Founded */
.contact-view-identity-year {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-view-identity-years-ago {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    background: var(--bg-page);
    border-radius: 4px;
}

/* Employee Count */
.contact-view-identity-employee-count {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-view-identity-employee-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-view-identity-size-badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

.contact-view-identity-size-badge.micro {
    background: var(--warning-bg);
    color: var(--warning-amber);
}

.contact-view-identity-size-badge.small {
    background: var(--info-bg);
    color: var(--info-darker);
}

.contact-view-identity-size-badge.medium {
    background: var(--success-bg);
    color: var(--success-dark);
}

.contact-view-identity-size-badge.large {
    background: var(--indigo-light);
    color: var(--indigo-darker);
}

.contact-view-identity-size-badge.enterprise {
    background: linear-gradient(135deg, var(--pink-bg) 0%, var(--pink-bg-light) 100%);
    color: #be185d;
}

/* Stats Bar */
.contact-view-identity-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-subtle) 100%);
    border-radius: 14px;
    border: 1px solid var(--border-light);
}

.contact-view-identity-stat-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.contact-view-identity-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: white;
    color: var(--info);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--black-alpha-6);
}

.contact-view-identity-stat-icon.verified {
    color: var(--success);
}

.contact-view-identity-stat-content {
    display: flex;
    flex-direction: column;
}

.contact-view-identity-stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-view-identity-stat-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.contact-view-identity-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .contact-view-identity-cards {
        grid-template-columns: 1fr;
    }

    .contact-view-identity-info-grid {
        grid-template-columns: 1fr;
    }

    .contact-view-identity-stats-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-view-identity-stat-divider {
        width: 100%;
        height: 1px;
    }
}

/* Location & Contact Styles */
.contact-view-location-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-view-address-card {
    background: var(--bg-page);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
}

.contact-view-address-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.contact-view-address-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-view-address-icon.business {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
}

.contact-view-address-icon.shipping {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
}

.contact-view-address-type {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.contact-view-address-content {
    padding-left: calc(36px + 0.75rem);
}

.contact-view-address-line {
    font-size: 0.9375rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.contact-view-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--info);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-view-map-link:hover {
    color: var(--info-darker);
}

.contact-view-no-data {
    font-size: 0.875rem;
    color: var(--text-disabled);
    font-style: italic;
}

/* Contact Cards */
.contact-view-contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.contact-view-contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.contact-view-contact-card:hover {
    border-color: var(--info);
    box-shadow: 0 4px 12px var(--info-alpha-10);
}

.contact-view-contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-view-contact-icon.phone {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%);
}

.contact-view-contact-icon.email {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
}

.contact-view-contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-view-contact-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contact-view-contact-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-view-contact-value.link {
    color: var(--info);
    text-decoration: none;
}

.contact-view-contact-value.link:hover {
    text-decoration: underline;
}

.contact-view-contact-actions {
    display: flex;
    gap: 0.5rem;
}

.contact-view-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.contact-view-icon-btn:hover {
    background: var(--info);
    color: white;
}

/* Inner Tabs (for Industry/Department) */
.contact-view-inner-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.375rem;
    background: var(--bg-subtle);
    border-radius: 12px;
    width: fit-content;
}

.contact-view-inner-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-inner-tab-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-muted);
}

.contact-view-inner-tab-btn.active {
    background: white;
    color: var(--indigo);
    font-weight: 600;
    box-shadow: 0 1px 3px var(--black-alpha-10);
}

.contact-view-inner-tab-content {
    animation: fadeIn 0.2s ease;
}

.contact-view-inner-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-view-inner-content-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

/* Department Icon Variation */
.contact-view-industry-icon.department {
    background: linear-gradient(135deg, var(--info), var(--info-dark));
}

/* Industry Styles */
.contact-view-industry-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-view-industry-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.contact-view-industry-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-view-industry-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Editable Industry Stat */
.contact-view-industry-stat-editable {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-industry-stat-editable:hover {
    background: var(--bg-subtle);
    border-color: var(--info);
}

.contact-view-industry-stat-editable:hover .contact-view-industry-stat-edit-btn {
    opacity: 1;
}

.contact-view-industry-stat-edit-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: var(--info);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.contact-view-industry-stat-edit-btn .mud-icon-root {
    font-size: 0.875rem;
}

.contact-view-industry-stat-edit-btn:hover {
    background: var(--info-dark);
}

/* SIC/NAICS Code Info Box */
.contact-view-sic-naics-info {
    margin-top: 1rem;
}

.contact-view-code-info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border: 1px solid #bae6fd;
}

.contact-view-code-info-box .mud-icon-root {
    color: #0284c7;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.contact-view-code-info-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-view-code-info-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0369a1;
}

.contact-view-code-info-desc {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.contact-view-industries-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-view-industry-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.contact-view-industry-card:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--black-alpha-6);
}

.contact-view-industry-card.primary {
    border-color: var(--info);
    background: linear-gradient(135deg, var(--info-bg-lighter) 0%, var(--info-bg) 100%);
}

.contact-view-industry-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.contact-view-industry-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-view-industry-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-view-industry-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-view-industry-code {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.contact-view-primary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-light) 100%);
    color: #92400e;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.contact-view-industry-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    padding-left: calc(40px + 1rem);
}

.contact-view-industry-actions {
    display: flex;
    gap: 0.5rem;
    padding-left: calc(40px + 1rem);
}

.contact-view-industry-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-subtle);
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-industry-action-btn:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.contact-view-industry-action-btn.danger:hover {
    background: var(--error-bg);
    color: var(--error-dark);
}

/* Industry Suggestions */
.contact-view-industry-suggestions {
    background: var(--bg-page);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
}

.contact-view-suggestions-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 1rem 0;
}

.contact-view-suggestions-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contact-view-suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px dashed var(--border-dark);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-suggestion-chip:hover {
    border-color: var(--info);
    color: var(--info);
    background: var(--info-bg-lighter);
}

/* Key Contacts Styles */
.contact-view-contacts-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-view-contact-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-view-key-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-view-key-contact-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.contact-view-key-contact-card:hover {
    border-color: var(--border-dark);
    box-shadow: 0 8px 24px var(--black-alpha-8);
}

.contact-view-key-contact-card.primary {
    border-color: var(--info);
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--info-bg-lighter) 100%);
}

.contact-view-key-contact-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
}

.contact-view-key-contact-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    overflow: hidden;
}

.contact-view-key-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-view-primary-contact-badge {
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(32px);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--warning) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.contact-view-key-contact-body {
    text-align: center;
    margin-bottom: 1rem;
}

.contact-view-key-contact-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.contact-view-key-contact-title {
    display: block;
    font-size: 0.875rem;
    color: var(--info);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-view-key-contact-dept {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.contact-view-key-contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-page);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.contact-view-key-contact-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-view-key-contact-detail:hover {
    color: var(--info);
}

.contact-view-key-contact-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.contact-view-key-contact-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.contact-view-key-contact-action:hover {
    border-color: var(--info);
    color: var(--info);
    background: var(--info-bg-lighter);
}

/* Departments Summary */
.contact-view-departments-summary {
    background: var(--bg-page);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
}

.contact-view-departments-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 1rem 0;
}

.contact-view-departments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-view-department-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.contact-view-department-name {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.contact-view-department-count {
    background: var(--info);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
}

/* Social Media Styles */
.contact-view-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-view-social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.contact-view-social-card:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--black-alpha-6);
}

.contact-view-social-card.empty {
    opacity: 0.6;
}

.contact-view-social-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-view-social-card.website .contact-view-social-icon {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
}

.contact-view-social-card.linkedin .contact-view-social-icon {
    background: linear-gradient(135deg, #0077b5 0%, #005582 100%);
}

.contact-view-social-card.facebook .contact-view-social-icon {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.contact-view-social-card.twitter .contact-view-social-icon {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.contact-view-social-card.instagram .contact-view-social-icon {
    background: linear-gradient(135deg, #e4405f 0%, #c13584 50%, #833ab4 100%);
}

.contact-view-social-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.contact-view-social-platform {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contact-view-social-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--info);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-view-social-link:hover {
    text-decoration: underline;
}

.contact-view-social-empty {
    font-size: 0.875rem;
    color: var(--text-disabled);
    font-style: italic;
}

.contact-view-social-actions {
    display: flex;
    gap: 0.5rem;
}

.contact-view-social-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.5rem;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.contact-view-social-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-view-social-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-view-social-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* ========== 3-COLUMN SOCIAL MEDIA GRID ========== */
.contact-view-social-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-view-social-card-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.contact-view-social-card-compact:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--black-alpha-6);
}

.contact-view-social-card-compact.empty {
    opacity: 0.7;
    background: var(--bg-page);
}

.contact-view-social-card-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.contact-view-social-card-compact .contact-view-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-view-social-card-compact.website .contact-view-social-icon {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-darker) 100%);
}

.contact-view-social-card-compact.linkedin .contact-view-social-icon {
    background: linear-gradient(135deg, #0077b5 0%, #005582 100%);
}

.contact-view-social-card-compact.facebook .contact-view-social-icon {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.contact-view-social-card-compact.twitter .contact-view-social-icon {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.contact-view-social-card-compact.instagram .contact-view-social-icon {
    background: linear-gradient(135deg, #e4405f 0%, #c13584 50%, #833ab4 100%);
}

.contact-view-social-card-compact.youtube .contact-view-social-icon {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.contact-view-social-card-compact .contact-view-social-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.contact-view-social-card-compact .contact-view-social-platform {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contact-view-social-card-compact .contact-view-social-link {
    font-size: 0.8125rem;
    color: var(--info);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-view-social-card-compact .contact-view-social-link:hover {
    text-decoration: underline;
}

.contact-view-social-card-compact .contact-view-social-empty {
    font-size: 0.8125rem;
    color: var(--text-disabled);
    font-style: italic;
}

.contact-view-social-card-compact .contact-view-social-actions {
    display: flex;
    gap: 0.375rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bg-subtle);
}

.contact-view-icon-btn-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.contact-view-icon-btn-sm:hover {
    background: var(--info);
    color: white;
}

.contact-view-icon-btn-sm .mud-icon-root {
    font-size: 0.875rem;
}

/* ========== DEPARTMENT ADD BUTTON ========== */
.contact-view-departments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-view-department-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, var(--indigo-lightest) 0%, var(--indigo-light) 100%);
    border: 1px dashed var(--purple-soft);
    border-radius: 8px;
    color: var(--indigo);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-view-department-add-btn:hover {
    background: linear-gradient(135deg, var(--indigo-light) 0%, var(--purple-bg-indigo) 100%);
    border-color: #818cf8;
    color: var(--indigo-dark);
}

.contact-view-department-add-btn .mud-icon-root {
    font-size: 0.875rem;
}

/* Social Media Select Item */
.contact-view-social-select-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-view-social-select-item .mud-icon-root {
    font-size: 1.125rem;
}

/* Secondary Edit Button */
.contact-view-edit-btn.secondary {
    background: var(--bg-subtle);
    color: var(--text-secondary);
}

.contact-view-edit-btn.secondary:hover {
    background: var(--border-light);
    color: var(--text-tertiary);
}

/* Delete Button for Dialog */
.dialog-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--error-bg) 0%, var(--error-pastel) 100%);
    border: none;
    border-radius: 8px;
    color: var(--error-dark);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-btn-danger:hover {
    background: linear-gradient(135deg, var(--error-pastel) 0%, #fca5a5 100%);
    color: #b91c1c;
}

/* Form Styles */
.contact-view-form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.contact-view-form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-view-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
}

.contact-view-form-group.full-width {
    grid-column: 1 / -1;
}

.mud-list-item.mud-list-item-disabled svg {
    color: var(--mud-palette-action-disabled) !important;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .contact-view-social-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .contact-view-company-stats,
    .contact-view-industry-stats {
        grid-template-columns: 1fr;
    }

    .contact-view-location-sections,
    .contact-view-contact-cards {
        grid-template-columns: 1fr;
    }

    .contact-view-key-contacts-grid {
        grid-template-columns: 1fr;
    }

    .contact-view-social-grid {
        grid-template-columns: 1fr;
    }

    .contact-view-social-grid-3col {
        grid-template-columns: 1fr;
    }

    .contact-view-social-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* =============================================
   FOLLOWUP SUMMARIZE PANEL STYLES
   ============================================= */

/* Overlay */
.followup-summarize-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.followup-summarize-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Panel Container */
.followup-summarize-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    background: var(--mud-palette-surface);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 10px 30px var(--black-alpha-15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1201;
    overflow: hidden;
}

.followup-summarize-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Panel Header */
.summarize-panel-header {
    position: relative;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 50%, var(--purple-light) 100%);
    overflow: hidden;
}

.summarize-header-glow {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--white-alpha-20) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.summarize-header-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    z-index: 1;
}

.summarize-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.summarize-icon-pulse {
    position: absolute;
    inset: -4px;
    background: var(--white-alpha-30);
    border-radius: 16px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.summarize-icon {
    width: 52px;
    height: 52px;
    background: var(--white-alpha-20);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.summarize-header-text {
    flex: 1;
    color: white;
}

.summarize-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: var(--white-alpha-20);
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.summarize-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.summarize-subtitle {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.85;
}

.summarize-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--white-alpha-15);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.summarize-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Panel Body */
.summarize-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--mud-palette-background);
}

.summarize-panel-body::-webkit-scrollbar {
    width: 6px;
}

.summarize-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.summarize-panel-body::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
}

/* Loading State */
.summarize-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.summarize-loading-orbs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.loading-orb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--purple-light) 100%);
    animation: orbBounce 1.4s ease-in-out infinite;
}

.loading-orb.orb-1 {
    animation-delay: 0s;
}

.loading-orb.orb-2 {
    animation-delay: 0.2s;
}

.loading-orb.orb-3 {
    animation-delay: 0.4s;
}

@keyframes orbBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-12px);
        opacity: 1;
    }
}

.summarize-loading-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 1rem;
}

.summarize-loading-progress {
    width: 180px;
    height: 4px;
    background: var(--mud-palette-lines-default);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--indigo), var(--purple-light));
    border-radius: 2px;
    animation: progressSlide 1.5s ease-in-out infinite;
}

@keyframes progressSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(600%);
    }
}

/* Summary Content */
.summarize-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Quick Stats Grid */
.summarize-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.summarize-stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.summarize-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--black-alpha-8);
}

.summarize-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summarize-stat-icon.blue {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--indigo-alpha-25) 100%);
    color: var(--indigo);
}

.summarize-stat-icon.purple {
    background: linear-gradient(135deg, var(--violet-alpha-15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: var(--violet);
}

.summarize-stat-icon.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(20, 184, 166, 0.25) 100%);
    color: var(--teal);
}

.summarize-stat-icon.orange {
    background: linear-gradient(135deg, var(--orange-alpha-15) 0%, rgba(249, 115, 22, 0.25) 100%);
    color: var(--orange);
}

.summarize-stat-info {
    display: flex;
    flex-direction: column;
}

.summarize-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.summarize-stat-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

/* Section Styles */
.summarize-section {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.subsection-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.section-header .mud-icon-root {
    color: var(--violet);
}

/* Summary Text Box */
.summary-text-box {
    padding: 1rem;
    background: linear-gradient(135deg, var(--indigo-alpha-4) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-radius: 10px;
    border-left: 3px solid var(--violet);
}

.summary-text-box p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--mud-palette-text-primary);
}

/* Highlights List */
.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.highlight-dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--purple-light) 100%);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.375rem;
}

/* Sentiment Gauge */
.sentiment-gauge {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sentiment-bar {
    height: 10px;
    background: var(--mud-palette-lines-default);
    border-radius: 5px;
    overflow: hidden;
}

.sentiment-fill {
    height: 100%;
    background: linear-gradient(90deg, #f87171 0%, var(--warning-light) 30%, var(--success-pale) 70%, var(--success-light) 100%);
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sentiment-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.sentiment-score {
    font-weight: 700;
    color: var(--success-light);
}

/* Topics Cloud */
.topics-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    display: inline-flex;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
}

.topic-tag:hover {
    transform: translateY(-1px);
}

.topic-tag.blue {
    background: var(--indigo-alpha-12);
    color: var(--indigo);
}

.topic-tag.purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet);
}

.topic-tag.teal {
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal);
}

.topic-tag.orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);
}

.topic-tag.pink {
    background: rgba(236, 72, 153, 0.12);
    color: var(--pink);
}

/* Empty State */
.summarize-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.empty-illustration {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-circle {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--indigo-alpha-10) 0%, rgba(168, 85, 247, 0.15) 100%);
    border-radius: 50%;
    animation: emptyPulse 3s ease-in-out infinite;
}

@keyframes emptyPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.empty-illustration .mud-icon-root {
    position: relative;
    color: var(--violet);
    z-index: 1;
}

.summarize-empty h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.summarize-empty p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    max-width: 280px;
    line-height: 1.5;
}

/* Panel Footer */
.summarize-panel-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.generate-btn {
    padding: 0.625rem 1.5rem !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%) !important;
    box-shadow: 0 4px 15px var(--indigo-alpha-35) !important;
    transition: all 0.2s ease !important;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45) !important;
}

/* Responsive Styles */
@media (max-width: 480px) {
    .followup-summarize-panel {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }

    .summarize-panel-header {
        padding: 1.25rem 1rem;
    }

    .summarize-icon {
        width: 44px;
        height: 44px;
    }

    .summarize-title {
        font-size: 1.125rem;
    }

    .summarize-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 0.75rem;
    }
}

/* Additional Summarize Stats (Notes, Tasks) */
.summarize-stats-secondary {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card-mini {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
}

.stat-mini-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-mini-icon.note {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.stat-mini-icon.task {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-light);
}

.stat-mini-info {
    display: flex;
    flex-direction: column;
}

.stat-mini-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

/* Activity Breakdown */
.activity-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breakdown-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.breakdown-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breakdown-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet);
}

.breakdown-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal);
}

.breakdown-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);
}

.breakdown-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.breakdown-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-light);
}

.breakdown-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.breakdown-bar-container {
    flex: 1;
    height: 8px;
    background: var(--mud-palette-lines-default);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.breakdown-bar.purple {
    background: linear-gradient(90deg, var(--violet), var(--violet-light));
}

.breakdown-bar.teal {
    background: linear-gradient(90deg, var(--teal), #2dd4bf);
}

.breakdown-bar.orange {
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
}

.breakdown-bar.blue {
    background: linear-gradient(90deg, var(--info), var(--info-light));
}

.breakdown-bar.green {
    background: linear-gradient(90deg, var(--success-light), #4ade80);
}

.breakdown-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    min-width: 30px;
    text-align: right;
}

/* Timeline Info Grid */
.timeline-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.timeline-info-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--mud-palette-background);
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
}

.timeline-info-card.span-2 {
    grid-column: 1 / -1;
}

.timeline-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-info-icon.first {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(34, 197, 94, 0.25) 100%);
    color: var(--success-light);
}

.timeline-info-icon.last {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(59, 130, 246, 0.25) 100%);
    color: var(--info);
}

.timeline-info-icon.duration {
    background: linear-gradient(135deg, var(--violet-alpha-15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: var(--violet);
}

.timeline-info-content {
    display: flex;
    flex-direction: column;
}

.timeline-info-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.timeline-info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* Recent Activities List */
.recent-activities-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--mud-palette-background);
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
}

.recent-activity-item:hover {
    border-color: var(--mud-palette-primary);
    background: var(--indigo-alpha-4);
}

.recent-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recent-activity-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet);
}

.recent-activity-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal);
}

.recent-activity-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);
}

.recent-activity-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.recent-activity-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-light);
}

.recent-activity-icon.gray {
    background: rgba(107, 114, 128, 0.12);
    color: var(--gray-500);
}

.recent-activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recent-activity-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-activity-type {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    text-transform: capitalize;
}

.recent-activity-date {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    flex-shrink: 0;
}

/* Empty State Inline */
.summarize-empty-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.summarize-empty-inline .mud-icon-root {
    opacity: 0.5;
}

.summarize-empty-inline span {
    font-size: 0.875rem;
}

/* Footer Info */
.summarize-panel-footer .footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.summarize-panel-footer .footer-info .mud-icon-root {
    font-size: 1rem;
    opacity: 0.7;
}

/* Responsive for new elements */
@media (max-width: 480px) {
    .summarize-stats-secondary {
        flex-direction: column;
    }

    .timeline-info-grid {
        grid-template-columns: 1fr;
    }

    .timeline-info-card.span-2 {
        grid-column: 1;
    }

    .breakdown-info {
        min-width: 80px;
    }
}

/* =============================================
   ACTIVITY SUMMARY DIALOG STYLES
   ============================================= */

.activity-summary-dialog .mud-dialog {
    max-width: 560px;
}

/* Summary Header Theme */
.dialog-header-summary {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 50%, var(--purple-light) 100%);
}

/* Stats Grid */
.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.summary-stat-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.summary-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--black-alpha-8);
}

.summary-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-stat-icon.blue {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--indigo-alpha-25) 100%);
    color: var(--indigo);
}

.summary-stat-icon.purple {
    background: linear-gradient(135deg, var(--violet-alpha-15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: var(--violet);
}

.summary-stat-icon.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(20, 184, 166, 0.25) 100%);
    color: var(--teal);
}

.summary-stat-icon.orange {
    background: linear-gradient(135deg, var(--orange-alpha-15) 0%, rgba(249, 115, 22, 0.25) 100%);
    color: var(--orange);
}

.summary-stat-icon.note {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(59, 130, 246, 0.25) 100%);
    color: var(--info);
}

.summary-stat-icon.green {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(34, 197, 94, 0.25) 100%);
    color: var(--success-light);
}

.summary-stat-info {
    display: flex;
    flex-direction: column;
}

.summary-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.summary-stat-label {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

/* Activity Breakdown */
.summary-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.summary-breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary-breakdown-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 95px;
}

.summary-breakdown-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-breakdown-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet);
}

.summary-breakdown-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal);
}

.summary-breakdown-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);
}

.summary-breakdown-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.summary-breakdown-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-light);
}

.summary-breakdown-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.summary-breakdown-bar-wrapper {
    flex: 1;
    height: 8px;
    background: var(--mud-palette-lines-default);
    border-radius: 4px;
    overflow: hidden;
}

.summary-breakdown-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.summary-breakdown-bar.purple {
    background: linear-gradient(90deg, var(--violet), var(--violet-light));
}

.summary-breakdown-bar.teal {
    background: linear-gradient(90deg, var(--teal), #2dd4bf);
}

.summary-breakdown-bar.orange {
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
}

.summary-breakdown-bar.blue {
    background: linear-gradient(90deg, var(--info), var(--info-light));
}

.summary-breakdown-bar.green {
    background: linear-gradient(90deg, var(--success-light), #4ade80);
}

.summary-breakdown-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    min-width: 28px;
    text-align: right;
}

/* Timeline Grid */
.summary-timeline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.summary-timeline-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--mud-palette-background);
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
}

.summary-timeline-card.full-width {
    grid-column: 1 / -1;
}

.summary-timeline-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-timeline-icon.first {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(34, 197, 94, 0.25) 100%);
    color: var(--success-light);
}

.summary-timeline-icon.last {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(59, 130, 246, 0.25) 100%);
    color: var(--info);
}

.summary-timeline-icon.duration {
    background: linear-gradient(135deg, var(--violet-alpha-15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: var(--violet);
}

.summary-timeline-content {
    display: flex;
    flex-direction: column;
}

.summary-timeline-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.summary-timeline-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* Recent Activities */
.summary-recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-recent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--mud-palette-background);
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
}

.summary-recent-item:hover {
    border-color: var(--mud-palette-primary);
    background: var(--indigo-alpha-4);
}

.summary-recent-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-recent-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet);
}

.summary-recent-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal);
}

.summary-recent-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);
}

.summary-recent-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.summary-recent-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-light);
}

.summary-recent-icon.gray {
    background: rgba(107, 114, 128, 0.12);
    color: var(--gray-500);
}

.summary-recent-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.summary-recent-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-recent-type {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    text-transform: capitalize;
}

.summary-recent-date {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    flex-shrink: 0;
}

/* Empty State */
.summary-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    text-align: center;
}

.summary-empty-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--indigo-alpha-10) 0%, var(--violet-alpha-15) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--violet);
}

.summary-empty-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.25rem;
}

.summary-empty-hint {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Responsive */
@media (max-width: 480px) {
    .summary-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-timeline-grid {
        grid-template-columns: 1fr;
    }

    .summary-timeline-card.full-width {
        grid-column: 1;
    }

    .summary-breakdown-info {
        min-width: 75px;
    }
}

/* =============================================
   MARRIAGE EDIT DIALOG STYLES
   Prefix: marriage-edit- (Marriage Edit Dialog)
   ============================================= */

.marriage-edit-dialog .mud-dialog {
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px var(--black-alpha-20);
}

.marriage-edit-dialog .mud-dialog-title,
.marriage-edit-dialog .mud-dialog-content,
.marriage-edit-dialog .mud-dialog-actions {
    padding: 0;
}

/* Header Styles */
.marriage-edit-header {
    position: relative;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-rose) 50%, #fb7185 100%);
    overflow: hidden;
}

.marriage-edit-header-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.marriage-edit-heart-float {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: medHeartFloat 6s ease-in-out infinite;
}

.marriage-edit-heart-1 {
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.marriage-edit-heart-2 {
    top: 60%;
    right: 25%;
    animation-delay: 2s;
}

.marriage-edit-heart-3 {
    top: 30%;
    right: 40%;
    animation-delay: 4s;
}

@keyframes medHeartFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-10px) scale(1.1);
        opacity: 0.5;
    }
}

.marriage-edit-rings-decoration {
    position: absolute;
    bottom: -20px;
    left: 20px;
    display: flex;
    gap: -10px;
}

.marriage-edit-ring {
    width: 50px;
    height: 50px;
    border: 4px solid var(--white-alpha-20);
    border-radius: 50%;
    animation: medRingShine 3s ease-in-out infinite;
}

.marriage-edit-ring-1 {
    animation-delay: 0s;
}

.marriage-edit-ring-2 {
    margin-left: -20px;
    animation-delay: 1.5s;
}

@keyframes medRingShine {

    0%,
    100% {
        border-color: var(--white-alpha-20);
    }

    50% {
        border-color: rgba(255, 255, 255, 0.4);
    }
}

.marriage-edit-header-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    z-index: 1;
}

.marriage-edit-header-icon {
    position: relative;
    flex-shrink: 0;
}

.marriage-edit-icon-glow {
    position: absolute;
    inset: -6px;
    background: var(--white-alpha-30);
    border-radius: 18px;
    animation: medIconGlow 2s ease-in-out infinite;
}

@keyframes medIconGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.marriage-edit-icon-box {
    width: 56px;
    height: 56px;
    background: var(--white-alpha-20);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.marriage-edit-header-text {
    flex: 1;
    color: white;
}

.marriage-edit-header-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    background: var(--white-alpha-20);
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.marriage-edit-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.marriage-edit-header-subtitle {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
}

/* Body Styles */
.marriage-edit-body {
    padding: 1.5rem;
    background: var(--mud-palette-background);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

.marriage-edit-body::-webkit-scrollbar {
    width: 6px;
}

.marriage-edit-body::-webkit-scrollbar-track {
    background: transparent;
}

.marriage-edit-body::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
}

/* Section Styles */
.marriage-edit-section {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.marriage-edit-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.marriage-edit-section-header .mud-icon-root {
    color: var(--pink);
}

/* Partners Display */
.marriage-edit-partners-section {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(244, 63, 94, 0.08) 100%);
    border-color: rgba(236, 72, 153, 0.2);
}

.marriage-edit-partners-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.marriage-edit-partner-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
}

.marriage-edit-partner-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px var(--black-alpha-15);
}

.marriage-edit-partner-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.marriage-edit-partner-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.marriage-edit-partner-role {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.marriage-edit-partners-connector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.marriage-edit-connector-line {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--pink));
}

.marriage-edit-connector-line:last-child {
    background: linear-gradient(90deg, var(--pink), transparent);
}

.marriage-edit-connector-heart {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-rose) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: medConnectorPulse 2s ease-in-out infinite;
}

@keyframes medConnectorPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Status Selector */
.marriage-edit-status-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.marriage-edit-status-option {
    flex: 1;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    background: var(--mud-palette-background);
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.marriage-edit-status-option:hover {
    border-color: var(--mud-palette-primary);
    transform: translateY(-2px);
}

.marriage-edit-status-option.marriage-edit-status-active {
    border-color: var(--pink);
    background: rgba(236, 72, 153, 0.08);
}

.marriage-edit-status-option span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.marriage-edit-status-option.marriage-edit-status-active span {
    color: var(--pink);
}

.marriage-edit-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.marriage-edit-status-icon.current {
    background: var(--pink-alpha-15);
    color: var(--pink);
}

.marriage-edit-status-icon.divorced {
    background: var(--error-alpha-15);
    color: var(--error);
}

.marriage-edit-status-icon.separated {
    background: var(--orange-alpha-15);
    color: var(--orange);
}

.marriage-edit-status-icon.widowed {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-500);
}

.marriage-edit-status-icon.annulled {
    background: var(--violet-alpha-15);
    color: var(--violet);
}

/* Dates Grid */
.marriage-edit-dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.marriage-edit-date-card {
    display: flex;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--mud-palette-background);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
}

.marriage-edit-date-card-end {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.03);
}

.marriage-edit-date-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.marriage-edit-date-icon.wedding {
    background: linear-gradient(135deg, var(--pink-alpha-15) 0%, rgba(244, 63, 94, 0.2) 100%);
    color: var(--pink);
}

.marriage-edit-date-icon.end {
    background: var(--error-alpha-15);
    color: var(--error);
}

.marriage-edit-date-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.marriage-edit-date-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.marriage-edit-date-picker .mud-input-control {
    margin: 0;
}

.marriage-edit-date-picker .mud-input-outlined-border {
    border-color: var(--mud-palette-lines-default);
}

/* Anniversary Display */
.marriage-edit-anniversary-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(251, 113, 133, 0.12) 100%);
    border-radius: 10px;
    border: 1px dashed rgba(236, 72, 153, 0.3);
}

.marriage-edit-anniversary-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-rose) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.marriage-edit-anniversary-info {
    display: flex;
    flex-direction: column;
}

.marriage-edit-anniversary-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.marriage-edit-anniversary-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pink);
}

/* Expandable Sections */
.marriage-edit-expandable-section {
    padding: 0;
    overflow: hidden;
}

.marriage-edit-expandable-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.marriage-edit-expandable-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.marriage-edit-section-header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.marriage-edit-section-header-content .mud-icon-root {
    color: var(--pink);
}

.marriage-edit-optional-chip {
    font-size: 0.625rem !important;
    height: 20px !important;
    background: var(--mud-palette-background-gray) !important;
}

.marriage-edit-expand-icon {
    color: var(--mud-palette-text-secondary);
    transition: transform 0.2s ease;
}

.marriage-edit-expandable-content {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: medExpandIn 0.25s ease-out;
}

@keyframes medExpandIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.marriage-edit-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.marriage-edit-form-field {
    display: flex;
    flex-direction: column;
}

.marriage-edit-form-field.marriage-edit-full-width {
    grid-column: 1 / -1;
}

.marriage-edit-input .mud-input-control {
    margin: 0;
}

.marriage-edit-input .mud-input-outlined-border {
    border-color: var(--mud-palette-lines-default);
    border-radius: 10px;
}

.marriage-edit-input:hover .mud-input-outlined-border {
    border-color: var(--mud-palette-primary);
}

.marriage-edit-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.marriage-edit-checkbox-label .mud-icon-root {
    color: var(--mud-palette-text-secondary);
}

/* Textarea */
.marriage-edit-textarea .mud-input-control {
    margin: 0;
}

.marriage-edit-textarea .mud-input-outlined-border {
    border-radius: 10px;
}

.marriage-edit-textarea textarea {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Footer */
.marriage-edit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    gap: 1rem;
}

.marriage-edit-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.marriage-edit-footer-hint .mud-icon-root {
    font-size: 1rem;
}

.marriage-edit-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.marriage-edit-btn-cancel {
    border-radius: 10px !important;
}

.marriage-edit-btn-submit {
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-rose) 100%) !important;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.marriage-edit-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45) !important;
}

.marriage-edit-spinner {
    width: 18px !important;
    height: 18px !important;
    margin-right: 0.5rem;
}

/* Responsive */
/* ========== CREATE MODE - PARTNER SEARCH ========== */
.marriage-edit-partners-create {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.marriage-edit-partner-fixed {
    display: flex;
    justify-content: center;
}

.marriage-edit-partner-card-fixed {
    position: relative;
    border: 2px solid var(--pink);
}

.marriage-edit-partner-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink) 0%, var(--error-rose) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.marriage-edit-partner-badge .mud-icon-root {
    font-size: 14px !important;
}

.marriage-edit-partners-connector-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.25rem 0;
}

.marriage-edit-connector-line-v {
    width: 2px;
    height: 16px;
    background: linear-gradient(to bottom, var(--pink), var(--violet));
}

.marriage-edit-partner-search-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.marriage-edit-search-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    padding-left: 0.25rem;
}

.marriage-edit-search-label .mud-icon-root {
    color: var(--violet);
}

.marriage-edit-partner-search {
    width: 100%;
}

.marriage-edit-partner-search .mud-input-slot {
    background: var(--mud-palette-surface) !important;
}

/* Partner Autocomplete Options */
.marriage-edit-partner-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.marriage-edit-partner-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet) 0%, var(--indigo) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.marriage-edit-partner-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.marriage-edit-partner-option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marriage-edit-partner-option-email {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Results */
.marriage-edit-no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--mud-palette-text-disabled);
    font-size: 0.8125rem;
}

/* Selected Partner Display */
.marriage-edit-selected-partner {
    margin-top: 0.5rem;
}

.marriage-edit-partner-card-selected {
    position: relative;
    border: 2px solid var(--violet);
    animation: marriage-edit-partner-selected 0.3s ease;
}

@keyframes marriage-edit-partner-selected {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.marriage-edit-partner-card-selected .marriage-edit-partner-email {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.125rem;
}

.marriage-edit-remove-partner {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    transition: all 0.2s ease;
}

.marriage-edit-remove-partner:hover {
    background: var(--error-dark);
    transform: scale(1.1);
}

.marriage-edit-remove-partner .mud-icon-root {
    font-size: 14px !important;
}

@media (max-width: 600px) {
    .marriage-edit-partners-display {
        flex-direction: column;
    }

    .marriage-edit-partners-connector {
        transform: rotate(90deg);
    }

    .marriage-edit-partner-card {
        width: 100%;
    }

    .marriage-edit-status-selector {
        flex-wrap: wrap;
    }

    .marriage-edit-status-option {
        min-width: calc(33.33% - 0.5rem);
    }

    .marriage-edit-form-row {
        grid-template-columns: 1fr;
    }

    .marriage-edit-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .marriage-edit-footer-hint {
        justify-content: center;
        text-align: center;
    }

    .marriage-edit-footer-actions {
        justify-content: flex-end;
    }
}

/* =============================================
   DYNAMIC LOADER COMPONENT
   Prefix: dialog-loader-
   Simple HTML Spinner Loading
   ============================================= */

/* Loader Container */
.dialog-loader-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dialog-loader-loader.visible {
    opacity: 1;
}

/* Size Variants */
.dialog-loader-loader.dialog-loader-sm .dialog-loader-spinner {
    width: 32px;
    height: 32px;
}

.dialog-loader-loader.dialog-loader-md .dialog-loader-spinner {
    width: 48px;
    height: 48px;
}

.dialog-loader-loader.dialog-loader-lg .dialog-loader-spinner {
    width: 72px;
    height: 72px;
}

.dialog-loader-loader.dialog-loader-sm .dialog-loader-spinner-ring {
    border-width: 2px;
}

.dialog-loader-loader.dialog-loader-md .dialog-loader-spinner-ring {
    border-width: 3px;
}

.dialog-loader-loader.dialog-loader-lg .dialog-loader-spinner-ring {
    border-width: 4px;
}

/* Spinner */
.dialog-loader-spinner {
    position: relative;
    width: 48px;
    height: 48px;
}

.dialog-loader-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: dialog-loader-spin 1.5s linear infinite;
}

.dialog-loader-spinner-ring:nth-child(1) {
    border-top-color: var(--indigo);
    animation-duration: 1.5s;
}

.dialog-loader-spinner-ring:nth-child(2) {
    border-right-color: var(--violet);
    animation-duration: 2s;
    animation-direction: reverse;
}

.dialog-loader-spinner-ring:nth-child(3) {
    border-bottom-color: var(--pink);
    animation-duration: 2.5s;
}

@keyframes dialog-loader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Message */
.dialog-loader-message {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    text-align: center;
    animation: dialog-loader-fade 0.5s ease 0.2s forwards;
    opacity: 0;
}

@keyframes dialog-loader-fade {
    to {
        opacity: 1;
    }
}

/* ============================================
   COMPANY DIALOGS & COMPONENTS STYLES
   Unique prefix: crm-co-
   ============================================ */

/* Dialog Section Styles */
.crm-co-dlg-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--indigo-alpha-10);
}

.crm-co-dlg-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.crm-co-dlg-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-primary);
}

.crm-co-dlg-section-header .mud-icon-root {
    font-size: 1rem;
    opacity: 0.8;
}

/* Copy Button in Dialog */
.crm-co-dlg-copy-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--indigo-alpha-10);
    border: 1px solid var(--indigo-alpha-20);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--mud-palette-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-co-dlg-copy-btn:hover {
    background: var(--indigo-alpha-20);
    border-color: var(--indigo-alpha-30);
}

.crm-co-dlg-copy-btn .mud-icon-root {
    font-size: 0.875rem;
}

/* Checkbox Row in Dialog */
.crm-co-dlg-checkbox-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-co-dlg-checkbox {
    margin: 0;
}

.crm-co-dlg-checkbox-hint {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    padding-left: 2rem;
    margin-top: -0.25rem;
}

/* Empty Address State */
.crm-co-empty-address {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--indigo-alpha-3) 0%, var(--violet-alpha-3) 100%);
    border-radius: 12px;
    border: 1px dashed var(--indigo-alpha-20);
}

.crm-co-empty-address-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--indigo-alpha-10);
    border-radius: 50%;
    margin-bottom: 0.75rem;
    color: var(--mud-palette-primary);
}

.crm-co-empty-address-icon .mud-icon-root {
    font-size: 1.5rem;
    opacity: 0.7;
}

.crm-co-empty-address-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.25rem;
}

.crm-co-empty-address-hint {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Other Industry Chip */
.crm-co-other-chip {
    background: linear-gradient(135deg, var(--violet-alpha-10) 0%, var(--indigo-alpha-10) 100%) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: var(--violet) !important;
}

.crm-co-other-chip:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, var(--indigo-alpha-20) 100%) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
}

/* Title Actions Container */
.crm-co-title-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* View Toggle Buttons */
.crm-co-view-toggle {
    display: flex;
    align-items: center;
    background: var(--indigo-alpha-5);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--indigo-alpha-10);
}

.crm-co-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-co-toggle-btn:hover {
    background: var(--indigo-alpha-10);
    color: var(--mud-palette-primary);
}

.crm-co-toggle-btn.active {
    background: var(--mud-palette-primary);
    color: white;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.crm-co-toggle-btn .mud-icon-root {
    font-size: 1.125rem;
}

/* Contacts Table Styles */
.crm-co-table-container {
    overflow-x: auto;
    margin: 1rem 0rem;
    border-radius: 12px;
    border: 1px solid var(--indigo-alpha-10);
    background: var(--mud-palette-surface);
}

.crm-co-contacts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.crm-co-contacts-table thead {
    background: linear-gradient(135deg, var(--indigo-alpha-5) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.crm-co-contacts-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--indigo-alpha-10);
}

.crm-co-contacts-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--indigo-alpha-5);
    color: var(--mud-palette-text-primary);
}

.crm-co-contacts-table tbody tr {
    transition: background 0.2s ease;
}

.crm-co-contacts-table tbody tr:hover {
    background: var(--indigo-alpha-3);
}

.crm-co-contacts-table tbody tr:last-child td {
    border-bottom: none;
}

.crm-co-primary-row {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}

.crm-co-primary-row:hover {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, var(--indigo-alpha-3) 100%) !important;
}

/* Table Name Cell */
.crm-co-table-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crm-co-table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.crm-co-table-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crm-co-table-avatar span {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.crm-co-table-name {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

/* Table Link */
.crm-co-table-link {
    color: var(--mud-palette-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.crm-co-table-link:hover {
    color: var(--indigo-dark);
    text-decoration: underline;
}

/* Table Badge */
.crm-co-table-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.crm-co-table-badge.primary {
    background: linear-gradient(135deg, var(--warning-alpha-15) 0%, rgba(251, 191, 36, 0.15) 100%);
    color: var(--warning-dark);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.crm-co-table-badge.primary .mud-icon-root {
    font-size: 0.75rem;
}

.crm-co-table-badge.standard {
    background: var(--indigo-alpha-10);
    color: var(--mud-palette-primary);
    border: 1px solid var(--indigo-alpha-20);
}

/* Table Actions */
.crm-co-table-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.crm-co-table-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-co-table-action-btn:hover {
    background: var(--indigo-alpha-10);
    color: var(--mud-palette-primary);
}

.crm-co-table-action-btn.danger:hover {
    background: var(--error-alpha-10);
    color: var(--error);
}

.crm-co-table-action-btn .mud-icon-root {
    font-size: 1.125rem;
}

/* Responsive Table */
@media (max-width: 768px) {

    .crm-co-contacts-table th,
    .crm-co-contacts-table td {
        padding: 0.625rem 0.75rem;
    }

    .crm-co-contacts-table th:nth-child(4),
    .crm-co-contacts-table td:nth-child(4),
    .crm-co-contacts-table th:nth-child(5),
    .crm-co-contacts-table td:nth-child(5) {
        display: none;
    }

    .crm-co-view-toggle {
        display: none;
    }

    .crm-co-title-actions {
        flex-wrap: wrap;
    }
}

/* ============================================
   VIEW FAMILY STYLES
   Unique prefix: view-family-
   ============================================ */

/* Loading Skeleton */
.view-family-loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.view-family-skeleton-header {
    height: 60px;
    background: linear-gradient(90deg, var(--indigo-alpha-10) 25%, var(--violet-alpha-15) 50%, var(--indigo-alpha-10) 75%);
    background-size: 200% 100%;
    animation: view-family-shimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
}

.view-family-skeleton-tabs {
    display: flex;
    gap: 0.5rem;
}

.view-family-skeleton-tab {
    height: 40px;
    width: 120px;
    background: var(--indigo-alpha-10);
    border-radius: 8px;
    animation: view-family-shimmer 1.5s ease-in-out infinite;
}

.view-family-skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.view-family-skeleton-card {
    height: 200px;
    background: var(--indigo-alpha-10);
    border-radius: 16px;
    animation: view-family-shimmer 1.5s ease-in-out infinite;
}

@keyframes view-family-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Profile Card Overrides */
.view-family-profile-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.view-family-avatar {
    background: linear-gradient(135deg, var(--pink) 0%, var(--violet) 100%) !important;
}

.view-family-badge {
    background: linear-gradient(135deg, var(--pink) 0%, var(--violet) 100%) !important;
    color: white !important;
}

/* Family Tab Styles */
.view-family-family-tab {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.view-family-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--indigo-alpha-10);
}

.view-family-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Family Members Grid */
.view-family-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.view-family-member-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--indigo-alpha-10);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.view-family-member-card:hover {
    border-color: var(--indigo-alpha-30);
    box-shadow: 0 4px 16px var(--indigo-alpha-10);
}

.view-family-spouse-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.03) 0%, var(--violet-alpha-3) 100%);
    border-color: rgba(236, 72, 153, 0.2);
}

.view-family-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.view-family-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-family-member-avatar span {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.view-family-member-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.view-family-member-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-family-member-role {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.view-family-member-role .mud-icon-root {
    font-size: 0.875rem;
    color: var(--mud-palette-primary);
}

.view-family-member-marriage-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, var(--pink-alpha-10) 0%, var(--violet-alpha-10) 100%);
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pink);
}

.view-family-member-marriage-badge .mud-icon-root {
    font-size: 0.75rem;
}

.view-family-member-actions {
    display: flex;
    gap: 0.25rem;
}

.view-family-member-action,
.view-family-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-family-member-action:hover,
.view-family-action-btn:hover {
    background: var(--indigo-alpha-10);
    color: var(--mud-palette-primary);
}

.view-family-member-action.danger:hover {
    background: var(--error-alpha-10);
    color: var(--error);
}

/* Marriages List */
.view-family-marriages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.view-family-marriage-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--indigo-alpha-10);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.view-family-marriage-card:hover {
    border-color: var(--indigo-alpha-30);
    box-shadow: 0 4px 16px var(--indigo-alpha-10);
}

.view-family-current-marriage {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.03) 0%, var(--violet-alpha-3) 100%);
    border-color: rgba(236, 72, 153, 0.2);
}

.view-family-marriage-partners {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.view-family-marriage-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.view-family-partner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-family-partner-avatar span {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.view-family-partner-name {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-family-marriage-connector {
    color: var(--pink);
}

.view-family-marriage-connector .mud-icon-root {
    font-size: 1rem;
}

.view-family-marriage-details {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.view-family-marriage-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.view-family-marriage-status.current {
    background: linear-gradient(135deg, var(--pink-alpha-10) 0%, var(--violet-alpha-10) 100%);
    color: var(--pink);
}

.view-family-marriage-status.divorced {
    background: var(--error-alpha-10);
    color: var(--error);
}

.view-family-marriage-status.separated {
    background: var(--warning-alpha-10);
    color: var(--warning);
}

.view-family-marriage-status.widowed {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-500);
}

.view-family-marriage-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.view-family-marriage-date.end {
    color: var(--error);
}

.view-family-marriage-date .mud-icon-root {
    font-size: 1rem;
}

.view-family-marriage-actions {
    flex-shrink: 0;
}

/* Hobbies Grid */
.view-family-hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.view-family-hobby-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--indigo-alpha-10);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.view-family-hobby-card:hover {
    border-color: var(--indigo-alpha-30);
    box-shadow: 0 4px 16px var(--indigo-alpha-10);
}

.view-family-hobby-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.view-family-hobby-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.view-family-hobby-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.view-family-hobby-category {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.view-family-hobby-skill {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.view-family-hobby-skill.beginner {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-light);
}

.view-family-hobby-skill.intermediate {
    background: var(--info-alpha-10);
    color: var(--info);
}

.view-family-hobby-skill.advanced {
    background: var(--violet-alpha-10);
    color: var(--violet);
}

.view-family-hobby-skill.expert {
    background: var(--pink-alpha-10);
    color: var(--pink);
}

.view-family-hobby-actions {
    flex-shrink: 0;
}

/* Pets Grid */
.view-family-pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.view-family-pet-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--indigo-alpha-10);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.view-family-pet-card:hover {
    border-color: var(--indigo-alpha-30);
    box-shadow: 0 4px 16px var(--indigo-alpha-10);
}

.view-family-pet-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.view-family-pet-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.view-family-pet-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.view-family-pet-type {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.view-family-pet-breed {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    opacity: 0.8;
}

.view-family-pet-therapy-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, var(--success-alpha-10) 100%);
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--success-light);
}

.view-family-pet-therapy-badge .mud-icon-root {
    font-size: 0.75rem;
}

.view-family-pet-actions {
    flex-shrink: 0;
}

/* Social Media Grid */
.view-family-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.view-family-social-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--indigo-alpha-10);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.view-family-social-card:hover {
    border-color: var(--indigo-alpha-30);
    box-shadow: 0 4px 16px var(--indigo-alpha-10);
}

.view-family-social-card.empty {
    opacity: 0.6;
}

.view-family-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.view-family-social-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.view-family-social-platform {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.view-family-social-link {
    font-size: 0.75rem;
    color: var(--mud-palette-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-family-social-link:hover {
    text-decoration: underline;
}

.view-family-social-empty {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    font-style: italic;
}

.view-family-social-visit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--mud-palette-text-secondary);
    transition: all 0.2s ease;
}

.view-family-social-visit:hover {
    background: var(--indigo-alpha-10);
    color: var(--mud-palette-primary);
}

/* Dialog Styles */
.view-family-dlg-selected-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--indigo-alpha-5) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid var(--indigo-alpha-10);
    border-radius: 12px;
}

.view-family-dlg-person-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.view-family-dlg-person-avatar span {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.view-family-dlg-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.view-family-dlg-person-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.view-family-dlg-person-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.view-family-dlg-person-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.view-family-dlg-person-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.view-family-dlg-person-option-avatar.spouse {
    background: linear-gradient(135deg, var(--pink) 0%, var(--violet) 100%);
}

.view-family-dlg-person-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.view-family-dlg-person-option-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.view-family-dlg-person-option-email {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.view-family-dlg-no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

/* Family Group Selection Toggle */
.view-family-dlg-family-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: var(--indigo-alpha-5);
    border-radius: 10px;
    border: 1px solid var(--indigo-alpha-10);
}

.view-family-dlg-toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-family-dlg-toggle-option:hover {
    color: var(--mud-palette-primary);
    background: var(--indigo-alpha-5);
}

.view-family-dlg-toggle-option.selected {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    color: white;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.view-family-dlg-toggle-option.selected:hover {
    background: linear-gradient(135deg, #5557e9 0%, #7c4def 100%);
}

/* Family Group Autocomplete Option */
.view-family-dlg-family-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.view-family-dlg-family-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--success) 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.view-family-dlg-family-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.view-family-dlg-family-option-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.view-family-dlg-family-option-count {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.view-family-dlg-marriage-section {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.03) 0%, var(--violet-alpha-3) 100%);
    border: 1px solid var(--pink-alpha-10);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.view-family-dlg-status-selector {
    margin: 1rem 0;
}

.view-family-dlg-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.view-family-dlg-status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.view-family-dlg-status-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    background: var(--indigo-alpha-5);
    border: 1px solid var(--indigo-alpha-10);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-family-dlg-status-option:hover {
    border-color: var(--indigo-alpha-30);
    background: var(--indigo-alpha-10);
}

.view-family-dlg-status-option.selected {
    background: linear-gradient(135deg, var(--pink-alpha-10) 0%, var(--violet-alpha-10) 100%);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--pink);
}

.view-family-dlg-status-option .mud-icon-root {
    font-size: 1rem;
}

/* Empty State Colors */
.crm-empty-state-box.pink {
    border-color: rgba(236, 72, 153, 0.2);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.03) 0%, var(--violet-alpha-3) 100%);
}

.crm-empty-state-box.pink .crm-empty-icon {
    background: var(--pink-alpha-10);
}

.crm-empty-state-box.pink .crm-empty-icon .mud-icon-root {
    color: var(--pink);
}

.crm-empty-state-box.red {
    border-color: rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03) 0%, rgba(236, 72, 153, 0.03) 100%);
}

.crm-empty-state-box.red .crm-empty-icon {
    background: var(--error-alpha-10);
}

.crm-empty-state-box.red .crm-empty-icon .mud-icon-root {
    color: var(--error);
}

.crm-empty-state-box.cyan {
    border-color: rgba(6, 182, 212, 0.2);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.03) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.crm-empty-state-box.cyan .crm-empty-icon {
    background: rgba(6, 182, 212, 0.1);
}

.crm-empty-state-box.cyan .crm-empty-icon .mud-icon-root {
    color: #06b6d4;
}

/* Responsive */
@media (max-width: 768px) {

    .view-family-members-grid,
    .view-family-hobbies-grid,
    .view-family-pets-grid,
    .view-family-social-grid {
        grid-template-columns: 1fr;
    }

    .view-family-marriage-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-family-dlg-status-options {
        flex-direction: column;
    }
}

/* ============================================
   KEY CONTACTS DIALOG - Person Autocomplete
   ============================================ */

.crm-co-dlg-person-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.crm-co-dlg-person-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.crm-co-dlg-person-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.crm-co-dlg-person-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-co-dlg-person-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-co-dlg-no-results {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--text-disabled);
    font-size: 0.875rem;
}

.crm-co-dlg-no-results .mud-icon-root {
    color: var(--border-dark);
}

/* INDUSTRY DIALOG - Autocomplete Options */
.crm-co-dlg-industry-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.crm-co-dlg-industry-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.crm-co-dlg-industry-icon.other {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
}

.crm-co-dlg-industry-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.crm-co-dlg-industry-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-co-dlg-industry-name.other {
    color: var(--indigo);
    font-weight: 600;
}

.crm-co-dlg-industry-code {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.crm-co-dlg-industry-desc {
    font-size: 0.6875rem;
    color: var(--text-disabled);
    font-style: italic;
}

/* INDUSTRY DIALOG - Other Section */
.crm-co-dlg-other-section {
    margin-top: 0.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--indigo-alpha-5) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px dashed var(--indigo-alpha-30);
    border-radius: 0.75rem;
}

.crm-co-dlg-other-section .crm-co-dlg-section-header {
    color: var(--indigo);
}

/* KEY CONTACTS DIALOG - Custom Department Input */
.crm-co-dlg-other-input {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--indigo-alpha-5) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px dashed var(--indigo-alpha-30);
    border-radius: 0.75rem;
}

.crm-co-dlg-other-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--indigo);
}

.crm-co-dlg-other-header .mud-icon-root {
    font-size: 1rem;
}

/* ============================================
   SETTINGS TABS - Department & Industry
   Unique prefix: crm-settings-
   ============================================ */

/* Settings Header */
.crm-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.crm-settings-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.crm-settings-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.crm-settings-stat .mud-icon-root {
    font-size: 1.125rem;
    color: var(--indigo);
}

.crm-settings-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--indigo-alpha-25);
}

.crm-settings-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-35);
}

.crm-settings-add-btn .mud-icon-root {
    font-size: 1.125rem;
}

/* Settings Table Name Cell */
.crm-settings-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crm-settings-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-settings-icon-box.department {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--violet-alpha-15) 100%);
    color: var(--indigo);
}

.crm-settings-icon-box.industry {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success);
}

.crm-settings-icon-box.campaign {
    background: linear-gradient(135deg, var(--orange-alpha-15) 0%, rgba(234, 88, 12, 0.15) 100%);
    color: var(--orange);
}

/* Lead Campaign Table Styles */
.crm-campaign-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.crm-campaign-source .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-disabled);
}

.crm-campaign-cost {
    font-weight: 500;
    color: var(--success);
    font-size: 0.875rem;
}

.crm-settings-date {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

/* Lead Referral Section Styles */
.crm-lead-referral-section {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, var(--indigo-alpha-4) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid var(--indigo-alpha-15);
    border-radius: 12px;
}

.crm-lead-referral-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--indigo-alpha-10);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--indigo);
}

.crm-lead-referral-header .mud-icon-root {
    font-size: 1rem;
}

.crm-lead-referral-preview {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(5, 150, 105, 0.06) 100%);
    border: 1px solid var(--success-alpha-20);
    border-radius: 10px;
}

.crm-lead-referral-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--success-alpha-15);
    border-radius: 8px;
    flex-shrink: 0;
}

.crm-lead-referral-preview-icon .mud-icon-root {
    font-size: 1rem;
    color: var(--success);
}

.crm-lead-referral-preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.crm-lead-referral-preview-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-lead-referral-preview-text {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    font-style: italic;
    line-height: 1.4;
}

.crm-settings-icon-box .mud-icon-root {
    font-size: 1.125rem;
}

.crm-settings-name {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.crm-settings-description {
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-settings-count {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

/* Settings Status Badge */
.crm-settings-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-settings-badge.active {
    background: var(--success-alpha-10);
    color: var(--success);
}

.crm-settings-badge.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-500);
}

/* Responsive Settings */
@media (max-width: 768px) {
    .crm-settings-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .crm-settings-description {
        max-width: 150px;
    }
}

/* ============================================
   DEPARTMENT AUTOCOMPLETE - Professional Dialog
   Unique prefix: crm-professional-department-
   ============================================ */

/* Department Option in Autocomplete */
.crm-professional-department-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.crm-professional-department-option .mud-icon-root {
    font-size: 1.125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-professional-department-option span {
    color: var(--mud-palette-text-primary);
}

/* Other Option Styling */
.crm-professional-department-other-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px dashed var(--indigo-alpha-20);
    margin-top: 0.25rem;
}

.crm-professional-department-other-option .mud-icon-root {
    font-size: 1.125rem;
}

/* New Department Form */
.crm-professional-new-department-form {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--indigo-alpha-5) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px dashed var(--indigo-alpha-30);
    border-radius: 0.75rem;
    animation: fadeInSlide 0.2s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-professional-new-department-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--indigo);
}

.crm-professional-new-department-header .mud-icon-root {
    font-size: 1rem;
}

.crm-professional-new-department-inputs {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.crm-professional-new-department-inputs .dialog-form-input {
    flex: 1;
    min-width: 200px;
}

.crm-professional-save-department-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    height: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .crm-professional-new-department-inputs {
        flex-direction: column;
    }

    .crm-professional-new-department-inputs .dialog-form-input {
        width: 100%;
    }
}

/* =============================================
   LEADS PIPELINE & VIEW LEAD STYLES
   Prefix: lead-, leads-
   ============================================= */

/* ========== LEADS PIPELINE SUMMARY ========== */
.leads-pipeline-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.leads-summary-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--black-alpha-6);
    transition: all 0.2s ease;
}

.leads-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--black-alpha-8);
}

.leads-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.leads-summary-card.new-lead .leads-summary-icon {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--violet-alpha-15) 100%);
    color: var(--indigo);
}

.leads-summary-card.qualified .leads-summary-icon {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success);
}

.leads-summary-card.proposal .leads-summary-icon {
    background: linear-gradient(135deg, var(--warning-alpha-15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--warning);
}

.leads-summary-card.negotiation .leads-summary-icon {
    background: linear-gradient(135deg, var(--pink-alpha-15) 0%, rgba(219, 39, 119, 0.15) 100%);
    color: var(--pink);
}

.leads-summary-card.total-value .leads-summary-icon {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: var(--success-light);
}

.leads-summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.leads-summary-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.leads-summary-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* ========== LEADS LIST CONTAINER ========== */
.leads-data-container {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    border: 1px solid var(--black-alpha-6);
    overflow: hidden;
}

.leads-data-container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--black-alpha-6);
    background: linear-gradient(180deg, var(--indigo-alpha-3) 0%, transparent 100%);
}

/* ========== LEADS GRID VIEW ========== */
.leads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.lead-card {
    background: var(--mud-palette-surface);
    border-radius: 14px;
    border: 1px solid var(--black-alpha-8);
    padding: 1.25rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--black-alpha-10);
    border-color: var(--indigo-alpha-30);
}

.lead-card-checkbox {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lead-card:hover .lead-card-checkbox,
.lead-card-checkbox.checked {
    opacity: 1;
}

.lead-card-favorite {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--warning);
}

.lead-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lead-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.lead-avatar-pink {
    background: linear-gradient(135deg, var(--pink), var(--error-pink-dark));
}

.lead-avatar-blue {
    background: linear-gradient(135deg, var(--info), var(--info-dark));
}

.lead-avatar-green {
    background: linear-gradient(135deg, var(--success-light), var(--success-medium));
}

.lead-avatar-purple {
    background: linear-gradient(135deg, var(--violet), var(--violet-dark));
}

.lead-avatar-orange {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
}

.lead-avatar-teal {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

.lead-card-info {
    flex: 1;
    min-width: 0;
}

.lead-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.lead-card-company {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.lead-card-stage {
    margin-bottom: 1rem;
}

.lead-stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.lead-stage-badge.small {
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
}

.lead-stage-badge.stage-new {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--violet-alpha-15) 100%);
    color: var(--indigo);
}

.lead-stage-badge.stage-contacted {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: var(--info);
}

.lead-stage-badge.stage-qualified {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success);
}

.lead-stage-badge.stage-proposal {
    background: linear-gradient(135deg, var(--warning-alpha-15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--warning);
}

.lead-stage-badge.stage-negotiation {
    background: linear-gradient(135deg, var(--pink-alpha-15) 0%, rgba(219, 39, 119, 0.15) 100%);
    color: var(--pink);
}

.lead-stage-badge.stage-won {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: var(--success-light);
}

.lead-stage-badge.stage-lost {
    background: linear-gradient(135deg, var(--error-alpha-15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: var(--error);
}

.lead-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.lead-card-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lead-card-detail .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-disabled);
}

.lead-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--black-alpha-6);
}

.lead-card-owner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lead-card-owner .mud-icon-root {
    font-size: 0.875rem;
}

.lead-card-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lead-card:hover .lead-card-actions {
    opacity: 1;
}

.lead-card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lead-card-action-btn:hover {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.lead-card-action-btn.delete:hover {
    background: var(--error-alpha-10);
    color: var(--error);
}

/* ========== LEADS TABLE VIEW ========== */
.leads-table {
    width: 100%;
    overflow-x: auto;
}

.leads-table-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, var(--indigo-alpha-5) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-bottom: 1px solid var(--black-alpha-6);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
    min-width: 1100px;
}

.leads-table-row {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--black-alpha-4);
    cursor: pointer;
    transition: background-color 0.15s ease;
    min-width: 1100px;
}

.leads-table-row:hover {
    background: var(--indigo-alpha-3);
}

.leads-table-row:last-child {
    border-bottom: none;
}

.leads-table-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.leads-table-cell.checkbox {
    width: 40px;
    flex-shrink: 0;
}

.leads-table-cell.name {
    flex: 1.5;
    min-width: 200px;
    font-weight: 500;
}

.leads-table-cell.company {
    flex: 1;
    min-width: 140px;
    color: var(--mud-palette-text-secondary);
}

.leads-table-cell.stage {
    width: 120px;
    flex-shrink: 0;
}

.leads-table-cell.value {
    width: 100px;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--success-light);
}

.leads-table-cell.probability {
    width: 100px;
    flex-shrink: 0;
    gap: 0.75rem;
}

.leads-table-cell.close-date {
    width: 120px;
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary);
}

.leads-table-cell.source {
    width: 120px;
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary);
}

.leads-table-cell.owner {
    width: 120px;
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary);
}

.leads-table-cell.actions {
    width: 80px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.leads-table-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.6875rem;
    color: white;
    flex-shrink: 0;
}

.leads-probability-mini {
    width: 40px;
    height: 6px;
    background: var(--black-alpha-10);
    border-radius: 3px;
    overflow: hidden;
}

.leads-probability-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success-light), var(--success-medium));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========== VIEW LEAD SKELETON ========== */
.lead-skeleton-container {
    padding: 1rem;
}

.lead-skeleton-back,
.lead-skeleton-profile,
.lead-skeleton-tabs,
.lead-skeleton-content,
.lead-skeleton-line,
.lead-skeleton-avatar,
.lead-skeleton-tab,

.lead-skeleton-back {
    height: 48px;
    margin-bottom: 1rem;
}

.lead-skeleton-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.lead-skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    flex-shrink: 0;
}

.lead-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lead-skeleton-line {
    height: 20px;
}

.lead-skeleton-line.w-60 {
    width: 60%;
}

.lead-skeleton-line.w-40 {
    width: 40%;
}

.lead-skeleton-line.w-30 {
    width: 30%;
}

.lead-skeleton-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.lead-skeleton-tab {
    width: 140px;
    height: 40px;
    border-radius: 8px;
}

.lead-skeleton-content {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
}

.lead-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.lead-skeleton-card {
    height: 100px;
    border-radius: 10px;
}

/* ========== VIEW LEAD BACK CARD ========== */
.lead-back-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.lead-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-back-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border-color: var(--border-dark);
}

/* ========== VIEW LEAD PROFILE CARD ========== */
.lead-profile-card {
    background: linear-gradient(135deg, var(--mud-palette-white) 0%, var(--bg-page) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--black-alpha-6);
    box-shadow: 0 4px 16px var(--black-alpha-6);
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.lead-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.lead-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    box-shadow: 0 8px 24px var(--indigo-alpha-30);
}

.lead-avatar.avatar-pink {
    background: linear-gradient(135deg, var(--pink), var(--error-pink-dark));
}

.lead-avatar.avatar-blue {
    background: linear-gradient(135deg, var(--info), var(--info-dark));
}

.lead-avatar.avatar-green {
    background: linear-gradient(135deg, var(--success-light), var(--success-medium));
}

.lead-avatar.avatar-purple {
    background: linear-gradient(135deg, var(--violet), var(--violet-dark));
}

.lead-avatar.avatar-orange {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
}

.lead-favorite-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-disabled);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--black-alpha-10);
}

.lead-favorite-btn:hover {
    color: var(--warning);
    border-color: var(--warning);
}

.lead-favorite-btn.active {
    color: var(--warning);
    background: rgba(251, 191, 36, 0.15);
    border-color: var(--warning-light);
}

.lead-profile-info {
    flex: 1;
    min-width: 200px;
}

.lead-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.lead-profile-owner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.lead-profile-owner .mud-icon-root {
    font-size: 1rem;
}

.lead-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lead-probability-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: var(--success-light);
}

.lead-profile-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.lead-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lead-stat-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
}

.lead-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.lead-stat-value.source {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 1rem;
}

.lead-stat-value.source .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
}

.lead-edit-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.lead-edit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-40);
}

/* ========== VIEW LEAD DETAIL TABS ========== */
.lead-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--mud-palette-surface);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.lead-detail-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-detail-tab-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.lead-detail-tab-btn.active {
    background: linear-gradient(135deg, var(--indigo-lightest), var(--indigo-light));
    color: var(--indigo);
    border-color: var(--purple-bg-indigo);
    font-weight: 600;
}

/* ========== VIEW LEAD CONTENT CARD ========== */
.lead-content-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    border: 1px solid var(--black-alpha-4);
}

.lead-content-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lead-section-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-section-edit-btn:hover {
    background: var(--border-light);
    color: var(--text-muted);
}

.lead-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.lead-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-40);
}

/* ========== LEAD INFO GRID ========== */
.lead-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.lead-info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-background);
    border-radius: 12px;
    border: 1px solid var(--black-alpha-6);
    transition: all 0.2s ease;
}

.lead-info-card:hover {
    border-color: var(--indigo-alpha-20);
    box-shadow: 0 2px 8px var(--black-alpha-4);
}

.lead-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lead-info-icon.blue {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: var(--info);
}

.lead-info-icon.purple {
    background: linear-gradient(135deg, var(--violet-alpha-15) 0%, rgba(124, 58, 237, 0.15) 100%);
    color: var(--violet);
}

.lead-info-icon.green {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: var(--success-light);
}

.lead-info-icon.orange {
    background: linear-gradient(135deg, var(--orange-alpha-15) 0%, rgba(234, 88, 12, 0.15) 100%);
    color: var(--orange);
}

.lead-info-icon.pink {
    background: linear-gradient(135deg, var(--pink-alpha-15) 0%, rgba(219, 39, 119, 0.15) 100%);
    color: var(--pink);
}

.lead-info-icon.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(13, 148, 136, 0.15) 100%);
    color: var(--teal);
}

.lead-info-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.lead-info-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
}

.lead-info-value {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== LEAD DESCRIPTION ========== */
.lead-description-section {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--indigo-alpha-3) 0%, var(--violet-alpha-3) 100%);
    border-radius: 12px;
    border: 1px solid var(--indigo-alpha-10);
}

.lead-description-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--indigo);
    margin: 0 0 0.75rem 0;
}

.lead-description-title .mud-icon-root {
    font-size: 1rem;
}

.lead-description-text {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    line-height: 1.6;
    margin: 0;
}

/* ========== LEAD PIPELINE VISUAL ========== */
.lead-pipeline-container {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 2rem 1rem;
    overflow-x: auto;
    margin-bottom: 2rem;
}

.lead-pipeline-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-pipeline-stage::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--border-light);
}

.lead-pipeline-stage:last-child::after {
    display: none;
}

.lead-pipeline-stage.passed::after {
    background: linear-gradient(90deg, var(--success-light), var(--success-light));
}

.lead-pipeline-stage.active::after {
    background: linear-gradient(90deg, var(--success-light), var(--border-light));
}

.lead-pipeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    z-index: 1;
    transition: all 0.2s ease;
}

.lead-pipeline-stage.passed .lead-pipeline-dot {
    background: var(--success-light);
    border-color: var(--success-light);
    color: white;
}

.lead-pipeline-stage.active .lead-pipeline-dot {
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    border-color: var(--indigo);
    color: white;
    box-shadow: 0 0 0 4px var(--indigo-alpha-20);
}

.lead-pipeline-stage:hover .lead-pipeline-dot {
    transform: scale(1.1);
}

.lead-pipeline-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.lead-pipeline-stage.active .lead-pipeline-label {
    color: var(--indigo);
    font-weight: 600;
}

.lead-pipeline-stage.passed .lead-pipeline-label {
    color: var(--success-light);
}

/* ========== LEAD STAGE DETAILS ========== */
.lead-stage-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.lead-stage-detail-card {
    padding: 1.5rem;
    background: var(--mud-palette-background);
    border-radius: 12px;
    border: 1px solid var(--black-alpha-6);
}

.lead-stage-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 1rem;
}

.lead-stage-detail-header .mud-icon-root {
    color: var(--indigo);
}

.lead-probability-bar {
    height: 8px;
    background: var(--black-alpha-10);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.lead-probability-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-light), var(--success-medium));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.lead-probability-text {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lead-forecast-values {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lead-forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lead-forecast-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lead-forecast-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.lead-forecast-value.weighted {
    color: var(--success-light);
}

.lead-timeline-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lead-timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lead-timeline-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lead-timeline-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.lead-timeline-value.highlight {
    color: var(--indigo);
    font-weight: 600;
}

/* ========== LEAD ACTIVITIES TIMELINE ========== */
.lead-activities-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lead-activity-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--black-alpha-6);
}

.lead-activity-item:last-child {
    border-bottom: none;
}

.lead-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lead-activity-icon.activity-call {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: var(--success-light);
}

.lead-activity-icon.activity-email {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: var(--info);
}

.lead-activity-icon.activity-meeting {
    background: linear-gradient(135deg, var(--violet-alpha-15) 0%, rgba(124, 58, 237, 0.15) 100%);
    color: var(--violet);
}

.lead-activity-icon.activity-note {
    background: linear-gradient(135deg, var(--warning-alpha-15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--warning);
}

.lead-activity-icon.activity-default {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.15) 0%, rgba(71, 85, 105, 0.15) 100%);
    color: var(--text-secondary);
}

.lead-activity-content {
    flex: 1;
    min-width: 0;
}

.lead-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.lead-activity-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.lead-activity-date {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.lead-activity-description {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
}

.lead-activity-meta {
    display: flex;
    gap: 1rem;
}

.lead-activity-type {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--indigo);
    background: var(--indigo-alpha-10);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.lead-activity-user {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* ========== LEAD TASKS LIST ========== */
.lead-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.lead-task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-background);
    border-radius: 10px;
    border: 1px solid var(--black-alpha-6);
    transition: all 0.2s ease;
}

.lead-task-item:hover {
    border-color: var(--indigo-alpha-20);
    box-shadow: 0 2px 8px var(--black-alpha-4);
}

.lead-task-item.completed {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
}

.lead-task-item.completed .lead-task-title {
    text-decoration: line-through;
    color: var(--mud-palette-text-secondary);
}

.lead-task-item.overdue {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.lead-task-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-disabled);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-task-checkbox:hover {
    color: var(--indigo);
}

.lead-task-item.completed .lead-task-checkbox {
    color: var(--success-light);
}

.lead-task-content {
    flex: 1;
    min-width: 0;
}

.lead-task-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.375rem;
}

.lead-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.lead-task-due {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lead-task-due .mud-icon-root {
    font-size: 0.875rem;
}

.lead-task-due.overdue {
    color: var(--error);
    font-weight: 500;
}

.lead-task-priority {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.lead-task-priority.high {
    background: var(--error-alpha-10);
    color: var(--error);
}

.lead-task-priority.medium {
    background: var(--warning-alpha-10);
    color: var(--warning);
}

.lead-task-priority.low {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

.lead-task-assignee {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lead-task-assignee .mud-icon-root {
    font-size: 0.875rem;
}

.lead-task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lead-task-item:hover .lead-task-actions {
    opacity: 1;
}

.lead-task-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lead-task-action-btn:hover {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.lead-task-action-btn.delete:hover {
    background: var(--error-alpha-10);
    color: var(--error);
}

/* ========== LEAD TASK SUMMARY ========== */
.lead-task-summary {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--indigo-alpha-3) 0%, var(--violet-alpha-3) 100%);
    border-radius: 10px;
}

.lead-task-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.lead-task-summary-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--indigo);
}

.lead-task-summary-item.completed .lead-task-summary-count {
    color: var(--success-light);
}

.lead-task-summary-item.overdue .lead-task-summary-count {
    color: var(--error);
}

.lead-task-summary-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* ========== LEAD EMPTY STATE ========== */
.lead-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.lead-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo-alpha-10) 0%, var(--violet-alpha-10) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.lead-empty-icon .mud-icon-root {
    font-size: 2.5rem;
    color: var(--indigo);
}

.lead-empty-state h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem 0;
}

.lead-empty-state p {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 1.5rem 0;
}

.lead-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--indigo-alpha-30);
}

.lead-empty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-40);
}

/* ========== LEAD NOT FOUND ========== */
.lead-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.lead-not-found-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--error-alpha-10) 0%, rgba(220, 38, 38, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.lead-not-found-icon .mud-icon-root {
    font-size: 3rem;
    color: var(--error);
}

.lead-not-found h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem 0;
}

.lead-not-found p {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 1.5rem 0;
}

/* ========== RESPONSIVE LEADS ========== */
@media (max-width: 1200px) {
    .leads-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .leads-pipeline-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .lead-profile-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }

    .lead-avatar-section {
        align-self: center;
    }

    .lead-profile-info {
        align-self: center;
    }

    .lead-profile-stats {
        justify-content: center;
        align-self: center;
    }

    .lead-edit-btn {
        position: static;
        margin-top: 1rem;
        align-self: center;
    }

    .lead-pipeline-container {
        padding: 1rem 0;
    }

    .lead-pipeline-stage {
        padding: 0 0.75rem;
    }

    .lead-info-grid {
        grid-template-columns: 1fr;
    }

    .leads-table-header,
    .leads-table-row {
        min-width: 900px;
    }
}

@media (max-width: 480px) {
    .leads-pipeline-summary {
        grid-template-columns: 1fr;
    }

    .leads-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .lead-card-details {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Contact Priority Component
   ============================================ */

.contact-view-priority-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-radius: 16px;
    border: 1px solid var(--indigo-alpha-15);
    box-shadow: 0 4px 20px var(--black-alpha-4);
    position: relative;
    overflow: hidden;
    margin-left: auto;
    min-width: 420px;
    max-width: 480px;
    flex-shrink: 0;
}

.contact-view-priority-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--error) 0%, var(--orange) 20%, #eab308 40%, var(--success-light) 70%, var(--success) 100%);
    opacity: 0.8;
}

.contact-view-priority-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.contact-view-priority-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.contact-view-priority-title .mud-icon-root {
    font-size: 1rem;
    color: var(--indigo);
}

.contact-view-priority-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-view-priority-badge.priority-1,
.contact-view-priority-badge.priority-2 {
    background: linear-gradient(135deg, var(--error-alpha-15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: var(--error-dark);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.contact-view-priority-badge.priority-3,
.contact-view-priority-badge.priority-4 {
    background: linear-gradient(135deg, var(--orange-alpha-15) 0%, rgba(234, 88, 12, 0.15) 100%);
    color: var(--orange-dark);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.contact-view-priority-badge.priority-5,
.contact-view-priority-badge.priority-6 {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.15) 100%);
    color: #ca8a04;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.2);
}

.contact-view-priority-badge.priority-7,
.contact-view-priority-badge.priority-8 {
    background: linear-gradient(135deg, var(--success-light-alpha-15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: var(--success-medium);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.contact-view-priority-badge.priority-9,
.contact-view-priority-badge.priority-10 {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success-dark);
    box-shadow: 0 2px 8px var(--success-alpha-20);
}

.contact-view-priority-badge .priority-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: priorityPulse 2s ease-in-out infinite;
}

.contact-view-priority-badge.priority-1 .priority-indicator,
.contact-view-priority-badge.priority-2 .priority-indicator {
    background: var(--error-dark);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

.contact-view-priority-badge.priority-3 .priority-indicator,
.contact-view-priority-badge.priority-4 .priority-indicator {
    background: var(--orange-dark);
    box-shadow: 0 0 8px rgba(234, 88, 12, 0.6);
}

.contact-view-priority-badge.priority-5 .priority-indicator,
.contact-view-priority-badge.priority-6 .priority-indicator {
    background: #ca8a04;
    box-shadow: 0 0 8px rgba(202, 138, 4, 0.6);
}

.contact-view-priority-badge.priority-7 .priority-indicator,
.contact-view-priority-badge.priority-8 .priority-indicator {
    background: var(--success-medium);
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.6);
}

.contact-view-priority-badge.priority-9 .priority-indicator,
.contact-view-priority-badge.priority-10 .priority-indicator {
    background: var(--success-dark);
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
}

@keyframes priorityPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.contact-view-priority-scale {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 12px;
}

.contact-view-priority-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-disabled);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.contact-view-priority-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--black-alpha-10);
}

.contact-view-priority-btn.active {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 16px var(--black-alpha-15);
    color: white;
}

/* Priority button colors */
.contact-view-priority-btn[data-priority="1"] {
    border-color: rgba(239, 68, 68, 0.3);
}

.contact-view-priority-btn[data-priority="1"]:hover,
.contact-view-priority-btn[data-priority="1"].active {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    border-color: var(--error);
}

.contact-view-priority-btn[data-priority="2"] {
    border-color: rgba(249, 115, 22, 0.3);
}

.contact-view-priority-btn[data-priority="2"]:hover,
.contact-view-priority-btn[data-priority="2"].active {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border-color: var(--orange);
}

.contact-view-priority-btn[data-priority="3"] {
    border-color: rgba(251, 146, 60, 0.3);
}

.contact-view-priority-btn[data-priority="3"]:hover,
.contact-view-priority-btn[data-priority="3"].active {
    background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%);
    border-color: var(--orange-light);
}

.contact-view-priority-btn[data-priority="4"] {
    border-color: rgba(250, 204, 21, 0.3);
}

.contact-view-priority-btn[data-priority="4"]:hover,
.contact-view-priority-btn[data-priority="4"].active {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    border-color: #facc15;
}

.contact-view-priority-btn[data-priority="5"] {
    border-color: rgba(234, 179, 8, 0.3);
}

.contact-view-priority-btn[data-priority="5"]:hover,
.contact-view-priority-btn[data-priority="5"].active {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    border-color: #eab308;
}

.contact-view-priority-btn[data-priority="6"] {
    border-color: rgba(163, 230, 53, 0.3);
}

.contact-view-priority-btn[data-priority="6"]:hover,
.contact-view-priority-btn[data-priority="6"].active {
    background: linear-gradient(135deg, #a3e635 0%, #84cc16 100%);
    border-color: #a3e635;
}

.contact-view-priority-btn[data-priority="7"] {
    border-color: rgba(74, 222, 128, 0.3);
}

.contact-view-priority-btn[data-priority="7"]:hover,
.contact-view-priority-btn[data-priority="7"].active {
    background: linear-gradient(135deg, #4ade80 0%, var(--success-light) 100%);
    border-color: #4ade80;
}

.contact-view-priority-btn[data-priority="8"] {
    border-color: rgba(34, 197, 94, 0.3);
}

.contact-view-priority-btn[data-priority="8"]:hover,
.contact-view-priority-btn[data-priority="8"].active {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-medium) 100%);
    border-color: var(--success-light);
}

.contact-view-priority-btn[data-priority="9"] {
    border-color: rgba(52, 211, 153, 0.3);
}

.contact-view-priority-btn[data-priority="9"]:hover,
.contact-view-priority-btn[data-priority="9"].active {
    background: linear-gradient(135deg, var(--success-pale) 0%, var(--success) 100%);
    border-color: var(--success-pale);
}

.contact-view-priority-btn[data-priority="10"] {
    border-color: var(--success-alpha-30);
}

.contact-view-priority-btn[data-priority="10"]:hover,
.contact-view-priority-btn[data-priority="10"].active {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-color: var(--success);
}

.contact-view-priority-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 0.25rem;
}

.contact-view-priority-label {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.contact-view-priority-label.high {
    color: var(--error);
}

.contact-view-priority-label.low {
    color: var(--success);
}

/* Saving indicator */
.contact-view-priority-saving {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--indigo);
    animation: fadeIn 0.2s ease;
}

.contact-view-priority-saving .mud-progress-circular {
    width: 14px !important;
    height: 14px !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Tooltip styles for priority buttons */
.contact-view-priority-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    padding: 0.375rem 0.625rem;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10;
}

.contact-view-priority-btn::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10;
}

.contact-view-priority-btn:hover::after,
.contact-view-priority-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Progress bar indicator */
.contact-view-priority-progress {
    height: 4px;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, rgba(249, 115, 22, 0.2) 20%, rgba(234, 179, 8, 0.2) 40%, rgba(34, 197, 94, 0.2) 70%, var(--success-alpha-20) 100%);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.contact-view-priority-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-view-priority-progress-fill.priority-1,
.contact-view-priority-progress-fill.priority-2 {
    background: linear-gradient(90deg, var(--error), var(--error-dark));
}

.contact-view-priority-progress-fill.priority-3,
.contact-view-priority-progress-fill.priority-4 {
    background: linear-gradient(90deg, var(--orange), var(--orange-dark));
}

.contact-view-priority-progress-fill.priority-5,
.contact-view-priority-progress-fill.priority-6 {
    background: linear-gradient(90deg, #eab308, #ca8a04);
}

.contact-view-priority-progress-fill.priority-7,
.contact-view-priority-progress-fill.priority-8 {
    background: linear-gradient(90deg, var(--success-light), var(--success-medium));
}

.contact-view-priority-progress-fill.priority-9,
.contact-view-priority-progress-fill.priority-10 {
    background: linear-gradient(90deg, var(--success), var(--success-dark));
}

/* Responsive styles */
@media (max-width: 768px) {
    .contact-view-priority-container {
        padding: 0.875rem;
        min-width: unset;
        max-width: unset;
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
    }

    .contact-view-priority-scale {
        gap: 0.25rem;
        padding: 0.375rem;
    }

    .contact-view-priority-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .contact-view-priority-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .contact-view-priority-btn::after,
    .contact-view-priority-btn::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .contact-view-priority-btn {
        width: 26px;
        height: 26px;
        font-size: 0.6875rem;
        border-radius: 6px;
    }

    .contact-view-priority-scale {
        border-radius: 10px;
    }
}

/* ============================================
   Contacts Table View
   ============================================ */

.contacts-table {
    width: 100%;
    overflow-x: auto;
}

.contacts-table-header {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-bottom: 1px solid var(--black-alpha-6);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
    min-width: 1100px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.contacts-table-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--black-alpha-4);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 1100px;
    position: relative;
}

.contacts-table-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--indigo) 0%, var(--violet) 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.contacts-table-row:hover {
    background: var(--indigo-alpha-4);
}

.contacts-table-row:hover::before {
    transform: scaleY(1);
}

.contacts-table-row:last-child {
    border-bottom: none;
}

.contacts-table-row.selected {
    background: linear-gradient(90deg, var(--indigo-alpha-8) 0%, rgba(99, 102, 241, 0.02) 100%);
}

.contacts-table-row.selected::before {
    transform: scaleY(1);
}

.contacts-table-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.contacts-table-cell.checkbox {
    width: 40px;
    flex-shrink: 0;
}

.contacts-table-cell.name {
    flex: 1.5;
    min-width: 220px;
    font-weight: 500;
}

.contacts-table-cell.email {
    flex: 1.2;
    min-width: 200px;
    color: var(--mud-palette-text-secondary);
}

.contacts-table-cell.phone {
    width: 140px;
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary);
}

.contacts-table-cell.type {
    width: 120px;
    flex-shrink: 0;
}

.contacts-table-cell.connected {
    width: 180px;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.contacts-table-cell.priority {
    width: 100px;
    flex-shrink: 0;
}

.contacts-table-cell.added {
    width: 110px;
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.contacts-table-cell.actions {
    width: 100px;
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 0.25rem;
}

.contacts-table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contacts-table-row:hover .contacts-table-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--black-alpha-15);
}

.contacts-table-name {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.contacts-table-name-primary {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contacts-table-name-secondary {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contacts-table-email-link {
    color: var(--indigo);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.contacts-table-email-link:hover {
    color: var(--indigo-dark);
    text-decoration: underline;
}

.contacts-table-phone-link {
    color: var(--mud-palette-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.contacts-table-phone-link:hover {
    color: var(--success-light);
}

.contacts-table-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.contacts-table-type-badge.client {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.contacts-table-type-badge.lead {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-medium);
}

.contacts-table-type-badge.partner {
    background: var(--warning-alpha-10);
    color: var(--warning-dark);
}

.contacts-table-type-badge.vendor {
    background: var(--pink-alpha-10);
    color: var(--error-pink-dark);
}

.contacts-table-type-badge.vip {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, var(--violet-alpha-15) 100%);
    color: var(--violet-dark);
}

.contacts-table-type-badge.borrower {
    background: var(--info-alpha-10);
    color: var(--info-dark);
}

.contacts-table-type-badge.co-borrower {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

.contacts-table-type-badge.agent,
.contacts-table-type-badge.real-estate-agent {
    background: rgba(249, 115, 22, 0.1);
    color: var(--orange-dark);
}

.contacts-table-priority {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contacts-table-priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.contacts-table-priority-dot.priority-high {
    background: var(--error);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.contacts-table-priority-dot.priority-medium {
    background: var(--warning);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.contacts-table-priority-dot.priority-low {
    background: var(--success-light);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.contacts-table-priority-text {
    font-size: 0.8125rem;
    font-weight: 500;
}

.contacts-table-priority-text.high {
    color: var(--error-dark);
}

.contacts-table-priority-text.medium {
    color: var(--warning-dark);
}

.contacts-table-priority-text.low {
    color: var(--success-medium);
}

.contacts-table-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-secondary);
    transition: all 0.2s ease;
}

.contacts-table-action-btn:hover {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.contacts-table-action-btn.edit:hover {
    background: var(--info-alpha-10);
    color: var(--info);
}

.contacts-table-action-btn.delete:hover {
    background: var(--error-alpha-10);
    color: var(--error);
}

.contacts-table-action-btn.favorite {
    color: var(--border-muted);
}

.contacts-table-action-btn.favorite:hover,
.contacts-table-action-btn.favorite.active {
    color: var(--warning);
    background: var(--warning-alpha-10);
}

.contacts-table-action-btn .mud-icon-root {
    font-size: 1.125rem;
}

/* Table View Empty State */
.contacts-table-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.contacts-table-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--indigo-alpha-10) 0%, var(--violet-alpha-10) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.contacts-table-empty-icon .mud-icon-root {
    font-size: 2rem;
    color: var(--indigo);
}

.contacts-table-empty h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.contacts-table-empty p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 1200px) {

    .contacts-table-header,
    .contacts-table-row {
        min-width: 850px;
    }
}

@media (max-width: 768px) {

    .contacts-table-header,
    .contacts-table-row {
        min-width: 700px;
    }

    .contacts-table-cell.email {
        min-width: 160px;
    }

    .contacts-table-cell.name {
        min-width: 180px;
    }
}

/* ==========================================================================
   CRM LEAD STYLES (crm-lead prefix)
   ========================================================================== */

/* Lead Pipeline Summary Cards */
.crm-lead-pipeline-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crm-lead-summary-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
}

.crm-lead-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--black-alpha-8);
}

.crm-lead-summary-card.new-lead .crm-lead-summary-icon {
    background: linear-gradient(135deg, #818cf8 0%, var(--indigo) 100%);
}

.crm-lead-summary-card.contacted .crm-lead-summary-icon {
    background: linear-gradient(135deg, var(--info-light) 0%, var(--info) 100%);
}

.crm-lead-summary-card.qualified .crm-lead-summary-icon {
    background: linear-gradient(135deg, var(--success-pale) 0%, var(--success) 100%);
}

.crm-lead-summary-card.converted .crm-lead-summary-icon {
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--warning) 100%);
}

.crm-lead-summary-card.total-value .crm-lead-summary-icon {
    background: linear-gradient(135deg, var(--violet-light) 0%, var(--violet) 100%);
}

.crm-lead-summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-lead-summary-icon .mud-icon-root {
    color: white;
    font-size: 1.25rem;
}

.crm-lead-summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-lead-summary-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.crm-lead-summary-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Lead Card Styles */
.crm-lead-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.crm-lead-card:hover {
    border-color: var(--indigo);
    box-shadow: 0 4px 16px var(--indigo-alpha-12);
    transform: translateY(-2px);
}

.crm-lead-card.converted {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(5, 150, 105, 0.03) 100%);
}

.crm-lead-converted-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 6px;
}

.crm-lead-converted-badge .mud-icon-root {
    font-size: 0.75rem;
}

.crm-lead-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crm-lead-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.crm-lead-avatar-pink {
    background: linear-gradient(135deg, #f472b6 0%, var(--pink) 100%);
}

.crm-lead-avatar-blue {
    background: linear-gradient(135deg, var(--info-light) 0%, var(--info) 100%);
}

.crm-lead-avatar-green {
    background: linear-gradient(135deg, var(--success-pale) 0%, var(--success) 100%);
}

.crm-lead-avatar-purple {
    background: linear-gradient(135deg, var(--violet-light) 0%, var(--violet) 100%);
}

.crm-lead-avatar-orange {
    background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%);
}

.crm-lead-avatar-teal {
    background: linear-gradient(135deg, #2dd4bf 0%, var(--teal) 100%);
}

.crm-lead-info {
    flex: 1;
    min-width: 0;
}

.crm-lead-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-lead-contact {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crm-lead-status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-lead-status-badge.status-new {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--violet-alpha-15) 100%);
    color: var(--indigo);
}

.crm-lead-status-badge.status-contacted {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: var(--info);
}

.crm-lead-status-badge.status-qualified {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success);
}

.crm-lead-status-badge.status-converted {
    background: linear-gradient(135deg, var(--warning-alpha-15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--warning);
}

.crm-lead-status-badge.large {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
}

.crm-lead-priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.crm-lead-priority-badge.high {
    background: var(--error-alpha-15);
    color: var(--error);
}

.crm-lead-priority-badge.normal {
    background: var(--info-alpha-15);
    color: var(--info);
}

.crm-lead-priority-badge.low {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-500);
}

.crm-lead-priority-badge.large {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.crm-lead-rating-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.crm-lead-rating-badge.hot {
    background: var(--error-alpha-15);
    color: var(--error);
}

.crm-lead-rating-badge.warm {
    background: var(--warning-alpha-15);
    color: var(--warning);
}

.crm-lead-rating-badge.cold {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-500);
}

.crm-lead-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.crm-lead-detail {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    overflow: hidden;
}

.crm-lead-detail .mud-icon-root {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.crm-lead-detail span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-lead-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin-top: auto;
}

.crm-lead-owner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-owner .mud-icon-root {
    font-size: 0.875rem;
}

.crm-lead-card-actions {
    display: flex;
    gap: 0.25rem;
}

.crm-lead-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.crm-lead-action-btn:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-lead-action-btn .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-action-btn.convert:hover {
    background: var(--success-alpha-15);
}

.crm-lead-action-btn.convert:hover .mud-icon-root {
    color: var(--success);
}

.crm-lead-action-btn.edit:hover .mud-icon-root {
    color: var(--indigo);
}

.crm-lead-action-btn.delete:hover {
    background: var(--error-alpha-15);
}

.crm-lead-action-btn.delete:hover .mud-icon-root {
    color: var(--error);
}

/* Lead Table Styles */
.crm-lead-table {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow-x: auto;
}

.crm-lead-table-header {
    display: flex;
    padding: 0.875rem 1rem;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-lead-table-row {
    display: flex;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
    transition: background 0.15s ease;
    align-items: center;
}

.crm-lead-table-row:last-child {
    border-bottom: none;
}

.crm-lead-table-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-lead-table-row.selected {
    background: var(--indigo-alpha-8);
}

.crm-lead-table-row.converted {
    background: rgba(16, 185, 129, 0.05);
}

.crm-lead-table-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.crm-lead-table-cell.checkbox {
    width: 40px;
    flex-shrink: 0;
}

.crm-lead-table-cell.name {
    flex: 2;
    min-width: 200px;
}

.crm-lead-table-cell.contact {
    flex: 2;
    min-width: 180px;
}

.crm-lead-table-cell.status {
    width: 110px;
    flex-shrink: 0;
}

.crm-lead-table-cell.source {
    width: 100px;
    flex-shrink: 0;
}

.crm-lead-table-cell.score {
    width: 100px;
    flex-shrink: 0;
}

.crm-lead-table-cell.priority {
    width: 80px;
    flex-shrink: 0;
}

.crm-lead-table-cell.assigned {
    width: 120px;
    flex-shrink: 0;
}

.crm-lead-table-cell.actions {
    width: 120px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.crm-lead-table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.crm-lead-table-name {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.crm-lead-table-name-primary {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-lead-table-name-secondary {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-lead-email-link {
    color: var(--indigo);
    text-decoration: none;
    font-size: 0.8125rem;
}

.crm-lead-email-link:hover {
    text-decoration: underline;
}

.crm-lead-phone {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-score-indicator {
    width: 50px;
    height: 6px;
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
    overflow: hidden;
}

.crm-lead-score-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, var(--success-pale) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Lead Detail View Styles */
.crm-lead-skeleton-container {
    padding: 1rem;
}

.crm-lead-skeleton-back,
.crm-lead-skeleton-profile,
.crm-lead-skeleton-tabs,

.crm-lead-skeleton-back {
    height: 40px;
    width: 140px;
}

.crm-lead-skeleton-profile {
    height: 180px;
}

.crm-lead-skeleton-tabs {
    height: 50px;
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
}

.crm-lead-skeleton-tab {
    flex: 1;
    background: var(--mud-palette-lines-default);
    border-radius: 8px;
}


.crm-lead-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.crm-lead-skeleton-card {
    height: 100px;
    background: var(--mud-palette-lines-default);
    border-radius: 8px;
}

.crm-lead-back-card {
    margin-bottom: 1rem;
}

.crm-lead-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-lead-back-btn:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-text-secondary);
}

.crm-lead-back-btn .mud-icon-root {
    font-size: 1.25rem;
}

/* Lead Profile Card */
.crm-lead-profile-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.crm-lead-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.crm-lead-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
}

.crm-lead-converted-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 6px;
}

.crm-lead-profile-info {
    flex: 1;
    min-width: 200px;
}

.crm-lead-profile-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.25rem;
}

.crm-lead-profile-name {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.5rem;
}

.crm-lead-profile-owner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.75rem;
}

.crm-lead-profile-owner .mud-icon-root {
    font-size: 1rem;
}

.crm-lead-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crm-lead-profile-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.crm-lead-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.crm-lead-stat-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-lead-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-lead-stat-value.source {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.crm-lead-stat-value.source .mud-icon-root {
    font-size: 1rem;
}

.crm-lead-score-circle {
    position: relative;
    width: 60px;
    height: 60px;
}

.crm-lead-score-circle svg {
    transform: rotate(-90deg);
}

.crm-lead-score-bg {
    fill: none;
    stroke: var(--mud-palette-lines-default);
    stroke-width: 3;
}

.crm-lead-score-fill {
    fill: none;
    stroke: var(--success);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.crm-lead-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.crm-lead-profile-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.crm-lead-convert-btn,
.crm-lead-edit-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.crm-lead-convert-btn {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
}

.crm-lead-convert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--success-alpha-30);
}

.crm-lead-convert-btn.large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* Lead Convert Section - Shows on Timeline when Qualified */
.crm-lead-convert-section {
    margin: 2rem 0 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-radius: 16px;
    border: 2px dashed var(--success-alpha-30);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.crm-lead-convert-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.crm-lead-convert-message .mud-icon-root {
    color: var(--success);
    font-size: 1.25rem;
}

.crm-lead-convert-message strong {
    color: var(--success);
}

.crm-lead-edit-btn {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.crm-lead-edit-btn:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-text-secondary);
}

/* Lead Detail Tabs */
.crm-lead-detail-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.crm-lead-detail-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.crm-lead-detail-tab-btn:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-lead-detail-tab-btn.active {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-color: transparent;
    color: white;
}

.crm-lead-detail-tab-btn .mud-icon-root {
    font-size: 1rem;
}

/* Lead Content Card */
.crm-lead-content-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-lead-content-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-lead-section-edit-btn,
.crm-lead-add-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-lead-section-edit-btn:hover,
.crm-lead-add-btn:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-text-secondary);
}

.crm-lead-add-btn {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-color: transparent;
    color: white;
}

.crm-lead-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
}

/* Lead Info Grid */
.crm-lead-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crm-lead-info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.crm-lead-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-lead-info-icon.blue {
    background: var(--info-alpha-15);
}

.crm-lead-info-icon.blue .mud-icon-root {
    color: var(--info);
}

.crm-lead-info-icon.purple {
    background: var(--violet-alpha-15);
}

.crm-lead-info-icon.purple .mud-icon-root {
    color: var(--violet);
}

.crm-lead-info-icon.green {
    background: var(--success-alpha-15);
}

.crm-lead-info-icon.green .mud-icon-root {
    color: var(--success);
}

.crm-lead-info-icon.orange {
    background: var(--orange-alpha-15);
}

.crm-lead-info-icon.orange .mud-icon-root {
    color: var(--orange);
}

.crm-lead-info-icon.pink {
    background: var(--pink-alpha-15);
}

.crm-lead-info-icon.pink .mud-icon-root {
    color: var(--pink);
}

.crm-lead-info-icon.teal {
    background: rgba(20, 184, 166, 0.15);
}

.crm-lead-info-icon.teal .mud-icon-root {
    color: var(--teal);
}

.crm-lead-info-icon .mud-icon-root {
    font-size: 1.125rem;
}

.crm-lead-info-content {
    flex: 1;
    min-width: 0;
}

.crm-lead-info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.25rem;
}

.crm-lead-info-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    word-break: break-word;
}

.crm-lead-info-hint {
    display: block;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
    margin-top: 0.25rem;
}

.crm-lead-link {
    color: var(--indigo);
    text-decoration: none;
}

.crm-lead-link:hover {
    text-decoration: underline;
}

/* Lead Description Section */
.crm-lead-description-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.crm-lead-description-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.75rem;
}

.crm-lead-description-title .mud-icon-root {
    font-size: 1.125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-description-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--mud-palette-text-secondary);
}

/* Lead Conversion Section */
.crm-lead-conversion-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--success-alpha-10) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-radius: 12px;
    border: 1px solid var(--success-alpha-20);
}

.crm-lead-conversion-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--success-dark);
    margin-bottom: 1rem;
}

.crm-lead-conversion-title .mud-icon-root {
    font-size: 1.25rem;
}

.crm-lead-conversion-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.crm-lead-conversion-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.crm-lead-conversion-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-conversion-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

/* Lead Pipeline Container - Enhanced Timeline Design */
.crm-lead-pipeline-container {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    padding: 2rem 1.5rem;
    position: relative;
    background: linear-gradient(135deg, var(--mud-palette-background-grey) 0%, var(--mud-palette-surface) 100%);
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
}

.crm-lead-pipeline-container::before {
    content: '';
    position: absolute;
    top: calc(2rem + 24px);
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 0%, var(--mud-palette-lines-default) 100%);
    border-radius: 2px;
    z-index: 0;
}

/* Progress track overlay - shows completed progress */
.crm-lead-pipeline-container::after {
    content: '';
    position: absolute;
    top: calc(2rem + 24px);
    left: 10%;
    height: 4px;
    background: linear-gradient(90deg, var(--success) 0%, var(--success-pale) 100%);
    border-radius: 2px;
    z-index: 1;
    width: var(--pipeline-progress, 0%);
    transition: width 0.5s ease;
}

.crm-lead-pipeline-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
    z-index: 2;
    padding: 0 0.5rem;
    transition: transform 0.2s ease;
}

.crm-lead-pipeline-stage:hover {
    transform: translateY(-2px);
}

.crm-lead-pipeline-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    border: 4px solid var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--black-alpha-8);
    position: relative;
}

.crm-lead-pipeline-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
}

.crm-lead-pipeline-dot .mud-icon-root {
    font-size: 1.25rem;
    color: var(--mud-palette-text-disabled);
    transition: all 0.3s ease;
}

.crm-lead-pipeline-stage:hover .crm-lead-pipeline-dot {
    border-color: var(--purple-soft);
    box-shadow: 0 4px 12px var(--indigo-alpha-20);
}

.crm-lead-pipeline-stage:hover .crm-lead-pipeline-dot .mud-icon-root {
    color: var(--indigo);
}

.crm-lead-pipeline-stage.passed .crm-lead-pipeline-dot {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-color: var(--success);
    box-shadow: 0 4px 12px var(--success-alpha-30);
}

.crm-lead-pipeline-stage.passed .crm-lead-pipeline-dot .mud-icon-root {
    color: white;
}

.crm-lead-pipeline-stage.active .crm-lead-pipeline-dot {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-color: var(--indigo);
    box-shadow: 0 4px 16px var(--indigo-alpha-40);
    animation: crm-pipeline-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.crm-lead-pipeline-stage.active .crm-lead-pipeline-dot::before {
    animation: crm-pipeline-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    border: 2px solid var(--indigo);
}

.crm-lead-pipeline-stage.active .crm-lead-pipeline-dot .mud-icon-root {
    color: white;
}

.crm-lead-pipeline-stage.converted .crm-lead-pipeline-dot {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-color: var(--success);
    box-shadow: 0 4px 16px var(--success-alpha-40);
}

.crm-lead-pipeline-stage.converted .crm-lead-pipeline-dot .mud-icon-root {
    color: white;
}

/* Qualified Ready - shows green check when lead is Qualified and ready for conversion */
.crm-lead-pipeline-stage.qualified-ready .crm-lead-pipeline-dot {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-color: var(--success);
    box-shadow: 0 4px 16px var(--success-alpha-40);
    animation: crm-pipeline-pulse-green 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.crm-lead-pipeline-stage.qualified-ready .crm-lead-pipeline-dot::before {
    animation: crm-pipeline-ring-green 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    border: 2px solid var(--success);
}

.crm-lead-pipeline-stage.qualified-ready .crm-lead-pipeline-dot .mud-icon-root {
    color: white;
}

.crm-lead-pipeline-stage.qualified-ready .crm-lead-pipeline-label {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success);
    font-weight: 600;
    border-color: var(--success-alpha-30);
}

.crm-lead-pipeline-stage.qualified-active .crm-lead-pipeline-dot .mud-icon-root {
    color: white;
}

.crm-lead-pipeline-stage.qualified-active .crm-lead-pipeline-label {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success-dark);
    font-weight: 600;
    border-color: var(--success-alpha-30);
    box-shadow: 0 2px 8px var(--success-alpha-20);
}

@keyframes crm-pipeline-pulse-green {

    0%,
    100% {
        box-shadow: 0 4px 16px var(--success-alpha-40);
    }

    50% {
        box-shadow: 0 4px 24px rgba(16, 185, 129, 0.6), 0 0 0 8px var(--success-alpha-10);
    }
}

@keyframes crm-pipeline-ring-green {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.crm-lead-pipeline-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    text-align: center;
    padding: 0.375rem 0.75rem;
    background: var(--mud-palette-surface);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.crm-lead-pipeline-stage:hover .crm-lead-pipeline-label {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.crm-lead-pipeline-stage.active .crm-lead-pipeline-label {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--violet-alpha-15) 100%);
    color: var(--indigo);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--indigo-alpha-20);
}

.crm-lead-pipeline-stage.passed .crm-lead-pipeline-label {
    background: var(--success-alpha-10);
    color: var(--success);
    font-weight: 500;
}

.crm-lead-pipeline-stage.converted .crm-lead-pipeline-label {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success-dark);
    font-weight: 600;
}

.crm-lead-pipeline-description {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
    text-align: center;
    max-width: 100px;
    line-height: 1.4;
}

.crm-lead-pipeline-stage.active .crm-lead-pipeline-description {
    color: var(--mud-palette-text-secondary);
}

/* Pipeline Animation Keyframes */
@keyframes crm-pipeline-pulse {

    0%,
    100% {
        box-shadow: 0 4px 16px var(--indigo-alpha-40);
    }

    50% {
        box-shadow: 0 4px 24px rgba(99, 102, 241, 0.6), 0 0 0 8px var(--indigo-alpha-10);
    }
}

@keyframes crm-pipeline-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Lead Score Progress */
.crm-lead-score-bar-container {
    width: 100%;
    height: 8px;
    background: var(--mud-palette-lines-default);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.crm-lead-score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;

}

.crm-lead-score-bar-fill.score-cold {
    background: linear-gradient(90deg, var(--gray-500) 0%, var(--gray-400) 100%);
}

.crm-lead-score-bar-fill.score-warm {
    background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%);
}

.crm-lead-score-bar-fill.score-hot {
    background: linear-gradient(90deg, var(--error) 0%, #f87171 100%);
}

/* Lead Timeline Details */
.crm-lead-timeline-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.crm-lead-timeline-card {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1.25rem;
}

.crm-lead-timeline-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 1rem;
}

.crm-lead-timeline-header .mud-icon-root {
    font-size: 1.125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-timeline-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-lead-timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-lead-timeline-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-timeline-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.crm-lead-timeline-value.highlight {
    color: var(--indigo);
}

/* Lead Score Progress */
.crm-lead-score-progress {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-lead-score-progress-bar {
    width: 100%;
    height: 12px;
    background: var(--mud-palette-lines-default);
    border-radius: 6px;
    overflow: hidden;
}

.crm-lead-score-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.crm-lead-score-progress-fill.score-cold {
    background: linear-gradient(90deg, var(--gray-500) 0%, var(--gray-400) 100%);
}

.crm-lead-score-progress-fill.score-warm {
    background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%);
}

.crm-lead-score-progress-fill.score-hot {
    background: linear-gradient(90deg, var(--error) 0%, #f87171 100%);
}

.crm-lead-score-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
}

.crm-lead-score-legend .cold {
    color: var(--gray-500);
}

.crm-lead-score-legend .warm {
    color: var(--warning);
}

.crm-lead-score-legend .hot {
    color: var(--error);
}

/* Lead Activities Timeline */
.crm-lead-activities-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm-lead-activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.crm-lead-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-lead-activity-icon.activity-call {
    background: var(--info-alpha-15);
}

.crm-lead-activity-icon.activity-call .mud-icon-root {
    color: var(--info);
}

.crm-lead-activity-icon.activity-email {
    background: var(--success-alpha-15);
}

.crm-lead-activity-icon.activity-email .mud-icon-root {
    color: var(--success);
}

.crm-lead-activity-icon.activity-meeting {
    background: var(--violet-alpha-15);
}

.crm-lead-activity-icon.activity-meeting .mud-icon-root {
    color: var(--violet);
}

.crm-lead-activity-icon.activity-note {
    background: var(--warning-alpha-15);
}

.crm-lead-activity-icon.activity-note .mud-icon-root {
    color: var(--warning);
}

.crm-lead-activity-icon.activity-default {
    background: rgba(107, 114, 128, 0.15);
}

.crm-lead-activity-icon.activity-default .mud-icon-root {
    color: var(--gray-500);
}

.crm-lead-activity-content {
    flex: 1;
    min-width: 0;
}

.crm-lead-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.crm-lead-activity-title {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-lead-activity-date {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.crm-lead-activity-description {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.crm-lead-activity-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.crm-lead-activity-type {
    padding: 0.125rem 0.5rem;
    background: var(--mud-palette-lines-default);
    border-radius: 4px;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-activity-user {
    color: var(--mud-palette-text-disabled);
}

/* Lead Tasks List */
.crm-lead-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.crm-lead-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
    transition: all 0.15s ease;
}

.crm-lead-task-item:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-lead-task-item.completed {
    opacity: 0.6;
}

.crm-lead-task-item.completed .crm-lead-task-title {
    text-decoration: line-through;
}

.crm-lead-task-item.overdue {
    border-left: 3px solid var(--error);
}

.crm-task-checkbox {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.crm-lead-task-checkbox .mud-icon-root {
    font-size: 1.25rem;
    color: var(--mud-palette-text-disabled);
}

.task-item.completed .crm-task-checkbox .mud-icon-root {
    color: var(--success);
}

.crm-lead-task-content {
    flex: 1;
    min-width: 0;
}

.crm-lead-task-title {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.crm-lead-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.crm-lead-task-due {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-task-due.overdue {
    color: var(--error);
}

.crm-lead-task-due .mud-icon-root {
    font-size: 0.875rem;
}

.crm-lead-task-priority {
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.crm-lead-task-priority.high {
    background: var(--error-alpha-15);
    color: var(--error);
}

.crm-lead-task-priority.medium {
    background: var(--warning-alpha-15);
    color: var(--warning);
}

.crm-lead-task-priority.low {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-500);
}

.crm-lead-task-assignee {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-task-assignee .mud-icon-root {
    font-size: 0.875rem;
}

.crm-task-actions {
    display: flex;
    gap: 0.25rem;
}

.crm-task-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.crm-lead-task-action-btn:hover {
    background: var(--mud-palette-surface);
}

.crm-lead-task-action-btn .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
}

.crm-lead-task-action-btn.delete:hover {
    background: var(--error-alpha-15);
}

.crm-lead-task-action-btn.delete:hover .mud-icon-root {
    color: var(--error);
}

/* Lead Task Summary */
.crm-lead-task-summary {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.crm-lead-task-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.75rem;
    background: var(--mud-palette-surface);
    border-radius: 8px;
}

.crm-lead-task-summary-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.crm-lead-task-summary-item.completed .crm-lead-task-summary-count {
    color: var(--success);
}

.crm-lead-task-summary-item.overdue .crm-lead-task-summary-count {
    color: var(--error);
}

.crm-lead-task-summary-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Lead Empty State */
.crm-lead-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.crm-lead-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--indigo-alpha-10) 0%, var(--violet-alpha-10) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.crm-lead-empty-icon .mud-icon-root {
    font-size: 2rem;
    color: var(--indigo);
}

.crm-lead-empty-state h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.crm-lead-empty-state p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 1.25rem;
}

.crm-lead-empty-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-lead-empty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
}

/* Lead Not Found */
.crm-lead-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.crm-lead-not-found-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--error-alpha-10) 0%, rgba(220, 38, 38, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.crm-lead-not-found-icon .mud-icon-root {
    font-size: 2.5rem;
    color: var(--error);
}

.crm-lead-not-found h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.crm-lead-not-found p {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 1.5rem;
}

/* ==========================================================================
   CRM OPPORTUNITY STYLES (crm-opp prefix)
   ========================================================================== */

/* Opportunity Pipeline Summary Cards */
.crm-opp-pipeline-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crm-opp-summary-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
}

.crm-opp-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--black-alpha-8);
}

.crm-opp-summary-card.qualification .crm-opp-summary-icon {
    background: linear-gradient(135deg, #818cf8 0%, var(--indigo) 100%);
}

.crm-opp-summary-card.proposal .crm-opp-summary-icon {
    background: linear-gradient(135deg, var(--info-light) 0%, var(--info) 100%);
}

.crm-opp-summary-card.negotiation .crm-opp-summary-icon {
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--warning) 100%);
}

.crm-opp-summary-card.won .crm-opp-summary-icon {
    background: linear-gradient(135deg, var(--success-pale) 0%, var(--success) 100%);
}

.crm-opp-summary-card.total-pipeline .crm-opp-summary-icon {
    background: linear-gradient(135deg, var(--violet-light) 0%, var(--violet) 100%);
}

.crm-opp-summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-opp-summary-icon .mud-icon-root {
    color: white;
    font-size: 1.25rem;
}

.crm-opp-summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-opp-summary-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.crm-opp-summary-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-summary-value {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
}

/* Opportunity Card Styles */
.crm-opp-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-opp-card:hover {
    border-color: var(--indigo);
    box-shadow: 0 4px 16px var(--indigo-alpha-12);
    transform: translateY(-2px);
}

.crm-opp-card.stage-qualification {
    border-left: 4px solid var(--indigo);
}

.crm-opp-card.stage-proposal {
    border-left: 4px solid var(--info);
}

.crm-opp-card.stage-negotiation {
    border-left: 4px solid var(--warning);
}

.crm-opp-card.stage-won {
    border-left: 4px solid var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(5, 150, 105, 0.03) 100%);
}

.crm-opp-card.stage-lost {
    border-left: 4px solid var(--error);
    opacity: 0.7;
}

.crm-opp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.crm-opp-card-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.crm-opp-stage-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    flex-shrink: 0;
}

.crm-opp-stage-badge.stage-qualification {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--violet-alpha-15) 100%);
    color: var(--indigo);
}

.crm-opp-stage-badge.stage-proposal {
    background: linear-gradient(135deg, var(--info-alpha-15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: var(--info);
}

.crm-opp-stage-badge.stage-negotiation {
    background: linear-gradient(135deg, var(--warning-alpha-15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--warning);
}

.crm-opp-stage-badge.stage-won {
    background: linear-gradient(135deg, var(--success-alpha-15) 0%, var(--success-dark-alpha-15) 100%);
    color: var(--success);
}

.crm-opp-stage-badge.stage-lost {
    background: linear-gradient(135deg, var(--error-alpha-15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: var(--error);
}

.crm-opp-stage-badge.large {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
}

.crm-opp-stage-badge.small {
    padding: 0.1875rem 0.5rem;
    font-size: 0.625rem;
}

.crm-opp-lead-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-lead-info .mud-icon-root {
    font-size: 0.875rem;
}

.crm-opp-card-value {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.crm-opp-card-value .crm-opp-value-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.crm-opp-card-value .crm-opp-probability-container {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
}

.crm-opp-card-value .crm-opp-probability-bar {
    flex: 1;
    min-width: 0;
    height: 6px;
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
    overflow: hidden;
}

.crm-opp-card-value .crm-opp-probability-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--indigo) 0%, var(--violet) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.crm-opp-card-value .crm-opp-probability-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--indigo);
    min-width: 40px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.crm-opp-probability-mini {
    width: 60px;
    height: 6px;
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
    overflow: hidden;
}

.crm-opp-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.crm-opp-detail {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-detail .mud-icon-root {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.crm-opp-detail .overdue {
    color: var(--error);
}

.crm-opp-card-description {
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
    line-height: 1.4;
}

.crm-opp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin-top: auto;
}

.crm-opp-weighted-value {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-card-actions {
    display: flex;
    gap: 0.25rem;
}

.crm-opp-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.crm-opp-action-btn:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-opp-action-btn .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-action-btn.win:hover {
    background: var(--success-alpha-15);
}

.crm-opp-action-btn.win:hover .mud-icon-root {
    color: var(--success);
}

.crm-opp-action-btn.lose:hover {
    background: var(--error-alpha-15);
}

.crm-opp-action-btn.lose:hover .mud-icon-root {
    color: var(--error);
}

.crm-opp-action-btn.edit:hover .mud-icon-root {
    color: var(--indigo);
}

.crm-opp-action-btn.delete:hover {
    background: var(--error-alpha-15);
}

.crm-opp-action-btn.delete:hover .mud-icon-root {
    color: var(--error);
}

/* Opportunity Table Styles */
.crm-opp-table {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow-x: auto;
}

.crm-opp-table-header {
    display: flex;
    padding: 0.875rem 1rem;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-opp-table-row {
    display: flex;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
    transition: background 0.15s ease;
    align-items: center;
}

.crm-opp-table-row:last-child {
    border-bottom: none;
}

.crm-opp-table-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-opp-table-row.selected {
    background: var(--indigo-alpha-8);
}

.crm-opp-table-row.stage-won {
    background: rgba(16, 185, 129, 0.05);
}

.crm-opp-table-row.stage-lost {
    opacity: 0.7;
}

.crm-opp-table-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.crm-opp-table-cell.checkbox {
    width: 40px;
    flex-shrink: 0;
}

.crm-opp-table-cell.title {
    flex: 2;
    min-width: 200px;
}

.crm-opp-table-cell.lead {
    flex: 1.5;
    min-width: 150px;
}

.crm-opp-table-cell.stage {
    width: 120px;
    flex-shrink: 0;
}

.crm-opp-table-cell.value {
    width: 100px;
    flex-shrink: 0;
}

.crm-opp-table-cell.probability {
    width: 100px;
    flex-shrink: 0;
}

.crm-opp-table-cell.close-date {
    width: 120px;
    flex-shrink: 0;
}

.crm-opp-table-cell.assigned {
    width: 120px;
    flex-shrink: 0;
}

.crm-opp-table-cell.actions {
    width: 140px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.crm-opp-table-title {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.crm-opp-table-title-primary {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-opp-table-title-secondary {
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-opp-table-lead {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-opp-table-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.625rem;
    color: white;
    flex-shrink: 0;
}

.crm-opp-avatar-pink {
    background: linear-gradient(135deg, #f472b6 0%, var(--pink) 100%);
}

.crm-opp-avatar-blue {
    background: linear-gradient(135deg, var(--info-light) 0%, var(--info) 100%);
}

.crm-opp-avatar-green {
    background: linear-gradient(135deg, var(--success-pale) 0%, var(--success) 100%);
}

.crm-opp-avatar-purple {
    background: linear-gradient(135deg, var(--violet-light) 0%, var(--violet) 100%);
}

.crm-opp-avatar-orange {
    background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%);
}

.crm-opp-avatar-teal {
    background: linear-gradient(135deg, #2dd4bf 0%, var(--teal) 100%);
}

.crm-opp-value {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.overdue {
    color: var(--error) !important;
}

/* Kanban View */
.crm-opp-kanban {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.crm-opp-kanban-column {
    flex: 0 0 280px;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 400px);
}

.crm-opp-kanban-column.stage-qualification {
    border-top: 3px solid var(--indigo);
}

.crm-opp-kanban-column.stage-proposal {
    border-top: 3px solid var(--info);
}

.crm-opp-kanban-column.stage-negotiation {
    border-top: 3px solid var(--warning);
}

.crm-opp-kanban-column.stage-won {
    border-top: 3px solid var(--success);
}

.crm-opp-kanban-column.stage-lost {
    border-top: 3px solid var(--error);
}

.crm-opp-kanban-header {
    padding: 1rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.crm-opp-kanban-title {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    flex: 1;
}

.crm-opp-kanban-count {
    padding: 0.125rem 0.5rem;
    background: var(--mud-palette-surface);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-kanban-value {
    width: 100%;
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
}

.crm-opp-kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-opp-kanban-card {
    background: var(--mud-palette-surface);
    border-radius: 8px;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-opp-kanban-card:hover {
    box-shadow: 0 2px 8px var(--black-alpha-10);
    transform: translateY(-1px);
}

.crm-opp-kanban-card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.crm-opp-kanban-card-lead {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.5rem;
}

.crm-opp-kanban-card-lead .mud-icon-root {
    font-size: 0.875rem;
}

.crm-opp-kanban-card-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.5rem;
}

.crm-opp-kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
}

.crm-opp-kanban-card-close {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.crm-opp-kanban-card-close .mud-icon-root {
    font-size: 0.75rem;
}

.crm-opp-kanban-card-close.overdue {
    color: var(--error);
}

.crm-opp-kanban-card-probability {
    font-weight: 600;
}

/* Opportunity Detail View Styles */
.crm-opp-skeleton-container,
.crm-opp-back-card,
.crm-opp-profile-card,
.crm-opp-detail-tabs,
.crm-opp-content-card {
    /* Same patterns as lead styles */
}

.crm-opp-back-card {
    margin-bottom: 1rem;
}

.crm-opp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-opp-back-btn:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-text-secondary);
}

.crm-opp-back-btn .mud-icon-root {
    font-size: 1.25rem;
}

/* Opportunity Profile Card */
.crm-opp-profile-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
    margin-bottom: 1rem;
}

.crm-opp-profile-card.stage-qualification {
    border-left: 4px solid var(--indigo);
}

.crm-opp-profile-card.stage-proposal {
    border-left: 4px solid var(--info);
}

.crm-opp-profile-card.stage-negotiation {
    border-left: 4px solid var(--warning);
}

.crm-opp-profile-card.stage-won {
    border-left: 4px solid var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(5, 150, 105, 0.03) 100%);
}

.crm-opp-profile-card.stage-lost {
    border-left: 4px solid var(--error);
}

.crm-opp-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.crm-opp-profile-info {
    flex: 1;
}

.crm-opp-profile-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.5rem;
}

.crm-opp-profile-lead,
.crm-opp-profile-owner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.25rem;
}

.crm-opp-profile-lead .mud-icon-root,
.crm-opp-profile-owner .mud-icon-root {
    font-size: 1rem;
}

.crm-opp-profile-stage {
    flex-shrink: 0;
}

.crm-opp-profile-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
}

.crm-opp-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.crm-opp-stat-item.primary .crm-opp-stat-value {
    font-size: 1.5rem;
    color: var(--indigo);
}

.crm-opp-stat-item.overdue .crm-opp-stat-value {
    color: var(--error);
}

.crm-opp-stat-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-opp-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* Opportunity Probability Display */
.crm-opp-probability-display {
    display: flex;
    align-items: center;
}

.crm-opp-probability-circle {
    position: relative;
    width: 60px;
    height: 60px;
}

.crm-opp-probability-circle svg {
    transform: rotate(-90deg);
}

.crm-opp-probability-bg {
    fill: none;
    stroke: var(--mud-palette-lines-default);
    stroke-width: 3;
}

.crm-opp-probability-fill {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.crm-opp-probability-fill.stage-qualification {
    stroke: var(--indigo);
}

.crm-opp-probability-fill.stage-proposal {
    stroke: var(--info);
}

.crm-opp-probability-fill.stage-negotiation {
    stroke: var(--warning);
}

.crm-opp-probability-fill.stage-won {
    stroke: var(--success);
}

.crm-opp-probability-fill.stage-lost {
    stroke: var(--error);
}

.crm-opp-probability-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.crm-opp-profile-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.crm-opp-win-btn,
.crm-opp-lose-btn,
.crm-opp-edit-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.crm-opp-win-btn {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
}

.crm-opp-win-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--success-alpha-30);
}

.crm-opp-lose-btn {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    color: white;
}

.crm-opp-lose-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.crm-opp-edit-btn {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.crm-opp-edit-btn:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-text-secondary);
}

/* Opportunity Detail Tabs */
.crm-opp-detail-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.crm-opp-detail-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.crm-opp-detail-tab-btn:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-opp-detail-tab-btn.active {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-color: transparent;
    color: white;
}

.crm-opp-detail-tab-btn .mud-icon-root {
    font-size: 1rem;
}

/* Opportunity Content Card */
.crm-opp-content-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-opp-content-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-opp-section-edit-btn,
.crm-opp-add-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-opp-section-edit-btn:hover,
.crm-opp-add-btn:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-text-secondary);
}

.crm-opp-add-btn {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-color: transparent;
    color: white;
}

.crm-opp-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
}

/* Opportunity Info Grid */
.crm-opp-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crm-opp-info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.crm-opp-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-opp-info-icon.blue {
    background: var(--info-alpha-15);
}

.crm-opp-info-icon.blue .mud-icon-root {
    color: var(--info);
}

.crm-opp-info-icon.purple {
    background: var(--violet-alpha-15);
}

.crm-opp-info-icon.purple .mud-icon-root {
    color: var(--violet);
}

.crm-opp-info-icon.green {
    background: var(--success-alpha-15);
}

.crm-opp-info-icon.green .mud-icon-root {
    color: var(--success);
}

.crm-opp-info-icon.orange {
    background: var(--orange-alpha-15);
}

.crm-opp-info-icon.orange .mud-icon-root {
    color: var(--orange);
}

.crm-opp-info-icon.pink {
    background: var(--pink-alpha-15);
}

.crm-opp-info-icon.pink .mud-icon-root {
    color: var(--pink);
}

.crm-opp-info-icon.teal {
    background: rgba(20, 184, 166, 0.15);
}

.crm-opp-info-icon.teal .mud-icon-root {
    color: var(--teal);
}

.crm-opp-info-icon .mud-icon-root {
    font-size: 1.125rem;
}

.crm-opp-info-content {
    flex: 1;
    min-width: 0;
}

.crm-opp-info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.25rem;
}

.crm-opp-info-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    word-break: break-word;
}

.crm-opp-info-value.highlight {
    color: var(--indigo);
    font-size: 1.125rem;
}

.crm-opp-link {
    color: var(--indigo);
    text-decoration: none;
}

.crm-opp-link:hover {
    text-decoration: underline;
}

/* Opportunity Result Section */
.crm-opp-result-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 12px;
}

.crm-opp-result-section.won {
    background: linear-gradient(135deg, var(--success-alpha-10) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid var(--success-alpha-20);
}

.crm-opp-result-section.lost {
    background: linear-gradient(135deg, var(--error-alpha-10) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.crm-opp-result-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.crm-opp-result-section.won .crm-opp-result-title {
    color: var(--success-dark);
}

.crm-opp-result-section.lost .crm-opp-result-title {
    color: var(--error-dark);
}

.crm-opp-result-title .mud-icon-root {
    font-size: 1.25rem;
}

.crm-opp-result-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.crm-opp-result-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.crm-opp-result-item.full-width {
    width: 100%;
}

.crm-opp-result-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-result-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

/* Opportunity Description Section */
.crm-opp-description-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.crm-opp-description-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.75rem;
}

.crm-opp-description-title .mud-icon-root {
    font-size: 1.125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-description-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--mud-palette-text-secondary);
}

/* Opportunity Pipeline - Enhanced Sales Pipeline Design */
.crm-opp-pipeline-container {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    position: relative;
    background: linear-gradient(135deg, var(--mud-palette-background-grey) 0%, var(--mud-palette-surface) 100%);
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
}

/* Background decorative pattern */
.crm-opp-pipeline-container::before {
    content: '';
    position: absolute;
    top: calc(2rem + 28px);
    left: 8%;
    right: 8%;
    height: 6px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 0%, var(--mud-palette-lines-default) 100%);
    border-radius: 3px;
    z-index: 0;
}

/* Animated progress indicator */
.crm-opp-pipeline-container::after {
    content: '';
    position: absolute;
    top: calc(2rem + 28px);
    left: 8%;
    height: 6px;
    background: linear-gradient(90deg, var(--indigo) 0%, var(--violet) 50%, var(--violet-light) 100%);
    border-radius: 3px;
    z-index: 1;
    width: var(--opp-pipeline-progress, 0%);
    max-width: 84%;
    /* Constrain max width to prevent overflow */
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px var(--indigo-alpha-40);
}

/* Won state - green progress line */
.crm-opp-pipeline-container.stage-won::after {
    background: linear-gradient(90deg, var(--success) 0%, var(--success-pale) 50%, #6ee7b7 100%);
    box-shadow: 0 0 12px var(--success-alpha-40);
}

/* Lost state - hide progress line or show red */
.crm-opp-pipeline-container.stage-lost::after {
    background: linear-gradient(90deg, var(--error) 0%, #f87171 50%, #fca5a5 100%);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.crm-opp-pipeline-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    position: relative;
    z-index: 2;
    padding: 0 0.5rem;
    transition: transform 0.2s ease;
}

.crm-opp-pipeline-stage:hover {
    transform: translateY(-3px);
}

.crm-opp-pipeline-dot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    border: 4px solid var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--black-alpha-8);
    position: relative;
}

.crm-opp-pipeline-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
}

.crm-opp-pipeline-dot .mud-icon-root {
    font-size: 1.375rem;
    color: var(--mud-palette-text-disabled);
    transition: all 0.3s ease;
}

/* Hover state */
.crm-opp-pipeline-stage:hover .crm-opp-pipeline-dot {
    border-color: var(--purple-soft);
    box-shadow: 0 6px 20px var(--indigo-alpha-25);
    transform: scale(1.05);
}

.crm-opp-pipeline-stage:hover .crm-opp-pipeline-dot .mud-icon-root {
    color: var(--indigo);
}

/* Stage colors based on pipeline position */
.crm-opp-pipeline-stage[data-stage="qualification"]:hover .crm-opp-pipeline-dot {
    border-color: #818cf8;
}

.crm-opp-pipeline-stage[data-stage="proposal"]:hover .crm-opp-pipeline-dot {
    border-color: var(--info-light);
}

.crm-opp-pipeline-stage[data-stage="negotiation"]:hover .crm-opp-pipeline-dot {
    border-color: var(--warning-light);
}

/* Passed stages */
.crm-opp-pipeline-stage.passed .crm-opp-pipeline-dot,
.crm-opp-pipeline-stage.won .crm-opp-pipeline-dot {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-color: var(--success);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.crm-opp-pipeline-stage.passed .crm-opp-pipeline-dot .mud-icon-root,
.crm-opp-pipeline-stage.won .crm-opp-pipeline-dot .mud-icon-root {
    color: white;
}

/* Active stage with animation */
.crm-opp-pipeline-stage.active .crm-opp-pipeline-dot {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border-color: var(--indigo);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    animation: crm-opp-pipeline-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.crm-opp-pipeline-stage.active .crm-opp-pipeline-dot::before {
    animation: crm-opp-pipeline-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    border: 2px solid var(--indigo);
}

.crm-opp-pipeline-stage.active .crm-opp-pipeline-dot .mud-icon-root {
    color: white;
}

/* Lost stage */
.crm-opp-pipeline-stage.lost .crm-opp-pipeline-dot {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    border-color: var(--error);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.crm-opp-pipeline-stage.lost .crm-opp-pipeline-dot .mud-icon-root {
    color: white;
}

/* Pipeline labels with pill design */
.crm-opp-pipeline-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    text-align: center;
    padding: 0.5rem 1rem;
    background: var(--mud-palette-surface);
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 90px;
    border: 1px solid transparent;
}

.crm-opp-pipeline-stage:hover .crm-opp-pipeline-label {
    background: var(--indigo-alpha-8);
    border-color: var(--indigo-alpha-20);
    color: var(--indigo);
}

.crm-opp-pipeline-stage.active .crm-opp-pipeline-label {
    background: linear-gradient(135deg, var(--indigo-alpha-15) 0%, var(--violet-alpha-15) 100%);
    color: var(--indigo);
    font-weight: 600;
    border-color: var(--indigo-alpha-30);
    box-shadow: 0 2px 8px var(--indigo-alpha-15);
}

.crm-opp-pipeline-stage.passed .crm-opp-pipeline-label,
.crm-opp-pipeline-stage.won .crm-opp-pipeline-label {
    background: var(--success-alpha-10);
    color: var(--success);
    font-weight: 500;
    border-color: var(--success-alpha-20);
}

.crm-opp-pipeline-stage.lost .crm-opp-pipeline-label {
    background: var(--error-alpha-10);
    color: var(--error);
    font-weight: 500;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Pipeline Stage Value Indicator */
.crm-opp-pipeline-value {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
    text-align: center;
    margin-top: -0.25rem;
}

.crm-opp-pipeline-stage.active .crm-opp-pipeline-value {
    color: var(--violet);
    font-weight: 500;
}

/* Deal Pipeline Animation Keyframes */
@keyframes crm-opp-pipeline-pulse {

    0%,
    100% {
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    }

    50% {
        box-shadow: 0 6px 28px rgba(99, 102, 241, 0.65), 0 0 0 10px var(--indigo-alpha-10);
    }
}

@keyframes crm-opp-pipeline-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Opportunity Stage Details */
.crm-opp-stage-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.crm-opp-stage-detail-card {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1.25rem;
}

.crm-opp-stage-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 1rem;
}

.crm-opp-stage-detail-header .mud-icon-root {
    font-size: 1.125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-probability-bar-container {
    width: 100%;
    height: 8px;
    background: var(--mud-palette-lines-default);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.crm-opp-probability-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.crm-opp-probability-bar-fill.stage-qualification {
    background: linear-gradient(90deg, var(--indigo) 0%, var(--violet) 100%);
}

.crm-opp-probability-bar-fill.stage-proposal {
    background: linear-gradient(90deg, var(--info) 0%, var(--info-light) 100%);
}

.crm-opp-probability-bar-fill.stage-negotiation {
    background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%);
}

.crm-opp-probability-bar-fill.stage-won {
    background: linear-gradient(90deg, var(--success) 0%, var(--success-pale) 100%);
}

.crm-opp-probability-bar-fill.stage-lost {
    background: linear-gradient(90deg, var(--error) 0%, #f87171 100%);
}

.crm-opp-probability-info {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-forecast-values {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-opp-forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-opp-forecast-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-forecast-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-opp-forecast-value.weighted {
    color: var(--indigo);
}

.crm-opp-timeline-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-opp-timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-opp-timeline-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-timeline-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

/* Opportunity Lead Card */
.crm-opp-lead-card {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.crm-opp-lead-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.crm-opp-lead-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: white;
    flex-shrink: 0;
}

.crm-opp-lead-info {
    flex: 1;
}

.crm-opp-lead-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    display: block;
}

.crm-opp-lead-title {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

/* Opportunity Activities and Tasks (same structure as leads) */
.crm-opp-activities-timeline,
.crm-opp-tasks-list,
.crm-opp-task-summary,
.crm-opp-empty-state,
.crm-opp-not-found {
    /* Use the same styles as lead equivalents */
}

.crm-opp-activities-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm-opp-activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.crm-opp-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-opp-activity-icon.activity-call {
    background: var(--info-alpha-15);
}

.crm-opp-activity-icon.activity-call .mud-icon-root {
    color: var(--info);
}

.crm-opp-activity-icon.activity-email {
    background: var(--success-alpha-15);
}

.crm-opp-activity-icon.activity-email .mud-icon-root {
    color: var(--success);
}

.crm-opp-activity-icon.activity-meeting {
    background: var(--violet-alpha-15);
}

.crm-opp-activity-icon.activity-meeting .mud-icon-root {
    color: var(--violet);
}

.crm-opp-activity-icon.activity-note {
    background: var(--warning-alpha-15);
}

.crm-opp-activity-icon.activity-note .mud-icon-root {
    color: var(--warning);
}

.crm-opp-activity-icon.activity-default {
    background: rgba(107, 114, 128, 0.15);
}

.crm-opp-activity-icon.activity-default .mud-icon-root {
    color: var(--gray-500);
}

.crm-opp-activity-content {
    flex: 1;
    min-width: 0;
}

.crm-opp-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.crm-opp-activity-title {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-opp-activity-date {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.crm-opp-activity-description {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.crm-opp-activity-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.crm-opp-activity-type {
    padding: 0.125rem 0.5rem;
    background: var(--mud-palette-lines-default);
    border-radius: 4px;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-activity-user {
    color: var(--mud-palette-text-disabled);
}

/* Opportunity Tasks */
.crm-opp-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.crm-opp-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
    transition: all 0.15s ease;
}

.crm-opp-task-item:hover {
    background: var(--mud-palette-action-default-hover);
}

.crm-opp-task-item.completed {
    opacity: 0.6;
}

.crm-opp-task-item.completed .crm-opp-task-title {
    text-decoration: line-through;
}

.crm-opp-task-item.overdue {
    border-left: 3px solid var(--error);
}

.crm-opp-task-checkbox {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.crm-opp-task-checkbox .mud-icon-root {
    font-size: 1.25rem;
    color: var(--mud-palette-text-disabled);
}

.crm-opp-task-item.completed .crm-opp-task-checkbox .mud-icon-root {
    color: var(--success);
}

.crm-opp-task-content {
    flex: 1;
    min-width: 0;
}

.crm-opp-task-title {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.crm-opp-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.crm-opp-task-due {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-task-due.overdue {
    color: var(--error);
}

.crm-opp-task-due .mud-icon-root {
    font-size: 0.875rem;
}

.crm-opp-task-priority {
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.crm-opp-task-priority.high {
    background: var(--error-alpha-15);
    color: var(--error);
}

.crm-opp-task-priority.medium {
    background: var(--warning-alpha-15);
    color: var(--warning);
}

.crm-opp-task-priority.low {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-500);
}

.crm-opp-task-assignee {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-task-assignee .mud-icon-root {
    font-size: 0.875rem;
}

.crm-opp-task-actions {
    display: flex;
    gap: 0.25rem;
}

.crm-opp-task-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.crm-opp-task-action-btn:hover {
    background: var(--mud-palette-surface);
}

.crm-opp-task-action-btn .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-task-action-btn.delete:hover {
    background: var(--error-alpha-15);
}

.crm-opp-task-action-btn.delete:hover .mud-icon-root {
    color: var(--error);
}

/* Opportunity Task Summary */
.crm-opp-task-summary {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.crm-opp-task-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.75rem;
    background: var(--mud-palette-surface);
    border-radius: 8px;
}

.crm-opp-task-summary-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.crm-opp-task-summary-item.completed .crm-opp-task-summary-count {
    color: var(--success);
}

.crm-opp-task-summary-item.overdue .crm-opp-task-summary-count {
    color: var(--error);
}

.crm-opp-task-summary-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Opportunity Empty State */
.crm-opp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.crm-opp-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--indigo-alpha-10) 0%, var(--violet-alpha-10) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.crm-opp-empty-icon .mud-icon-root {
    font-size: 2rem;
    color: var(--indigo);
}

.crm-opp-empty-state h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.crm-opp-empty-state p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 1.25rem;
}

.crm-opp-empty-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-opp-empty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--indigo-alpha-30);
}

/* Opportunity Not Found */
.crm-opp-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.crm-opp-not-found-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--error-alpha-10) 0%, rgba(220, 38, 38, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.crm-opp-not-found-icon .mud-icon-root {
    font-size: 2.5rem;
    color: var(--error);
}

.crm-opp-not-found h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.5rem;
}

.crm-opp-not-found p {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 1.5rem;
}

/* ==========================================================================
   SKELETON LOADING ANIMATIONS - Enhanced Loading States
   ========================================================================== */

/* Base Skeleton Animation */
@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-wave {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Lead Skeleton Loading Styles */
.crm-lead-skeleton-container {
    padding: 1.5rem;
}

.crm-lead-skeleton-back {
    height: 44px;
    width: 160px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.crm-lead-skeleton-profile {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    overflow: hidden;
    position: relative;
}

.crm-lead-skeleton-profile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: skeleton-wave 2s infinite;
}

.crm-lead-skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    flex-shrink: 0;
}

.crm-lead-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-lead-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

.crm-lead-skeleton-line.w-60 {
    width: 60%;
}

.crm-lead-skeleton-line.w-40 {
    width: 40%;
}

.crm-lead-skeleton-line.w-30 {
    width: 30%;
}

.crm-lead-skeleton-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.crm-lead-skeleton-tab {
    height: 44px;
    flex: 1;
    max-width: 120px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

.crm-lead-skeleton-content {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-lead-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.crm-lead-skeleton-card {
    height: 100px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 10px;
}

/* Opportunity Skeleton Loading Styles */
.crm-opp-skeleton-container {
    padding: 1.5rem;
}

.crm-opp-skeleton-back {
    height: 44px;
    width: 160px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.crm-opp-skeleton-profile {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    overflow: hidden;
    position: relative;
}

.crm-opp-skeleton-profile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: skeleton-wave 2s infinite;
}

.crm-opp-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-opp-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

.crm-opp-skeleton-line.w-60 {
    width: 60%;
}

.crm-opp-skeleton-line.w-40 {
    width: 40%;
}

.crm-opp-skeleton-line.w-30 {
    width: 30%;
}

.crm-opp-skeleton-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.crm-opp-skeleton-tab {
    height: 44px;
    flex: 1;
    max-width: 120px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

.crm-opp-skeleton-content {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-opp-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.crm-opp-skeleton-card {
    height: 100px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 10px;
}

/* Full Page Loading Overlay for Deals Tab */
.crm-deals-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
}

.crm-deals-loading-spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    position: relative;
    animation: crm-deals-spinner-rotate 1s linear infinite;
}

.crm-deals-loading-spinner::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 50%;
    background: var(--mud-palette-surface);
}

.crm-deals-loading-spinner::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
}

.crm-deals-loading-text {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
    text-align: center;
}

.crm-deals-loading-text span {
    color: var(--indigo);
    font-weight: 600;
}

.crm-deals-loading-dots {
    display: flex;
    gap: 0.5rem;
}

.crm-deals-loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--indigo);
    animation: crm-deals-dots-bounce 1.4s infinite ease-in-out both;
}

.crm-deals-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.crm-deals-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.crm-deals-loading-dots span:nth-child(3) {
    animation-delay: 0;
}

@keyframes crm-deals-spinner-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes crm-deals-dots-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pipeline Loading Skeleton */
.crm-pipeline-skeleton {
    background: linear-gradient(135deg, var(--mud-palette-background-grey) 0%, var(--mud-palette-surface) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-pipeline-skeleton-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.crm-pipeline-skeleton-title {
    height: 24px;
    width: 200px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

.crm-pipeline-skeleton-stages {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.crm-pipeline-skeleton-stages::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: var(--mud-palette-lines-default);
    border-radius: 2px;
}

.crm-pipeline-skeleton-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.crm-pipeline-skeleton-dot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    position: relative;
    z-index: 1;
}

.crm-pipeline-skeleton-label {
    height: 36px;
    width: 80px;
    background: linear-gradient(90deg, var(--mud-palette-lines-default) 25%, var(--white-alpha-20) 50%, var(--mud-palette-lines-default) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Responsive Styles for CRM Lead and Opportunity */
@media (max-width: 1200px) {

    .crm-lead-pipeline-summary,
    .crm-opp-pipeline-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .crm-lead-pipeline-summary,
    .crm-opp-pipeline-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .crm-lead-profile-card,
    .crm-opp-profile-card {
        flex-direction: column;
    }

    .crm-lead-profile-stats,
    .crm-opp-profile-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .crm-lead-info-grid,
    .crm-opp-info-grid {
        grid-template-columns: 1fr;
    }

    .crm-opp-kanban {
        flex-direction: column;
    }

    .crm-opp-kanban-column {
        flex: none;
        width: 100%;
        max-height: none;
    }
}

.crm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--mud-palette-surface);
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
}

.crm-empty:hover {
    border-color: var(--mud-palette-primary);
}

/* ICONO con estilo moderno */
.crm-empty-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--mud-palette-primary-hover);
    color: var(--mud-palette-primary);
    font-size: 28px;
}

/* TEXTO */
.crm-empty-content h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-empty-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--mud-palette-text-secondary);
    max-width: 320px;
}

.crm-empty .mud-button {
    margin-top: 0.5rem;
}

/* =============================================
   HOBBIES TAB - HT STYLES (GROUPED VIEW)
   ============================================= */

.hobbies-tab {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hobbies-tab-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--mud-palette-text-secondary);
}

.hobbies-tab-grouped-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hobbies-tab-person-group {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.hobbies-tab-person-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.hobbies-tab-person-avatar {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%) !important;
    color: white !important;
    font-weight: 600;
}

.hobbies-tab-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.hobbies-tab-person-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.hobbies-tab-person-count {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.hobbies-tab-add-person-hobby {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.hobbies-tab-add-person-hobby:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.hobbies-tab-hobbies-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hobbies-tab-hobbies-list .family-member-hobby-card {
    background: var(--mud-palette-surface);
}

/* Members without hobbies section */
.hobbies-tab-no-hobbies-section {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px dashed var(--mud-palette-lines-default);
}

.hobbies-tab-no-hobbies-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hobbies-tab-no-hobbies-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hobbies-tab-no-hobby-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--mud-palette-background-grey);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hobbies-tab-no-hobby-member:hover {
    background: var(--mud-palette-primary-hover);
    color: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
}

.hobbies-tab-no-hobby-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
    background: linear-gradient(135deg, var(--text-disabled) 0%, var(--text-secondary) 100%) !important;
    color: white !important;
}

.hobbies-tab-add-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--mud-palette-primary);
}

.hobbies-tab-no-hobby-member:hover .hobbies-tab-add-icon {
    opacity: 1;
}

/* =============================================
   PETS TAB - PT STYLES (GROUPED VIEW)
   ============================================= */

.pets-tab {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pets-tab-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--mud-palette-text-secondary);
}

.pets-tab-grouped-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pets-tab-person-group {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.pets-tab-person-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.pets-tab-person-avatar {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%) !important;
    color: white !important;
    font-weight: 600;
}

.pets-tab-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pets-tab-person-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.pets-tab-person-count {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.pets-tab-add-person-pet {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px var(--success-alpha-30);
}

.pets-tab-add-person-pet:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--success-alpha-40);
}

.pets-tab-pets-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pets-tab-pets-list .family-member-pet-card {
    background: var(--mud-palette-surface);
}

/* Members without pets section */
.pets-tab-no-pets-section {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px dashed var(--mud-palette-lines-default);
}

.pets-tab-no-pets-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.pets-tab-no-pets-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pets-tab-no-pet-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--mud-palette-background-grey);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pets-tab-no-pet-member:hover {
    background: var(--success-alpha-10);
    color: var(--success);
    border-color: var(--success);
}

.pets-tab-no-pet-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
    background: linear-gradient(135deg, var(--text-disabled) 0%, var(--text-secondary) 100%) !important;
    color: white !important;
}

.pets-tab-add-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--success);
}

.pets-tab-no-pet-member:hover .pets-tab-add-icon {
    opacity: 1;
}

/* =============================================
   DIALOG FAMILY MEMBER SELECT STYLES
   ============================================= */

.hobby-edit-member-avatar,
.pet-edit-member-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%) !important;
    color: white !important;
    margin-right: 0.5rem;
}

.hobby-edit-select-item,
.pet-edit-select-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hobby-edit-select-item .mud-avatar-small,
.pet-edit-select-item .mud-avatar-small {
    flex-shrink: 0;
}

/* =============================================
   LEAD SOURCES MANAGEMENT - CRM-LS STYLES
   ============================================= */

.crm-ls-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crm-ls-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
}

.crm-ls-stat-card:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 4px 12px var(--black-alpha-8);
}

.crm-ls-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.crm-ls-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-ls-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1;
}

.crm-ls-stat-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-ls-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm-ls-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
    transition: all 0.2s ease;
}

.crm-ls-card:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 4px 16px var(--black-alpha-8);
}

.crm-ls-card.inactive {
    opacity: 0.7;
}

.crm-ls-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.crm-ls-card-header:hover {
    background: var(--mud-palette-background-grey);
}

.crm-ls-card-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.crm-ls-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-ls-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.crm-ls-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crm-ls-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

.crm-ls-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-ls-badge.active {
    background: var(--success-alpha-15);
    color: var(--success);
}

.crm-ls-badge.inactive {
    background: var(--error-alpha-15);
    color: var(--error);
}

.crm-ls-badge.system {
    background: var(--indigo-alpha-15);
    color: var(--indigo);
}

.crm-ls-description {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.crm-ls-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.crm-ls-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-ls-meta-item .mud-icon-root {
    font-size: 1rem;
    color: var(--mud-palette-text-disabled);
}

.crm-ls-card-actions {
    display: flex;
    align-items: center;
}

.crm-ls-expand-btn {
    color: var(--mud-palette-text-secondary) !important;
    transition: all 0.2s ease !important;
}

.crm-ls-expand-btn:hover {
    color: var(--mud-palette-primary) !important;
    background: rgba(var(--mud-palette-primary-rgb), 0.1) !important;
}

.crm-ls-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.crm-ls-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-ls-action-btn.primary {
    background: var(--indigo-alpha-12);
    color: var(--indigo);
}

.crm-ls-action-btn.primary:hover {
    background: var(--indigo-alpha-20);
}

.crm-ls-action-btn.success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.crm-ls-action-btn.success:hover {
    background: var(--success-alpha-20);
}

.crm-ls-action-btn.warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.crm-ls-action-btn.warning:hover {
    background: rgba(245, 158, 11, 0.2);
}

.crm-ls-action-btn.danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

.crm-ls-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.crm-ls-action-btn .mud-icon-root {
    font-size: 1rem;
}

.crm-ls-campaigns-section {
    padding: 1rem 1.25rem 1.25rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.crm-ls-campaigns-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.crm-ls-campaigns-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

.crm-ls-campaigns-title .mud-icon-root {
    color: var(--warning);
}

.crm-ls-add-campaign-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.crm-ls-add-campaign-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.crm-ls-add-campaign-btn .mud-icon-root {
    font-size: 1rem;
}

.crm-ls-no-campaigns {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--mud-palette-surface);
    border-radius: 10px;
    border: 1px dashed var(--mud-palette-lines-default);
    gap: 0.75rem;
}

.crm-ls-no-campaigns .mud-icon-root {
    font-size: 2rem;
    color: var(--mud-palette-text-disabled);
}

.crm-ls-no-campaigns span {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.crm-ls-create-first-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: transparent;
    color: var(--warning);
    border: 1px solid var(--warning);
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-ls-create-first-btn:hover {
    background: var(--warning-alpha-10);
}

.crm-ls-campaigns-table {
    background: var(--mud-palette-surface);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-ls-campaigns-table table {
    width: 100%;
    border-collapse: collapse;
}

.crm-ls-campaigns-table thead {
    background: var(--mud-palette-background-grey);
}

.crm-ls-campaigns-table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    text-align: left;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.crm-ls-campaigns-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.crm-ls-campaigns-table tbody tr:last-child td {
    border-bottom: none;
}

.crm-ls-campaigns-table tbody tr:hover {
    background: rgba(var(--mud-palette-primary-rgb), 0.04);
}

.crm-ls-campaign-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-ls-campaign-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-ls-campaign-icon .mud-icon-root {
    font-size: 0.875rem;
    color: white;
}

.crm-ls-campaign-desc {
    color: var(--mud-palette-text-secondary);
}

.crm-ls-campaign-cost {
    font-weight: 500;
    color: var(--success);
}

.crm-ls-campaign-date {
    color: var(--mud-palette-text-secondary);
}

.crm-ls-campaign-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.crm-ls-campaign-status.active {
    background: var(--success-alpha-15);
    color: var(--success);
}

.crm-ls-campaign-status.inactive {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-500);
}

.crm-ls-campaign-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.crm-ls-campaign-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--mud-palette-text-secondary);
}

.crm-ls-campaign-action.edit:hover {
    background: var(--indigo-alpha-12);
    color: var(--indigo);
}

.crm-ls-campaign-action.delete:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

.crm-ls-campaign-action .mud-icon-root {
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .crm-ls-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .crm-ls-stats-row {
        grid-template-columns: 1fr;
    }

    .crm-ls-card-main {
        flex-direction: column;
        gap: 0.75rem;
    }

    .crm-ls-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .crm-ls-actions-bar {
        flex-wrap: wrap;
    }

    .crm-ls-campaigns-table {
        overflow-x: auto;
    }

    .crm-ls-campaigns-table table {
        min-width: 600px;
    }

    .crm-ls-campaigns-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}


/* ===== MODAL CONTENT WRAPPER LEAD SOURCE ===== */
.lead-source-modal {
    background: var(--mud-palette-surface, var(--mud-palette-white));
    border-radius: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* ===== MODAL HEADER ===== */
.lead-source-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default, var(--border-default));
    flex-shrink: 0;
    background: var(--mud-palette-surface, var(--mud-palette-white));
}

.lead-source-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary, var(--text-primary-alt));
}

.lead-source-modal .modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--mud-palette-text-secondary, var(--gray-500));
    border-radius: 8px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lead-source-modal .modal-close:hover {
    background: var(--mud-palette-action-default-hover, var(--gray-100));
    color: var(--mud-palette-text-primary, var(--text-primary-alt));
}

/* ===== MODAL BODY ===== */
.lead-source-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* ===== FORM GROUP ===== */
.lead-source-modal .form-group {
    margin-bottom: 1.25rem;
}

.lead-source-modal .form-group:last-child {
    margin-bottom: 0;
}

.lead-source-modal .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary, var(--gray-600));
    margin-bottom: 0.5rem;
}

.lead-source-modal .form-group input,
.lead-source-modal .form-group textarea,
.lead-source-modal .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default, var(--border-muted));
    border-radius: 8px;
    background: var(--mud-palette-surface, var(--mud-palette-white));
    color: var(--mud-palette-text-primary, var(--text-primary-alt));
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.lead-source-modal .form-group input:hover,
.lead-source-modal .form-group textarea:hover,
.lead-source-modal .form-group select:hover {
    border-color: var(--blue-accent);
}

.lead-source-modal .form-group input:focus,
.lead-source-modal .form-group textarea:focus,
.lead-source-modal .form-group select:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.lead-source-modal .form-group small {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary, var(--gray-500));
}

.lead-source-modal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== COLOR PICKER ===== */
.lead-source-modal .color-picker {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lead-source-modal .color-option {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.lead-source-modal .color-option:hover {
    transform: scale(1.1);
}

.lead-source-modal .color-option.selected {
    border-color: var(--mud-palette-text-primary, var(--text-primary-alt));
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--mud-palette-primary);
}

/* ===== ICON PICKER ===== */
.lead-source-modal .icon-picker {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lead-source-modal .icon-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--mud-palette-lines-default, var(--border-default));
    background: var(--mud-palette-background, var(--bg-muted));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--mud-palette-text-secondary, var(--gray-500));
}

.lead-source-modal .icon-option:hover {
    border-color: var(--blue-accent);
    color: var(--blue-accent);
    background: rgba(102, 126, 234, 0.05);
}

.lead-source-modal .icon-option.selected {
    border-color: var(--blue-accent);
    background: linear-gradient(135deg, var(--blue-accent-alpha-10) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--blue-accent);
}

/* ===== TOGGLE SWITCH ===== */
.lead-source-modal .toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.lead-source-modal .toggle-label {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary, var(--gray-600));
}

/* ===== MODAL FOOTER ===== */
.lead-source-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--mud-palette-lines-default, var(--border-default));
    background: var(--mud-palette-surface, var(--mud-palette-white));
    flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.lead-source-modal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.lead-source-modal .btn-secondary {
    background: var(--mud-palette-surface, var(--mud-palette-white));
    color: var(--mud-palette-text-primary, var(--gray-600));
    border: 1px solid var(--mud-palette-lines-default, var(--border-muted));
}

.lead-source-modal .btn-secondary:hover {
    background: var(--mud-palette-action-default-hover, var(--bg-muted));
    border-color: var(--blue-accent);
    color: var(--blue-accent);
}

.lead-source-modal .btn-primary {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    color: white;
    border: none;
}

.lead-source-modal .btn-primary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.lead-source-modal .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================================================
   MudTabs Global Override — tabs visual style
   Applies the custom tab design to all MudTabs components globally.
   Mirrors: .tabs-container, .tabs-header, .tab-btn
   ======================================================================== */

/* Container — matches .tabs-container */
.mud-tabs {
    background: var(--mud-palette-surface);
    border-radius: var(--radius-xl, 16px);
    box-shadow: var(--shadow-card, 0 4px 20px var(--black-alpha-8));
    overflow: hidden;
}

/* Header — matches .tabs-header */
.mud-tabs .mud-tabs-header {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background);
    box-shadow: none;
}

.mud-tabs .mud-tabs-toolbar {
    padding: 1rem 1rem .5rem .5rem;
    min-height: unset;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mud-tabs .mud-tabs-toolbar-content {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

/* Remove MudBlazor default indicator line */
.mud-tabs .mud-tab-slider {
    display: none !important;
}

/* Tab buttons — matches .tab-btn */
.mud-tabs .mud-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem !important;
    margin: 0 4px;
    height: auto;
    min-height: unset;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: unset;
    max-width: unset;
    text-transform: none;
    letter-spacing: normal;
    opacity: 1;
}

/* Hover — matches .tab-btn:hover */
.mud-tabs .mud-tab:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--primary, #5b6ef5);
}

/* Active — matches .tab-btn.active */
.mud-tabs .mud-tab.mud-tab-active {
    background: var(--primary, #5b6ef5);
    color: white !important;
    box-shadow: 0 4px 12px rgba(91, 110, 245, 0.3);
}

.mud-tabs .mud-tab.mud-tab-active .mud-ripple {
    color: var(--white-alpha-30);
}

/* Icon + text layout inside tab */
.mud-tabs .mud-tab .mud-tab-icon-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0;
    margin-inline-end: 0;
}

/* Panels — matches .tab-content */
.mud-tabs .mud-tabs-panels {
    padding: 1.5rem;
}

/* Scroll buttons */
.mud-tabs .mud-tabs-scroll-btn {
    color: var(--mud-palette-text-secondary);
}

.mud-tabs .mud-tooltip-root.mud-tooltip-inline {
    margin: 0 4px 10px;
}

li.validation-message {
    font-size: 0.8125rem;
}

.mud-input-control.mud-input-control-margin-normal {
    margin-top: 5px;
}

/* Filled Primary button */
.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--violet-dark), var(--violet-darker)) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.25rem !important;
    text-transform: uppercase !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
}

.mud-button-filled.mud-button-filled-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Filled Default (Cancel) button */
.mud-button-filled.mud-button-filled-default {
    background: transparent !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 10px !important;
    color: var(--text-tertiary) !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.125rem !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.mud-button-filled.mud-button-filled-default:hover:not(:disabled) {
    background: var(--bg-page) !important;
    border-color: var(--border-dark) !important;
}

/* ── Global MudButton overrides (ContactManager style) ── */

.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--violet-dark), var(--violet-darker)) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.25rem !important;
    text-transform: uppercase !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
}

.mud-button-filled.mud-button-filled-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mud-button-filled.mud-button-filled-default {
    background: transparent !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 10px !important;
    color: var(--text-tertiary) !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.125rem !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.mud-button-filled.mud-button-filled-default:hover:not(:disabled) {
    background: var(--bg-page) !important;
    border-color: var(--border-dark) !important;
}

/* ── Table Row Avatar (generic, reusable in any table) ── */

.table-row-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table-row-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--black-alpha-15);
}

.table-row-avatar.avatar-blue {
    background: linear-gradient(135deg, var(--info-light), var(--info));
}

.table-row-avatar.avatar-purple {
    background: linear-gradient(135deg, var(--violet-light), var(--violet));
}

.table-row-avatar.avatar-green {
    background: linear-gradient(135deg, var(--success-pale), var(--success));
}

.table-row-avatar.avatar-pink {
    background: linear-gradient(135deg, #f472b6, var(--pink));
}

.table-row-avatar.avatar-orange {
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
}

.table-row-avatar.avatar-teal {
    background: linear-gradient(135deg, #2dd4bf, var(--teal));
}

/* ── View Service: Action Buttons, Role Icon, Badges ── */

.service-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.service-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--mud-palette-text-secondary);
    padding: 0;
}

.service-action-btn:hover:not(:disabled) {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.service-action-btn .mud-icon-root {
    font-size: 1.125rem;
}

.view-service-role-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--indigo-alpha-12) 0%, rgba(139, 92, 246, 0.08) 100%);
    flex-shrink: 0;
}

.view-service-role-icon .mud-icon-root {
    font-size: 1rem;
    color: var(--indigo);
}

.view-service-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.view-service-badge-info {
    background: var(--indigo-alpha-8);
    color: var(--indigo);
}

.view-service-badge-default {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

/* ── Tenant Services: Status Badge ── */

.table-row-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table-row-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--black-alpha-15);
}

.table-row-avatar.avatar-blue {
    background: linear-gradient(135deg, var(--info-light), var(--info));
}

.table-row-avatar.avatar-purple {
    background: linear-gradient(135deg, var(--violet-light), var(--violet));
}

.table-row-avatar.avatar-green {
    background: linear-gradient(135deg, var(--success-pale), var(--success));
}

.table-row-avatar.avatar-pink {
    background: linear-gradient(135deg, #f472b6, var(--pink));
}

.table-row-avatar.avatar-orange {
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
}

.table-row-avatar.avatar-teal {
    background: linear-gradient(135deg, #2dd4bf, var(--teal));
}

.tenant-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tenant-status-badge.active {
    background: var(--success-alpha-10);
    color: var(--success-dark);
}

.tenant-status-badge.inactive {
    background: var(--error-alpha-10);
    color: var(--error-dark);
}

.tenant-status-badge.clickable {
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.tenant-status-badge.clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px var(--black-alpha-10);
}

.tenant-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.tenant-status-badge.active .tenant-status-dot {
    background: var(--success);
    box-shadow: 0 0 0 2px var(--success-alpha-20);
}

.tenant-status-badge.inactive .tenant-status-dot {
    background: var(--error);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* ── Tenant Tab Content Layout ── */

.tenant-tab-content {
    padding: 1.5rem 0;
}

/* ── Action Bar (search + buttons, full width) ── */

.tenant-action-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.tenant-search-container {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.tenant-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mud-palette-text-disabled);
    pointer-events: none;
}

.tenant-search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.75rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.tenant-search-input:focus {
    outline: none;
    border-color: var(--primary, #5b6ef5);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.tenant-search-input::placeholder {
    color: var(--mud-palette-text-disabled);
}

.tenant-action-buttons {
    display: flex;
    gap: 0.75rem;
}

/* ── Table Card Container ── */

.tenant-table-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    overflow: hidden;
}

/* ── Styled MudTable overrides ── */

.styled-table .mud-table-toolbar {
    display: none !important;
}

.styled-table .mud-table-container {
    border: none !important;
}

/* Duplicado eliminado — las reglas canónicas están en línea ~451.
   El background del header y los estilos de th ya están definidos al inicio del archivo. */

.styled-table .mud-table-body .mud-table-row {
    transition: all 0.2s ease;
    position: relative;
}

.styled-table .mud-table-body .mud-table-row:hover {
    background: var(--indigo-alpha-4) !important;
}

.styled-table .mud-table-body td {
    border-bottom: 1px solid var(--black-alpha-4) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem;
}

.styled-table .mud-table-pagination {
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* ── Multi-Selection Summary (chips area) ── */

.tenant-selection-summary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid var(--indigo-alpha-15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.tenant-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tenant-selection-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary, var(--indigo));
}

.tenant-selection-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tenant-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem 0.375rem 0.625rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--indigo-alpha-20);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    transition: all 0.15s ease;
}

.tenant-chip .mud-icon-root {
    font-size: 0.875rem;
    color: var(--primary, var(--indigo));
}

.tenant-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: var(--mud-palette-text-secondary);
    transition: all 0.15s ease;
    padding: 0;
    margin-left: 0.125rem;
}

.tenant-chip-remove .mud-icon-root {
    font-size: 0.75rem;
    color: inherit;
}

.tenant-chip-remove:hover {
    background: var(--error-alpha-10);
    color: var(--error);
}

/* Selected row text highlight */
.tenant-row-selected-text {
    font-weight: 600;
    color: var(--primary, var(--indigo));
}

/* ── Role icon avatar ── */

.tenant-role-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--indigo-alpha-12) 0%, rgba(139, 92, 246, 0.08) 100%);
    flex-shrink: 0;
}

.tenant-role-icon .mud-icon-root {
    font-size: 1rem;
    color: var(--primary, var(--indigo));
}

/* ── Badges ── */

.tenant-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tenant-badge-info {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.tenant-badge-default {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

/* ── Row action buttons ── */

.tenant-row-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

/* Nombre preferido: .row-action-btn (semántico).
   Alias legacy: .tenant-action-btn (mantiene compatibilidad con 28+ archivos existentes). */
.row-action-btn,
.tenant-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--mud-palette-text-secondary);
}

.row-action-btn:hover,
.tenant-action-btn:hover {
    background: var(--indigo-alpha-10);
    color: var(--indigo);
}

.row-action-btn.delete:hover,
.tenant-action-btn.delete:hover {
    background: var(--error-bg-light);
    color: var(--error);
}

.row-action-btn:disabled,
.tenant-action-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.row-action-btn:disabled:hover,
.tenant-action-btn:disabled:hover {
    background: transparent;
    color: var(--mud-palette-text-secondary);
}

/* ── bp-btn duplicado eliminado — definición canónica en línea ~7321 ── */

/* ── Responsive ── */

@media (max-width: 600px) {
    .tenant-action-bar {
        flex-direction: column;
    }

    .tenant-search-container {
        min-width: 100%;
    }

    .tenant-action-buttons {
        width: 100%;
    }

    .tenant-action-buttons .bp-btn {
        flex: 1;
        justify-content: center;
    }

    .tenant-selection-chips {
        max-height: 120px;
        overflow-y: auto;
    }
}


/* =============================================
   GOOGLE FORMS SECTION IN LEAD SOURCE LIST
   ============================================= */

.generic-form-forms-section {
    padding: 1.25rem;
    background: linear-gradient(to bottom, #F3E5F5 0%, var(--mud-palette-background-grey) 100%);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.generic-form-forms-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.generic-form-forms-title-area {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.generic-form-forms-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(103, 58, 183, 0.15);
}

.generic-form-forms-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.generic-form-forms-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-forms-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.generic-form-google-connected-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--success-alpha-10);
    color: var(--success);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.generic-form-connect-google-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f1f1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generic-form-connect-google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px var(--black-alpha-10);
}

.generic-form-create-form-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(103, 58, 183, 0.3);
}

.generic-form-create-form-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.4);
}

.generic-form-not-connected-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px dashed #673AB7;
}

.generic-form-banner-icon {
    width: 48px;
    height: 48px;
    background: var(--purple-alpha-10);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.generic-form-banner-icon .mud-icon-root {
    color: #673AB7;
}

.generic-form-banner-content {
    flex: 1;
}

.generic-form-banner-content h4 {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-banner-content p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.5;
}

.generic-form-banner-btn {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.generic-form-banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.4);
}

.generic-form-empty-forms {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px dashed var(--mud-palette-lines-default);
    text-align: center;
}

.generic-form-empty-illustration {
    margin-bottom: 1rem;
}

.generic-form-empty-forms h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-empty-forms>p {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    max-width: 350px;
}

.generic-form-create-first-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.3);
}

.generic-form-create-first-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.4);
}

.generic-form-forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.generic-form-form-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
    transition: all 0.2s ease;
}

.generic-form-form-card:hover {
    border-color: #673AB7;
    box-shadow: 0 4px 20px rgba(103, 58, 183, 0.15);
}

.generic-form-form-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
}

.generic-form-form-icon-badge {
    width: 32px;
    height: 32px;
    background: var(--white-alpha-20);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-form-card-menu {
    color: white;
}

.generic-form-form-card-menu .mud-icon-root {
    color: white !important;
}

.generic-form-form-card-body {
    padding: 1rem;
}

.generic-form-form-title {
    margin: 0 0 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.generic-form-form-description {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

.generic-form-form-campaign-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: var(--warning-alpha-10);
    color: var(--warning-dark);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.generic-form-form-card-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.generic-form-form-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-form-stat .mud-icon-root {
    font-size: 0.875rem;
}

.generic-form-form-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.generic-form-form-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
}

.generic-form-form-quick-actions {
    display: flex;
    gap: 0.25rem;
}

.generic-form-quick-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generic-form-quick-action-btn:hover {
    background: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.generic-form-quick-action-btn.primary {
    background: var(--purple-alpha-10);
    color: #673AB7;
}

.generic-form-quick-action-btn.primary:hover {
    background: rgba(103, 58, 183, 0.2);
}

.generic-form-add-form-card {
    border: 2px dashed var(--mud-palette-lines-default);
    background: transparent;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-add-form-card:hover {
    border-color: #673AB7;
    background: rgba(103, 58, 183, 0.05);
}

.generic-form-add-form-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-add-form-icon {
    width: 48px;
    height: 48px;
    background: var(--mud-palette-background-grey);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-add-form-card:hover .generic-form-add-form-icon {
    background: var(--purple-alpha-10);
}

.generic-form-add-form-card:hover .generic-form-add-form-icon .mud-icon-root {
    color: #673AB7;
}

/* Dialog Updates */
.generic-form-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.generic-form-footer-left,
.generic-form-footer-right {
    display: flex;
    gap: 0.75rem;
}

.generic-form-info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(103, 58, 183, 0.05);
    border-radius: 10px;
    border-left: 3px solid #673AB7;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-info-card .mud-icon-root {
    color: #673AB7;
    flex-shrink: 0;
}

.generic-form-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.generic-form-form-group.full-width {
    width: 100%;
}

.generic-form-form-group label .required {
    color: var(--error);
}

.generic-form-form-group label .optional {
    color: var(--mud-palette-text-disabled);
    font-weight: 400;
    font-size: 0.8125rem;
}

.generic-form-form-group input.error,
.generic-form-form-group textarea.error {
    border-color: var(--error);
}

.generic-form-error-msg {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.generic-form-campaign-selector select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    font-size: 0.9375rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.generic-form-no-campaigns-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--mud-palette-background-grey);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-selected-campaign-info {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.generic-form-campaign-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--warning-dark);
}

.generic-form-selected-campaign-info p {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Questions Builder */
.generic-form-questions-builder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generic-form-questions-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.generic-form-questions-count {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generic-form-no-questions {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    border: 1px dashed var(--mud-palette-lines-default);
    text-align: center;
}

.generic-form-no-questions h4 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-no-questions>p {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-quick-start-btns {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.generic-form-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-quick-btn:hover {
    border-color: #673AB7;
    color: #673AB7;
    background: rgba(103, 58, 183, 0.05);
}

.generic-form-use-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid #673AB7;
    color: #673AB7;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generic-form-use-template-btn:hover {
    background: var(--purple-alpha-10);
}

.generic-form-questions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.generic-form-question-card {
    display: flex;
    gap: 0.5rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.generic-form-question-card:hover {
    border-color: #673AB7;
}

.generic-form-question-card.selected {
    border-color: #673AB7;
    box-shadow: 0 0 0 2px var(--purple-alpha-10);
}

.generic-form-question-drag-handle {
    display: flex;
    align-items: flex-start;
    padding-top: 0.25rem;
    color: var(--mud-palette-text-disabled);
    cursor: grab;
}

.generic-form-question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.generic-form-question-type-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--purple-alpha-10);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #673AB7;
    text-transform: uppercase;
    width: fit-content;
}

.generic-form-question-title-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generic-form-question-title-input input {
    flex: 1;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 2px solid var(--mud-palette-lines-default);
    font-size: 1rem;
    font-weight: 500;
    background: transparent;
    color: var(--mud-palette-text-primary);
    transition: border-color 0.2s ease;
}

.generic-form-question-title-input input:focus {
    outline: none;
    border-color: #673AB7;
}

.generic-form-required-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--error);
    background: var(--error-alpha-10);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.generic-form-options-editor {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 0.5rem;
}

.generic-form-option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generic-form-option-bullet {
    width: 24px;
    color: var(--mud-palette-text-disabled);
    display: flex;
    justify-content: center;
}

.generic-form-option-item input {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.875rem;
    background: transparent;
    color: var(--mud-palette-text-primary);
    transition: all 0.2s ease;
}

.generic-form-option-item input:hover,
.generic-form-option-item input:focus {
    border-color: var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
}

.generic-form-remove-option-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-disabled);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.generic-form-option-item:hover .generic-form-remove-option-btn {
    opacity: 1;
}

.generic-form-remove-option-btn:hover:not(:disabled) {
    background: var(--error-alpha-10);
    color: var(--error);
}

.generic-form-remove-option-btn:disabled {
    cursor: not-allowed;
}

.generic-form-add-option-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    background: transparent;
    border: none;
    color: #673AB7;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    width: fit-content;
    margin-left: 1.5rem;
}

.generic-form-add-option-link:hover {
    background: var(--purple-alpha-10);
}

.generic-form-scale-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.generic-form-scale-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.generic-form-scale-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    min-width: 60px;
}

.generic-form-scale-label:last-child {
    text-align: right;
}

.generic-form-scale-dots {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.generic-form-scale-dot {
    width: 28px;
    height: 28px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-edit-scale-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    background: transparent;
    border: none;
    color: #673AB7;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    width: fit-content;
}

.generic-form-edit-scale-btn:hover {
    background: var(--purple-alpha-10);
}

.generic-form-question-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    padding-left: 1rem;
    border-left: 1px solid var(--mud-palette-lines-default);
}

.generic-form-required-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
}

.generic-form-required-toggle input {
    accent-color: #673AB7;
}

.generic-form-question-btns {
    display: flex;
    gap: 0.25rem;
}

.generic-form-q-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.generic-form-q-btn:hover {
    background: var(--mud-palette-background-grey);
}

.generic-form-q-btn.danger:hover {
    background: var(--error-alpha-10);
    color: var(--error);
}

/* Preview Step */
.generic-form-preview-step {
    max-width: 600px;
    margin: 0 auto;
}

.generic-form-creating-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.generic-form-creating-state h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.25rem;
}

.generic-form-creating-state p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.generic-form-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.generic-form-success-animation {
    margin-bottom: 1.5rem;
}

.generic-form-checkmark-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gfPop 0.5s ease;
}

@keyframes gfPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.generic-form-checkmark-circle .mud-icon-root {
    color: white;
    font-size: 2.5rem;
}

.generic-form-success-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.generic-form-success-state>p {
    margin: 0 0 1.5rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-form-url-card {
    width: 100%;
    max-width: 450px;
    margin-bottom: 1.5rem;
}

.generic-form-form-url-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    text-align: left;
}

.generic-form-url-copy-box {
    display: flex;
    gap: 0.5rem;
}

.generic-form-url-copy-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    font-size: 0.875rem;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
}

.generic-form-copy-url-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-copy-url-btn:hover {
    border-color: #673AB7;
    color: #673AB7;
}

.generic-form-success-actions {
    display: flex;
    gap: 1rem;
}

.generic-form-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.generic-form-preview-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.generic-form-preview-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.generic-form-preview-header p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.generic-form-preview-form-card {
    width: 100%;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.generic-form-preview-form-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
}

.generic-form-preview-form-header h4 {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
}

.generic-form-preview-form-header p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.generic-form-preview-campaign {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--warning-alpha-10);
    font-size: 0.875rem;
    color: var(--warning-dark);
}

.generic-form-preview-questions {
    padding: 1rem 1.25rem;
}

.generic-form-preview-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.generic-form-preview-question:last-child {
    border-bottom: none;
}

.generic-form-preview-q-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generic-form-preview-q-header .mud-icon-root {
    color: #673AB7;
    font-size: 1rem;
}

.generic-form-preview-q-title {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-preview-q-type {
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
}

.generic-form-preview-summary {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-background-grey);
}

.generic-form-summary-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-create-form-final-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(103, 58, 183, 0.3);
}

.generic-form-create-form-final-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.4);
}

.generic-form-create-form-final-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Scale Dialog */
.generic-form-scale-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.generic-form-scale-dialog {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px var(--black-alpha-30);
}

.generic-form-scale-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.generic-form-scale-dialog-header h4 {
    margin: 0;
    font-size: 1rem;
}

.generic-form-scale-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-scale-close:hover {
    background: var(--mud-palette-background-grey);
}

.generic-form-scale-dialog-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generic-form-scale-row {
    display: flex;
    gap: 1rem;
}

.generic-form-scale-field {
    flex: 1;
}

.generic-form-scale-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-scale-field select,
.generic-form-scale-field input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.generic-form-scale-dialog-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    display: flex;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 600px) {
    .generic-form-forms-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .generic-form-forms-grid {
        grid-template-columns: 1fr;
    }

    .generic-form-not-connected-banner {
        flex-direction: column;
        text-align: center;
    }

    .generic-form-question-card {
        flex-direction: column;
    }

    .generic-form-question-actions {
        flex-direction: row;
        justify-content: space-between;
        padding-left: 0;
        padding-top: 0.75rem;
        border-left: none;
        border-top: 1px solid var(--mud-palette-lines-default);
    }

    .generic-form-scale-row {
        flex-direction: column;
    }
}

/* =============================================
   GOOGLE FORMS CONFIG DIALOG - GF STYLES
   ============================================= */

.generic-form-config-dialog {
    border-radius: 16px !important;
    overflow: hidden;
}

.generic-form-config-dialog .mud-dialog-content {
    padding: 0 !important;
}

.generic-form-modal {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    background: var(--mud-palette-surface);
}

.generic-form-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
}

.generic-form-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.generic-form-header-icon {
    width: 48px;
    height: 48px;
    background: var(--white-alpha-15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-header-text h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.generic-form-header-text p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

.generic-form-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--white-alpha-15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generic-form-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.generic-form-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.generic-form-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.generic-form-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.generic-form-step.active .generic-form-step-number {
    background: #673AB7;
    color: white;
}

.generic-form-step.completed .generic-form-step-number {
    background: var(--success);
    color: white;
}

.generic-form-step-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

.generic-form-step.active .generic-form-step-label {
    color: #673AB7;
    font-weight: 600;
}

.generic-form-step-line {
    width: 60px;
    height: 2px;
    background: var(--mud-palette-lines-default);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
    transition: background 0.3s ease;
}

.generic-form-step-line.active {
    background: var(--success);
}

.generic-form-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 350px;
}

.generic-form-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-step-content {
    animation: gfFadeIn 0.3s ease;
}

@keyframes gfFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.generic-form-connect-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.generic-form-connected-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.generic-form-connected-icon {
    width: 80px;
    height: 80px;
    background: var(--success-alpha-10);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-connected-status h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-connected-status p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.generic-form-not-connected {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
}

.generic-form-google-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-not-connected h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-not-connected>p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
    max-width: 400px;
    line-height: 1.5;
}

.generic-form-permissions-info {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: left;
    width: 100%;
    max-width: 400px;
}

.generic-form-permissions-info h4 {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-permissions-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.generic-form-permissions-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-permissions-info li .mud-icon-root {
    color: #673AB7;
}

.generic-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.generic-form-btn-primary {
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
}

.generic-form-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.4);
}

.generic-form-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.generic-form-btn-secondary {
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
}

.generic-form-btn-secondary:hover {
    background: var(--mud-palette-lines-default);
}

.generic-form-btn-ghost {
    background: transparent;
    color: var(--mud-palette-text-secondary);
}

.generic-form-btn-ghost:hover {
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
}

.generic-form-btn-outline {
    background: transparent;
    color: #673AB7;
    border: 1px solid #673AB7;
}

.generic-form-btn-outline:hover {
    background: var(--purple-alpha-10);
}

.generic-form-btn-google {
    background: white;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    padding: 0.875rem 1.5rem;
}

.generic-form-btn-google:hover {
    background: #f8f9fa;
    border-color: #d2e3fc;
    box-shadow: 0 1px 3px var(--black-alpha-10);
}

.generic-form-btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.generic-form-form-section {
    max-width: 500px;
    margin: 0 auto;
}

.generic-form-form-section h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-form-section>p {
    margin: 0 0 1.5rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-form-group {
    margin-bottom: 1.25rem;
}

.generic-form-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.generic-form-form-group input[type="text"],
.generic-form-form-group input[type="number"],
.generic-form-form-group textarea,
.generic-form-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    font-size: 0.9375rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    transition: all 0.2s ease;
}

.generic-form-form-group input:focus,
.generic-form-form-group textarea:focus,
.generic-form-form-group select:focus {
    outline: none;
    border-color: #673AB7;
    box-shadow: 0 0 0 3px var(--purple-alpha-10);
}

.generic-form-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.generic-form-form-row {
    display: flex;
    gap: 1rem;
}

.generic-form-form-row .generic-form-form-group {
    flex: 1;
}

.generic-form-form-row .generic-form-form-group.flex-2 {
    flex: 2;
}

.generic-form-questions-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generic-form-questions-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.generic-form-questions-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.generic-form-questions-header p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-no-questions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    border: 1px dashed var(--mud-palette-lines-default);
    gap: 0.75rem;
}

.generic-form-no-questions .mud-icon-root {
    color: var(--mud-palette-text-disabled);
}

.generic-form-no-questions span {
    color: var(--mud-palette-text-secondary);
}

.generic-form-questions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generic-form-question-card {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
}

.generic-form-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.generic-form-question-number {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #673AB7;
    background: var(--purple-alpha-10);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.generic-form-question-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.generic-form-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generic-form-icon-btn:hover:not(:disabled) {
    background: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.generic-form-icon-btn.danger:hover:not(:disabled) {
    background: var(--error-alpha-10);
    color: var(--error);
}

.generic-form-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.generic-form-icon-btn.small {
    width: 28px;
    height: 28px;
}

.generic-form-question-body {
    padding: 1rem;
}

.generic-form-options-section {
    margin-top: 1rem;
}

.generic-form-options-section>label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

.generic-form-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.generic-form-option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generic-form-option-indicator {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-disabled);
    font-size: 0.875rem;
}

.generic-form-option-row input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.generic-form-option-row input:focus {
    outline: none;
    border-color: #673AB7;
}

.generic-form-add-option-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: #673AB7;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.generic-form-add-option-btn:hover {
    background: var(--purple-alpha-10);
}

.generic-form-scale-section {
    margin-top: 1rem;
}

.generic-form-question-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.generic-form-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #673AB7;
}

.generic-form-finish-section {
    max-width: 500px;
    margin: 0 auto;
}

.generic-form-creating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    text-align: center;
}

.generic-form-creating h3 {
    margin: 0;
    color: var(--mud-palette-text-primary);
}

.generic-form-creating p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.generic-form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.generic-form-success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-alpha-10);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generic-form-success-icon .mud-icon-root {
    font-size: 2.5rem;
    color: var(--success);
}

.generic-form-success h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-success>p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.generic-form-form-url-box {
    width: 100%;
    margin: 1rem 0;
}

.generic-form-form-url-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    text-align: left;
}

.generic-form-url-input-group {
    display: flex;
    gap: 0.5rem;
}

.generic-form-url-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    font-size: 0.875rem;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
}

.generic-form-copy-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generic-form-copy-btn:hover {
    background: var(--mud-palette-background-grey);
    color: #673AB7;
    border-color: #673AB7;
}

.generic-form-action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.generic-form-review {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.generic-form-review h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-review>p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.generic-form-review-card {
    width: 100%;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem;
}

.generic-form-review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.generic-form-review-item:last-child {
    border-bottom: none;
}

.generic-form-review-label {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.generic-form-review-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.generic-form-questions-preview {
    width: 100%;
    text-align: left;
}

.generic-form-questions-preview h4 {
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-preview-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.generic-form-preview-type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--purple-alpha-10);
    color: #673AB7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.generic-form-preview-title {
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.generic-form-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

@media (max-width: 600px) {
    .generic-form-steps-indicator {
        padding: 1rem;
    }

    .generic-form-step-line {
        width: 30px;
    }

    .generic-form-step-label {
        display: none;
    }

    .generic-form-form-row {
        flex-direction: column;
    }

    .generic-form-action-buttons {
        flex-direction: column;
    }
}

/* ============================================================
   Pipeline Styled Table (Prompts, Borrowers, etc.)
   ============================================================ */

.pipeline-styled-table .mud-table-toolbar {
    display: none;
}

.pipeline-styled-table.mud-table {
    border: none !important;
    box-shadow: none !important;
}

.pipeline-styled-table .mud-table-head .mud-table-row {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0.02) 100%) !important;
}

.pipeline-styled-table .mud-table-head .mud-table-cell {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--black-alpha-6);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.pipeline-styled-table .mud-table-body .mud-table-row {
    transition: all 0.2s ease;
}

.pipeline-styled-table .mud-table-body .mud-table-row:hover {
    background: var(--indigo-alpha-4) !important;
}

.pipeline-styled-table .mud-table-body .mud-table-cell:first-child {
    position: relative;
}

.pipeline-styled-table .mud-table-body .mud-table-cell:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--indigo) 0%, var(--violet) 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.pipeline-styled-table .mud-table-body .mud-table-row:hover .mud-table-cell:first-child::before {
    transform: scaleY(1);
}

.pipeline-styled-table .mud-table-body .mud-table-cell {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--black-alpha-4);
    white-space: nowrap;
}

.pipeline-styled-table .mud-table-pagination {
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* Prompt Manager — cell helpers */

.prompt-name-cell {
    font-weight: 600;
}

.prompt-system-text {
    display: block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.prompt-updated-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-updated-by-avatar {
    width: 28px !important;
    height: 28px !important;
    border: 2px solid var(--mud-palette-lines-default);
}

.prompt-updated-by-name {
    font-weight: 500;
}

.prompt-updated-at {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

/* Organization Contact Badge */
.crm-org-badge {
    background: var(--primary, #5b6ef5);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    display: inline-block;
    line-height: 1.4;
}

/* =============================================
   REASSIGN LOANS - Transfer Panel
   Prefix: reassign-
   Used by: ReassignLoans.razor
   ============================================= */

/* LO Selectors Row */
.reassign-selectors {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: var(--spacing-lg, 16px);
}

.reassign-selector-card {
    flex: 1;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-xl, 16px);
    padding: 16px 20px;
}

.reassign-selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 10px;
}

.reassign-selector-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--mud-palette-text-disabled);
}

/* Transfer Tables Area */
.reassign-transfer-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: var(--spacing-lg, 16px);
}

.reassign-panel {
    flex: 1;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-xl, 16px);
    overflow: hidden;
}

.reassign-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background);
}

.reassign-panel-header-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* Empty state */
.reassign-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 3rem 2rem;
}

.reassign-empty-state--drop {
    border-top: 2px dashed var(--mud-palette-lines-default);
    background: repeating-linear-gradient(-45deg,
            transparent,
            transparent 8px,
            rgba(0, 0, 0, 0.008) 8px,
            rgba(0, 0, 0, 0.008) 16px);
}

/* Transfer Controls */
.reassign-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 60px;
    flex-shrink: 0;
}

.reassign-control-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
}

/* Action Footer */
.reassign-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: var(--spacing-lg, 16px);
    padding: 16px 20px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-xl, 16px);
}

.reassign-footer-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* Responsive */
@media (max-width: 960px) {
    .reassign-selectors {
        flex-direction: column;
    }

    .reassign-selector-arrow {
        transform: rotate(90deg);
    }

    .reassign-transfer-container {
        flex-direction: column;
    }

    .reassign-controls {
        flex-direction: row;
        padding-top: 0;
        padding: 8px 0;
    }

    .reassign-controls .reassign-control-btn .mud-icon-root {
        transform: rotate(90deg);
    }
}

/* ==============================================================================
   SECTION 3: Booking (from booking.css)
   ============================================================================== */
/* ============================================================
   Booking Module — ManageAppointment styles
   Prefix: bp-
   ============================================================ */

.bp-page {
    min-height: 100vh;
    background: #f8f9fa;
}

.bp-card {
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    overflow: hidden;
}

.bp-fade {
    animation: bpFade .25s ease;
}

@keyframes bpFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info rows */
.bp-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.bp-info-row .mud-icon-root {
    color: var(--mud-palette-primary);
    font-size: 1.2rem;
}

/* Status badges */
.bp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bp-status-pending {
    background: var(--warning-bg);
    color: #92400e;
}

.bp-status-cancelled {
    background: var(--error-bg);
    color: #991b1b;
}

.bp-status-completed {
    background: var(--success-bg);
    color: #065f46;
}

/* Day strip (reschedule picker) */
.bp-day-strip {
    display: flex;
    gap: 10px;
    padding: 0 32px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bp-day-strip::-webkit-scrollbar {
    height: 0;
}

.bp-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 72px;
    border-radius: 50px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all .2s ease;
    background: white;
    user-select: none;
}

.bp-day:hover:not(.bp-day-disabled) {
    border-color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .04);
}

.bp-day-active {
    border-color: var(--mud-palette-primary) !important;
    background: var(--mud-palette-primary) !important;
    color: white !important;
}

.bp-day-active .bp-day-name,
.bp-day-active .bp-day-num {
    color: white !important;
}

.bp-day-disabled {
    opacity: .35;
    cursor: not-allowed;
    background: #f8f9fa;
}

.bp-day-name {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #6c757d;
}

.bp-day-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 2px;
}

.bp-day-today {
    position: relative;
}

.bp-day-today::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
}

.bp-day-active.bp-day-today::after {
    background: white;
}

/* Time slots */
.bp-slots {
    display: flex;
    gap: 10px;
    padding: 0 32px 24px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.bp-slot {
    padding: 8px 20px;
    border: 1.5px solid #dee2e6;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all .15s ease;
    background: white;
    white-space: nowrap;
    user-select: none;
}

.bp-slot:hover {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

.bp-slot-active {
    border-color: var(--mud-palette-primary) !important;
    background: var(--mud-palette-primary) !important;
    color: white !important;
}

/* Section titles */
.bp-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    padding: 20px 32px 12px;
}

/* Responsive */
@media (max-width: 600px) {

    .bp-day-strip,
    .bp-slots {
        padding-left: 20px;
        padding-right: 20px;
    }

    .bp-section-title {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ==============================================================================
   SECTION 4: Communication Center (from communicationCenter.css)
   ============================================================================== */
/* ============================================================
   COMMUNICATION CENTER – Unified Inbox
   ============================================================ */

/* ── Shell ── */
.inbox-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    background: var(--bg-subtle);
    overflow: hidden;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Top Bar ── */
.inbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 52px;
    min-height: 52px;
    background: var(--mud-palette-white);
    border-bottom: 1px solid var(--border-light);
    z-index: 10;
}

.inbox-topbar-left {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.inbox-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inbox-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -.02em;
}

.inbox-topbar-right {
    flex-shrink: 0;
}

.inbox-user {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: .375rem .75rem;
    border-radius: 8px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
}

/* ── Body: Split Layout ── */
.inbox-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ============================================================
   SIDEBAR (Left Panel)
   ============================================================ */

.inbox-sidebar {
    width: 360px;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    background: var(--mud-palette-white);
    border-right: 1px solid var(--border-light);
}

/* ── Sidebar Header with Search ── */
.inbox-sidebar-header {
    padding: .875rem 1rem .625rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    background: var(--mud-palette-white);
}

.inbox-sidebar-title-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.inbox-sidebar-label {
    font-size: .8125rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.inbox-total-badge {
    font-size: .625rem;
    font-weight: 700;
    color: var(--indigo);
    background: rgba(99, 102, 241, .08);
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1.3;
}

/* ── Search ── */
.inbox-search {
    position: relative;
    width: 100%;
}

.inbox-search-icon {
    position: absolute;
    left: .625rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-disabled);
    pointer-events: none;
    font-size: 1.1rem !important;
}

.inbox-search-input {
    width: 100%;
    height: 34px;
    padding: 0 2rem 0 2.125rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: .8125rem;
    font-family: inherit;
    transition: all .15s;
}

.inbox-search-input::placeholder {
    color: var(--text-disabled);
}

.inbox-search-input:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .08);
    background: var(--mud-palette-white);
}

.inbox-search-clear {
    position: absolute;
    right: .375rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--text-disabled);
    border-radius: 4px;
    display: flex;
    line-height: 0;
}

.inbox-search-clear:hover {
    color: var(--text-tertiary);
}

/* ── Channel Filter Chips ── */
.inbox-filters {
    display: flex;
    gap: 5px;
    padding: .5rem 1rem .625rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--mud-palette-white);
}

.inbox-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    font-size: .6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    font-family: inherit;
}

.inbox-chip:hover {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border-color: var(--border-dark);
}

.inbox-chip-active {
    background: var(--text-primary);
    color: var(--mud-palette-white);
    border-color: var(--text-primary);
}

.inbox-chip-active:hover {
    background: var(--text-muted);
    color: var(--mud-palette-white);
    border-color: var(--text-muted);
}

.inbox-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ch-sms {
    background: var(--info);
}

.ch-wa {
    background: var(--success-light);
}

.ch-voice {
    background: var(--violet);
}

/* ── Contact Scroll Area ── */
.inbox-contacts-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-dark) transparent;
}

.inbox-contacts-scroll::-webkit-scrollbar {
    width: 4px;
}

.inbox-contacts-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.inbox-contacts-scroll::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}

/* ── Contact Card ── */
.inbox-contact {
    display: flex;
    gap: .625rem;
    padding: .625rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-subtle);
    border-left: 3px solid transparent;
    transition: all .1s ease;
}

.inbox-contact:hover {
    background: var(--bg-page);
}

.inbox-contact-active {
    background: rgba(99, 102, 241, .05);
    border-left-color: var(--indigo);
}

.inbox-contact-active:hover {
    background: rgba(99, 102, 241, .07);
}

.inbox-contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .75rem;
    font-weight: 700;
    color: var(--mud-palette-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.av-blue {
    background: linear-gradient(135deg, var(--info), var(--info-dark));
}

.av-emerald {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
}

.av-violet {
    background: linear-gradient(135deg, var(--violet), var(--violet-dark));
}

.av-amber {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
}

.av-rose {
    background: linear-gradient(135deg, var(--error-rose), #e11d48);
}

.av-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.av-indigo {
    background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
}

.inbox-contact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inbox-contact-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inbox-contact-phone {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-contact-time {
    font-size: .625rem;
    color: var(--text-disabled);
    flex-shrink: 0;
    margin-left: .5rem;
    font-weight: 500;
}

.inbox-contact-row2 {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.inbox-channel-tag {
    font-size: .5625rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.5;
}

.inbox-channel-tag.ch-sms {
    background: rgba(59, 130, 246, .08);
    color: var(--info);
}

.inbox-channel-tag.ch-wa {
    background: rgba(34, 197, 94, .08);
    color: var(--success-medium);
}

.inbox-channel-tag.ch-voice {
    background: rgba(139, 92, 246, .08);
    color: var(--violet-dark);
}

.inbox-contact-stat {
    font-size: .5625rem;
    font-weight: 600;
    color: var(--text-disabled);
    margin-left: 2px;
}

.inbox-contact-row3 {
    display: flex;
}

.inbox-contact-preview {
    font-size: .75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ── Skeleton ── */
.inbox-contact-skeleton {
    display: flex;
    gap: .625rem;
    padding: .625rem 1rem;
    border-bottom: 1px solid var(--bg-subtle);
}

.inbox-contact-skeleton-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 2px;
}

/* ── Empty Sidebar ── */
.inbox-empty-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    flex: 1;
}

.inbox-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .625rem;
    color: var(--text-disabled);
}

.inbox-empty-title {
    font-weight: 600;
    font-size: .875rem;
    color: var(--text-primary);
    margin: 0 0 .25rem;
}

.inbox-empty-desc {
    font-size: .75rem;
    color: var(--text-secondary);
    margin: 0 0 .75rem;
    line-height: 1.4;
}

.inbox-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: .375rem .75rem;
    font-size: .75rem;
    font-weight: 500;
    color: var(--indigo);
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.inbox-empty-btn:hover {
    background: rgba(99, 102, 241, .05);
    border-color: var(--indigo);
}

/* ── Pagination ── */
.inbox-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem;
    border-top: 1px solid var(--border-light);
    background: var(--mud-palette-white);
}

.inbox-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .12s;
}

.inbox-page-btn:hover:not(:disabled) {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.inbox-page-btn:disabled {
    opacity: .3;
    cursor: default;
}

.inbox-page-info {
    font-size: .6875rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* ============================================================
   DETAIL PANEL (Right Side)
   ============================================================ */

.inbox-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-subtle);
    min-width: 0;
    overflow: hidden;
}

/* ── Placeholder ── */
.inbox-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    text-align: center;
    padding: 2rem;
}

.inbox-placeholder-visual {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .375rem;
}

.inbox-placeholder-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed var(--border-dark);
    animation: inbox-spin 20s linear infinite;
}

@keyframes inbox-spin {
    to {
        transform: rotate(360deg);
    }
}

.inbox-placeholder-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.inbox-placeholder-desc {
    margin: 0;
    font-size: .8125rem;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.5;
}

/* ── Detail Header ── */
.inbox-detail-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1.25rem;
    background: var(--mud-palette-white);
    border-bottom: 1px solid var(--border-light);
    min-height: 56px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.inbox-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: background .12s;
}

.inbox-back-btn:hover {
    background: var(--bg-subtle);
}

.inbox-detail-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--mud-palette-white);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.inbox-detail-info {
    flex: 1;
    min-width: 0;
}

.inbox-detail-phone {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.inbox-detail-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
    flex-wrap: wrap;
}

.inbox-detail-stats {
    display: flex;
    gap: 8px;
    font-size: .6875rem;
    color: var(--text-disabled);
}

.inbox-detail-stats span {
    display: inline;
}

/* ── Refresh Button ── */
.inbox-refresh-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--mud-palette-white);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}

.inbox-refresh-btn:hover:not(:disabled) {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

.inbox-refresh-btn:disabled {
    opacity: .5;
    cursor: default;
}

.inbox-refresh-spinning {
    animation: spin-refresh .8s linear infinite;
}

@keyframes spin-refresh {
    to {
        transform: rotate(360deg);
    }
}

/* ── Detail Channel Tabs ── */
.detail-tabs {
    display: flex;
    gap: 0;
    background: var(--mud-palette-white);
    border-bottom: 2px solid var(--border-light);
    padding: 0 1.25rem;
}

.detail-tab {
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .625rem 1.125rem;
    border: none;
    background: transparent;
    color: var(--text-disabled);
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .15s;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
    font-family: inherit;
}

.detail-tab:hover {
    color: var(--text-tertiary);
}

.detail-tab-active {
    color: var(--text-primary);
}

.detail-tab-active.detail-tab-sms {
    border-bottom-color: var(--info);
    color: var(--info-dark);
}

.detail-tab-active.detail-tab-wa {
    border-bottom-color: var(--success-light);
    color: var(--success-medium);
}

.detail-tab-active.detail-tab-voice {
    border-bottom-color: var(--violet);
    color: var(--violet-dark);
}

.detail-tab-count {
    font-size: .625rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--bg-subtle);
    color: var(--text-disabled);
    line-height: 1.3;
}

.detail-tab-active .detail-tab-count {
    color: inherit;
}

.detail-tab-active.detail-tab-sms .detail-tab-count {
    background: rgba(59, 130, 246, .08);
}

.detail-tab-active.detail-tab-wa .detail-tab-count {
    background: rgba(34, 197, 94, .08);
}

.detail-tab-active.detail-tab-voice .detail-tab-count {
    background: rgba(139, 92, 246, .08);
}

/* ============================================================
   TIMELINE
   ============================================================ */

.inbox-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-dark) transparent;
    background: var(--bg-page);
}

.inbox-timeline::-webkit-scrollbar {
    width: 4px;
}

.inbox-timeline::-webkit-scrollbar-track {
    background: transparent;
}

.inbox-timeline::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}

/* Lazy-load indicators */
.timeline-loading-older {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 0;
    font-size: .75rem;
    color: var(--indigo);
    font-weight: 500;
}

.timeline-load-more-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    padding: .375rem 0;
    font-size: .6875rem;
    color: var(--text-disabled);
    font-weight: 500;
}

/* Loading */
.inbox-timeline-loading {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem 0;
}

.timeline-skeleton-left {
    display: flex;
    justify-content: flex-start;
}

.timeline-skeleton-right {
    display: flex;
    justify-content: flex-end;
}

.timeline-skeleton-center {
    display: flex;
    justify-content: center;
}

/* Empty */
.inbox-timeline-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: var(--text-disabled);
    font-size: .8125rem;
}

.inbox-timeline-empty p {
    margin: 0;
}

/* ── Date Separator ── */
.timeline-date-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .625rem 0 .375rem;
}

.timeline-date-sep span {
    background: var(--mud-palette-white);
    border: 1px solid var(--border-light);
    padding: 3px .75rem;
    border-radius: 12px;
    font-size: .625rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

/* ============================================================
   MESSAGE ROW — LiveChat-inspired layout
   Each row: [avatar-col] [content-col]
   Inbound: avatar left, bubble left-aligned
   Outbound: bubble right-aligned, avatar right
   ============================================================ */

.timeline-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 75%;
    margin-bottom: 1px;
}

.timeline-msg-row.timeline-msg-in {
    align-self: flex-start;
    flex-direction: row;
}

.timeline-msg-row.timeline-msg-out {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* Extra spacing before a new message group */
.timeline-msg-row.timeline-msg-first {
    margin-top: 12px;
}

/* Extra spacing after last message in group */
.timeline-msg-row.timeline-msg-last {
    margin-bottom: 4px;
}

/* ── Avatar Column ── */
.timeline-msg-avatar-col {
    width: 32px;
    min-width: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--mud-palette-white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
    transition: transform .15s;
}

.timeline-msg-avatar:hover {
    transform: scale(1.08);
}

.timeline-avatar-bot {
    background: linear-gradient(135deg, var(--text-disabled), var(--text-secondary));
    color: var(--mud-palette-white);
}

.timeline-avatar-customer {
    /* Color from GetAvatarColor helper */
}

.timeline-avatar-agent {
    /* Color from GetAvatarColor helper */
}

/* ── Content Column ── */
.timeline-msg-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

/* ── Sender Label ── */
.timeline-msg-sender {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    padding: 0 4px;
}

.timeline-msg-in .timeline-msg-sender {
    justify-content: flex-start;
}

.timeline-msg-out .timeline-msg-sender {
    justify-content: flex-end;
}

.timeline-msg-sender-name {
    font-size: .6875rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.timeline-msg-sender-time {
    font-size: .5625rem;
    color: var(--text-disabled);
    font-weight: 500;
}

/* ── Bubble ── */
.timeline-msg-bubble {
    padding: .5rem .875rem;
    border-radius: 18px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* Inbound bubble — first/middle/last radius logic */
.timeline-msg-in .timeline-msg-bubble {
    background: var(--mud-palette-white);
    border: 1px solid #e8ecf1;
    color: var(--text-primary);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 6px;
}

.timeline-msg-in.timeline-msg-first .timeline-msg-bubble {
    border-top-left-radius: 18px;
}

.timeline-msg-in:not(.timeline-msg-first) .timeline-msg-bubble {
    border-top-left-radius: 6px;
}

.timeline-msg-in.timeline-msg-last .timeline-msg-bubble {
    border-bottom-left-radius: 4px;
}

/* Outbound bubble */
.timeline-msg-out .timeline-msg-bubble {
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    color: var(--mud-palette-white);
    border: none;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 6px;
}

.timeline-msg-out.timeline-msg-first .timeline-msg-bubble {
    border-top-right-radius: 18px;
}

.timeline-msg-out:not(.timeline-msg-first) .timeline-msg-bubble {
    border-top-right-radius: 6px;
}

.timeline-msg-out.timeline-msg-last .timeline-msg-bubble {
    border-bottom-right-radius: 4px;
}

.timeline-msg-text {
    font-size: .8125rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.timeline-msg-time {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 3px;
    font-size: .5625rem;
    opacity: .5;
}

/* ── Media ── */
.timeline-msg-img-wrap {
    margin-bottom: 6px;
    border-radius: 12px;
    overflow: hidden;
}

.timeline-msg-img {
    max-width: 260px;
    max-height: 200px;
    display: block;
    object-fit: cover;
}

.timeline-msg-file {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .625rem;
    border-radius: 8px;
    font-size: .75rem;
    text-decoration: none;
    margin-bottom: 4px;
    transition: opacity .12s;
}

.timeline-msg-in .timeline-msg-file {
    background: var(--bg-subtle);
    color: var(--indigo);
}

.timeline-msg-out .timeline-msg-file {
    background: rgba(255, 255, 255, .15);
    color: var(--mud-palette-white);
}

.timeline-msg-file:hover {
    opacity: .8;
}

.timeline-msg-fsize {
    font-size: .625rem;
    opacity: .7;
}

/* ============================================================
   CALL EVENT CARD
   ============================================================ */

.timeline-call {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--mud-palette-white);
    align-self: center;
    max-width: 480px;
    width: 100%;
    margin: .25rem 0;
    transition: box-shadow .12s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.timeline-call:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.timeline-call-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.call-completed .timeline-call-icon {
    background: rgba(34, 197, 94, .1);
    color: var(--success-medium);
}

.call-failed .timeline-call-icon {
    background: rgba(239, 68, 68, .1);
    color: var(--error-dark);
}

.call-busy .timeline-call-icon {
    background: rgba(245, 158, 11, .1);
    color: var(--warning-dark);
}

.call-active .timeline-call-icon {
    background: rgba(59, 130, 246, .1);
    color: var(--info-dark);
}

.call-default .timeline-call-icon {
    background: rgba(107, 114, 128, .1);
    color: var(--gray-500);
}

.timeline-call-body {
    flex: 1;
    min-width: 0;
}

.timeline-call-row1 {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.timeline-call-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-call-status {
    font-size: .625rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: capitalize;
}

.call-completed .timeline-call-status {
    background: rgba(34, 197, 94, .08);
    color: var(--success-medium);
}

.call-failed .timeline-call-status {
    background: rgba(239, 68, 68, .08);
    color: var(--error-dark);
}

.call-busy .timeline-call-status {
    background: rgba(245, 158, 11, .08);
    color: var(--warning-dark);
}

.call-active .timeline-call-status {
    background: rgba(59, 130, 246, .08);
    color: var(--info-dark);
}

.call-default .timeline-call-status {
    background: rgba(107, 114, 128, .08);
    color: var(--gray-500);
}

.timeline-call-row2 {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin-top: 3px;
}

.timeline-call-dur {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .6875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.timeline-call-time {
    font-size: .6875rem;
    color: var(--text-disabled);
}

.timeline-call-expand {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-disabled);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s;
    flex-shrink: 0;
}

.timeline-call-expand:hover {
    background: var(--bg-subtle);
    color: var(--text-tertiary);
}

/* ── Call Events Timeline ── */
.timeline-call-events {
    align-self: center;
    max-width: 480px;
    width: 100%;
    padding: .5rem 1rem .5rem 3.75rem;
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: var(--mud-palette-white);
    margin-top: -6px;
    margin-bottom: .25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.timeline-call-evt {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem 0;
    position: relative;
    padding-left: 1rem;
}

.timeline-call-evt::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: var(--border-light);
}

.timeline-call-evt:last-child::before {
    display: none;
}

.timeline-call-evt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--indigo);
    position: absolute;
    left: 0;
    z-index: 1;
}

.timeline-call-evt-type {
    font-size: .75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.timeline-call-evt-status {
    font-size: .625rem;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    padding: 1px 6px;
    border-radius: 4px;
}

.timeline-call-evt-time {
    font-size: .625rem;
    color: var(--text-disabled);
    margin-left: auto;
}

/* ============================================================
   COMPOSE BAR
   ============================================================ */

.inbox-compose {
    padding: .625rem 1.25rem;
    background: var(--mud-palette-white);
    border-top: 1px solid var(--border-light);
}

.inbox-compose-inner {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: .375rem .5rem .375rem 1rem;
    transition: border-color .15s, box-shadow .15s;
}

.inbox-compose-inner:focus-within {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .08);
    background: var(--mud-palette-white);
}

.inbox-compose-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: .8125rem;
    font-family: inherit;
    color: var(--text-primary);
    min-width: 0;
    padding: .25rem 0;
}

.inbox-compose-input::placeholder {
    color: var(--text-disabled);
}

.inbox-compose-input:disabled {
    opacity: .5;
}

.inbox-compose-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--border-light);
    color: var(--text-disabled);
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s;
}

.inbox-compose-send-active {
    background: linear-gradient(135deg, var(--indigo), var(--violet-dark));
    color: var(--mud-palette-white);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, .3);
}

.inbox-compose-send-active:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(99, 102, 241, .4);
}

.inbox-compose-send:disabled {
    opacity: .6;
    cursor: default;
    transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .inbox-sidebar {
        width: 100%;
        min-width: unset;
    }

    .inbox-sidebar-hidden-mobile {
        display: none;
    }

    .inbox-back-btn {
        display: flex;
    }

    .timeline-msg-row {
        max-width: 90%;
    }

    .inbox-topbar .inbox-title {
        font-size: .875rem;
    }

    .timeline-call {
        max-width: 100%;
    }

    .timeline-call-events {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .inbox-topbar {
        padding: 0 .75rem;
    }

    .inbox-contact {
        padding: .5rem .75rem;
    }

    .inbox-timeline {
        padding: .75rem;
    }

    .detail-tabs {
        padding: 0 .75rem;
    }

    .detail-tab {
        padding: .5rem .75rem;
        font-size: .75rem;
    }
}

/* ── Loan View Additions ── */

.inbox-section-header {
    padding: .5rem 1rem .25rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--text-disabled);
    text-transform: uppercase;
}

.inbox-section-unassigned {
    margin-top: .5rem;
    border-top: 1px solid var(--border-light);
    padding-top: .75rem;
    color: var(--warning);
}

.inbox-loan-type {
    font-size: .65rem;
    font-weight: 500;
    color: var(--indigo);
    background: var(--indigo-lightest);
    border-radius: 4px;
    padding: 1px 6px;
    margin-right: 4px;
}

.inbox-phone-select {
    font-size: .75rem;
    color: var(--text-tertiary);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 2px 8px;
    outline: none;
    cursor: pointer;
    max-width: 280px;
}

.inbox-phone-select:focus {
    border-color: var(--indigo);
}

.inbox-unassigned-badge {
    font-size: .65rem;
    font-weight: 600;
    color: var(--warning);
    background: #fffbeb;
    border-radius: 4px;
    padding: 1px 6px;
}

/* ── Calls Section ── */
.inbox-section-calls {
    margin-top: .5rem;
    border-top: 1px solid var(--border-light);
    padding-top: .75rem;
    color: var(--violet);
}

.inbox-call-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--mud-palette-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.inbox-call-avatar.call-completed {
    background: linear-gradient(135deg, var(--success-light), var(--success-medium));
}

.inbox-call-avatar.call-failed {
    background: linear-gradient(135deg, var(--error), var(--error-dark));
}

.inbox-call-avatar.call-busy {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
}

.inbox-call-avatar.call-active {
    background: linear-gradient(135deg, var(--info), var(--info-dark));
}

.inbox-call-avatar.call-default {
    background: linear-gradient(135deg, var(--text-disabled), var(--text-secondary));
}

.inbox-call-avatar-lg {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--mud-palette-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.inbox-call-avatar-lg.call-completed {
    background: linear-gradient(135deg, var(--success-light), var(--success-medium));
}

.inbox-call-avatar-lg.call-failed {
    background: linear-gradient(135deg, var(--error), var(--error-dark));
}

.inbox-call-avatar-lg.call-busy {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
}

.inbox-call-avatar-lg.call-active {
    background: linear-gradient(135deg, var(--info), var(--info-dark));
}

.inbox-call-avatar-lg.call-default {
    background: linear-gradient(135deg, var(--text-disabled), var(--text-secondary));
}

.inbox-call-direction {
    font-size: .625rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.inbox-call-status-tag {
    font-size: .5625rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: capitalize;
}

.inbox-call-status-tag.call-completed {
    background: rgba(34, 197, 94, .08);
    color: var(--success-medium);
}

.inbox-call-status-tag.call-failed {
    background: rgba(239, 68, 68, .08);
    color: var(--error-dark);
}

.inbox-call-status-tag.call-busy {
    background: rgba(245, 158, 11, .08);
    color: var(--warning-dark);
}

.inbox-call-status-tag.call-active {
    background: rgba(59, 130, 246, .08);
    color: var(--info-dark);
}

.inbox-call-status-tag.call-default {
    background: rgba(107, 114, 128, .08);
    color: var(--gray-500);
}

/* ============================================================
   EMBEDDED MODE (Form1003 Communication Panel)
   ============================================================ */
.inbox-shell-embedded {
    height: calc(100vh - 220px);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.inbox-shell-embedded .inbox-detail {
    max-width: 100%;
}

/* ==============================================================================
   SECTION 5: Landing pages (migrated from .razor.css scoped files)
   ============================================================================== */

/* ---- Pages/Tools/Landing.razor (Realtor Landing Page) ---- */
/* Realtor Landing Page Styles */

.realtor-landing-page {
    min-height: 100vh;
    background: var(--mud-palette-background);
}

/* AvalMe Header */
.avalme-header {
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.hero-section-realtor {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-section-realtor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.realtor-avatar {
    width: 150px !important;
    height: 150px !important;
    border: 5px solid white;
    box-shadow: 0 10px 40px var(--black-alpha-20);
    margin: 0 auto;
}

.realtor-avatar-default {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.realtor-name {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px var(--black-alpha-20);
}

.professional-summary {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Content Container */
.content-container {
    padding: 3rem 1rem;
}

/* Section Spacing */
.section-spacing {
    margin: 4rem 0;
}

.landing-section-title {
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.landing-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-accent) 0%, var(--purple-accent) 100%);
    border-radius: 2px;
}

/* About Card */
.about-card {
    padding: 3rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--black-alpha-8);
}

.profile-text {
    line-height: 1.8;
    color: var(--mud-palette-text-secondary);
    font-size: 1.1rem;
}

/* Professional Info Cards */
.professional-info-section {
    background: var(--mud-palette-surface);
    padding: 3rem 1rem;
    border-radius: 16px;
}

.info-card {
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    transition: all 0.3s ease;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--black-alpha-15);
}

.info-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px var(--black-alpha-15);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 4rem 1rem;
    border-radius: 16px;
}

.contact-form-card {
    padding: 3rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--black-alpha-8);
}

.consent-checkbox {
    font-size: 0.95rem;
}

.submit-button {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s ease !important;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

/* Footer */
.landing-footer {
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 960px) {
    .hero-section-realtor {
        padding: 3rem 0;
    }

    .realtor-avatar {
        width: 120px !important;
        height: 120px !important;
    }

    .realtor-name {
        font-size: 2rem;
    }

    .professional-summary {
        font-size: 1.1rem;
    }

    .about-card,
    .contact-form-card {
        padding: 2rem;
    }

    .info-card {
        padding: 2rem 1.5rem;
    }

    .section-spacing {
        margin: 3rem 0;
    }
}

@media (max-width: 600px) {
    .content-container {
        padding: 2rem 1rem;
    }

    .realtor-avatar {
        width: 100px !important;
        height: 100px !important;
    }

    .realtor-name {
        font-size: 1.75rem;
    }

    .professional-summary {
        font-size: 1rem;
    }

    .about-card,
    .contact-form-card {
        padding: 1.5rem;
    }

    .info-icon-container {
        width: 60px;
        height: 60px;
    }

    .section-spacing {
        margin: 2rem 0;
    }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {

    .about-card,
    .contact-form-card {
        box-shadow: 0 4px 20px var(--black-alpha-30);
    }

    .info-card:hover {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }
}

/* ---- Shared/LandingPage.razor (AvalMe Landing) ---- */
.avalme-bottom-shadow {
    position: absolute;
    width: 1440px;
    height: 20px;
    background: linear-gradient(180deg, var(--black-alpha-30) 0%, rgba(245, 245, 245, 0) 100%);
    z-index: 60;
}

.shadow {
    position: absolute;
    left: 50%;
    width: 270px;
    height: 465px;
    background: linear-gradient(90deg, #F5F5F5 0%, rgba(245, 245, 245, 0) 100%);
    z-index: 50;
}

.avalme-landing-global-container {
    max-width: 1440px;
    margin: 0 auto;
}

.landing-header-img {
    position: absolute;
    z-index: 0;
}

.landing-header-content {
    min-height: 800px;
    z-index: 5;
}

.landing-header-content-left {
    max-width: 450px;
    color: var(--mud-palette-white);
    z-index: 100;
}

.landing-header-background-img {
    background: url('../landing-header-background-image.png') no-repeat;
    opacity: 20%;
    position: absolute;
    width: 750px;
    height: 500px;
    clip-path: ellipse(45% 50% at 50% 50%);
    z-index: 10;
}

.landing-header-background-img:before {
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: radial-gradient(center, ellipse cover, rgba(255, 255, 255, 1) 0%, var(--black-alpha-20) 100%);
}

.landing-header-over-img {
    position: absolute;
    bottom: 10%;
    right: 10%;
    z-index: 15;
}

.landing-regular-section {
    background-color: #F1F1F1;
}

.avalme-button {
    border-radius: 10px;
    padding: 4px 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 18.75px;
    text-transform: none;
}

.avalme-primary-button {
    background: linear-gradient(275deg, #33EC00 0%, #CAFF3C 100%);
    width: max-content;
}

.avalme-secondary-button {
    border: 0;
    background-image: linear-gradient(150deg, #33EC00 0%, #CAFF3C 100%);
    color: #33EC00;
    padding: 1px;
    display: flex;
    cursor: pointer;
    transition: .3s;
}

.avalme-secondary-button span {
    background-color: #5F008C;
    padding: 1px 8px 2px;
    border-radius: 10px;
}

.avalme-secondary-button span span {
    padding-right: 0px;
}

.avalme-subtitle {
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;
    color: #260038;
}

.avalme-divider {
    height: 2px;
    background: radial-gradient(50% 86% at 50% 50%, #33EC00 0%, rgba(241, 241, 241, 0) 100%);
}

.avalme-footer-divider {
    height: 2px;
    background: radial-gradient(center, ellipse cover, rgba(255, 255, 255, 1) 0%, rgba(230, 230, 230, 1) 30%, rgba(171, 171, 171, 0.05) 100%);
}

.avalme-featured-app-card {
    border-radius: 10px;
    box-shadow: none;
}

.avalme-featured-app-card:hover {
    box-shadow: 0px 0px 30px 5px rgba(143, 143, 143, 1);
}

.avalme-featured-app-logo {
    text-align: center;
}

.avalme-featured-app-title-1 {
    font-family: 'Lemon/milk', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 34px;
    line-height: 46px;
    color: #580181;
}

.avalme-featured-app-title-2 {
    font-family: 'Lemon/milk', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 27px;
    color: #580181;
}

.avalme-featured-app-subtitle {
    font-family: 'Lemon/Milk', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 10px;
    line-height: 14px;
    letter-spacing: 0.5em;
    color: #580181;
}

.avalme-featured-app-service-title-1,
.avalme-featured-app-service-title-2 {
    font-family: 'Lemon/Milk', sans-serif;
    font-style: normal;
    font-weight: 700;
}

.avalme-featured-app-content {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 14px;
    color: #000000;
}

.avalme-featured-app-service-title-1 {
    font-family: 'Lemon/Milk';
    font-style: normal;
    font-weight: 600;
    font-size: 22px;
}

.avalme-featured-app-service-title-2 {
    font-family: 'Lemon/Milk';
    font-style: normal;
    font-weight: 600;
    font-size: 13px;
}

.avalme-featured-app-services {
    color: #C1C1C1;
}

.avalme-featured-app-services:hover {
    color: #580181;
}

.avalme-about-us-section {
    min-width: 1440px;
    padding: 40px 0;
    background: url('../businessmen-bg.svg') top right no-repeat;
}

.avalme-about-us-title {
    color: #580181;
    font-style: normal;
    font-weight: 400;
    font-size: 32px;
    line-height: 38px;
}

.avalme-about-us-text {
    color: #580181;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
}

.avalme-contact-section {
    min-width: 1440px;
    background: linear-gradient(275deg, #33EC00 0%, #CAFF3C 100%);
}

.avalme-footer-section {
    min-width: 1440px;
    background: linear-gradient(105deg, #260038 0%, #5F008C 100%);
    color: white;
}

.avalme-footer-section-title {
    font-style: normal;
    font-weight: 400;
    font-size: 32px;
    line-height: 38px;
    margin-bottom: 10px;
}

.avalme-footer-section-text {
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
}

/* ==============================================================================
   SECTION 6: Legacy app.css (merged into avalme.css — screen+print styles)
   Note: The original file was loaded with media="print" but contained mostly
   screen styles. Kept as-is so inner @media print/screen rules stay intact.
   ============================================================================== */

:root {
    --mud-appbar-height: 50px !important;
}

@font-face {
    /*font-family: 'Lemon/Milk';
    src: url('https://www.fontsaddict.com/fontface/lemonmilk.ttf');*/
}

/* Responsive */

.mud-dialog-width-full {
    width: 100%;
}

.mud-dialog .mud-dialog-content {
    padding: 0;
}

ul.validation-errors li.validation-message,
p.mud-typography.mud-typography-body1.mud-error-text,
.mud-error-text {
    color: var(--mud-palette-error);
    font-size: small;
}

/* Responsive */

.validation-message {
    color: #f44336;
    margin: 0;
    font-size: .8rem;
    margin-top: 3px;
    text-align: start;
    font-weight: 400;
    line-height: 1.66;
    letter-spacing: .03333em;
}

.mud-snackbar-location-bottom-left {
    bottom: 50px !important;
}

.mud-snackbar-location-bottom-right {
    bottom: 50px !important;
}

.mud-snackbar.mud-alert-filled-info {
    max-width: 992px;
    width: 100%;
}

/*AVALME STYLES*/
span.ql-picker-label,
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
    color: var(--mud-palette-text-primary);
}

.ql-snow .ql-stroke {
    stroke: var(--mud-palette-text-primary);
}

.ql-editor.ql-blank::before {
    color: var(--mud-palette-text-primary);
}

.avalme-featured-app-card:hover .avalme-featured-app-logo img {
    -webkit-animation: Shake 1s ease-in-out;
    -moz-animation: Shake 1s ease-in-out;
    animation: Shake 1s ease-in-out;
}

.mud-switch {
    max-width: fit-content;
}

.mud-checkbox {
    max-width: fit-content;
}

.mud-main-content {
    padding-bottom: 72px !important;
}

@keyframes Shake {
    from {
        transform: rotate('0deg');
    }

    30% {
        transform: rotate('30deg');
    }

    50% {
        transform: rotate('-30deg');
    }

    to {
        transform: rotate('0deg');
    }
}

@-webkit-keyframes Shake {
    from {
        transform: rotate('0deg');
    }

    30% {
        transform: rotate('30deg');
    }

    50% {
        transform: rotate('-30deg');
    }

    to {
        transform: rotate('0deg');
    }
}

.mud-input-control>.mud-input-control-input-container>div.mud-input.mud-input-text {
    margin: 0;
}

@media screen and (max-width: 690px) {
    .mud-appbar .mud-toolbar-appbar {
        padding: 0;
    }

    .mud-menu.language-switcher {
        min-width: 133px;
    }
}

@media screen and (max-width: 600px) {
    .mud-typography.mud-typography-h6.avalme-tittle {
        font-size: 24px;
    }

    .default-menu-options {
        display: none;
    }

    .responsive-menu-options {
        display: block;
    }

    .mud-dialog-width-full {
        width: 100%;
    }
}

@media screen and (max-width: 490px) {}

@media print and (orientation: portrait) {

    /* Reglas para imprimir en formato vertical */
    body * {
        visibility: hidden;
    }

    .print-container,
    .print-container * {
        visibility: visible;
    }

    .print-container {
        position: absolute;
        top: 0;
        left: 0;
        background-color: black;
    }
}

/* Image Viewer Dialog Styles */
.image-viewer-backdrop {
    background-color: rgba(0, 0, 0, 0.95) !important;
}

.image-viewer-backdrop .mud-overlay-content {
    width: 100%;
    height: 100%;
}

.mud-dialog.image-viewer-dialog,
.mud-dialog-container .image-viewer-dialog {
    background: transparent !important;
    box-shadow: none !important;
}

.image-viewer-dialog .mud-dialog-title {
    background: rgba(0, 0, 0, 0.7) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-viewer-dialog .mud-dialog-content {
    background: transparent !important;
    padding: 0 !important;
}

/* Section Notes Drawer - Global styles to override MudDrawer internals */
.section-notes-drawer-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    padding: 0 !important;
}
