﻿/* =============================================
   CRM CONTACT DETAIL VIEW
   Prefix: cv-, pi-, crm-contact-detail-
   Used by: ViewContactComponent.razor
   ============================================= */

:root {
    --cm-primary: #6366f1;
    --cm-primary-light: #eef2ff;
    --cm-primary-dark: #4f46e5;
}

/* =============================================
   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, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 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 rgba(0, 0, 0, 0.04);
}

.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 ========== */
.cv-back-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.cv-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-back-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

/* ========== PROFILE CARD ========== */
.cv-profile-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cv-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, #6366f1, #7c3aed);
    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 rgba(99, 102, 241, 0.3);
}

.cv-edit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cv-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.cv-avatar {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.cv-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cv-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-upload-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.cv-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 rgba(0, 0, 0, 0.1);
}

.cv-favorite-btn:hover {
    color: #f59e0b;
    border-color: #f59e0b;
    background: var(--mud-palette-surface);
}

.cv-favorite-btn.active {
    color: #f59e0b;
    background: rgba(251, 191, 36, 0.15);
    border-color: #fbbf24;
}

.cv-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cv-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.cv-profile-title {
    font-size: 1rem;
    color: #64748b;
}

.cv-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 rgba(0, 0, 0, 0.08);
}

.cv-profile-badge.personal {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.cv-profile-badge.business {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #047857;
}

.cv-profile-badge.vip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.cv-profile-badge.client {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #047857;
}

.cv-profile-badge.lead {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
}

.cv-profile-badge.partner {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #be185d;
}

.cv-profile-badge.vendor {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #c2410c;
}

.cv-profile-badge.individual {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.cv-profile-badge.company {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #7c3aed;
}

/* ========== DETAIL TABS ========== */
.cv-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--mud-palette-surface);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.cv-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: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-detail-tab-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.cv-detail-tab-btn.active {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #6366f1;
    border-color: #c7d2fe;
    font-weight: 600;
}

/* ========== CONTENT CARD ========== */
.cv-content-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.cv-content-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Override absolute positioning for edit button inside content title */
.cv-content-title .cv-edit-btn {
    position: static;
    flex-shrink: 0;
}

/* ========== STATUS GRID (AVALME) ========== */
.cv-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cv-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);
}

.cv-status-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
}

.cv-status-value {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    font-weight: 500;
}

.cv-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;
}

.cv-status-badge.connected {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #047857;
}

.cv-status-badge.pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.cv-status-badge.not-connected {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #64748b;
}

/* ========== ACTIONS SECTION ========== */
.cv-actions-section {
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.cv-actions-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 1rem;
}

.cv-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cv-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;
}

.cv-action-btn.primary {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.cv-action-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cv-action-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.cv-action-btn.secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.cv-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== CONNECTIONS LIST ========== */
.cv-connections-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-connection-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cv-connection-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cv-connection-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.cv-connection-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cv-connection-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.cv-connection-relationship {
    font-size: 0.8125rem;
    color: #64748b;
}

/* ========== FORM SECTIONS ========== */
.cv-form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.cv-form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cv-form-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.cv-form-section-title .mud-icon-root {
    color: #6366f1;
}

.cv-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.cv-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cv-form-group.full-width {
    grid-column: 1 / -1;
}

.cv-form-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.cv-form-value {
    font-size: 0.9375rem;
    color: #1e293b;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    min-height: 40px;
}

.cv-form-value.empty {
    color: #94a3b8;
    font-style: italic;
}

/* =============================================
   PI - PERSONAL INFORMATION SECTION STYLES
   ============================================= */

.pi-section-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f5f9;
}

.pi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.pi-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.pi-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    color: #6366f1;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pi-edit-btn:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.pi-grid {
    display: grid;
    gap: 1rem;
}

.pi-grid-1 { grid-template-columns: 1fr; }
.pi-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.pi-grid-5 { grid-template-columns: repeat(5, 1fr); }

.pi-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.pi-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.pi-value {
    font-size: 0.9375rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.pi-link {
    color: #6366f1;
    text-decoration: none;
}

.pi-link:hover {
    text-decoration: underline;
}

.pi-color-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pi-days-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pi-day-tag {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pi-day-tag.weekday {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #6366f1;
}

.pi-day-tag.weekend {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

/* =============================================
   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: #f8fafc;
    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, #7c3aed, #6366f1);
    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: #f1f5f9;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.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, #eef2ff, #e0e7ff);
    color: #6366f1;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.crm-contact-detail-multi-entry-row:hover .crm-contact-detail-entry-icon {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: white;
}

.crm-contact-detail-multi-entry-row.primary .crm-contact-detail-entry-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.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: #1e293b;
}

.crm-contact-detail-entry-type {
    font-size: 0.75rem;
    color: #64748b;
}

.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, #fef3c7, #fde68a);
    color: #b45309;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid #fcd34d;
    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: rgba(139, 92, 246, 0.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: rgba(59, 130, 246, 0.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: rgba(34, 197, 94, 0.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: rgba(249, 115, 22, 0.15);
}

.crm-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.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 rgba(0, 0, 0, 0.06);
}

.crm-empty-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed rgba(99, 102, 241, 0.2);
    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: #6366f1;
    font-size: 2rem;
}

.crm-empty-state-box.purple .crm-empty-icon { 
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.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: #8b5cf6; }

.crm-empty-state-box.blue .crm-empty-icon { 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.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: #3b82f6; }

.crm-empty-state-box.green .crm-empty-icon { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.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: #10b981; }

.crm-empty-state-box.orange .crm-empty-icon { 
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.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: #f97316; }

.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: #1f2937;
    letter-spacing: -0.01em;
}

.crm-empty-desc {
    font-size: 0.875rem;
    color: #6b7280;
    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, #6366f1 0%, #7c3aed 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 rgba(99, 102, 241, 0.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, #f97316 0%, #ea580c 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, #10b981 0%, #059669 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
   ============================================= */

.cv-family-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-family-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cv-family-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cv-family-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.cv-family-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cv-family-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.cv-family-relationship {
    font-size: 0.8125rem;
    color: #64748b;
}

.cv-family-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cv-family-item:hover .cv-family-actions {
    opacity: 1;
}

.cv-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-icon-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* =============================================
   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, #ffffff 0%, #f8fafc 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(--clp-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.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, #6366f1 0%, #4f46e5 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
   ============================================= */

.cv-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cv-task-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cv-task-item.overdue {
    background: #fef2f2;
    border-color: #fecaca;
}

.cv-task-checkbox {
    flex-shrink: 0;
}

.cv-task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cv-task-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
}

.cv-task-due {
    font-size: 0.8125rem;
    color: #64748b;
}

.cv-task-priority {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cv-task-priority.priority-high {
    background: #fef2f2;
    color: #dc2626;
}

.cv-task-priority.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.cv-task-priority.priority-low {
    background: #dbeafe;
    color: #2563eb;
}

/* =============================================
   FOLLOW-UP LIST STYLES
   ============================================= */

.cv-followup-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-followup-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cv-followup-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cv-followup-item.completed {
    opacity: 0.6;
}

.cv-followup-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    flex-shrink: 0;
}

.cv-followup-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cv-followup-type {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.cv-followup-date {
    font-size: 0.8125rem;
    color: #64748b;
}

.cv-followup-notes {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* =============================================
   NOT FOUND STYLES
   ============================================= */

.cv-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.cv-not-found-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.cv-not-found h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 0.5rem 0;
}

.cv-not-found p {
    font-size: 0.9375rem;
    color: #64748b;
    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: rgba(236, 72, 153, 0.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: #ec4899;
}

.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: #14b8a6;
}

.crm-empty-state-box.indigo {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(129, 140, 248, 0.04) 100%);
    border-color: rgba(99, 102, 241, 0.15);
}

.crm-empty-state-box.indigo .crm-empty-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(129, 140, 248, 0.12) 100%);
}

.crm-empty-state-box.indigo .crm-empty-icon .mud-icon-root {
    color: #6366f1;
}

/* =============================================
   RESPONSIVE STYLES
   ============================================= */

@media (max-width: 768px) {
    .cv-profile-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .cv-edit-btn {
        position: static;
        margin-bottom: 1rem;
    }

    .cv-detail-tabs {
        justify-content: center;
    }

    .cv-form-grid {
        grid-template-columns: 1fr;
    }

    .pi-grid-2,
    .pi-grid-3,
    .pi-grid-4,
    .pi-grid-5 {
        grid-template-columns: 1fr;
    }

    .cv-status-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   PI - PERSONAL INFORMATION SECTION STYLES
   Used by: ViewContactComponent.razor
   ============================================= */

/* Section Card */
.pi-section-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.pi-section-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Section Header */
.pi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.pi-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
    display: flex;
}

/* Edit Button - Hidden by default, shown on hover */
.pi-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    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);
}

.pi-section-card:hover .pi-edit-btn {
    opacity: 1;
    transform: translateX(0);
}

.pi-edit-btn:hover {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    border-color: #6366f1;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.pi-edit-btn:active {
    transform: translateY(0) scale(0.98);
}

.pi-edit-btn .mud-icon-root {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.pi-edit-btn:hover .mud-icon-root {
    transform: rotate(-5deg) scale(1.1);
}

/* Grid Layouts */
.pi-grid {
    display: grid;
    gap: 1rem;
}

.pi-grid-1 { grid-template-columns: 1fr; }
.pi-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.pi-grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Field Styles */
.pi-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.pi-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.pi-value {
    font-size: 0.9375rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.pi-link {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pi-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.pi-color-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Communication Preferences - Enhanced Field Styles */
.pi-comm-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.pi-comm-field:hover {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.pi-comm-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.pi-comm-icon.languages {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.pi-comm-icon.preferred-lang {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}

.pi-comm-icon.method {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    box-shadow: 0 3px 10px rgba(20, 184, 166, 0.3);
}

.pi-comm-icon.time {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.pi-comm-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pi-comm-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.pi-comm-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
}

.pi-comm-value.empty {
    color: #94a3b8;
    font-style: italic;
}

/* Communication Grid */
.pi-comm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 992px) {
    .pi-comm-grid {
        grid-template-columns: 1fr;
    }
}

/* Day Tags - Enhanced */
.pi-days-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: 12px;
    border: 1px solid #e9d5ff;
}

.pi-days-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pi-days-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.pi-days-icon .mud-icon-root {
    font-size: 0.875rem;
}

.pi-days-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7c3aed;
}

.pi-days-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pi-day-tag {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
}

.pi-day-tag:hover {
    transform: translateY(-1px);
}

.pi-day-tag.weekday {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

.pi-day-tag.weekday:hover {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.15);
}

.pi-day-tag.weekend {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.15);
}

.pi-day-tag.weekend:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
}

/* Skills & Certifications Grid */
.pi-skills-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pi-skill-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.pi-skill-card:hover {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.pi-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);
}

.pi-skill-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.pi-skill-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.pi-skill-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.5;
}

.pi-skill-value.empty {
    color: #94a3b8;
    font-style: italic;
}

/* Skills Tags Container */
.pi-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.pi-skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
}

.pi-skill-tag:hover {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

/* Notes Section Styles */
.pi-notes-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pi-note-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: 12px;
    border: 1px solid #e9d5ff;
    transition: all 0.2s ease;
}

.pi-note-card:hover {
    border-color: #d8b4fe;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.pi-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);
}

.pi-note-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pi-note-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7c3aed;
}

.pi-note-value {
    font-size: 0.9375rem;
    color: #1e293b;
    line-height: 1.6;
    min-height: 60px;
}

.pi-note-value.empty {
    color: #a78bfa;
    font-style: italic;
}

/* ========== TASK LIST STYLES ========== */

/* Task Stats Grid */
.task-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .task-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.task-stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.task-stat-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.task-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.task-stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

.task-stat-icon.amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
}

.task-stat-icon.green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 3px 8px rgba(34, 197, 94, 0.3);
}

.task-stat-icon.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
}

.task-stat-info {
    display: flex;
    flex-direction: column;
}

.task-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.task-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Task Filter Bar */
.task-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.375rem;
    background: #f1f5f9;
    border-radius: 10px;
}

.task-filter-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-filter-btn:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

.task-filter-btn.active {
    background: white;
    color: #6366f1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 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 rgba(0, 0, 0, 0.08);
}

.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 #ef4444 !important;
}

.task-item.overdue:not(.completed) {
    background: linear-gradient(90deg, #fef2f2 0%, white 100%);
}

.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;
    flex-wrap: wrap;
}

.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: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-priority.priority-high {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.task-priority.priority-medium {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #d97706;
    border: 1px solid #fde68a;
}

.task-priority.priority-low {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.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: #ef4444;
    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: #ef4444 !important;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    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: #f1f5f9;
    border: none;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-action-btn:hover {
    background: #e0e7ff;
    color: #6366f1;
}

.task-action-btn.delete:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Task Add Button - MudButton Style */
.task-add-btn-mud {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.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, #4f46e5 0%, #7c3aed 100%) !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4) !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, #6366f1 0%, #8b5cf6 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 rgba(99, 102, 241, 0.25);
    transform: none !important;
}

.task-add-btn:hover,
button.task-add-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    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: #64748b;
    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 #e2e8f0;
}

.task-pagination-info {
    font-size: 0.8125rem;
    color: #64748b;
}

.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 #e2e8f0;
    background: white;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-page-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.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 #e2e8f0;
    background: white;
    border-radius: 6px;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-page-num:hover:not(.active) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.task-page-num.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.task-page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #94a3b8;
    font-size: 0.875rem;
}

.task-pagination-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.task-page-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #1e293b;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-page-select:hover {
    border-color: #cbd5e1;
}

.task-page-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 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) {
    .pi-grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .pi-grid-4,
    .pi-grid-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .pi-grid-2,
    .pi-grid-3,
    .pi-grid-4,
    .pi-grid-5 { grid-template-columns: 1fr; }
    
    .pi-section-card { padding: 1rem; }
    
    /* Always show edit button on mobile */
    .pi-edit-btn {
        opacity: 1;
        transform: translateX(0);
    }
}

.crm-pi-dialog-header {
    display: flex;
    align-items: center;
}

.crm-pi-dialog-content {
    min-width: 500px;
    padding: 1rem 0;
}

.crm-pi-dialog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.crm-pi-dialog-field {
    min-width: 0;
}

@media (max-width: 600px) {
    .crm-pi-dialog-content {
        min-width: 100%;
    }

    .crm-pi-dialog-grid {
        grid-template-columns: 1fr;
    }
}


/* =============================================
   CRM EDIT DIALOG - Ultra Modern Design
   Unique prefix: crm-dlg-
   Used by: EmailEditDialog, PhoneEditDialog
   ============================================= */

.crm-dlg-premium-dialog .mud-dialog {
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    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%;
}

.crm-dlg-premium-dialog .mud-dialog-title,
.crm-dlg-premium-dialog .mud-dialog-content,
.crm-dlg-premium-dialog .mud-dialog-actions {
    padding: 0 !important;
    background: transparent;
}

/* ========== HEADER ========== */
.crm-dlg-premium-header {
    position: relative;
    padding: 1.75rem 2rem;
    overflow: hidden;
}

.crm-dlg-dialog-theme .crm-dlg-premium-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
}

.crm-dlg-header-bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.crm-dlg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
}

.crm-dlg-orb-1 {
    width: 200px;
    height: 200px;
    background: #c4b5fd;
    top: -60px;
    right: -40px;
    animation: crm-dlg-float1 6s ease-in-out infinite;
}

.crm-dlg-orb-2 {
    width: 150px;
    height: 150px;
    background: #a78bfa;
    bottom: -40px;
    left: 20%;
    animation: crm-dlg-float2 8s ease-in-out infinite;
}

@keyframes crm-dlg-float1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, 10px) scale(1.1);
    }
}

@keyframes crm-dlg-float2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(15px, -15px) scale(0.9);
    }
}

.crm-dlg-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;
}

.crm-dlg-header-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 1;
}

.crm-dlg-icon-container {
    position: relative;
    flex-shrink: 0;
}

.crm-dlg-icon-glow {
    position: absolute;
    inset: -8px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    filter: blur(12px);
    animation: crm-dlg-glow-pulse 2s ease-in-out infinite;
}

@keyframes crm-dlg-glow-pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.crm-dlg-icon-box {
    position: relative;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    color: white;
}

.crm-dlg-header-info {
    flex: 1;
    min-width: 0;
}

.crm-dlg-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: white;
    margin-bottom: 0.625rem;
}

.crm-dlg-tag-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: crm-dlg-blink 1.5s ease-in-out infinite;
}

@keyframes crm-dlg-blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.crm-dlg-header-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.crm-dlg-header-desc {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}

    .crm-dlg-header-desc strong {
        color: white;
        font-weight: 600;
    }

.crm-dlg-header-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background: rgba(255,255,255,0.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 */
.crm-dlg-premium-dialog .mud-dialog-close-button {
    position: absolute !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    color: white !important;
    background: rgba(255,255,255,0.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;
}

    .crm-dlg-premium-dialog .mud-dialog-close-button:hover {
        background: rgba(255,255,255,0.25) !important;
        transform: scale(1.05);
    }

    .crm-dlg-premium-dialog .mud-dialog-close-button .mud-icon-root {
        font-size: 1.125rem !important;
    }

.crm-dlg-counter-num {
    font-size: 1.375rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.crm-dlg-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 ========== */
.crm-dlg-premium-body {
    padding: 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Section Content Padding */
.crm-dlg-task-section .crm-dlg-section-header + * {
    padding: 1rem 1.25rem;
}

.crm-dlg-task-section .crm-dlg-section-header + .crm-dlg-task-templates-list {
    padding: 1rem 1.25rem;
}

.crm-dlg-task-section .crm-dlg-items-list {
    padding: 0.75rem 1.25rem;
}

.crm-dlg-task-section .crm-dlg-add-more-btn {
    margin: 0 1.25rem 1rem;
}

.crm-dlg-task-section .crm-dlg-form-grid {
    padding: 1rem 1.25rem;
}

.crm-dlg-task-section .crm-dlg-form-grid + .crm-dlg-form-grid {
    padding-top: 0;
}

.crm-dlg-task-section .crm-dlg-task-reminder-info {
    margin: 0 1.25rem 1rem;
}

/* Form Grid - for form-based dialogs */
.crm-dlg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.crm-dlg-form-grid.one-column {
    grid-template-columns: repeat(1, 1fr) !important;
}

.crm-dlg-form-field {
    min-width: 0;
}

    .crm-dlg-form-field:only-child,
    .crm-dlg-form-field.crm-dlg-full-width {
        grid-column: 1 / -1;
    }

.crm-dlg-form-input {
    width: 100%;
}

    .crm-dlg-form-input .mud-input-control-input-container {
        margin-top: 0 !important;
    }

    .crm-dlg-form-input .mud-input-outlined-border {
        border-color: #e2e8f0 !important;
        transition: all 0.2s ease !important;
    }

    .crm-dlg-form-input:hover .mud-input-outlined-border {
        border-color: #cbd5e1 !important;
    }

    .crm-dlg-form-input.mud-input-root-focused .mud-input-outlined-border,
    .crm-dlg-form-input .mud-input:focus-within .mud-input-outlined-border {
        border-color: #a78bfa !important;
        border-width: 2px !important;
    }

    .crm-dlg-form-input .mud-input-label {
        color: #64748b !important;
        font-weight: 500 !important;
    }

    .crm-dlg-form-input .mud-input-label-inputcontrol {
        font-size: 0.875rem !important;
    }

    .crm-dlg-form-input input,
    .crm-dlg-form-input .mud-select-input {
        font-size: 0.9375rem !important;
        color: #1e293b !important;
    }

    .crm-dlg-form-input .mud-input-helper-text {
        font-size: 0.75rem !important;
        color: #94a3b8 !important;
    }

@media (max-width: 600px) {
    .crm-dlg-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Zero State */
.crm-dlg-zero-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
}

.crm-dlg-zero-visual {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
}

.crm-dlg-zero-rings {
    position: absolute;
    inset: 0;
}

.crm-dlg-ring {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    animation: crm-dlg-ring-expand 3s ease-out infinite;
}

.crm-dlg-dialog-theme .crm-dlg-ring {
    border-color: #a78bfa;
}

.crm-dlg-ring-1 {
    inset: 0;
    animation-delay: 0s;
}

.crm-dlg-ring-2 {
    inset: -10px;
    animation-delay: 1s;
}

.crm-dlg-ring-3 {
    inset: -20px;
    animation-delay: 2s;
}

@keyframes crm-dlg-ring-expand {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.crm-dlg-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%;
}

.crm-dlg-dialog-theme .crm-dlg-zero-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
}

.crm-dlg-zero-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.crm-dlg-zero-text {
    margin: 0.5rem 0 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.crm-dlg-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);
}

.crm-dlg-dialog-theme .crm-dlg-cta-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.crm-dlg-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.45);
}

.crm-dlg-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 */
.crm-dlg-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* ========== ROW STYLES (Shared) ========== */
.crm-dlg-email-row,
.crm-dlg-phone-row,
.crm-dlg-address-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    animation: crm-dlg-row-in 0.3s ease backwards;
    animation-delay: calc(var(--i) * 0.05s);
}

.crm-dlg-email-row,
.crm-dlg-phone-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Phone Input Wrapper with IntlPhoneInput */
.crm-dlg-phone-input-wrapper {
    flex: 1;
    min-width: 240px;
}

.crm-dlg-phone-input-wrapper .intl-phone-wrapper {
    gap: 0;
}

.crm-dlg-phone-input-wrapper .intl-phone-input {
    min-height: 46px;
    background: var(--mud-palette-surface);
    border-width: 1.5px;
}

.crm-dlg-phone-input-wrapper .intl-phone-country-selector {
    padding: 0.625rem 0.5rem 0.625rem 0.875rem;
    gap: 0.5rem;
}

.crm-dlg-phone-input-wrapper .intl-phone-flag-img {
    width: 22px;
    height: 16px;
}

.crm-dlg-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;
}

.crm-dlg-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;
}

.crm-dlg-phone-input-wrapper .intl-phone-number-input .mud-input {
    margin-top: 0 !important;
}

.crm-dlg-phone-input-wrapper .intl-phone-number-input .mud-input.mud-input-underline:after {
    border-bottom: 0px !important;
}

.crm-dlg-phone-input-wrapper .intl-phone-number-input .mud-input.mud-input-underline:before {
    border-bottom: 0px !important;
}

.crm-dlg-phone-input-wrapper .intl-phone-country-list {
    max-height: 240px;
}

/* Primary row styling */
.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-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: #fcd34d;
}

.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-phone-input-wrapper .intl-phone-wrapper.focused .intl-phone-input,
.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-phone-input-wrapper .intl-phone-wrapper.dropdown-open .intl-phone-input {
    border-color: #f59e0b;
    box-shadow: 
        0 0 0 3px rgba(245, 158, 11, 0.12),
        0 4px 16px rgba(245, 158, 11, 0.1);
}

.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-phone-input-wrapper .intl-phone-dropdown {
    border-color: #f59e0b;
}

.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-phone-input-wrapper .intl-phone-dropdown-header::after {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
}

.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-phone-input-wrapper .intl-phone-country-item::before {
    background: #f59e0b;
}

.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-phone-input-wrapper .intl-phone-country-dial {
    color: #d97706;
    background: rgba(245, 158, 11, 0.1);
}

.crm-dlg-phone-row.crm-dlg-is-primary .crm-dlg-phone-input-wrapper .intl-phone-country-check {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Phone Row Right Section */
.crm-dlg-phone-row-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Phone Type Select */
.crm-dlg-phone-type-select {
    min-width: 110px;
}

.crm-dlg-phone-type-select .mud-input-outlined-border {
    border-color: #e2e8f0 !important;
    border-radius: 8px !important;
}

.crm-dlg-phone-type-select:hover .mud-input-outlined-border {
    border-color: #cbd5e1 !important;
}

.crm-dlg-phone-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-dlg-phone-type-option .mud-icon-root {
    font-size: 1rem;
    color: #64748b;
}

/* Phone Actions */
.crm-dlg-phone-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.crm-dlg-phone-actions .crm-dlg-set-primary-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.crm-dlg-phone-actions .crm-dlg-set-primary-btn:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border-color: #fcd34d;
    color: #b45309;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.crm-dlg-phone-actions .crm-dlg-set-primary-btn .mud-icon-root {
    font-size: 0.875rem;
    color: #f59e0b;
}

.crm-dlg-phone-actions .crm-dlg-status-badge {
    padding: 0.375rem 0.625rem;
    font-size: 0.6875rem;
}

@media (max-width: 580px) {
    .crm-dlg-phone-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .crm-dlg-phone-input-wrapper {
        width: 100%;
    }
    
    .crm-dlg-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;
    }
    
    .crm-dlg-phone-row-right {
        justify-content: space-between;
    }
}

@keyframes crm-dlg-row-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-dlg-email-row:hover,
.crm-dlg-phone-row:hover,
.crm-dlg-address-row:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.crm-dlg-email-row.crm-dlg-is-primary,
.crm-dlg-phone-row.crm-dlg-is-primary,
.crm-dlg-address-row.crm-dlg-is-primary {
    background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
    border-color: #fcd34d;
}

/* Row Avatar */
.crm-dlg-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;
}

.crm-dlg-email-row:hover .crm-dlg-row-avatar,
.crm-dlg-phone-row:hover .crm-dlg-row-avatar,
.crm-dlg-address-row:hover .crm-dlg-row-avatar {
    transform: scale(1.05);
}

.crm-dlg-row-avatar .mud-icon-root {
    font-size: 1.25rem;
}

/* Email Type Colors */
.crm-dlg-row-avatar.crm-dlg-type-work {
    background: #fee2e2;
    color: #dc2626;
}

.crm-dlg-row-avatar.crm-dlg-type-personal {
    background: #d1fae5;
    color: #059669;
}

.crm-dlg-row-avatar.crm-dlg-type-other {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Phone Type Colors */
.crm-dlg-row-avatar.crm-dlg-type-mobile {
    background: #dbeafe;
    color: #2563eb;
}

.crm-dlg-row-avatar.crm-dlg-type-home {
    background: #d1fae5;
    color: #059669;
}

.crm-dlg-row-avatar.crm-dlg-type-fax {
    background: #fef3c7;
    color: #d97706;
}

/* Address Type Colors */
.crm-dlg-row-avatar.crm-dlg-type-home {
    background: #d1fae5;
    color: #059669;
}

.crm-dlg-row-avatar.crm-dlg-type-mailing {
    background: #e0e7ff;
    color: #4f46e5;
}

.crm-dlg-row-avatar.crm-dlg-type-billing {
    background: #fef3c7;
    color: #d97706;
}

.crm-dlg-row-avatar.crm-dlg-type-shipping {
    background: #dbeafe;
    color: #2563eb;
}

/* Row Content */
.crm-dlg-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.crm-dlg-row-main {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.crm-dlg-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 */
    .crm-dlg-type-badge.crm-dlg-type-work {
        background: #fef2f2;
        color: #dc2626;
    }

    .crm-dlg-type-badge.crm-dlg-type-personal {
        background: #ecfdf5;
        color: #059669;
    }

    .crm-dlg-type-badge.crm-dlg-type-other {
        background: #eef2ff;
        color: #4f46e5;
    }

    /* Phone Type Badge Colors */
    .crm-dlg-type-badge.crm-dlg-type-mobile {
        background: #eff6ff;
        color: #2563eb;
    }

    .crm-dlg-type-badge.crm-dlg-type-home {
        background: #ecfdf5;
        color: #059669;
    }

    .crm-dlg-type-badge.crm-dlg-type-fax {
        background: #fffbeb;
        color: #d97706;
    }

    /* Address Type Badge Colors */
    .crm-dlg-type-badge.crm-dlg-type-home {
        background: #ecfdf5;
        color: #059669;
    }

    .crm-dlg-type-badge.crm-dlg-type-mailing {
        background: #eef2ff;
        color: #4f46e5;
    }

    .crm-dlg-type-badge.crm-dlg-type-billing {
        background: #fffbeb;
        color: #d97706;
    }

    .crm-dlg-type-badge.crm-dlg-type-shipping {
        background: #eff6ff;
        color: #2563eb;
    }

    /* Social Media Type Badge Colors */
    .crm-dlg-type-badge.crm-dlg-type-platform {
        background: #f0fdf4;
        color: #16a34a;
    }

    .crm-dlg-type-badge.crm-dlg-type-username {
        background: #fef3c7;
        color: #d97706;
    }

    .crm-dlg-type-badge.crm-dlg-type-url {
        background: #e0e7ff;
        color: #4f46e5;
    }

/* Social Media Type Avatar Colors */
.crm-dlg-row-avatar.crm-dlg-type-platform {
    background: #d1fae5;
    color: #059669;
}

.crm-dlg-row-avatar.crm-dlg-type-username {
    background: #fef3c7;
    color: #d97706;
}

.crm-dlg-row-avatar.crm-dlg-type-url {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Social Media Dialog Row */
.crm-dlg-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 #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: crm-dlg-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    animation-delay: calc(var(--i) * 0.08s);
}

    .crm-dlg-social-row:hover {
        border-color: #c7d2fe;
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
        transform: translateY(-1px);
    }

/* Social Media Icon Preview in Header */
.crm-dlg-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 rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

    .crm-dlg-social-icon-preview.facebook { background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%); }
    .crm-dlg-social-icon-preview.twitter { background: linear-gradient(135deg, #1da1f2 0%, #0d8ddb 100%); }
    .crm-dlg-social-icon-preview.instagram { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
    .crm-dlg-social-icon-preview.linkedin { background: linear-gradient(135deg, #0077b5 0%, #005885 100%); }
    .crm-dlg-social-icon-preview.youtube { background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%); }
    .crm-dlg-social-icon-preview.tiktok { background: linear-gradient(135deg, #000000 0%, #333333 100%); }
    .crm-dlg-social-icon-preview.pinterest { background: linear-gradient(135deg, #e60023 0%, #ad081b 100%); }
    .crm-dlg-social-icon-preview.snapchat { background: linear-gradient(135deg, #fffc00 0%, #ffeb3b 100%); color: #000; }
    .crm-dlg-social-icon-preview.other { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }

/* Social Media Preview Section */
.crm-dlg-social-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    animation: crm-dlg-fade-in 0.3s ease;
}

.crm-dlg-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: #6366f1;
}

.crm-dlg-preview-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.crm-dlg-preview-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.crm-dlg-preview-icon.telegram { color: #0088cc; }
.crm-dlg-preview-icon.whatsapp {
    color: #25d366;
}
.crm-dlg-preview-icon.signal {
    color: #3a76f0;
}
.crm-dlg-preview-icon.messenger {
    color: #0084ff;
}
.crm-dlg-preview-icon.imessage {
    color: #34c759;
}
.crm-dlg-preview-icon.slack {
    color: #4a154b;
}
.crm-dlg-preview-icon.discord {
    color: #5865f2;
}
.crm-dlg-preview-icon.skype {
    color: #00aff0;
}
.crm-dlg-preview-icon.teams {
    color: #6264a7;
}
.crm-dlg-preview-icon.zoom {
    color: #2d8cff;
}

.crm-dlg-preview-icon.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}
    .crm-dlg-preview-icon.twitter { background: linear-gradient(135deg, #1da1f2 0%, #0d8ddb 100%); }
    .crm-dlg-preview-icon.instagram { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
    .crm-dlg-preview-icon.linkedin { background: linear-gradient(135deg, #0077b5 0%, #005885 100%); }
    .crm-dlg-preview-icon.youtube { background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%); }
    .crm-dlg-preview-icon.tiktok { background: linear-gradient(135deg, #000000 0%, #333333 100%); }
    .crm-dlg-preview-icon.pinterest { background: linear-gradient(135deg, #e60023 0%, #ad081b 100%); }
    .crm-dlg-preview-icon.snapchat { background: linear-gradient(135deg, #fffc00 0%, #ffeb3b 100%); color: #000; }
    .crm-dlg-preview-icon.other { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }

.crm-dlg-preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.crm-dlg-preview-platform {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.crm-dlg-preview-username {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.crm-dlg-preview-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .crm-dlg-preview-link:hover {
        background: #6366f1;
        color: white;
    }

/* Inline Select for Social Dialog */
.crm-dlg-inline-select {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
}

    .crm-dlg-inline-select .mud-input-control-input-container {
        margin-top: 0 !important;
    }

    .crm-dlg-inline-select .mud-input {
        margin-top: 0 !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
    }

    .crm-dlg-inline-select .mud-select-input {
        padding: 0 !important;
    }

@keyframes crm-dlg-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inline Input */
.crm-dlg-inline-input {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
}

    .crm-dlg-inline-input .mud-input-control-input-container {
        margin-top: 0 !important;
    }

    .crm-dlg-inline-input .mud-input {
        margin-top: 0 !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        background: #f8fafc !important;
        transition: all 0.2s ease !important;
    }

        .crm-dlg-inline-input .mud-input:hover {
            border-color: #cbd5e1 !important;
            background: #ffffff !important;
        }

        .crm-dlg-inline-input .mud-input:focus-within {
            border-color: #a78bfa !important;
            background: #ffffff !important;
            box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
        }

    .crm-dlg-inline-input input {
        font-size: 0.9375rem !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        padding: 0.5rem 0.75rem !important;
    }

        .crm-dlg-inline-input input::placeholder {
            color: #94a3b8;
            font-weight: 400;
        }

.crm-dlg-row-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
}

    .crm-dlg-row-meta .mud-icon-root {
        font-size: 0.875rem;
        color: #94a3b8;
    }

/* Row Right */
.crm-dlg-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    flex-shrink: 0;
}

.crm-dlg-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;
}

    .crm-dlg-status-badge.crm-dlg-status-primary {
        background: #fef3c7;
        color: #b45309;
        border: 1px solid #fcd34d;
    }

        .crm-dlg-status-badge.crm-dlg-status-primary .mud-icon-root {
            font-size: 0.75rem;
            color: #f59e0b;
        }

.crm-dlg-set-primary-btn {
    padding: 0.25rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-dlg-set-primary-btn:hover {
        background: #fef3c7;
        border-color: #fcd34d;
        color: #b45309;
    }

/* Action Group - groups Primary/SetPrimary with Remove button */
.crm-dlg-action-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Remove Button */
.crm-dlg-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .crm-dlg-remove-btn:hover {
        background: #fef2f2;
        border-color: #fca5a5;
        color: #dc2626;
        transform: scale(1.05);
    }

    .crm-dlg-remove-btn:active {
        transform: scale(0.95);
    }

    .crm-dlg-remove-btn .mud-icon-root {
        font-size: 1.125rem;
    }

    .crm-dlg-remove-btn:disabled,
    .crm-dlg-remove-btn.crm-dlg-disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
        background: #f1f5f9;
        border-color: #e2e8f0;
        color: #cbd5e1;
    }

        .crm-dlg-remove-btn:disabled:hover,
        .crm-dlg-remove-btn.crm-dlg-disabled:hover {
            transform: none;
            background: #f1f5f9;
            border-color: #e2e8f0;
            color: #cbd5e1;
        }

/* Edit Button */
.crm-dlg-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.crm-dlg-edit-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #6366f1;
    transform: scale(1.05);
}

.crm-dlg-edit-btn:active {
    transform: scale(0.95);
}

.crm-dlg-edit-btn .mud-icon-root {
    font-size: 1.125rem;
}

/* Type Dropdown */
.crm-dlg-type-dropdown {
    margin: 0 !important;
    min-width: 80px !important;
}

    .crm-dlg-type-dropdown .mud-input-control-input-container {
        margin-top: 0 !important;
    }

    .crm-dlg-type-dropdown .mud-input {
        margin-top: 0 !important;
    }

    .crm-dlg-type-dropdown .mud-select-input {
        font-size: 0.6875rem !important;
        color: #64748b !important;
        padding: 0 !important;
    }

    .crm-dlg-type-dropdown .mud-list-item {
        min-height: 32px !important;
        padding: 0.375rem 0.75rem !important;
    }

    .crm-dlg-type-dropdown .mud-list-item-text {
        font-size: 0.75rem !important;
    }

/* Add More Button */
.crm-dlg-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 #d1d5db;
    border-radius: 14px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.crm-dlg-dialog-theme .crm-dlg-add-more-btn:hover {
    border-color: #7c3aed;
    border-style: solid;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    color: #7c3aed;
    transform: translateY(-1px);
}

.crm-dlg-add-icon-wrap {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.crm-dlg-dialog-theme .crm-dlg-add-more-btn:hover .crm-dlg-add-icon-wrap {
    background: #7c3aed;
    color: white;
}

.crm-dlg-arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s ease;
}

.crm-dlg-add-more-btn:hover .crm-dlg-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ========== ADDRESS SPECIFIC ========== */
.crm-dlg-address-content {
    flex: 1;
}

.crm-dlg-address-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.crm-dlg-address-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.5rem;
}

@media (max-width: 580px) {
    .crm-dlg-address-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== FOOTER ========== */
.crm-dlg-premium-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.crm-dlg-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.crm-dlg-hint-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border-radius: 6px;
    color: #f59e0b;
}

.crm-dlg-footer-btns {
    display: flex;
    gap: 0.625rem;
}

.crm-dlg-btn-ghost {
    padding: 0.625rem 1.125rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-dlg-btn-ghost:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

.crm-dlg-btn-danger {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.125rem;
    background: transparent;
    border: 1px solid #FECACA;
    border-radius: 10px;
    color: #DC2626;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-dlg-btn-danger:hover {
        background: #FEE2E2;
        border-color: #F87171;
    }

    .crm-dlg-btn-danger .mud-icon-root {
        font-size: 1rem;
    }

.crm-dlg-btn-outline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    background: transparent;
    border: 2px solid #6366f1;
    border-radius: 10px;
    color: #6366f1;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-dlg-btn-outline:hover {
        background: rgba(99, 102, 241, 0.08);
        border-color: #4f46e5;
        color: #4f46e5;
    }

    .crm-dlg-btn-outline .mud-icon-root {
        font-size: 1rem;
    }

.crm-dlg-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);
}

.crm-dlg-dialog-theme .crm-dlg-btn-solid {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.crm-dlg-btn-solid:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.crm-dlg-btn-solid:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.crm-dlg-loading-spin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: crm-dlg-spin 0.7s linear infinite;
}

@keyframes crm-dlg-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 #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.crm-professional-section:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}

.crm-professional-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.crm-professional-section-header .mud-icon-root {
    color: #6366f1;
}

/* 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, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    color: #6366f1;
    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, #6366f1 0%, #7c3aed 100%);
    color: white;
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    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, #eef2ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    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: #1e293b;
}

.crm-professional-company-option-dba {
    font-size: 0.75rem;
    color: #64748b;
}

/* No Results */
.crm-professional-no-results {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.crm-professional-no-results .mud-icon-root {
    color: #94a3b8;
}

/* New Company Form */
.crm-professional-new-company-form {
    margin: 0 1.25rem 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    border: 1px solid #c7d2fe;
    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 rgba(99, 102, 241, 0.2);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #4338ca;
}

.crm-professional-new-company-header .mud-icon-root {
    color: #6366f1;
}

/* 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 rgba(99, 102, 241, 0.2);
}

/* 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, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    border: 1px solid #c7d2fe;
    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, #6366f1 0%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    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: #4338ca;
}

.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: #4f46e5;
}

.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, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 14px;
    border: 1px solid #bbf7d0;
    transition: all 0.3s ease;
}

.crm-professional-industry-container.crm-professional-industry-disabled {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #e2e8f0;
    opacity: 0.7;
}

.crm-professional-industry-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.crm-professional-industry-disabled .crm-professional-industry-label {
    color: #64748b;
}

.crm-professional-industry-label .mud-icon-root {
    color: #22c55e;
}

.crm-professional-industry-disabled .crm-professional-industry-label .mud-icon-root {
    color: #94a3b8;
}

.crm-professional-industry-hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: #64748b;
    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, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #166534;
    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, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #22c55e;
    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: #22c55e;
}

/* New Industry Form */
.crm-professional-new-industry-form {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    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: #166534;
}

.crm-professional-new-industry-header .mud-icon-root {
    color: #22c55e;
}

.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 #bbf7d0;
}

.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, #166534 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: rgba(255, 255, 255, 0.8);
}

.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: rgba(255, 255, 255, 0.2);
    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, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    border: 1px solid #fcd34d;
    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: #f59e0b;
}

.crm-education-other-degree-container .crm-dlg-form-input {
    background: white;
    border-radius: 8px;
}

.crm-education-other-degree-container .mud-input-outlined-border {
    border-color: #fcd34d !important;
}

.crm-education-other-degree-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #f59e0b !important;
}

.crm-education-other-degree-container .mud-input-outlined.mud-input-outlined-focused .mud-input-outlined-border {
    border-color: #d97706 !important;
}

/* Section Header Colors */
.crm-professional-section:nth-child(1) .crm-professional-section-header {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-bottom-color: #c7d2fe;
}

.crm-professional-section:nth-child(1) .crm-professional-section-header .mud-icon-root {
    color: #6366f1;
}

.crm-professional-section:nth-child(2) .crm-professional-section-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom-color: #bbf7d0;
}

.crm-professional-section:nth-child(2) .crm-professional-section-header .mud-icon-root {
    color: #22c55e;
}

/* Sectioned Body for Details Dialog */
.crm-dlg-sectioned-body {
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Enhanced Section Styling */
.crm-dlg-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.crm-dlg-section:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.crm-dlg-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 #f1f5f9;
}

/* Section Description Text */
.crm-dlg-section-desc {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    padding: 0 1.25rem;
}

/* Section Color Themes */
.crm-dlg-section:nth-child(1) .crm-dlg-section-header {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
    border-bottom-color: #c7d2fe;
}

/*.crm-dlg-section:nth-child(1) .crm-dlg-section-header .mud-icon-root {
    color: #6366f1;
}

.crm-dlg-section:nth-child(2) .crm-dlg-section-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-bottom-color: #fcd34d;
}

.crm-dlg-section:nth-child(2) .crm-dlg-section-header .mud-icon-root {
    color: #f59e0b;
}

.crm-dlg-section:nth-child(3) .crm-dlg-section-header {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9d174d;
    border-bottom-color: #f9a8d4;
}

.crm-dlg-section:nth-child(3) .crm-dlg-section-header .mud-icon-root {
    color: #ec4899;
}

.crm-dlg-section:nth-child(4) .crm-dlg-section-header {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #166534;
    border-bottom-color: #86efac;
}

.crm-dlg-section:nth-child(4) .crm-dlg-section-header .mud-icon-root {
    color: #22c55e;
}*/

/* Grid Layouts */
.crm-dlg-grid-1 {
    grid-template-columns: 1fr !important;
}

.crm-dlg-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.crm-dlg-grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.crm-dlg-form-grid {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.crm-dlg-form-field {
    position: relative;
}

.crm-dlg-form-input {
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.crm-dlg-form-input:focus-within {
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.crm-dlg-form-input .mud-input-outlined-border {
    border-color: #e2e8f0;
}

.crm-dlg-form-input:focus-within .mud-input-outlined-border {
    border-color: #6366f1 !important;
}

/* Wide Dialog */
.crm-dlg-wide {
    max-width: 720px !important;
}

.crm-dlg-wide .mud-dialog-content {
    max-height: 70vh;
    overflow-y: auto;
}

/* Professional Header Variant */
.crm-dlg-header-professional {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #8b5cf6 100%) !important;
}

.crm-dlg-header-professional .crm-dlg-orb-1 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.4), transparent 70%);
}

.crm-dlg-header-professional .crm-dlg-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;
    }

    .crm-dlg-grid-2,
    .crm-dlg-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) {
    .crm-dlg-premium-header {
        padding: 1.25rem;
    }

    .crm-dlg-header-counter {
        display: none;
    }

    .crm-dlg-premium-body {
        padding: 1rem;
    }

    .crm-dlg-card-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .crm-dlg-type-indicator {
        display: none;
    }

    .crm-dlg-fields-area {
        flex-direction: column;
        width: 100%;
    }

    .crm-dlg-type-field {
        width: 100%;
    }

    .crm-dlg-action-btns {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.625rem;
        border-top: 1px solid #f1f5f9;
    }

    .crm-dlg-premium-footer {
        flex-direction: column;
        gap: 0.875rem;
    }

    .crm-dlg-footer-hint {
        order: 2;
        font-size: 0.6875rem;
    }

    .crm-dlg-footer-btns {
        width: 100%;
    }

        .crm-dlg-footer-btns button {
            flex: 1;
            justify-content: center;
        }
}

/* =============================================
   TASK DIALOG STYLES
   Prefix: crm-dlg-task-
   Used by: TaskDialog.razor
   ============================================= */

/* Task Dialog Body */
.crm-dlg-task-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Task Section */
.crm-dlg-task-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.crm-dlg-task-section:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Task Templates */
.crm-dlg-task-templates {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: 16px;
    border: 1px solid #e9d5ff;
    padding: 1rem 1.25rem;
    animation: crm-dlg-fade-in 0.3s ease;
}

.crm-dlg-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: #7c3aed;
    margin-bottom: 0.75rem;
}

.crm-dlg-task-templates-label .mud-icon-root {
    color: #a855f7;
}

.crm-dlg-task-templates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crm-dlg-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: #7c3aed;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(139, 92, 246, 0.1);
}

.crm-dlg-task-template-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #7c3aed;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.crm-dlg-task-template-btn:active {
    transform: translateY(0);
}

.crm-dlg-task-template-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #7c3aed;
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.crm-dlg-task-template-btn.active .mud-icon-root {
    animation: crm-dlg-bounce 0.5s ease;
}

@keyframes crm-dlg-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.crm-dlg-task-template-btn .mud-icon-root {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.crm-dlg-task-template-btn:hover .mud-icon-root {
    transform: scale(1.1);
}

/* Select Item with Icon */
.crm-dlg-select-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Priority Dots */
.crm-dlg-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.crm-dlg-priority-dot.crm-dlg-priority-high {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(239, 68, 68, 0.4);
}

.crm-dlg-priority-dot.crm-dlg-priority-medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(245, 158, 11, 0.4);
}

.crm-dlg-priority-dot.crm-dlg-priority-low {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(59, 130, 246, 0.4);
}

/* Target Type Selection */
.crm-dlg-task-target-section {
    padding: 0.25rem 0;
}

.crm-dlg-task-target-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.crm-dlg-task-target-toggle {
    display: flex;
    gap: 0.75rem;
}

.crm-dlg-task-target-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.crm-dlg-task-target-btn:hover {
    border-color: #a78bfa;
    color: #7c3aed;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.crm-dlg-task-target-btn.active {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #7c3aed;
    color: #6d28d9;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.crm-dlg-task-target-btn .mud-icon-root {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.crm-dlg-task-target-btn:hover .mud-icon-root,
.crm-dlg-task-target-btn.active .mud-icon-root {
    transform: scale(1.1);
}

/* Contact Option in Autocomplete */
.crm-dlg-contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
}

.crm-dlg-contact-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.75rem !important;
}

.crm-dlg-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-dlg-contact-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.crm-dlg-contact-company {
    font-size: 0.75rem;
    color: #64748b;
}

/* Family Group Option */
.crm-dlg-family-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
}

.crm-dlg-family-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #ec4899;
    flex-shrink: 0;
}

.crm-dlg-family-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-dlg-family-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.crm-dlg-family-count {
    font-size: 0.75rem;
    color: #64748b;
}

/* Family Group Preview */
.crm-dlg-family-preview {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1rem;
    animation: crm-dlg-fade-in 0.3s ease;
}

.crm-dlg-family-preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.75rem;
}

.crm-dlg-family-preview-header .mud-icon-root {
    color: #22c55e;
}

.crm-dlg-family-preview-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crm-dlg-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 #a7f3d0;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #166534;
    transition: all 0.2s ease;
}

.crm-dlg-family-member-chip:hover {
    border-color: #22c55e;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.15);
}

.crm-dlg-member-avatar {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.625rem !important;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
}

.crm-dlg-family-member-chip.crm-dlg-more {
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #15803d;
    font-weight: 600;
}

/* Assignee Option in Autocomplete */
.crm-dlg-assignee-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
    width: 100%;
}

.crm-dlg-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;
}

.crm-dlg-assignee-icon.crm-dlg-assignee-contact {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #6366f1;
}

.crm-dlg-assignee-icon.crm-dlg-assignee-family {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #ec4899;
}

.crm-dlg-assignee-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.crm-dlg-assignee-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-dlg-assignee-subtitle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

.crm-dlg-assignee-subtitle .mud-icon-root {
    font-size: 0.875rem;
    color: #94a3b8;
}

.crm-dlg-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;
}

.crm-dlg-assignee-type-badge.crm-dlg-type-contact {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

.crm-dlg-assignee-type-badge.crm-dlg-type-family {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
    border: 1px solid #f9a8d4;
}

/* Recurring Task Info */
.crm-dlg-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: #6d28d9;
    animation: crm-dlg-fade-in 0.3s ease;
}

.crm-dlg-task-recurring-info .mud-icon-root {
    color: #7c3aed;
    animation: crm-dlg-spin 3s linear infinite;
}

/* Reminder Info */
.crm-dlg-task-reminder-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #92400e;
    animation: crm-dlg-fade-in 0.3s ease;
    margin-top: 0.5rem;
}

.crm-dlg-task-reminder-info .mud-icon-root {
    color: #f59e0b;
    animation: crm-dlg-bell-ring 2s ease-in-out infinite;
}

@keyframes crm-dlg-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 */
.crm-dlg-switch-field {
    padding: 0.5rem 0;
}

.crm-dlg-switch-field .mud-switch {
    margin: 0;
}

/* Task Dialog Responsive */
@media (max-width: 580px) {
    .crm-dlg-task-templates-list {
        gap: 0.375rem;
    }

    .crm-dlg-task-template-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .crm-dlg-task-target-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .crm-dlg-task-target-btn {
        padding: 0.75rem;
    }

    .crm-dlg-family-preview-members {
        gap: 0.375rem;
    }

    .crm-dlg-family-member-chip {
        font-size: 0.6875rem;
    }
}

/* DateTime Group - Premium Combined Date & Time Picker */
.crm-dlg-datetime-group {
    grid-column: 1 / -1;
    position: relative;
}

.crm-dlg-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: #6366f1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 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 rgba(0, 0, 0, 0.04);
}

.crm-dlg-datetime-label::before {
    content: '📅';
    font-size: 0.625rem;
}

.crm-dlg-datetime-inputs {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.crm-dlg-datetime-inputs:hover {
    border-color: #c7d2fe;
    box-shadow: 
        0 2px 8px rgba(99, 102, 241, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.crm-dlg-datetime-inputs:focus-within {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 4px 16px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.crm-dlg-datetime-inputs .crm-dlg-datetime-date {
    flex: 1.3;
    min-width: 0;
    position: relative;
}

.crm-dlg-datetime-inputs .crm-dlg-datetime-date::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
}

.crm-dlg-datetime-inputs .crm-dlg-datetime-time {
    flex: 1;
    min-width: 0;
}

.crm-dlg-datetime-inputs .mud-input-outlined-border {
    border: none !important;
    border-radius: 0 !important;
}

.crm-dlg-datetime-inputs .mud-input-control {
    margin: 0 !important;
}

.crm-dlg-datetime-inputs .mud-input-slot {
    padding: 0.875rem 1rem !important;
    font-weight: 500;
    color: #1e293b;
}

.crm-dlg-datetime-inputs .mud-input-slot::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.crm-dlg-datetime-inputs .crm-dlg-form-input {
    background: transparent;
    border-radius: 0;
}

.crm-dlg-datetime-inputs .crm-dlg-form-input:focus-within {
    background: transparent;
    box-shadow: none;
}

.crm-dlg-datetime-inputs .mud-picker-input-button {
    color: #6366f1;
    transition: all 0.2s ease;
}

.crm-dlg-datetime-inputs .mud-picker-input-button:hover {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.08);
}

.crm-dlg-datetime-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    background: linear-gradient(180deg, #f1f5f9 0%, #e8ecf1 100%);
    color: #6366f1;
    position: relative;
}

.crm-dlg-datetime-separator::before,
.crm-dlg-datetime-separator::after {
    content: '';
    position: absolute;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, #cbd5e1 50%, transparent 100%);
}

.crm-dlg-datetime-separator::before {
    left: 0;
}

.crm-dlg-datetime-separator::after {
    right: 0;
}

.crm-dlg-datetime-separator .mud-icon-root {
    font-size: 1.25rem;
    filter: drop-shadow(0 1px 1px rgba(99, 102, 241, 0.2));
}

/* Responsive adjustments for datetime group */
@media (max-width: 480px) {
    .crm-dlg-datetime-inputs {
        flex-direction: column;
    }

    .crm-dlg-datetime-inputs .crm-dlg-datetime-date::after {
        display: none;
    }

    .crm-dlg-datetime-separator {
        padding: 0.5rem;
        background: linear-gradient(90deg, #f1f5f9 0%, #e8ecf1 50%, #f1f5f9 100%);
    }

    .crm-dlg-datetime-separator::before,
    .crm-dlg-datetime-separator::after {
        top: 0;
        bottom: auto;
        left: 15%;
        right: 15%;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, #cbd5e1 50%, transparent 100%);
    }

    .crm-dlg-datetime-separator::before {
        top: 0;
    }

    .crm-dlg-datetime-separator::after {
        top: auto;
        bottom: 0;
    }

    .crm-dlg-datetime-inputs .crm-dlg-datetime-date,
    .crm-dlg-datetime-inputs .crm-dlg-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 rgba(0, 0, 0, 0.3),
        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: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.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, #6366f1 0%, #8b5cf6 100%);
    border-radius: 8px;
    color: white;
}

.task-reminder-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    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: #ffffff;
    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: rgba(255, 255, 255, 0.06);
    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 rgba(255, 255, 255, 0.06);
    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 #ef4444;
}

.task-reminder-card.priority-medium {
    border-left: 3px solid #f59e0b;
}

.task-reminder-card.priority-low {
    border-left: 3px solid #22c55e;
}

.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: rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #a5b4fc;
    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: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.priority-medium .task-reminder-priority .priority-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.priority-low .task-reminder-priority .priority-dot {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.task-reminder-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    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: #6366f1;
}

.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: rgba(255, 255, 255, 0.06);
    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, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.task-reminder-action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Pagination */
.task-reminder-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.task-reminder-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #a1a1aa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-reminder-nav-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.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: rgba(255, 255, 255, 0.2);
    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, #6366f1 0%, #8b5cf6 100%);
}

/* Footer */
.task-reminder-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.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: rgba(255, 255, 255, 0.06);
    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: clp-
   Used by: Contacts.razor
   ============================================= */

/* CSS Variables & Design Tokens */
:root {
    /* Colors & Gradients */
    --clp-primary: #5b6ef5;
    --clp-primary-dark: #4a5cd4;
    --clp-gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --clp-gradient-pink: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --clp-gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --clp-gradient-orange: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --clp-gradient-green: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --clp-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --clp-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    
    /* Border Radius */
    --clp-radius-lg: 12px;
    --clp-radius-xl: 16px;
}

/* Page Header */
.clp-page-header { margin-bottom: 2rem; }
.clp-greeting { font-size: 2rem; font-weight: 700; color: var(--clp-primary); margin-bottom: 0.25rem; }
.clp-greeting-user { font-size: 1.125rem; color: var(--mud-palette-text-secondary); }

/* Tabs Container */
.clp-tabs-container { background: var(--mud-palette-surface); border-radius: var(--clp-radius-xl); box-shadow: var(--clp-shadow-card); overflow: hidden; }
.clp-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); }
.clp-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; }
.clp-tab-btn:hover { background: var(--mud-palette-action-default-hover); color: var(--clp-primary); }
.clp-tab-btn.active { background: var(--clp-primary); color: white; box-shadow: 0 4px 12px rgba(91, 110, 245, 0.3); }
.clp-tab-content { padding: 1.5rem; }

/* Section Header */
.clp-section-header { margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.clp-section-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--clp-primary); text-transform: uppercase; margin-bottom: 0.5rem; }
.clp-section-subtitle { color: var(--mud-palette-text-secondary); }

/* Stats Cards */
.clp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.clp-stat-card { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: var(--clp-radius-xl); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; transition: all 0.3s ease; }
.clp-stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); }
.clp-stat-icon { width: 60px; height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; }
.clp-stat-icon.purple { background: var(--clp-gradient-purple); }
.clp-stat-icon.pink { background: var(--clp-gradient-pink); }
.clp-stat-icon.blue { background: var(--clp-gradient-blue); }
.clp-stat-icon.orange { background: var(--clp-gradient-orange); }
.clp-stat-content { flex: 1; }
.clp-stat-value { font-size: 2.5rem; font-weight: 700; color: var(--mud-palette-text-primary); line-height: 1.2; }
.clp-stat-label { font-size: 0.875rem; color: var(--mud-palette-text-secondary); margin-top: 0.25rem; }
.clp-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; }
.clp-stat-change.positive { background: rgba(16, 185, 129, 0.1); color: #10b981; }

/* Charts Row */
.clp-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.clp-chart-card { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: var(--clp-radius-xl); overflow: hidden; }
.clp-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); }
.clp-chart-title { font-size: 1.125rem; font-weight: 600; color: var(--mud-palette-text-primary); }
.clp-chart-body { padding: 1.5rem; }

/* Funnel Chart */
.clp-funnel-stage { margin-bottom: 0.75rem; }
.clp-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; }
.clp-funnel-bar:hover { transform: translateX(4px); }
.clp-funnel-label { font-size: 0.875rem; }
.clp-funnel-value { font-size: 1rem; font-weight: 700; }

/* Lead Sources */
.clp-source-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--mud-palette-lines-default); }
.clp-source-item:last-child { border-bottom: none; }
.clp-source-info { display: flex; align-items: center; gap: 0.75rem; }
.clp-source-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; }
.clp-source-name { font-size: 0.9375rem; font-weight: 500; color: var(--mud-palette-text-primary); }
.clp-source-count { font-size: 0.8125rem; color: var(--mud-palette-text-secondary); margin-top: 0.125rem; }
.clp-source-percentage { font-size: 1rem; font-weight: 700; color: var(--mud-palette-text-primary); }

/* Lead Generation Channels Grid */
.clp-lgc-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.5rem;
    max-width: 1000px;
}
.clp-lgc-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;
}
.clp-lgc-card:hover { 
    border-color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.clp-lgc-icon { 
    width: 56px; 
    height: 56px; 
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.clp-lgc-icon img, .clp-lgc-icon svg { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}
.clp-lgc-icon-facebook { color: #1877F2; }
.clp-lgc-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; }
.clp-lgc-icon-whatsapp { color: #25D366; }
.clp-lgc-icon-forms { color: #673AB7; }
.clp-lgc-icon-landing { color: #607D8B; }
.clp-lgc-icon-webhooks { color: #00BCD4; }
.clp-lgc-title { 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.5rem;
}
.clp-lgc-desc { 
    font-size: 0.875rem; 
    color: var(--mud-palette-text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}
.clp-lgc-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;
}
.clp-lgc-btn-connect { 
    background: #4285f4;
    color: white;
}
.clp-lgc-btn-connect:hover { background: #3367d6; }
.clp-lgc-btn-manage { 
    background: #34a853;
    color: white;
}
.clp-lgc-btn-manage:hover { background: #2d9248; }

/* Multi-Entry List (Emails, Phones) */
.clp-multi-entry-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.clp-multi-entry-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.clp-multi-entry-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366f1 0%, #a855f7 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}
.clp-multi-entry-row:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.1),
        0 16px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}
.clp-multi-entry-row:hover::before {
    transform: scaleY(1);
}
.clp-multi-entry-row.is-primary {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.clp-multi-entry-row.is-primary::before {
    background: linear-gradient(180deg, #f59e0b 0%, #fbbf24 100%);
    transform: scaleY(1);
}
.clp-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, #f59e0b 0%, #fbbf24 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}
.clp-multi-entry-fields {
    display: flex;
    flex: 1;
    gap: 0.875rem;
    align-items: center;
    padding-left: 0.25rem;
}
.clp-multi-entry-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.clp-multi-entry-actions .mud-icon-button {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}
.clp-multi-entry-actions .mud-icon-button:hover {
    transform: scale(1.15);
    background: rgba(99, 102, 241, 0.1);
}

/* Family Group Selector */
.clp-family-group-selector {
    padding: 1rem 0;
}
.clp-family-group-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}
.clp-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;
}
.clp-family-group-card:hover {
    border-color: #667eea;
    background: var(--mud-palette-surface);
}
.clp-family-group-card.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}
.clp-family-group-card.new-group {
    border-style: dashed;
}
.clp-family-group-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.clp-family-group-card.new-group .clp-family-group-icon {
    background: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}
.clp-family-group-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.clp-family-group-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}
.clp-family-group-count {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}
.clp-new-group-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--mud-palette-background);
    border-radius: 8px;
}
.clp-new-group-form .mud-input-control {
    flex: 1;
}

/* Family Members List */
.clp-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);
}
.clp-family-members-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.clp-family-member-card {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 1rem;
}
.clp-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);
}
.clp-family-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.clp-family-member-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.clp-family-member-group-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: #667eea;
}

/* Family Members Relationship List */
.clp-family-members-relationship-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.clp-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;
}
.clp-family-member-relationship-row:hover {
    border-color: #667eea;
    background: var(--mud-palette-surface);
}
.clp-family-member-info-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}
.clp-family-member-avatar-small {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.clp-family-member-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.clp-family-member-name-compact {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}
.clp-family-member-role {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}
.clp-relationship-selector {
    flex-shrink: 0;
}

/* Lead Sources Grid Tab */
.clp-lead-sources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.clp-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;
}
.clp-lead-source-card:hover { 
    border-color: #667eea; 
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}
.clp-lead-source-card.inactive { opacity: 0.6; }
.clp-lead-source-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.clp-lead-source-icon { 
    width: 48px; 
    height: 48px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
}
.clp-lead-source-info { flex: 1; min-width: 0; }
.clp-lead-source-name { font-size: 1rem; font-weight: 600; color: var(--mud-palette-text-primary); margin: 0 0 0.25rem; }
.clp-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;
}
.clp-lead-source-actions { flex-shrink: 0; }
.clp-lead-source-stats { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-top: 1rem; 
    border-top: 1px solid var(--mud-palette-lines-default);
}
.clp-lead-source-stat { display: flex; flex-direction: column; gap: 0.25rem; }
.clp-stat-value-lg { font-size: 1.25rem; font-weight: 700; color: var(--mud-palette-text-primary); }
.clp-stat-label-sm { font-size: 0.75rem; color: var(--mud-palette-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.clp-stat-badge { 
    padding: 0.25rem 0.75rem; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 500; 
}
.clp-stat-badge.active { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.clp-stat-badge.inactive { background: rgba(156, 163, 175, 0.1); color: #6b7280; }
.clp-delete-item { color: #ef4444 !important; }
.clp-delete-item:hover { background: rgba(239, 68, 68, 0.1) !important; }
.clp-empty-state {
    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;
    margin: 20px;
}
.clp-empty-state h4 { font-size: 1.25rem; font-weight: 600; color: var(--mud-palette-text-primary); margin: 0 0 0.5rem; }
.clp-empty-state p { font-size: 0.9375rem; color: var(--mud-palette-text-secondary); margin: 0 0 1.5rem; }

/* Monthly Performance Card */
.clp-performance-card { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: var(--clp-radius-xl); margin-bottom: 1.5rem; }

/* Recent Activity */
.clp-activity-feed { padding: 0 1.5rem 1.5rem; }
.clp-activity-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--mud-palette-lines-default); }
.clp-activity-item:last-child { border-bottom: none; }
.clp-activity-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.clp-activity-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.clp-activity-icon.blue { background: rgba(91, 110, 245, 0.1); color: #5b6ef5; }
.clp-activity-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.clp-activity-content { flex: 1; }
.clp-activity-text {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    text-transform: capitalize;
}
.clp-activity-text strong { font-weight: 600; }
.clp-activity-time { font-size: 0.8125rem; color: var(--mud-palette-text-secondary); margin-top: 0.25rem; }

/* Contact Actions */
.clp-contact-actions {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}
.clp-search-container {
    flex: 1;
    min-width: 300px;
    position: relative;
}
.clp-search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--mud-palette-text-disabled);
    pointer-events: none;
}
.clp-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(--clp-radius-lg);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.clp-search-input:focus {
    outline: none;
    border-color: var(--clp-primary);
    box-shadow: 0 0 0 3px rgba(91, 110, 245, 0.1);
}
.clp-search-input::placeholder {
    color: var(--mud-palette-text-disabled);
}
.clp-action-buttons {
    display: flex;
    gap: var(--spacing-md);
}
.clp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--clp-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.clp-btn:active {
    transform: scale(0.98);
}
.clp-btn-primary {
    background: var(--clp-gradient-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}
.clp-btn-primary:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.clp-btn-secondary {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
}
.clp-btn-secondary:hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--clp-primary);
    color: var(--clp-primary);
}

/* Sort Container */
.clp-sort-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.clp-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;
}
.clp-sort-select:hover {
    border-color: var(--clp-primary);
    background: var(--mud-palette-action-default-hover);
}
.clp-sort-select:focus {
    outline: none;
    border-color: var(--clp-primary);
    box-shadow: 0 0 0 3px rgba(91, 110, 245, 0.1);
}

/* Filter Panel */
.clp-filter-panel {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--clp-radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.clp-filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}
.clp-filter-panel-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--mud-palette-text-primary);
}
.clp-filter-panel-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}
.clp-filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.clp-filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}
.clp-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;
}
.clp-filter-select:hover {
    border-color: var(--clp-primary);
}
.clp-filter-select:focus {
    outline: none;
    border-color: var(--clp-primary);
    box-shadow: 0 0 0 3px rgba(91, 110, 245, 0.1);
}
.clp-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);
}
.clp-filter-badge {
    display: inline-block;
    background: var(--clp-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);
}
.clp-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;
}
.clp-icon-btn:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--clp-primary);
}

/* Selection Toolbar */
.clp-selection-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.clp-selection-info {
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
}
.clp-selection-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.clp-selection-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.clp-selection-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}
.clp-selection-btn:active {
    transform: scale(0.98);
}

/* Pagination */
.clp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl);
    border-top: 1px solid var(--mud-palette-lines-default);
}
.clp-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;
}
.clp-pagination-btn:not(:disabled):hover {
    background: var(--mud-palette-action-default-hover);
    border-color: var(--clp-primary);
    color: var(--clp-primary);
}
.clp-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.clp-pagination-info {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}
.clp-pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.clp-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;
}
.clp-pagination-select:hover {
    border-color: var(--clp-primary);
    background: var(--mud-palette-action-default-hover);
}
.clp-pagination-select:focus {
    outline: none;
    border-color: var(--clp-primary);
    box-shadow: 0 0 0 3px rgba(91, 110, 245, 0.1);
}

/* Contacts Card Container */
.clp-contacts-card { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: var(--clp-radius-xl); overflow: hidden; }
.clp-contacts-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--mud-palette-lines-default); }
.clp-view-toggle { display: flex; gap: 0.25rem; background: var(--mud-palette-background); padding: 0.25rem; border-radius: 8px; }
.clp-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; }
.clp-view-btn:hover { background: var(--mud-palette-action-default-hover); }
.clp-view-btn.active { background: var(--clp-primary); color: white; }

/* Contacts Container */
.clp-contacts-container {
    padding: var(--spacing-xl);
    min-height: 400px;
}

/* Grid View */
.clp-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}
.clp-contact-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--clp-radius-lg);
    padding: var(--spacing-xl);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}
.clp-contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--clp-primary);
}
.clp-contact-card .clp-card-checkbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.clp-contact-card:hover .clp-card-checkbox,
.clp-contact-card .clp-card-checkbox.checked,
.clp-has-selection .clp-contact-card .clp-card-checkbox {
    opacity: 1;
}
.clp-contact-card .clp-card-checkbox .mud-checkbox {
    margin: 0;
    padding: 0;
}
.clp-contact-card .clp-card-actions {
    display: flex;
    gap: 0.25rem;
}
.clp-contact-card .clp-card-action-btn {
    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;
}
.clp-contact-card .clp-card-action-btn:hover {
    background: var(--mud-palette-action-default-hover);
    color: #667eea;
}
.clp-contact-card .clp-card-action-btn.delete:hover {
    background: #fef2f2;
    color: #ef4444;
}
.clp-contact-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
.clp-contact-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--clp-gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}
.clp-contact-info {
    flex: 1;
    min-width: 0;
}
.clp-contact-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;
}
.clp-contact-position {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.clp-contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}
.clp-contact-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}
.clp-contact-detail svg {
    color: var(--mud-palette-text-disabled);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}
.clp-contact-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.clp-contact-footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.clp-contact-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;
}

.clp-contact-priority-badge .clp-priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.clp-contact-priority-badge.priority-high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.clp-contact-priority-badge.priority-high .clp-priority-dot {
    background: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}

.clp-contact-priority-badge.priority-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.clp-contact-priority-badge.priority-medium .clp-priority-dot {
    background: #f59e0b;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.5);
}

.clp-contact-priority-badge.priority-low {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.clp-contact-priority-badge.priority-low .clp-priority-dot {
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.clp-contact-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.clp-contact-badge.client {
    background: rgba(91, 110, 245, 0.1);
    color: var(--clp-primary);
}
.clp-contact-badge.lead {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.clp-contact-badge.partner {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.clp-contact-badge.vip {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* List View */
.clp-contacts-list { padding: 0; }
.clp-contact-list-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; }
.clp-contact-list-item:hover { background: var(--mud-palette-action-default-hover); }
.clp-contact-list-item:last-child { border-bottom: none; }
.clp-contact-list-item .clp-contact-avatar { width: 50px; height: 50px; font-size: 1rem; }
.clp-contact-list-info { flex: 1; display: grid; grid-template-columns: 2fr 2fr 1.5fr 1fr auto; gap: 1rem; align-items: center; }
.clp-contact-list-detail h4 { font-size: 0.9375rem; font-weight: 600; color: var(--mud-palette-text-primary); margin-bottom: 0.25rem; }
.clp-contact-list-detail p { font-size: 0.8125rem; color: var(--mud-palette-text-secondary); }

/* Empty State */
.clp-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, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 2px dashed var(--mud-palette-lines-default);
}

.clp-empty-state-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.clp-empty-state-icon .mud-icon-root {
    font-size: 2.5rem;
    color: #64748b;
}

.clp-empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.75rem 0;
}

.clp-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;
}

.clp-empty-state-description strong {
    color: var(--clp-primary);
    font-weight: 600;
}

.clp-empty-state-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.clp-empty-state-actions .mud-button-root {
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .clp-empty-state {
        padding: 2rem 1rem;
        min-height: 300px;
    }
    
    .clp-empty-state-icon {
        width: 64px;
        height: 64px;
    }
    
    .clp-empty-state-icon .mud-icon-root {
        font-size: 2rem;
    }
    
    .clp-empty-state-title {
        font-size: 1.25rem;
    }
    
    .clp-empty-state-description {
        font-size: 0.875rem;
    }
    
    .clp-empty-state-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .clp-empty-state-actions .mud-button-root {
        width: 100%;
    }
}

/* =============================================
   FAMILY COMPONENT STYLES
   Prefix: fm-
   ============================================= */

/* Family Group Card */
.fm-group-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.fm-group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9d5ff;
}

.fm-group-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    border-radius: 14px;
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.fm-group-info {
    flex: 1;
}

.fm-group-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.fm-group-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.fm-group-actions {
    display: flex;
    gap: 0.25rem;
}

/* Family Members Grid */
.fm-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.fm-member-card {
    background: white;
    border: 1px solid #e5e7eb;
    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;
}

.fm-member-card:hover {
    border-color: #a855f7;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px);
}

.fm-member-card.current {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.fm-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;
}

.fm-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fm-member-current-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.fm-member-current-badge .mud-icon-root {
    font-size: 0.875rem;
    color: white;
}

.fm-member-info {
    text-align: center;
}

.fm-member-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1f2937;
    margin-bottom: 0.125rem;
}

.fm-member-role {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
}

.fm-member-relationship {
    margin-top: 0.25rem;
}

.fm-member-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.fm-member-card:hover .fm-member-actions {
    opacity: 1;
}

/* No Family Group Card */
.fm-no-group-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.fm-no-group-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 50%;
}

.fm-no-group-icon .mud-icon-root {
    font-size: 2.5rem;
    color: #64748b;
}

.fm-no-group-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.fm-no-group-desc {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Family List */
.fm-family-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fm-family-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.fm-family-item:hover {
    border-color: #ec4899;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.1);
}

.fm-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;
}

.fm-family-details {
    flex: 1;
    min-width: 0;
}

.fm-family-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1f2937;
    margin-bottom: 0.125rem;
}

.fm-family-relationship {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.375rem;
}

.fm-family-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fm-contact-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.fm-contact-item .mud-icon-root {
    font-size: 0.875rem;
}

.fm-family-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fm-family-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.fm-family-item:hover .fm-family-actions {
    opacity: 1;
}

/* Avatar Colors for Family */
.fm-avatar-pink { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.fm-avatar-blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.fm-avatar-green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.fm-avatar-purple { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); }
.fm-avatar-orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.fm-avatar-teal { background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%); }

/* Family Groups List */
.fm-groups-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fm-group-list-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.fm-group-list-item:hover {
    border-color: #a855f7;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.1);
}

.fm-group-list-item.expanded {
    border-color: #a855f7;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.15);
}

.fm-group-list-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.fm-group-list-header:hover {
    background: #faf5ff;
}

.fm-group-list-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
    flex-shrink: 0;
}

.fm-group-color-pink { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.fm-group-color-blue { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.fm-group-color-green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.fm-group-color-purple { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); }
.fm-group-color-orange { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.fm-group-color-teal { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); }

.fm-group-list-info {
    flex: 1;
    min-width: 0;
}

.fm-group-list-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.fm-group-list-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.fm-group-list-meta .mud-icon-root {
    font-size: 0.875rem;
}

.fm-group-list-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.fm-group-list-item:hover .fm-group-list-actions {
    opacity: 1;
}

.fm-group-list-expand {
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.fm-group-list-item.expanded .fm-group-list-expand {
    color: #7c3aed;
}

/* Family Group Members (expanded) */
.fm-group-list-members {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-top: 1px solid #e9d5ff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fm-group-member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9d5ff;
    transition: all 0.2s ease;
}

.fm-group-member-item:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.1);
}

.fm-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;
}

.fm-group-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fm-group-member-info {
    flex: 1;
    min-width: 0;
}

.fm-group-member-name {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
}

.fm-group-member-role {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
}

.fm-group-member-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.fm-group-member-item:hover .fm-group-member-actions {
    opacity: 1;
}

/* Stats Grid */
.fm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.fm-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.fm-stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
}

.fm-stat-icon.purple {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

.fm-stat-icon.pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.fm-stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.fm-stat-info {
    display: flex;
    flex-direction: column;
}

.fm-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.fm-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* =============================================
   HOBBIES SECTION STYLES
   ============================================= */

/* Section Container Enhancements */
.fm-hobby-section {
    position: relative;
    overflow: hidden;
}

.fm-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;
}

.fm-pet-section {
    position: relative;
    overflow: hidden;
}

.fm-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 */
.fm-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 rgba(0, 0, 0, 0.15);
}

.fm-section-icon-wrapper.fm-hobby-theme {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.fm-section-icon-wrapper.fm-pet-theme {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* Section Count Badge */
.fm-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 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);
}

.fm-section-count.fm-pet-count {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

/* Add Button Hover Enhancements */
.fm-add-btn-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    gap: 0.375rem !important;
}

.fm-add-btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
    border-color: #f97316 !important;
    color: #ea580c !important;
}

.fm-add-btn-hover.fm-pet-btn:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border-color: #10b981 !important;
    color: #059669 !important;
}

/* Skill Chip Styling */
.fm-skill-chip {
    font-size: 0.6875rem !important;
    height: auto !important;
    padding: 0.125rem 0.5rem !important;
}

.fm-hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.fm-hobby-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.fm-hobby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f97316 0%, #fb923c 50%, #fdba74 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fm-hobby-card:hover {
    border-color: #fdba74;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
    transform: translateY(-2px);
}

.fm-hobby-card:hover::before {
    opacity: 1;
}

.fm-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 rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fm-hobby-card:hover .fm-hobby-icon {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.fm-hobby-sports { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35); }
.fm-hobby-arts { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35); }
.fm-hobby-music { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35); }
.fm-hobby-reading { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35); }
.fm-hobby-gaming { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35); }
.fm-hobby-outdoor { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35); }
.fm-hobby-cooking { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35); }
.fm-hobby-travel { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35); }
.fm-hobby-tech { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35); }
.fm-hobby-other { background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%); box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35); }

.fm-hobby-info {
    flex: 1;
    min-width: 0;
}

.fm-hobby-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.fm-hobby-category {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-weight: 500;
}

.fm-hobby-frequency {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #f97316;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #fed7aa;
}

.fm-hobby-frequency .mud-icon-root {
    font-size: 0.875rem;
}

.fm-hobby-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.fm-hobby-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.fm-hobby-card:hover .fm-hobby-actions {
    opacity: 1;
    transform: translateX(0);
}

.fm-hobby-actions .mud-icon-button {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
}

.fm-hobby-actions .mud-icon-button:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
}

/* =============================================
   PETS SECTION STYLES
   ============================================= */

.fm-pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.fm-pet-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fffe 100%);
    border: 1px solid #d1fae5;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.fm-pet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fm-pet-card:hover {
    border-color: #6ee7b7;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.18);
    transform: translateY(-3px);
}

.fm-pet-card:hover::before {
    opacity: 1;
}

.fm-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 rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.fm-pet-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.fm-pet-card:hover .fm-pet-avatar {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.fm-pet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fm-pet-avatar .mud-icon-root {
    font-size: 2rem;
}

.fm-pet-dog { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4); }
.fm-pet-cat { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4); }
.fm-pet-bird { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
.fm-pet-fish { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4); }
.fm-pet-rabbit { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4); }
.fm-pet-hamster { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4); }
.fm-pet-reptile { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }
.fm-pet-other { background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%); box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4); }

.fm-pet-info {
    flex: 1;
    min-width: 0;
}

.fm-pet-name {
    display: block;
    font-weight: 800;
    font-size: 1.125rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.fm-pet-type {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.fm-pet-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fm-pet-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #374151;
    background: #f3f4f6;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.fm-pet-detail .mud-icon-root {
    font-size: 1rem;
    color: #6b7280;
}

.fm-pet-service-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.fm-pet-actions {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.375rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.fm-pet-card:hover .fm-pet-actions {
    opacity: 1;
    transform: translateY(0);
}

.fm-pet-actions .mud-icon-button {
    background: white !important;
    border: 1px solid #d1fae5 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.fm-pet-actions .mud-icon-button:hover {
    background: #f0fdf4 !important;
    border-color: #a7f3d0 !important;
}

/* Empty State Colors */
.crm-empty-state-box.orange {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    border: 2px dashed #fb923c;
    border-radius: 20px;
}

.crm-empty-state-box.green {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    border: 2px dashed #34d399;
    border-radius: 20px;
}

/* =============================================
   HOBBY EDIT DIALOG STYLES
   Prefix: hed-
   ============================================= */

.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;
}

.hed-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.hed-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hed-header-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
    position: relative;
    z-index: 1;
}

.hed-header-icon .mud-icon-root {
    font-size: 1.75rem;
}

.hed-header-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.hed-header-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.02em;
}

.hed-header-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.hed-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #ffffff;
}

.hed-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.hed-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hed-label.hed-required::after {
    content: " *";
    color: #ef4444;
}

.hed-input, .hed-select {
    border-radius: 12px !important;
}

.hed-input .mud-input-outlined-border,
.hed-select .mud-input-outlined-border {
    border-radius: 12px !important;
}

.hed-select-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hed-select-item .mud-icon-root {
    color: #f97316;
}

.hed-skill-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.hed-skill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hed-skill-item.beginner .hed-skill-dot { background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%); }
.hed-skill-item.intermediate .hed-skill-dot { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.hed-skill-item.advanced .hed-skill-dot { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.hed-skill-item.expert .hed-skill-dot { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

.hed-frequency-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.hed-frequency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: linear-gradient(145deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    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: #6b7280;
}

.hed-frequency-item .mud-icon-root {
    font-size: 1.5rem;
    transition: transform 0.25s ease;
}

.hed-frequency-item:hover {
    border-color: #fb923c;
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.hed-frequency-item:hover .mud-icon-root {
    transform: scale(1.1);
}

.hed-frequency-item.selected {
    border-color: #f97316;
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    color: #ea580c;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.25);
}

.hed-frequency-item.selected .mud-icon-root {
    color: #f97316;
}

.hed-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border-top: 1px solid #e5e7eb;
}

.hed-btn-cancel {
    border-radius: 12px !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 600 !important;
}

.hed-btn-submit {
    border-radius: 12px !important;
    padding: 0.625rem 1.75rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35) !important;
}

.hed-btn-cancel {
    border-radius: 10px !important;
}

.hed-btn-submit {
    border-radius: 10px !important;
    padding: 0.5rem 1.25rem !important;
}

/* =============================================
   PET EDIT DIALOG STYLES
   Prefix: ped-
   ============================================= */

.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;
}

.ped-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.ped-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.ped-header::after {
    content: '🐾';
    position: absolute;
    right: 2rem;
    bottom: 0.5rem;
    font-size: 3rem;
    opacity: 0.15;
    pointer-events: none;
}

.ped-header-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 18px;
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    position: relative;
    z-index: 1;
}

.ped-header-icon .mud-icon-root {
    font-size: 1.875rem;
}

.ped-header-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.ped-header-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.02em;
}

.ped-header-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.ped-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    background: #ffffff;
}

.ped-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ped-row {
    display: flex;
    gap: 1.25rem;
}

.ped-flex-1 {
    flex: 1;
}

.ped-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ped-label.ped-required::after {
    content: " *";
    color: #ef4444;
}

.ped-input, .ped-select {
    border-radius: 12px !important;
}

.ped-input .mud-input-outlined-border,
.ped-select .mud-input-outlined-border {
    border-radius: 12px !important;
}

.ped-pet-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.875rem;
}

.ped-pet-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 0.75rem;
    background: linear-gradient(145deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    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: #6b7280;
}

.ped-pet-type .mud-icon-root {
    transition: transform 0.3s ease;
}

.ped-pet-type:hover {
    border-color: #34d399;
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
}

.ped-pet-type:hover .mud-icon-root {
    transform: scale(1.15);
}

.ped-pet-type.selected {
    border-color: #10b981;
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.ped-pet-type.selected .ped-pet-type-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ped-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 rgba(0, 0, 0, 0.15);
}

.ped-checkbox-card {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    transition: all 0.25s ease;
}

.ped-checkbox-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.ped-checkbox-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.ped-checkbox-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.ped-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ped-checkbox-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #1f2937;
}

.ped-checkbox-desc {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
}

.ped-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border-top: 1px solid #e5e7eb;
}

.ped-btn-cancel {
    border-radius: 12px !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 600 !important;
}

.ped-btn-submit {
    border-radius: 12px !important;
    padding: 0.625rem 1.75rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.25s ease !important;
}

.ped-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
}

/* Gender Selector for Pets */
.ped-gender-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.ped-gender-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(145deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
}

.ped-gender-item:hover {
    border-color: #a5b4fc;
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
}

.ped-gender-item.selected {
    border-color: #6366f1;
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.ped-gender-icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .fm-hobbies-grid {
        grid-template-columns: 1fr;
    }
    
    .fm-pets-grid {
        grid-template-columns: 1fr;
    }
    
    .fm-hobby-card {
        padding: 1rem;
    }
    
    .fm-pet-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .fm-pet-info {
        text-align: center;
    }
    
    .fm-pet-details {
        justify-content: center;
    }
    
    .fm-pet-actions {
        position: static;
        margin-top: 1rem;
    }
    
    .fm-section-icon-wrapper {
        width: 28px;
        height: 28px;
        margin-right: 0.5rem;
    }
    
    .fm-section-count {
        font-size: 0.6875rem;
        min-width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hed-frequency-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ped-pet-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ped-gender-grid {
        grid-template-columns: 1fr;
    }
    
    .ped-row {
        flex-direction: column;
    }
    
    .ped-header::after {
        display: none;
    }
    
    .fm-hobby-icon {
        width: 44px;
        height: 44px;
    }
    
    .fm-hobby-name {
        font-size: 0.9375rem;
    }
    
    .fm-hobby-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
    
    .fm-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) {
    .fm-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .fm-family-item {
        flex-wrap: wrap;
    }
    
    .fm-family-badges {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .fm-family-actions {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .fm-members-grid {
        grid-template-columns: 1fr;
    }
    
    .fm-group-header {
        flex-wrap: wrap;
    }
    
    .fm-group-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Avatar Colors */
.clp-avatar-pink { background: linear-gradient(135deg, #f093fb, #f5576c); }
.clp-avatar-blue { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.clp-avatar-green { background: linear-gradient(135deg, #11998e, #38ef7d); }
.clp-avatar-purple { background: linear-gradient(135deg, #667eea, #764ba2); }
.clp-avatar-orange { background: linear-gradient(135deg, #fa709a, #fee140); }

/* Settings */
.clp-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; }
.clp-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; }
.clp-settings-tab:hover { background: var(--mud-palette-action-default-hover); color: var(--clp-primary); }
.clp-settings-tab.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3); }

/* Category Types */
.clp-category-list { display: flex; flex-direction: column; gap: 0.75rem; }
.clp-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;
}
.clp-category-content {
    flex: 1;
    min-width: 0;
}
.clp-category-card h4 { 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--mud-palette-text-primary); 
    margin: 0 0 0.5rem; 
}
.clp-category-card p { 
    font-size: 0.875rem; 
    color: var(--mud-palette-text-secondary); 
    margin: 0;
    line-height: 1.5;
}
.clp-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 */
.clp-contact-types-list { display: flex; flex-direction: column; gap: 0.75rem; }
.clp-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;
}
.clp-contact-type-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}
.clp-contact-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.clp-contact-type-info {
    flex: 1;
    min-width: 0;
}
.clp-contact-type-info h4 { 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--mud-palette-text-primary); 
    margin: 0 0 0.25rem; 
}
.clp-contact-type-info p { 
    font-size: 0.875rem; 
    color: var(--mud-palette-text-secondary); 
    margin: 0 0 0.5rem;
    line-height: 1.4;
}
.clp-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);
}
.clp-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;
}
.clp-add-type-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}
.clp-field-meta {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

/* Custom Fields */
.clp-custom-fields-list { display: flex; flex-direction: column; gap: 0.75rem; }
.clp-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;
}
.clp-custom-field-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}
.clp-custom-field-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.clp-custom-field-info {
    flex: 1;
    min-width: 0;
}
.clp-custom-field-info h4 { 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--mud-palette-text-primary); 
    margin: 0 0 0.25rem; 
}
.clp-custom-field-info p { 
    font-size: 0.8125rem; 
    color: var(--mud-palette-text-secondary); 
    margin: 0;
}
.clp-custom-field-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.clp-custom-field-card:hover .clp-custom-field-actions {
    opacity: 1;
}

/* Hover Actions */
.clp-hoverable {
    position: relative;
}
.clp-hover-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}
.clp-hoverable:hover .clp-hover-actions {
    opacity: 1;
}
.clp-hoverable:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* Lead Statuses */
.clp-lead-statuses-list { display: flex; flex-direction: column; gap: 0.75rem; }
.clp-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;
}
.clp-lead-status-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}
.clp-lead-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.clp-lead-status-info {
    flex: 1;
    min-width: 0;
}
.clp-lead-status-info h4 { 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--mud-palette-text-primary); 
    margin: 0 0 0.125rem; 
}
.clp-lead-status-info p { 
    font-size: 0.875rem; 
    color: var(--mud-palette-text-secondary); 
    margin: 0;
}

/* General Settings */
.clp-general-settings { display: flex; flex-direction: column; gap: 2rem; }
.clp-settings-section { }
.clp-settings-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 1.25rem;
}
.clp-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.clp-settings-row:last-child {
    border-bottom: none;
}
.clp-settings-row-info {
    flex: 1;
    min-width: 0;
}
.clp-settings-row-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0 0 0.25rem;
}
.clp-settings-row-info p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}
.clp-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;
}
.clp-settings-select:hover {
    border-color: #667eea;
}
.clp-settings-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Settings Cards Grid */
.clp-settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.clp-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;
}
.clp-settings-card:hover { border-color: #667eea; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1); }
.clp-settings-card-header { display: flex; align-items: flex-start; gap: 1rem; }
.clp-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, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}
.clp-settings-card-content { flex: 1; min-width: 0; }
.clp-settings-card h4 { font-size: 1rem; font-weight: 600; color: var(--mud-palette-text-primary); margin: 0 0 0.25rem; }
.clp-settings-card p { font-size: 0.8125rem; color: var(--mud-palette-text-secondary); margin: 0; line-height: 1.5; }
.clp-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: rgba(102, 126, 234, 0.1);
    color: #667eea;
}
.clp-settings-card-badge.system { background: rgba(156, 163, 175, 0.1); color: #6b7280; }

/* Settings List Items */
.clp-settings-list { display: flex; flex-direction: column; gap: 0.75rem; }
.clp-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;
}
.clp-settings-item:hover { border-color: #667eea; }
.clp-settings-item-left { display: flex; align-items: center; gap: 1rem; }
.clp-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);
}
.clp-settings-item-info h5 { font-size: 0.9375rem; font-weight: 500; color: var(--mud-palette-text-primary); margin: 0 0 0.125rem; }
.clp-settings-item-info p { font-size: 0.8125rem; color: var(--mud-palette-text-secondary); margin: 0; }
.clp-settings-item-actions { display: flex; gap: 0.25rem; }

/* Settings Table */
.clp-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;
}
.clp-settings-table thead { background: var(--mud-palette-background); }
.clp-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);
}
.clp-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);
}
.clp-settings-table tr:last-child td { border-bottom: none; }
.clp-settings-table tr:hover td { background: var(--mud-palette-action-default-hover); }

/* Status Pipeline */
.clp-pipeline-list { display: flex; flex-direction: column; gap: 0.5rem; }
.clp-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;
}
.clp-pipeline-item:hover { border-color: #667eea; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1); }
.clp-pipeline-drag { color: var(--mud-palette-text-disabled); cursor: grab; }
.clp-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;
}
.clp-pipeline-content { flex: 1; }
.clp-pipeline-content h5 { font-size: 0.9375rem; font-weight: 500; color: var(--mud-palette-text-primary); margin: 0; }
.clp-pipeline-content span { font-size: 0.8125rem; color: var(--mud-palette-text-secondary); }

/* Contact Detail View Styles */
.clp-back-card { background: var(--mud-palette-surface); border-radius: 12px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.clp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.clp-back-btn:hover {
    border-color: #a5b4fc;
    color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Profile Card */
.clp-profile-card {
    background: linear-gradient(135deg, #ffffff 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 rgba(0, 0, 0, 0.04),
        0 16px 48px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.clp-profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
}
.clp-profile-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
    pointer-events: none;
}
.clp-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}
.clp-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, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    flex-shrink: 0;
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.35),
        inset 0 2px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}
.clp-avatar-lg:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}
.clp-upload-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.clp-upload-btn:hover {
    border-color: #a5b4fc;
    color: #6366f1;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}
.clp-profile-info {
    flex: 1;
    position: relative;
    z-index: 1;
}
.clp-profile-name {
    font-size: 1.625rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.375rem;
    letter-spacing: -0.03em;
}
.clp-profile-title {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 0.875rem;
    font-weight: 500;
}
.clp-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, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}
.clp-profile-badge.lead {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #ea580c;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.15);
}
.clp-profile-badge.partner {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}
.clp-profile-badge.vendor {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.15);
}
.clp-profile-badge.vip {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.15);
}

/* Tab Navigation */
.clp-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.95) 100%);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    margin-bottom: 1.75rem;
    box-shadow: 
        0 0 0 1px rgba(0,0,0,0.03),
        0 4px 16px rgba(0, 0, 0, 0.04),
        0 12px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.8);
    overflow-x: auto;
    position: relative;
}
.clp-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;
}
.clp-detail-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: #64748b;
    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;
}
.clp-detail-tab-btn .mud-icon-root {
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.clp-detail-tab-btn:hover {
    background: rgba(99, 102, 241, 0.06);
    color: #6366f1;
}
.clp-detail-tab-btn:hover .mud-icon-root {
    transform: scale(1.15) rotate(-3deg);
    color: #6366f1;
}
.clp-detail-tab-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: white;
    box-shadow: 
        0 4px 14px rgba(99, 102, 241, 0.4),
        0 2px 6px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
}
.clp-detail-tab-btn.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    border-radius: 14px;
    pointer-events: none;
}
.clp-detail-tab-btn.active .mud-icon-root {
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* Content Card */
.clp-content-card {
    background: linear-gradient(180deg, #ffffff 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 rgba(0, 0, 0, 0.04),
        0 16px 48px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
}
.clp-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 25%, #a855f7 50%, #ec4899 75%, #f43f5e 100%);
    background-size: 200% 100%;
    animation: clp-gradient-shift 8s ease-in-out infinite;
}
@keyframes clp-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.clp-content-card::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
    pointer-events: none;
}
.clp-content-title {
    display: none;
    align-items: center;
    gap: 0.875rem;
    z-index: 1;
}
.clp-content-title::before,
.clp-content-title::after {
    display: none;
}

/* Status Grid */
.clp-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    margin-bottom: 1.75rem;
    border: 1px solid #e2e8f0;
}
.clp-status-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}
.clp-status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #a5b4fc;
}
.clp-status-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.clp-status-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}
.clp-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;
}
.clp-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.25rem;
}
.clp-status-badge.not-connected {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
}
.clp-status-badge.not-connected::before { background: #dc2626; }
.clp-status-badge.connected {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
}
.clp-status-badge.connected::before { background: #16a34a; }
.clp-status-badge.pending {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
}
.clp-status-badge.pending::before { background: #d97706; }
.clp-actions-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.clp-actions-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.clp-actions-row {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}
.clp-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);
}
.clp-action-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.clp-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}
.clp-action-btn.secondary {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #475569;
    border: 1px solid #e2e8f0;
}
.clp-action-btn.secondary:hover {
    border-color: #a5b4fc;
    color: #6366f1;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

/* Form Sections */
.clp-form-section {
    margin-bottom: 1.75rem;
    padding: 1.5rem 1.75rem 1.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.clp-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6366f1 0%, #a855f7 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);
}
.clp-form-section:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.06);
    border-color: rgba(99, 102, 241, 0.2);
}
.clp-form-section:hover::before {
    transform: scaleY(1);
}
.clp-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
    letter-spacing: -0.02em;
}
.clp-form-section-title .mud-icon-root {
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 0.5rem;
    border-radius: 10px;
    box-shadow: 
        0 3px 10px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}
.clp-form-section:hover .clp-form-section-title .mud-icon-root {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.clp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.75rem;
}
.clp-form-grid.three-cols { grid-template-columns: repeat(3, 1fr); }
.clp-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.clp-form-group.full-width { grid-column: 1 / -1; }
.clp-form-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.clp-form-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.clp-form-value:hover {
    border-color: #a5b4fc;
    background: linear-gradient(135deg, #ffffff 0%, rgba(99, 102, 241, 0.02) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.clp-form-value.empty { color: #94a3b8; font-style: italic; }
.clp-form-value a { color: #6366f1; text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
.clp-form-value a:hover { color: #8b5cf6; }

/* Personal Information Sections */
.clp-pi-section-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
}
.clp-pi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.clp-pi-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.clp-pi-section-title .mud-icon-root {
    color: #6b7280;
    font-size: 1.125rem;
}
.clp-pi-section-icon {
    display: none;
}
.clp-pi-grid {
    display: grid;
    gap: 1rem 1.5rem;
}
.clp-pi-grid-2 { grid-template-columns: repeat(2, 1fr); }
.clp-pi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.clp-pi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.clp-pi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.clp-pi-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.clp-pi-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.clp-pi-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    line-height: 1.5;
}
.clp-pi-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.clp-pi-link:hover {
    color: #8b5cf6;
}
.clp-pi-link:hover::after {
    content: '→';
    margin-left: 0.25rem;
}
.clp-pi-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);
}
.clp-pi-grid-1 { grid-template-columns: 1fr; }
.clp-pi-input { width: 100%; }
.clp-pi-input .mud-input-outlined-border {
    border-radius: 12px !important;
    border-color: #e2e8f0 !important;
    transition: all 0.25s ease !important;
}
.clp-pi-input:hover .mud-input-outlined-border {
    border-color: #a5b4fc !important;
}
.clp-pi-input:focus-within .mud-input-outlined-border {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}
.clp-pi-input .mud-input-slot { 
    background: #fafbfc !important; 
    border-radius: 12px !important;
}
.clp-pi-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 #f1f5f9;
    position: relative;
    z-index: 1;
}
.clp-pi-action-buttons .mud-button-filled {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    box-shadow: 
        0 4px 14px rgba(99, 102, 241, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.15) !important;
    border-radius: 12px !important;
    transition: all 0.25s ease !important;
}
.clp-pi-action-buttons .mud-button-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45) !important;
}
.clp-pi-action-buttons .mud-button-outlined {
    border-radius: 12px !important;
    border-color: #e2e8f0 !important;
    transition: all 0.25s ease !important;
}
.clp-pi-action-buttons .mud-button-outlined:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}
.clp-upload-btn.secondary {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: 10px;
    transition: all 0.25s ease;
}
.clp-upload-btn.secondary:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #ef4444;
    border-color: #fecaca;
}
.clp-edit-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 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 rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.15);
    z-index: 10;
}
.clp-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}
.clp-edit-btn .mud-icon-root {
    transition: transform 0.3s ease;
}
.clp-edit-btn:hover .mud-icon-root {
    transform: rotate(-10deg);
}

/* Info Grid & Cards */
.clp-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.clp-info-group {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e5e7eb;
}
.clp-info-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}
.clp-info-group h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #374151;
    text-transform: uppercase;
    margin: 0;
}
.clp-section-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #6366f1;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.clp-section-edit-btn:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.clp-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;
}
.clp-info-row:hover {
    background: rgba(99, 102, 241, 0.03);
}
.clp-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%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
}
.clp-info-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}
.clp-info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    max-width: 60%;
}

/* Lead Status Dropdown Styles */
.clp-lead-status-container { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--mud-palette-lines-default); }
.clp-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; }
.clp-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; }
.clp-lead-status-select:hover { border-color: var(--clp-primary); }
.clp-lead-status-select:focus { outline: none; border-color: var(--clp-primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15); }
.clp-lead-status-select.status-new { background-color: rgba(99, 102, 241, 0.1); border-color: #6366f1; color: #6366f1; }
.clp-lead-status-select.status-attempted { background-color: rgba(245, 158, 11, 0.1); border-color: #f59e0b; color: #d97706; }
.clp-lead-status-select.status-contacted { background-color: rgba(59, 130, 246, 0.1); border-color: #3b82f6; color: #2563eb; }
.clp-lead-status-select.status-qualified { background-color: rgba(34, 197, 94, 0.1); border-color: #22c55e; color: #16a34a; }
.clp-lead-status-select.status-unqualified { background-color: rgba(239, 68, 68, 0.1); border-color: #ef4444; color: #dc2626; }

/* Lead Status Badge */
.clp-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; }
.clp-lead-status-badge.new { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.clp-lead-status-badge.attempted { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.clp-lead-status-badge.contacted { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.clp-lead-status-badge.qualified { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.clp-lead-status-badge.unqualified { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

/* Tasks Tab Styles */
.clp-task-filters { margin-bottom: 1.5rem; }
.clp-task-filter-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.clp-task-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.clp-task-filter-btn:hover { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
.clp-task-filter-btn.active { 
    background: var(--mud-palette-primary); 
    border-color: var(--mud-palette-primary); 
    color: white; 
}
.clp-task-filter-btn.active .clp-task-count { background: rgba(255,255,255,0.2); color: white; }
.clp-task-count {
    padding: 0.125rem 0.5rem;
    background: var(--mud-palette-background);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}
.clp-task-count-danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

.clp-task-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.clp-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;
}
.clp-task-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.clp-task-stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.clp-task-stat-icon.orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.clp-task-stat-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.clp-task-stat-icon.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.clp-task-stat-info { display: flex; flex-direction: column; }
.clp-task-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--mud-palette-text-primary); }
.clp-task-stat-label { font-size: 0.8125rem; color: var(--mud-palette-text-secondary); }

.clp-task-list { display: flex; flex-direction: column; gap: 0.75rem; }
.clp-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;
}
.clp-task-item:hover { border-color: var(--mud-palette-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.clp-task-item.completed { opacity: 0.7; }
.clp-task-item.completed .clp-task-title { text-decoration: line-through; color: var(--mud-palette-text-secondary); }
.clp-task-item.overdue { border-left: 3px solid #ef4444; }
.clp-task-checkbox { padding-top: 0.125rem; }
.clp-task-content { flex: 1; min-width: 0; }
.clp-task-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.clp-task-title { font-size: 0.9375rem; font-weight: 600; color: var(--mud-palette-text-primary); }
.clp-task-priority {
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.clp-task-priority.priority-high { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.clp-task-priority.priority-medium { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.clp-task-priority.priority-low { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.clp-task-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.clp-task-meta span { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8125rem; color: var(--mud-palette-text-secondary); }
.clp-task-meta .overdue { color: #ef4444; font-weight: 500; }
.clp-task-family-group { color: var(--mud-palette-primary) !important; }
.clp-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;
}
.clp-task-description { 
    margin: 0.5rem 0 0; 
    font-size: 0.875rem; 
    color: var(--mud-palette-text-secondary); 
    line-height: 1.5;
}
.clp-task-actions { display: flex; gap: 0.25rem; opacity: 0; transition: opacity 0.2s ease; }
.clp-task-item:hover .clp-task-actions { opacity: 1; }

.clp-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);
}
.clp-task-empty h4 { margin: 1rem 0 0.5rem; font-size: 1.125rem; color: var(--mud-palette-text-primary); }
.clp-task-empty p { margin: 0; font-size: 0.875rem; }

/* Responsive Styles */
@media (max-width: 1200px) {
    .clp-pi-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .clp-pi-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .clp-stats-grid { grid-template-columns: 1fr 1fr; }
    .clp-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 992px) { 
    .clp-form-grid { grid-template-columns: repeat(2, 1fr); } 
    .clp-form-grid.three-cols { grid-template-columns: repeat(2, 1fr); } 
}
@media (max-width: 768px) {
    .clp-stats-grid { grid-template-columns: 1fr; }
    .clp-contacts-grid { grid-template-columns: 1fr; }
    .clp-contact-list-info { grid-template-columns: 1fr; gap: 0.5rem; }
    .clp-task-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .clp-task-filter-group { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; }
    .clp-profile-card { flex-direction: column; text-align: center; }
    .clp-status-grid { grid-template-columns: 1fr; }
    .clp-info-grid { grid-template-columns: 1fr; }
    .clp-form-grid { grid-template-columns: 1fr; }
    .clp-form-grid.three-cols { grid-template-columns: 1fr; }
    .clp-pi-grid-5, .clp-pi-grid-4, .clp-pi-grid-3, .clp-pi-grid-2, .clp-pi-grid-1 { grid-template-columns: 1fr; }
    .clp-pi-section-card { padding: 1rem 1.25rem; }
    .clp-pi-action-buttons { flex-direction: column; }
    .clp-pi-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 rgba(0, 0, 0, 0.06);
}

/* 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, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
    color: #2563eb;
}

.activity-type-icon.meeting {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #6ee7b7;
    color: #059669;
}

.activity-type-icon.call {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
    color: #d97706;
}

.activity-type-icon.note {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #a5b4fc;
    color: #4f46e5;
}

.activity-type-icon.task {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #f9a8d4;
    color: #db2777;
}

.activity-type-icon.item.created,
.activity-type-icon[class*="item created"] {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    border-color: #5eead4;
    color: #0d9488;
}

.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: #0d9488;
}    

.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: #0d9488;
}
    .activity-type-icon.family.member.left,
    .activity-type-icon[class*="family member left"] {
        background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
        border-color: #9ca3af;
        color: #6b7280;
    }

    .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: #475569;
    }

    .activity-type-icon.widowed {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(79, 70, 229, 0.12) 100%);
        border-color: rgba(99, 102, 241, 0.25);
        color: #4338ca;
    }

    .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: #FECACA;
    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 rgba(0, 0, 0, 0.08);
}

.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, #667eea 0%, #764ba2 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, #0d9488 0%, #14b8a6 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: #ef4444 !important;
}

.activity-delete-item:hover {
    background: rgba(239, 68, 68, 0.1) !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: #ef4444;
}

/* 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: rgba(0, 0, 0, 0.06);
    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 clp-skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.clp-skeleton-pulse {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Grid Skeleton Card */
.clp-contact-card-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;
}

.clp-skeleton-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.clp-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.clp-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.clp-skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
}

.clp-skeleton-line.w-70 { width: 70%; }
.clp-skeleton-line.w-60 { width: 60%; }
.clp-skeleton-line.w-50 { width: 50%; }
.clp-skeleton-line.w-40 { width: 40%; }
.clp-skeleton-line.w-30 { width: 30%; }

.clp-skeleton-details {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-top: 0.25rem;
}

.clp-skeleton-detail {
    height: 16px;
    width: 85%;
    border-radius: 4px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
}

.clp-skeleton-detail:nth-child(2) { width: 70%; animation-delay: 0.1s; }
.clp-skeleton-detail:nth-child(3) { width: 60%; animation-delay: 0.2s; }

.clp-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;
}

.clp-skeleton-badge {
    width: 60px;
    height: 24px;
    border-radius: 12px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
}

/* List Skeleton Row */
.clp-contact-list-skeleton {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.clp-skeleton-list-info {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1fr;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .clp-skeleton-list-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Summary Tab Skeleton */
.clp-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;
}

.clp-skeleton-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.clp-skeleton-stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Chart Skeleton */
.clp-chart-card-skeleton {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    overflow: hidden;
}

.clp-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);
}

.clp-skeleton-chart-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clp-skeleton-funnel-bar {
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
}

.clp-skeleton-funnel-bar:nth-child(1) { animation-delay: 0s; }
.clp-skeleton-funnel-bar:nth-child(2) { animation-delay: 0.1s; }
.clp-skeleton-funnel-bar:nth-child(3) { animation-delay: 0.2s; }
.clp-skeleton-funnel-bar:nth-child(4) { animation-delay: 0.3s; }
.clp-skeleton-funnel-bar:nth-child(5) { animation-delay: 0.4s; }

.clp-skeleton-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Source List Skeleton */
.clp-skeleton-source-list {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.clp-skeleton-source-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.clp-skeleton-source-item:last-child {
    border-bottom: none;
}

.clp-skeleton-source-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.clp-skeleton-source-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Line Chart Skeleton */
.clp-skeleton-line-chart {
    height: 250px;
    margin: 1.5rem;
    border-radius: 8px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 400px 100%;
    animation: clp-skeleton-shimmer 2s ease-in-out infinite;
}

/* Activity Skeleton */
.clp-skeleton-activity-list {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.clp-skeleton-activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.clp-skeleton-activity-item:last-child {
    border-bottom: none;
}

.clp-skeleton-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200px 100%;
    animation: clp-skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.clp-skeleton-activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .clp-stats-grid .clp-stat-card-skeleton {
        padding: 1.25rem;
    }
    
    .clp-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: #94a3b8;
    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: #6366f1;
    background: linear-gradient(to bottom, transparent 50%, var(--mud-palette-surface, #fff) 50%);
}

.intl-phone-wrapper.error .intl-phone-label.active {
    color: #ef4444;
}

/* Main Input Container */
.intl-phone-input {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--mud-palette-surface, #fff);
    border: 2px solid #e2e8f0;
    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, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 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: #c7d2fe;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.06);
}

.intl-phone-wrapper.focused .intl-phone-input {
    border-color: #6366f1;
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 8px 32px rgba(99, 102, 241, 0.12);
}

.intl-phone-wrapper.dropdown-open .intl-phone-input {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.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: #ef4444;
    box-shadow: 
        0 0 0 4px rgba(239, 68, 68, 0.1),
        0 8px 32px rgba(239, 68, 68, 0.12);
}

.intl-phone-wrapper.disabled .intl-phone-input {
    background: #f8fafc;
    border-color: #e2e8f0;
    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: rgba(99, 102, 241, 0.04);
}

.intl-phone-country-selector:active {
    background: rgba(99, 102, 241, 0.08);
}

.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, #1e293b);
    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: rgba(99, 102, 241, 0.12);
}

.intl-phone-arrow {
    color: #64748b;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.intl-phone-arrow.open {
    transform: rotate(180deg);
    color: #6366f1;
}

/* Separator */
.intl-phone-separator {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, #e2e8f0 20%, #e2e8f0 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, #1e293b);
    background: transparent;
    min-width: 0;
    letter-spacing: 0.02em;
}

.intl-phone-number-input::placeholder {
    color: #94a3b8;
    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: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.intl-phone-clear:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    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, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.08);
    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 #e2e8f0;
}

/* Search */
.intl-phone-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.intl-phone-search-icon {
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.intl-phone-search:focus-within .intl-phone-search-icon {
    color: #6366f1;
}

.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, #1e293b);
    padding: 0;
}

.intl-phone-search input::placeholder {
    color: #94a3b8;
    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: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.intl-phone-search-clear:hover {
    background: rgba(148, 163, 184, 0.25);
    color: #475569;
}

/* 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: #94a3b8;
}

.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: #6366f1;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.intl-phone-country-item:hover {
    background: #f8fafc;
}

.intl-phone-country-item:hover::before {
    transform: scaleY(1);
}

.intl-phone-country-item.selected {
    background: #eef2ff;
}

.intl-phone-country-item.selected::before {
    transform: scaleY(1);
}

.intl-phone-country-item:active {
    background: #e0e7ff;
}

/* Flag in Country List */
.intl-phone-list-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Country Name */
.intl-phone-country-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dial Code */
.intl-phone-country-dial {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6366f1;
    flex-shrink: 0;
}

/* Check Mark */
.intl-phone-country-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #6366f1;
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE HELPER & ERROR TEXT
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.intl-phone-helper {
    font-size: 0.8125rem;
    color: #64748b;
    margin-left: 0.25rem;
}

.intl-phone-error-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #ef4444;
    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: #f1f5f9;
    border-radius: 4px;
    margin: 4px 0;
}

.intl-phone-country-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c7d2fe 0%, #a5b4fc 100%);
    border-radius: 4px;
    border: 2px solid #f1f5f9;
}

.intl-phone-country-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a5b4fc 0%, #818cf8 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   INTL PHONE DARK MODE SUPPORT
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.mud-theme-dark .intl-phone-input {
    border-color: #334155;
    background: #1e293b;
}

.mud-theme-dark .intl-phone-wrapper:hover:not(.disabled) .intl-phone-input {
    border-color: #4f46e5;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.mud-theme-dark .intl-phone-dial-code,
.mud-theme-dark .intl-phone-number-input {
    color: #f1f5f9;
}

.mud-theme-dark .intl-phone-number-input::placeholder {
    color: #64748b;
}

.mud-theme-dark .intl-phone-separator {
    background: linear-gradient(to bottom, transparent, #334155 20%, #334155 80%, transparent);
}

.mud-theme-dark .intl-phone-dropdown {
    background: #1e293b;
    border-color: #6366f1;
}

.mud-theme-dark .intl-phone-dropdown-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
}

.mud-theme-dark .intl-phone-country-name {
    color: #f1f5f9;
}

.mud-theme-dark .intl-phone-country-flag {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.mud-theme-dark .intl-phone-country-list::-webkit-scrollbar-track {
    background: #1e293b;
}

.mud-theme-dark .intl-phone-country-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4f46e5 0%, #6366f1 100%);
    border-color: #1e293b;
}

.mud-theme-dark .intl-phone-label.active {
    background: linear-gradient(to bottom, transparent 50%, #1e293b 50%);
}

.mud-theme-dark .intl-phone-search input {
    color: #f1f5f9;
}

.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 #6366f1;
    }
    
    .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 rgba(0, 0, 0, 0.1);
}

.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: #94a3b8;
    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: #f1f5f9;
    color: #6366f1;
}

.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: #f1f5f9;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.intl-phone-display-chip:hover {
    background: #e2e8f0;
}

.intl-phone-display-chip .intl-phone-display-copy {
    opacity: 1;
    margin-left: 0.25rem;
}

/* Badge Variant */
.intl-phone-display-badge {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    border: 1px solid #c7d2fe;
}

.intl-phone-display-badge .intl-phone-display-code {
    color: #6366f1;
}

.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: rgba(99, 102, 241, 0.1);
}

/* 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: #6366f1;
    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 */
.fed-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #be185d 100%);
    color: white;
}

.fed-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fed-header-content {
    flex: 1;
}

.fed-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;
}

.fed-header-close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2) !important;
}

.fed-header-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.fed-header-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

/* Body */
.fed-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 65vh;
    overflow-y: auto;
}

/* Option Tabs */
.fed-option-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f3f4f6;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.fed-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: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 2px solid transparent;
}

.fed-tab:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
}

.fed-tab.fed-tab-active {
    background: white;
    color: #4f46e5;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.fed-tab .mud-icon-root {
    font-size: 1.125rem;
}

/* Contact family badges */
.fed-contact-family.fed-has-family {
    color: #059669;
}

.fed-contact-family.fed-has-family .mud-icon-root {
    color: #10b981;
}

.fed-contact-family.fed-no-family {
    color: #6b7280;
}

/* My Role Section */
.fed-my-role-section {
    margin-top: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

/* Family Hint with Icon */
.fed-family-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fed-family-hint .mud-icon-root {
    color: #3b82f6;
    flex-shrink: 0;
}

/* Create Family Prompt (for contact without family) */
.fed-create-family-prompt {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.fed-create-family-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fed-create-family-icon .mud-icon-root {
    color: white;
}

.fed-create-family-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
}

.fed-create-family-content p {
    margin: 0;
    font-size: 0.8125rem;
    color: #3b82f6;
}

/* Roles Section */
.fed-roles-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #bfdbfe;
}

/* New Family Card (for Option 2) */
.fed-new-family-card {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 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);
}

.fed-new-family-card .fed-card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-radius: 14px 14px 0 0;
}

.fed-new-family-card .fed-card-header .mud-icon-root {
    color: white;
}

.fed-new-family-card .fed-card-header span {
    color: white;
}

.fed-new-family-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px dashed #86efac;
}

.fed-new-family-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fed-new-family-icon .mud-icon-root {
    color: white;
}

.fed-new-family-text h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #166534;
}

.fed-new-family-text p {
    margin: 0;
    font-size: 0.8125rem;
    color: #15803d;
}

.fed-new-family-card > .fed-section,
.fed-new-family-card > .fed-household-roles-section,
.fed-new-family-card > .fed-additional-members-section {
    padding: 0 1.25rem;
    margin: 1rem 0;
}

.fed-additional-members-hint {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
}

/* Notes Section */
.fed-notes-section {
    margin-top: 0.5rem;
}

/* Section */
.fed-section {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.fed-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
}

.fed-label.fed-required::after {
    content: " *";
    color: #ef4444;
}

/* Row layout */
.fed-row {
    display: flex;
    gap: 1rem;
}

.fed-flex-1 {
    flex: 1;
}

/* Cards */
.fed-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
}

.fed-card.fed-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.fed-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.fed-card-header .mud-icon-root {
    color: #6366f1;
}

.fed-marriage-card {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-color: #fbcfe8;
}

.fed-marriage-card .fed-card-header .mud-icon-root {
    color: #ec4899;
}

.fed-contact-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}

.fed-contact-card .fed-card-header .mud-icon-root {
    color: #3b82f6;
}

/* Marriage Section */
.fed-marriage-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1px solid #fbcfe8;
    border-radius: 10px;
}

.fed-marriage-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #be185d;
    font-size: 0.875rem;
    margin-bottom: 0.875rem;
}

.fed-marriage-header .mud-icon-root {
    color: #ec4899;
}

/* Contact Option in Autocomplete */
.fed-contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
}

.fed-contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.fed-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.fed-contact-name {
    font-weight: 500;
    color: #1f2937;
}

.fed-contact-family {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.fed-contact-family .mud-icon-root {
    font-size: 0.875rem;
}

/* Family Members Section */
.fed-family-members-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #bfdbfe;
}

.fed-family-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.fed-family-header .mud-icon-root {
    color: #3b82f6;
}

.fed-member-count {
    margin-left: auto;
    font-size: 0.6875rem !important;
    height: 22px !important;
}

.fed-family-hint {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
}

.fed-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.fed-member-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fed-member-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.fed-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.fed-member-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.fed-member-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
}

.fed-member-role {
    font-size: 0.75rem;
    color: #6b7280;
}

.fed-member-relation-select {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fed-label-small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}

.fed-select-group-sm {
    font-weight: 600;
    color: #374151;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.fed-select-item-sm {
    padding-left: 0.625rem;
    font-size: 0.8125rem;
}

/* Member Marriage Details */
.fed-member-marriage-details {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1px solid #fbcfe8;
    border-radius: 8px;
}

.fed-member-marriage-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: #be185d;
    font-size: 0.75rem;
    margin-bottom: 0.625rem;
}

.fed-member-marriage-header .mud-icon-root {
    color: #ec4899;
    font-size: 0.875rem;
}

.fed-input-small {
    background: white;
    font-size: 0.8125rem;
}

/* New Family Form */
.fed-new-family-form {
    margin-top: 0.875rem;
    padding: 1rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
}

.fed-additional-members-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #bfdbfe;
}

.fed-additional-members-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.fed-additional-members-header .mud-icon-root {
    color: #3b82f6;
}

.fed-member-count-sm {
    margin-left: auto;
    font-size: 0.625rem !important;
    height: 18px !important;
}

.fed-new-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.fed-new-member-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.fed-select-small {
    background: white;
    font-size: 0.8125rem;
}

.fed-add-member-btn {
    border-radius: 6px !important;
    font-size: 0.8125rem !important;
}

/* No Family Section */
.fed-no-family-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #bfdbfe;
}

.fed-no-family-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #92400e;
    margin-bottom: 0.75rem;
}

.fed-no-family-message .mud-icon-root {
    color: #f59e0b;
}

.fed-create-family-option {
    padding: 0.5rem;
}

.fed-checkbox {
    margin: 0 !important;
}

/* Family Group Section in New Contact */
.fed-family-group-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #bbf7d0;
}

.fed-family-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #166534;
    font-size: 0.8125rem;
    margin-bottom: 0.625rem;
}

.fed-family-group-header .mud-icon-root {
    color: #22c55e;
}

.fed-optional-chip {
    margin-left: auto;
    font-size: 0.625rem !important;
    height: 18px !important;
    background: #e5e7eb !important;
    color: #6b7280 !important;
}

/* New Contact Card - Enhanced Styles */
.fed-new-contact-card {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    border: 2px solid #6ee7b7;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1), 0 2px 4px -1px rgba(16, 185, 129, 0.06);
}

.fed-new-contact-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-top-right-radius: 16px;
    border-top-left-radius: 16px;
}

.fed-new-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fed-new-contact-icon .mud-icon-root {
    color: white;
}

.fed-new-contact-title-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.fed-new-contact-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.fed-new-contact-subtitle {
    font-size: 0.75rem;
    opacity: 0.85;
}

.fed-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%);
}

.fed-new-contact-form > .fed-section,
.fed-new-contact-form > .fed-new-contact-section,
.fed-new-contact-form > .fed-new-contact-marriage-section,
.fed-new-contact-form > .fed-new-contact-family-section {
    display: block !important;
    visibility: visible !important;
}

.fed-new-contact-section {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #d1fae5;
    margin-top: 0;
}

.fed-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 #d1fae5;
}

.fed-new-contact-section .fed-row {
    display: flex;
    gap: 1rem;
}

.fed-new-contact-section .fed-section {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.fed-new-contact-section-header .mud-icon-root {
    color: #10b981;
}

.fed-new-contact-section-header.fed-marriage-theme {
    color: #be185d;
    border-bottom-color: #fbcfe8;
}

.fed-new-contact-section-header.fed-marriage-theme .mud-icon-root {
    color: #ec4899;
}

.fed-new-contact-section-header.fed-family-theme {
    color: #1e40af;
    border-bottom-color: #bfdbfe;
}

.fed-new-contact-section-header.fed-family-theme .mud-icon-root {
    color: #3b82f6;
}

.fed-new-contact-section-header.fed-roles-theme {
    color: #7c3aed;
    border-bottom-color: #ddd6fe;
}

.fed-new-contact-section-header.fed-roles-theme .mud-icon-root {
    color: #8b5cf6;
}

/* Household Roles Section */
.fed-household-roles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.fed-role-checkbox {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}

.fed-role-checkbox:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.fed-role-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.fed-role-icon {
    flex-shrink: 0;
    padding: 0.375rem;
    border-radius: 8px;
    margin-top: 2px;
}

.fed-role-icon-head {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706 !important;
}

.fed-role-icon-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb !important;
}

.fed-role-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.fed-role-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
}

.fed-role-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.fed-new-contact-input {
    background: #f9fafb !important;
    border-radius: 8px;
}

.fed-new-contact-select {
    background: #f9fafb !important;
    border-radius: 8px;
}

.fed-new-contact-marriage-section {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1px solid #fbcfe8;
    border-radius: 12px;
    padding: 1rem;
}

.fed-new-contact-family-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1rem;
}

.fed-new-contact-family-checkbox {
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.fed-checkbox-label {
    font-size: 0.875rem;
    color: #374151;
}

.fed-new-family-group-form {
    margin-top: 0.875rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
}

.fed-household-roles-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: 10px;
    border: 1px solid #e9d5ff;
}

.fed-household-roles-section .fed-new-contact-section-header {
    margin-bottom: 0.75rem;
}

/* Family Group Card (Separate Section - Required) */
.fed-family-group-card {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.fed-family-group-card .fed-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.95rem;
}

.fed-family-group-card .fed-card-header .mud-icon-root {
    color: #3b82f6;
}

.fed-required-chip {
    margin-left: auto;
    font-size: 0.625rem !important;
    height: 18px !important;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5 !important;
    font-weight: 600 !important;
}

.fed-family-group-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.fed-family-group-hint .mud-icon-root {
    color: #3b82f6;
    flex-shrink: 0;
}

.fed-family-group-form {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #bfdbfe;
}

.fed-family-group-checkbox {
    padding: 0.625rem 0.875rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.fed-family-group-card.fed-family-required {
    border-color: #dc2626;
    background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 50%, #fecaca 100%);
}

.fed-family-group-card.fed-family-required .fed-card-header {
    color: #991b1b;
}

.fed-family-group-card.fed-family-required .fed-card-header .mud-icon-root {
    color: #dc2626;
}

.fed-hint-required {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.fed-hint-required .mud-icon-root {
    color: #dc2626;
}

/* Family Group Autocomplete */
.fed-family-autocomplete {
    background: white;
}

.fed-family-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.fed-family-option-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 8px;
    color: #3b82f6;
    flex-shrink: 0;
}

.fed-family-option-icon.fed-new-icon {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #10b981;
}

.fed-family-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.fed-family-option-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fed-family-option-members {
    font-size: 0.75rem;
    color: #6b7280;
}

.fed-family-option-hint {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 500;
}

.fed-family-new-option {
    border-top: 1px dashed #d1d5db;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
}

.fed-family-no-items {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    color: #6b7280;
    font-size: 0.8125rem;
}

.fed-new-family-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #047857;
    font-size: 0.8125rem;
}

.fed-new-family-indicator .mud-icon-root {
    color: #10b981;
}

.fed-existing-family-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
    font-size: 0.8125rem;
}

.fed-existing-family-indicator .mud-icon-root {
    color: #3b82f6;
}

.fed-family-group-form .fed-section {
    margin-bottom: 1rem;
}

.fed-family-group-form .fed-section:last-child {
    margin-bottom: 0;
}

.fed-family-group-card .fed-household-roles-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: 10px;
    border: 1px solid #e9d5ff;
}

/* Divider Section */
.fed-divider-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.fed-divider-line {
    flex: 1;
    height: 1px;
    background: #d1d5db;
}

.fed-divider-text {
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Select Groups */
.fed-select-group {
    font-weight: 600;
    color: #374151;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.fed-select-item {
    padding-left: 0.75rem;
}

/* Inputs */
.fed-input,
.fed-select {
    background: white;
}

.fed-textarea {
    background: white;
}

/* Footer */
.fed-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.fed-btn-cancel {
    border-radius: 8px !important;
    padding: 0.5rem 1.25rem !important;
}

.fed-btn-submit {
    border-radius: 8px !important;
    padding: 0.5rem 1.5rem !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    gap: 0.5rem;
}

.fed-btn-submit:disabled {
    opacity: 0.6;
}

.fed-spinner {
    width: 18px !important;
    height: 18px !important;
    margin-right: 0.25rem;
}

/* Scrollbar */
.fed-body::-webkit-scrollbar {
    width: 6px;
}

.fed-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.fed-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.fed-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Family Edit Dialog Responsive */
@media (max-width: 640px) {
    .fed-row {
        flex-direction: column;
    }
    
    .fed-header {
        padding: 1rem;
    }
    
    .fed-header-icon {
        width: 40px;
        height: 40px;
    }
    
    .fed-header-title {
        font-size: 1.125rem;
    }
    
    .fed-body {
        padding: 1rem;
    }
    
    .fed-new-contact-header {
        padding: 0.875rem 1rem;
    }
    
    .fed-new-contact-icon {
        width: 36px;
        height: 36px;
    }
    
    .fed-new-contact-form {
        padding: 1rem;
    }
    
    .fed-footer {
        padding: 0.875rem 1rem;
        flex-direction: column-reverse;
    }
    
    .fed-btn-cancel,
    .fed-btn-submit {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
   MARRIAGE HISTORY SECTION STYLES
   ============================================= */

/* Section Container */
.mh-marriage-section {
    position: relative;
    overflow: hidden;
}

.mh-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 */
.fm-section-icon-wrapper.mh-marriage-theme {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.35);
}

/* Section Count Badge */
.mh-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #f43f5e 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 */
.mh-add-btn-hover:hover {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.1) 0%, rgba(225, 29, 72, 0.1) 100%);
    border-color: #f43f5e;
    color: #e11d48;
}

/* Timeline Container */
.mh-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
}

/* Timeline Item */
.mh-timeline-item {
    display: flex;
    gap: 1.25rem;
    position: relative;
}

.mh-timeline-item:last-child .mh-timeline-line {
    display: none;
}

/* Timeline Connector */
.mh-timeline-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.mh-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 rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.mh-timeline-dot .mud-icon-root {
    font-size: 1.125rem;
}

.mh-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 */
.mh-timeline-dot.mh-status-married {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}

.mh-timeline-dot.mh-status-divorced {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

.mh-timeline-dot.mh-status-widowed {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.mh-timeline-dot.mh-status-annulled {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.mh-timeline-dot.mh-status-separated {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.mh-timeline-dot.mh-status-other {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.4);
}

/* Marriage Card */
.mh-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);
}

.mh-marriage-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 7px;
    right: 7px;
    height: 4px;
    background: linear-gradient(90deg, #f43f5e 0%, #fb7185 50%, #fda4af 100%);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mh-marriage-card:hover {
    border-color: #fb7185;
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.15);
    transform: translateY(-2px);
}

.mh-marriage-card:hover::before {
    opacity: 1;
}

.mh-marriage-card.active {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: #f43f5e;
}

.mh-marriage-card.active::before {
    opacity: 1;
}

/* Marriage Header */
.mh-marriage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Partners Display */
.mh-partners {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mh-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.mh-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;
}

.mh-marriage-card:hover .mh-partner-avatar {
    transform: scale(1.05);
}

.mh-partner-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    max-width: 90px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hearts Connector */
.mh-hearts-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

.mh-heart-icon {
    color: #f43f5e;
    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); }
}

.mh-marriage-card:not(.active) .mh-heart-icon {
    animation: none;
    color: #9ca3af;
}

/* Status Badge */
.mh-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;
}

.mh-status-badge.mh-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);
}

.mh-status-badge.mh-status-divorced {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(71, 85, 105, 0.12) 100%);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.mh-status-badge.mh-status-widowed {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(79, 70, 229, 0.12) 100%);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.mh-status-badge.mh-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);
}

.mh-status-badge.mh-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);
}

.mh-status-badge.mh-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 */
.mh-marriage-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mh-date-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mh-date-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mh-date-item:hover {
    background: white;
    border-color: #d1d5db;
}

.mh-date-item .mud-icon-root {
    color: #f43f5e;
    font-size: 1.25rem;
}

.mh-date-item.end .mud-icon-root {
    color: #64748b;
}

.mh-date-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.mh-date-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.mh-date-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.mh-date-separator {
    display: flex;
    align-items: center;
    color: #d1d5db;
}

.mh-date-separator .mud-icon-root {
    font-size: 1rem;
}

/* Duration */
.mh-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;
}

.mh-duration .mud-icon-root {
    font-size: 1rem;
    color: #f43f5e;
}

/* Marriage Actions */
.mh-marriage-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mh-marriage-card:hover .mh-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: #f43f5e;
}

.mh-rose-btn,
.crm-empty-state-box.rose .crm-empty-action {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.mh-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) {
    .mh-marriage-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mh-partners {
        width: 100%;
        justify-content: center;
    }
    
    .mh-status-badge {
        align-self: center;
    }
    
    .mh-date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mh-date-separator {
        transform: rotate(90deg);
        align-self: center;
    }
    
    .mh-date-item {
        justify-content: flex-start;
    }
    
    .mh-timeline-item {
        gap: 0.75rem;
    }
    
    .mh-timeline-dot {
        width: 32px;
        height: 32px;
    }
    
    .mh-timeline-dot .mud-icon-root {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .mh-partner-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.8125rem;
    }
    
    .mh-partner-name {
        font-size: 0.75rem;
        max-width: 70px;
    }
    
    .mh-marriage-card {
        padding: 1rem;
    }
    
    .mh-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, #ffffff);
    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, #e5e7eb);
    flex-shrink: 0;
    background: var(--mud-palette-surface, #ffffff);
}

.contact-type-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary, #1f2937);
}

.contact-type-modal .modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--mud-palette-text-secondary, #6b7280);
    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, #f3f4f6);
    color: var(--mud-palette-text-primary, #1f2937);
}

/* ===== 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, #374151);
    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, #d1d5db);
    border-radius: 8px;
    background: var(--mud-palette-surface, #ffffff);
    color: var(--mud-palette-text-primary, #1f2937);
    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: #667eea;
}

.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: #667eea;
    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, #9ca3af);
}

.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, #6b7280);
}

.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, #e5e7eb);
    background: var(--mud-palette-surface, #ffffff);
    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, #ffffff);
    color: var(--mud-palette-text-primary, #374151);
    border: 1px solid var(--mud-palette-lines-default, #d1d5db);
}

.contact-type-modal .btn-secondary:hover {
    background: var(--mud-palette-action-default-hover, #f9fafb);
    border-color: #667eea;
    color: #667eea;
}

.contact-type-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 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 */
.crm-dlg-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form row */
.crm-dlg-form-row {
    width: 100%;
}

/* Form input styling */
.crm-dlg-input {
    width: 100%;
}

/* Select option with icon */
.crm-dlg-select-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-dlg-select-option .mud-icon-root {
    color: var(--mud-palette-text-secondary, #6b7280);
}

/* Color option with dot */
.crm-dlg-color-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-dlg-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =====================================================
   VIEW COMPANY STYLES
   ===================================================== */

/* Company Profile Card */
.cv-profile-card.company-profile .cv-avatar.company-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.cv-company-year {
    display: inline-flex;
    align-items: center;
    font-size: 0.8125rem;
    color: #64748b;
    margin-left: 0.75rem;
}

/* Company Connection Avatar */
.cv-connection-avatar.company {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

/* Core Identity Styles */
.cv-company-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.cv-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.cv-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cv-stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.cv-stat-icon.green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.cv-stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.cv-stat-info {
    display: flex;
    flex-direction: column;
}

.cv-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.cv-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Mask Toggle */
.cv-info-value.masked {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-toggle-mask {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #64748b;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cv-toggle-mask:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

/* Badge Styles */
.cv-badge.structure {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* =====================================================
   CORE IDENTITY - PREMIUM CARD STYLES
   ===================================================== */

.cv-identity-cards {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cv-identity-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cv-identity-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cv-identity-card.primary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.cv-identity-card.primary-card .cv-identity-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.cv-identity-card.primary-card .cv-identity-card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.cv-identity-card.primary-card .cv-identity-card-title {
    color: rgba(255, 255, 255, 0.9);
}

.cv-identity-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.cv-identity-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-identity-card-icon.tax {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.cv-identity-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.cv-identity-card-body {
    padding: 1.25rem;
}

/* Primary Card Content */
.cv-identity-main-value {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-identity-business-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.cv-identity-dba {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: fit-content;
}

/* Tax Card Content */
.cv-identity-tax-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-identity-tax-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cv-identity-tax-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cv-identity-ein {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 0.05em;
}

.cv-identity-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cv-identity-toggle-btn:hover {
    background: #e2e8f0;
    color: #3b82f6;
}

.cv-identity-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cv-identity-not-provided {
    font-size: 0.9375rem;
    color: #94a3b8;
    font-style: italic;
}

/* Info Grid Cards */
.cv-identity-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cv-identity-info-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.cv-identity-info-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cv-identity-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cv-identity-info-icon.structure {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #6366f1;
}

.cv-identity-info-icon.founded {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.cv-identity-info-icon.employees {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.cv-identity-info-content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.cv-identity-info-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.cv-identity-info-value {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.cv-identity-info-value.empty {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.875rem;
}

/* Structure Badge */
.cv-identity-structure-badge {
    display: inline-flex;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.cv-identity-structure-badge.corporation {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
}

.cv-identity-structure-badge.s-corp {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
}

.cv-identity-structure-badge.llc {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.cv-identity-structure-badge.partnership {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
}

.cv-identity-structure-badge.sole-prop {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.cv-identity-structure-badge.non-profit {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    color: #0f766e;
}

.cv-identity-structure-badge.default {
    background: #f1f5f9;
    color: #475569;
}

/* Year Founded */
.cv-identity-year {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.cv-identity-years-ago {
    font-size: 0.75rem;
    color: #64748b;
    padding: 0.125rem 0.5rem;
    background: #f8fafc;
    border-radius: 4px;
}

/* Employee Count */
.cv-identity-employee-count {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.cv-identity-employee-label {
    font-size: 0.875rem;
    color: #64748b;
}

.cv-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;
}

.cv-identity-size-badge.micro {
    background: #fef3c7;
    color: #b45309;
}

.cv-identity-size-badge.small {
    background: #dbeafe;
    color: #1d4ed8;
}

.cv-identity-size-badge.medium {
    background: #d1fae5;
    color: #059669;
}

.cv-identity-size-badge.large {
    background: #e0e7ff;
    color: #4338ca;
}

.cv-identity-size-badge.enterprise {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
}

/* Stats Bar */
.cv-identity-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.cv-identity-stat-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.cv-identity-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: white;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cv-identity-stat-icon.verified {
    color: #10b981;
}

.cv-identity-stat-content {
    display: flex;
    flex-direction: column;
}

.cv-identity-stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.cv-identity-stat-text {
    font-size: 0.75rem;
    color: #64748b;
}

.cv-identity-stat-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
}

/* Responsive */
@media (max-width: 1024px) {
    .cv-identity-cards {
        grid-template-columns: 1fr;
    }
    
    .cv-identity-info-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-identity-stats-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cv-identity-stat-divider {
        width: 100%;
        height: 1px;
    }
}

/* Location & Contact Styles */
.cv-location-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cv-address-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.cv-address-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cv-address-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cv-address-icon.business {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.cv-address-icon.shipping {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.cv-address-type {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.cv-address-content {
    padding-left: calc(36px + 0.75rem);
}

.cv-address-line {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
}

.cv-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cv-map-link:hover {
    color: #1d4ed8;
}

.cv-no-data {
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
}

/* Contact Cards */
.cv-contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.cv-contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.cv-contact-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.cv-contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cv-contact-icon.phone {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.cv-contact-icon.email {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.cv-contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cv-contact-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cv-contact-value {
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

.cv-contact-value.link {
    color: #3b82f6;
    text-decoration: none;
}

.cv-contact-value.link:hover {
    text-decoration: underline;
}

.cv-contact-actions {
    display: flex;
    gap: 0.5rem;
}

.cv-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cv-icon-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Inner Tabs (for Industry/Department) */
.cv-inner-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.375rem;
    background: #f1f5f9;
    border-radius: 12px;
    width: fit-content;
}

.cv-inner-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-inner-tab-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #334155;
}

.cv-inner-tab-btn.active {
    background: white;
    color: #6366f1;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cv-inner-tab-content {
    animation: fadeIn 0.2s ease;
}

.cv-inner-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cv-inner-content-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #475569;
}

/* Department Icon Variation */
.cv-industry-icon.department {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Industry Styles */
.cv-industry-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cv-industry-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.cv-industry-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.cv-industry-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Editable Industry Stat */
.cv-industry-stat-editable {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-industry-stat-editable:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
}

.cv-industry-stat-editable:hover .cv-industry-stat-edit-btn {
    opacity: 1;
}

.cv-industry-stat-edit-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.cv-industry-stat-edit-btn .mud-icon-root {
    font-size: 0.875rem;
}

.cv-industry-stat-edit-btn:hover {
    background: #2563eb;
}

/* SIC/NAICS Code Info Box */
.cv-sic-naics-info {
    margin-top: 1rem;
}

.cv-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;
}

.cv-code-info-box .mud-icon-root {
    color: #0284c7;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.cv-code-info-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cv-code-info-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0369a1;
}

.cv-code-info-desc {
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.5;
}

.cv-industries-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cv-industry-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.cv-industry-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cv-industry-card.primary {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.cv-industry-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cv-industry-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-industry-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cv-industry-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.cv-industry-code {
    font-size: 0.75rem;
    color: #64748b;
}

.cv-primary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cv-industry-description {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
    padding-left: calc(40px + 1rem);
}

.cv-industry-actions {
    display: flex;
    gap: 0.5rem;
    padding-left: calc(40px + 1rem);
}

.cv-industry-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-industry-action-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.cv-industry-action-btn.danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Industry Suggestions */
.cv-industry-suggestions {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.cv-suggestions-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 1rem 0;
}

.cv-suggestions-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    font-size: 0.8125rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-suggestion-chip:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

/* Key Contacts Styles */
.cv-contacts-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cv-contact-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.cv-key-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cv-key-contact-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.cv-key-contact-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cv-key-contact-card.primary {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.cv-key-contact-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
}

.cv-key-contact-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    overflow: hidden;
}

.cv-key-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-primary-contact-badge {
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(32px);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.cv-key-contact-body {
    text-align: center;
    margin-bottom: 1rem;
}

.cv-key-contact-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.cv-key-contact-title {
    display: block;
    font-size: 0.875rem;
    color: #3b82f6;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.cv-key-contact-dept {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

.cv-key-contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cv-key-contact-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cv-key-contact-detail:hover {
    color: #3b82f6;
}

.cv-key-contact-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.cv-key-contact-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cv-key-contact-action:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

/* Departments Summary */
.cv-departments-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.cv-departments-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 1rem 0;
}

.cv-departments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cv-department-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cv-department-name {
    font-size: 0.875rem;
    color: #475569;
}

.cv-department-count {
    background: #3b82f6;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
}

/* Social Media Styles */
.cv-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cv-social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.cv-social-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cv-social-card.empty {
    opacity: 0.6;
}

.cv-social-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cv-social-card.website .cv-social-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.cv-social-card.linkedin .cv-social-icon {
    background: linear-gradient(135deg, #0077b5 0%, #005582 100%);
}

.cv-social-card.facebook .cv-social-icon {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.cv-social-card.twitter .cv-social-icon {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.cv-social-card.instagram .cv-social-icon {
    background: linear-gradient(135deg, #e4405f 0%, #c13584 50%, #833ab4 100%);
}

.cv-social-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.cv-social-platform {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cv-social-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cv-social-link:hover {
    text-decoration: underline;
}

.cv-social-empty {
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
}

.cv-social-actions {
    display: flex;
    gap: 0.5rem;
}

.cv-social-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.cv-social-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cv-social-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.cv-social-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

/* ========== 3-COLUMN SOCIAL MEDIA GRID ========== */
.cv-social-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cv-social-card-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.cv-social-card-compact:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cv-social-card-compact.empty {
    opacity: 0.7;
    background: #f8fafc;
}

.cv-social-card-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.cv-social-card-compact .cv-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.cv-social-card-compact.website .cv-social-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.cv-social-card-compact.linkedin .cv-social-icon {
    background: linear-gradient(135deg, #0077b5 0%, #005582 100%);
}

.cv-social-card-compact.facebook .cv-social-icon {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.cv-social-card-compact.twitter .cv-social-icon {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.cv-social-card-compact.instagram .cv-social-icon {
    background: linear-gradient(135deg, #e4405f 0%, #c13584 50%, #833ab4 100%);
}

.cv-social-card-compact.youtube .cv-social-icon {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.cv-social-card-compact .cv-social-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cv-social-card-compact .cv-social-platform {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cv-social-card-compact .cv-social-link {
    font-size: 0.8125rem;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cv-social-card-compact .cv-social-link:hover {
    text-decoration: underline;
}

.cv-social-card-compact .cv-social-empty {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-style: italic;
}

.cv-social-card-compact .cv-social-actions {
    display: flex;
    gap: 0.375rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

.cv-icon-btn-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cv-icon-btn-sm:hover {
    background: #3b82f6;
    color: white;
}

.cv-icon-btn-sm .mud-icon-root {
    font-size: 0.875rem;
}

/* ========== DEPARTMENT ADD BUTTON ========== */
.cv-departments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cv-department-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px dashed #a5b4fc;
    border-radius: 8px;
    color: #6366f1;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cv-department-add-btn:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #818cf8;
    color: #4f46e5;
}

.cv-department-add-btn .mud-icon-root {
    font-size: 0.875rem;
}

/* Social Media Select Item */
.cv-social-select-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-social-select-item .mud-icon-root {
    font-size: 1.125rem;
}

/* Secondary Edit Button */
.cv-edit-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
}

.cv-edit-btn.secondary:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Delete Button for Dialog */
.crm-dlg-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: none;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-dlg-btn-danger:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #b91c1c;
}

/* Form Styles */
.cv-form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.cv-form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cv-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 1.25rem 0;
}

.cv-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) {
    .cv-social-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cv-company-stats,
    .cv-industry-stats {
        grid-template-columns: 1fr;
    }
    
    .cv-location-sections,
    .cv-contact-cards {
        grid-template-columns: 1fr;
    }
    
    .cv-key-contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-social-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-social-grid-3col {
        grid-template-columns: 1fr;
    }
    
    .cv-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 rgba(0, 0, 0, 0.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, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    overflow: hidden;
}

.summarize-header-glow {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 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: rgba(255, 255, 255, 0.3);
    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: rgba(255, 255, 255, 0.2);
    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: rgba(255, 255, 255, 0.2);
    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: rgba(255, 255, 255, 0.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, #6366f1 0%, #a855f7 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, #6366f1, #a855f7);
    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;
}

.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;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.25) 100%);
    color: #6366f1;
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: #8b5cf6;
}

.stat-icon.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(20, 184, 166, 0.25) 100%);
    color: #14b8a6;
}

.stat-icon.orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.25) 100%);
    color: #f97316;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.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;
}

.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: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.section-header .mud-icon-root {
    color: #8b5cf6;
}

/* Summary Text Box */
.summary-text-box {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-radius: 10px;
    border-left: 3px solid #8b5cf6;
}

.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, #6366f1 0%, #a855f7 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%, #fbbf24 30%, #34d399 70%, #22c55e 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: #22c55e;
}

/* 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: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.topic-tag.purple {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.topic-tag.teal {
    background: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
}

.topic-tag.orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
}

.topic-tag.pink {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

/* 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, rgba(99, 102, 241, 0.1) 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: #8b5cf6;
    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, #6366f1 0%, #8b5cf6 100%) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.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: #3b82f6;
}

.stat-mini-icon.task {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.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: #8b5cf6;
}

.breakdown-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
}

.breakdown-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
}

.breakdown-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.breakdown-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.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, #8b5cf6, #a78bfa);
}

.breakdown-bar.teal {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}

.breakdown-bar.orange {
    background: linear-gradient(90deg, #f97316, #fb923c);
}

.breakdown-bar.blue {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.breakdown-bar.green {
    background: linear-gradient(90deg, #22c55e, #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, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.25) 100%);
    color: #22c55e;
}

.timeline-info-icon.last {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
    color: #3b82f6;
}

.timeline-info-icon.duration {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: #8b5cf6;
}

.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: rgba(99, 102, 241, 0.04);
}

.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: #8b5cf6;
}

.recent-activity-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
}

.recent-activity-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
}

.recent-activity-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.recent-activity-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.recent-activity-icon.gray {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

.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 */
.crm-dlg-header-summary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 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 rgba(0, 0, 0, 0.08);
}

.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, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.25) 100%);
    color: #6366f1;
}

.summary-stat-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: #8b5cf6;
}

.summary-stat-icon.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(20, 184, 166, 0.25) 100%);
    color: #14b8a6;
}

.summary-stat-icon.orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.25) 100%);
    color: #f97316;
}

.summary-stat-icon.note {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
    color: #3b82f6;
}

.summary-stat-icon.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.25) 100%);
    color: #22c55e;
}

.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: #8b5cf6;
}

.summary-breakdown-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
}

.summary-breakdown-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
}

.summary-breakdown-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.summary-breakdown-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.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, #8b5cf6, #a78bfa);
}

.summary-breakdown-bar.teal {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}

.summary-breakdown-bar.orange {
    background: linear-gradient(90deg, #f97316, #fb923c);
}

.summary-breakdown-bar.blue {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.summary-breakdown-bar.green {
    background: linear-gradient(90deg, #22c55e, #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, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.25) 100%);
    color: #22c55e;
}

.summary-timeline-icon.last {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
    color: #3b82f6;
}

.summary-timeline-icon.duration {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: #8b5cf6;
}

.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: rgba(99, 102, 241, 0.04);
}

.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: #8b5cf6;
}

.summary-recent-icon.teal {
    background: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
}

.summary-recent-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
}

.summary-recent-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.summary-recent-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.summary-recent-icon.gray {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

.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, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #8b5cf6;
}

.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: med- (Marriage Edit Dialog)
   ============================================= */

.marriage-edit-dialog .mud-dialog {
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

.marriage-edit-dialog .mud-dialog-title,
.marriage-edit-dialog .mud-dialog-content,
.marriage-edit-dialog .mud-dialog-actions {
    padding: 0;
}

/* Header Styles */
.med-header {
    position: relative;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #fb7185 100%);
    overflow: hidden;
}

.med-header-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.med-heart-float {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: medHeartFloat 6s ease-in-out infinite;
}

.med-heart-1 {
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.med-heart-2 {
    top: 60%;
    right: 25%;
    animation-delay: 2s;
}

.med-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; }
}

.med-rings-decoration {
    position: absolute;
    bottom: -20px;
    left: 20px;
    display: flex;
    gap: -10px;
}

.med-ring {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: medRingShine 3s ease-in-out infinite;
}

.med-ring-1 {
    animation-delay: 0s;
}

.med-ring-2 {
    margin-left: -20px;
    animation-delay: 1.5s;
}

@keyframes medRingShine {
    0%, 100% { border-color: rgba(255, 255, 255, 0.2); }
    50% { border-color: rgba(255, 255, 255, 0.4); }
}

.med-header-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    z-index: 1;
}

.med-header-icon {
    position: relative;
    flex-shrink: 0;
}

.med-icon-glow {
    position: absolute;
    inset: -6px;
    background: rgba(255, 255, 255, 0.3);
    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; }
}

.med-icon-box {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.med-header-text {
    flex: 1;
    color: white;
}

.med-header-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.med-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.med-header-subtitle {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
}

/* Body Styles */
.med-body {
    padding: 1.5rem;
    background: var(--mud-palette-background);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

.med-body::-webkit-scrollbar {
    width: 6px;
}

.med-body::-webkit-scrollbar-track {
    background: transparent;
}

.med-body::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
}

/* Section Styles */
.med-section {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.med-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;
}

.med-section-header .mud-icon-root {
    color: #ec4899;
}

/* Partners Display */
.med-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);
}

.med-partners-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.med-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);
}

.med-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 rgba(0, 0, 0, 0.15);
}

.med-partner-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.med-partner-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.med-partner-role {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.med-partners-connector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.med-connector-line {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ec4899);
}

.med-connector-line:last-child {
    background: linear-gradient(90deg, #ec4899, transparent);
}

.med-connector-heart {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 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 */
.med-status-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.med-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;
}

.med-status-option:hover {
    border-color: var(--mud-palette-primary);
    transform: translateY(-2px);
}

.med-status-option.med-status-active {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.08);
}

.med-status-option span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.med-status-option.med-status-active span {
    color: #ec4899;
}

.med-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.med-status-icon.current {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.med-status-icon.divorced {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.med-status-icon.separated {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.med-status-icon.widowed {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.med-status-icon.annulled {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* Dates Grid */
.med-dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.med-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);
}

.med-date-card-end {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.03);
}

.med-date-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.med-date-icon.wedding {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(244, 63, 94, 0.2) 100%);
    color: #ec4899;
}

.med-date-icon.end {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.med-date-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.med-date-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.med-date-picker .mud-input-control {
    margin: 0;
}

.med-date-picker .mud-input-outlined-border {
    border-color: var(--mud-palette-lines-default);
}

/* Anniversary Display */
.med-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);
}

.med-anniversary-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.med-anniversary-info {
    display: flex;
    flex-direction: column;
}

.med-anniversary-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.med-anniversary-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ec4899;
}

/* Expandable Sections */
.med-expandable-section {
    padding: 0;
    overflow: hidden;
}

.med-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;
}

.med-expandable-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.med-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;
}

.med-section-header-content .mud-icon-root {
    color: #ec4899;
}

.med-optional-chip {
    font-size: 0.625rem !important;
    height: 20px !important;
    background: var(--mud-palette-background-gray) !important;
}

.med-expand-icon {
    color: var(--mud-palette-text-secondary);
    transition: transform 0.2s ease;
}

.med-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 */
.med-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.med-form-field {
    display: flex;
    flex-direction: column;
}

.med-form-field.med-full-width {
    grid-column: 1 / -1;
}

.med-input .mud-input-control {
    margin: 0;
}

.med-input .mud-input-outlined-border {
    border-color: var(--mud-palette-lines-default);
    border-radius: 10px;
}

.med-input:hover .mud-input-outlined-border {
    border-color: var(--mud-palette-primary);
}

.med-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.med-checkbox-label .mud-icon-root {
    color: var(--mud-palette-text-secondary);
}

/* Textarea */
.med-textarea .mud-input-control {
    margin: 0;
}

.med-textarea .mud-input-outlined-border {
    border-radius: 10px;
}

.med-textarea textarea {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Footer */
.med-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;
}

.med-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.med-footer-hint .mud-icon-root {
    font-size: 1rem;
}

.med-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.med-btn-cancel {
    border-radius: 10px !important;
}

.med-btn-submit {
    border-radius: 10px !important;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 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;
}

.med-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45) !important;
}

.med-spinner {
    width: 18px !important;
    height: 18px !important;
    margin-right: 0.5rem;
}

/* Responsive */
/* ========== CREATE MODE - PARTNER SEARCH ========== */
.med-partners-create {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.med-partner-fixed {
    display: flex;
    justify-content: center;
}

.med-partner-card-fixed {
    position: relative;
    border: 2px solid #ec4899;
}

.med-partner-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.med-partner-badge .mud-icon-root {
    font-size: 14px !important;
}

.med-partners-connector-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.25rem 0;
}

.med-connector-line-v {
    width: 2px;
    height: 16px;
    background: linear-gradient(to bottom, #ec4899, #8b5cf6);
}

.med-partner-search-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.med-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;
}

.med-search-label .mud-icon-root {
    color: #8b5cf6;
}

.med-partner-search {
    width: 100%;
}

.med-partner-search .mud-input-slot {
    background: var(--mud-palette-surface) !important;
}

/* Partner Autocomplete Options */
.med-partner-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.med-partner-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.med-partner-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.med-partner-option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.med-partner-option-email {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Results */
.med-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 */
.med-selected-partner {
    margin-top: 0.5rem;
}

.med-partner-card-selected {
    position: relative;
    border: 2px solid #8b5cf6;
    animation: med-partner-selected 0.3s ease;
}

@keyframes med-partner-selected {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.med-partner-card-selected .med-partner-email {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.125rem;
}

.med-remove-partner {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    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;
}

.med-remove-partner:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.med-remove-partner .mud-icon-root {
    font-size: 14px !important;
}

@media (max-width: 600px) {
    .med-partners-display {
        flex-direction: column;
    }
    
    .med-partners-connector {
        transform: rotate(90deg);
    }
    
    .med-partner-card {
        width: 100%;
    }
    
    .med-status-selector {
        flex-wrap: wrap;
    }
    
    .med-status-option {
        min-width: calc(33.33% - 0.5rem);
    }
    
    .med-form-row {
        grid-template-columns: 1fr;
    }
    
    .med-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .med-footer-hint {
        justify-content: center;
        text-align: center;
    }
    
    .med-footer-actions {
        justify-content: flex-end;
    }
}

/* =============================================
   DYNAMIC LOADER COMPONENT
   Prefix: dl-
   Simple HTML Spinner Loading
   ============================================= */

/* Loader Container */
.dl-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dl-loader.visible {
    opacity: 1;
}

/* Size Variants */
.dl-loader.dl-sm .dl-spinner { width: 32px; height: 32px; }
.dl-loader.dl-md .dl-spinner { width: 48px; height: 48px; }
.dl-loader.dl-lg .dl-spinner { width: 72px; height: 72px; }

.dl-loader.dl-sm .dl-spinner-ring { border-width: 2px; }
.dl-loader.dl-md .dl-spinner-ring { border-width: 3px; }
.dl-loader.dl-lg .dl-spinner-ring { border-width: 4px; }

/* Spinner */
.dl-spinner {
    position: relative;
    width: 48px;
    height: 48px;
}

.dl-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: dl-spin 1.5s linear infinite;
}

.dl-spinner-ring:nth-child(1) {
    border-top-color: #6366f1;
    animation-duration: 1.5s;
}

.dl-spinner-ring:nth-child(2) {
    border-right-color: #8b5cf6;
    animation-duration: 2s;
    animation-direction: reverse;
}

.dl-spinner-ring:nth-child(3) {
    border-bottom-color: #ec4899;
    animation-duration: 2.5s;
}

@keyframes dl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message */
.dl-message {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    text-align: center;
    animation: dl-fade 0.5s ease 0.2s forwards;
    opacity: 0;
}

@keyframes dl-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 rgba(99, 102, 241, 0.1);
}

.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: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    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: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.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, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-radius: 12px;
    border: 1px dashed rgba(99, 102, 241, 0.2);
}

.crm-co-empty-address-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    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, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #8b5cf6 !important;
}

.crm-co-other-chip:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 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: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.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: rgba(99, 102, 241, 0.1);
    color: var(--mud-palette-primary);
}

.crm-co-toggle-btn.active {
    background: var(--mud-palette-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.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 rgba(99, 102, 241, 0.1);
    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, rgba(99, 102, 241, 0.05) 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 rgba(99, 102, 241, 0.1);
}

.crm-co-contacts-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    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: rgba(99, 102, 241, 0.03);
}

.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%, rgba(99, 102, 241, 0.03) 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, #6366f1 0%, #8b5cf6 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: #4f46e5;
    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, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
    color: #d97706;
    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: rgba(99, 102, 241, 0.1);
    color: var(--mud-palette-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* 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: rgba(99, 102, 241, 0.1);
    color: var(--mud-palette-primary);
}

.crm-co-table-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.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: vf-
   ============================================ */

/* Loading Skeleton */
.vf-loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vf-skeleton-header {
    height: 60px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 25%, rgba(139, 92, 246, 0.15) 50%, rgba(99, 102, 241, 0.1) 75%);
    background-size: 200% 100%;
    animation: vf-shimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
}

.vf-skeleton-tabs {
    display: flex;
    gap: 0.5rem;
}

.vf-skeleton-tab {
    height: 40px;
    width: 120px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    animation: vf-shimmer 1.5s ease-in-out infinite;
}

.vf-skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vf-skeleton-card {
    height: 200px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    animation: vf-shimmer 1.5s ease-in-out infinite;
}

@keyframes vf-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Profile Card Overrides */
.vf-profile-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.vf-avatar {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%) !important;
}

.vf-badge {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%) !important;
    color: white !important;
}

/* Family Tab Styles */
.vf-family-tab {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.vf-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.vf-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Family Members Grid */
.vf-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.vf-member-card {
    background: var(--mud-palette-surface);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.vf-member-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.vf-spouse-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-color: rgba(236, 72, 153, 0.2);
}

.vf-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.vf-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vf-member-avatar span {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.vf-member-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vf-member-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vf-member-role {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.vf-member-role .mud-icon-root {
    font-size: 0.875rem;
    color: var(--mud-palette-primary);
}

.vf-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, rgba(236, 72, 153, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #ec4899;
}

.vf-member-marriage-badge .mud-icon-root {
    font-size: 0.75rem;
}

.vf-member-actions {
    display: flex;
    gap: 0.25rem;
}

.vf-member-action,
.vf-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;
}

.vf-member-action:hover,
.vf-action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--mud-palette-primary);
}

.vf-member-action.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Marriages List */
.vf-marriages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.vf-marriage-card {
    background: var(--mud-palette-surface);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.vf-marriage-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.vf-current-marriage {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-color: rgba(236, 72, 153, 0.2);
}

.vf-marriage-partners {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.vf-marriage-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.vf-partner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vf-partner-avatar span {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.vf-partner-name {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vf-marriage-connector {
    color: #ec4899;
}

.vf-marriage-connector .mud-icon-root {
    font-size: 1rem;
}

.vf-marriage-details {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vf-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;
}

.vf-marriage-status.current {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #ec4899;
}

.vf-marriage-status.divorced {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.vf-marriage-status.separated {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.vf-marriage-status.widowed {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.vf-marriage-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.vf-marriage-date.end {
    color: #ef4444;
}

.vf-marriage-date .mud-icon-root {
    font-size: 1rem;
}

.vf-marriage-actions {
    flex-shrink: 0;
}

/* Hobbies Grid */
.vf-hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.vf-hobby-card {
    background: var(--mud-palette-surface);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.vf-hobby-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.vf-hobby-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.vf-hobby-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.vf-hobby-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.vf-hobby-category {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.vf-hobby-skill {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.vf-hobby-skill.beginner {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.vf-hobby-skill.intermediate {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.vf-hobby-skill.advanced {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.vf-hobby-skill.expert {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.vf-hobby-actions {
    flex-shrink: 0;
}

/* Pets Grid */
.vf-pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.vf-pet-card {
    background: var(--mud-palette-surface);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.vf-pet-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.vf-pet-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.vf-pet-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.vf-pet-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.vf-pet-type {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.vf-pet-breed {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    opacity: 0.8;
}

.vf-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%, rgba(16, 185, 129, 0.1) 100%);
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    color: #22c55e;
}

.vf-pet-therapy-badge .mud-icon-root {
    font-size: 0.75rem;
}

.vf-pet-actions {
    flex-shrink: 0;
}

/* Social Media Grid */
.vf-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.vf-social-card {
    background: var(--mud-palette-surface);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.vf-social-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.vf-social-card.empty {
    opacity: 0.6;
}

.vf-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.vf-social-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.vf-social-platform {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.vf-social-link {
    font-size: 0.75rem;
    color: var(--mud-palette-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vf-social-link:hover {
    text-decoration: underline;
}

.vf-social-empty {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    font-style: italic;
}

.vf-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;
}

.vf-social-visit:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--mud-palette-primary);
}

/* Dialog Styles */
.vf-dlg-selected-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
}

.vf-dlg-person-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vf-dlg-person-avatar span {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.vf-dlg-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vf-dlg-person-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.vf-dlg-person-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.vf-dlg-person-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.vf-dlg-person-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.vf-dlg-person-option-avatar.spouse {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

.vf-dlg-person-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vf-dlg-person-option-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.vf-dlg-person-option-email {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.vf-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 */
.vf-dlg-family-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.vf-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;
}

.vf-dlg-toggle-option:hover {
    color: var(--mud-palette-primary);
    background: rgba(99, 102, 241, 0.05);
}

.vf-dlg-toggle-option.selected {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.vf-dlg-toggle-option.selected:hover {
    background: linear-gradient(135deg, #5557e9 0%, #7c4def 100%);
}

/* Family Group Autocomplete Option */
.vf-dlg-family-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.vf-dlg-family-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.vf-dlg-family-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vf-dlg-family-option-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.vf-dlg-family-option-count {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.vf-dlg-marriage-section {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 1px solid rgba(236, 72, 153, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.vf-dlg-status-selector {
    margin: 1rem 0;
}

.vf-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;
}

.vf-dlg-status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vf-dlg-status-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vf-dlg-status-option:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.1);
}

.vf-dlg-status-option.selected {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(236, 72, 153, 0.3);
    color: #ec4899;
}

.vf-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%, rgba(139, 92, 246, 0.03) 100%);
}

.crm-empty-state-box.pink .crm-empty-icon {
    background: rgba(236, 72, 153, 0.1);
}

.crm-empty-state-box.pink .crm-empty-icon .mud-icon-root {
    color: #ec4899;
}

.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: rgba(239, 68, 68, 0.1);
}

.crm-empty-state-box.red .crm-empty-icon .mud-icon-root {
    color: #ef4444;
}

.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) {
    .vf-members-grid,
    .vf-hobbies-grid,
    .vf-pets-grid,
    .vf-social-grid {
        grid-template-columns: 1fr;
    }
    
    .vf-marriage-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vf-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, #6366f1 0%, #8b5cf6 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: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-co-dlg-person-email {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-co-dlg-no-results {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.crm-co-dlg-no-results .mud-icon-root {
    color: #cbd5e1;
}

/* 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, #14b8a6 0%, #0d9488 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.crm-co-dlg-industry-icon.other {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 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: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-co-dlg-industry-name.other {
    color: #6366f1;
    font-weight: 600;
}

.crm-co-dlg-industry-code {
    font-size: 0.75rem;
    color: #64748b;
}

.crm-co-dlg-industry-desc {
    font-size: 0.6875rem;
    color: #94a3b8;
    font-style: italic;
}

/* INDUSTRY DIALOG - Other Section */
.crm-co-dlg-other-section {
    margin-top: 0.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 0.75rem;
}

.crm-co-dlg-other-section .crm-co-dlg-section-header {
    color: #6366f1;
}

/* KEY CONTACTS DIALOG - Custom Department Input */
.crm-co-dlg-other-input {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    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: #6366f1;
}

.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: #6366f1;
}

.crm-settings-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 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(99, 102, 241, 0.25);
}

.crm-settings-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.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, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
}

.crm-settings-icon-box.industry {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
}

.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: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.crm-settings-badge.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* 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 rgba(99, 102, 241, 0.2);
    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, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    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: #6366f1;
}

.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 .crm-dlg-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 .crm-dlg-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 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.leads-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.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, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
}

.leads-summary-card.qualified .leads-summary-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
}

.leads-summary-card.proposal .leads-summary-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #f59e0b;
}

.leads-summary-card.negotiation .leads-summary-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%);
    color: #ec4899;
}

.leads-summary-card.total-value .leads-summary-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #22c55e;
}

.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-list-container {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.leads-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 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 rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.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: #f59e0b;
}

.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, #ec4899, #db2777); }
.lead-avatar-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.lead-avatar-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.lead-avatar-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.lead-avatar-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.lead-avatar-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }

.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, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
}

.lead-stage-badge.stage-contacted {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #3b82f6;
}

.lead-stage-badge.stage-qualified {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
}

.lead-stage-badge.stage-proposal {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #f59e0b;
}

.lead-stage-badge.stage-negotiation {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%);
    color: #ec4899;
}

.lead-stage-badge.stage-won {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #22c55e;
}

.lead-stage-badge.stage-lost {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #ef4444;
}

.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 rgba(0, 0, 0, 0.06);
}

.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: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.lead-card-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ========== 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, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    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 rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: background-color 0.15s ease;
    min-width: 1100px;
}

.leads-table-row:hover {
    background: rgba(99, 102, 241, 0.03);
}

.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: #22c55e; }
.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: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.leads-probability-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    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-card {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.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 #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-back-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

/* ========== VIEW LEAD PROFILE CARD ========== */
.lead-profile-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    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 rgba(99, 102, 241, 0.3);
}

.lead-avatar.avatar-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.lead-avatar.avatar-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.lead-avatar.avatar-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.lead-avatar.avatar-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.lead-avatar.avatar-orange { background: linear-gradient(135deg, #f97316, #ea580c); }

.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 rgba(0, 0, 0, 0.1);
}

.lead-favorite-btn:hover {
    color: #f59e0b;
    border-color: #f59e0b;
}

.lead-favorite-btn.active {
    color: #f59e0b;
    background: rgba(251, 191, 36, 0.15);
    border-color: #fbbf24;
}

.lead-profile-info {
    flex: 1;
    min-width: 200px;
}

.lead-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.lead-profile-owner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    color: #64748b;
    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, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #22c55e;
}

.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, #6366f1, #7c3aed);
    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 rgba(99, 102, 241, 0.3);
}

.lead-edit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ========== 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: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-detail-tab-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.lead-detail-tab-btn.active {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #6366f1;
    border-color: #c7d2fe;
    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 rgba(0, 0, 0, 0.04);
}

.lead-content-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    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: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-section-edit-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.lead-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    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 rgba(99, 102, 241, 0.3);
}

.lead-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ========== 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 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.lead-info-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.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, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #3b82f6;
}

.lead-info-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    color: #8b5cf6;
}

.lead-info-icon.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #22c55e;
}

.lead-info-icon.orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
    color: #f97316;
}

.lead-info-icon.pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%);
    color: #ec4899;
}

.lead-info-icon.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(13, 148, 136, 0.15) 100%);
    color: #14b8a6;
}

.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, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.lead-description-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    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: #e2e8f0;
}

.lead-pipeline-stage:last-child::after {
    display: none;
}

.lead-pipeline-stage.passed::after {
    background: linear-gradient(90deg, #22c55e, #22c55e);
}

.lead-pipeline-stage.active::after {
    background: linear-gradient(90deg, #22c55e, #e2e8f0);
}

.lead-pipeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    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: #22c55e;
    border-color: #22c55e;
    color: white;
}

.lead-pipeline-stage.active .lead-pipeline-dot {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-color: #6366f1;
    color: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.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: #6366f1;
    font-weight: 600;
}

.lead-pipeline-stage.passed .lead-pipeline-label {
    color: #22c55e;
}

/* ========== 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 rgba(0, 0, 0, 0.06);
}

.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: #6366f1;
}

.lead-probability-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.lead-probability-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    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: #22c55e;
}

.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: #6366f1;
    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 rgba(0, 0, 0, 0.06);
}

.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, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #22c55e;
}

.lead-activity-icon.activity-email {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #3b82f6;
}

.lead-activity-icon.activity-meeting {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    color: #8b5cf6;
}

.lead-activity-icon.activity-note {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #f59e0b;
}

.lead-activity-icon.activity-default {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.15) 0%, rgba(71, 85, 105, 0.15) 100%);
    color: #64748b;
}

.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: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    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 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.lead-task-item:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.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: #6366f1;
}

.lead-task-item.completed .lead-task-checkbox {
    color: #22c55e;
}

.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: #ef4444;
    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: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.lead-task-priority.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.lead-task-priority.low {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.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: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.lead-task-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ========== LEAD TASK SUMMARY ========== */
.lead-task-summary {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 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: #6366f1;
}

.lead-task-summary-item.completed .lead-task-summary-count {
    color: #22c55e;
}

.lead-task-summary-item.overdue .lead-task-summary-count {
    color: #ef4444;
}

.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, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.lead-empty-icon .mud-icon-root {
    font-size: 2.5rem;
    color: #6366f1;
}

.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, #6366f1, #7c3aed);
    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 rgba(99, 102, 241, 0.3);
}

.lead-empty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ========== 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, rgba(239, 68, 68, 0.1) 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: #ef4444;
}

.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
   ============================================ */

.cv-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 rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    margin-left: auto;
    min-width: 420px;
    max-width: 480px;
    flex-shrink: 0;
}

.cv-priority-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 20%, #eab308 40%, #22c55e 70%, #10b981 100%);
    opacity: 0.8;
}

.cv-priority-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cv-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: #64748b;
}

.cv-priority-title .mud-icon-root {
    font-size: 1rem;
    color: #6366f1;
}

.cv-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);
}

.cv-priority-badge.priority-1,
.cv-priority-badge.priority-2 {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.cv-priority-badge.priority-3,
.cv-priority-badge.priority-4 {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
    color: #ea580c;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.cv-priority-badge.priority-5,
.cv-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);
}

.cv-priority-badge.priority-7,
.cv-priority-badge.priority-8 {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #16a34a;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.cv-priority-badge.priority-9,
.cv-priority-badge.priority-10 {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.cv-priority-badge .priority-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: priorityPulse 2s ease-in-out infinite;
}

.cv-priority-badge.priority-1 .priority-indicator,
.cv-priority-badge.priority-2 .priority-indicator {
    background: #dc2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

.cv-priority-badge.priority-3 .priority-indicator,
.cv-priority-badge.priority-4 .priority-indicator {
    background: #ea580c;
    box-shadow: 0 0 8px rgba(234, 88, 12, 0.6);
}

.cv-priority-badge.priority-5 .priority-indicator,
.cv-priority-badge.priority-6 .priority-indicator {
    background: #ca8a04;
    box-shadow: 0 0 8px rgba(202, 138, 4, 0.6);
}

.cv-priority-badge.priority-7 .priority-indicator,
.cv-priority-badge.priority-8 .priority-indicator {
    background: #16a34a;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.6);
}

.cv-priority-badge.priority-9 .priority-indicator,
.cv-priority-badge.priority-10 .priority-indicator {
    background: #059669;
    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;
    }
}

.cv-priority-scale {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 12px;
}

.cv-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: #94a3b8;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cv-priority-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cv-priority-btn.active {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Priority button colors */
.cv-priority-btn[data-priority="1"] {
    border-color: rgba(239, 68, 68, 0.3);
}
.cv-priority-btn[data-priority="1"]:hover,
.cv-priority-btn[data-priority="1"].active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
}

.cv-priority-btn[data-priority="2"] {
    border-color: rgba(249, 115, 22, 0.3);
}
.cv-priority-btn[data-priority="2"]:hover,
.cv-priority-btn[data-priority="2"].active {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: #f97316;
}

.cv-priority-btn[data-priority="3"] {
    border-color: rgba(251, 146, 60, 0.3);
}
.cv-priority-btn[data-priority="3"]:hover,
.cv-priority-btn[data-priority="3"].active {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border-color: #fb923c;
}

.cv-priority-btn[data-priority="4"] {
    border-color: rgba(250, 204, 21, 0.3);
}
.cv-priority-btn[data-priority="4"]:hover,
.cv-priority-btn[data-priority="4"].active {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    border-color: #facc15;
}

.cv-priority-btn[data-priority="5"] {
    border-color: rgba(234, 179, 8, 0.3);
}
.cv-priority-btn[data-priority="5"]:hover,
.cv-priority-btn[data-priority="5"].active {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    border-color: #eab308;
}

.cv-priority-btn[data-priority="6"] {
    border-color: rgba(163, 230, 53, 0.3);
}
.cv-priority-btn[data-priority="6"]:hover,
.cv-priority-btn[data-priority="6"].active {
    background: linear-gradient(135deg, #a3e635 0%, #84cc16 100%);
    border-color: #a3e635;
}

.cv-priority-btn[data-priority="7"] {
    border-color: rgba(74, 222, 128, 0.3);
}
.cv-priority-btn[data-priority="7"]:hover,
.cv-priority-btn[data-priority="7"].active {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #4ade80;
}

.cv-priority-btn[data-priority="8"] {
    border-color: rgba(34, 197, 94, 0.3);
}
.cv-priority-btn[data-priority="8"]:hover,
.cv-priority-btn[data-priority="8"].active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
}

.cv-priority-btn[data-priority="9"] {
    border-color: rgba(52, 211, 153, 0.3);
}
.cv-priority-btn[data-priority="9"]:hover,
.cv-priority-btn[data-priority="9"].active {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    border-color: #34d399;
}

.cv-priority-btn[data-priority="10"] {
    border-color: rgba(16, 185, 129, 0.3);
}
.cv-priority-btn[data-priority="10"]:hover,
.cv-priority-btn[data-priority="10"].active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.cv-priority-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 0.25rem;
}

.cv-priority-label {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cv-priority-label.high {
    color: #ef4444;
}

.cv-priority-label.low {
    color: #10b981;
}

/* Saving indicator */
.cv-priority-saving {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6366f1;
    animation: fadeIn 0.2s ease;
}

.cv-priority-saving .mud-progress-circular {
    width: 14px !important;
    height: 14px !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tooltip styles for priority buttons */
.cv-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;
}

.cv-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;
}

.cv-priority-btn:hover::after,
.cv-priority-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Progress bar indicator */
.cv-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%, 
        rgba(16, 185, 129, 0.2) 100%
    );
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.cv-priority-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cv-priority-progress-fill.priority-1,
.cv-priority-progress-fill.priority-2 {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.cv-priority-progress-fill.priority-3,
.cv-priority-progress-fill.priority-4 {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.cv-priority-progress-fill.priority-5,
.cv-priority-progress-fill.priority-6 {
    background: linear-gradient(90deg, #eab308, #ca8a04);
}

.cv-priority-progress-fill.priority-7,
.cv-priority-progress-fill.priority-8 {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.cv-priority-progress-fill.priority-9,
.cv-priority-progress-fill.priority-10 {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Responsive styles */
@media (max-width: 768px) {
    .cv-priority-container {
        padding: 0.875rem;
        min-width: unset;
        max-width: unset;
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .cv-priority-scale {
        gap: 0.25rem;
        padding: 0.375rem;
    }
    
    .cv-priority-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .cv-priority-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cv-priority-btn::after,
    .cv-priority-btn::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .cv-priority-btn {
        width: 26px;
        height: 26px;
        font-size: 0.6875rem;
        border-radius: 6px;
    }
    
    .cv-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 rgba(0, 0, 0, 0.06);
    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 rgba(0, 0, 0, 0.04);
    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, #6366f1 0%, #8b5cf6 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.contacts-table-row:hover {
    background: rgba(99, 102, 241, 0.04);
}

.contacts-table-row:hover::before {
    transform: scaleY(1);
}

.contacts-table-row:last-child {
    border-bottom: none;
}

.contacts-table-row.selected {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 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.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 rgba(0, 0, 0, 0.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: #6366f1;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.contacts-table-email-link:hover {
    color: #4f46e5;
    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: #22c55e;
}

.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: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.contacts-table-type-badge.lead {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.contacts-table-type-badge.partner {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.contacts-table-type-badge.vendor {
    background: rgba(236, 72, 153, 0.1);
    color: #db2777;
}

.contacts-table-type-badge.vip {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #7c3aed;
}

.contacts-table-type-badge.borrower {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.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: #ea580c;
}

.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: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.contacts-table-priority-dot.priority-medium {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.contacts-table-priority-dot.priority-low {
    background: #22c55e;
    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: #dc2626;
}

.contacts-table-priority-text.medium {
    color: #d97706;
}

.contacts-table-priority-text.low {
    color: #16a34a;
}

.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: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.contacts-table-action-btn.edit:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.contacts-table-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.contacts-table-action-btn.favorite {
    color: #d1d5db;
}

.contacts-table-action-btn.favorite:hover,
.contacts-table-action-btn.favorite.active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.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, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.contacts-table-empty-icon .mud-icon-root {
    font-size: 2rem;
    color: #6366f1;
}

.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 rgba(0, 0, 0, 0.08);
}

.crm-lead-summary-card.new-lead .crm-lead-summary-icon {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

.crm-lead-summary-card.contacted .crm-lead-summary-icon {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.crm-lead-summary-card.qualified .crm-lead-summary-icon {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.crm-lead-summary-card.converted .crm-lead-summary-icon {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.crm-lead-summary-card.total-value .crm-lead-summary-icon {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 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: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.crm-lead-card.converted {
    border-color: #10b981;
    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, #10b981 0%, #059669 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%, #ec4899 100%); }
.crm-lead-avatar-blue { background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); }
.crm-lead-avatar-green { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); }
.crm-lead-avatar-purple { background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%); }
.crm-lead-avatar-orange { background: linear-gradient(135deg, #fb923c 0%, #f97316 100%); }
.crm-lead-avatar-teal { background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 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, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
}

.crm-lead-status-badge.status-contacted {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #3b82f6;
}

.crm-lead-status-badge.status-qualified {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
}

.crm-lead-status-badge.status-converted {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #f59e0b;
}

.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: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.crm-lead-priority-badge.normal {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.crm-lead-priority-badge.low {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.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: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.crm-lead-rating-badge.warm {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.crm-lead-rating-badge.cold {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.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: rgba(16, 185, 129, 0.15);
}

.crm-lead-action-btn.convert:hover .mud-icon-root {
    color: #10b981;
}

.crm-lead-action-btn.edit:hover .mud-icon-root {
    color: #6366f1;
}

.crm-lead-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

.crm-lead-action-btn.delete:hover .mud-icon-root {
    color: #ef4444;
}

/* 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: rgba(99, 102, 241, 0.08);
}

.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: #6366f1;
    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, #10b981 0%, #34d399 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-content {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    margin-bottom: 1rem;
    animation: skeleton-pulse 1.5s infinite;
}

.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-content {
    padding: 1.5rem;
}

.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, #10b981 0%, #059669 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: #10b981;
    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, #10b981 0%, #059669 100%);
    color: white;
}

.crm-lead-convert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.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-top: 2rem;
    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 rgba(16, 185, 129, 0.3);
    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: #10b981;
    font-size: 1.25rem;
}

.crm-lead-convert-message strong {
    color: #10b981;
}

.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, #6366f1 0%, #8b5cf6 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, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: white;
}

.crm-lead-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 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: rgba(59, 130, 246, 0.15); }
.crm-lead-info-icon.blue .mud-icon-root { color: #3b82f6; }
.crm-lead-info-icon.purple { background: rgba(139, 92, 246, 0.15); }
.crm-lead-info-icon.purple .mud-icon-root { color: #8b5cf6; }
.crm-lead-info-icon.green { background: rgba(16, 185, 129, 0.15); }
.crm-lead-info-icon.green .mud-icon-root { color: #10b981; }
.crm-lead-info-icon.orange { background: rgba(249, 115, 22, 0.15); }
.crm-lead-info-icon.orange .mud-icon-root { color: #f97316; }
.crm-lead-info-icon.pink { background: rgba(236, 72, 153, 0.15); }
.crm-lead-info-icon.pink .mud-icon-root { color: #ec4899; }
.crm-lead-info-icon.teal { background: rgba(20, 184, 166, 0.15); }
.crm-lead-info-icon.teal .mud-icon-root { color: #14b8a6; }

.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: #6366f1;
    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, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.crm-lead-conversion-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #059669;
    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, #10b981 0%, #34d399 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 rgba(0, 0, 0, 0.08);
    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: #a5b4fc;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.crm-lead-pipeline-stage:hover .crm-lead-pipeline-dot .mud-icon-root {
    color: #6366f1;
}

.crm-lead-pipeline-stage.passed .crm-lead-pipeline-dot {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.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, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    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 #6366f1;
}

.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, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.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, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    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 #10b981;
}

.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, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
    font-weight: 600;
    border-color: rgba(16, 185, 129, 0.3);
}

.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, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #059669;
    font-weight: 600;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

@keyframes crm-pipeline-pulse-green {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(16, 185, 129, 0.6), 0 0 0 8px rgba(16, 185, 129, 0.1);
    }
}

@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: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.crm-lead-pipeline-stage.active .crm-lead-pipeline-label {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.crm-lead-pipeline-stage.passed .crm-lead-pipeline-label {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 500;
}

.crm-lead-pipeline-stage.converted .crm-lead-pipeline-label {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #059669;
    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 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(99, 102, 241, 0.6), 0 0 0 8px rgba(99, 102, 241, 0.1);
    }
}

@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, #6b7280 0%, #9ca3af 100%);
}

.crm-lead-score-bar-fill.score-warm {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.crm-lead-score-bar-fill.score-hot {
    background: linear-gradient(90deg, #ef4444 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: #6366f1;
}

/* 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, #6b7280 0%, #9ca3af 100%);
}

.crm-lead-score-progress-fill.score-warm {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.crm-lead-score-progress-fill.score-hot {
    background: linear-gradient(90deg, #ef4444 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: #6b7280; }
.crm-lead-score-legend .warm { color: #f59e0b; }
.crm-lead-score-legend .hot { color: #ef4444; }

/* 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: rgba(59, 130, 246, 0.15);
}
.crm-lead-activity-icon.activity-call .mud-icon-root { color: #3b82f6; }

.crm-lead-activity-icon.activity-email {
    background: rgba(16, 185, 129, 0.15);
}
.crm-lead-activity-icon.activity-email .mud-icon-root { color: #10b981; }

.crm-lead-activity-icon.activity-meeting {
    background: rgba(139, 92, 246, 0.15);
}
.crm-lead-activity-icon.activity-meeting .mud-icon-root { color: #8b5cf6; }

.crm-lead-activity-icon.activity-note {
    background: rgba(245, 158, 11, 0.15);
}
.crm-lead-activity-icon.activity-note .mud-icon-root { color: #f59e0b; }

.crm-lead-activity-icon.activity-default {
    background: rgba(107, 114, 128, 0.15);
}
.crm-lead-activity-icon.activity-default .mud-icon-root { color: #6b7280; }

.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 #ef4444;
}

.crm-lead-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);
}

.crm-lead-task-item.completed .crm-lead-task-checkbox .mud-icon-root {
    color: #10b981;
}

.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: #ef4444;
}

.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: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.crm-lead-task-priority.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.crm-lead-task-priority.low {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.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-lead-task-actions {
    display: flex;
    gap: 0.25rem;
}

.crm-lead-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: rgba(239, 68, 68, 0.15);
}

.crm-lead-task-action-btn.delete:hover .mud-icon-root {
    color: #ef4444;
}

/* 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: #10b981;
}

.crm-lead-task-summary-item.overdue .crm-lead-task-summary-count {
    color: #ef4444;
}

.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, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.crm-lead-empty-icon .mud-icon-root {
    font-size: 2rem;
    color: #6366f1;
}

.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, #6366f1 0%, #8b5cf6 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 rgba(99, 102, 241, 0.3);
}

/* 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, rgba(239, 68, 68, 0.1) 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: #ef4444;
}

.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 rgba(0, 0, 0, 0.08);
}

.crm-opp-summary-card.qualification .crm-opp-summary-icon {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

.crm-opp-summary-card.proposal .crm-opp-summary-icon {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.crm-opp-summary-card.negotiation .crm-opp-summary-icon {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.crm-opp-summary-card.won .crm-opp-summary-icon {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.crm-opp-summary-card.total-pipeline .crm-opp-summary-icon {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 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: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.crm-opp-card.stage-qualification { border-left: 4px solid #6366f1; }
.crm-opp-card.stage-proposal { border-left: 4px solid #3b82f6; }
.crm-opp-card.stage-negotiation { border-left: 4px solid #f59e0b; }
.crm-opp-card.stage-won { border-left: 4px solid #10b981; 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 #ef4444; 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, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
}

.crm-opp-stage-badge.stage-proposal {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #3b82f6;
}

.crm-opp-stage-badge.stage-negotiation {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #f59e0b;
}

.crm-opp-stage-badge.stage-won {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
}

.crm-opp-stage-badge.stage-lost {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #ef4444;
}

.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, #6366f1 0%, #8b5cf6 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: #6366f1;
    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: #ef4444;
}

.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: rgba(16, 185, 129, 0.15);
}

.crm-opp-action-btn.win:hover .mud-icon-root {
    color: #10b981;
}

.crm-opp-action-btn.lose:hover {
    background: rgba(239, 68, 68, 0.15);
}

.crm-opp-action-btn.lose:hover .mud-icon-root {
    color: #ef4444;
}

.crm-opp-action-btn.edit:hover .mud-icon-root {
    color: #6366f1;
}

.crm-opp-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

.crm-opp-action-btn.delete:hover .mud-icon-root {
    color: #ef4444;
}

/* 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: rgba(99, 102, 241, 0.08);
}

.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%, #ec4899 100%); }
.crm-opp-avatar-blue { background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); }
.crm-opp-avatar-green { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); }
.crm-opp-avatar-purple { background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%); }
.crm-opp-avatar-orange { background: linear-gradient(135deg, #fb923c 0%, #f97316 100%); }
.crm-opp-avatar-teal { background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%); }

.crm-opp-value {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.overdue {
    color: #ef4444 !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 #6366f1; }
.crm-opp-kanban-column.stage-proposal { border-top: 3px solid #3b82f6; }
.crm-opp-kanban-column.stage-negotiation { border-top: 3px solid #f59e0b; }
.crm-opp-kanban-column.stage-won { border-top: 3px solid #10b981; }
.crm-opp-kanban-column.stage-lost { border-top: 3px solid #ef4444; }

.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 rgba(0, 0, 0, 0.1);
    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: #ef4444;
}

.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 #6366f1; }
.crm-opp-profile-card.stage-proposal { border-left: 4px solid #3b82f6; }
.crm-opp-profile-card.stage-negotiation { border-left: 4px solid #f59e0b; }
.crm-opp-profile-card.stage-won { border-left: 4px solid #10b981; 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 #ef4444; }

.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: #6366f1;
}

.crm-opp-stat-item.overdue .crm-opp-stat-value {
    color: #ef4444;
}

.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: #6366f1; }
.crm-opp-probability-fill.stage-proposal { stroke: #3b82f6; }
.crm-opp-probability-fill.stage-negotiation { stroke: #f59e0b; }
.crm-opp-probability-fill.stage-won { stroke: #10b981; }
.crm-opp-probability-fill.stage-lost { stroke: #ef4444; }

.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, #10b981 0%, #059669 100%);
    color: white;
}

.crm-opp-win-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.crm-opp-lose-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 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, #6366f1 0%, #8b5cf6 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, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: white;
}

.crm-opp-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 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: rgba(59, 130, 246, 0.15); }
.crm-opp-info-icon.blue .mud-icon-root { color: #3b82f6; }
.crm-opp-info-icon.purple { background: rgba(139, 92, 246, 0.15); }
.crm-opp-info-icon.purple .mud-icon-root { color: #8b5cf6; }
.crm-opp-info-icon.green { background: rgba(16, 185, 129, 0.15); }
.crm-opp-info-icon.green .mud-icon-root { color: #10b981; }
.crm-opp-info-icon.orange { background: rgba(249, 115, 22, 0.15); }
.crm-opp-info-icon.orange .mud-icon-root { color: #f97316; }
.crm-opp-info-icon.pink { background: rgba(236, 72, 153, 0.15); }
.crm-opp-info-icon.pink .mud-icon-root { color: #ec4899; }
.crm-opp-info-icon.teal { background: rgba(20, 184, 166, 0.15); }
.crm-opp-info-icon.teal .mud-icon-root { color: #14b8a6; }

.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: #6366f1;
    font-size: 1.125rem;
}

.crm-opp-link {
    color: #6366f1;
    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, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.crm-opp-result-section.lost {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 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: #059669;
}

.crm-opp-result-section.lost .crm-opp-result-title {
    color: #dc2626;
}

.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, 
        #6366f1 0%, 
        #8b5cf6 50%,
        #a78bfa 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 rgba(99, 102, 241, 0.4);
}

/* Won state - green progress line */
.crm-opp-pipeline-container.stage-won::after {
    background: linear-gradient(90deg, 
        #10b981 0%, 
        #34d399 50%,
        #6ee7b7 100%);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* Lost state - hide progress line or show red */
.crm-opp-pipeline-container.stage-lost::after {
    background: linear-gradient(90deg, 
        #ef4444 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 rgba(0, 0, 0, 0.08);
    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: #a5b4fc;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
    transform: scale(1.05);
}

.crm-opp-pipeline-stage:hover .crm-opp-pipeline-dot .mud-icon-root {
    color: #6366f1;
}

/* 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: #60a5fa;
}
.crm-opp-pipeline-stage[data-stage="negotiation"]:hover .crm-opp-pipeline-dot {
    border-color: #fbbf24;
}

/* Passed stages */
.crm-opp-pipeline-stage.passed .crm-opp-pipeline-dot,
.crm-opp-pipeline-stage.won .crm-opp-pipeline-dot {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    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, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    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 #6366f1;
}

.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, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    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: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

.crm-opp-pipeline-stage.active .crm-opp-pipeline-label {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
    font-weight: 600;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.crm-opp-pipeline-stage.passed .crm-opp-pipeline-label,
.crm-opp-pipeline-stage.won .crm-opp-pipeline-label {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 500;
    border-color: rgba(16, 185, 129, 0.2);
}

.crm-opp-pipeline-stage.lost .crm-opp-pipeline-label {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    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: #8b5cf6;
    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 rgba(99, 102, 241, 0.1);
    }
}

@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, #6366f1 0%, #8b5cf6 100%); }
.crm-opp-probability-bar-fill.stage-proposal { background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%); }
.crm-opp-probability-bar-fill.stage-negotiation { background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); }
.crm-opp-probability-bar-fill.stage-won { background: linear-gradient(90deg, #10b981 0%, #34d399 100%); }
.crm-opp-probability-bar-fill.stage-lost { background: linear-gradient(90deg, #ef4444 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: #6366f1;
}

.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: rgba(59, 130, 246, 0.15); }
.crm-opp-activity-icon.activity-call .mud-icon-root { color: #3b82f6; }
.crm-opp-activity-icon.activity-email { background: rgba(16, 185, 129, 0.15); }
.crm-opp-activity-icon.activity-email .mud-icon-root { color: #10b981; }
.crm-opp-activity-icon.activity-meeting { background: rgba(139, 92, 246, 0.15); }
.crm-opp-activity-icon.activity-meeting .mud-icon-root { color: #8b5cf6; }
.crm-opp-activity-icon.activity-note { background: rgba(245, 158, 11, 0.15); }
.crm-opp-activity-icon.activity-note .mud-icon-root { color: #f59e0b; }
.crm-opp-activity-icon.activity-default { background: rgba(107, 114, 128, 0.15); }
.crm-opp-activity-icon.activity-default .mud-icon-root { color: #6b7280; }

.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 #ef4444;
}

.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: #10b981;
}

.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: #ef4444;
}

.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: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.crm-opp-task-priority.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.crm-opp-task-priority.low {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.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: rgba(239, 68, 68, 0.15);
}

.crm-opp-task-action-btn.delete:hover .mud-icon-root {
    color: #ef4444;
}

/* 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: #10b981;
}

.crm-opp-task-summary-item.overdue .crm-opp-task-summary-count {
    color: #ef4444;
}

.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, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.crm-opp-empty-icon .mud-icon-root {
    font-size: 2rem;
    color: #6366f1;
}

.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, #6366f1 0%, #8b5cf6 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 rgba(99, 102, 241, 0.3);
}

/* 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, rgba(239, 68, 68, 0.1) 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: #ef4444;
}

.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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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, #6366f1 0%, #8b5cf6 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, #6366f1 0%, #8b5cf6 100%);
}

.crm-deals-loading-text {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
    text-align: center;
}

.crm-deals-loading-text span {
    color: #6366f1;
    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: #6366f1;
    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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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%, 
        rgba(255, 255, 255, 0.2) 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;
}

.ht-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--mud-palette-text-secondary);
}

.ht-grouped-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ht-person-group {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.ht-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);
}

.ht-person-avatar {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: white !important;
    font-weight: 600;
}

.ht-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ht-person-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.ht-person-count {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.ht-add-person-hobby {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 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);
}

.ht-add-person-hobby:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.ht-hobbies-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ht-hobbies-list .fm-hobby-card {
    background: var(--mud-palette-surface);
}

/* Members without hobbies section */
.ht-no-hobbies-section {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px dashed var(--mud-palette-lines-default);
}

.ht-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;
}

.ht-no-hobbies-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ht-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;
}

.ht-no-hobby-member:hover {
    background: var(--mud-palette-primary-hover);
    color: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
}

.ht-no-hobby-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%) !important;
    color: white !important;
}

.ht-add-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--mud-palette-primary);
}

.ht-no-hobby-member:hover .ht-add-icon {
    opacity: 1;
}

/* =============================================
   PETS TAB - PT STYLES (GROUPED VIEW)
   ============================================= */

.pets-tab {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--mud-palette-text-secondary);
}

.pt-grouped-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pt-person-group {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.pt-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);
}

.pt-person-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    font-weight: 600;
}

.pt-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pt-person-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.pt-person-count {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.pt-add-person-pet {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 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(16, 185, 129, 0.3);
}

.pt-add-person-pet:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.pt-pets-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pt-pets-list .fm-pet-card {
    background: var(--mud-palette-surface);
}

/* Members without pets section */
.pt-no-pets-section {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px dashed var(--mud-palette-lines-default);
}

.pt-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;
}

.pt-no-pets-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pt-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;
}

.pt-no-pet-member:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: #10b981;
}

.pt-no-pet-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%) !important;
    color: white !important;
}

.pt-add-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #10b981;
}

.pt-no-pet-member:hover .pt-add-icon {
    opacity: 1;
}

/* =============================================
   DIALOG FAMILY MEMBER SELECT STYLES
   ============================================= */

.hed-member-avatar,
.ped-member-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: white !important;
    margin-right: 0.5rem;
}

.hed-select-item,
.ped-select-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hed-select-item .mud-avatar-small,
.ped-select-item .mud-avatar-small {
    flex-shrink: 0;
}