/* ===== 组件样式 ===== */

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-icon.primary {
    background: #e6f7ff;
    color: #1890ff;
}

.stat-icon.success {
    background: #f6ffed;
    color: #52c41a;
}

.stat-icon.warning {
    background: #fffbe6;
    color: #faad14;
}

.stat-icon.info {
    background: #f5f5f5;
    color: #666;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #999;
}

/* 快捷操作区 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.action-btn {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    border-color: #1890ff;
    background: #e6f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
}

.action-btn-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.action-btn-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 标签 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: #e6f7ff;
    color: #1890ff;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
}

.badge-warning {
    background: #fffbe6;
    color: #faad14;
}

.badge-danger {
    background: #fff2f0;
    color: #ff4d4f;
}

.badge-info {
    background: #f5f5f5;
    color: #666;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: #fff;
    border: 2px solid #d9d9d9;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 6px 14px;
    min-width: 48px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.modal-close::after {
    content: 'ESC';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #999;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    letter-spacing: 0;
    text-transform: none;
}

.modal-close:hover {
    background: #f5f5f5;
    border-color: #1890ff;
    color: #1890ff;
}

.modal-close:hover::after {
    opacity: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast 消息 */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1001;
}

.toast {
    background: #fff;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease-out;
}

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

.toast-success {
    border-left: 4px solid #52c41a;
}

.toast-error {
    border-left: 4px solid #ff4d4f;
}

.toast-warning {
    border-left: 4px solid #faad14;
}

.toast-info {
    border-left: 4px solid #1890ff;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f5f5f5;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 16px;
}

/* 排班表格 */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #e8e8e8;
    padding: 12px;
    text-align: center;
}

.schedule-table th {
    background: #fafafa;
    font-weight: 600;
}

.schedule-table .time-slot {
    width: 60px;
}

.schedule-table .available {
    background: #f6ffed;
    border-color: #b7eb8f;
}

.schedule-table .overlap {
    background: #fffbe6;
    border-color: #ffe58f;
}

.schedule-table .flexible {
    background: #f5f5f5;
    border-color: #d9d9d9;
}
