/* CaseLab 现代专业数字专案台设计系统 (去 AI 味 / 去 Emoji / 纯矢量 Icon) */
:root {
  --bg-base: #0a0f1d;
  --bg-surface: #111827;
  --bg-card: #162032;
  --bg-hover: #1e293b;
  --border-subtle: #1f293d;
  --border-strong: #334155;
  --border-focus: #38bdf8;
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-cyan: #0891b2;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 矢量 Icon 基础 */
.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.icon-lg { width: 20px; height: 20px; }
.icon-sm { width: 14px; height: 14px; }

/* 顶部导航栏 */
.header-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.system-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.3px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
}

.budget-val {
  color: #f59e0b;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 13px;
}

.countdown-box {
  color: #f43f5e;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* 按钮规范 */
.btn {
  background: var(--accent-blue);
  color: #fff;
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

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

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-sub);
}

.btn-outline:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: #475569;
}

.btn-success { background: var(--accent-emerald); }
.btn-success:hover { background: #047857; }

.btn-danger { background: var(--accent-rose); }
.btn-danger:hover { background: #be123c; }

.btn-warning { background: var(--accent-amber); }
.btn-warning:hover { background: #b45309; }

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
}

/* 布局主容器 */
.layout-container {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: calc(100vh - 55px);
}

/* 侧边栏 */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.material-nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.12s ease;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--bg-card);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
  font-weight: 600;
}

.nav-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 主内容工作区 */
.main-content {
  padding: 20px 24px;
  overflow-y: auto;
}

/* 任务卡 Banner */
.task-banner {
  background: linear-gradient(180deg, #162032 0%, #0f172a 100%);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.task-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.task-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.task-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
}

.skill-tag {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* 工作区 Tab 导航 */
.tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
  padding-bottom: 6px;
}

.tab-btn {
  background: transparent;
  color: var(--text-sub);
  border: none;
  padding: 7px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border-subtle);
  font-weight: 600;
}

/* 案件文档阅读器样式 */
.case-document {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 24px;
  max-width: 1050px;
  margin: 0 auto;
}

.doc-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.doc-badge {
  display: inline-block;
  background: #334155;
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.doc-header h2 {
  font-size: 18px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 4px;
}

.doc-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.doc-body h4 {
  font-size: 14px;
  color: #93c5fd;
  margin: 18px 0 8px 0;
  border-left: 2px solid var(--accent-blue);
  padding-left: 8px;
}

.doc-body p {
  margin-bottom: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

/* 数据表格与工作台 */
.table-responsive {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.data-table th {
  background: var(--bg-card);
  color: var(--text-sub);
  padding: 8px 10px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(31, 41, 61, 0.6);
  color: #cbd5e1;
}

.data-table tr:hover {
  background: rgba(22, 32, 50, 0.6);
}

.filter-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-sub);
}

.filter-group select, .filter-group input {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
}

.filter-group select:focus, .filter-group input:focus {
  border-color: var(--border-focus);
}

/* 标签徽章 */
.badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-danger { background: rgba(225, 29, 72, 0.15); color: #fb7185; border: 1px solid rgba(225, 29, 72, 0.3); }
.badge-warning { background: rgba(217, 119, 6, 0.15); color: #fbbf24; border: 1px solid rgba(217, 119, 6, 0.3); }
.badge-success { background: rgba(5, 150, 105, 0.15); color: #34d399; border: 1px solid rgba(5, 150, 105, 0.3); }
.badge-info { background: rgba(8, 145, 178, 0.15); color: #38bdf8; border: 1px solid rgba(8, 145, 178, 0.3); }

/* 模态弹窗 */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  width: 90%;
  max-width: 480px;
  padding: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}
.modal-close:hover { color: #fff; }

/* 登录框卡片 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
}
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 28px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.form-group {
  margin-bottom: 14px;
  text-align: left;
}
.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 5px;
}
.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 13px;
  outline: none;
}
.form-input:focus {
  border-color: var(--border-focus);
}

/* 市场卡片 */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.market-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.market-item-card:hover {
  border-color: var(--border-strong);
}
.market-price-tag {
  color: #f59e0b;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 13px;
}
