/* ============================================
   CUSTOMER 360° VIEW - ENHANCED STYLES
   Version: 1.0
   Date: 2025-01-04
   ============================================ */

/* ===================
   COMPACT STATS GRID
   =================== */
.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item-compact {
    text-align: center;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 8px;
    transition: all 0.2s;
}

.stat-item-compact:hover {
    background: #E9ECEF;
    transform: translateY(-2px);
}

.stat-value-compact {
    font-size: 24px;
    font-weight: 700;
    color: #0066CC;
    margin-bottom: 4px;
}

.stat-label-compact {
    font-size: 11px;
    color: #6C757D;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===================
   TRAINING ITEMS ENHANCED
   =================== */
.training-list {
    margin-top: 16px;
}

.training-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.training-item:hover {
    background: #E9ECEF;
    transform: translateX(4px);
}

.training-item-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #E6F2FF, #CCE5FF);
    color: #0066CC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.training-item-content {
    flex: 1;
}

.training-item-content strong {
    font-size: 14px;
    color: #212529;
    display: block;
    margin-bottom: 4px;
}

.training-item-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6C757D;
    margin-top: 4px;
}

.training-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.training-item-meta i {
    font-size: 11px;
}

/* Badge colors */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #D4EDDA;
    color: #155724;
}

.badge-info {
    background: #D1ECF1;
    color: #0C5460;
}

.badge-secondary {
    background: #E2E3E5;
    color: #383D41;
}

/* ===================
   PIPELINE STAGES
   =================== */
.pipeline-stages {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.pipeline-stage {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 12px 8px;
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: 8px;
    border-left: 4px solid #0066CC;
    transition: all 0.2s;
}

.pipeline-stage:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.stage-label {
    font-size: 11px;
    color: #6C757D;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stage-count {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.stage-value {
    font-size: 12px;
    color: #0066CC;
    font-weight: 600;
}

/* Stage colors */
.pipeline-stage:nth-child(1) { border-left-color: #6C757D; }
.pipeline-stage:nth-child(2) { border-left-color: #17A2B8; }
.pipeline-stage:nth-child(3) { border-left-color: #FFC107; }
.pipeline-stage:nth-child(4) { border-left-color: #FF9800; }
.pipeline-stage:nth-child(5) { border-left-color: #28A745; }

/* ===================
   NOTES & COMMENTS
   =================== */
.notes-list {
    margin-top: 16px;
}

.note-item {
    padding: 14px;
    background: #FFF9E6;
    border-left: 4px solid #FFC107;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.note-item:hover {
    background: #FFF3CD;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.note-header strong {
    font-size: 13px;
    color: #212529;
}

.note-time {
    font-size: 11px;
    color: #6C757D;
    font-weight: 500;
}

.note-content {
    font-size: 14px;
    color: #495057;
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ===================
   BUTTONS ENHANCEMENTS
   =================== */
.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #0066CC;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-sm:hover {
    background: #0052A3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary-sm i {
    font-size: 12px;
}

/* ===================
   MODAL ENHANCEMENTS
   =================== */
.modal-v2 textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #CED4DA;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s;
}

.modal-v2 textarea:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.modal-v2 textarea::placeholder {
    color: #ADB5BD;
}

/* ===================
   RECOMMENDATION ITEMS (Future Use)
   =================== */
.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #FFF3E0;
    border-left: 4px solid #FF9800;
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.recommendation-item:hover {
    background: #FFE0B2;
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.recommendation-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.recommendation-content {
    flex: 1;
}

.recommendation-title {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin-bottom: 6px;
}

.recommendation-description {
    font-size: 13px;
    color: #6C757D;
    margin-bottom: 6px;
    line-height: 1.5;
}

.recommendation-priority {
    font-size: 11px;
    font-weight: 700;
    color: #D32F2F;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================
   RESPONSIVE DESIGN
   =================== */
@media (max-width: 768px) {
    .stats-grid-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-value-compact {
        font-size: 20px;
    }
    
    .pipeline-stages {
        gap: 6px;
    }
    
    .pipeline-stage {
        min-width: 70px;
        padding: 10px 6px;
    }
    
    .stage-count {
        font-size: 20px;
    }
    
    .training-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .training-item-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ===================
   LOADING STATES
   =================== */
.card-v2.loading {
    position: relative;
    min-height: 200px;
}

.card-v2.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #E9ECEF;
    border-top-color: #0066CC;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===================
   EMPTY STATES
   =================== */
.text-muted {
    color: #6C757D;
    font-size: 14px;
    line-height: 1.6;
}

.card-body-v2 .text-muted {
    padding: 20px 0;
    text-align: center;
}

/* ===================
   UTILITY CLASSES
   =================== */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.font-weight-bold { font-weight: 700 !important; }
.font-weight-semibold { font-weight: 600 !important; }
.font-weight-normal { font-weight: 400 !important; }
