/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #F9FAFB;
    color: #333;
    line-height: 1.6;
}

/* 主色调定义 */
:root {
    --primary-color: #1E40AF;
    --primary-light: #93C5FD;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --border-radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color), #2D4FCC);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.user-role {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.role-selector {
    position: relative;
    cursor: pointer;
}

.current-role {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.current-role:hover {
    background: rgba(255, 255, 255, 0.3);
}

.role-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    color: #333;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: none;
    min-width: 150px;
    z-index: 1000;
}

.role-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.role-option:hover {
    background: var(--primary-light);
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 主内容区域 */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 流程进度看板 */
.process-board {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.process-step {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid #E5E7EB;
    transition: var(--transition);
    cursor: pointer;
}

.process-step.active {
    border-color: var(--primary-color);
    background: rgba(29, 64, 175, 0.05);
}

.process-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.step-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.step-status {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.step-status[data-status="pending"] {
    color: var(--danger-color);
}

.step-status[data-status="in-progress"] {
    color: var(--primary-color);
}

.step-status[data-status="completed"] {
    color: var(--success-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: #6B7280;
}

/* 核心数据概览 */
.data-overview {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.data-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.data-card {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #F8FAFC, #EFF6FF);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #E5E7EB;
}

.data-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.9rem;
    color: #6B7280;
}

/* 智能体状态 */
.agent-status {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.agent-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
}

.agent-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.agent-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.agent-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    display: inline-block;
}

.agent-status-indicator.online {
    background: var(--success-color);
}

.agent-status-indicator.offline {
    background: #6B7280;
}

.agent-status-indicator.warning {
    background: var(--warning-color);
}

/* 政策合规提示 */
.compliance-notice {
    background: linear-gradient(135deg, #F0F9FF, #E0F2FE);
    border: 1px solid var(--primary-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.compliance-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shield-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.compliance-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.view-details-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.view-details-btn:hover {
    background: #2D4FCC;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 4% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
}

.close-modal:hover {
    color: var(--danger-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .process-steps,
    .data-cards,
    .agent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .process-steps,
    .data-cards,
    .agent-grid {
        grid-template-columns: 1fr;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 进度模态框样式 */
.progress-modal-content {
    text-align: center;
}

.progress-info {
    margin-bottom: 2rem;
}

.progress-bar-large {
    width: 100%;
    height: 20px;
    background: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill-large {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text-large {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.processing-details {
    text-align: left;
}

.processing-step {
    padding: 0.5rem 0;
    border-bottom: 1px solid #F3F4F6;
    color: #6B7280;
}

.processing-step:last-child {
    border-bottom: none;
}

/* 模态框内容样式 */
.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #F3F4F6;
}

.stat-item:last-child {
    border-bottom: none;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 悬浮底部操作栏（仅对带sticky类生效） */
.modal-actions.sticky {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), #ffffff 40%);
    padding-top: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
    z-index: 1;
}

/* 按钮样式美化 - 专业企业级设计 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2D4FCC);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2D4FCC, #3B63E6);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.4);
    transform: translateY(-1px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6B7280, #9CA3AF);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4B5563, #6B7280);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4);
    transform: translateY(-1px);
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

/* 特殊状态按钮 */
.btn-success {
    background: linear-gradient(135deg, var(--success-color), #34D399);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #34D399, #10B981);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #FBBF24);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* 按钮组样式 */
.btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-group .btn-primary,
.btn-group .btn-secondary {
    flex: 1;
}

/* 图标按钮 */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon::before {
    font-size: 1rem;
}

/* 禁用状态 */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover {
    background: inherit;
    transform: none;
    box-shadow: none;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background: var(--success-color);
    color: white;
}

.notification-info {
    background: var(--primary-color);
    color: white;
}

.notification-warning {
    background: var(--warning-color);
    color: white;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 警告和成功图标 */
.warning-icon, .success-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.warning-icon {
    color: var(--warning-color);
}

.success-icon {
    color: var(--success-color);
}