/* =============================================
   千里马招标信息搜索平台 - 样式表
   ============================================= */

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

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

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

a:hover {
    text-decoration: underline;
}

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

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

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

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

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 12px;
}

/* 顶部导航 */
.top-nav {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0 30px;
    display: flex;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-right: 40px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    flex: 1;
}

.nav-menu a {
    color: #555;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-menu a:hover {
    background: #f0f0f0;
    color: #1890ff;
    text-decoration: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.btn-logout {
    color: #ff4d4f !important;
}

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

.page-header {
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 5px;
}

.page-header p {
    color: #888;
    font-size: 14px;
}

/* 搜索面板 */
.search-panel {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.search-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.search-field label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.search-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-field input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.input-keyword {
    font-size: 15px !important;
}

.search-actions {
    display: flex;
    gap: 10px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

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

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

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

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

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

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

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

.btn-default {
    background: #f0f0f0;
    color: #555;
}

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

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

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* 历史标签 */
.history-tags {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f5ff;
    color: #1890ff;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s;
}

.tag:hover {
    background: #1890ff;
    color: #fff;
    text-decoration: none;
}

/* 搜索结果 */
.results-panel {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

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

.results-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    color: #888;
    font-size: 13px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.3s;
}

.result-item:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
}

.result-checkbox {
    display: flex;
    align-items: flex-start;
    padding-top: 3px;
}

.result-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.result-content {
    flex: 1;
}

.result-content h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.result-content h4 a {
    color: #1890ff;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.meta-tag {
    font-size: 12px;
    color: #888;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
}

.result-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 任务卡片 */
.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #ddd;
}

.task-running {
    border-left-color: #52c41a;
}

.task-paused {
    border-left-color: #faad14;
}

.task-stopped {
    border-left-color: #ff4d4f;
}

.task-info h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.task-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
}

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

.status-2 {
    background: #fffbe6;
    color: #faad14;
}

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

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

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.data-table td {
    font-size: 13px;
    color: #555;
}

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

/* 个人中心 */
.profile-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1890ff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: #888;
}

.profile-info, .profile-password {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.profile-info h3, .profile-password h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.info-table {
    width: 100%;
}

.info-table th {
    text-align: left;
    padding: 8px 0;
    color: #888;
    font-weight: 500;
    font-size: 13px;
    width: 80px;
}

.info-table td {
    font-size: 13px;
    color: #333;
}

.password-form .form-group {
    margin-bottom: 15px;
}

.password-form label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.password-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 提示框 */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

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

.empty-state p:first-child {
    font-size: 18px;
    margin-bottom: 10px;
}

/* Toast */
.toast {
    position: fixed;
    top: 80px;
    right: 30px;
    padding: 12px 20px;
    background: #333;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #52c41a;
}

.toast-error {
    background: #ff4d4f;
}

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

.pagination a,
.pagination span {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

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

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

/* 响应式 */
@media (max-width: 768px) {
    .search-inputs {
        grid-template-columns: 1fr;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .top-nav {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .main-content {
        padding: 15px;
    }
}
