/* 客户服务看板样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 顶部标题栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    position: relative;
    z-index: 100;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.company-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header-center h1 {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    color: #ffffff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    text-align: center;
    font-style: italic;
}

.header-right {
    text-align: right;
}

.datetime {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.service-status {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

.status-active {
    color: #10b981;
    font-weight: bold;
    text-shadow: 0 0 10px #10b981;
}

/* 主要内容区域 */
.main-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 120px);
}

/* 行布局 */
.row-1, .row-2, .row-3, .row-4 {
    display: flex;
    gap: 20px;
    height: auto;
    min-height: 300px;
}

.row-1 { min-height: 350px; }
.row-2 { min-height: 400px; }
.row-3 { min-height: 300px; }
.row-4 { min-height: 280px; }

/* 面板通用样式 */
.panel {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
    animation: scan 4s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.panel:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.panel-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* 第一行：服务总览和实时工单 */
.service-overview {
    flex: 1.2;
}

.real-time-orders {
    flex: 0.8;
}

.panel-tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tab.active, .tab:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: #8b5cf6;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.service-stats {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 20px;
}

.stat-circle {
    position: relative;
}

.circle-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#8b5cf6 0deg 346deg, rgba(139, 92, 246, 0.2) 346deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.circle-inner {
    width: 80px;
    height: 80px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.circle-value {
    font-size: 24px;
    font-weight: bold;
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.circle-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.service-numbers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    flex: 1;
}

.number-item {
    text-align: center;
    padding: 15px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.number-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.number-value {
    font-size: 24px;
    font-weight: bold;
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.service-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

.category-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
}

.category-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.category-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.category-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.category-status.normal {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.category-status.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* 实时工单 */
.order-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.control-btn.active, .control-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.order-item.urgent {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.order-item.normal {
    border-left-color: #8b5cf6;
}

.order-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.order-item.urgent .order-priority {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.order-item.normal .order-priority {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.order-content {
    flex: 1;
}

.order-title {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.order-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.order-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 60px;
    text-align: center;
}

.btn-handle {
    padding: 6px 12px;
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-handle:hover {
    background: linear-gradient(45deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

/* 第二行：客户分析和满意度监控 */
.customer-analysis {
    flex: 1;
}

.satisfaction-monitor {
    flex: 1;
}

.customer-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customer-stats {
    display: flex;
    gap: 20px;
}

.customer-stat {
    text-align: center;
    padding: 15px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #8b5cf6;
    margin-bottom: 2px;
}

.stat-trend {
    font-size: 12px;
    font-weight: bold;
}

.stat-trend.up {
    color: #10b981;
}

.stat-trend.down {
    color: #ef4444;
}

.customer-chart {
    height: 200px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* 满意度监控 */
.satisfaction-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.satisfaction-kpis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.kpi-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.kpi-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.kpi-info {
    flex: 1;
}

.kpi-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 20px;
    font-weight: bold;
    color: #8b5cf6;
}

.satisfaction-chart {
    height: 180px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* 第三行：服务响应和质量分析 */
.response-analysis {
    flex: 1;
}

.quality-analysis {
    flex: 1;
}

.response-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.response-kpis {
    display: flex;
    gap: 20px;
}

.response-chart {
    height: 150px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* 质量分析 */
.quality-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quality-metrics {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.metric-category {
    font-size: 14px;
    color: #ffffff;
    font-weight: bold;
    min-width: 80px;
}

.metric-score {
    font-size: 18px;
    font-weight: bold;
    color: #8b5cf6;
    min-width: 40px;
}

.metric-bar {
    flex: 1;
    height: 8px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    border-radius: 4px;
    transition: width 1.5s ease;
}

/* 第四行：客服团队和投诉处理 */
.team-management {
    flex: 1;
}

.complaint-handling {
    flex: 1;
}

.team-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.team-stats {
    display: flex;
    gap: 20px;
}

.team-stat {
    text-align: center;
    padding: 15px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    flex: 1;
}

.team-performance h4 {
    color: #8b5cf6;
    margin-bottom: 15px;
    font-size: 16px;
}

.performance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.performance-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.staff-rank {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

.staff-info {
    flex: 1;
}

.staff-name {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.staff-area {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.staff-score {
    font-size: 16px;
    font-weight: bold;
    color: #8b5cf6;
}

/* 投诉处理 */
.complaint-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.complaint-summary {
    display: flex;
    gap: 20px;
}

.complaint-type {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid;
    flex: 1;
}

.complaint-type.critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.complaint-type.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.complaint-type.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.complaint-count {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.complaint-type.critical .complaint-count {
    color: #ef4444;
}

.complaint-type.warning .complaint-count {
    color: #f59e0b;
}

.complaint-type.info .complaint-count {
    color: #3b82f6;
}

.complaint-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.complaint-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
}

.complaint-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 6px;
    border-left: 4px solid;
}

.complaint-item.critical {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.complaint-item.warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.complaint-item.info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.complaint-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 50px;
}

.complaint-content {
    flex: 1;
}

.complaint-title {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.complaint-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.btn-emergency {
    padding: 6px 12px;
    background: linear-gradient(45deg, #ef4444, #dc2626);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-emergency:hover {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* 响应式设计 */
@media (max-width: 1600px) {
    .row-1, .row-2, .row-3, .row-4 {
        flex-direction: column;
        height: auto;
    }
    
    .panel {
        margin-bottom: 20px;
    }
    
    .service-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .customer-stats, .response-kpis {
        flex-direction: column;
    }
    
    .satisfaction-kpis {
        grid-template-columns: 1fr;
    }
    
    .team-stats, .complaint-summary {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-left, .header-right {
        justify-content: center;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .panel {
        padding: 15px;
    }
    
    .service-numbers {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: fadeInUp 0.6s ease-out;
}

.panel:nth-child(1) { animation-delay: 0.1s; }
.panel:nth-child(2) { animation-delay: 0.2s; }
.panel:nth-child(3) { animation-delay: 0.3s; }
.panel:nth-child(4) { animation-delay: 0.4s; }

/* 数据更新动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.number-value, .stat-value, .kpi-value {
    animation: pulse 2s infinite;
}