/* ============================================================
   avalme-legacy.css
   Consolidated legacy CSS bundle.
   Order: app.css -> contactManager.css -> booking.css ->
          communicationCenter.css -> loanLock.css -> documents.css
   ============================================================ */

/* ============================================================
   BEGIN: app.css
   ============================================================ */
:root {
    --mud-appbar-height: 50px !important;
}

@font-face {
    /*font-family: 'Lemon/Milk';
    src: url('https://www.fontsaddict.com/fontface/lemonmilk.ttf');*/
}

/* Responsive */

.mud-dialog-width-full {
    width: 100%;
}

.mud-dialog .mud-dialog-content {
    padding: 0;
}

ul.validation-errors li.validation-message,
p.mud-typography.mud-typography-body1.mud-error-text,
.mud-error-text {
    color: var(--mud-palette-error);
    font-size: small;
}

/* Responsive */

.validation-message {
    color: #f44336;
    margin: 0;
    font-size: .8rem;
    margin-top: 3px;
    text-align: start;
    font-weight: 400;
    line-height: 1.66;
    letter-spacing: .03333em;
}

.mud-snackbar-location-bottom-left {
    bottom: 50px !important;
}

.mud-snackbar-location-bottom-right {
    bottom: 50px !important;
}

.mud-snackbar.mud-alert-filled-info {
    max-width: 992px;
    width: 100%;
}

/*AVALME STYLES*/
span.ql-picker-label,
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
    color: var(--mud-palette-text-primary);
}

.ql-snow .ql-stroke {
    stroke: var(--mud-palette-text-primary);
}

.ql-editor.ql-blank::before {
    color: var(--mud-palette-text-primary);
}

.avalme-featured-app-card:hover .avalme-featured-app-logo img {
    -webkit-animation: Shake 1s ease-in-out;
    -moz-animation: Shake 1s ease-in-out;
    animation: Shake 1s ease-in-out;
}

.mud-switch {
    max-width: fit-content;
}

.mud-checkbox {
    max-width: fit-content;
}

.mud-main-content {
    padding-bottom: 72px !important;
}

@keyframes Shake {
    from {
        transform: rotate('0deg');
    }

    30% {
        transform: rotate('30deg');
    }

    50% {
        transform: rotate('-30deg');
    }

    to {
        transform: rotate('0deg');
    }
}

@-webkit-keyframes Shake {
    from {
        transform: rotate('0deg');
    }

    30% {
        transform: rotate('30deg');
    }

    50% {
        transform: rotate('-30deg');
    }

    to {
        transform: rotate('0deg');
    }
}

.mud-input-control > .mud-input-control-input-container > div.mud-input.mud-input-text {
    margin: 0;
}

@media screen and (max-width: 690px) {
    .mud-appbar .mud-toolbar-appbar {
        padding: 0;
    }

    .mud-menu.language-switcher {
        min-width: 133px;
    }
}

@media screen and (max-width: 600px) {
    .mud-typography.mud-typography-h6.avalme-tittle {
        font-size: 24px;
    }

    .default-menu-options {
        display: none;
    }

    .responsive-menu-options {
        display: block;
    }

    .mud-dialog-width-full {
        width: 100%;
    }
}

@media screen and (max-width: 490px) {
}

@media print and (orientation: portrait) {
    /* Reglas para imprimir en formato vertical */
    body * {
        visibility: hidden;
    }

    .print-container, .print-container * {
        visibility: visible;
    }

    .print-container {
        position: absolute;
        top: 0;
        left: 0;
        background-color: black;
    }
}

/* Image Viewer Dialog Styles */
.image-viewer-backdrop {
    background-color: rgba(0, 0, 0, 0.95) !important;
}

.image-viewer-backdrop .mud-overlay-content {
    width: 100%;
    height: 100%;
}

.mud-dialog.image-viewer-dialog,
.mud-dialog-container .image-viewer-dialog {
    background: transparent !important;
    box-shadow: none !important;
}

.image-viewer-dialog .mud-dialog-title {
    background: rgba(0, 0, 0, 0.7) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-viewer-dialog .mud-dialog-content {
    background: transparent !important;
    padding: 0 !important;
}

/* Section Notes Drawer - Global styles to override MudDrawer internals */
.section-notes-drawer-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    padding: 0 !important;
}
/* ============================================================
   END: app.css
   ============================================================ */

/* ============================================================
   BEGIN: contactManager.css
   ============================================================ */
/* =============================================
   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;
    --mud-palette-background-grey: #f4f6f8;
}

/* =============================================
   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;
    }

/* Avatar upload action - compact BpFileUpload matching cv-upload-btn */
.cv-upload-action {
    width: 100%;
    display: flex;
    justify-content: center;
}

    .cv-upload-action .mud-grid {
        margin: 0;
        width: auto;
    }

    .cv-upload-action .mud-grid-item {
        padding: 0;
    }

    .cv-upload-action .mud-progress-linear {
        display: none !important;
        margin: 0;
    }

    .cv-upload-action .mud-stack {
        gap: 0.25rem;
        justify-content: center;
    }

    .cv-upload-action .mud-button-outlined {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        font-weight: 500;
        min-width: auto;
        min-height: auto;
        height: auto;
        border-radius: 6px;
        text-transform: none;
        letter-spacing: 0;
        background: #f1f5f9;
        border-color: #e2e8f0;
        color: #64748b;
        line-height: 1.2;
        box-shadow: none;
    }

        .cv-upload-action .mud-button-outlined:hover {
            background: #e2e8f0;
            color: #334155;
            border-color: #cbd5e1;
        }

        .cv-upload-action .mud-button-outlined .mud-icon-root {
            font-size: 0.875rem;
        }

    .cv-upload-action .mud-list,
    .cv-upload-action .mud-list-item {
        display: none;
    }

.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.household {
        background: linear-gradient(135deg, #e0f2fe, #bae6fd);
        color: #1f2937;
    }

    .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.property {
        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;
    }

/* =============================================
   SOCIAL NETWORKS PREMIUM CARDS
   ============================================= */

.crm-social-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

    .crm-social-section:hover {
        border-color: #e2e8f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

.crm-social-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.crm-social-section-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crm-social-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
}

.crm-social-section-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.01em;
}

.crm-social-section-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.crm-social-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    color: #6366f1;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-social-add-btn:hover {
        background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        color: white;
        border-color: #6366f1;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        transform: translateY(-1px);
    }

/* Social Cards Grid */
.crm-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.875rem;
}

/* Individual Social Card */
.crm-social-card {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .crm-social-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        border-color: transparent;
    }

/* Top accent bar per platform */
.crm-social-card-accent {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    transition: height 0.2s ease;
}

.crm-social-card:hover .crm-social-card-accent {
    height: 4px;
}

.crm-social-card.facebook .crm-social-card-accent {
    background: linear-gradient(90deg, #1877f2 0%, #42a5f5 100%);
}

.crm-social-card.twitter .crm-social-card-accent,
.crm-social-card.x .crm-social-card-accent {
    background: linear-gradient(90deg, #1da1f2 0%, #4fc3f7 100%);
}

.crm-social-card.instagram .crm-social-card-accent {
    background: linear-gradient(90deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.crm-social-card.linkedin .crm-social-card-accent {
    background: linear-gradient(90deg, #0077b5 0%, #00a0dc 100%);
}

.crm-social-card.youtube .crm-social-card-accent {
    background: linear-gradient(90deg, #ff0000 0%, #ff4444 100%);
}

.crm-social-card.tiktok .crm-social-card-accent {
    background: linear-gradient(90deg, #000000 0%, #25f4ee 50%, #fe2c55 100%);
}

.crm-social-card.pinterest .crm-social-card-accent {
    background: linear-gradient(90deg, #e60023 0%, #ff4757 100%);
}

.crm-social-card.snapchat .crm-social-card-accent {
    background: linear-gradient(90deg, #fffc00 0%, #ffeb3b 100%);
}

.crm-social-card-body {
    padding: 1rem 1.125rem;
}

.crm-social-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.875rem;
}

/* Platform icon circle */
.crm-social-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crm-social-card:hover .crm-social-card-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* Reuse brand colors from existing messaging icons */
.crm-social-card-icon.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.crm-social-card-icon.twitter,
.crm-social-card-icon.x {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8ddb 100%);
}

.crm-social-card-icon.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.crm-social-card-icon.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.crm-social-card-icon.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.crm-social-card-icon.tiktok {
    background: linear-gradient(135deg, #000000 0%, #25f4ee 50%, #fe2c55 100%);
}

.crm-social-card-icon.pinterest {
    background: linear-gradient(135deg, #e60023 0%, #ad081b 100%);
}

.crm-social-card-icon.snapchat {
    background: linear-gradient(135deg, #fffc00 0%, #ffeb3b 100%);
    color: #000;
}

.crm-social-card-icon.other {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* Messaging App icon backgrounds */
.crm-social-card-icon.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.crm-social-card-icon.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.crm-social-card-icon.signal {
    background: linear-gradient(135deg, #3a76f0 0%, #2c5fc5 100%);
}

.crm-social-card-icon.messenger {
    background: linear-gradient(135deg, #00b2ff 0%, #006aff 50%, #9b36ff 100%);
}

.crm-social-card-icon.imessage {
    background: linear-gradient(135deg, #34c759 0%, #30b350 100%);
}

.crm-social-card-icon.slack {
    background: linear-gradient(135deg, #4a154b 0%, #611f69 100%);
}

.crm-social-card-icon.discord {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
}

.crm-social-card-icon.skype {
    background: linear-gradient(135deg, #00aff0 0%, #0078d7 100%);
}

.crm-social-card-icon.teams {
    background: linear-gradient(135deg, #5059c9 0%, #4b32c3 100%);
}

.crm-social-card-icon.zoom {
    background: linear-gradient(135deg, #2d8cff 0%, #0b5cff 100%);
}

/* Action buttons (appear on hover) */
.crm-social-card-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transform: translateX(8px);
    transition: all 0.25s ease;
}

.crm-social-card:hover .crm-social-card-actions {
    opacity: 1;
    transform: translateX(0);
}

.crm-social-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: #f8fafc;
    color: #64748b;
}

    .crm-social-action-btn:hover {
        transform: scale(1.1);
    }

    .crm-social-action-btn.visit:hover {
        background: #eef2ff;
        color: #6366f1;
    }

    .crm-social-action-btn.edit:hover {
        background: #fef3c7;
        color: #d97706;
    }

    .crm-social-action-btn.delete:hover {
        background: #fee2e2;
        color: #ef4444;
    }

.crm-social-action-btn .mud-icon-root {
    font-size: 1rem;
}

/* Card info section */
.crm-social-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.crm-social-card-platform {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.crm-social-verified-badge {
    color: #3b82f6 !important;
    font-size: 1rem !important;
    filter: drop-shadow(0 1px 2px rgba(59, 130, 246, 0.3));
}

.crm-social-card-handle-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.crm-social-card-handle {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.crm-social-copy-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0;
}

.crm-social-card:hover .crm-social-copy-btn {
    opacity: 1;
}

    .crm-social-copy-btn:hover {
        background: #eef2ff;
        color: #6366f1;
        transform: scale(1.1);
    }

    .crm-social-copy-btn .mud-icon-root {
        font-size: 0.875rem;
    }

/* Hover tinted backgrounds per platform */
.crm-social-card.facebook:hover {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.02) 0%, #ffffff 100%);
    border-color: rgba(24, 119, 242, 0.15);
}

.crm-social-card.twitter:hover,
.crm-social-card.x:hover {
    background: linear-gradient(135deg, rgba(29, 161, 242, 0.02) 0%, #ffffff 100%);
    border-color: rgba(29, 161, 242, 0.15);
}

.crm-social-card.instagram:hover {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.02) 0%, #ffffff 100%);
    border-color: rgba(225, 48, 108, 0.15);
}

.crm-social-card.linkedin:hover {
    background: linear-gradient(135deg, rgba(0, 119, 181, 0.02) 0%, #ffffff 100%);
    border-color: rgba(0, 119, 181, 0.15);
}

.crm-social-card.youtube:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.02) 0%, #ffffff 100%);
    border-color: rgba(255, 0, 0, 0.12);
}

.crm-social-card.tiktok:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.01) 0%, rgba(37, 244, 238, 0.02) 50%, #ffffff 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

.crm-social-card.pinterest:hover {
    background: linear-gradient(135deg, rgba(230, 0, 35, 0.02) 0%, #ffffff 100%);
    border-color: rgba(230, 0, 35, 0.12);
}

.crm-social-card.snapchat:hover {
    background: linear-gradient(135deg, rgba(255, 252, 0, 0.03) 0%, #ffffff 100%);
    border-color: rgba(255, 252, 0, 0.25);
}

/* Messaging App accent bars */
.crm-social-card.whatsapp .crm-social-card-accent {
    background: linear-gradient(90deg, #25d366 0%, #5af78e 100%);
}

.crm-social-card.telegram .crm-social-card-accent {
    background: linear-gradient(90deg, #0088cc 0%, #33bfff 100%);
}

.crm-social-card.signal .crm-social-card-accent {
    background: linear-gradient(90deg, #3a76f0 0%, #6ea8fe 100%);
}

.crm-social-card.messenger .crm-social-card-accent {
    background: linear-gradient(90deg, #00b2ff 0%, #006aff 50%, #9b36ff 100%);
}

.crm-social-card.imessage .crm-social-card-accent {
    background: linear-gradient(90deg, #34c759 0%, #6ee79a 100%);
}

.crm-social-card.slack .crm-social-card-accent {
    background: linear-gradient(90deg, #4a154b 0%, #7c3085 100%);
}

.crm-social-card.discord .crm-social-card-accent {
    background: linear-gradient(90deg, #5865f2 0%, #8891f7 100%);
}

.crm-social-card.skype .crm-social-card-accent {
    background: linear-gradient(90deg, #00aff0 0%, #44ccff 100%);
}

.crm-social-card.teams .crm-social-card-accent {
    background: linear-gradient(90deg, #5059c9 0%, #7b83e0 100%);
}

.crm-social-card.zoom .crm-social-card-accent {
    background: linear-gradient(90deg, #2d8cff 0%, #66b2ff 100%);
}

/* Messaging App hover states */
.crm-social-card.whatsapp:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.02) 0%, #ffffff 100%);
    border-color: rgba(37, 211, 102, 0.15);
}

.crm-social-card.telegram:hover {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.02) 0%, #ffffff 100%);
    border-color: rgba(0, 136, 204, 0.15);
}

.crm-social-card.signal:hover {
    background: linear-gradient(135deg, rgba(58, 118, 240, 0.02) 0%, #ffffff 100%);
    border-color: rgba(58, 118, 240, 0.15);
}

.crm-social-card.messenger:hover {
    background: linear-gradient(135deg, rgba(0, 178, 255, 0.02) 0%, #ffffff 100%);
    border-color: rgba(0, 178, 255, 0.15);
}

.crm-social-card.imessage:hover {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.02) 0%, #ffffff 100%);
    border-color: rgba(52, 199, 89, 0.15);
}

.crm-social-card.slack:hover {
    background: linear-gradient(135deg, rgba(74, 21, 75, 0.02) 0%, #ffffff 100%);
    border-color: rgba(74, 21, 75, 0.12);
}

.crm-social-card.discord:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.02) 0%, #ffffff 100%);
    border-color: rgba(88, 101, 242, 0.15);
}

.crm-social-card.skype:hover {
    background: linear-gradient(135deg, rgba(0, 175, 240, 0.02) 0%, #ffffff 100%);
    border-color: rgba(0, 175, 240, 0.15);
}

.crm-social-card.teams:hover {
    background: linear-gradient(135deg, rgba(80, 89, 201, 0.02) 0%, #ffffff 100%);
    border-color: rgba(80, 89, 201, 0.15);
}

.crm-social-card.zoom:hover {
    background: linear-gradient(135deg, rgba(45, 140, 255, 0.02) 0%, #ffffff 100%);
    border-color: rgba(45, 140, 255, 0.15);
}

/* Responsive */
@media (max-width: 600px) {
    .crm-social-grid {
        grid-template-columns: 1fr;
    }

    .crm-social-card-actions {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================
   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;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}

.crm-dlg-premium-footer--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.crm-dlg-premium-footer--stacked .crm-dlg-footer-hint {
    justify-content: center;
}

.crm-dlg-premium-footer--stacked .crm-dlg-footer-btns {
    justify-content: center;
}

.crm-dlg-premium-footer .mud-card-actions {
    width: 100%;
    justify-content: flex-end;
}

.crm-dlg-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

.crm-dlg-footer-hint > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.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;
    flex-shrink: 0;
}

.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: center;
}

    .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 {
        max-height: 90vh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .crm-dlg-wide .mud-dialog-title {
        flex-shrink: 0;
    }

    .crm-dlg-wide .mud-dialog-content {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        max-height: none !important;
    }

    .crm-dlg-wide .mud-dialog-actions {
        flex-shrink: 0;
    }

/* 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-footer-hint {
        font-size: 0.6875rem;
    }

        .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: '\1F4C5';
        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;
}

/* =============================================
   CRM DASHBOARD - PROFESSIONAL LAYOUT
   ============================================= */

/* Dashboard container */
.crm-dash {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards fill their container height */
.crm-dash-card-full {
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .crm-dash-card-full .clp-chart-body,
    .crm-dash-card-full .crm-dash-alerts-list,
    .crm-dash-card-full .crm-dash-team-table,
    .crm-dash-card-full .crm-dash-sources-table {
        flex: 1;
    }

/* ===== ROW LAYOUT (60/40 split) ===== */
.crm-dash-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
}

.crm-dash-col-main,
.crm-dash-col-side {
    min-width: 0;
}

/* ===== FILTER BAR ===== */
.crm-dash-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.crm-dash-scope-toggle {
    display: flex;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.crm-dash-scope-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .crm-dash-scope-btn:hover {
        background: var(--mud-palette-action-default-hover);
        color: var(--mud-palette-text-primary);
    }

    .crm-dash-scope-btn.active {
        background: var(--clp-primary);
        color: white;
        box-shadow: 0 2px 8px rgba(91, 110, 245, 0.3);
    }

        .crm-dash-scope-btn.active .mud-icon-root {
            color: white;
        }

    .crm-dash-scope-btn .mud-icon-root {
        font-size: 1rem;
    }

.crm-dash-date-filter {
    min-width: 180px;
}

/* ===== KPI 6-COLUMN GRID ===== */
.crm-dash-6col {
    grid-template-columns: repeat(3, 1fr);
}

/* Stat icon variants */
.clp-stat-icon.green {
    background: var(--clp-gradient-green);
}

.clp-stat-icon.teal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.clp-stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* New vs Lost */
.crm-dash-new-lost {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.crm-dash-new-value {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    line-height: 1.2;
}

.crm-dash-lost-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ef4444;
}

/* Header meta text */
.crm-dash-header-meta {
    display: block;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 400;
    margin-top: 2px;
}

/* ===== PIPELINE ===== */
.crm-dash-pipeline-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.crm-dash-pipeline-stage-card {
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
    padding: 0.875rem 0.75rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: default;
}

    .crm-dash-pipeline-stage-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

.crm-dash-pipeline-stage-bar {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    margin-bottom: 0.625rem;
}

.crm-dash-pipeline-stage-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.crm-dash-pipeline-stage-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.crm-dash-pipeline-stage-value {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-primary);
    font-weight: 500;
    margin-top: 0.375rem;
}

.crm-dash-pipeline-stage-prob {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
    margin-top: 2px;
}

.crm-dash-funnel-section {
    margin-top: 1.25rem;
}

/* ===== NEXT STEPS / TASKS ===== */
.crm-dash-task-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.crm-dash-task-status-card {
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

    .crm-dash-task-status-card:hover {
        transform: translateY(-2px);
    }

    .crm-dash-task-status-card.success {
        background: rgba(16, 185, 129, 0.08);
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

        .crm-dash-task-status-card.success .crm-dash-task-status-value {
            color: #059669;
        }

    .crm-dash-task-status-card.warning {
        background: rgba(245, 158, 11, 0.08);
        border: 1px solid rgba(245, 158, 11, 0.2);
    }

        .crm-dash-task-status-card.warning .crm-dash-task-status-value {
            color: #d97706;
        }

    .crm-dash-task-status-card.danger {
        background: rgba(239, 68, 68, 0.08);
        border: 1px solid rgba(239, 68, 68, 0.2);
    }

        .crm-dash-task-status-card.danger .crm-dash-task-status-value {
            color: #dc2626;
        }

    .crm-dash-task-status-card.no-step {
        background: rgba(99, 102, 241, 0.08);
        border: 1px solid rgba(99, 102, 241, 0.2);
    }

        .crm-dash-task-status-card.no-step .crm-dash-task-status-value {
            color: #4f46e5;
        }

.crm-dash-task-status-value {
    font-size: 1.375rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}

.crm-dash-task-status-label {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-top: 2px;
}

/* No next step warning banner */
.crm-dash-no-nextstep-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.625rem 0.875rem;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 1rem;
}

    .crm-dash-no-nextstep-banner .mud-icon-root {
        color: #f59e0b;
        font-size: 1.125rem;
        flex-shrink: 0;
    }

    .crm-dash-no-nextstep-banner strong {
        color: #d97706;
    }

/* Task Type List */
.crm-dash-task-type-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.crm-dash-task-type-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.crm-dash-task-type-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-dash-task-type-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.crm-dash-task-type-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.crm-dash-task-type-bar-container {
    width: 100%;
    height: 5px;
    background: var(--mud-palette-background-grey);
    border-radius: 3px;
    overflow: hidden;
}

.crm-dash-task-type-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.crm-dash-task-type-count {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    min-width: 24px;
    text-align: right;
}

/* ===== FORECAST ===== */
.crm-dash-forecast-progress {
    margin-bottom: 0.25rem;
}

.crm-dash-forecast-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.crm-dash-forecast-pct {
    font-weight: 700;
    color: var(--clp-primary);
}

.crm-dash-forecast-bar {
    width: 100%;
    height: 10px;
    background: var(--mud-palette-background-grey);
    border-radius: 5px;
    overflow: hidden;
}

.crm-dash-forecast-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--clp-primary), #764ba2);
    border-radius: 5px;
    transition: width 0.8s ease;
}

.crm-dash-forecast-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* ===== ALERTS ===== */
.crm-dash-alert-total-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.crm-dash-alerts-list {
    padding: 0;
}

.crm-dash-alert-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    transition: background 0.15s ease;
}

    .crm-dash-alert-item:last-child {
        border-bottom: none;
    }

    .crm-dash-alert-item:hover {
        background: var(--mud-palette-background-grey);
    }

.crm-dash-alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-dash-alert-item.critical .crm-dash-alert-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.crm-dash-alert-item.warning .crm-dash-alert-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.crm-dash-alert-item.info .crm-dash-alert-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.crm-dash-alert-content {
    flex: 1;
    min-width: 0;
}

.crm-dash-alert-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-dash-alert-desc {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-dash-alert-badge {
    min-width: 26px;
    height: 26px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    padding: 0 6px;
}

.crm-dash-alert-item.critical .crm-dash-alert-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.crm-dash-alert-item.warning .crm-dash-alert-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.crm-dash-alert-item.info .crm-dash-alert-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* ===== TEAM PERFORMANCE TABLE ===== */
.crm-dash-team-table {
    overflow-x: auto;
}

.crm-dash-team-table-header {
    display: grid;
    grid-template-columns: 40px 1.5fr repeat(4, 0.7fr) 1fr;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--mud-palette-background-grey);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mud-palette-text-secondary);
}

.crm-dash-team-table-row {
    display: grid;
    grid-template-columns: 40px 1.5fr repeat(4, 0.7fr) 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    transition: background 0.15s ease;
}

    .crm-dash-team-table-row:last-child {
        border-bottom: none;
    }

    .crm-dash-team-table-row:hover {
        background: var(--mud-palette-background-grey);
    }

.crm-dash-team-col-rank {
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-dash-team-col-name {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.crm-dash-team-col-stat {
    text-align: center;
}

.crm-dash-team-col-bar {
    padding-left: 0.5rem;
}

.crm-dash-team-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-secondary);
    flex-shrink: 0;
}

    .crm-dash-team-rank.top-1 {
        background: linear-gradient(135deg, #fbbf24, #f59e0b);
        color: white;
    }

    .crm-dash-team-rank.top-2 {
        background: linear-gradient(135deg, #94a3b8, #64748b);
        color: white;
    }

    .crm-dash-team-rank.top-3 {
        background: linear-gradient(135deg, #d97706, #b45309);
        color: white;
    }

.crm-dash-team-avatar {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.crm-dash-team-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-dash-team-role {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    display: block;
}

.crm-dash-team-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-dash-team-perf-bar-container {
    width: 100%;
    height: 6px;
    background: var(--mud-palette-background-grey);
    border-radius: 3px;
    overflow: hidden;
}

.crm-dash-team-perf-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ===== LEAD SOURCES TABLE ===== */
.crm-dash-sources-table {
    overflow-x: auto;
}

.crm-dash-sources-table-header {
    display: grid;
    grid-template-columns: 1.5fr 0.6fr 0.6fr 0.7fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--mud-palette-background-grey);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mud-palette-text-secondary);
}

.crm-dash-sources-table-row {
    display: grid;
    grid-template-columns: 1.5fr 0.6fr 0.6fr 0.7fr 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    transition: background 0.15s ease;
}

    .crm-dash-sources-table-row:last-child {
        border-bottom: none;
    }

    .crm-dash-sources-table-row:hover {
        background: var(--mud-palette-background-grey);
    }

.crm-dash-sources-col-name {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    min-width: 0;
}

.crm-dash-source-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.crm-dash-sources-col-stat {
    text-align: center;
}

.crm-dash-sources-col-bar {
    padding-left: 0.5rem;
}

.crm-dash-sources-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-dash-sources-rate {
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

    .crm-dash-sources-rate.high {
        background: rgba(16, 185, 129, 0.1);
        color: #059669;
    }

    .crm-dash-sources-rate.mid {
        background: rgba(245, 158, 11, 0.1);
        color: #d97706;
    }

    .crm-dash-sources-rate.low {
        background: rgba(239, 68, 68, 0.1);
        color: #dc2626;
    }

.crm-dash-sources-bar-container {
    width: 100%;
    height: 6px;
    background: var(--mud-palette-background-grey);
    border-radius: 3px;
    overflow: hidden;
}

.crm-dash-sources-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ===== ACTIVITY & ENGAGEMENT ===== */
.crm-dash-activity-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.crm-dash-activity-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.75rem 0.5rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.crm-dash-activity-kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-dash-activity-kpi-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.crm-dash-activity-kpi-label {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contact coverage bar */
.crm-dash-contacted-section {
    margin-bottom: 0.5rem;
}

.crm-dash-contacted-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.crm-dash-contacted-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.crm-dash-contacted-pct {
    font-size: 0.875rem;
    font-weight: 700;
    color: #10b981;
}

.crm-dash-contacted-bar {
    width: 100%;
    height: 8px;
    background: rgba(239, 68, 68, 0.12);
    border-radius: 4px;
    overflow: hidden;
}

.crm-dash-contacted-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.crm-dash-contacted-legend {
    display: flex;
    gap: 1rem;
    margin-top: 0.375rem;
}

.crm-dash-contacted-legend-item {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.crm-dash-legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.crm-dash-contacted-legend-item.contacted .crm-dash-legend-dot {
    background: #10b981;
}

.crm-dash-contacted-legend-item.not-contacted .crm-dash-legend-dot {
    background: #ef4444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .crm-dash-6col {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .crm-dash-row {
        grid-template-columns: 1fr;
    }

    .crm-dash-6col {
        grid-template-columns: repeat(2, 1fr);
    }

    .crm-dash-pipeline-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .crm-dash-team-table-header,
    .crm-dash-team-table-row {
        grid-template-columns: 40px 1.5fr repeat(2, 0.7fr) 1fr;
    }

    .crm-dash-team-table-header > :nth-child(5),
    .crm-dash-team-table-header > :nth-child(6),
    .crm-dash-team-table-row > :nth-child(5),
    .crm-dash-team-table-row > :nth-child(6) {
        display: none;
    }
}

@media (max-width: 768px) {
    .crm-dash-6col {
        grid-template-columns: 1fr;
    }

    .crm-dash-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-dash-pipeline-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .crm-dash-sources-table-header,
    .crm-dash-sources-table-row {
        grid-template-columns: 1.5fr 0.6fr 0.7fr;
    }

    .crm-dash-sources-table-header > :nth-child(3),
    .crm-dash-sources-table-header > :nth-child(5),
    .crm-dash-sources-table-row > :nth-child(3),
    .crm-dash-sources-table-row > :nth-child(5) {
        display: none;
    }
}

/* 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%);
    display: flex;
    align-items: center;
    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;
}

.clp-lead-padding-container {
    padding: var(--spacing-xl);
}

/* 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;
        }

        /* Briefing trigger — subtle purple tint at rest, full gradient glow on hover.
           Same 36x36 footprint as the other card action buttons so the card doesn't
           grow. Signals the "AI / insights" theme without shouting over edit/delete. */
        .clp-contact-card .clp-card-action-btn.briefing {
            color: #6366f1;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
            position: relative;
            overflow: hidden;
        }

            .clp-contact-card .clp-card-action-btn.briefing::before {
                content: "";
                position: absolute;
                inset: 0;
                border-radius: inherit;
                padding: 1px;
                background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(168, 85, 247, 0.35) 100%);
                -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
                -webkit-mask-composite: xor;
                mask-composite: exclude;
                pointer-events: none;
                opacity: 0.6;
                transition: opacity 0.18s ease;
            }

            .clp-contact-card .clp-card-action-btn.briefing:hover {
                color: #fff;
                background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #a855f7 100%);
                box-shadow:
                    0 6px 14px -6px rgba(99, 102, 241, 0.55),
                    inset 0 1px 0 rgba(255, 255, 255, 0.22);
                transform: translateY(-1px);
            }

                .clp-contact-card .clp-card-action-btn.briefing:hover::before {
                    opacity: 0;
                }

            .clp-contact-card .clp-card-action-btn.briefing:active {
                transform: translateY(0);
            }

            .clp-contact-card .clp-card-action-btn.briefing:focus-visible {
                outline: none;
                box-shadow:
                    0 0 0 2px #fff,
                    0 0 0 4px rgba(99, 102, 241, 0.55);
            }

.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;
}

/* Avatar color classes (shared across contact list, table, leads) */
.avatar-pink {
    background: linear-gradient(135deg, #ec4899, #db2777) !important;
}

.avatar-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

.avatar-green {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}

.avatar-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
}

.avatar-orange {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
}

.clp-contact-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.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;
    }

/* Connected Users */
.clp-contact-connected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.5rem 0;
}

.clp-connected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: var(--cm-primary, #6366f1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.clp-connected-chip.small {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.clp-not-connected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.04);
    color: var(--mud-palette-text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.clp-not-connected-chip.small {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.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.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-pet-section {
    position: relative;
    overflow: hidden;
}

/* 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;
    }

/* ── Status Change Dialog ── */
.clp-task-comment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    animation: clp-overlay-in 0.15s ease-out;
}

@keyframes clp-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.clp-task-comment-box {
    background: var(--mud-palette-surface);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    animation: clp-dialog-enter 0.2s ease-out;
}

@keyframes clp-dialog-enter {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Dialog header */
.clp-dialog-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.clp-dialog-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    flex-shrink: 0;
}

.clp-task-comment-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 650;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.clp-task-comment-subtitle {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.clp-current-status {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* Status chip buttons */
.clp-status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.875rem;
}

.clp-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border: 1.5px solid transparent;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1;
    letter-spacing: 0.01em;
}

.clp-status-chip-icon {
    font-size: 14px !important;
    width: 14px;
    height: 14px;
}

.clp-status-chip.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.2);
}

    .clp-status-chip.status-pending:hover {
        background: rgba(245, 158, 11, 0.18);
        border-color: rgba(245, 158, 11, 0.4);
    }

.clp-status-chip.status-inprogress {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.2);
}

    .clp-status-chip.status-inprogress:hover {
        background: rgba(59, 130, 246, 0.18);
        border-color: rgba(59, 130, 246, 0.4);
    }

.clp-status-chip.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.2);
}

    .clp-status-chip.status-completed:hover {
        background: rgba(34, 197, 94, 0.18);
        border-color: rgba(34, 197, 94, 0.4);
    }

.clp-status-chip.status-cancelled {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    border-color: rgba(107, 114, 128, 0.2);
}

    .clp-status-chip.status-cancelled:hover {
        background: rgba(107, 114, 128, 0.18);
        border-color: rgba(107, 114, 128, 0.4);
    }

.clp-status-chip.selected {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.clp-status-chip.selected.status-pending {
    background: #f59e0b;
}

.clp-status-chip.selected.status-inprogress {
    background: #3b82f6;
}

.clp-status-chip.selected.status-completed {
    background: #22c55e;
}

.clp-status-chip.selected.status-cancelled {
    background: #6b7280;
}

/* Comment textarea */
.clp-comment-section {
    margin-bottom: 0.875rem;
}

.clp-comment-textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    box-sizing: border-box;
}

    .clp-comment-textarea::placeholder {
        color: var(--mud-palette-text-disabled);
        font-size: 0.775rem;
    }

    .clp-comment-textarea:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    }

/* Dialog action buttons */
.clp-task-comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.clp-dialog-btn {
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.clp-dialog-btn-ghost {
    background: transparent;
    color: var(--mud-palette-text-secondary);
}

    .clp-dialog-btn-ghost:hover {
        background: var(--mud-palette-background-grey);
        color: var(--mud-palette-text-primary);
    }

.clp-dialog-btn-primary {
    background: #6366f1;
    color: #fff;
}

    .clp-dialog-btn-primary:hover:not(:disabled) {
        background: #4f46e5;
    }

    .clp-dialog-btn-primary:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.clp-task-item.cancelled {
    opacity: 0.6;
}

    .clp-task-item.cancelled .clp-task-title {
        text-decoration: line-through;
        color: var(--mud-palette-text-secondary);
    }

.clp-task-stat-icon.grey {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* 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%;
        }
}

/* =============================================
   FOLLOW-UP PREMIUM STYLES (fu-*)
   ============================================= */

/* --- Toolbar --- */
.fu-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    margin-bottom: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fu-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.fu-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.fu-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .fu-toolbar-btn:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

    .fu-toolbar-btn.active {
        background: #eef2ff;
        color: #6366f1;
        border-color: #c7d2fe;
    }

    .fu-toolbar-btn .mud-icon-root {
        font-size: 1.125rem;
    }

.fu-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

    .fu-btn-primary:hover {
        background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
        transform: translateY(-1px);
    }

.fu-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6366f1;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
}

.fu-toolbar-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .fu-toolbar-icon-btn:hover {
        background: #f1f5f9;
        color: #475569;
    }

    .fu-toolbar-icon-btn.active {
        background: #eef2ff;
        color: #6366f1;
    }

    .fu-toolbar-icon-btn .mud-icon-root {
        font-size: 1.125rem;
    }

/* --- Search & Filters --- */
.fu-search-bar {
    margin-bottom: 1rem;
    animation: fuSlideDown 0.2s ease;
}

.fu-filter-panel {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    animation: fuSlideDown 0.2s ease;
}

.fu-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

    .fu-filter-row .mud-input-control {
        min-width: 160px;
    }

@keyframes fuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Comment Section --- */
.fu-comment-section {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fu-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.125rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .fu-comment-header:hover {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    }

.fu-comment-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
}

    .fu-comment-title .mud-icon-root {
        color: #6366f1;
    }

.fu-comment-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.2s ease;
}

    .fu-comment-header:hover .fu-comment-toggle {
        color: #6366f1;
    }

.fu-comment-body {
    animation: fuSlideDown 0.25s ease;
}

/* Text Toolbar */
.fu-text-toolbar {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.fu-tb-group {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.fu-tb-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .fu-tb-btn:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

    .fu-tb-btn.active {
        background: #eef2ff;
        color: #6366f1;
    }

    .fu-tb-btn .mud-icon-root {
        font-size: 1rem;
    }

.fu-tb-font-btn {
    width: auto;
    padding: 0 0.5rem;
    gap: 0.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.fu-tb-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 0.25rem;
}

.fu-tb-spacer {
    flex: 1;
}

/* Comment Textarea */
.fu-comment-textarea {
    padding: 0.5rem 1rem;
}

    .fu-comment-textarea .mud-input-control {
        background: transparent;
    }

    .fu-comment-textarea textarea {
        font-size: 0.875rem;
        line-height: 1.6;
        color: #334155;
    }

/* Comment Actions */
.fu-comment-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem 0.75rem;
}

/* --- Loading --- */
.fu-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: #94a3b8;
}

/* --- Timeline --- */
.fu-timeline-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-right: 0.25rem;
}

    .fu-timeline-container::-webkit-scrollbar {
        width: 5px;
    }

    .fu-timeline-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .fu-timeline-container::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 3px;
    }

        .fu-timeline-container::-webkit-scrollbar-thumb:hover {
            background: #cbd5e1;
        }

.fu-timeline {
    display: flex;
    flex-direction: column;
}

/* Date Group */
.fu-date-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
}

.fu-date-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
}

.fu-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

    .fu-date-badge .mud-icon-root {
        font-size: 0.875rem;
        color: #94a3b8;
    }

/* Activity Item (timeline row) */
.fu-activity-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.25rem;
}

    .fu-activity-item:last-child .fu-timeline-line {
        display: none;
    }

/* Timeline Track (left column: icon + line) */
.fu-timeline-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 36px;
}

.fu-timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 1;
}

    .fu-timeline-icon .mud-icon-root {
        font-size: 1rem;
    }

    .fu-timeline-icon.email {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
        border-color: #93c5fd;
        color: #2563eb;
    }

    .fu-timeline-icon.meeting {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        border-color: #6ee7b7;
        color: #059669;
    }

    .fu-timeline-icon.call {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border-color: #fcd34d;
        color: #d97706;
    }

    .fu-timeline-icon.note {
        background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
        border-color: #a5b4fc;
        color: #4f46e5;
    }

    .fu-timeline-icon.task {
        background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
        border-color: #f9a8d4;
        color: #db2777;
    }

    .fu-timeline-icon[class*="item created"],
    .fu-timeline-icon[class*="family member added"],
    .fu-timeline-icon[class*="family group created"] {
        background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
        border-color: #5eead4;
        color: #0d9488;
    }

    .fu-timeline-icon[class*="family member left"] {
        background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
        border-color: #9ca3af;
        color: #6b7280;
    }

    .fu-timeline-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;
    }

    .fu-timeline-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;
    }

    .fu-timeline-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;
    }

    .fu-timeline-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;
    }

    .fu-timeline-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;
    }

    .fu-timeline-icon[class*="lead created"] {
        background: linear-gradient(135deg, rgba(158, 158, 158, 0.12) 0%, rgba(117, 117, 117, 0.12) 100%);
        border-color: rgba(158, 158, 158, 0.25);
        color: #9E9E9E;
    }

    .fu-timeline-icon[class*="opportunity created"] {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(56, 142, 60, 0.12) 100%);
        border-color: rgba(76, 175, 80, 0.25);
        color: #4CAF50;
    }

    .fu-timeline-icon[class*="lead contacted"] {
        background: linear-gradient(135deg, rgba(0, 172, 193, 0.12) 0%, rgba(0, 131, 143, 0.12) 100%);
        border-color: rgba(0, 172, 193, 0.25);
        color: #00ACC1;
    }

    .fu-timeline-icon[class*="lead qualified"] {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(56, 142, 60, 0.12) 100%);
        border-color: rgba(76, 175, 80, 0.25);
        color: #4CAF50;
    }

    .fu-timeline-icon[class*="deal qualification"] {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.12) 0%, rgba(25, 118, 210, 0.12) 100%);
        border-color: rgba(33, 150, 243, 0.25);
        color: #2196F3;
    }

    .fu-timeline-icon[class*="deal proposal"] {
        background: linear-gradient(135deg, rgba(255, 152, 0, 0.12) 0%, rgba(245, 124, 0, 0.12) 100%);
        border-color: rgba(255, 152, 0, 0.25);
        color: #FF9800;
    }

    .fu-timeline-icon[class*="deal negotiation"] {
        background: linear-gradient(135deg, rgba(63, 81, 181, 0.12) 0%, rgba(48, 63, 159, 0.12) 100%);
        border-color: rgba(63, 81, 181, 0.25);
        color: #3F51B5;
    }

    .fu-timeline-icon[class*="deal won"] {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(56, 142, 60, 0.12) 100%);
        border-color: rgba(76, 175, 80, 0.25);
        color: #4CAF50;
    }

    .fu-timeline-icon[class*="deal lost"] {
        background: linear-gradient(135deg, rgba(244, 67, 54, 0.12) 0%, rgba(211, 47, 47, 0.12) 100%);
        border-color: rgba(244, 67, 54, 0.25);
        color: #F44336;
    }

.fu-timeline-line {
    width: 2px;
    flex: 1;
    min-height: 16px;
    background: linear-gradient(180deg, #e2e8f0 0%, #f1f5f9 100%);
    margin: 4px 0;
}

/* Activity Content (right column) */
.fu-activity-content {
    flex: 1;
    min-width: 0;
    padding-bottom: 1rem;
}

.fu-activity-header {
    margin-bottom: 0.5rem;
}

.fu-activity-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fu-activity-type-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 0.2rem 0.625rem;
    border-radius: 6px;
    background: #f1f5f9;
}

    .fu-activity-type-label.email {
        color: #2563eb;
        background: #eff6ff;
    }

    .fu-activity-type-label.meeting {
        color: #059669;
        background: #ecfdf5;
    }

    .fu-activity-type-label.call {
        color: #d97706;
        background: #fffbeb;
    }

    .fu-activity-type-label.note {
        color: #4f46e5;
        background: #eef2ff;
    }

    .fu-activity-type-label.task {
        color: #db2777;
        background: #fdf2f8;
    }

.fu-activity-time {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

/* Activity Card */
.fu-activity-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 1rem 1.125rem;
    border-left: 3px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

    .fu-activity-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        border-color: #e2e8f0;
        transform: translateX(2px);
    }

    /* Colored left border per type */
    .fu-activity-card.email {
        border-left-color: #3b82f6;
    }

    .fu-activity-card.email:hover {
        border-color: rgba(59, 130, 246, 0.15);
        border-left-color: #3b82f6;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.01) 0%, #ffffff 100%);
    }

    .fu-activity-card.meeting {
        border-left-color: #10b981;
    }

    .fu-activity-card.meeting:hover {
        border-color: rgba(16, 185, 129, 0.15);
        border-left-color: #10b981;
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.01) 0%, #ffffff 100%);
    }

    .fu-activity-card.call {
        border-left-color: #f59e0b;
    }

    .fu-activity-card.call:hover {
        border-color: rgba(245, 158, 11, 0.15);
        border-left-color: #f59e0b;
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.01) 0%, #ffffff 100%);
    }

    .fu-activity-card.note {
        border-left-color: #6366f1;
    }

    .fu-activity-card.note:hover {
        border-color: rgba(99, 102, 241, 0.15);
        border-left-color: #6366f1;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.01) 0%, #ffffff 100%);
    }

    .fu-activity-card.task {
        border-left-color: #ec4899;
    }

    .fu-activity-card.task:hover {
        border-color: rgba(236, 72, 153, 0.15);
        border-left-color: #ec4899;
        background: linear-gradient(135deg, rgba(236, 72, 153, 0.01) 0%, #ffffff 100%);
    }

.fu-activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.fu-activity-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fu-activity-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

    .fu-activity-avatar.purple {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .fu-activity-avatar.blue {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    }

    .fu-activity-avatar.green {
        background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    }

    .fu-activity-avatar.orange {
        background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    }

    .fu-activity-avatar.pink {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }

    .fu-activity-avatar.teal {
        background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    }

.fu-activity-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.fu-activity-user-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
}

.fu-activity-title {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 400;
}

.fu-activity-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    width: fit-content;
}

    .fu-activity-meta .mud-icon-root {
        font-size: 0.875rem;
        color: #cbd5e1;
    }

.fu-activity-description {
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.65;
    max-height: 3.3em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .fu-activity-description.expanded {
        max-height: none;
    }

.fu-show-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: #6366f1;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.375rem 0;
    transition: color 0.2s ease;
}

    .fu-show-more:hover {
        color: #4f46e5;
    }

/* Load More / Scroll Hint */
.fu-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.fu-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 0;
    color: #cbd5e1;
    font-size: 0.75rem;
    animation: fuBounce 2s ease-in-out infinite;
}

@keyframes fuBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(4px);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .fu-toolbar {
        padding: 0.5rem;
    }

    .fu-toolbar-left {
        gap: 0.25rem;
    }

    .fu-toolbar-btn span {
        display: none;
    }

    .fu-toolbar-btn .mud-icon-root {
        margin: 0;
    }

    .fu-activity-item {
        gap: 0.625rem;
    }

    .fu-timeline-track {
        width: 28px;
    }

    .fu-timeline-icon {
        width: 28px;
        height: 28px;
    }

        .fu-timeline-icon .mud-icon-root {
            font-size: 0.875rem;
        }
}

/* =============================================
   ACTIVITY TIMELINE / FOLLOW-UP COMPONENT (legacy)
   ============================================= */

/* 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;
}


/* 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 */
/* MudDialog adds its own padding to the title area — we flatten it so our gradient fills the
   full top of the dialog, including the corners where the close button sits. */
.marriage-edit-dialog .mud-dialog-title {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.med-header {
    position: relative;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #fb7185 100%);
    overflow: hidden;
}

/* Custom close button sitting inside the gradient header (built-in MudDialog close is disabled
   via DialogOptions.CloseButton = false to avoid the white strip at the top-right). */
.med-header-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 3;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.15s ease, transform 0.15s ease;
}

    .med-header-close:hover {
        background: rgba(255, 255, 255, 0.28);
        transform: scale(1.05);
    }

    .med-header-close .mud-icon-root {
        color: #fff;
    }

/* Partner 2 card when shown in edit mode with an inline autocomplete. */
.med-partner-card-editable {
    padding: 0.5rem;
    min-width: 0;
    flex: 1;
}

.med-partner-search-inline {
    width: 100%;
}

.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;
    }

/* Full-width search row shown below partners display when Partner 2 is not yet selected */
.med-partner-search-fullwidth {
    width: 100%;
    margin-top: 0.75rem;
}

.med-partner-search-fullwidth .med-partner-search {
    width: 100%;
}

/* Placeholder shown inside the Partner 2 card while searching */
.med-partner-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mud-palette-action-disabled-background);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--mud-palette-text-disabled);
}

/* Partner Autocomplete Options */
.med-partner-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    width: 100%;
    overflow: hidden;
}

.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;
    flex: 1;
    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 */
/* ═══ Couple group layout ═══ */

.vf-couple-group {
    margin-top: 1rem;
}

.vf-couple-cards {
    display: flex;
    align-items: stretch;
    gap: 0;
}

    .vf-couple-cards .vf-member-card {
        flex: 1;
        min-width: 0;
    }

    .vf-couple-cards .vf-member-card:first-child {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border-right: none;
    }

    .vf-couple-cards .vf-member-card:last-child {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-left: none;
    }

.vf-couple-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.04) 0%, rgba(244, 63, 94, 0.08) 100%);
    border-top: 1px solid rgba(244, 63, 94, 0.15);
    border-bottom: 1px solid rgba(244, 63, 94, 0.15);
    gap: 0.25rem;
    min-width: 80px;
    flex-shrink: 0;
}

.vf-couple-heart {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.3);
}

    .vf-couple-heart .mud-icon-root {
        color: white;
        font-size: 0.875rem;
    }

.vf-couple-status {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
}

.vf-status-married {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.vf-status-divorced {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.vf-status-separated {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.vf-status-widowed {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
}

.vf-status-other {
    color: #64748b;
    background: rgba(100, 116, 139, 0.1);
}

.vf-couple-date {
    font-size: 0.625rem;
    color: var(--mud-palette-text-disabled);
}

.vf-member-placeholder {
    border: 2px dashed rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.02);
}

    .vf-member-placeholder .vf-member-avatar {
        background: rgba(99, 102, 241, 0.08);
        border-color: rgba(99, 102, 241, 0.15);
    }

        .vf-member-placeholder .vf-member-avatar .mud-icon-root {
            color: var(--mud-palette-text-disabled);
        }

@media (max-width: 768px) {
    .vf-couple-cards {
        flex-direction: column;
    }

        .vf-couple-cards .vf-member-card:first-child {
            border-radius: 12px 12px 0 0;
            border-right: 1px solid rgba(99, 102, 241, 0.1);
            border-bottom: none;
        }

        .vf-couple-cards .vf-member-card:last-child {
            border-radius: 0 0 12px 12px;
            border-left: 1px solid rgba(99, 102, 241, 0.1);
            border-top: none;
        }

    .vf-couple-link {
        flex-direction: row;
        padding: 0.375rem 0.75rem;
        border-top: none;
        border-bottom: none;
        border-left: 1px solid rgba(244, 63, 94, 0.15);
        border-right: 1px solid rgba(244, 63, 94, 0.15);
    }
}

/* ═══ FamilyTab Household Header ═══ */

.ft-household-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.ft-household-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ft-household-icon .mud-icon-root {
        color: white;
        font-size: 1.125rem;
    }

.ft-household-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ft-household-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.ft-household-meta {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.ft-badge {
    margin-top: 0.25rem;
    height: 20px !important;
    font-size: 0.625rem !important;
}

/* ═══ Marriages Section — Premium Layout ═══ */

.ft-marriages-section {
    margin-top: 1.5rem;
}

    .ft-marriages-section.past {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(99, 102, 241, 0.08);
    }

/* Section Header */
.ft-marriages-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(236, 72, 153, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
}

    .ft-marriages-section.past .ft-marriages-section-header {
        background: linear-gradient(135deg, rgba(107, 114, 128, 0.06) 0%, rgba(156, 163, 175, 0.04) 100%);
        border-color: rgba(107, 114, 128, 0.12);
    }

.ft-marriages-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ft-marriages-section-icon.active {
        background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    }

    .ft-marriages-section-icon.past {
        background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    }

    .ft-marriages-section-icon .mud-icon-root {
        color: white;
        font-size: 1rem;
    }

.ft-marriages-section-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.ft-marriages-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.ft-marriages-section-subtitle {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
}

.ft-marriages-count-badge {
    background: rgba(107, 114, 128, 0.12);
    color: var(--mud-palette-text-secondary);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Marriage Cards List */
.ft-marriages-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ft-marriage-card {
    background: var(--mud-palette-surface);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

    .ft-marriage-card.active {
        background: linear-gradient(135deg, rgba(236, 72, 153, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
        border-color: rgba(236, 72, 153, 0.15);
    }

    .ft-marriage-card.past {
        border-color: rgba(107, 114, 128, 0.12);
    }

    .ft-marriage-card:hover {
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
        transform: translateY(-1px);
    }

    .ft-marriage-card.active:hover {
        border-color: rgba(236, 72, 153, 0.25);
        box-shadow: 0 6px 24px rgba(236, 72, 153, 0.08);
    }

/* Left accent bar */
.ft-marriage-card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}

    .ft-marriage-card-accent.active {
        background: linear-gradient(180deg, #ec4899 0%, #8b5cf6 100%);
    }

    .ft-marriage-card-accent.accent-divorced {
        background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    }

    .ft-marriage-card-accent.accent-separated {
        background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    }

    .ft-marriage-card-accent.accent-widowed {
        background: linear-gradient(180deg, #6b7280 0%, #9ca3af 100%);
    }

    .ft-marriage-card-accent.accent-default {
        background: linear-gradient(180deg, #9ca3af 0%, #d1d5db 100%);
    }

/* Partners row */
.ft-marriage-partners {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.ft-marriage-partner {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    min-width: 0;
    position: relative;
}

    .ft-marriage-partner:last-child {
        flex-direction: row-reverse;
        text-align: right;
    }

    .ft-marriage-partner:last-child .ft-marriage-partner-info {
        align-items: flex-end;
    }

    .ft-marriage-partner.placeholder {
        opacity: 0.55;
    }

.ft-marriage-partner-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .ft-marriage-partner-avatar span {
        font-size: 0.8125rem;
        font-weight: 600;
        color: white;
    }

    .ft-marriage-partner-avatar.placeholder {
        background: rgba(99, 102, 241, 0.08);
        border: 2px dashed rgba(99, 102, 241, 0.2);
        box-shadow: none;
    }

        .ft-marriage-partner-avatar.placeholder .mud-icon-root {
            color: var(--mud-palette-text-disabled);
            font-size: 1.125rem;
        }

.ft-marriage-partner-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.ft-marriage-partner-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .ft-marriage-partner-name.placeholder {
        color: var(--mud-palette-text-disabled);
        font-weight: 500;
    }

.ft-marriage-partner-role {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
}

    .ft-marriage-partner-role .mud-icon-root {
        font-size: 0.8125rem;
        color: var(--mud-palette-primary);
    }

    .ft-marriage-partner-role.placeholder {
        color: var(--mud-palette-text-disabled);
    }

/* Badge */
.ft-marriage-badge {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 6px;
    position: absolute;
    top: -2px;
    right: -2px;
}

    .ft-marriage-badge.head {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
        color: #6366f1;
    }

/* Connector (heart between partners) */
.ft-marriage-connector {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    padding: 0 0.25rem;
}

.ft-marriage-connector-line {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.3) 0%, rgba(236, 72, 153, 0.15) 100%);
    border-radius: 1px;
}

    .ft-marriage-connector-line.faded {
        background: linear-gradient(90deg, rgba(156, 163, 175, 0.25) 0%, rgba(156, 163, 175, 0.1) 100%);
    }

.ft-marriage-connector-heart {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ft-marriage-connector-heart.active {
        background: linear-gradient(135deg, #ec4899 0%, #e11d48 100%);
        box-shadow: 0 2px 10px rgba(236, 72, 153, 0.3);
    }

        .ft-marriage-connector-heart.active .mud-icon-root {
            color: white;
            font-size: 0.875rem;
        }

    .ft-marriage-connector-heart.past {
        background: rgba(156, 163, 175, 0.12);
        border: 1px solid rgba(156, 163, 175, 0.2);
    }

        .ft-marriage-connector-heart.past .mud-icon-root {
            color: #9ca3af;
            font-size: 0.875rem;
        }

/* Meta row (status + dates) */
.ft-marriage-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(99, 102, 241, 0.06);
    flex-wrap: wrap;
}

    .ft-marriage-card.past .ft-marriage-meta {
        border-top-color: rgba(107, 114, 128, 0.08);
    }

.ft-marriage-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 6px;
}

    .ft-marriage-status .mud-icon-root {
        font-size: 0.75rem;
    }

.ft-marriage-date-info {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

    .ft-marriage-date-info .mud-icon-root {
        font-size: 0.875rem;
        opacity: 0.7;
    }

.ft-marriage-duration {
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
    font-style: italic;
}

.ft-marriage-date-separator {
    margin: 0 0.125rem;
    color: var(--mud-palette-text-disabled);
}

.ft-marriage-date-end {
    color: var(--mud-palette-text-disabled);
}

/* Edit button on marriage cards */
.ft-marriage-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

    .ft-marriage-edit-btn:hover {
        background: rgba(99, 102, 241, 0.12);
        border-color: rgba(99, 102, 241, 0.3);
        color: var(--mud-palette-primary);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
    }

    .ft-marriage-edit-btn .mud-icon-root {
        font-size: 0.875rem;
    }

/* Responsive */
@media (max-width: 640px) {
    .ft-marriage-card {
        padding: 1rem;
    }

    .ft-marriage-partners {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ft-marriage-partner,
    .ft-marriage-partner:last-child {
        flex-direction: row;
        text-align: left;
    }

        .ft-marriage-partner:last-child .ft-marriage-partner-info {
            align-items: flex-start;
        }

    .ft-marriage-connector {
        flex-direction: column;
        padding: 0.25rem 0;
    }

    .ft-marriage-connector-line {
        width: 2px;
        height: 12px;
    }

    .ft-marriage-meta {
        justify-content: center;
    }
}

/* ═══ Ungrouped 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;
        }

/* ── Action Buttons Row ── */
.crm-action-btns-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Member Edit Controls ── */
.crm-member-edit-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.crm-member-role-select {
    max-width: 200px;
    font-size: 0.8125rem;
}

    .crm-member-role-select .mud-input-outlined-border {
        border-color: rgba(99, 102, 241, 0.2);
    }

    .crm-member-role-select:hover .mud-input-outlined-border {
        border-color: rgba(99, 102, 241, 0.4);
    }

.crm-member-badges-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.crm-member-toggle-chip {
    cursor: pointer;
    font-size: 0.6875rem !important;
    height: 24px !important;
    transition: all 0.15s ease;
}

    .crm-member-toggle-chip:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    }

/* 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.campaign {
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
        color: #f97316;
    }

/* Lead Campaign Table Styles */
.crm-campaign-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

    .crm-campaign-source .mud-icon-root {
        font-size: 1rem;
        color: var(--mud-palette-text-disabled);
    }

.crm-campaign-cost {
    font-weight: 500;
    color: #10b981;
    font-size: 0.875rem;
}

.crm-settings-date {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

/* Lead Referral Section Styles */
.crm-lead-referral-section {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
}

.crm-lead-referral-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    font-weight: 500;
    font-size: 0.875rem;
    color: #6366f1;
}

    .crm-lead-referral-header .mud-icon-root {
        font-size: 1rem;
    }

.crm-lead-referral-preview {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(5, 150, 105, 0.06) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
}

.crm-lead-referral-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 8px;
    flex-shrink: 0;
}

    .crm-lead-referral-preview-icon .mud-icon-root {
        font-size: 1rem;
        color: #10b981;
    }

.crm-lead-referral-preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.crm-lead-referral-preview-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.crm-lead-referral-preview-text {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
    font-style: italic;
    line-height: 1.4;
}

.crm-settings-icon-box .mud-icon-root {
    font-size: 1.125rem;
}

.crm-settings-name {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.crm-settings-description {
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-settings-count {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

/* Settings Status Badge */
.crm-settings-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

    .crm-settings-badge.active {
        background: 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: 1.25rem;
    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%;
        }
}

/* Department Multi-Select List */
.crm-professional-dept-list {
    margin: 0.75rem 1.25rem 1.25rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-professional-dept-list-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6366f1;
}

    .crm-professional-dept-list-header .mud-icon-root {
        font-size: 1rem;
        color: #6366f1;
    }

.crm-professional-dept-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    animation: fadeInSlide 0.2s ease-out;
}

.crm-professional-dept-item-name {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 140px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

    .crm-professional-dept-item-name .mud-icon-root {
        font-size: 1rem;
        color: #6366f1;
    }

.crm-professional-dept-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.crm-professional-dept-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.crm-professional-dept-remove .mud-icon-root {
    font-size: 0.875rem !important;
    color: #ef4444 !important;
}

.crm-professional-dept-remove svg {
    fill: #ef4444 !important;
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .crm-professional-dept-item {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-professional-dept-item-name {
        min-width: unset;
    }
}

/* =============================================
   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;
    }

/* Priority badge — flat tag with a colored dot. Designed to sit quietly next to
   the contact type badge on cards: same height class, no heavy shadows, no pulse,
   no gradients. Clean text color-coded to the priority level, subtle tinted
   background, tiny dot for a scannable accent. */
.cv-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1.1;
    white-space: nowrap;
    transition: background 0.15s ease;
}

    .cv-priority-badge.priority-1,
    .cv-priority-badge.priority-2 {
        background: rgba(239, 68, 68, 0.1);
        color: #b91c1c;
    }

    .cv-priority-badge.priority-3,
    .cv-priority-badge.priority-4 {
        background: rgba(249, 115, 22, 0.1);
        color: #c2410c;
    }

    .cv-priority-badge.priority-5,
    .cv-priority-badge.priority-6 {
        background: rgba(234, 179, 8, 0.1);
        color: #a16207;
    }

    .cv-priority-badge.priority-7,
    .cv-priority-badge.priority-8 {
        background: rgba(34, 197, 94, 0.1);
        color: #15803d;
    }

    .cv-priority-badge.priority-9,
    .cv-priority-badge.priority-10 {
        background: rgba(16, 185, 129, 0.1);
        color: #047857;
    }

    .cv-priority-badge .priority-indicator {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .cv-priority-badge.priority-1 .priority-indicator,
    .cv-priority-badge.priority-2 .priority-indicator {
        background: #dc2626;
    }

    .cv-priority-badge.priority-3 .priority-indicator,
    .cv-priority-badge.priority-4 .priority-indicator {
        background: #ea580c;
    }

    .cv-priority-badge.priority-5 .priority-indicator,
    .cv-priority-badge.priority-6 .priority-indicator {
        background: #ca8a04;
    }

    .cv-priority-badge.priority-7 .priority-indicator,
    .cv-priority-badge.priority-8 .priority-indicator {
        background: #16a34a;
    }

    .cv-priority-badge.priority-9 .priority-indicator,
    .cv-priority-badge.priority-10 .priority-indicator {
        background: #059669;
    }

.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 1.25rem;
    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;
    gap: 0.5rem;
    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.875rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 1100px;
    position: relative;
    gap: 0.5rem;
}

    .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: 160px;
        flex-shrink: 0;
        color: var(--mud-palette-text-secondary);
    }

    .contacts-table-cell.type {
        width: 130px;
        flex-shrink: 0;
    }

    .contacts-table-cell.connected {
        width: 180px;
        flex-shrink: 0;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .contacts-table-cell.priority {
        width: 120px;
        flex-shrink: 0;
    }

    .contacts-table-cell.added {
        width: 120px;
        flex-shrink: 0;
        color: var(--mud-palette-text-secondary);
        font-size: 0.8125rem;
    }

    .contacts-table-cell.actions {
        width: 110px;
        flex-shrink: 0;
        justify-content: flex-end;
        gap: 0.375rem;
    }

.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-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contacts-table-row:hover .contacts-table-avatar-img {
    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: 2rem 0 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-radius: 16px;
    border: 2px dashed 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-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);
    }

.clp-task-item.completed .crm-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-task-actions {
    display: flex;
    gap: 0.25rem;
}

.crm-task-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

    .crm-lead-task-action-btn:hover {
        background: var(--mud-palette-surface);
    }

    .crm-lead-task-action-btn .mud-icon-root {
        font-size: 1rem;
        color: var(--mud-palette-text-secondary);
    }

    .crm-lead-task-action-btn.delete:hover {
        background: 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.stage-qualification .crm-opp-summary-icon {
        background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    }

    .crm-opp-summary-card.stage-proposal .crm-opp-summary-icon {
        background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    }

    .crm-opp-summary-card.stage-negotiation .crm-opp-summary-icon {
        background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    }

    .crm-opp-summary-card.stage-won .crm-opp-summary-icon {
        background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    }

    .crm-opp-summary-card.stage-lost .crm-opp-summary-icon {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }

    .crm-opp-summary-card.stage-default .crm-opp-summary-icon {
        background: linear-gradient(135deg, #94a3b8 0%, #64748b 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;
        flex-direction: row;
        align-items: center;
        gap: 0.625rem;
        width: 100%;
        line-height: 1;
    }

    .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;
        flex-shrink: 1;
    }

    .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-fill.stage-qualification {
            background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
        }

        .crm-opp-card-value .crm-opp-probability-fill.stage-proposal {
            background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
        }

        .crm-opp-card-value .crm-opp-probability-fill.stage-negotiation {
            background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
        }

        .crm-opp-card-value .crm-opp-probability-fill.stage-won {
            background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
        }

        .crm-opp-card-value .crm-opp-probability-fill.stage-lost {
            background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
        }

    .crm-opp-card-value .crm-opp-probability-text,
    .crm-opp-card-value .crm-opp-probability-text[class*="stage-"] {
        font-size: 0.8125rem;
        font-weight: 600;
        color: #6366f1;
        min-width: 40px;
        text-align: right;
        flex-shrink: 0;
        white-space: nowrap;
        line-height: 1;
        position: static;
        transform: none;
        top: auto;
        left: auto;
    }

        .crm-opp-card-value .crm-opp-probability-text.stage-qualification {
            color: #6366f1;
        }

        .crm-opp-card-value .crm-opp-probability-text.stage-proposal {
            color: #3b82f6;
        }

        .crm-opp-card-value .crm-opp-probability-text.stage-negotiation {
            color: #d97706;
        }

        .crm-opp-card-value .crm-opp-probability-text.stage-won {
            color: #10b981;
        }

        .crm-opp-card-value .crm-opp-probability-text.stage-lost {
            color: #ef4444;
        }

.crm-opp-probability-mini {
    width: 60px;
    height: 6px;
    background: var(--mud-palette-lines-default);
    border-radius: 3px;
    overflow: hidden;
}

.crm-opp-probability-mini-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
}

    .crm-opp-probability-mini-fill.stage-qualification {
        background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    }

    .crm-opp-probability-mini-fill.stage-proposal {
        background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    }

    .crm-opp-probability-mini-fill.stage-negotiation {
        background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    }

    .crm-opp-probability-mini-fill.stage-won {
        background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    }

    .crm-opp-probability-mini-fill.stage-lost {
        background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    }

.crm-opp-probability-text-mini {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

    .crm-opp-probability-text-mini.stage-qualification {
        color: #6366f1;
    }

    .crm-opp-probability-text-mini.stage-proposal {
        color: #3b82f6;
    }

    .crm-opp-probability-text-mini.stage-negotiation {
        color: #d97706;
    }

    .crm-opp-probability-text-mini.stage-won {
        color: #10b981;
    }

    .crm-opp-probability-text-mini.stage-lost {
        color: #ef4444;
    }

.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 1.25rem;
    gap: 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 1.25rem;
    gap: 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: 36px;
        flex: 0 0 36px;
    }

    .crm-opp-table-cell.title {
        flex: 2 1 180px;
        min-width: 0;
    }

    .crm-opp-table-cell.lead {
        flex: 1.5 1 140px;
        min-width: 0;
    }

    .crm-opp-table-cell.stage {
        flex: 0 0 110px;
    }

    .crm-opp-table-cell.value {
        flex: 0 0 110px;
    }

    .crm-opp-table-cell.probability {
        flex: 0 0 110px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .crm-opp-table-cell.close-date {
        flex: 0 0 125px;
    }

    .crm-opp-table-cell.assigned {
        flex: 1 1 120px;
        min-width: 0;
    }

    .crm-opp-table-cell.actions {
        flex: 0 0 120px;
        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: 0.875rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

    .crm-opp-kanban::-webkit-scrollbar {
        height: 6px;
    }

    .crm-opp-kanban::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 3px;
    }

    .crm-opp-kanban::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.12);
        border-radius: 3px;
    }

        .crm-opp-kanban::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.2);
        }

.crm-opp-kanban-column {
    flex: 1 1 0;
    min-width: 280px;
    max-width: 340px;
    background: var(--mud-palette-background-grey);
    border-radius: var(--clp-radius-lg, 12px);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 380px);
    min-height: 300px;
    border: 1px solid var(--mud-palette-lines-default);
    transition: box-shadow 0.2s ease;
}

    .crm-opp-kanban-column:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }

    .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: 0.875rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.crm-opp-kanban-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-opp-kanban-stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

    .crm-opp-kanban-stage-dot.stage-qualification {
        background: #6366f1;
    }

    .crm-opp-kanban-stage-dot.stage-proposal {
        background: #3b82f6;
    }

    .crm-opp-kanban-stage-dot.stage-negotiation {
        background: #f59e0b;
    }

    .crm-opp-kanban-stage-dot.stage-won {
        background: #10b981;
    }

    .crm-opp-kanban-stage-dot.stage-lost {
        background: #ef4444;
    }

.crm-opp-kanban-title {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.crm-opp-kanban-count {
    padding: 0.0625rem 0.4375rem;
    background: var(--mud-palette-surface);
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    min-width: 20px;
    text-align: center;
}

.crm-opp-kanban-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.crm-opp-kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .crm-opp-kanban-cards::-webkit-scrollbar {
        width: 4px;
    }

    .crm-opp-kanban-cards::-webkit-scrollbar-track {
        background: transparent;
    }

    .crm-opp-kanban-cards::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 2px;
    }

/* Kanban Empty State */
.crm-opp-kanban-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--mud-palette-text-disabled);
    font-size: 0.8125rem;
    text-align: center;
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.01);
}

    .crm-opp-kanban-empty .mud-icon-root {
        font-size: 1.25rem;
        opacity: 0.5;
    }

/* Kanban Card */
.crm-opp-kanban-card {
    background: var(--mud-palette-surface);
    border-radius: 10px;
    padding: 0.75rem 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--mud-palette-lines-default);
    position: relative;
    border-left: 3px solid transparent;
}

    .crm-opp-kanban-card.stage-qualification {
        border-left-color: #6366f1;
    }

    .crm-opp-kanban-card.stage-proposal {
        border-left-color: #3b82f6;
    }

    .crm-opp-kanban-card.stage-negotiation {
        border-left-color: #f59e0b;
    }

    .crm-opp-kanban-card.stage-won {
        border-left-color: #10b981;
    }

    .crm-opp-kanban-card.stage-lost {
        border-left-color: #ef4444;
    }

    .crm-opp-kanban-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
        border-color: rgba(99, 102, 241, 0.2);
    }

    .crm-opp-kanban-card:hover .crm-opp-kanban-card-actions {
        opacity: 1;
        pointer-events: auto;
    }

/* Card Top Row (title + actions) */
.crm-opp-kanban-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.crm-opp-kanban-card-title {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

/* Card Actions (visible on hover) */
.crm-opp-kanban-card-actions {
    display: flex;
    gap: 0.125rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.crm-opp-kanban-action {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--mud-palette-text-secondary);
    padding: 0;
}

    .crm-opp-kanban-action .mud-icon-root {
        font-size: 0.875rem;
    }

    .crm-opp-kanban-action.win:hover {
        background: rgba(16, 185, 129, 0.12);
        color: #10b981;
    }

    .crm-opp-kanban-action.lose:hover {
        background: rgba(239, 68, 68, 0.12);
        color: #ef4444;
    }

    .crm-opp-kanban-action.edit:hover {
        background: rgba(99, 102, 241, 0.12);
        color: #6366f1;
    }

/* Card Lead/Contact */
.crm-opp-kanban-card-lead {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.5rem;
}

.crm-opp-kanban-card-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.5625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

    .crm-opp-kanban-card-avatar.crm-opp-avatar-pink {
        background: linear-gradient(135deg, #ec4899, #f472b6);
    }

    .crm-opp-kanban-card-avatar.crm-opp-avatar-blue {
        background: linear-gradient(135deg, #3b82f6, #60a5fa);
    }

    .crm-opp-kanban-card-avatar.crm-opp-avatar-green {
        background: linear-gradient(135deg, #10b981, #34d399);
    }

    .crm-opp-kanban-card-avatar.crm-opp-avatar-purple {
        background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    }

    .crm-opp-kanban-card-avatar.crm-opp-avatar-orange {
        background: linear-gradient(135deg, #f59e0b, #fbbf24);
    }

    .crm-opp-kanban-card-avatar.crm-opp-avatar-teal {
        background: linear-gradient(135deg, #14b8a6, #2dd4bf);
    }

/* Card Value + Probability Row */
.crm-opp-kanban-card-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
}

.crm-opp-kanban-card-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.crm-opp-kanban-card-prob {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.crm-opp-kanban-prob-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.crm-opp-kanban-prob-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

    .crm-opp-kanban-prob-fill.stage-qualification {
        background: #6366f1;
    }

    .crm-opp-kanban-prob-fill.stage-proposal {
        background: #3b82f6;
    }

    .crm-opp-kanban-prob-fill.stage-negotiation {
        background: #f59e0b;
    }

    .crm-opp-kanban-prob-fill.stage-won {
        background: #10b981;
    }

    .crm-opp-kanban-prob-fill.stage-lost {
        background: #ef4444;
    }

.crm-opp-kanban-prob-text {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

/* Card Footer */
.crm-opp-kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-disabled);
    padding-top: 0.375rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.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;
        font-weight: 600;
    }

.crm-opp-kanban-card-assigned {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .crm-opp-kanban-card-assigned .mud-icon-root {
        font-size: 0.75rem;
    }

/* Column Footer */
.crm-opp-kanban-column-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-align: center;
    background: rgba(0, 0, 0, 0.015);
    border-radius: 0 0 var(--clp-radius-lg, 12px) var(--clp-radius-lg, 12px);
}

    .crm-opp-kanban-column-footer.stage-qualification {
        color: #6366f1;
    }

    .crm-opp-kanban-column-footer.stage-proposal {
        color: #3b82f6;
    }

    .crm-opp-kanban-column-footer.stage-negotiation {
        color: #f59e0b;
    }

    .crm-opp-kanban-column-footer.stage-won {
        color: #10b981;
    }

    .crm-opp-kanban-column-footer.stage-lost {
        color: #ef4444;
    }

/* Kanban Drag & Drop */
.crm-opp-kanban-card[draggable="true"] {
    cursor: grab;
}

    .crm-opp-kanban-card[draggable="true"]:active {
        cursor: grabbing;
    }

.crm-opp-kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.97);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.crm-opp-kanban-card.saving {
    pointer-events: none;
    animation: kanban-pulse 0.8s ease-in-out infinite;
}

@keyframes kanban-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.crm-opp-kanban-column.drag-over {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.15), 0 4px 16px rgba(99, 102, 241, 0.08);
}

    .crm-opp-kanban-column.drag-over.stage-qualification {
        background: rgba(99, 102, 241, 0.04);
        border-color: rgba(99, 102, 241, 0.3);
    }

    .crm-opp-kanban-column.drag-over.stage-proposal {
        background: rgba(59, 130, 246, 0.04);
        border-color: rgba(59, 130, 246, 0.3);
    }

    .crm-opp-kanban-column.drag-over.stage-negotiation {
        background: rgba(245, 158, 11, 0.04);
        border-color: rgba(245, 158, 11, 0.3);
    }

    .crm-opp-kanban-column.drag-over.stage-won {
        background: rgba(16, 185, 129, 0.04);
        border-color: rgba(16, 185, 129, 0.3);
    }

.crm-opp-kanban-empty.drag-over {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.06);
    color: var(--clp-primary, #5b6ef5);
}

/* 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);
}

/* Contact Profile Card (enhanced) */
.crm-opp-contact-profile {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.crm-opp-contact-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crm-opp-contact-profile-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crm-opp-contact-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cm-primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 10px;
    border-radius: 20px;
    width: fit-content;
    margin-top: 4px;
}

    .crm-opp-contact-type-badge .mud-icon-root {
        font-size: 0.875rem;
    }

.crm-opp-contact-quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.crm-opp-contact-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .crm-opp-contact-action-btn.email {
        background: rgba(16, 185, 129, 0.1);
        color: #059669;
    }

        .crm-opp-contact-action-btn.email:hover {
            background: rgba(16, 185, 129, 0.2);
        }

    .crm-opp-contact-action-btn.phone {
        background: rgba(245, 158, 11, 0.1);
        color: #d97706;
    }

        .crm-opp-contact-action-btn.phone:hover {
            background: rgba(245, 158, 11, 0.2);
        }

    .crm-opp-contact-action-btn .mud-icon-root {
        font-size: 1rem;
    }

.crm-opp-info-empty {
    color: var(--mud-palette-text-disabled);
    font-style: italic;
}

/* 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;
}

/* =============================================
   CONVERT LEAD DIALOG (cvt-dlg-*)
   ============================================= */

/* Header gradient override */
.cvt-dlg-header {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #6366f1 100%) !important;
}

/* Lead preview badge in header */
.cvt-dlg-lead-preview {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.cvt-dlg-lead-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.cvt-dlg-lead-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cvt-dlg-lead-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.cvt-dlg-lead-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Info Banner */
.cvt-dlg-info-banner {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.04) 0%, rgba(99, 102, 241, 0.04) 100%);
    border: 1px solid rgba(13, 148, 136, 0.12);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.cvt-dlg-info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .cvt-dlg-info-icon .mud-icon-root {
        color: #ffffff;
        font-size: 1rem;
    }

.cvt-dlg-info-text {
    flex: 1;
}

.cvt-dlg-info-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f766e;
    display: block;
    margin-bottom: 0.375rem;
}

.cvt-dlg-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

    .cvt-dlg-info-list li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8125rem;
        color: #475569;
        line-height: 1.3;
    }

        .cvt-dlg-info-list li .mud-icon-root {
            font-size: 0.9375rem;
            color: #0d9488;
            flex-shrink: 0;
        }

/* Convert button override */
.cvt-dlg-convert-btn {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%) !important;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35) !important;
}

    .cvt-dlg-convert-btn:hover:not(:disabled) {
        box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45) !important;
        transform: translateY(-1px);
    }

/* =============================================
   OPPORTUNITY EDIT DIALOG (opp-dlg-*)
   ============================================= */

/* Stage preview in header */
.opp-dlg-stage-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

    .opp-dlg-stage-preview .mud-icon-root {
        font-size: 0.875rem;
    }

    .opp-dlg-stage-preview.stage-qualification {
        background: rgba(99, 102, 241, 0.2);
        border-color: rgba(99, 102, 241, 0.3);
    }

    .opp-dlg-stage-preview.stage-proposal {
        background: rgba(59, 130, 246, 0.2);
        border-color: rgba(59, 130, 246, 0.3);
    }

    .opp-dlg-stage-preview.stage-negotiation {
        background: rgba(245, 158, 11, 0.2);
        border-color: rgba(245, 158, 11, 0.3);
    }

    .opp-dlg-stage-preview.stage-won {
        background: rgba(16, 185, 129, 0.2);
        border-color: rgba(16, 185, 129, 0.3);
    }

    .opp-dlg-stage-preview.stage-lost {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.3);
    }

/* Stage Transition (Change Stage Dialog) */
.opp-dlg-stage-transition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
}

.opp-dlg-stage-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid;
}

    .opp-dlg-stage-chip .mud-icon-root {
        font-size: 1rem;
    }

    .opp-dlg-stage-chip.stage-qualification {
        background: rgba(99, 102, 241, 0.08);
        border-color: rgba(99, 102, 241, 0.2);
        color: #6366f1;
    }

    .opp-dlg-stage-chip.stage-proposal {
        background: rgba(59, 130, 246, 0.08);
        border-color: rgba(59, 130, 246, 0.2);
        color: #3b82f6;
    }

    .opp-dlg-stage-chip.stage-negotiation {
        background: rgba(245, 158, 11, 0.08);
        border-color: rgba(245, 158, 11, 0.2);
        color: #f59e0b;
    }

    .opp-dlg-stage-chip.stage-won {
        background: rgba(16, 185, 129, 0.08);
        border-color: rgba(16, 185, 129, 0.2);
        color: #10b981;
    }

    .opp-dlg-stage-chip.stage-lost {
        background: rgba(239, 68, 68, 0.08);
        border-color: rgba(239, 68, 68, 0.2);
        color: #ef4444;
    }

.opp-dlg-stage-arrow {
    color: var(--mud-palette-text-disabled);
    display: flex;
    align-items: center;
}

    .opp-dlg-stage-arrow .mud-icon-root {
        font-size: 1.25rem;
    }

/* Section */
.opp-dlg-section {
    padding: 0 0 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

    .opp-dlg-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.opp-dlg-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

    .opp-dlg-section-header .mud-icon-root {
        font-size: 1rem;
        color: #6366f1;
    }

/* Form Grid */
.opp-dlg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.opp-dlg-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .opp-dlg-field.full {
        grid-column: 1 / -1;
    }

.opp-dlg-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-left: 2px;
}

/* Stage option in select */
.opp-dlg-stage-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opp-dlg-stage-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

    .opp-dlg-stage-dot.stage-qualification {
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
    }

    .opp-dlg-stage-dot.stage-proposal {
        background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
        box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
    }

    .opp-dlg-stage-dot.stage-negotiation {
        background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
        box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
    }

    .opp-dlg-stage-dot.stage-won {
        background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
        box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
    }

    .opp-dlg-stage-dot.stage-lost {
        background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
        box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
    }

/* Conditional Fields (Win/Loss Reason) */
.opp-dlg-conditional-field {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    animation: oppDlgSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.opp-dlg-won-field {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(52, 211, 153, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.opp-dlg-lost-field {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, rgba(248, 113, 113, 0.04) 100%);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.opp-dlg-conditional-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

    .opp-dlg-conditional-indicator.won {
        color: #059669;
    }

        .opp-dlg-conditional-indicator.won .mud-icon-root {
            color: #10b981;
            font-size: 1.125rem;
        }

    .opp-dlg-conditional-indicator.lost {
        color: #dc2626;
    }

        .opp-dlg-conditional-indicator.lost .mud-icon-root {
            color: #ef4444;
            font-size: 1.125rem;
        }

@keyframes oppDlgSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

/* Responsive */
/* User autocomplete option */
.opp-dlg-user-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0;
}

.opp-dlg-user-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.opp-dlg-user-option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.opp-dlg-user-option-role {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 600px) {
    .opp-dlg-form-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   OPPORTUNITY LIST SKELETON (opp-sk-*)
   ============================================= */

@keyframes opp-sk-shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

@keyframes opp-sk-fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bone (base shimmer element) */
.opp-sk-bone {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 20%, #f8fafc 40%, #e2e8f0 60%, #f1f5f9 100%);
    background-size: 800px 100%;
    animation: opp-sk-shimmer 1.8s ease-in-out infinite;
    border-radius: 6px;
}

/* Grid Card Skeleton */
.opp-sk-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    animation: opp-sk-fadeIn 0.4s ease both;
}

/* Layout helpers */
.opp-sk-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opp-sk-col {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.opp-sk-between {
    justify-content: space-between;
}

/* Width helpers */
.opp-sk-w60 {
    width: 60%;
}

.opp-sk-w50 {
    width: 50%;
}

.opp-sk-w40 {
    width: 40%;
}

.opp-sk-w35 {
    width: 35%;
}

/* Small circle (icon placeholder) */
.opp-sk-circle-sm {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Probability bar placeholder */
.opp-sk-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    min-width: 0;
}

/* Value block */
.opp-sk-value-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.625rem 0;
    border-top: 1px solid #f8fafc;
    border-bottom: 1px solid #f8fafc;
}

/* Details section */
.opp-sk-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Footer */
.opp-sk-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.625rem;
    border-top: 1px solid #f8fafc;
}

/* Action button dot */
.opp-sk-action-dot {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Table Row Skeleton */
.opp-sk-table-row {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f8fafc;
    animation: opp-sk-fadeIn 0.35s ease both;
}

/* Stagger bone animation delays within each card */
.opp-sk-card .opp-sk-bone:nth-child(1) {
    animation-delay: 0s;
}

.opp-sk-card .opp-sk-bone:nth-child(2) {
    animation-delay: 0.05s;
}

.opp-sk-card .opp-sk-row:nth-child(2) .opp-sk-bone {
    animation-delay: 0.1s;
}

.opp-sk-card .opp-sk-value-block .opp-sk-bone {
    animation-delay: 0.15s;
}

.opp-sk-card .opp-sk-details .opp-sk-bone {
    animation-delay: 0.2s;
}

.opp-sk-card .opp-sk-footer .opp-sk-bone {
    animation-delay: 0.25s;
}

/* 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%;
        min-width: 0;
        max-width: none;
        max-height: none;
        min-height: auto;
    }

    .crm-opp-kanban-card-actions {
        opacity: 1;
        pointer-events: auto;
    }
}

.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;
    }

/* =============================================
   LEAD SOURCES MANAGEMENT - CRM-LS STYLES
   ============================================= */

.crm-ls-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crm-ls-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
}

    .crm-ls-stat-card:hover {
        border-color: var(--mud-palette-primary);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

.crm-ls-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.crm-ls-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-ls-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1;
}

.crm-ls-stat-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.crm-ls-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm-ls-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
    transition: all 0.2s ease;
}

    .crm-ls-card:hover {
        border-color: var(--mud-palette-primary);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .crm-ls-card.inactive {
        opacity: 0.7;
    }

.crm-ls-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .crm-ls-card-header:hover {
        background: var(--mud-palette-background-grey);
    }

.crm-ls-card-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.crm-ls-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-ls-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.crm-ls-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crm-ls-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

.crm-ls-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

    .crm-ls-badge.active {
        background: rgba(16, 185, 129, 0.15);
        color: #10b981;
    }

    .crm-ls-badge.inactive {
        background: rgba(239, 68, 68, 0.15);
        color: #ef4444;
    }

    .crm-ls-badge.system {
        background: rgba(99, 102, 241, 0.15);
        color: #6366f1;
    }

.crm-ls-description {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.crm-ls-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.crm-ls-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

    .crm-ls-meta-item .mud-icon-root {
        font-size: 1rem;
        color: var(--mud-palette-text-disabled);
    }

.crm-ls-card-actions {
    display: flex;
    align-items: center;
}

.crm-ls-expand-btn {
    color: var(--mud-palette-text-secondary) !important;
    transition: all 0.2s ease !important;
}

    .crm-ls-expand-btn:hover {
        color: var(--mud-palette-primary) !important;
        background: rgba(var(--mud-palette-primary-rgb), 0.1) !important;
    }

.crm-ls-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.crm-ls-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-ls-action-btn.primary {
        background: rgba(99, 102, 241, 0.12);
        color: #6366f1;
    }

        .crm-ls-action-btn.primary:hover {
            background: rgba(99, 102, 241, 0.2);
        }

    .crm-ls-action-btn.success {
        background: rgba(16, 185, 129, 0.12);
        color: #10b981;
    }

        .crm-ls-action-btn.success:hover {
            background: rgba(16, 185, 129, 0.2);
        }

    .crm-ls-action-btn.warning {
        background: rgba(245, 158, 11, 0.12);
        color: #f59e0b;
    }

        .crm-ls-action-btn.warning:hover {
            background: rgba(245, 158, 11, 0.2);
        }

    .crm-ls-action-btn.danger {
        background: rgba(239, 68, 68, 0.12);
        color: #ef4444;
    }

        .crm-ls-action-btn.danger:hover {
            background: rgba(239, 68, 68, 0.2);
        }

    .crm-ls-action-btn .mud-icon-root {
        font-size: 1rem;
    }

.crm-ls-campaigns-section {
    padding: 1rem 1.25rem 1.25rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.crm-ls-campaigns-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.crm-ls-campaigns-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

    .crm-ls-campaigns-title .mud-icon-root {
        color: #f59e0b;
    }

.crm-ls-add-campaign-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

    .crm-ls-add-campaign-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }

    .crm-ls-add-campaign-btn .mud-icon-root {
        font-size: 1rem;
    }

.crm-ls-no-campaigns {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--mud-palette-surface);
    border-radius: 10px;
    border: 1px dashed var(--mud-palette-lines-default);
    gap: 0.75rem;
}

    .crm-ls-no-campaigns .mud-icon-root {
        font-size: 2rem;
        color: var(--mud-palette-text-disabled);
    }

    .crm-ls-no-campaigns span {
        font-size: 0.875rem;
        color: var(--mud-palette-text-secondary);
    }

.crm-ls-create-first-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-ls-create-first-btn:hover {
        background: rgba(245, 158, 11, 0.1);
    }

.crm-ls-campaigns-table {
    background: var(--mud-palette-surface);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
}

    .crm-ls-campaigns-table table {
        width: 100%;
        border-collapse: collapse;
    }

    .crm-ls-campaigns-table thead {
        background: var(--mud-palette-background-grey);
    }

    .crm-ls-campaigns-table th {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--mud-palette-text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.025em;
        text-align: left;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .crm-ls-campaigns-table td {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        color: var(--mud-palette-text-primary);
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .crm-ls-campaigns-table tbody tr:last-child td {
        border-bottom: none;
    }

    .crm-ls-campaigns-table tbody tr:hover {
        background: rgba(var(--mud-palette-primary-rgb), 0.04);
    }

.crm-ls-campaign-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-ls-campaign-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .crm-ls-campaign-icon .mud-icon-root {
        font-size: 0.875rem;
        color: white;
    }

.crm-ls-campaign-desc {
    color: var(--mud-palette-text-secondary);
}

.crm-ls-campaign-cost {
    font-weight: 500;
    color: #10b981;
}

.crm-ls-campaign-date {
    color: var(--mud-palette-text-secondary);
}

.crm-ls-campaign-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

    .crm-ls-campaign-status.active {
        background: rgba(16, 185, 129, 0.15);
        color: #10b981;
    }

    .crm-ls-campaign-status.inactive {
        background: rgba(107, 114, 128, 0.15);
        color: #6b7280;
    }

.crm-ls-campaign-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.crm-ls-campaign-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--mud-palette-text-secondary);
}

    .crm-ls-campaign-action.edit:hover {
        background: rgba(99, 102, 241, 0.12);
        color: #6366f1;
    }

    .crm-ls-campaign-action.delete:hover {
        background: rgba(239, 68, 68, 0.12);
        color: #ef4444;
    }

    .crm-ls-campaign-action .mud-icon-root {
        font-size: 1rem;
    }

/* Responsive adjustments */
@media (max-width: 1200px) {
    .crm-ls-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .crm-ls-stats-row {
        grid-template-columns: 1fr;
    }

    .crm-ls-card-main {
        flex-direction: column;
        gap: 0.75rem;
    }

    .crm-ls-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .crm-ls-actions-bar {
        flex-wrap: wrap;
    }

    .crm-ls-campaigns-table {
        overflow-x: auto;
    }

        .crm-ls-campaigns-table table {
            min-width: 600px;
        }

    .crm-ls-campaigns-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}


/* ===== MODAL CONTENT WRAPPER LEAD SOURCE ===== */
.lead-source-modal {
    background: var(--mud-palette-surface, #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 ===== */
    .lead-source-modal .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--mud-palette-lines-default, #e5e7eb);
        flex-shrink: 0;
        background: var(--mud-palette-surface, #ffffff);
    }

        .lead-source-modal .modal-header h2 {
            margin: 0;
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--mud-palette-text-primary, #1f2937);
        }

    .lead-source-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;
    }

        .lead-source-modal .modal-close:hover {
            background: var(--mud-palette-action-default-hover, #f3f4f6);
            color: var(--mud-palette-text-primary, #1f2937);
        }

    /* ===== MODAL BODY ===== */
    .lead-source-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1.5rem;
    }

    /* ===== FORM GROUP ===== */
    .lead-source-modal .form-group {
        margin-bottom: 1.25rem;
    }

        .lead-source-modal .form-group:last-child {
            margin-bottom: 0;
        }

        .lead-source-modal .form-group label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--mud-palette-text-primary, #374151);
            margin-bottom: 0.5rem;
        }

        .lead-source-modal .form-group input,
        .lead-source-modal .form-group textarea,
        .lead-source-modal .form-group select {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid var(--mud-palette-lines-default, #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;
        }

            .lead-source-modal .form-group input:hover,
            .lead-source-modal .form-group textarea:hover,
            .lead-source-modal .form-group select:hover {
                border-color: #667eea;
            }

            .lead-source-modal .form-group input:focus,
            .lead-source-modal .form-group textarea:focus,
            .lead-source-modal .form-group select:focus {
                outline: none;
                border-color: #667eea;
                box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
            }

        .lead-source-modal .form-group small {
            display: block;
            margin-top: 0.375rem;
            font-size: 0.8125rem;
            color: var(--mud-palette-text-secondary, #6b7280);
        }

        .lead-source-modal .form-group textarea {
            resize: vertical;
            min-height: 80px;
        }

    /* ===== COLOR PICKER ===== */
    .lead-source-modal .color-picker {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .lead-source-modal .color-option {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        cursor: pointer;
        border: 2px solid transparent;
        transition: all 0.15s ease;
    }

        .lead-source-modal .color-option:hover {
            transform: scale(1.1);
        }

        .lead-source-modal .color-option.selected {
            border-color: var(--mud-palette-text-primary, #1f2937);
            box-shadow: 0 0 0 2px white, 0 0 0 4px var(--mud-palette-primary);
        }

    /* ===== ICON PICKER ===== */
    .lead-source-modal .icon-picker {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .lead-source-modal .icon-option {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        cursor: pointer;
        border: 1px solid var(--mud-palette-lines-default, #e5e7eb);
        background: var(--mud-palette-background, #f9fafb);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
        color: var(--mud-palette-text-secondary, #6b7280);
    }

        .lead-source-modal .icon-option:hover {
            border-color: #667eea;
            color: #667eea;
            background: rgba(102, 126, 234, 0.05);
        }

        .lead-source-modal .icon-option.selected {
            border-color: #667eea;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            color: #667eea;
        }

    /* ===== TOGGLE SWITCH ===== */
    .lead-source-modal .toggle-group {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 0;
    }

    .lead-source-modal .toggle-label {
        font-size: 0.9375rem;
        color: var(--mud-palette-text-primary, #374151);
    }

    /* ===== MODAL FOOTER ===== */
    .lead-source-modal .modal-footer {
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--mud-palette-lines-default, #e5e7eb);
        background: var(--mud-palette-surface, #ffffff);
        flex-shrink: 0;
    }

    /* ===== BUTTONS ===== */
    .lead-source-modal .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
        font-weight: 500;
        font-family: inherit;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.15s ease;
        border: none;
    }

    .lead-source-modal .btn-secondary {
        background: var(--mud-palette-surface, #ffffff);
        color: var(--mud-palette-text-primary, #374151);
        border: 1px solid var(--mud-palette-lines-default, #d1d5db);
    }

        .lead-source-modal .btn-secondary:hover {
            background: var(--mud-palette-action-default-hover, #f9fafb);
            border-color: #667eea;
            color: #667eea;
        }

    .lead-source-modal .btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
    }

        .lead-source-modal .btn-primary:hover {
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
            transform: translateY(-1px);
        }

        .lead-source-modal .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

/* ========================================================================
   MudTabs Global Override — clp-tabs visual style
   Applies the custom tab design to all MudTabs components globally.
   Mirrors: .clp-tabs-container, .clp-tabs-header, .clp-tab-btn
   ======================================================================== */

/* Container — matches .clp-tabs-container */
.mud-tabs {
    background: var(--mud-palette-surface);
    border-radius: var(--clp-radius-xl, 16px);
    box-shadow: var(--clp-shadow-card, 0 4px 20px rgba(0, 0, 0, 0.08));
    overflow: hidden;
}

    /* Header — matches .clp-tabs-header */
    .mud-tabs .mud-tabs-header {
        border-bottom: 1px solid var(--mud-palette-lines-default);
        background: var(--mud-palette-background);
        box-shadow: none;
    }

    .mud-tabs .mud-tabs-toolbar {
        padding: 1rem 1rem .5rem .5rem;
        min-height: unset;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .mud-tabs .mud-tabs-toolbar-content {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
    }

    /* Remove MudBlazor default indicator line */
    .mud-tabs .mud-tab-slider {
        display: none !important;
    }

    /* Tab buttons — matches .clp-tab-btn */
    .mud-tabs .mud-tab {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem !important;
        margin: 0 4px;
        height: auto;
        min-height: unset;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: var(--mud-palette-text-secondary);
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        min-width: unset;
        max-width: unset;
        text-transform: none;
        letter-spacing: normal;
        opacity: 1;
    }

        /* Hover — matches .clp-tab-btn:hover */
        .mud-tabs .mud-tab:hover {
            background: var(--mud-palette-action-default-hover);
            color: var(--clp-primary, #5b6ef5);
        }

        /* Active — matches .clp-tab-btn.active */
        .mud-tabs .mud-tab.mud-tab-active {
            background: var(--clp-primary, #5b6ef5);
            color: white !important;
            box-shadow: 0 4px 12px rgba(91, 110, 245, 0.3);
        }

            .mud-tabs .mud-tab.mud-tab-active .mud-ripple {
                color: rgba(255, 255, 255, 0.3);
            }

        /* Icon + text layout inside tab */
        .mud-tabs .mud-tab .mud-tab-icon-text {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-right: 0;
            margin-inline-end: 0;
        }

    /* Panels — matches .clp-tab-content */
    .mud-tabs .mud-tabs-panels {
        padding: 1.5rem;
    }

    /* Scroll buttons */
    .mud-tabs .mud-tabs-scroll-btn {
        color: var(--mud-palette-text-secondary);
    }

    .mud-tabs .mud-tooltip-root.mud-tooltip-inline {
        margin: 0 4px 10px;
    }

li.validation-message {
    font-size: 0.8125rem;
}

.mud-input-control.mud-input-control-margin-normal {
    margin-top: 5px;
}

/* Filled Primary button */
.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.25rem !important;
    text-transform: uppercase !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

    .mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
    }

    .mud-button-filled.mud-button-filled-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Filled Default (Cancel) button */
.mud-button-filled.mud-button-filled-default {
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    color: #475569 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.125rem !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

    .mud-button-filled.mud-button-filled-default:hover:not(:disabled) {
        background: #f8fafc !important;
        border-color: #cbd5e1 !important;
    }

/* ── Global MudButton overrides (ContactManager style) ── */

.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.25rem !important;
    text-transform: uppercase !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

    .mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
    }

    .mud-button-filled.mud-button-filled-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.mud-button-filled.mud-button-filled-default {
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    color: #475569 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.125rem !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

    .mud-button-filled.mud-button-filled-default:hover:not(:disabled) {
        background: #f8fafc !important;
        border-color: #cbd5e1 !important;
    }

.mud-button-filled.mud-button-filled-primary.mud-button-filled-size-small {
    padding: 0.325rem 1.25rem !important;
}

/* ── Tenant Tab Content Layout ── */

.tenant-tab-content {
    padding: 1.5rem 0;
}

/* ── Action Bar (search + buttons, full width) ── */

.tenant-action-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.tenant-search-container {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.tenant-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mud-palette-text-disabled);
    pointer-events: none;
}

.tenant-search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.75rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

    .tenant-search-input:focus {
        outline: none;
        border-color: var(--clp-primary, #5b6ef5);
        box-shadow: 0 0 0 3px rgba(91, 110, 245, 0.1);
    }

    .tenant-search-input::placeholder {
        color: var(--mud-palette-text-disabled);
    }

.tenant-action-buttons {
    display: flex;
    gap: 0.75rem;
}

/* ── Table Card Container ── */

.tenant-table-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    overflow: hidden;
}

/* ── Styled MudTable overrides ── */

.tenant-styled-table .mud-table-toolbar {
    display: none !important;
}

.tenant-styled-table .mud-table-container {
    border: none !important;
}

.tenant-styled-table .mud-table-head .mud-table-row {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0.02) 100%) !important;
}

.tenant-styled-table .mud-table-head th {
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--mud-palette-text-secondary) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 0.875rem 1rem !important;
}

.tenant-styled-table .mud-table-body .mud-table-row {
    transition: all 0.2s ease;
    position: relative;
}

    .tenant-styled-table .mud-table-body .mud-table-row:hover {
        background: rgba(99, 102, 241, 0.04) !important;
    }

.tenant-styled-table .mud-table-body td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem;
}

.tenant-styled-table .mud-table-pagination {
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* ── Multi-Selection Summary (chips area) ── */

.tenant-selection-summary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.tenant-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tenant-selection-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--clp-primary, #6366f1);
}

.tenant-selection-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tenant-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem 0.375rem 0.625rem;
    background: var(--mud-palette-surface);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    transition: all 0.15s ease;
}

    .tenant-chip .mud-icon-root {
        font-size: 0.875rem;
        color: var(--clp-primary, #6366f1);
    }

.tenant-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: var(--mud-palette-text-secondary);
    transition: all 0.15s ease;
    padding: 0;
    margin-left: 0.125rem;
}

    .tenant-chip-remove .mud-icon-root {
        font-size: 0.75rem;
        color: inherit;
    }

    .tenant-chip-remove:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }

/* Selected row text highlight */
.tenant-row-selected-text {
    font-weight: 600;
    color: var(--clp-primary, #6366f1);
}

/* ── Role icon avatar ── */

.tenant-role-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    flex-shrink: 0;
}

    .tenant-role-icon .mud-icon-root {
        font-size: 1rem;
        color: var(--clp-primary, #6366f1);
    }

/* ── Badges ── */

.tenant-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tenant-badge-info {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.tenant-badge-default {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* ── Row action buttons ── */

.tenant-row-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

.tenant-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--mud-palette-text-secondary);
}

    .tenant-action-btn:hover {
        background: rgba(99, 102, 241, 0.1);
        color: #6366f1;
    }

    .tenant-action-btn.delete:hover {
        background: #fef2f2;
        color: #ef4444;
    }

    .tenant-action-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

        .tenant-action-btn:disabled:hover {
            background: transparent;
            color: var(--mud-palette-text-secondary);
        }

/* ── clp-btn (from Design Guidelines) ── */

.clp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    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, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    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);
    }

/* ── Responsive ── */

@media (max-width: 600px) {
    .tenant-action-bar {
        flex-direction: column;
    }

    .tenant-search-container {
        min-width: 100%;
    }

    .tenant-action-buttons {
        width: 100%;
    }

        .tenant-action-buttons .clp-btn {
            flex: 1;
            justify-content: center;
        }

    .tenant-selection-chips {
        max-height: 120px;
        overflow-y: auto;
    }
}


/* =============================================
   GOOGLE FORMS SECTION IN LEAD SOURCE LIST
   ============================================= */

.gf-forms-section {
    padding: 1.25rem;
    background: linear-gradient(to bottom, #F3E5F5 0%, var(--mud-palette-background-grey) 100%);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.gf-forms-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.gf-forms-title-area {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.gf-forms-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(103, 58, 183, 0.15);
}

.gf-forms-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.gf-forms-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.gf-forms-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gf-google-connected-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.gf-connect-google-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f1f1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .gf-connect-google-btn:hover {
        background: #f8f9fa;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

.gf-create-form-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(103, 58, 183, 0.3);
}

    .gf-create-form-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(103, 58, 183, 0.4);
    }

.gf-not-connected-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px dashed #673AB7;
}

.gf-banner-icon {
    width: 48px;
    height: 48px;
    background: rgba(103, 58, 183, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .gf-banner-icon .mud-icon-root {
        color: #673AB7;
    }

.gf-banner-content {
    flex: 1;
}

    .gf-banner-content h4 {
        margin: 0 0 0.25rem;
        font-size: 0.9375rem;
        color: var(--mud-palette-text-primary);
    }

    .gf-banner-content p {
        margin: 0;
        font-size: 0.8125rem;
        color: var(--mud-palette-text-secondary);
        line-height: 1.5;
    }

.gf-banner-btn {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .gf-banner-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(103, 58, 183, 0.4);
    }

.gf-empty-forms {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px dashed var(--mud-palette-lines-default);
    text-align: center;
}

.gf-empty-illustration {
    margin-bottom: 1rem;
}

.gf-empty-forms h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
}

.gf-empty-forms > p {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    max-width: 350px;
}

.gf-create-first-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.3);
}

    .gf-create-first-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(103, 58, 183, 0.4);
    }

.gf-forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gf-form-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
    transition: all 0.2s ease;
}

    .gf-form-card:hover {
        border-color: #673AB7;
        box-shadow: 0 4px 20px rgba(103, 58, 183, 0.15);
    }

.gf-form-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
}

.gf-form-icon-badge {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gf-form-card-menu {
    color: white;
}

    .gf-form-card-menu .mud-icon-root {
        color: white !important;
    }

.gf-form-card-body {
    padding: 1rem;
}

.gf-form-title {
    margin: 0 0 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.gf-form-description {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

.gf-form-campaign-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.gf-form-card-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.gf-form-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

    .gf-form-stat .mud-icon-root {
        font-size: 0.875rem;
    }

.gf-form-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.gf-form-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
}

.gf-form-quick-actions {
    display: flex;
    gap: 0.25rem;
}

.gf-quick-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .gf-quick-action-btn:hover {
        background: var(--mud-palette-lines-default);
        color: var(--mud-palette-text-primary);
    }

    .gf-quick-action-btn.primary {
        background: rgba(103, 58, 183, 0.1);
        color: #673AB7;
    }

        .gf-quick-action-btn.primary:hover {
            background: rgba(103, 58, 183, 0.2);
        }

.gf-add-form-card {
    border: 2px dashed var(--mud-palette-lines-default);
    background: transparent;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .gf-add-form-card:hover {
        border-color: #673AB7;
        background: rgba(103, 58, 183, 0.05);
    }

.gf-add-form-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--mud-palette-text-secondary);
}

.gf-add-form-icon {
    width: 48px;
    height: 48px;
    background: var(--mud-palette-background-grey);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gf-add-form-card:hover .gf-add-form-icon {
    background: rgba(103, 58, 183, 0.1);
}

    .gf-add-form-card:hover .gf-add-form-icon .mud-icon-root {
        color: #673AB7;
    }

/* Dialog Updates */
.gf-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.gf-footer-left,
.gf-footer-right {
    display: flex;
    gap: 0.75rem;
}

.gf-info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(103, 58, 183, 0.05);
    border-radius: 10px;
    border-left: 3px solid #673AB7;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

    .gf-info-card .mud-icon-root {
        color: #673AB7;
        flex-shrink: 0;
    }

.gf-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gf-form-group.full-width {
    width: 100%;
}

.gf-form-group label .required {
    color: #ef4444;
}

.gf-form-group label .optional {
    color: var(--mud-palette-text-disabled);
    font-weight: 400;
    font-size: 0.8125rem;
}

.gf-form-group input.error,
.gf-form-group textarea.error {
    border-color: #ef4444;
}

.gf-error-msg {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.gf-campaign-selector select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    font-size: 0.9375rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.gf-no-campaigns-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--mud-palette-background-grey);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.gf-selected-campaign-info {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.gf-campaign-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d97706;
}

.gf-selected-campaign-info p {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Questions Builder */
.gf-questions-builder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gf-questions-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-background-grey);
    border-radius: 10px;
}

.gf-questions-count {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.gf-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gf-no-questions {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    border: 1px dashed var(--mud-palette-lines-default);
    text-align: center;
}

    .gf-no-questions h4 {
        margin: 1rem 0 0.5rem;
        font-size: 1rem;
        color: var(--mud-palette-text-primary);
    }

    .gf-no-questions > p {
        margin: 0 0 1.25rem;
        font-size: 0.875rem;
        color: var(--mud-palette-text-secondary);
    }

.gf-quick-start-btns {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.gf-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

    .gf-quick-btn:hover {
        border-color: #673AB7;
        color: #673AB7;
        background: rgba(103, 58, 183, 0.05);
    }

.gf-use-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid #673AB7;
    color: #673AB7;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .gf-use-template-btn:hover {
        background: rgba(103, 58, 183, 0.1);
    }

.gf-questions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gf-question-card {
    display: flex;
    gap: 0.5rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .gf-question-card:hover {
        border-color: #673AB7;
    }

    .gf-question-card.selected {
        border-color: #673AB7;
        box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.1);
    }

.gf-question-drag-handle {
    display: flex;
    align-items: flex-start;
    padding-top: 0.25rem;
    color: var(--mud-palette-text-disabled);
    cursor: grab;
}

.gf-question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gf-question-type-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(103, 58, 183, 0.1);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #673AB7;
    text-transform: uppercase;
    width: fit-content;
}

.gf-question-title-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .gf-question-title-input input {
        flex: 1;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 2px solid var(--mud-palette-lines-default);
        font-size: 1rem;
        font-weight: 500;
        background: transparent;
        color: var(--mud-palette-text-primary);
        transition: border-color 0.2s ease;
    }

        .gf-question-title-input input:focus {
            outline: none;
            border-color: #673AB7;
        }

.gf-required-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.gf-options-editor {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 0.5rem;
}

.gf-option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gf-option-bullet {
    width: 24px;
    color: var(--mud-palette-text-disabled);
    display: flex;
    justify-content: center;
}

.gf-option-item input {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.875rem;
    background: transparent;
    color: var(--mud-palette-text-primary);
    transition: all 0.2s ease;
}

    .gf-option-item input:hover,
    .gf-option-item input:focus {
        border-color: var(--mud-palette-lines-default);
        background: var(--mud-palette-surface);
    }

.gf-remove-option-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-disabled);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.gf-option-item:hover .gf-remove-option-btn {
    opacity: 1;
}

.gf-remove-option-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.gf-remove-option-btn:disabled {
    cursor: not-allowed;
}

.gf-add-option-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    background: transparent;
    border: none;
    color: #673AB7;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    width: fit-content;
    margin-left: 1.5rem;
}

    .gf-add-option-link:hover {
        background: rgba(103, 58, 183, 0.1);
    }

.gf-scale-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gf-scale-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gf-scale-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    min-width: 60px;
}

    .gf-scale-label:last-child {
        text-align: right;
    }

.gf-scale-dots {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.gf-scale-dot {
    width: 28px;
    height: 28px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.gf-edit-scale-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    background: transparent;
    border: none;
    color: #673AB7;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    width: fit-content;
}

    .gf-edit-scale-btn:hover {
        background: rgba(103, 58, 183, 0.1);
    }

.gf-question-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    padding-left: 1rem;
    border-left: 1px solid var(--mud-palette-lines-default);
}

.gf-required-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
}

    .gf-required-toggle input {
        accent-color: #673AB7;
    }

.gf-question-btns {
    display: flex;
    gap: 0.25rem;
}

.gf-q-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .gf-q-btn:hover {
        background: var(--mud-palette-background-grey);
    }

    .gf-q-btn.danger:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }

/* Preview Step */
.gf-preview-step {
    max-width: 600px;
    margin: 0 auto;
}

.gf-creating-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

    .gf-creating-state h3 {
        margin: 1.5rem 0 0.5rem;
        font-size: 1.25rem;
    }

    .gf-creating-state p {
        margin: 0;
        color: var(--mud-palette-text-secondary);
    }

.gf-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.gf-success-animation {
    margin-bottom: 1.5rem;
}

.gf-checkmark-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gfPop 0.5s ease;
}

@keyframes gfPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.gf-checkmark-circle .mud-icon-root {
    color: white;
    font-size: 2.5rem;
}

.gf-success-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.gf-success-state > p {
    margin: 0 0 1.5rem;
    color: var(--mud-palette-text-secondary);
}

.gf-form-url-card {
    width: 100%;
    max-width: 450px;
    margin-bottom: 1.5rem;
}

    .gf-form-url-card label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.8125rem;
        color: var(--mud-palette-text-secondary);
        text-align: left;
    }

.gf-url-copy-box {
    display: flex;
    gap: 0.5rem;
}

    .gf-url-copy-box input {
        flex: 1;
        padding: 0.75rem 1rem;
        border: 1px solid var(--mud-palette-lines-default);
        border-radius: 10px;
        font-size: 0.875rem;
        background: var(--mud-palette-background-grey);
        color: var(--mud-palette-text-primary);
    }

.gf-copy-url-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

    .gf-copy-url-btn:hover {
        border-color: #673AB7;
        color: #673AB7;
    }

.gf-success-actions {
    display: flex;
    gap: 1rem;
}

.gf-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gf-preview-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

    .gf-preview-header h3 {
        margin: 0 0 0.5rem;
        font-size: 1.25rem;
    }

    .gf-preview-header p {
        margin: 0;
        color: var(--mud-palette-text-secondary);
    }

.gf-preview-form-card {
    width: 100%;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.gf-preview-form-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
}

    .gf-preview-form-header h4 {
        margin: 0 0 0.25rem;
        font-size: 1.125rem;
    }

    .gf-preview-form-header p {
        margin: 0;
        font-size: 0.875rem;
        opacity: 0.9;
    }

.gf-preview-campaign {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    font-size: 0.875rem;
    color: #d97706;
}

.gf-preview-questions {
    padding: 1rem 1.25rem;
}

.gf-preview-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .gf-preview-question:last-child {
        border-bottom: none;
    }

.gf-preview-q-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .gf-preview-q-header .mud-icon-root {
        color: #673AB7;
        font-size: 1rem;
    }

.gf-preview-q-title {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary);
}

.gf-preview-q-type {
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
}

.gf-preview-summary {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--mud-palette-background-grey);
}

.gf-summary-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.gf-create-form-final-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(103, 58, 183, 0.3);
}

    .gf-create-form-final-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(103, 58, 183, 0.4);
    }

    .gf-create-form-final-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Scale Dialog */
.gf-scale-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.gf-scale-dialog {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.gf-scale-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .gf-scale-dialog-header h4 {
        margin: 0;
        font-size: 1rem;
    }

.gf-scale-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .gf-scale-close:hover {
        background: var(--mud-palette-background-grey);
    }

.gf-scale-dialog-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gf-scale-row {
    display: flex;
    gap: 1rem;
}

.gf-scale-field {
    flex: 1;
}

    .gf-scale-field label {
        display: block;
        margin-bottom: 0.375rem;
        font-size: 0.8125rem;
        color: var(--mud-palette-text-secondary);
    }

    .gf-scale-field select,
    .gf-scale-field input {
        width: 100%;
        padding: 0.625rem 0.75rem;
        border: 1px solid var(--mud-palette-lines-default);
        border-radius: 8px;
        font-size: 0.875rem;
        background: var(--mud-palette-surface);
        color: var(--mud-palette-text-primary);
    }

.gf-scale-dialog-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    display: flex;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 600px) {
    .gf-forms-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gf-forms-grid {
        grid-template-columns: 1fr;
    }

    .gf-not-connected-banner {
        flex-direction: column;
        text-align: center;
    }

    .gf-question-card {
        flex-direction: column;
    }

    .gf-question-actions {
        flex-direction: row;
        justify-content: space-between;
        padding-left: 0;
        padding-top: 0.75rem;
        border-left: none;
        border-top: 1px solid var(--mud-palette-lines-default);
    }

    .gf-scale-row {
        flex-direction: column;
    }
}

/* =============================================
   GOOGLE FORMS CONFIG DIALOG - GF STYLES
   ============================================= */

.gf-config-dialog {
    border-radius: 16px !important;
    overflow: hidden;
}

    .gf-config-dialog .mud-dialog-content {
        padding: 0 !important;
    }

.gf-modal {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    background: var(--mud-palette-surface);
}

.gf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
}

.gf-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gf-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gf-header-text h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.gf-header-text p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

.gf-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .gf-close-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

.gf-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.gf-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.gf-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gf-step.active .gf-step-number {
    background: #673AB7;
    color: white;
}

.gf-step.completed .gf-step-number {
    background: #10b981;
    color: white;
}

.gf-step-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

.gf-step.active .gf-step-label {
    color: #673AB7;
    font-weight: 600;
}

.gf-step-line {
    width: 60px;
    height: 2px;
    background: var(--mud-palette-lines-default);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
    transition: background 0.3s ease;
}

    .gf-step-line.active {
        background: #10b981;
    }

.gf-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 350px;
}

.gf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--mud-palette-text-secondary);
}

.gf-step-content {
    animation: gfFadeIn 0.3s ease;
}

@keyframes gfFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gf-connect-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gf-connected-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.gf-connected-icon {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gf-connected-status h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.gf-connected-status p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.gf-not-connected {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
}

.gf-google-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gf-not-connected h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.gf-not-connected > p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
    max-width: 400px;
    line-height: 1.5;
}

.gf-permissions-info {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: left;
    width: 100%;
    max-width: 400px;
}

    .gf-permissions-info h4 {
        margin: 0 0 0.75rem;
        font-size: 0.875rem;
        color: var(--mud-palette-text-primary);
    }

    .gf-permissions-info ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .gf-permissions-info li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.875rem;
        color: var(--mud-palette-text-secondary);
    }

        .gf-permissions-info li .mud-icon-root {
            color: #673AB7;
        }

.gf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.gf-btn-primary {
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    color: white;
}

    .gf-btn-primary:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(103, 58, 183, 0.4);
    }

    .gf-btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.gf-btn-secondary {
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
}

    .gf-btn-secondary:hover {
        background: var(--mud-palette-lines-default);
    }

.gf-btn-ghost {
    background: transparent;
    color: var(--mud-palette-text-secondary);
}

    .gf-btn-ghost:hover {
        background: var(--mud-palette-background-grey);
        color: var(--mud-palette-text-primary);
    }

.gf-btn-outline {
    background: transparent;
    color: #673AB7;
    border: 1px solid #673AB7;
}

    .gf-btn-outline:hover {
        background: rgba(103, 58, 183, 0.1);
    }

.gf-btn-google {
    background: white;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    padding: 0.875rem 1.5rem;
}

    .gf-btn-google:hover {
        background: #f8f9fa;
        border-color: #d2e3fc;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

.gf-btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.gf-form-section {
    max-width: 500px;
    margin: 0 auto;
}

    .gf-form-section h3 {
        margin: 0 0 0.5rem;
        font-size: 1.125rem;
        color: var(--mud-palette-text-primary);
    }

    .gf-form-section > p {
        margin: 0 0 1.5rem;
        color: var(--mud-palette-text-secondary);
    }

.gf-form-group {
    margin-bottom: 1.25rem;
}

    .gf-form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--mud-palette-text-primary);
    }

    .gf-form-group input[type="text"],
    .gf-form-group input[type="number"],
    .gf-form-group textarea,
    .gf-form-group select {
        width: 100%;
        padding: 0.75rem 1rem;
        border: 1px solid var(--mud-palette-lines-default);
        border-radius: 10px;
        font-size: 0.9375rem;
        background: var(--mud-palette-surface);
        color: var(--mud-palette-text-primary);
        transition: all 0.2s ease;
    }

        .gf-form-group input:focus,
        .gf-form-group textarea:focus,
        .gf-form-group select:focus {
            outline: none;
            border-color: #673AB7;
            box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.1);
        }

    .gf-form-group textarea {
        resize: vertical;
        min-height: 80px;
    }

.gf-form-row {
    display: flex;
    gap: 1rem;
}

    .gf-form-row .gf-form-group {
        flex: 1;
    }

        .gf-form-row .gf-form-group.flex-2 {
            flex: 2;
        }

.gf-questions-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gf-questions-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

    .gf-questions-header h3 {
        margin: 0;
        font-size: 1.125rem;
    }

    .gf-questions-header p {
        margin: 0.25rem 0 0;
        font-size: 0.875rem;
        color: var(--mud-palette-text-secondary);
    }

.gf-no-questions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    border: 1px dashed var(--mud-palette-lines-default);
    gap: 0.75rem;
}

    .gf-no-questions .mud-icon-root {
        color: var(--mud-palette-text-disabled);
    }

    .gf-no-questions span {
        color: var(--mud-palette-text-secondary);
    }

.gf-questions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gf-question-card {
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
}

.gf-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.gf-question-number {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #673AB7;
    background: rgba(103, 58, 183, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.gf-question-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.gf-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .gf-icon-btn:hover:not(:disabled) {
        background: var(--mud-palette-lines-default);
        color: var(--mud-palette-text-primary);
    }

    .gf-icon-btn.danger:hover:not(:disabled) {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }

    .gf-icon-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .gf-icon-btn.small {
        width: 28px;
        height: 28px;
    }

.gf-question-body {
    padding: 1rem;
}

.gf-options-section {
    margin-top: 1rem;
}

    .gf-options-section > label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--mud-palette-text-secondary);
    }

.gf-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gf-option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gf-option-indicator {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-disabled);
    font-size: 0.875rem;
}

.gf-option-row input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

    .gf-option-row input:focus {
        outline: none;
        border-color: #673AB7;
    }

.gf-add-option-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: #673AB7;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

    .gf-add-option-btn:hover {
        background: rgba(103, 58, 183, 0.1);
    }

.gf-scale-section {
    margin-top: 1rem;
}

.gf-question-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.gf-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

    .gf-toggle input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #673AB7;
    }

.gf-finish-section {
    max-width: 500px;
    margin: 0 auto;
}

.gf-creating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    text-align: center;
}

    .gf-creating h3 {
        margin: 0;
        color: var(--mud-palette-text-primary);
    }

    .gf-creating p {
        margin: 0;
        color: var(--mud-palette-text-secondary);
    }

.gf-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.gf-success-icon {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .gf-success-icon .mud-icon-root {
        font-size: 2.5rem;
        color: #10b981;
    }

.gf-success h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.gf-success > p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
}

.gf-form-url-box {
    width: 100%;
    margin: 1rem 0;
}

    .gf-form-url-box label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--mud-palette-text-secondary);
        text-align: left;
    }

.gf-url-input-group {
    display: flex;
    gap: 0.5rem;
}

    .gf-url-input-group input {
        flex: 1;
        padding: 0.75rem 1rem;
        border: 1px solid var(--mud-palette-lines-default);
        border-radius: 10px;
        font-size: 0.875rem;
        background: var(--mud-palette-background-grey);
        color: var(--mud-palette-text-primary);
    }

.gf-copy-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .gf-copy-btn:hover {
        background: var(--mud-palette-background-grey);
        color: #673AB7;
        border-color: #673AB7;
    }

.gf-action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.gf-review {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

    .gf-review h3 {
        margin: 0;
        font-size: 1.25rem;
        color: var(--mud-palette-text-primary);
    }

    .gf-review > p {
        margin: 0;
        color: var(--mud-palette-text-secondary);
    }

.gf-review-card {
    width: 100%;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    padding: 1rem;
}

.gf-review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .gf-review-item:last-child {
        border-bottom: none;
    }

.gf-review-label {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.gf-review-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.gf-questions-preview {
    width: 100%;
    text-align: left;
}

    .gf-questions-preview h4 {
        margin: 0 0 0.75rem;
        font-size: 0.9375rem;
        color: var(--mud-palette-text-primary);
    }

.gf-preview-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.gf-preview-type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(103, 58, 183, 0.1);
    color: #673AB7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.gf-preview-title {
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.gf-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-background-grey);
    border-top: 1px solid var(--mud-palette-lines-default);
}

@media (max-width: 600px) {
    .gf-steps-indicator {
        padding: 1rem;
    }

    .gf-step-line {
        width: 30px;
    }

    .gf-step-label {
        display: none;
    }

    .gf-form-row {
        flex-direction: column;
    }

    .gf-action-buttons {
        flex-direction: column;
    }
}

/* ============================================================
   Pipeline Styled Table (Prompts, Borrowers, etc.)
   ============================================================ */

.pipeline-styled-table .mud-table-toolbar {
    display: none;
}

.pipeline-styled-table.mud-table {
    border: none !important;
    box-shadow: none !important;
}

.pipeline-styled-table .mud-table-head .mud-table-row {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0.02) 100%) !important;
}

.pipeline-styled-table .mud-table-head .mud-table-cell {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.pipeline-styled-table .mud-table-body .mud-table-row {
    transition: all 0.2s ease;
}

.pipeline-styled-table .mud-table-body .mud-table-row:hover {
    background: rgba(99, 102, 241, 0.04) !important;
}

.pipeline-styled-table .mud-table-body .mud-table-cell:first-child {
    position: relative;
}

.pipeline-styled-table .mud-table-body .mud-table-cell:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.pipeline-styled-table .mud-table-body .mud-table-row:hover .mud-table-cell:first-child::before {
    transform: scaleY(1);
}

.pipeline-styled-table .mud-table-body .mud-table-cell {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}

.pipeline-styled-table .mud-table-pagination {
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* Prompt Manager — cell helpers */

.prompt-name-cell {
    font-weight: 600;
}

.prompt-system-text {
    display: block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.prompt-updated-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-updated-by-avatar {
    width: 28px !important;
    height: 28px !important;
    border: 2px solid var(--mud-palette-lines-default);
}

.prompt-updated-by-name {
    font-weight: 500;
}

.prompt-updated-at {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

/* Organization Contact Badge */
.crm-org-badge {
    background: var(--clp-primary, #5b6ef5);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    display: inline-block;
    line-height: 1.4;
}

/* =============================================
   REASSIGN LOANS - Transfer Panel
   Prefix: reassign-
   Used by: ReassignLoans.razor
   ============================================= */

/* LO Selectors Row */
.reassign-selectors {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: var(--spacing-lg, 16px);
}

.reassign-selector-card {
    flex: 1;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--clp-radius-xl, 16px);
    padding: 16px 20px;
}

.reassign-selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 10px;
}

.reassign-selector-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--mud-palette-text-disabled);
}

/* Transfer Tables Area */
.reassign-transfer-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: var(--spacing-lg, 16px);
}

.reassign-panel {
    flex: 1;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--clp-radius-xl, 16px);
    overflow: hidden;
}

.reassign-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background);
}

.reassign-panel-header-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* Empty state */
.reassign-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 3rem 2rem;
}

.reassign-empty-state--drop {
    border-top: 2px dashed var(--mud-palette-lines-default);
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(0,0,0,0.008) 8px,
        rgba(0,0,0,0.008) 16px
    );
}

/* Transfer Controls */
.reassign-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 60px;
    flex-shrink: 0;
}

.reassign-control-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
}

/* Action Footer */
.reassign-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: var(--spacing-lg, 16px);
    padding: 16px 20px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--clp-radius-xl, 16px);
}

.reassign-footer-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* Responsive */
@media (max-width: 960px) {
    .reassign-selectors {
        flex-direction: column;
    }

    .reassign-selector-arrow {
        transform: rotate(90deg);
    }

    .reassign-transfer-container {
        flex-direction: column;
    }

    .reassign-controls {
        flex-direction: row;
        padding-top: 0;
        padding: 8px 0;
    }

    .reassign-controls .reassign-control-btn .mud-icon-root {
        transform: rotate(90deg);
    }
}

/* Fixed permission lock icon (from roles/services) */
.fixed-permission-item .mud-treeview-item-icon .mud-icon-root {
    font-size: 0.875rem;
}
}

.button-shared-class {
    border-radius: 10px;
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0;
}

.read-only {
    pointer-events: none;
    opacity: 0.6;
}

/* =============================================
   PIPELINE STAGE DIALOGS - Color & Icon Pickers
   Prefix: crm-dlg-
   Used by: AddLeadStatusDialog, AddOpportunityStageDialog
   ============================================= */

/* Picker Label */
.crm-dlg-picker-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

/* Color Picker */
.crm-dlg-color-picker {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crm-dlg-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

    .crm-dlg-color-swatch:hover {
        transform: scale(1.1);
    }

    .crm-dlg-color-swatch.selected {
        border-color: var(--mud-palette-text-primary, #1f2937);
        box-shadow: 0 0 0 2px white, 0 0 0 4px var(--mud-palette-primary, #6366f1);
    }

/* Color Preview */
.crm-dlg-color-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.crm-dlg-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.crm-dlg-color-name {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary, #6b7280);
    font-weight: 500;
}

/* Icon Picker */
.crm-dlg-icon-picker {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crm-dlg-icon-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    background: transparent;
    color: var(--mud-palette-text-secondary, #6b7280);
}

    .crm-dlg-icon-option:hover {
        border-color: #667eea;
        color: #667eea;
        background: rgba(102, 126, 234, 0.05);
    }

    .crm-dlg-icon-option.selected {
        border-color: #667eea;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        color: #667eea;
        box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.3);
    }

/* =============================================
   CONTACT BRIEFING DRAWER
   Prefix: crm-briefing-
   Used by: ContactBriefingDrawer.razor
   ============================================= */

/* Wrapper that groups category badge + briefing trigger inline on the profile info block */
.cv-profile-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* ------------------------------------------------------------
   Briefing trigger — compact pill, gradient border, soft glow.
   ------------------------------------------------------------ */
.crm-briefing-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem 0.35rem 0.4rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #a855f7 100%);
    background-origin: border-box;
    background-clip: padding-box;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 6px 16px -6px rgba(99, 102, 241, 0.5),
        0 2px 4px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

    /* Animated shimmer sweep on hover — purely decorative */
    .crm-briefing-trigger::before {
        content: "";
        position: absolute;
        top: 0;
        left: -75%;
        width: 60%;
        height: 100%;
        background: linear-gradient(
            120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.25) 50%,
            transparent 100%);
        transform: skewX(-20deg);
        transition: left 0.55s ease;
        z-index: 0;
    }

    .crm-briefing-trigger:hover {
        transform: translateY(-1px);
        filter: saturate(1.05);
        box-shadow:
            0 10px 22px -6px rgba(99, 102, 241, 0.55),
            0 3px 6px rgba(15, 23, 42, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

        .crm-briefing-trigger:hover::before {
            left: 125%;
        }

    .crm-briefing-trigger:active {
        transform: translateY(0);
        filter: saturate(0.95);
    }

    .crm-briefing-trigger:focus-visible {
        outline: none;
        box-shadow:
            0 0 0 3px rgba(255, 255, 255, 0.8),
            0 0 0 5px rgba(99, 102, 241, 0.55),
            0 8px 20px -6px rgba(99, 102, 241, 0.55);
    }

/* Icon badge inside the pill */
.crm-briefing-trigger-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

    .crm-briefing-trigger-icon .mud-icon-root {
        color: #fff;
        font-size: 0.95rem;
    }

/* Label + keyboard shortcut chip */
.crm-briefing-trigger-label {
    position: relative;
    z-index: 1;
}

.crm-briefing-trigger-kbd {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.4rem;
    margin-left: 0.15rem;
    font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
    .crm-briefing-trigger-kbd {
        display: none;
    }
}

/* Drawer container */
.crm-briefing-drawer {
    background: #f8fafc;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.1);
}

.crm-briefing-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: inherit;
}

/* --- HERO --- */
.crm-briefing-hero {
    position: relative;
    padding: 1.5rem 1.25rem 1.35rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.crm-briefing-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
    pointer-events: none;
    animation: crm-briefing-float 8s ease-in-out infinite;
}

.crm-briefing-hero-orb-1 {
    width: 180px;
    height: 180px;
    top: -40px;
    right: -40px;
    background: #f0abfc;
}

.crm-briefing-hero-orb-2 {
    width: 140px;
    height: 140px;
    bottom: -50px;
    left: -30px;
    background: #60a5fa;
    animation-delay: 2s;
}

@keyframes crm-briefing-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -14px); }
}

.crm-briefing-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    backdrop-filter: blur(8px);
    z-index: 2;
    transition: background 0.15s ease;
}

    .crm-briefing-close:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .crm-briefing-close .mud-icon-root {
        color: #fff;
    }

.crm-briefing-hero-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.crm-briefing-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.crm-briefing-hero-info {
    flex: 1;
    min-width: 0;
}

.crm-briefing-hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

    .crm-briefing-hero-tagline .mud-icon-root {
        color: #fff;
        font-size: 0.9rem;
    }

.crm-briefing-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    line-height: 1.2;
}

.crm-briefing-nickname {
    font-weight: 400;
    opacity: 0.8;
    font-size: 0.95rem;
}

.crm-briefing-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    font-size: 0.78rem;
    margin-bottom: 0.55rem;
}

    .crm-briefing-hero-meta span {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        opacity: 0.92;
    }

        .crm-briefing-hero-meta .mud-icon-root {
            color: #fff;
            font-size: 0.95rem;
        }

.crm-briefing-hero-contact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
}

    .crm-briefing-hero-contact div {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        opacity: 0.95;
    }

        .crm-briefing-hero-contact .mud-icon-root {
            color: #fff;
            font-size: 0.95rem;
        }

/* --- BODY / SECTIONS --- */
.crm-briefing-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.crm-briefing-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    padding: 0.9rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.crm-briefing-section-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.7rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

    .crm-briefing-section-header .mud-icon-root {
        color: #6366f1;
        font-size: 1rem;
    }

    .crm-briefing-section-header span {
        flex: 1;
    }

.crm-briefing-section-more {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6366f1;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
}

    .crm-briefing-section-more:hover {
        text-decoration: underline;
    }

/* Signals */
.crm-briefing-signals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
}

.crm-briefing-signal {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    font-size: 0.82rem;
    border: 1px solid transparent;
}

    .crm-briefing-signal strong {
        display: block;
        font-weight: 600;
        color: var(--mud-palette-text-primary, #0f172a);
        line-height: 1.25;
    }

    .crm-briefing-signal span {
        display: block;
        font-size: 0.72rem;
        color: var(--mud-palette-text-secondary, #64748b);
        margin-top: 0.1rem;
    }

    .crm-briefing-signal .mud-icon-root {
        flex-shrink: 0;
    }

.crm-briefing-signal-warn {
    background: color-mix(in srgb, var(--mud-palette-warning, #f59e0b) 10%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-warning, #f59e0b) 30%, transparent);
}

    .crm-briefing-signal-warn .mud-icon-root {
        color: var(--mud-palette-warning, #f59e0b);
    }

.crm-briefing-signal-info {
    background: color-mix(in srgb, var(--mud-palette-info, #3b82f6) 8%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-info, #3b82f6) 25%, transparent);
}

    .crm-briefing-signal-info .mud-icon-root {
        color: var(--mud-palette-info, #3b82f6);
    }

.crm-briefing-signal-success {
    background: color-mix(in srgb, var(--mud-palette-success, #10b981) 10%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-success, #10b981) 28%, transparent);
}

    .crm-briefing-signal-success .mud-icon-root {
        color: var(--mud-palette-success, #10b981);
    }

/* Lists (household) */
.crm-briefing-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

    .crm-briefing-list li {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        font-size: 0.84rem;
        color: var(--mud-palette-text-primary, #0f172a);
        padding: 0.15rem 0;
    }

        .crm-briefing-list li strong {
            font-weight: 600;
        }

        .crm-briefing-list li .mud-icon-root {
            color: #6366f1;
            font-size: 1rem;
            flex-shrink: 0;
        }

/* Key/value rows */
.crm-briefing-pipeline {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.crm-briefing-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.84rem;
    color: var(--mud-palette-text-primary, #0f172a);
}

.crm-briefing-row-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-secondary, #64748b);
    min-width: 90px;
}

.crm-briefing-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.06);
    color: var(--mud-palette-text-primary, #0f172a);
}

.crm-briefing-chip-primary {
    background: color-mix(in srgb, #6366f1 14%, transparent);
    color: #4f46e5;
}

.crm-briefing-chip-warn {
    background: color-mix(in srgb, var(--mud-palette-warning, #f59e0b) 18%, transparent);
    color: #b45309;
}

.crm-briefing-chip-info {
    background: color-mix(in srgb, var(--mud-palette-info, #3b82f6) 15%, transparent);
    color: #1d4ed8;
}

.crm-briefing-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Notes */
.crm-briefing-notes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

    .crm-briefing-notes li {
        padding: 0.55rem 0.7rem;
        border-left: 3px solid #c7d2fe;
        background: #f8fafc;
        border-radius: 0 8px 8px 0;
    }

.crm-briefing-note-date {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crm-briefing-notes p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--mud-palette-text-primary, #0f172a);
}

/* Footer action bar */
.crm-briefing-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    padding: 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    flex-shrink: 0;
}

.crm-briefing-action-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--mud-palette-text-primary, #0f172a);
    border: 1px solid rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}

    .crm-briefing-action-btn:hover {
        transform: translateY(-1px);
        background: #e0e7ff;
    }

    .crm-briefing-action-btn .mud-icon-root {
        color: #4f46e5;
        font-size: 1.1rem;
    }

.crm-briefing-action-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
}

    .crm-briefing-action-primary:hover {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    }

    .crm-briefing-action-primary .mud-icon-root {
        color: #fff;
    }

/* =============================================
   FAMILY TAB — uniform action buttons and muted historical marriages
   Prefix: ft-action-*, ft-former-*, ft-marriage-*-former
   Used by: FamilyMembersSection.razor
   ============================================= */

/* Uniform action buttons (replaces MudIconButton mismatched sizes) */
.ft-action-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto; /* Push the action group to the right edge of its flex container. */
}

.ft-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mud-palette-primary, #6366f1) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary, #6366f1) 20%, transparent);
    color: var(--mud-palette-primary, #6366f1);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

    .ft-action-btn .mud-icon-root {
        font-size: 1.05rem;
        color: inherit;
    }

    .ft-action-btn:hover:not(:disabled) {
        background: color-mix(in srgb, var(--mud-palette-primary, #6366f1) 16%, transparent);
        border-color: color-mix(in srgb, var(--mud-palette-primary, #6366f1) 35%, transparent);
        transform: translateY(-1px);
    }

    .ft-action-btn:disabled {
        cursor: not-allowed;
        opacity: 0.4;
        background: transparent;
        border-color: rgba(15, 23, 42, 0.08);
        color: var(--mud-palette-text-secondary, #94a3b8);
    }

.ft-action-btn-edit {
    background: color-mix(in srgb, var(--mud-palette-info, #3b82f6) 8%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-info, #3b82f6) 22%, transparent);
    color: var(--mud-palette-info, #3b82f6);
}

    .ft-action-btn-edit:hover:not(:disabled) {
        background: color-mix(in srgb, var(--mud-palette-info, #3b82f6) 16%, transparent);
        border-color: color-mix(in srgb, var(--mud-palette-info, #3b82f6) 40%, transparent);
    }

.ft-action-btn-danger {
    background: color-mix(in srgb, var(--mud-palette-error, #ef4444) 8%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-error, #ef4444) 22%, transparent);
    color: var(--mud-palette-error, #ef4444);
}

    .ft-action-btn-danger:hover:not(:disabled) {
        background: color-mix(in srgb, var(--mud-palette-error, #ef4444) 16%, transparent);
        border-color: color-mix(in srgb, var(--mud-palette-error, #ef4444) 42%, transparent);
    }

/* --- Historical marriages separator --- */
.ft-former-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.75rem 0 0.25rem;
    padding: 0 0.25rem;
}

.ft-former-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        color-mix(in srgb, var(--mud-palette-text-secondary, #94a3b8) 30%, transparent),
        transparent);
}

.ft-former-header-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary, #64748b);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mud-palette-text-secondary, #94a3b8) 10%, transparent);
}

    .ft-former-header-label .mud-icon-root {
        font-size: 0.85rem;
        color: inherit;
    }

/* --- Muted former-marriage card style --- */
.ft-marriage-card-former {
    background: linear-gradient(135deg,
        rgba(148, 163, 184, 0.04) 0%,
        rgba(148, 163, 184, 0.08) 100%);
    border: 1px dashed rgba(148, 163, 184, 0.35) !important;
    opacity: 0.82;
    filter: grayscale(0.3);
    box-shadow: none;
}

    .ft-marriage-card-former:hover {
        opacity: 0.92;
        filter: grayscale(0.15);
    }

.ft-marriage-card-accent-former {
    background: linear-gradient(to bottom,
        rgba(148, 163, 184, 0.5),
        rgba(148, 163, 184, 0.2)) !important;
}

.ft-marriage-partner-avatar-former {
    opacity: 0.7;
    filter: grayscale(0.4);
}

.ft-marriage-connector-line-former {
    background: rgba(148, 163, 184, 0.4) !important;
}

.ft-marriage-connector-heart-former {
    background: color-mix(in srgb, var(--mud-palette-text-secondary, #94a3b8) 25%, #fff) !important;
    color: var(--mud-palette-text-secondary, #64748b) !important;
    border: 1px solid rgba(148, 163, 184, 0.4) !important;
    box-shadow: none !important;
}

    .ft-marriage-connector-heart-former .mud-icon-root {
        color: var(--mud-palette-text-secondary, #64748b);
    }

.ft-marriage-status-former {
    background: color-mix(in srgb, var(--mud-palette-text-secondary, #94a3b8) 14%, transparent) !important;
    color: var(--mud-palette-text-secondary, #64748b) !important;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

    .ft-marriage-status-former .mud-icon-root {
        color: inherit;
    }

.ft-marriage-date-info-former {
    color: var(--mud-palette-text-secondary, #94a3b8) !important;
    font-style: italic;
}

/* =============================================
   HOUSEHOLD CATEGORY BADGE — premium pastel + gradient ring
   ============================================= */
.cv-profile-badge.household {
    position: relative;
    background: linear-gradient(135deg, #ede9fe 0%, #e0f2fe 100%);
    color: #5b21b6;
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow:
        0 4px 10px -3px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    padding-left: 1.5rem;
}

    .cv-profile-badge.household::before {
        content: "";
        position: absolute;
        left: 0.55rem;
        top: 50%;
        transform: translateY(-50%);
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: linear-gradient(135deg, #8b5cf6, #6366f1);
        box-shadow:
            0 0 0 2px rgba(139, 92, 246, 0.2),
            0 0 8px rgba(139, 92, 246, 0.5);
    }

/* =============================================================
   CRM ADDRESS MANAGER — AddressShared + PropertyForm wrapper
   Prefix: crm-addr-*
   Used in: Pages/ContactManager/Shared/AddressManager/AddressShared.razor
            Pages/ContactManager/Dialog/Contacts/Contact/AddContact/PropertyForm.razor
   ============================================================= */

/* ---------- PropertyForm section wrapper ---------- */
.crm-addr-section {
    margin-top: var(--spacing-md, 12px);
}

.crm-addr-section-body {
    padding: var(--spacing-md, 12px) var(--spacing-lg, 16px) var(--spacing-lg, 16px);
}

/* ---------- Stepper (Search → Confirm) ---------- */
.crm-addr-stepper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-md, 12px) var(--spacing-lg, 16px);
    margin-bottom: var(--spacing-lg, 16px);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
}

.crm-addr-step {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm, 8px);
    flex-shrink: 0;
}

.crm-addr-step-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    border: 2px solid color-mix(in srgb, var(--mud-palette-text-secondary) 30%, transparent);
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.crm-addr-step.is-active .crm-addr-step-bubble {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mud-palette-primary) 15%, transparent);
    transform: scale(1.05);
}

.crm-addr-step.is-done .crm-addr-step-bubble {
    background: var(--mud-palette-success);
    border-color: var(--mud-palette-success);
    color: #fff;
}

.crm-addr-step-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    letter-spacing: 0.01em;
}

.crm-addr-step.is-active .crm-addr-step-label,
.crm-addr-step.is-done .crm-addr-step-label {
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}

.crm-addr-step-track {
    flex: 1;
    height: 3px;
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 15%, transparent);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.crm-addr-step-progress {
    position: absolute;
    inset: 0;
    width: 0;
    background: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    border-radius: inherit;
    transition: width 0.4s cubic-bezier(.16,1,.3,1);
}

.crm-addr-step-progress.is-full {
    width: 100%;
}

/* ---------- Panel (contenedor principal por paso) ---------- */
.crm-addr-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 16px);
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px) var(--spacing-xl, 24px);
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-xl, 16px);
    box-shadow: var(--clp-shadow-card, 0 4px 20px rgba(0, 0, 0, 0.04));
}

.crm-addr-panel-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding-bottom: var(--spacing-md, 12px);
    border-bottom: 1px dashed color-mix(in srgb, var(--mud-palette-text-secondary) 15%, transparent);
}

.crm-addr-panel-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
    flex-shrink: 0;
}

.crm-addr-panel-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    line-height: 1.3;
}

.crm-addr-panel-hint {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
}

.crm-addr-back-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 20%, transparent);
    border-radius: 8px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-addr-back-btn:hover {
        background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
        border-color: var(--mud-palette-primary);
        color: var(--mud-palette-primary);
    }

/* ---------- Search (MudAutocomplete wrapper) ---------- */
.crm-addr-search-wrap {
    position: relative;
}

.crm-addr-autocomplete .mud-input-outlined-border {
    border-radius: var(--clp-radius-lg, 12px);
}

.crm-addr-autocomplete:focus-within .mud-input-outlined-border {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

/* ---------- Search result items ---------- */
.crm-addr-result-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-sm, 8px) var(--spacing-md, 12px);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.crm-addr-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    color: var(--mud-palette-text-secondary);
    flex-shrink: 0;
}

.crm-addr-result-item.is-complete .crm-addr-result-icon {
    background: color-mix(in srgb, var(--mud-palette-success) 15%, transparent);
    color: var(--mud-palette-success);
}

.crm-addr-result-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.crm-addr-result-primary {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-addr-result-secondary {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Foreign address prompt ---------- */
.crm-addr-foreign-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-md, 12px) var(--spacing-lg, 16px);
    background: color-mix(in srgb, var(--mud-palette-info) 6%, transparent);
    border: 1px dashed color-mix(in srgb, var(--mud-palette-info) 30%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    flex-wrap: wrap;
}

.crm-addr-foreign-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    flex: 1;
    min-width: 200px;
}

.crm-addr-foreign-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-info);
    border-radius: 999px;
    color: var(--mud-palette-info);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-addr-foreign-btn strong {
        font-weight: 600;
    }

    .crm-addr-foreign-btn:hover {
        background: var(--mud-palette-info);
        color: #fff;
        transform: translateX(2px);
        box-shadow: 0 4px 12px color-mix(in srgb, var(--mud-palette-info) 35%, transparent);
    }

/* ---------- Preview card (after selecting an address) ---------- */
.crm-addr-preview {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-lg, 16px);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--mud-palette-success) 6%, transparent) 0%,
        color-mix(in srgb, var(--mud-palette-primary) 4%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--mud-palette-success) 25%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    animation: crm-addr-fade-in 0.3s ease;
}

.crm-addr-preview-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 4px 10px;
    background: color-mix(in srgb, var(--mud-palette-success) 15%, transparent);
    border-radius: 999px;
    color: var(--mud-palette-success);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crm-addr-preview-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 4px);
}

.crm-addr-preview-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    line-height: 1.4;
}

.crm-addr-preview-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

    .crm-addr-preview-meta strong {
        color: var(--mud-palette-text-primary);
        font-weight: 600;
    }

.crm-addr-map-wrap {
    border-radius: var(--clp-radius-lg, 12px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.crm-addr-preview-geo-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--mud-palette-warning) 10%, transparent);
    border-radius: 8px;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    align-self: flex-start;
}

.crm-addr-preview-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md, 12px);
    padding-top: var(--spacing-sm, 8px);
    margin-top: var(--spacing-xs, 4px);
    border-top: 1px dashed color-mix(in srgb, var(--mud-palette-text-secondary) 15%, transparent);
}

/* ---------- Buttons ---------- */
.crm-addr-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 25%, transparent);
    border-radius: 10px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .crm-addr-btn-ghost:hover {
        background: color-mix(in srgb, var(--mud-palette-text-secondary) 8%, transparent);
        color: var(--mud-palette-text-primary);
    }

.crm-addr-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--mud-palette-primary-lighten) 0%, var(--mud-palette-primary) 100%);
    border: none;
    border-radius: 10px;
    color: var(--mud-palette-primary-text);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
}

    .crm-addr-btn-primary:hover {
        background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
    }

    .crm-addr-btn-primary:active {
        transform: translateY(0);
    }

/* ---------- Manual edit fields ---------- */
.crm-addr-field-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 8px);
}

.crm-addr-field-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mud-palette-text-secondary);
    padding: 2px 0;
}

    .crm-addr-field-label .mud-icon-root {
        color: var(--mud-palette-primary);
    }

.crm-addr-input .mud-input-outlined-border {
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.crm-addr-input:focus-within .mud-input-outlined-border {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 15%, transparent);
}

.crm-addr-locked-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 8%, transparent);
    border-radius: 8px;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
    align-self: flex-start;
}

/* ---------- Validation panel ---------- */
.crm-addr-validation-panel {
    margin-top: var(--spacing-md, 12px);
    background: transparent !important;
}

    .crm-addr-validation-panel .mud-expand-panel {
        background: transparent !important;
    }

/* ---------- Animations ---------- */
@@keyframes crm-addr-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive ---------- */
@@media (max-width: 600px) {
    .crm-addr-stepper {
        gap: 8px;
        padding: 10px 12px;
    }

    .crm-addr-step-label {
        display: none;
    }

    .crm-addr-panel {
        padding: 14px;
    }

    .crm-addr-panel-header {
        flex-wrap: wrap;
    }

    .crm-addr-back-btn {
        margin-left: 0;
    }

    .crm-addr-preview-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .crm-addr-btn-primary,
    .crm-addr-btn-ghost {
        justify-content: center;
        width: 100%;
    }

    .crm-addr-foreign-row {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-addr-foreign-btn {
        justify-content: center;
    }
}

/* =============================================================
   CRM PROPERTY VIEW — ViewProperty tabs (PropertyInfo, Addresses, Stakeholders)
   Prefix: crm-prop-*
   Used in: Pages/ContactManager/Components/Contacts/ViewProperty/**
   ============================================================= */

.crm-prop-tab-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 16px);
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px);
}

/* ---------- Tab nav badge (counts) ---------- */
.crm-prop-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

/* ---------- Section card ---------- */
.crm-prop-section {
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-xl, 16px);
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px) var(--spacing-xl, 24px);
    box-shadow: var(--clp-shadow-card, 0 4px 20px rgba(0, 0, 0, 0.04));
}

.crm-prop-section-head {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding-bottom: var(--spacing-md, 12px);
    border-bottom: 1px dashed color-mix(in srgb, var(--mud-palette-text-secondary) 12%, transparent);
    margin-bottom: var(--spacing-md, 12px);
}

.crm-prop-section-head-text {
    flex: 1;
    min-width: 0;
}

.crm-prop-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
    flex-shrink: 0;
}

    .crm-prop-section-icon.crm-prop-section-icon-success {
        background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent);
        color: var(--mud-palette-success);
    }

    .crm-prop-section-icon.crm-prop-section-icon-info {
        background: color-mix(in srgb, var(--mud-palette-info) 14%, transparent);
        color: var(--mud-palette-info);
    }

    .crm-prop-section-icon.crm-prop-section-icon-warning {
        background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent);
        color: var(--mud-palette-warning);
    }

.crm-prop-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
    line-height: 1.3;
}

.crm-prop-section-hint {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin: 2px 0 0 0;
}

.crm-prop-add-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--mud-palette-primary) 25%, transparent);
}

    .crm-prop-add-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px color-mix(in srgb, var(--mud-palette-primary) 40%, transparent);
    }

/* ---------- Field grid ---------- */
.crm-prop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md, 12px) var(--spacing-lg, 16px);
}

.crm-prop-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .crm-prop-field.crm-prop-field-span-2 {
        grid-column: span 2;
    }

.crm-prop-field-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mud-palette-text-secondary);
}

.crm-prop-field-value {
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
    font-weight: 500;
    word-break: break-word;
}

    .crm-prop-field-value.crm-prop-money {
        font-variant-numeric: tabular-nums;
        font-weight: 600;
        color: var(--mud-palette-success);
    }

    .crm-prop-field-value.crm-prop-field-multiline {
        white-space: pre-wrap;
    }

/* ---------- Physical stats strip ---------- */
.crm-prop-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-md, 12px) 0;
    margin-bottom: var(--spacing-md, 12px);
    border-bottom: 1px dashed color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
}

.crm-prop-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-md, 12px);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    text-align: center;
}

.crm-prop-stat-icon {
    color: var(--mud-palette-primary);
}

.crm-prop-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    font-variant-numeric: tabular-nums;
}

.crm-prop-stat-label {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mud-palette-text-secondary);
}

/* ---------- Badges ---------- */
.crm-prop-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.crm-prop-badge-primary {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    color: var(--mud-palette-primary);
}

.crm-prop-badge-success {
    background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent);
    color: var(--mud-palette-success);
}

.crm-prop-badge-info {
    background: color-mix(in srgb, var(--mud-palette-info) 14%, transparent);
    color: var(--mud-palette-info);
}

.crm-prop-badge-warning {
    background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent);
    color: var(--mud-palette-warning);
}

.crm-prop-badge-neutral {
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 12%, transparent);
    color: var(--mud-palette-text-secondary);
}

/* ---------- Cards (addresses + stakeholders) ---------- */
.crm-prop-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-md, 12px);
}

.crm-prop-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 8px);
    padding: var(--spacing-md, 12px) var(--spacing-lg, 16px);
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

    .crm-prop-card:hover {
        border-color: color-mix(in srgb, var(--mud-palette-primary) 25%, transparent);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    }

    .crm-prop-card.is-primary {
        border-color: color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-primary) 15%, transparent);
    }

.crm-prop-card-head {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm, 8px);
}

.crm-prop-card-icon,
.crm-prop-card-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: var(--mud-palette-primary);
    flex-shrink: 0;
}

.crm-prop-card-head-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crm-prop-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    line-height: 1.3;
    word-break: break-word;
}

.crm-prop-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.crm-prop-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.crm-prop-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 20%, transparent);
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

    .crm-prop-icon-btn:hover {
        background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
        border-color: var(--mud-palette-primary);
        color: var(--mud-palette-primary);
    }

    .crm-prop-icon-btn.crm-prop-icon-btn-danger:hover {
        background: color-mix(in srgb, var(--mud-palette-error) 10%, transparent);
        border-color: var(--mud-palette-error);
        color: var(--mud-palette-error);
    }

.crm-prop-card-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-xs, 4px) var(--spacing-md, 12px);
    margin: 0;
}

.crm-prop-card-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

    .crm-prop-card-item dt {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--mud-palette-text-secondary);
        margin: 0;
    }

    .crm-prop-card-item dd {
        font-size: 0.8125rem;
        color: var(--mud-palette-text-primary);
        margin: 0;
        word-break: break-word;
    }

/* Vertical contact list (email/phone/start/end) inside the stakeholder card — icon + value, no labels. */
.crm-prop-card-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 4px);
    margin: 0;
    padding: 0;
}

.crm-prop-card-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-primary);
    word-break: break-word;
}

    .crm-prop-card-contact-row .mud-icon-root {
        color: var(--mud-palette-text-secondary);
        flex-shrink: 0;
    }

.crm-prop-card-prefs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.crm-prop-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: color-mix(in srgb, var(--mud-palette-info) 10%, transparent);
    color: var(--mud-palette-info);
}

.crm-prop-card-notes {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    background: color-mix(in srgb, var(--mud-palette-warning) 8%, transparent);
    border-left: 3px solid var(--mud-palette-warning);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-primary);
    line-height: 1.45;
}

/* ---------- Empty state ---------- */
.crm-prop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl, 32px) var(--spacing-xl, 24px);
    text-align: center;
    gap: var(--spacing-xs, 4px);
    color: var(--mud-palette-text-secondary);
}

.crm-prop-empty-icon {
    color: color-mix(in srgb, var(--mud-palette-text-secondary) 45%, transparent);
    margin-bottom: var(--spacing-sm, 8px);
}

.crm-prop-empty-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

.crm-prop-empty-hint {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

/* ---------- Responsive ---------- */
@@media (max-width: 600px) {
    .crm-prop-tab-wrap {
        padding: 12px;
    }

    .crm-prop-section {
        padding: 14px;
    }

    .crm-prop-section-head {
        flex-wrap: wrap;
    }

    .crm-prop-add-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .crm-prop-field-span-2 {
        grid-column: span 1;
    }

    .crm-prop-cards {
        grid-template-columns: 1fr;
    }

    .crm-prop-card-head {
        flex-wrap: wrap;
    }
}

/* =============================================================
   CRM PROPERTY — Loading skeleton (LoadSkeletonProperty.razor)
   Mirrors the real ViewProperty layout so the user perceives the
   shape of the page before data arrives. Uses MudSkeleton internally.
   ============================================================= */

.crm-prop-skel-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 16px);
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px);
    animation: crm-prop-skel-fade 0.3s ease;
}

/* ---------- Header card ---------- */
.crm-prop-skel-header {
    position: relative;
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px);
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-xl, 16px);
    box-shadow: var(--clp-shadow-card, 0 4px 20px rgba(0, 0, 0, 0.04));
    overflow: hidden;
}

.crm-prop-skel-header-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    opacity: 0.55;
}

.crm-prop-skel-header-main {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg, 16px);
}

.crm-prop-skel-avatar {
    flex-shrink: 0;
}

.crm-prop-skel-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.crm-prop-skel-pills {
    display: flex;
    gap: 6px;
}

.crm-prop-skel-header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm, 8px);
    flex-shrink: 0;
}

/* ---------- Tab strip ---------- */
.crm-prop-skel-tabs {
    display: flex;
    gap: var(--spacing-sm, 8px);
    padding: var(--spacing-sm, 8px) var(--spacing-md, 12px);
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 4%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    overflow-x: auto;
    scrollbar-width: none;
}

    .crm-prop-skel-tabs::-webkit-scrollbar {
        display: none;
    }

.crm-prop-skel-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--mud-palette-surface);
    flex-shrink: 0;
}

/* ---------- Section card ---------- */
.crm-prop-skel-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px) var(--spacing-xl, 24px);
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-xl, 16px);
    box-shadow: var(--clp-shadow-card, 0 4px 20px rgba(0, 0, 0, 0.04));
}

.crm-prop-skel-section-head {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding-bottom: var(--spacing-md, 12px);
    border-bottom: 1px dashed color-mix(in srgb, var(--mud-palette-text-secondary) 12%, transparent);
}

.crm-prop-skel-section-head-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ---------- Field grid ---------- */
.crm-prop-skel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md, 12px) var(--spacing-lg, 16px);
}

.crm-prop-skel-field {
    display: flex;
    flex-direction: column;
}

/* ---------- Stats strip ---------- */
.crm-prop-skel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md, 12px);
}

.crm-prop-skel-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--spacing-md, 12px);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
}

/* ---------- Cards preview ---------- */
.crm-prop-skel-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-md, 12px);
}

.crm-prop-skel-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 8px);
    padding: var(--spacing-md, 12px) var(--spacing-lg, 16px);
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
}

.crm-prop-skel-card-head {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm, 8px);
}

.crm-prop-skel-card-head-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crm-prop-skel-card-badges {
    display: flex;
    gap: 4px;
}

.crm-prop-skel-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ---------- Sheen animation applied to all MudSkeleton nested here ---------- */
.crm-prop-skel-wrap .mud-skeleton {
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--mud-palette-text-secondary) 8%, transparent) 0%,
        color-mix(in srgb, var(--mud-palette-text-secondary) 14%, transparent) 50%,
        color-mix(in srgb, var(--mud-palette-text-secondary) 8%, transparent) 100%);
    background-size: 200% 100%;
    animation: crm-prop-skel-shimmer 1.6s ease-in-out infinite;
    opacity: 1;
}

@@keyframes crm-prop-skel-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@@keyframes crm-prop-skel-fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive ---------- */
@@media (max-width: 600px) {
    .crm-prop-skel-wrap {
        padding: 12px;
    }

    .crm-prop-skel-section {
        padding: 14px;
    }

    .crm-prop-skel-header-main {
        flex-wrap: wrap;
    }

    .crm-prop-skel-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .crm-prop-skel-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .crm-prop-skel-cards {
        grid-template-columns: 1fr;
    }
}

/* =============================================================
   CRM PROPERTY — Addresses tab (senior-level polish)
   Hero + secondary grid + status indicator + timeline
   Prefix: crm-prop-addr-*
   Used in: Pages/ContactManager/Components/Contacts/ViewProperty/Tabs/AddressesTab.razor
   ============================================================= */

.crm-prop-addr-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 16px);
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px) var(--spacing-xl, 24px);
}

/* ---------- Section header ---------- */
.crm-prop-addr-head {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding: 0 var(--spacing-xs, 4px);
}

.crm-prop-addr-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
    flex-shrink: 0;
}

    .crm-prop-addr-head-icon .mud-icon-root {
        color: var(--mud-palette-primary);
    }

/* ---------- Head actions (Copy + Edit buttons) ---------- */
.crm-prop-addr-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.crm-prop-addr-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 18%, transparent);
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

    .crm-prop-addr-copy-btn:hover {
        background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
        border-color: var(--mud-palette-primary);
        color: var(--mud-palette-primary);
    }

    .crm-prop-addr-copy-btn .mud-icon-root {
        font-size: 16px !important;
    }

/* ---------- Status chip row inside the card ---------- */
.crm-prop-addr-status-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.crm-prop-addr-head-text {
    flex: 1;
    min-width: 0;
}

.crm-prop-addr-head-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.crm-prop-addr-head-hint {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin: 2px 0 0 0;
    line-height: 1.4;
}

.crm-prop-addr-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--mud-palette-primary) 28%, transparent);
    flex-shrink: 0;
}

    .crm-prop-addr-add-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px color-mix(in srgb, var(--mud-palette-primary) 40%, transparent);
    }

    .crm-prop-addr-add-btn:active {
        transform: translateY(0);
    }

/* ==========================================================================
   HERO CARD — primary + current address (the "main" one)
   ========================================================================== */

.crm-prop-addr-hero {
    position: relative;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface)) 0%,
        var(--mud-palette-surface) 60%);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
    border-radius: var(--clp-radius-xl, 16px);
    overflow: hidden;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    animation: crm-prop-addr-rise 0.35s ease;
}

.crm-prop-addr-hero-banner {
    height: 5px;
    background: linear-gradient(90deg,
        var(--mud-palette-primary) 0%,
        var(--mud-palette-secondary) 50%,
        var(--mud-palette-primary) 100%);
    background-size: 200% 100%;
    animation: crm-prop-addr-banner-flow 6s linear infinite;
}

.crm-prop-addr-hero-main {
    display: flex;
    gap: var(--spacing-lg, 16px);
    padding: var(--spacing-xl, 24px);
    align-items: flex-start;
}

.crm-prop-addr-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg,
        var(--mud-palette-primary) 0%,
        var(--mud-palette-secondary) 100%);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
}

.crm-prop-addr-hero-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 12px);
}

.crm-prop-addr-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mud-palette-primary);
}

.crm-prop-addr-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mud-palette-text-secondary);
}

    .crm-prop-addr-status-dot.crm-prop-addr-status-dot-success {
        background: var(--mud-palette-success);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-success) 20%, transparent);
        animation: crm-prop-addr-pulse 2s ease-in-out infinite;
    }

.crm-prop-addr-sep {
    color: color-mix(in srgb, var(--mud-palette-text-secondary) 50%, transparent);
}

.crm-prop-addr-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.crm-prop-addr-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.crm-prop-addr-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
}

    .crm-prop-addr-chip.crm-prop-addr-chip-muted {
        background: color-mix(in srgb, var(--mud-palette-text-secondary) 8%, transparent);
        border-color: color-mix(in srgb, var(--mud-palette-text-secondary) 15%, transparent);
        color: var(--mud-palette-text-secondary);
    }

    .crm-prop-addr-chip .mud-icon-root {
        font-size: 14px !important;
        opacity: 0.75;
    }

/* ---------- Period timeline ---------- */
.crm-prop-addr-period {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-sm, 8px) var(--spacing-md, 12px);
    background: color-mix(in srgb, var(--mud-palette-info) 6%, transparent);
    border: 1px dashed color-mix(in srgb, var(--mud-palette-info) 30%, transparent);
    border-radius: 10px;
    font-size: 0.75rem;
}

.crm-prop-addr-period-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--mud-palette-info);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.crm-prop-addr-period-range {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mud-palette-text-primary);
    font-size: 0.8125rem;
}

.crm-prop-addr-period-arrow {
    color: var(--mud-palette-info);
    font-weight: 700;
    font-size: 1rem;
}

.crm-prop-addr-period-arrow-sm {
    color: var(--mud-palette-text-secondary);
    font-weight: 700;
    margin: 0 4px;
}

/* ---------- Notes ---------- */
.crm-prop-addr-notes {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--mud-palette-warning) 8%, transparent);
    border-left: 3px solid var(--mud-palette-warning);
    border-radius: 6px;
}

    .crm-prop-addr-notes p {
        font-size: 0.8125rem;
        color: var(--mud-palette-text-primary);
        line-height: 1.5;
        margin: 0;
    }

    .crm-prop-addr-notes .mud-icon-root {
        color: var(--mud-palette-warning);
        flex-shrink: 0;
        margin-top: 2px;
    }

/* ---------- Actions ---------- */
.crm-prop-addr-hero-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.crm-prop-addr-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 18%, transparent);
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

    .crm-prop-addr-icon-btn:hover {
        background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
        border-color: var(--mud-palette-primary);
        color: var(--mud-palette-primary);
    }

    .crm-prop-addr-icon-btn.crm-prop-addr-icon-btn-sm {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

.crm-prop-addr-menu .mud-button-root {
    min-width: 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 18%, transparent);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    transition: all 0.15s ease;
}

    .crm-prop-addr-menu .mud-button-root:hover {
        background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
        border-color: var(--mud-palette-primary);
        color: var(--mud-palette-primary);
    }

/* ==========================================================================
   SUBHEAD — "Other addresses" separator
   ========================================================================== */

.crm-prop-addr-subhead {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-xs, 4px) 0;
    margin-top: var(--spacing-sm, 8px);
}

.crm-prop-addr-subhead-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        color-mix(in srgb, var(--mud-palette-text-secondary) 20%, transparent),
        transparent);
}

.crm-prop-addr-subhead-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

/* ==========================================================================
   SECONDARY CARDS — historic / other addresses
   ========================================================================== */

.crm-prop-addr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--spacing-md, 12px);
}

.crm-prop-addr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 8px);
    padding: var(--spacing-md, 12px) var(--spacing-lg, 16px) var(--spacing-md, 12px) calc(var(--spacing-lg, 16px) + 4px);
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    animation: crm-prop-addr-rise 0.35s ease both;
}

    .crm-prop-addr-card:hover {
        transform: translateY(-2px);
        border-color: color-mix(in srgb, var(--mud-palette-primary) 25%, transparent);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
    }

/* Left status indicator */
.crm-prop-addr-card-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--mud-palette-text-secondary);
    opacity: 0.4;
}

.crm-prop-addr-card.is-current .crm-prop-addr-card-indicator {
    background: var(--mud-palette-success);
    opacity: 1;
    box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-success) 40%, transparent);
}

.crm-prop-addr-card.is-historical {
    opacity: 0.88;
}

    .crm-prop-addr-card.is-historical .crm-prop-addr-card-indicator {
        background: var(--mud-palette-text-secondary);
        opacity: 0.55;
    }

    .crm-prop-addr-card.is-historical .crm-prop-addr-card-title {
        color: var(--mud-palette-text-secondary);
    }

.crm-prop-addr-card-head {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm, 8px);
}

.crm-prop-addr-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: var(--mud-palette-primary);
    flex-shrink: 0;
}

.crm-prop-addr-card-head-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crm-prop-addr-card-type {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.6563rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.6;
}

/* AddressType variants */
.crm-prop-addr-type-physical {
    background: color-mix(in srgb, var(--mud-palette-success) 15%, transparent);
    color: var(--mud-palette-success);
}

.crm-prop-addr-type-mailing {
    background: color-mix(in srgb, var(--mud-palette-info) 15%, transparent);
    color: var(--mud-palette-info);
}

.crm-prop-addr-type-tax {
    background: color-mix(in srgb, var(--mud-palette-warning) 15%, transparent);
    color: var(--mud-palette-warning);
}

.crm-prop-addr-type-previous {
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 15%, transparent);
    color: var(--mud-palette-text-secondary);
}

.crm-prop-addr-type-other {
    background: color-mix(in srgb, var(--mud-palette-tertiary) 15%, transparent);
    color: var(--mud-palette-tertiary);
}

.crm-prop-addr-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.crm-prop-addr-card-flags {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.crm-prop-addr-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

    .crm-prop-addr-flag.crm-prop-addr-flag-primary {
        background: color-mix(in srgb, var(--mud-palette-warning) 18%, transparent);
        color: var(--mud-palette-warning);
    }

    .crm-prop-addr-flag.crm-prop-addr-flag-current {
        background: color-mix(in srgb, var(--mud-palette-success) 18%, transparent);
        color: var(--mud-palette-success);
    }

    .crm-prop-addr-flag .mud-icon-root {
        font-size: 14px !important;
    }

.crm-prop-addr-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: var(--spacing-xs, 4px);
}

.crm-prop-addr-meta-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

    .crm-prop-addr-meta-row .mud-icon-root {
        color: color-mix(in srgb, var(--mud-palette-text-secondary) 60%, transparent);
        flex-shrink: 0;
    }

    .crm-prop-addr-meta-row span {
        color: var(--mud-palette-text-primary);
        word-break: break-word;
    }

.crm-prop-addr-card-notes {
    display: flex;
    gap: 6px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--mud-palette-warning) 6%, transparent);
    border-left: 2px solid var(--mud-palette-warning);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-primary);
    line-height: 1.45;
}

    .crm-prop-addr-card-notes .mud-icon-root {
        color: var(--mud-palette-warning);
        flex-shrink: 0;
    }

.crm-prop-addr-card-foot {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    padding-top: var(--spacing-xs, 4px);
    border-top: 1px dashed color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    margin-top: var(--spacing-xs, 4px);
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.crm-prop-addr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl, 32px) var(--spacing-xl, 24px);
    text-align: center;
    gap: var(--spacing-xs, 4px);
    background: color-mix(in srgb, var(--mud-palette-primary) 3%, transparent);
    border: 2px dashed color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
    border-radius: var(--clp-radius-xl, 16px);
    animation: crm-prop-addr-rise 0.35s ease;
}

.crm-prop-addr-empty-art {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--mud-palette-primary) 10%, transparent) 0%,
        color-mix(in srgb, var(--mud-palette-secondary) 10%, transparent) 100%);
    color: color-mix(in srgb, var(--mud-palette-primary) 70%, transparent);
    margin-bottom: var(--spacing-md, 12px);
}

.crm-prop-addr-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.crm-prop-addr-empty-hint {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 var(--spacing-md, 12px) 0;
    max-width: 360px;
    line-height: 1.5;
}

.crm-prop-addr-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--mud-palette-primary) 28%, transparent);
}

    .crm-prop-addr-empty-cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px color-mix(in srgb, var(--mud-palette-primary) 40%, transparent);
    }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@@keyframes crm-prop-addr-rise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@@keyframes crm-prop-addr-banner-flow {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@@keyframes crm-prop-addr-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-success) 20%, transparent);
    }
    50% {
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--mud-palette-success) 10%, transparent);
    }
}

/* Stagger for secondary cards */
.crm-prop-addr-grid .crm-prop-addr-card:nth-child(1) { animation-delay: 0ms; }
.crm-prop-addr-grid .crm-prop-addr-card:nth-child(2) { animation-delay: 60ms; }
.crm-prop-addr-grid .crm-prop-addr-card:nth-child(3) { animation-delay: 120ms; }
.crm-prop-addr-grid .crm-prop-addr-card:nth-child(4) { animation-delay: 180ms; }
.crm-prop-addr-grid .crm-prop-addr-card:nth-child(n+5) { animation-delay: 240ms; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@@media (max-width: 900px) {
    .crm-prop-addr-hero-main {
        flex-wrap: wrap;
    }

    .crm-prop-addr-hero-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@@media (max-width: 600px) {
    .crm-prop-addr-wrap {
        padding: 14px;
    }

    .crm-prop-addr-head {
        flex-wrap: wrap;
    }

    .crm-prop-addr-add-btn {
        width: 100%;
        justify-content: center;
    }

    .crm-prop-addr-hero-main {
        padding: 16px;
    }

    .crm-prop-addr-hero-icon {
        width: 44px;
        height: 44px;
    }

    .crm-prop-addr-hero-title {
        font-size: 1.0625rem;
    }

    .crm-prop-addr-grid {
        grid-template-columns: 1fr;
    }

    .crm-prop-addr-period {
        flex-wrap: wrap;
    }
}

/* =============================================================
   CRM PROPERTY — Overview section polish
   Prefix: crm-prop-ov-*
   Used in: Pages/ContactManager/Components/Contacts/ViewProperty/Tabs/PropertyInfoSections/PropertyOverviewInfo.razor
   Keeps a uniform typography across values (same font + size + weight)
   and upgrades the Lifecycle Stage pill with a colored dot + icon + humanized label.
   ============================================================= */

/* ---------- Grid rows ---------- */
.crm-prop-ov-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md, 12px) var(--spacing-xl, 24px);
    padding: var(--spacing-sm, 8px) 0;
}

    .crm-prop-ov-grid + .crm-prop-ov-grid {
        border-top: 1px dashed color-mix(in srgb, var(--mud-palette-text-secondary) 12%, transparent);
        padding-top: var(--spacing-md, 12px);
    }

/* ---------- Uniform field layout ---------- */
.crm-prop-ov-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* Label — same rule used by every value label inside Overview */
.crm-prop-ov-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mud-palette-text-secondary);
    font-family: inherit;
}

/* Value — SAME font/size/weight across the whole Overview section */
.crm-prop-ov-value {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--mud-palette-text-primary);
    font-family: inherit;
    word-break: break-word;
}

/* ---------- Lifecycle Stage pill ---------- */
.crm-prop-ov-stage {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 15%, transparent);
    color: var(--mud-palette-text-primary);
    align-self: flex-start;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

    .crm-prop-ov-stage:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

.crm-prop-ov-stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mud-palette-text-secondary);
    flex-shrink: 0;
}

.crm-prop-ov-stage-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

    .crm-prop-ov-stage-icon.mud-icon-root {
        font-size: 16px !important;
    }

.crm-prop-ov-stage-label {
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}

/* Stage variants — color the dot, tint the background, and sync the text/icon */

.crm-prop-ov-stage.is-offmarket {
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 8%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-text-secondary) 25%, transparent);
    color: var(--mud-palette-text-secondary);
}

    .crm-prop-ov-stage.is-offmarket .crm-prop-ov-stage-dot {
        background: var(--mud-palette-text-secondary);
    }

    .crm-prop-ov-stage.is-offmarket .crm-prop-ov-stage-icon {
        color: var(--mud-palette-text-secondary);
    }

.crm-prop-ov-stage.is-listed {
    background: color-mix(in srgb, var(--mud-palette-info) 10%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-info) 35%, transparent);
    color: var(--mud-palette-info);
}

    .crm-prop-ov-stage.is-listed .crm-prop-ov-stage-dot {
        background: var(--mud-palette-info);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-info) 20%, transparent);
        animation: crm-prop-ov-pulse 2s ease-in-out infinite;
    }

    .crm-prop-ov-stage.is-listed .crm-prop-ov-stage-icon {
        color: var(--mud-palette-info);
    }

.crm-prop-ov-stage.is-undercontract {
    background: color-mix(in srgb, var(--mud-palette-warning) 10%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-warning) 35%, transparent);
    color: var(--mud-palette-warning);
}

    .crm-prop-ov-stage.is-undercontract .crm-prop-ov-stage-dot {
        background: var(--mud-palette-warning);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-warning) 20%, transparent);
        animation: crm-prop-ov-pulse 2s ease-in-out infinite;
    }

    .crm-prop-ov-stage.is-undercontract .crm-prop-ov-stage-icon {
        color: var(--mud-palette-warning);
    }

.crm-prop-ov-stage.is-sold {
    background: color-mix(in srgb, var(--mud-palette-success) 10%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-success) 35%, transparent);
    color: var(--mud-palette-success);
}

    .crm-prop-ov-stage.is-sold .crm-prop-ov-stage-dot {
        background: var(--mud-palette-success);
    }

    .crm-prop-ov-stage.is-sold .crm-prop-ov-stage-icon {
        color: var(--mud-palette-success);
    }

.crm-prop-ov-stage.is-preforeclosure {
    background: color-mix(in srgb, var(--mud-palette-error) 10%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-error) 35%, transparent);
    color: var(--mud-palette-error);
}

    .crm-prop-ov-stage.is-preforeclosure .crm-prop-ov-stage-dot {
        background: var(--mud-palette-error);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-error) 20%, transparent);
        animation: crm-prop-ov-pulse 1.6s ease-in-out infinite;
    }

    .crm-prop-ov-stage.is-preforeclosure .crm-prop-ov-stage-icon {
        color: var(--mud-palette-error);
    }

/* ---------- Description block (full-width, at the bottom) ---------- */
.crm-prop-ov-description {
    margin-top: var(--spacing-md, 12px);
    padding: var(--spacing-md, 12px) var(--spacing-lg, 16px);
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crm-prop-ov-description-head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mud-palette-text-secondary);
}

    .crm-prop-ov-description-head .mud-icon-root {
        font-size: 16px !important;
    }

.crm-prop-ov-description-text {
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--mud-palette-text-primary);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

    .crm-prop-ov-description-text.is-empty {
        color: color-mix(in srgb, var(--mud-palette-text-secondary) 70%, transparent);
        font-style: italic;
    }

/* ---------- Animations ---------- */
@@keyframes crm-prop-ov-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
    }
    50% {
        box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 8%, transparent);
    }
}

/* ---------- Responsive ---------- */
@@media (max-width: 600px) {
    .crm-prop-ov-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md, 12px);
    }

    .crm-prop-ov-stage {
        max-width: 100%;
    }
}

/* ======================================================================
   Dialog chip rows — used by Partner Specialty & Coverage dialog to render
   selected specialties / states / counties / languages as dismissible pills
   below their respective inputs.
   ====================================================================== */
.crm-dlg-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 1.25rem 12px;
}

.crm-dlg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 10px;
    line-height: 1.2;
}

.crm-dlg-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: inherit;
    opacity: 0.75;
    padding: 0;
    transition: background 120ms ease, opacity 120ms ease;
}

    .crm-dlg-chip-remove:hover {
        opacity: 1;
        background: color-mix(in srgb, currentColor 18%, transparent);
    }

    .crm-dlg-chip-remove .mud-icon-root {
        font-size: 14px !important;
    }

/* ─────────── Multi-select popover (Specialty/States/Languages dialogs) ─────────── */
/* Cap the popover width so it never escapes the dialog; clamp the list height so long
   catalogs (50 states) scroll inside the popover instead of pushing past the viewport. */
.crm-dlg-multi-popover {
    max-width: min(420px, 92vw) !important;
    max-height: 60vh !important;
    overflow: hidden !important;
    box-shadow: var(--clp-shadow-card, 0 12px 32px rgba(0, 0, 0, 0.12)) !important;
    border-radius: var(--clp-radius-lg, 12px) !important;
    display: flex !important;
    flex-direction: column !important;
}

    .crm-dlg-multi-popover .mud-list {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        overflow-y: auto !important;
        flex: 1 1 auto !important;
    }

    .crm-dlg-multi-popover .mud-list-item {
        min-height: 40px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

/* Sticky search box pinned at the top of the popover so users never lose it while scrolling.
   stopPropagation on the wrapper (and the <input> inside) keeps clicks/keys from bubbling up to
   MudSelect — otherwise the popover would close or treat keystrokes as type-ahead navigation. */
.crm-dlg-multi-search-wrap {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--mud-palette-surface, #fff);
    padding: 8px 10px;
    border-bottom: 1px solid var(--mud-palette-divider, rgba(0, 0, 0, 0.08));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-dlg-multi-search-icon {
    display: inline-flex;
    align-items: center;
    color: var(--mud-palette-text-secondary, #64748b);
    flex-shrink: 0;
}

    .crm-dlg-multi-search-icon .mud-icon-root {
        font-size: 1.125rem !important;
    }

.crm-dlg-multi-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--mud-palette-lines-inputs, rgba(0, 0, 0, 0.16));
    border-radius: 6px;
    padding: 6px 10px;
    font: inherit;
    color: var(--mud-palette-text-primary, inherit);
    background: var(--mud-palette-background, #fff);
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

    .crm-dlg-multi-search-input:focus {
        border-color: var(--mud-palette-primary, #6366f1);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--mud-palette-primary, #6366f1) 20%, transparent);
    }

    .crm-dlg-multi-search-input::placeholder {
        color: var(--mud-palette-text-secondary, #94a3b8);
    }

/* Soft inset for the "Other" custom-specialty input so it visually attaches to the parent
   dropdown and reads as a sub-action. Sits inside the same form-grid as the select, so it
   inherits the grid's horizontal padding (no need to add our own). */
.crm-dlg-other-input {
    padding: 10px 12px;
    border-left: 3px solid var(--mud-palette-primary, #6366f1);
    background: color-mix(in srgb, var(--mud-palette-primary, #6366f1) 6%, transparent);
    border-radius: 8px;
    margin-top: -4px;
}

/* Tighter form-grid for sections where the description sits right above the field — the
   default 1.25rem padding plus the description's 1rem margin-bottom adds up to too much air. */
.crm-dlg-form-grid-tight {
    padding-top: 0 !important;
    gap: 0.625rem !important;
}

.crm-dlg-section .crm-dlg-section-desc + .crm-dlg-form-grid-tight {
    margin-top: -0.5rem;
}

/* ─────────── Custom multi-select dropdown (replaces MudSelect when in-popover search needed)
   Why custom: MudSelect's KeyInterceptor (JS-level) eats keystrokes meant for an embedded search
   input. Building the dropdown from MudPopover + native button avoids that interception. */
.crm-mselect-root {
    position: relative;
    width: 100%;
}

.crm-mselect-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: var(--mud-palette-background, #fff);
    border: 1px solid var(--mud-palette-lines-inputs, rgba(0, 0, 0, 0.23));
    border-radius: var(--clp-radius-lg, 8px);
    cursor: pointer;
    text-align: left;
    transition: border-color 120ms ease, box-shadow 120ms ease;
    font: inherit;
    color: var(--mud-palette-text-primary, inherit);
    min-height: 44px;
}

    .crm-mselect-trigger:hover {
        border-color: var(--mud-palette-text-primary, rgba(0, 0, 0, 0.6));
    }

    .crm-mselect-trigger.open,
    .crm-mselect-trigger:focus-visible {
        border-color: var(--mud-palette-primary, #6366f1);
        box-shadow: 0 0 0 1px var(--mud-palette-primary, #6366f1);
        outline: none;
    }

.crm-mselect-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary, #64748b);
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.crm-mselect-value {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9375rem;
}

    .crm-mselect-value.placeholder {
        color: var(--mud-palette-text-disabled, #94a3b8);
    }

.crm-mselect-arrow {
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary, #64748b);
    transition: transform 180ms ease;
}

.crm-mselect-trigger.open .crm-mselect-arrow {
    transform: rotate(180deg);
}

.crm-mselect-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 0;
    min-height: 0;
}

.crm-mselect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    transition: background 100ms ease;
    font-size: 0.9375rem;
}

    .crm-mselect-item:hover {
        background: var(--mud-palette-action-default-hover, rgba(0, 0, 0, 0.04));
    }

    .crm-mselect-item.selected {
        background: color-mix(in srgb, var(--mud-palette-primary, #6366f1) 8%, transparent);
    }

        .crm-mselect-item.selected .crm-mselect-check {
            color: var(--mud-palette-primary, #6366f1);
        }

.crm-mselect-check {
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary, #64748b);
}

.crm-mselect-code {
    display: inline-block;
    width: 38px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary, #64748b);
    font-size: 0.8125rem;
}

.crm-mselect-item-other {
    border-top: 1px dashed var(--mud-palette-divider, rgba(0, 0, 0, 0.08));
    margin-top: 4px;
    padding-top: 10px;
    font-style: italic;
    color: var(--mud-palette-text-secondary, #64748b);
}

/* =============================================================================
   ADDRESS SELECTOR (asel-)
   Self-contained styles for the shared AddressSelector dialog (Shared/AddressSelector.razor).
   Visually identical to the Add/Edit address dialogs in Property/Partner — clones the
   premium-dialog shell + the AddressShared inner panel/stepper, prefixed `asel-` so the
   component is decoupled from any crm-* tokens and can be used outside the CRM module.
   ============================================================================= */

/* ───────── Dialog shell ───────── */
.asel-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: 880px;
    width: 100%;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.asel-dialog .mud-dialog-title,
.asel-dialog .mud-dialog-content,
.asel-dialog .mud-dialog-actions {
    padding: 0 !important;
    background: transparent;
}

.asel-dialog .mud-dialog-title { flex-shrink: 0; }
.asel-dialog .mud-dialog-content { flex: 1 1 auto !important; overflow-y: auto !important; max-height: none !important; }
.asel-dialog .mud-dialog-actions { flex-shrink: 0; }

.asel-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;
}

    .asel-dialog .mud-dialog-close-button:hover {
        background: rgba(255,255,255,0.25) !important;
        transform: scale(1.05);
    }

    .asel-dialog .mud-dialog-close-button .mud-icon-root {
        font-size: 1.125rem !important;
    }

/* ───────── Header (gradient + animated orbs) ───────── */
.asel-header {
    position: relative;
    padding: 1.75rem 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
}

.asel-header-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.asel-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
}

.asel-orb-1 {
    width: 200px;
    height: 200px;
    background: #c4b5fd;
    top: -60px;
    right: -40px;
    animation: asel-float1 6s ease-in-out infinite;
}

.asel-orb-2 {
    width: 150px;
    height: 150px;
    background: #a78bfa;
    bottom: -40px;
    left: 20%;
    animation: asel-float2 8s ease-in-out infinite;
}

@keyframes asel-float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 10px) scale(1.1); }
}

@keyframes asel-float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -15px) scale(0.9); }
}

.asel-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;
}

.asel-header-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 1;
}

.asel-icon-container {
    position: relative;
    flex-shrink: 0;
}

.asel-icon-glow {
    position: absolute;
    inset: -8px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    filter: blur(12px);
    animation: asel-glow-pulse 2s ease-in-out infinite;
}

@keyframes asel-glow-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.asel-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;
}

.asel-header-info {
    flex: 1;
    min-width: 0;
}

.asel-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;
}

.asel-tag-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: asel-blink 1.5s ease-in-out infinite;
}

@keyframes asel-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.asel-header-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.asel-header-desc {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}

    .asel-header-desc strong {
        color: white;
        font-weight: 600;
    }

/* ───────── Body & outer "Location" section (matches Property/Partner dialog wrapping) ───────── */
.asel-body {
    padding: 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.asel-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);
}

    .asel-section:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

.asel-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 #c7d2fe;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
}

    .asel-section-header .mud-icon-root {
        color: #6366f1;
    }

.asel-section-body {
    padding: 12px 16px 16px;
}

/* ───────── Stepper (Search → Confirm) ───────── */
.asel-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.10);
    border-radius: 12px;
}

.asel-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.asel-step-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(100, 116, 139, 0.30);
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.asel-step.is-active .asel-step-bubble {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: scale(1.05);
}

.asel-step.is-done .asel-step-bubble {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.asel-step-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.01em;
}

.asel-step.is-active .asel-step-label,
.asel-step.is-done .asel-step-label {
    color: #0f172a;
    font-weight: 600;
}

.asel-step-track {
    flex: 1;
    height: 3px;
    background: rgba(100, 116, 139, 0.15);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.asel-step-progress {
    position: absolute;
    inset: 0;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: inherit;
    transition: width 0.4s cubic-bezier(.16,1,.3,1);
}

    .asel-step-progress.is-full {
        width: 100%;
    }

/* ───────── Inner panel (the white card inside the section, per step) ───────── */
.asel-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 24px 24px;
    background: #ffffff;
    border: 1px solid rgba(100, 116, 139, 0.10);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.asel-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.15);
}

.asel-panel-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    flex-shrink: 0;
}

.asel-panel-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.asel-panel-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.asel-back-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(100, 116, 139, 0.20);
    border-radius: 8px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

    .asel-back-btn:hover {
        background: rgba(99, 102, 241, 0.08);
        border-color: #6366f1;
        color: #6366f1;
    }

/* ───────── Search wrap & autocomplete results ───────── */
.asel-search-wrap {
    position: relative;
}

.asel-autocomplete .mud-input-outlined-border {
    border-radius: 12px;
}

.asel-autocomplete:focus-within .mud-input-outlined-border {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.asel-result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.asel-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(100, 116, 139, 0.10);
    color: #64748b;
    flex-shrink: 0;
}

.asel-result-item.is-complete .asel-result-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.asel-result-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.asel-result-primary {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asel-result-secondary {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ───────── Foreign-address prompt ───────── */
.asel-foreign-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(14, 165, 233, 0.06);
    border: 1px dashed rgba(14, 165, 233, 0.30);
    border-radius: 12px;
    flex-wrap: wrap;
}

.asel-foreign-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: #64748b;
    flex: 1;
    min-width: 200px;
}

.asel-foreign-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #0ea5e9;
    border-radius: 999px;
    color: #0ea5e9;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .asel-foreign-btn strong {
        font-weight: 600;
    }

    .asel-foreign-btn:hover {
        background: #0ea5e9;
        color: #ffffff;
        transform: translateX(2px);
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
    }

/* ───────── Selected-address preview card ───────── */
.asel-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(99, 102, 241, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    animation: asel-fade-in 0.3s ease;
}

@keyframes asel-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.asel-preview-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 999px;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.asel-preview-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asel-preview-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.4;
}

.asel-preview-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #64748b;
}

    .asel-preview-meta strong {
        color: #0f172a;
        font-weight: 600;
    }

.asel-map-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(100, 116, 139, 0.10);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.asel-preview-geo-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(245, 158, 11, 0.10);
    border-radius: 8px;
    font-size: 0.6875rem;
    color: #64748b;
    align-self: flex-start;
}

.asel-preview-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed rgba(100, 116, 139, 0.15);
}

/* ───────── Buttons (inline preview actions + footer ghost/primary/solid) ───────── */
.asel-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(100, 116, 139, 0.25);
    border-radius: 10px;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .asel-btn-ghost:hover {
        background: rgba(100, 116, 139, 0.08);
        color: #0f172a;
    }

.asel-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.22);
}

    .asel-btn-primary:hover {
        background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
    }

    .asel-btn-primary:active {
        transform: translateY(0);
    }

.asel-btn-solid {
    display: inline-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);
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

    .asel-btn-solid:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    }

    .asel-btn-solid:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .asel-btn-solid .mud-icon-root {
        font-size: 1rem;
    }

/* ───────── Manual edit field groups ───────── */
.asel-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asel-field-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 2px 0;
}

    .asel-field-label .mud-icon-root {
        color: #6366f1;
    }

.asel-input .mud-input-outlined-border {
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.asel-input:focus-within .mud-input-outlined-border {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.asel-locked-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(100, 116, 139, 0.08);
    border-radius: 8px;
    font-size: 0.6875rem;
    color: #64748b;
    align-self: flex-start;
}

/* ───────── Validation panel (collapsed by default, shown on submit) ───────── */
.asel-validation-panel {
    margin-top: 12px;
    background: transparent !important;
}

    .asel-validation-panel .mud-expand-panel {
        background: transparent !important;
    }

/* ───────── Footer ───────── */
.asel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}

.asel-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

    .asel-footer-hint > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.asel-hint-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border-radius: 6px;
    color: #f59e0b;
    flex-shrink: 0;
}

.asel-footer-btns {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
}

/* ───────── Responsive ───────── */
@media (max-width: 600px) {
    .asel-stepper {
        gap: 8px;
        padding: 10px 12px;
    }

    .asel-step-label {
        display: none;
    }

    .asel-panel {
        padding: 14px;
    }

    .asel-panel-header {
        flex-wrap: wrap;
    }

    .asel-back-btn {
        margin-left: 0;
    }

    .asel-preview-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .asel-btn-primary,
    .asel-btn-ghost {
        justify-content: center;
        width: 100%;
    }

    .asel-foreign-row {
        flex-direction: column;
        align-items: stretch;
    }

    .asel-foreign-btn {
        justify-content: center;
    }
}

@media (max-width: 580px) {
    .asel-header {
        padding: 1.25rem;
    }

    .asel-body {
        padding: 1rem;
    }

    .asel-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .asel-footer-hint {
        justify-content: center;
    }

    .asel-footer-btns {
        justify-content: center;
    }
}

/* ============================================================
   END: contactManager.css
   ============================================================ */

/* ============================================================
   BEGIN: booking.css
   ============================================================ */
/* ============================================================
   Booking Module — ManageAppointment styles
   Prefix: bp-
   ============================================================ */

.bp-page {
    min-height: 100vh;
    background: #f8f9fa;
}

.bp-card {
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    overflow: hidden;
}

.bp-fade {
    animation: bpFade .25s ease;
}

@keyframes bpFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Info rows */
.bp-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.bp-info-row .mud-icon-root {
    color: var(--mud-palette-primary);
    font-size: 1.2rem;
}

/* Status badges */
.bp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bp-status-pending { background: #fef3c7; color: #92400e; }
.bp-status-cancelled { background: #fee2e2; color: #991b1b; }
.bp-status-completed { background: #d1fae5; color: #065f46; }

/* Day strip (reschedule picker) */
.bp-day-strip {
    display: flex;
    gap: 10px;
    padding: 0 32px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bp-day-strip::-webkit-scrollbar { height: 0; }

.bp-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 72px;
    border-radius: 50px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all .2s ease;
    background: white;
    user-select: none;
}

.bp-day:hover:not(.bp-day-disabled) {
    border-color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .04);
}

.bp-day-active {
    border-color: var(--mud-palette-primary) !important;
    background: var(--mud-palette-primary) !important;
    color: white !important;
}

.bp-day-active .bp-day-name,
.bp-day-active .bp-day-num { color: white !important; }

.bp-day-disabled {
    opacity: .35;
    cursor: not-allowed;
    background: #f8f9fa;
}

.bp-day-name {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #6c757d;
}

.bp-day-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 2px;
}

.bp-day-today { position: relative; }

.bp-day-today::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
}

.bp-day-active.bp-day-today::after { background: white; }

/* Time slots */
.bp-slots {
    display: flex;
    gap: 10px;
    padding: 0 32px 24px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.bp-slot {
    padding: 8px 20px;
    border: 1.5px solid #dee2e6;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all .15s ease;
    background: white;
    white-space: nowrap;
    user-select: none;
}

.bp-slot:hover {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

.bp-slot-active {
    border-color: var(--mud-palette-primary) !important;
    background: var(--mud-palette-primary) !important;
    color: white !important;
}

/* Section titles */
.bp-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    padding: 20px 32px 12px;
}

/* Responsive */
@media (max-width: 600px) {
    .bp-day-strip,
    .bp-slots { padding-left: 20px; padding-right: 20px; }
    .bp-section-title { padding-left: 20px; padding-right: 20px; }
}

/* ============================================================
   END: booking.css
   ============================================================ */

/* ============================================================
   BEGIN: communicationCenter.css
   ============================================================ */
/* ============================================================
   COMMUNICATION CENTER – Unified Inbox
   ============================================================ */

/* ── Shell ── */
.inbox-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    background: #f1f5f9;
    overflow: hidden;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Top Bar ── */
.inbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 52px;
    min-height: 52px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    z-index: 10;
}

.inbox-topbar-left {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.inbox-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inbox-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -.02em;
}

.inbox-topbar-right {
    flex-shrink: 0;
}

.inbox-user {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    font-weight: 500;
    color: #64748b;
    padding: .375rem .75rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* ── Body: Split Layout ── */
.inbox-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ============================================================
   SIDEBAR (Left Panel)
   ============================================================ */

.inbox-sidebar {
    width: 360px;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

/* ── Sidebar Header with Search ── */
.inbox-sidebar-header {
    padding: .875rem 1rem .625rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    background: #fff;
}

.inbox-sidebar-title-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.inbox-sidebar-label {
    font-size: .8125rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.inbox-total-badge {
    font-size: .625rem;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99,102,241,.08);
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1.3;
}

/* ── Search ── */
.inbox-search {
    position: relative;
    width: 100%;
}

.inbox-search-icon {
    position: absolute;
    left: .625rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 1.1rem !important;
}

.inbox-search-input {
    width: 100%;
    height: 34px;
    padding: 0 2rem 0 2.125rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #1e293b;
    font-size: .8125rem;
    font-family: inherit;
    transition: all .15s;
}

.inbox-search-input::placeholder { color: #94a3b8; }

.inbox-search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.08);
    background: #fff;
}

.inbox-search-clear {
    position: absolute;
    right: .375rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 4px;
    display: flex;
    line-height: 0;
}

.inbox-search-clear:hover { color: #475569; }

/* ── Channel Filter Chips ── */
.inbox-filters {
    display: flex;
    gap: 5px;
    padding: .5rem 1rem .625rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.inbox-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    font-size: .6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    font-family: inherit;
}

.inbox-chip:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.inbox-chip-active {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
}

.inbox-chip-active:hover {
    background: #334155;
    color: #fff;
    border-color: #334155;
}

.inbox-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ch-sms   { background: #3b82f6; }
.ch-wa    { background: #22c55e; }
.ch-voice { background: #8b5cf6; }

/* ── Contact Scroll Area ── */
.inbox-contacts-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.inbox-contacts-scroll::-webkit-scrollbar { width: 4px; }
.inbox-contacts-scroll::-webkit-scrollbar-track { background: transparent; }
.inbox-contacts-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ── Contact Card ── */
.inbox-contact {
    display: flex;
    gap: .625rem;
    padding: .625rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    border-left: 3px solid transparent;
    transition: all .1s ease;
}

.inbox-contact:hover {
    background: #f8fafc;
}

.inbox-contact-active {
    background: rgba(99, 102, 241, .05);
    border-left-color: #6366f1;
}

.inbox-contact-active:hover {
    background: rgba(99, 102, 241, .07);
}

.inbox-contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    position: relative;
}

/* Per-conversation unread badge: red pill anchored to the avatar's top-right corner.
   Counter-pulses lightly to draw the eye but doesn't loop forever (1.5s, then settles). */
.inbox-contact-unread-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--mud-palette-error, #ef4444);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--mud-palette-surface, #fff);
    animation: inbox-unread-pop .35s ease-out;
}

@keyframes inbox-unread-pop {
    0%   { transform: scale(0);   opacity: 0; }
    60%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}

/* Subtle row emphasis when there are pending unread messages. */
.inbox-contact-unread .inbox-contact-phone {
    font-weight: 700;
}
.inbox-contact-unread .inbox-contact-preview {
    color: var(--mud-palette-text-primary, #1f2937);
    font-weight: 500;
}

.av-blue    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.av-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.av-violet  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.av-amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.av-rose    { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.av-cyan    { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.av-indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }

.inbox-contact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inbox-contact-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inbox-contact-phone {
    font-size: .8125rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-contact-time {
    font-size: .625rem;
    color: #94a3b8;
    flex-shrink: 0;
    margin-left: .5rem;
    font-weight: 500;
}

.inbox-contact-row2 {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.inbox-channel-tag {
    font-size: .5625rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.5;
}

.inbox-channel-tag.ch-sms {
    background: rgba(59,130,246,.08);
    color: #3b82f6;
}

.inbox-channel-tag.ch-wa {
    background: rgba(34,197,94,.08);
    color: #16a34a;
}

.inbox-channel-tag.ch-voice {
    background: rgba(139,92,246,.08);
    color: #7c3aed;
}

.inbox-contact-stat {
    font-size: .5625rem;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 2px;
}

.inbox-contact-row3 {
    display: flex;
}

.inbox-contact-preview {
    font-size: .75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ── Skeleton ── */
.inbox-contact-skeleton {
    display: flex;
    gap: .625rem;
    padding: .625rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.inbox-contact-skeleton-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 2px;
}

/* ── Empty Sidebar ── */
.inbox-empty-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    flex: 1;
}

.inbox-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .625rem;
    color: #94a3b8;
}

.inbox-empty-title {
    font-weight: 600;
    font-size: .875rem;
    color: #1e293b;
    margin: 0 0 .25rem;
}

.inbox-empty-desc {
    font-size: .75rem;
    color: #64748b;
    margin: 0 0 .75rem;
    line-height: 1.4;
}

.inbox-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: .375rem .75rem;
    font-size: .75rem;
    font-weight: 500;
    color: #6366f1;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.inbox-empty-btn:hover {
    background: rgba(99,102,241,.05);
    border-color: #6366f1;
}

/* ── Pagination ── */
.inbox-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.inbox-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all .12s;
}

.inbox-page-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #1e293b;
}

.inbox-page-btn:disabled {
    opacity: .3;
    cursor: default;
}

.inbox-page-info {
    font-size: .6875rem;
    color: #64748b;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* ============================================================
   DETAIL PANEL (Right Side)
   ============================================================ */

.inbox-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
    min-width: 0;
    overflow: hidden;
}

/* ── Placeholder ── */
.inbox-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    text-align: center;
    padding: 2rem;
}

.inbox-placeholder-visual {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .375rem;
}

.inbox-placeholder-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed #cbd5e1;
    animation: inbox-spin 20s linear infinite;
}

@keyframes inbox-spin {
    to { transform: rotate(360deg); }
}

.inbox-placeholder-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.inbox-placeholder-desc {
    margin: 0;
    font-size: .8125rem;
    color: #64748b;
    max-width: 280px;
    line-height: 1.5;
}

/* ── Detail Header ── */
.inbox-detail-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    min-height: 56px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.inbox-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: background .12s;
}

.inbox-back-btn:hover { background: #f1f5f9; }

.inbox-detail-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.inbox-detail-info {
    flex: 1;
    min-width: 0;
}

.inbox-detail-phone {
    font-size: .9375rem;
    font-weight: 600;
    color: #1e293b;
}

.inbox-detail-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
    flex-wrap: wrap;
}

.inbox-detail-stats {
    display: flex;
    gap: 8px;
    font-size: .6875rem;
    color: #94a3b8;
}

.inbox-detail-stats span {
    display: inline;
}

/* ── Refresh Button ── */
.inbox-refresh-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}

.inbox-refresh-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.inbox-refresh-btn:disabled {
    opacity: .5;
    cursor: default;
}

.inbox-refresh-spinning {
    animation: spin-refresh .8s linear infinite;
}

@keyframes spin-refresh {
    to { transform: rotate(360deg); }
}

/* ── Detail Channel Tabs ── */
.detail-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 2px solid #e2e8f0;
    padding: 0 1.25rem;
}

.detail-tab {
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .625rem 1.125rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .15s;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
    font-family: inherit;
}

.detail-tab:hover {
    color: #475569;
}

.detail-tab-active {
    color: #1e293b;
}

.detail-tab-active.detail-tab-sms {
    border-bottom-color: #3b82f6;
    color: #2563eb;
}

.detail-tab-active.detail-tab-wa {
    border-bottom-color: #22c55e;
    color: #16a34a;
}

.detail-tab-active.detail-tab-voice {
    border-bottom-color: #8b5cf6;
    color: #7c3aed;
}

.detail-tab-count {
    font-size: .625rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #94a3b8;
    line-height: 1.3;
}

.detail-tab-active .detail-tab-count {
    color: inherit;
}

.detail-tab-active.detail-tab-sms .detail-tab-count {
    background: rgba(59,130,246,.08);
}

.detail-tab-active.detail-tab-wa .detail-tab-count {
    background: rgba(34,197,94,.08);
}

.detail-tab-active.detail-tab-voice .detail-tab-count {
    background: rgba(139,92,246,.08);
}

/* ============================================================
   TIMELINE
   ============================================================ */

.inbox-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    background: #f8fafc;
}

.inbox-timeline::-webkit-scrollbar { width: 4px; }
.inbox-timeline::-webkit-scrollbar-track { background: transparent; }
.inbox-timeline::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Lazy-load indicators */
.tl-loading-older {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 0;
    font-size: .75rem;
    color: #6366f1;
    font-weight: 500;
}

.tl-load-more-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    padding: .375rem 0;
    font-size: .6875rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Loading */
.inbox-timeline-loading {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem 0;
}

.tl-skeleton-left   { display: flex; justify-content: flex-start; }
.tl-skeleton-right  { display: flex; justify-content: flex-end; }
.tl-skeleton-center { display: flex; justify-content: center; }

/* Empty */
.inbox-timeline-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: #94a3b8;
    font-size: .8125rem;
}

.inbox-timeline-empty p { margin: 0; }

/* ── Date Separator ── */
.tl-date-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .625rem 0 .375rem;
}

.tl-date-sep span {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 3px .75rem;
    border-radius: 12px;
    font-size: .625rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* ============================================================
   MESSAGE ROW — LiveChat-inspired layout
   Each row: [avatar-col] [content-col]
   Inbound: avatar left, bubble left-aligned
   Outbound: bubble right-aligned, avatar right
   ============================================================ */

.tl-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 75%;
    margin-bottom: 1px;
}

.tl-msg-row.tl-msg-in  { align-self: flex-start; flex-direction: row; }
.tl-msg-row.tl-msg-out { align-self: flex-end; flex-direction: row-reverse; }

/* Extra spacing before a new message group */
.tl-msg-row.tl-msg-first { margin-top: 12px; }
/* Extra spacing after last message in group */
.tl-msg-row.tl-msg-last  { margin-bottom: 4px; }

/* ── Avatar Column ── */
.tl-msg-avatar-col {
    width: 32px;
    min-width: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
}

.tl-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6875rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    transition: transform .15s;
}

.tl-msg-avatar:hover { transform: scale(1.08); }

.tl-avatar-bot {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}

.tl-avatar-customer {
    /* Color from GetAvatarColor helper */
}

.tl-avatar-agent {
    /* Color from GetAvatarColor helper */
}

/* ── Content Column ── */
.tl-msg-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

/* ── Sender Label ── */
.tl-msg-sender {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    padding: 0 4px;
}

.tl-msg-in .tl-msg-sender { justify-content: flex-start; }
.tl-msg-out .tl-msg-sender { justify-content: flex-end; }

.tl-msg-sender-name {
    font-size: .6875rem;
    font-weight: 600;
    color: #475569;
}

.tl-msg-sender-time {
    font-size: .5625rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ── Bubble ── */
.tl-msg-bubble {
    padding: .5rem .875rem;
    border-radius: 18px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* Inbound bubble — first/middle/last radius logic */
.tl-msg-in .tl-msg-bubble {
    background: #fff;
    border: 1px solid #e8ecf1;
    color: #1e293b;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 6px;
}

.tl-msg-in.tl-msg-first .tl-msg-bubble {
    border-top-left-radius: 18px;
}

.tl-msg-in:not(.tl-msg-first) .tl-msg-bubble {
    border-top-left-radius: 6px;
}

.tl-msg-in.tl-msg-last .tl-msg-bubble {
    border-bottom-left-radius: 4px;
}

/* Outbound bubble */
.tl-msg-out .tl-msg-bubble {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border: none;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 6px;
}

.tl-msg-out.tl-msg-first .tl-msg-bubble {
    border-top-right-radius: 18px;
}

.tl-msg-out:not(.tl-msg-first) .tl-msg-bubble {
    border-top-right-radius: 6px;
}

.tl-msg-out.tl-msg-last .tl-msg-bubble {
    border-bottom-right-radius: 4px;
}

.tl-msg-text {
    font-size: .8125rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.tl-msg-time {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 3px;
    font-size: .5625rem;
    opacity: .5;
}

/* ── Media ── */
.tl-msg-img-wrap {
    position: relative;
    margin-bottom: 6px;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--mud-palette-background-grey, #f1f5f9);
    transition: transform .12s ease, box-shadow .12s ease;
}

.tl-msg-img-wrap:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.tl-msg-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Hover-only download chip on the top-right of each thumb. */
.tl-msg-img-download {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff !important;
    text-decoration: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity .12s ease, background .12s ease;
}

.tl-msg-img-wrap:hover .tl-msg-img-download {
    opacity: 1;
}

.tl-msg-img-download:hover {
    background: rgba(0,0,0,.75);
}

.tl-msg-img-download .mud-icon-root {
    color: #fff !important;
    font-size: 16px;
}

/* "+N more" overlay shown on the 4th thumb when there are 5+ images. */
.tl-msg-img-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-weight: 600;
    font-size: 1.25rem;
    pointer-events: none;
}

/* Gallery layouts based on image count. */
.tl-msg-gallery {
    display: grid;
    gap: 4px;
    margin-bottom: 6px;
    max-width: 320px;
}

.tl-msg-gallery-1 {
    grid-template-columns: 1fr;
}

.tl-msg-gallery-1 .tl-msg-img-wrap {
    aspect-ratio: 4 / 3;
    max-width: 280px;
}

.tl-msg-gallery-2 {
    grid-template-columns: 1fr 1fr;
}

.tl-msg-gallery-2 .tl-msg-img-wrap {
    aspect-ratio: 1 / 1;
}

.tl-msg-gallery-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.tl-msg-gallery-3 .tl-msg-img-wrap:nth-child(1) {
    grid-row: 1 / 3;
    aspect-ratio: 1 / 1;
}

.tl-msg-gallery-3 .tl-msg-img-wrap:nth-child(2),
.tl-msg-gallery-3 .tl-msg-img-wrap:nth-child(3) {
    aspect-ratio: 1 / 1;
}

.tl-msg-gallery-4plus {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.tl-msg-gallery-4plus .tl-msg-img-wrap {
    aspect-ratio: 1 / 1;
}

/* ── Lightbox dialog ── */
.cc-lightbox-dialog {
    background: transparent !important;
    box-shadow: none !important;
}

.cc-lightbox-content {
    padding: 0 !important;
    background: transparent !important;
}

.cc-lightbox-root {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, .92);
    outline: none;
    margin: -24px;
}

.cc-lightbox-toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #fff;
}

.cc-lightbox-counter {
    font-size: .875rem;
    opacity: .8;
}

.cc-lightbox-actions {
    display: flex;
    gap: 4px;
}

.cc-lightbox-btn {
    color: #fff !important;
}

.cc-lightbox-btn:hover {
    background: rgba(255,255,255,.12) !important;
}

.cc-lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-out;
}

.cc-lightbox-img {
    max-width: 92vw;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    cursor: default;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    border-radius: 4px;
}

.cc-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff !important;
    background: rgba(0,0,0,.4) !important;
    z-index: 2;
}

.cc-lightbox-nav:hover {
    background: rgba(0,0,0,.7) !important;
}

.cc-lightbox-nav-prev { left: 16px; }
.cc-lightbox-nav-next { right: 16px; }

.cc-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    color: #fff;
    font-size: .8125rem;
}

.cc-lightbox-filename {
    opacity: .9;
    word-break: break-all;
    max-width: 60vw;
}

.cc-lightbox-meta {
    opacity: .55;
}

.tl-msg-file {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .625rem;
    border-radius: 8px;
    font-size: .75rem;
    text-decoration: none;
    margin-bottom: 4px;
    transition: opacity .12s;
}

.tl-msg-in .tl-msg-file {
    background: #f1f5f9;
    color: #6366f1;
}

.tl-msg-out .tl-msg-file {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.tl-msg-file:hover { opacity: .8; }

.tl-msg-fsize {
    font-size: .625rem;
    opacity: .7;
}

/* ============================================================
   CALL EVENT CARD
   ============================================================ */

.tl-call {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    align-self: center;
    max-width: 480px;
    width: 100%;
    margin: .25rem 0;
    transition: box-shadow .12s;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.tl-call:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.tl-call-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.call-completed .tl-call-icon { background: rgba(34,197,94,.1); color: #16a34a; }
.call-failed    .tl-call-icon { background: rgba(239,68,68,.1); color: #dc2626; }
.call-busy      .tl-call-icon { background: rgba(245,158,11,.1); color: #d97706; }
.call-active    .tl-call-icon { background: rgba(59,130,246,.1); color: #2563eb; }
.call-default   .tl-call-icon { background: rgba(107,114,128,.1); color: #6b7280; }

.tl-call-body {
    flex: 1;
    min-width: 0;
}

.tl-call-row1 {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.tl-call-label {
    font-size: .8125rem;
    font-weight: 600;
    color: #1e293b;
}

.tl-call-status {
    font-size: .625rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: capitalize;
}

.call-completed .tl-call-status { background: rgba(34,197,94,.08); color: #16a34a; }
.call-failed    .tl-call-status { background: rgba(239,68,68,.08); color: #dc2626; }
.call-busy      .tl-call-status { background: rgba(245,158,11,.08); color: #d97706; }
.call-active    .tl-call-status { background: rgba(59,130,246,.08); color: #2563eb; }
.call-default   .tl-call-status { background: rgba(107,114,128,.08); color: #6b7280; }

.tl-call-row2 {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin-top: 3px;
}

.tl-call-dur {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .6875rem;
    color: #64748b;
    font-weight: 500;
}

.tl-call-time {
    font-size: .6875rem;
    color: #94a3b8;
}

.tl-call-expand {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s;
    flex-shrink: 0;
}

.tl-call-expand:hover {
    background: #f1f5f9;
    color: #475569;
}

/* ── Call Events Timeline ── */
.tl-call-events {
    align-self: center;
    max-width: 480px;
    width: 100%;
    padding: .5rem 1rem .5rem 3.75rem;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: #fff;
    margin-top: -6px;
    margin-bottom: .25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.tl-call-evt {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem 0;
    position: relative;
    padding-left: 1rem;
}

.tl-call-evt::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: #e2e8f0;
}

.tl-call-evt:last-child::before { display: none; }

.tl-call-evt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    position: absolute;
    left: 0;
    z-index: 1;
}

.tl-call-evt-type {
    font-size: .75rem;
    font-weight: 500;
    color: #1e293b;
}

.tl-call-evt-status {
    font-size: .625rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
}

.tl-call-evt-time {
    font-size: .625rem;
    color: #94a3b8;
    margin-left: auto;
}

/* ============================================================
   COMPOSE BAR
   ============================================================ */

.inbox-compose {
    padding: .625rem 1.25rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.inbox-compose-inner {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: .375rem .5rem .375rem 1rem;
    transition: border-color .15s, box-shadow .15s;
}

.inbox-compose-inner:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.08);
    background: #fff;
}

.inbox-compose-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: .8125rem;
    font-family: inherit;
    color: #1e293b;
    min-width: 0;
    padding: .25rem 0;
}

.inbox-compose-input::placeholder {
    color: #94a3b8;
}

.inbox-compose-input:disabled {
    opacity: .5;
}

.inbox-compose-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #e2e8f0;
    color: #94a3b8;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s;
}

.inbox-compose-send-active {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99,102,241,.3);
}

.inbox-compose-send-active:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(99,102,241,.4);
}

.inbox-compose-send:disabled {
    opacity: .6;
    cursor: default;
    transform: none;
}

/* WhatsApp 24h window — shown above the compose bar when free-form messaging is blocked. */
.inbox-compose-warning {
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .625rem 1.25rem;
    background: color-mix(in srgb, var(--mud-palette-warning) 10%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--mud-palette-warning) 30%, transparent);
    color: var(--mud-palette-warning-darken);
    font-size: .75rem;
    line-height: 1.4;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .inbox-sidebar {
        width: 100%;
        min-width: unset;
    }

    .inbox-sidebar-hidden-mobile {
        display: none;
    }

    .inbox-back-btn {
        display: flex;
    }

    .tl-msg-row {
        max-width: 90%;
    }

    .inbox-topbar .inbox-title {
        font-size: .875rem;
    }

    .tl-call {
        max-width: 100%;
    }

    .tl-call-events {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .inbox-topbar {
        padding: 0 .75rem;
    }

    .inbox-contact {
        padding: .5rem .75rem;
    }

    .inbox-timeline {
        padding: .75rem;
    }

    .detail-tabs {
        padding: 0 .75rem;
    }

    .detail-tab {
        padding: .5rem .75rem;
        font-size: .75rem;
    }
}

/* ── Loan View Additions ── */

.inbox-section-header {
    padding: .5rem 1rem .25rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: #94a3b8;
    text-transform: uppercase;
}

.inbox-section-unassigned {
    margin-top: .5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: .75rem;
    color: #f59e0b;
}

.inbox-loan-type {
    font-size: .65rem;
    font-weight: 500;
    color: #6366f1;
    background: #eef2ff;
    border-radius: 4px;
    padding: 1px 6px;
    margin-right: 4px;
}

.inbox-phone-select {
    font-size: .75rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 8px;
    outline: none;
    cursor: pointer;
    max-width: 280px;
}

.inbox-phone-select:focus {
    border-color: #6366f1;
}

.inbox-unassigned-badge {
    font-size: .65rem;
    font-weight: 600;
    color: #f59e0b;
    background: #fffbeb;
    border-radius: 4px;
    padding: 1px 6px;
}

/* ── Calls Section ── */
.inbox-section-calls {
    margin-top: .5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: .75rem;
    color: #8b5cf6;
}

.inbox-call-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.inbox-call-avatar.call-completed { background: linear-gradient(135deg, #22c55e, #16a34a); }
.inbox-call-avatar.call-failed    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.inbox-call-avatar.call-busy      { background: linear-gradient(135deg, #f59e0b, #d97706); }
.inbox-call-avatar.call-active    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.inbox-call-avatar.call-default   { background: linear-gradient(135deg, #94a3b8, #64748b); }

.inbox-call-avatar-lg {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.inbox-call-avatar-lg.call-completed { background: linear-gradient(135deg, #22c55e, #16a34a); }
.inbox-call-avatar-lg.call-failed    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.inbox-call-avatar-lg.call-busy      { background: linear-gradient(135deg, #f59e0b, #d97706); }
.inbox-call-avatar-lg.call-active    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.inbox-call-avatar-lg.call-default   { background: linear-gradient(135deg, #94a3b8, #64748b); }

.inbox-call-direction {
    font-size: .625rem;
    font-weight: 600;
    color: #64748b;
}

.inbox-call-status-tag {
    font-size: .5625rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: capitalize;
}

.inbox-call-status-tag.call-completed { background: rgba(34,197,94,.08); color: #16a34a; }
.inbox-call-status-tag.call-failed    { background: rgba(239,68,68,.08); color: #dc2626; }
.inbox-call-status-tag.call-busy      { background: rgba(245,158,11,.08); color: #d97706; }
.inbox-call-status-tag.call-active    { background: rgba(59,130,246,.08); color: #2563eb; }
.inbox-call-status-tag.call-default   { background: rgba(107,114,128,.08); color: #6b7280; }

/* ============================================================
   EMBEDDED MODE (Form1003 Communication Panel)
   ============================================================ */
.inbox-shell-embedded {
    height: calc(100vh - 220px);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.inbox-shell-embedded .inbox-detail {
    max-width: 100%;
}

/* ============================================================
   END: communicationCenter.css
   ============================================================ */

/* ============================================================
   BEGIN: loanLock.css
   ============================================================ */
/* =============================================
   LOAN EDIT LOCKING
   Prefix: loan-lock-
   Used by: LoanLockBanner, Pipeline Presence,
            LoanLockReleaseRequestDialog
   ============================================= */

/* ---- Lock Banner (shown on loan edit page when locked by another user) ---- */
.loan-lock-banner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-sm, 8px) var(--spacing-lg, 20px);
    margin-bottom: var(--spacing-md, 12px);
    background: color-mix(in srgb, var(--mud-palette-warning) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-warning) 30%, transparent);
    border-radius: var(--clp-radius-lg, 12px);
    color: var(--mud-palette-text-primary);
}

.loan-lock-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--mud-palette-warning) 20%, transparent);
    flex-shrink: 0;
}

.loan-lock-banner-icon .mud-icon-root {
    color: var(--mud-palette-warning);
}

.loan-lock-banner-info {
    flex: 1;
    min-width: 0;
}

.loan-lock-banner-title {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--mud-palette-text-primary);
}

.loan-lock-banner-subtitle {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

.loan-lock-banner-actions {
    display: flex;
    gap: var(--spacing-xs, 4px);
    flex-shrink: 0;
}

/* ---- Pipeline Lock Indicator ---- */
.loan-lock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: color-mix(in srgb, var(--mud-palette-warning) 12%, transparent);
    color: var(--mud-palette-warning-darken);
    white-space: nowrap;
}

.loan-lock-indicator .mud-icon-root {
    font-size: 14px;
}

/* Subtle pulse animation for the lock icon */
@keyframes loan-lock-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.loan-lock-pulse {
    animation: loan-lock-pulse 2s ease-in-out infinite;
}

/* ---- Release Request Dialog overrides ---- */
.loan-lock-release-dialog {
    max-width: 480px !important;
}

.loan-lock-release-dialog .crm-dlg-header-desc {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================================
   END: loanLock.css
   ============================================================ */

/* ============================================================
   BEGIN: documents.css
   ============================================================ */
/* Documents module — Windows Explorer-style folder tree + document panel.
   Prefix:  dft- = DocumentFolderTree
            dfb- = DocumentBreadcrumb
            doc- = document panel shared bits
   Follows Design Guidelines section 4: prefer MudBlazor palette vars,
   use color-mix for translucent accents, never literal hex. */

/* ---- Tree container -------------------------------------------------------- */

.dft-root {
    padding: var(--spacing-xs, 4px);
    min-height: 200px;
    user-select: none;
}

.dft-empty {
    padding: var(--spacing-lg, 16px);
    color: var(--mud-palette-text-disabled);
}

.dft-readonly {
    opacity: 0.85;
    pointer-events: auto;
}

.dft-readonly .dft-node:hover {
    background: transparent !important;
}

/* ---- Root row ("All documents") ------------------------------------------- */

.dft-root-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    margin-bottom: 4px;
}

.dft-root-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.dft-root-row.dft-row-selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
    color: var(--mud-palette-primary-text);
    font-weight: 600;
}

.dft-icon {
    flex-shrink: 0;
}

.dft-icon-all {
    color: var(--mud-palette-primary);
}

/* ---- Tree nodes ----------------------------------------------------------- */

.dft-tree .mud-treeview-item-content {
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.dft-tree .mud-treeview-item-content:hover {
    background: var(--mud-palette-action-default-hover);
}

.dft-node {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 2px 4px;
    border-radius: 4px;
}

.dft-node .dft-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.dft-node-selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
    font-weight: 600;
}

/* Windows-like amber for tenant-predefined folders, info-blue for case-scoped. */
.dft-node-predefined .dft-icon {
    color: var(--mud-palette-warning);
}

.dft-node-case .dft-icon {
    color: var(--mud-palette-info);
}

.dft-node-synthetic .dft-icon {
    color: var(--mud-palette-secondary);
}

/* ---- Chips & counters ----------------------------------------------------- */

.dft-chip {
    display: inline-block;
    font-size: 0.65rem;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    flex-shrink: 0;
}

.dft-chip-predefined {
    background: color-mix(in srgb, var(--mud-palette-warning) 16%, transparent);
    color: var(--mud-palette-warning-darken);
}

.dft-chip-synthetic {
    background: color-mix(in srgb, var(--mud-palette-secondary) 16%, transparent);
    color: var(--mud-palette-secondary-darken);
}

.dft-count {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-secondary);
    flex-shrink: 0;
    font-weight: 500;
}

.dft-node-selected .dft-count {
    background: color-mix(in srgb, var(--mud-palette-primary) 24%, transparent);
    color: var(--mud-palette-primary-text);
}

/* ---- Context menu --------------------------------------------------------- */

.dft-ctx-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: transparent;
}

.dft-ctx-menu {
    z-index: 1201;
    min-width: 200px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.dft-ctx-menu .mud-list-item {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.dft-ctx-menu .mud-list-item-icon {
    min-width: 28px;
}

/* ---- Breadcrumb ---------------------------------------------------------- */

.dfb-breadcrumb {
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--mud-palette-background-grey);
    min-height: 36px;
}

.dfb-breadcrumb .dfb-home {
    padding: 4px;
}

/* ============================================================
   END: documents.css
   ============================================================ */

