/* ═══════════════════════════════════════════
   铭恒建设投标管理系统 v4.3
   风格: vue-element-admin 企业级后台
   左栏深蓝 #304156 | 中栏白色 | 右栏浅灰 #F5F7FA
   ═══════════════════════════════════════════ */

:root {
    --sidebar-bg: #304156;
    --sidebar-text: #BFCBD9;
    --sidebar-active: #409EFF;
    --primary: #409EFF;
    --primary-light: #ECF5FF;
    --gold: #D4A843;
    --bg: #F0F2F5;
    --card-bg: #FFFFFF;
    --white: #FFFFFF;
    --text: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
    --border: #EBEEF5;
    --border-light: #E4E7ED;
    --hover-bg: #F5F7FA;
    --card-shadow: 0 2px 12px 0 rgba(0,0,0,0.06);
    --radius: 4px;
    --font-base: 18px;
}

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

body {
    font-family: 'PingFang SC','Microsoft YaHei','Helvetica Neue',sans-serif;
    font-size: var(--font-base); color: var(--text); background: var(--bg);
    height: 100vh; overflow: hidden;
}

/* ═══ 导航栏 ═══ */
.navbar {
    display: flex; align-items: center; justify-content: space-between;
    height: 50px; padding: 0 20px;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-shrink: 0; z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-logo-img { width: 32px; height: 32px; border-radius: 4px; }
.nav-logo-text { font-size: 18px; font-weight: 700; color: var(--gold); }
.nav-sep { color: #DCDFE6; font-size: 14px; margin: 0 4px; }
.nav-title { font-size: 15px; color: var(--text-regular); }
.nav-right { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 3px; }
.status-dot.online { background: #67C23A; }
.status-dot.offline { background: #F56C6C; }
.model-badge { color: var(--primary); cursor: default; }
.version-badge { background: var(--primary-light); color: var(--primary); padding: 2px 8px; border-radius: 10px; font-size: 12px; }

/* ═══ 三栏布局 ═══ */
.dashboard { display: flex; height: calc(100vh - 50px); }

/* ── 左栏：深蓝侧栏 ── */
.sidebar-left {
    width: 260px; min-width: 260px;
    background: var(--sidebar-bg); color: var(--sidebar-text);
    padding: 16px; display: flex; flex-direction: column; gap: 14px;
    overflow-y: auto;
}
.left-title { font-size: 16px; font-weight: 600; color: #fff; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.step-header { font-size: 14px; color: var(--sidebar-text); margin-bottom: 6px; }
.step-num { color: var(--sidebar-active); font-weight: 600; margin-right: 4px; }
.tag-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-btn {
    padding: 5px 10px; font-size: 13px; border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius); background: transparent; color: var(--sidebar-text);
    cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.cat-btn.active { background: var(--sidebar-active); color: #fff; border-color: var(--sidebar-active); }
.cat-btn:hover:not(.active) { border-color: var(--sidebar-active); color: #fff; }
.time-row { display: flex; flex-direction: column; gap: 4px; }
.time-opt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sidebar-text); cursor: pointer; }
.time-opt input { accent-color: var(--sidebar-active); }
.btn-search-confirm {
    width: 100%; padding: 10px; font-size: 15px; font-weight: 600;
    background: var(--sidebar-active); color: #fff; border: none; border-radius: var(--radius);
    cursor: pointer; font-family: inherit;
}
.btn-search-confirm:hover { opacity: 0.9; }
.search-summary { font-size: 12px; color: var(--sidebar-text); text-align: center; padding: 4px; }

/* ── 中栏：白色主区域 ── */
.chat-main {
    flex: 1; display: flex; flex-direction: column; background: #fff; min-width: 0;
}
.chat-header { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.chat-logo { width: 28px; height: 28px; border-radius: 4px; }
.chat-subtitle { font-size: 15px; color: var(--text); font-weight: 500; }
.chat-area { flex: 1; overflow-y: auto; padding: 16px 20px; }
.chat-input-bar { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--border); }
.btn-upload { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: #fff; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.chat-input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 18px; font-size: 14px; font-family: inherit; outline: none; }
.chat-input:focus { border-color: var(--primary); }
.btn-send { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer; font-size: 16px; }

/* ── 右栏：浅灰工具区 ── */
.sidebar-right {
    width: 300px; min-width: 300px;
    background: #F5F7FA; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
    overflow-y: auto; border-left: 1px solid var(--border);
}
.feature-card {
    background: #fff; border-radius: var(--radius); padding: 14px;
    box-shadow: var(--card-shadow);
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.btn-card-outline {
    width: 100%; padding: 8px; font-size: 13px; border: 1px solid var(--primary);
    border-radius: var(--radius); background: #fff; color: var(--primary);
    cursor: pointer; font-family: inherit; margin-bottom: 6px;
}
.btn-card-outline:hover { background: var(--primary-light); }
.btn-card-primary {
    width: 100%; padding: 8px; font-size: 13px; border: none; border-radius: var(--radius);
    background: var(--primary); color: #fff; cursor: pointer; font-family: inherit; margin-bottom: 6px;
}
.btn-card-primary:hover { opacity: 0.9; }
.card-link { display: block; font-size: 12px; color: var(--primary); text-decoration: none; text-align: center; }

/* ═══ 消息气泡 ═══ */
.msg-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.msg.user .msg-avatar { background: var(--primary); color: #fff; }
.msg.assistant .msg-avatar { background: var(--border); color: var(--text-secondary); }
.msg-bubble { max-width: 80%; padding: 10px 14px; border-radius: 8px; font-size: 15px; line-height: 1.6; }
.msg.user { flex-direction: row-reverse; }
.msg.user .msg-bubble { background: var(--primary-light); color: var(--text); }
.msg.assistant .msg-bubble { background: #fff; color: var(--text); border: 1px solid var(--border); }

/* ═══ 表格 ═══ */
.project-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.project-table th { background: #F5F7FA; color: var(--text-secondary); font-weight: 500; padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border); }
.project-table td { padding: 8px 6px; border-bottom: 1px solid var(--border-light); color: var(--text); cursor: pointer; }
.project-table tr:hover td { background: #F5F7FA; }
.project-table tr.selected td { background: var(--primary-light); }

/* ═══ v4.3 新组件 ═══ */
.province-select { width: 100%; padding: 8px 10px; font-size: 13px; background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); cursor: pointer; font-family: inherit; }
.province-select:focus { border-color: var(--sidebar-active); outline: none; }
.sidebar-left select option { background: #fff; color: #333; }
.split-separator { text-align: center; padding: 8px 0; margin: 8px 0; color: var(--text-secondary); font-size: 13px; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.btn-action-detail { padding: 4px 12px; font-size: 12px; font-weight: 500; border-radius: 3px; background: var(--primary); color: #fff; border: none; cursor: pointer; font-family: inherit; }
.btn-action-detail:hover { opacity: 0.88; }
.btn-action-link { padding: 4px 12px; font-size: 12px; font-weight: 500; border-radius: 3px; background: transparent; color: var(--gold); border: 1px solid var(--gold); cursor: pointer; font-family: inherit; }
.btn-action-link:hover { background: rgba(212,168,67,0.1); }
.btn-full { width: 100%; }

/* 分类标签（已废弃） */
/* 三栏标题 - 统一样式 */
.col-title {
    font-size: 18px; font-weight: 700; color: var(--gold);
    text-align: center; padding: 10px 0; margin-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.sidebar-left .col-title { color: #fff; border-bottom-color: rgba(255,255,255,0.15); }
.sidebar-right .col-title { color: var(--text); border-bottom-color: var(--border); }

/* 导航栏全部加粗 */
.nav-title, .nav-right, .model-badge, .version-badge { font-weight: 600; }

/* 模态框 */
.modal-overlay, .preview-overlay { 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: 8px; width: 560px; max-width: 90vw; max-height: 80vh; overflow-y: auto; padding: 24px; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-secondary); }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.modal-body { font-size: 14px; line-height: 1.8; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.preview-content { background: #fff; border-radius: 8px; width: 85vw; max-width: 1000px; max-height: 80vh; overflow-y: auto; padding: 24px; position: relative; }
.preview-text { white-space: pre-wrap; font-size: 14px; line-height: 1.8; margin-bottom: 16px; }
.btn-preview-download { padding: 8px 20px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; font-family: inherit; }

/* 项目详情卡片 */
.project-detail-card { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--card-shadow); margin-bottom: 10px; }
.pd-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.pd-meta { font-size: 12px; color: var(--text-secondary); }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #DCDFE6; border-radius: 3px; }

/* 响应式 */
@media (max-width: 1024px) {
    .sidebar-left { width: 220px; min-width: 220px; }
    .sidebar-right { width: 260px; min-width: 260px; }
}
@media (max-width: 768px) {
    .dashboard { flex-direction: column; }
    .sidebar-left, .sidebar-right { width: 100%; min-width: 100%; max-height: 200px; }
    .chat-main { height: calc(100vh - 50px - 400px); }
}

/* 模型下拉选择器 — 与导航栏风格一致 */
.model-select {
    height: 30px; padding: 0 8px; font-size: 14px;
    background: #fff; color: var(--primary); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; font-family: inherit;
    font-weight: 600; outline: none;
}
.model-select:focus { border-color: var(--primary); }
.model-select option { font-weight: 400; color: #333; }

/* 搜索历史 */
.search-history-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.search-history-tag { display: inline-block; padding: 2px 8px; font-size: 12px; background: rgba(255,255,255,0.1); border-radius: 3px; cursor: pointer; color: #ccc; transition: all 0.15s; }
.search-history-tag:hover { background: #409EFF; color: #fff; }

/* 收藏按钮 */
.btn-fav { background: none; border: none; cursor: pointer; font-size: 16px; padding: 2px 4px; color: #999; }
.btn-fav.fav-active { color: #f5a623; }
.btn-fav:hover { color: #f5a623; }

/* 收藏列表 */
.fav-item { padding: 6px 8px; cursor: pointer; border-radius: 4px; font-size: 13px; display: flex; align-items: center; gap: 6px; color: #ccc; transition: all 0.15s; }
.fav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.fav-star { color: #f5a623; font-size: 14px; flex-shrink: 0; }
.fav-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══ 下一页按钮 ═══ */
.btn-next-page { display: inline-block; padding: 6px 24px; font-size: 13px; border: 1px solid var(--primary, #409EFF); color: var(--primary, #409EFF); background: transparent; border-radius: 4px; cursor: pointer; margin: 4px auto; }
.btn-next-page:hover { background: var(--primary, #409EFF); color: #fff; }
.btn-next-page:disabled { opacity: 0.5; cursor: not-allowed; }
