/* PC端专属程序 - 公共样式 */
:root {
    /* 主色调 - 与作业终端保持一致 */
    --primary: #00706B;
    --primary-dark: #005A56;
    --primary-deeper: #004542;
    --primary-light: #00898D;
    --primary-lighter: #00A8AB;
    --primary-bg: #E6F2F2;
    --primary-bg-light: #F0F7F7;
    
    /* 辅助色 */
    --accent: #C9973E;
    --accent-light: #F5E6C8;
    --accent-dark: #A07828;
    
    /* 功能色 - 与作业终端保持一致 */
    --success: #4CAF50;
    --success-bg: #E6F2EB;
    --danger: #F44336;
    --danger-bg: #F5E6E6;
    --warning: #FF9800;
    --warning-bg: #FDF3E2;
    --info: #2196F3;
    
    /* 中性色 - 与作业终端保持一致 */
    --bg: #F5F5F5;
    --surface: #FFFFFF;
    --surface-alt: #F7F8FA;
    --surface-hover: #EDF0F4;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #E0E0E0;
    --border-light: #F0F0F0;
    
    /* 阴影 - 与作业终端保持一致 */
    --shadow-sm: 0 1px 4px rgba(0,112,107,0.06);
    --shadow-md: 0 4px 16px rgba(0,112,107,0.08);
    --shadow-lg: 0 8px 32px rgba(0,112,107,0.12);
    
    /* 圆角 - 与作业终端保持一致 */
    --radius: 14px;
    --radius-sm: 10px;
    
    /* 尺寸常量 */
    --header-height: 60px;
    --sidebar-width: 240px;
    --nav-h: 64px;
    
    /* 兼容性变量映射（保留旧变量名以兼容现有代码） */
    --primary-color: var(--primary);
    --primary-hover: var(--primary-dark);
    --primary-active: var(--primary-deeper);
    --secondary-color: var(--primary-light);
    --accent-color: var(--primary-lighter);
    --bg-primary: var(--surface);
    --bg-secondary: var(--bg);
    --bg-tertiary: var(--primary-bg);
    --border-color: var(--border);
    --success-color: var(--success);
    --warning-color: var(--warning);
    --error-color: var(--danger);
    --info-color: var(--info);
    --radius-md: var(--radius);
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* 应用容器 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.top-header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.logo i {
    font-size: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.user-info i {
    font-size: 20px;
    color: var(--primary-color);
}

/* 主体内容 */
.main-body {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* 内容区域 */
.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    overflow-y: auto;
}

/* 欢迎页面 */
.welcome-container {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.welcome-icon i {
    font-size: 36px;
    color: white;
}

.welcome-card h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.welcome-card p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.quick-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-width: 120px;
}

.action-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-hover);
}

.action-btn i {
    font-size: 24px;
}

.action-btn span {
    font-size: 14px;
    font-weight: 500;
}

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

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 24px;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.stat-icon.green {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 页面标题 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    font-size: 24px;
    color: var(--primary-color);
}

.page-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

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

.btn-success:hover {
    background: #43A047;
}

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

.btn-warning:hover {
    background: #F57C00;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #D32F2F;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 卡片样式 */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary-color);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.data-table tr:hover {
    background: var(--primary-light);
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

.data-table .action-link {
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.data-table .action-link:hover {
    background: var(--primary-light);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label.required::after {
    content: '*';
    color: var(--error-color);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 101, 105, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* 标签样式 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tag-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.tag-success {
    background: #E8F5E9;
    color: var(--success-color);
}

.tag-warning {
    background: #FFF3E0;
    color: var(--warning-color);
}

.tag-danger {
    background: #FFEBEE;
    color: var(--error-color);
}

.tag-info {
    background: #E3F2FD;
    color: var(--info-color);
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    /* max-width: 500px;
    width: 90%;
    max-height: 90vh; */
    overflow-y: auto; 
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.active {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--info-color);
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: var(--success-color);
}

.toast.error i {
    color: var(--error-color);
}

.toast.warning i {
    color: var(--warning-color);
}

.toast.info i {
    color: var(--info-color);
}

/* 文件上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-area i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-area h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-area p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 搜索框 */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-primary);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* 筛选器 */
.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-item select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-primary);
    min-width: 120px;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
}

/* 响应式 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}
