/**
 * 昌都市采购专家抽取系统 - 样式表
 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: #1890ff;
    text-decoration: none;
}

a:hover {
    color: #40a9ff;
}

/* 登录页面 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-box .logo i {
    font-size: 60px;
    color: #1890ff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-control.error {
    border-color: #ff4d4f;
}

.error-message {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 5px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-success {
    background: #52c41a;
    color: #fff;
}

.btn-success:hover {
    background: #73d13d;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

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

.btn-warning {
    background: #faad14;
    color: #fff;
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 12px;
}

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

/* 后台布局 */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: #001529;
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 18px;
    color: #fff;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #1890ff;
    color: #fff;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

/* 顶部导航 */
.top-nav {
    background: #fff;
    padding: 15px 20px;
    margin: -20px -20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.top-nav .breadcrumb {
    font-size: 14px;
    color: #666;
}

.top-nav .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-nav .user-info span {
    color: #666;
}

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

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 15px;
}

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

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

.stat-card .icon.orange {
    background: #fff7e6;
    color: #faad14;
}

.stat-card .icon.red {
    background: #fff1f0;
    color: #ff4d4f;
}

.stat-card .info h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-card .info .number {
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

/* 内容卡片 */
.content-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

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

.content-card .card-header h3 {
    font-size: 16px;
    color: #333;
}

.content-card .card-body {
    padding: 20px;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #fafafa;
    font-weight: 500;
    color: #666;
}

.data-table tr:hover {
    background: #f5f7fa;
}

.data-table .actions {
    white-space: nowrap;
}

.data-table .actions .btn {
    margin-right: 5px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #333;
}

.pagination a:hover {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.pagination .current {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

/* 搜索表单 */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-form .form-control {
    width: auto;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

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

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

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

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

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

/* 表单布局 */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* 图片上传 */
.image-upload {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-upload:hover {
    border-color: #1890ff;
}

.image-upload i {
    font-size: 40px;
    color: #999;
    margin-bottom: 10px;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
}

/* 模态框 */
.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;
}

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

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

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 消息提示 */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.alert-error {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #ff4d4f;
}

.alert-warning {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #faad14;
}

.alert-info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

/* 抽取结果展示 */
.extract-result {
    background: #f6ffed;
    border: 2px solid #b7eb8f;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.extract-result h4 {
    color: #52c41a;
    margin-bottom: 15px;
}

.expert-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.expert-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.expert-card .name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.expert-card .info {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.expert-card.backup {
    background: #fff7e6;
    border: 1px solid #ffd591;
}

/* 步骤条 */
.steps {
    display: flex;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e8e8e8;
    z-index: -1;
}

.step:last-child::after {
    display: none;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
}

.step.active .step-number,
.step.completed .step-number {
    background: #1890ff;
    color: #fff;
}

.step.active::after,
.step.completed::after {
    background: #1890ff;
}

.step-title {
    font-size: 13px;
    color: #666;
}

.step.active .step-title {
    color: #1890ff;
}

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

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 打印样式 */
@media print {
    .sidebar,
    .top-nav,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
}
