/* Customer 360 CRM Panel Styles */

/* Placeholder State */
.customer-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px var(--panel-padding);
    color: var(--color-text-muted);
    text-align: center;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--color-surface-alt);
    border-radius: 50%;
}

.placeholder-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-text-muted);
}

.customer-placeholder p {
    font-size: 13px;
    max-width: 200px;
}

/* Customer Data */
.customer-data {
    flex: 1;
    overflow-y: auto;
    padding: var(--panel-padding);
}

.customer-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.customer-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-fallback {
    display: none;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    font-size: 20px;
    font-weight: 600;
    align-items: center;
    justify-content: center;
}

.customer-identity {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.customer-account {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.customer-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.tag.premium {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
}

.tag.tenure {
    background: var(--color-surface-alt);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

/* Customer Stats */
.customer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    padding: 12px 8px;
    background: var(--color-surface-alt);
    border-radius: var(--border-radius);
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.stat-value.risk-conservative {
    color: var(--color-success);
}

.stat-value.risk-moderate {
    color: var(--color-warning);
}

.stat-value.risk-aggressive {
    color: var(--color-error);
}

/* Verification Checklist */
.verification-checklist {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--color-surface-alt);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.verification-checklist h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.checklist-item:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}

.check-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border-dark);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-base);
}

.checklist-item.verified .check-icon {
    background: var(--color-success);
    border-color: var(--color-success);
}

.checklist-item.verified .check-icon::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 6px;
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmark-pop 0.3s ease-out;
}

@keyframes checkmark-pop {
    0% { transform: rotate(45deg) scale(0); }
    50% { transform: rotate(45deg) scale(1.2); }
    100% { transform: rotate(45deg) scale(1); }
}

.checklist-item.verified {
    color: var(--color-text-primary);
}

/* Recent Activity */
.recent-activity {
    margin-top: auto;
}

.recent-activity h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-list {
    list-style: none;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

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

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

.activity-icon.deposit {
    background: rgba(46, 132, 74, 0.1);
}

.activity-icon.deposit::before {
    content: '$';
    color: var(--color-success);
    font-weight: 600;
    font-size: 12px;
}

.activity-icon.doc {
    background: rgba(1, 118, 211, 0.1);
}

.activity-icon.doc::before {
    content: '📄';
    font-size: 12px;
}

.activity-icon.call {
    background: rgba(127, 63, 191, 0.1);
}

.activity-icon.call::before {
    content: '📞';
    font-size: 12px;
}

.activity-text {
    flex: 1;
    font-size: 13px;
    color: var(--color-text-primary);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-date {
    font-size: 12px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* Panel Slide In Animation */
.customer-data.slide-in {
    animation: slideInFromRight 0.4s ease-out;
}

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

/* Verified Badge Animation */
.panel-badge.show {
    animation: badgePopIn 0.3s ease-out;
}

@keyframes badgePopIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
