/* 投标管理工具 - 建筑蓝图风格 */

/* ==================== CSS 变量 ==================== */
:root {
    /* 颜色系统 - 建筑蓝图配色 */
    --bg-primary: #0a1628;
    --bg-secondary: #112240;
    --bg-card: #1a3050;
    --accent: #64ffda;
    --accent-hover: #9effed;
    --accent-secondary: #00b8d9;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --text-muted: #5a6785;
    --grid-line: #1a3a5c;
    --border: #233554;
    
    /* 状态颜色 */
    --status-draft: #8892b0;
    --status-bidding: #ffd43b;
    --status-opened: #00b8d9;
    --status-won: #69db7c;
    --status-lost: #ff6b6b;
    --status-archived: #5a6785;
    
    /* 字体 */
    --font-mono: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    --font-sans: 'Noto Sans SC', 'PingFang SC', -apple-system, sans-serif;
    
    /* 间距 */
    --sidebar-width: 200px;
    --header-height: 60px;
    
    /* 动效 */
    --transition-fast: 100ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* 阴影 */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(100, 255, 218, 0.15);
}

/* ==================== 重置样式 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 蓝图网格背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-fast);
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* 招标/中标列表区域：明确最大高度 + 滚动提示 */
.dynamic-section {
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;             /* Firefox */
    scrollbar-color: var(--border) var(--bg-primary);
    padding-right: 4px;                /* 防止滚动条遮挡内容 */
}

/* ==================== 布局容器 ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sidebar-logo h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(100, 255, 218, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(100, 255, 218, 0.1);
    color: var(--accent);
    border-left-color: var(--accent);
}

.nav-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
}

/* ==================== 头部 ==================== */
.header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ==================== 内容区域 ==================== */
.content-area {
    padding: 16px;
    animation: fadeIn var(--transition-slow);
    max-width: 100%;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
}

.stat-card .sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    background: var(--status-lost);
    color: white;
}

.btn-danger:hover {
    background: #ff5252;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ==================== 搜索栏 ==================== */
.toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-select option {
    background: var(--bg-secondary);
}

/* ==================== 数据表格 ==================== */
.data-table {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(17, 34, 64, 0.5);
}

.data-table tbody tr:hover {
    background: rgba(100, 255, 218, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================== 状态标签 ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.draft {
    background: rgba(136, 146, 176, 0.2);
    color: var(--status-draft);
}

.status-badge.bidding {
    background: rgba(255, 212, 59, 0.2);
    color: var(--status-bidding);
}

.status-badge.opened {
    background: rgba(0, 184, 217, 0.2);
    color: var(--status-opened);
}

.status-badge.won {
    background: rgba(105, 219, 124, 0.2);
    color: var(--status-won);
}

.status-badge.lost {
    background: rgba(255, 107, 107, 0.2);
    color: var(--status-lost);
}

.status-badge.archived {
    background: rgba(90, 103, 133, 0.2);
    color: var(--status-archived);
}

/* ==================== 金额格式化 ==================== */
.amount {
    font-family: var(--font-mono);
    font-weight: 600;
}

.amount .unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 2px;
}

/* ==================== 操作按钮 ==================== */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.action-btn.danger:hover {
    border-color: var(--status-lost);
    color: var(--status-lost);
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    word-break: break-word;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    border-color: var(--status-lost);
    color: var(--status-lost);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label .required {
    color: var(--status-lost);
    margin-left: 4px;
}

.form-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ==================== 项目详情 ==================== */
.project-detail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.detail-title {
    font-size: 1.4rem;
    font-weight: 600;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 8px;
}

.info-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item .value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* ==================== 进度条 ==================== */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 20px 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 12px;
    left: calc(-50% + 12px);
    right: calc(50% + 12px);
    height: 2px;
    background: var(--border);
}

.progress-step:first-child::before {
    display: none;
}

.progress-step.completed::before {
    background: var(--accent);
}

.progress-step .dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.progress-step.completed .dot {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.progress-step.active .dot {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

.progress-step .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-step.completed .label,
.progress-step.active .label {
    color: var(--text-secondary);
}

/* ==================== 文件列表 ==================== */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.file-item .icon {
    font-size: 24px;
}

.file-item .info {
    flex: 1;
}

.file-item .name {
    font-weight: 500;
    margin-bottom: 2px;
}

.file-item .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ==================== 招标动态区块 ==================== */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
    max-width: 100%;
    overflow: hidden;
}

.dashboard-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    max-width: 100%;
    overflow: hidden;
}

.section-header {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.section-header h3 {
    font-size: 1rem;
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 4px;
}

.section-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* .dynamic-section 定义见上方（合并） */

.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dynamic-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.dynamic-item:hover {
    background: rgba(100, 255, 218, 0.05);
}

.dynamic-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.dynamic-tag.notice {
    background: rgba(0, 184, 217, 0.2);
    color: var(--status-opened);
}

.dynamic-tag.winner {
    background: rgba(105, 219, 124, 0.2);
    color: var(--status-won);
}

.dynamic-content {
    flex: 1;
    min-width: 0;
}

.dynamic-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.dynamic-meta {
    display: flex;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.section-empty,
.section-error,
.section-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.section-error {
    color: var(--status-lost);
}

/* ==================== 详情弹窗增强 ==================== */
.detail-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.detail-timeout {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
}

.timeout-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.detail-content-block {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 8px;
}

.detail-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-height: 400px;
    overflow-y: auto;
}

/* ==================== 响应式（侧边栏始终固定显示）==================== */
@media (max-width: 1200px) {
    .sidebar {
        transform: none !important;
    }
    .main-content {
        margin-left: var(--sidebar-width);
    }
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* ==================== 确认弹窗 ==================== */
.confirm-dialog {
    text-align: center;
}

.confirm-dialog .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-dialog h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.confirm-dialog p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.confirm-dialog .btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ==================== Toast 提示 ==================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn var(--transition-normal);
    box-shadow: var(--shadow-card);
}

.toast.success {
    border-color: var(--status-won);
}

.toast.error {
    border-color: var(--status-lost);
}

.toast .icon {
    font-size: 18px;
}

.toast.success .icon { color: var(--status-won); }
.toast.error .icon { color: var(--status-lost); }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== 截止日期徽章 ==================== */
.deadline-warn {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
    line-height: 1.4;
}
.deadline-warn.deadline-overdue {
    background: rgba(255, 107, 107, 0.2);
    color: var(--status-lost);
    border: 1px solid var(--status-lost);
}
.deadline-warn.deadline-today {
    background: rgba(255, 107, 107, 0.3);
    color: #fff;
    border: 1px solid var(--status-lost);
    animation: pulse 1.5s ease-in-out infinite;
}
.deadline-warn.deadline-urgent {
    background: rgba(255, 146, 43, 0.2);
    color: #ff922b;
    border: 1px solid #ff922b;
}
.deadline-warn.deadline-soon {
    background: rgba(255, 212, 59, 0.2);
    color: var(--status-bidding);
    border: 1px solid var(--status-bidding);
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==================== 登录页 ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}
.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 380px;
    box-shadow: var(--shadow-card);
}
.login-card h1 {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--accent);
    text-align: center;
}
.login-card p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
    font-size: 0.85rem;
}
.login-card .form-input {
    margin-bottom: 16px;
}
.login-card .btn {
    width: 100%;
    justify-content: center;
}
.login-card .error {
    color: var(--status-lost);
    font-size: 0.85rem;
    margin-top: 8px;
    text-align: center;
    min-height: 1.2em;
}

/* ==================== 用户管理页面 ==================== */
.page-users {
  padding: 24px;
}
.page-users .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-users .user-table {
  width: 100%;
  border-collapse: collapse;
}
.page-users .user-table th,
.page-users .user-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #1a3a5c;
}
.page-users .user-table th {
  color: #64ffda;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
}
.page-users .role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}
.page-users .role-badge.admin { background: rgba(100, 255, 218, 0.15); color: #64ffda; }
.page-users .role-badge.operator { background: rgba(255, 212, 59, 0.15); color: #ffd43b; }
.page-users .role-badge.viewer { background: rgba(0, 184, 217, 0.15); color: #00b8d9; }
.page-users .action-btn {
  padding: 4px 12px;
  margin-right: 8px;
  border: 1px solid #1a3a5c;
  background: transparent;
  color: #8892b0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}
.page-users .action-btn:hover {
  border-color: #64ffda;
  color: #64ffda;
}
.page-users .action-btn.danger:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

/* ==================== 隐藏类 ==================== */
.hidden {
    display: none !important;
}

/* ==================== 招标公告查询页面 ==================== */
.page-tender-notices { padding: 24px; }
.page-tender-notices .search-bar { display: flex; gap: 12px; margin-bottom: 20px; }
.page-tender-notices .search-bar input {
  flex: 1; padding: 8px 12px;
  background: #112240; border: 1px solid #1a3a5c;
  color: #8892b0; border-radius: 4px;
}
.page-tender-notices table { width: 100%; border-collapse: collapse; }
.page-tender-notices th, .page-tender-notices td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid #1a3a5c;
}
.page-tender-notices th { color: #64ffda; font-size: 11px; text-transform: uppercase; }
.page-tender-notices td { color: #8892b0; font-size: 13px; }
.page-tender-notices .notice-link { color: #64ffda; text-decoration: none; }
.page-tender-notices .notice-link:hover { text-decoration: underline; }
.page-tender-notices .pagination { display: flex; gap: 8px; align-items: center; margin-top: 20px; justify-content: center; }
.page-tender-notices .pagination button {
  padding: 6px 12px; border: 1px solid #1a3a5c;
  background: transparent; color: #8892b0; border-radius: 4px; cursor: pointer;
}
.page-tender-notices .pagination button:hover { border-color: #64ffda; color: #64ffda; }
.page-tender-notices .pagination button:disabled { opacity: 0.4; cursor: default; }

/* ==================== 中标公示查询页面 ==================== */
.page-zb-notices { padding: 24px; }
.page-zb-notices .search-bar { display: flex; gap: 12px; margin-bottom: 20px; }
.page-zb-notices .search-bar input {
  flex: 1; padding: 8px 12px;
  background: #112240; border: 1px solid #1a3a5c;
  color: #8892b0; border-radius: 4px;
}
.page-zb-notices table { width: 100%; border-collapse: collapse; }
.page-zb-notices th, .page-zb-notices td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid #1a3a5c;
}
.page-zb-notices th { color: #64ffda; font-size: 11px; text-transform: uppercase; }
.page-zb-notices td { color: #8892b0; font-size: 13px; }
.page-zb-notices .amount { color: #69db7c; font-family: 'JetBrains Mono', monospace; }
.page-zb-notices .pagination { display: flex; gap: 8px; align-items: center; margin-top: 20px; justify-content: center; }
.page-zb-notices .pagination button {
  padding: 6px 12px; border: 1px solid #1a3a5c;
  background: transparent; color: #8892b0; border-radius: 4px; cursor: pointer;
}
.page-zb-notices .pagination button:hover { border-color: #64ffda; color: #64ffda; }
.page-zb-notices .pagination button:disabled { opacity: 0.4; cursor: default; }

/* ==================== 移动端导航与布局 ==================== */
.hamburger-btn,
.sidebar-close-btn,
.sidebar-overlay {
    display: none;
}

.hamburger-btn,
.sidebar-close-btn {
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.hamburger-btn {
    flex-direction: column;
    gap: 5px;
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.sidebar-close-btn {
    font-size: 18px;
}

@media (max-width: 768px) {
    body.mobile-nav-open {
        overflow: hidden;
    }

    .sidebar {
        width: min(84vw, 280px);
        transform: translateX(-100%) !important;
        transition: transform var(--transition-normal);
        z-index: 1100;
        box-shadow: 12px 0 30px rgba(0, 0, 0, 0.45);
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
    }

    .sidebar-close-btn,
    .hamburger-btn {
        display: flex;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1090;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(0, 0, 0, 0.58);
        transition: opacity var(--transition-normal), visibility var(--transition-normal);
    }

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

    .main-content {
        width: 100%;
        min-width: 0;
        max-width: 100vw;
        margin-left: 0 !important;
    }

    .header {
        height: auto;
        min-height: var(--header-height);
        padding: 8px 12px;
        gap: 8px;
    }

    .header-left,
    .header-right {
        min-width: 0;
        gap: 8px;
    }

    .page-title {
        overflow: hidden;
        font-size: 1.05rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-right .btn {
        min-height: 40px;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .content-area {
        padding: 12px;
    }

    .dashboard-row {
        grid-template-columns: minmax(0, 1fr);
        margin: 16px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        min-width: 0;
        padding: 14px;
    }

    .stat-card .value {
        font-size: 1.6rem;
    }

    .toolbar,
    .filter-group,
    .detail-header,
    .detail-meta,
    .modal-footer,
    .page-users .page-header,
    .page-tender-notices .search-bar,
    .page-zb-notices .search-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .toolbar,
    .detail-header,
    .page-users .page-header,
    .page-tender-notices .search-bar,
    .page-zb-notices .search-bar {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        max-width: none;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        flex: 1 1 140px;
        min-width: 0;
    }

    .data-table,
    .page-users,
    .page-tender-notices,
    .page-zb-notices {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table table,
    .page-users table,
    .page-tender-notices table,
    .page-zb-notices table {
        min-width: 680px;
    }

    .page-users,
    .page-tender-notices,
    .page-zb-notices {
        padding: 0;
    }

    .project-detail {
        padding: 16px;
    }

    .detail-meta {
        gap: 8px 16px;
    }

    .info-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .modal {
        width: calc(100% - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 12px;
    }

    .modal-header,
    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .modal-footer .btn {
        flex: 1 1 120px;
        min-height: 44px;
        justify-content: center;
    }

    .action-btn {
        width: 44px;
        height: 44px;
    }

    .toast-container {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .toast {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .stats-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .header-right .btn {
        font-size: 0.8rem;
    }

    .progress-step .label {
        font-size: 0.68rem;
    }

    .login-card {
        width: calc(100% - 24px);
        padding: 28px 20px;
    }
}
