/* CHEC 合同/协议风险审查系统 · 全站样式 */
:root {
  --navy-950: #051329;
  --navy-900: #071e3f;
  --navy-800: #0a2a5e;
  --navy-700: #103a78;
  --navy-600: #1a4a8f;
  --blue-accent: #2e7cf6;
  --gold: #c9a227;
  --gold-light: #e6c968;
  --ink: #1c2733;
  --gray-600: #5a6a7a;
  --gray-300: #c9d3de;
  --gray-100: #eef2f7;
  --bg: #f4f6fa;
  --white: #ffffff;
  --red: #c62828;
  --orange: #d97706;
  --green: #2e7d32;
  --serif: Georgia, 'Source Serif Pro', 'Times New Roman', serif;
  --sans: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --shadow-1: 0 1px 3px rgba(7, 30, 63, 0.08), 0 4px 14px rgba(7, 30, 63, 0.06);
  --shadow-2: 0 6px 24px rgba(7, 30, 63, 0.14);
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 4px rgba(7, 30, 63, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar img.logo { height: 34px; display: block; }
.site-title { display: flex; flex-direction: column; line-height: 1.25; }
.site-title .zh { font-size: 17px; font-weight: 700; color: var(--navy-800); letter-spacing: 0.5px; }
.site-title .en { font-size: 11.5px; color: var(--gray-600); font-family: var(--serif); letter-spacing: 0.3px; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 22px 16px;
  font-size: 13px;
  letter-spacing: 0.4px;
}
.footer .en { font-family: var(--serif); }

/* ---------- 首页 hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 500px at 78% -10%, rgba(46, 124, 246, 0.28), transparent 60%),
    radial-gradient(900px 480px at 12% 112%, rgba(201, 162, 39, 0.16), transparent 55%),
    linear-gradient(158deg, var(--navy-950) 0%, var(--navy-900) 42%, var(--navy-800) 100%);
  color: var(--white);
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 72px 24px;
  max-width: 980px;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-emblem { height: 74px; margin-bottom: 26px; opacity: 0.96; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 700; letter-spacing: 2px; }
.hero h2 {
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 26px);
  font-weight: 500;
  color: #bcd2f2;
  margin-top: 10px;
  letter-spacing: 1px;
}
.hero-divider {
  width: 72px; height: 3px; margin: 26px auto;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}
.hero p.tagline { font-size: 15.5px; color: #d7e3f5; max-width: 760px; margin: 0 auto; }
.hero p.tagline .en { display: block; font-family: var(--serif); color: #9fb8dd; font-size: 14px; margin-top: 6px; }

.cta-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 44px;
  padding: 18px 54px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--navy-900);
  background: linear-gradient(180deg, #f5d97a, var(--gold));
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(201, 162, 39, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}
.cta-btn .en { font-size: 13px; font-weight: 600; font-family: var(--serif); letter-spacing: 0.8px; opacity: 0.85; }
.cta-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 36px rgba(201, 162, 39, 0.45); }
.cta-btn:active { transform: translateY(-1px); }

.hero-features {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 58px;
  flex-wrap: wrap;
}
.hero-feature {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 16px 22px;
  min-width: 200px;
  text-align: left;
  transition: transform 0.25s ease, background 0.25s ease;
}
.hero-feature:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.1); }
.hero-feature .icon { font-size: 22px; }
.hero-feature .zh { font-weight: 600; font-size: 14.5px; margin-top: 6px; }
.hero-feature .en { font-size: 12px; color: #a8c0e2; font-family: var(--serif); }

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 审查页布局 ---------- */
.review-main {
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 22px 46px;
}
.review-columns {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.col {
  transition: flex-basis 0.7s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.5s ease, transform 0.6s ease, padding 0.7s ease;
}
.col-guide { flex: 0 0 300px; min-width: 0; }
.col-auth { flex: 1 1 360px; min-width: 0; }
.col-upload { flex: 1 1 420px; min-width: 0; }
.col-panel { flex: 0 0 0; min-width: 0; opacity: 0; overflow: hidden; pointer-events: none; }

.review-columns.verified .col-auth {
  flex: 0 0 0;
  opacity: 0;
  transform: translateX(-30px) scale(0.97);
  overflow: hidden;
  pointer-events: none;
}
.review-columns.verified .col-upload { flex: 0 0 380px; }
.review-columns.verified .col-panel { flex: 1 1 620px; opacity: 1; pointer-events: auto; overflow: visible; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(10, 42, 94, 0.06);
  padding: 22px 24px;
  height: 100%;
  animation: rise 0.6s ease both;
}
.card h3.card-title {
  font-size: 16px;
  color: var(--navy-800);
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--gray-100);
}
.card h3.card-title .en { font-family: var(--serif); font-weight: 500; font-size: 12px; color: var(--gray-600); }
.card h3.card-title::before {
  content: '';
  width: 4px; height: 16px;
  background: linear-gradient(180deg, var(--gold), var(--navy-600));
  border-radius: 2px;
  align-self: center;
}

/* 使用说明 */
.guide-list { list-style: none; font-size: 13px; color: var(--ink); }
.guide-list li { padding: 9px 0 9px 24px; position: relative; border-bottom: 1px dashed var(--gray-100); }
.guide-list li:last-child { border-bottom: none; }
.guide-list li::before {
  content: '◆';
  position: absolute; left: 4px; top: 9px;
  color: var(--gold);
  font-size: 10px;
}
.guide-list .en { display: block; color: var(--gray-600); font-size: 11.5px; font-family: var(--serif); margin-top: 2px; }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy-800); margin-bottom: 6px; }
.field label .en { font-weight: 400; color: var(--gray-600); font-size: 12px; font-family: var(--serif); }
.field input[type='text'], .field input[type='password'], .field textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fbfcfe;
}
.field input:focus, .field textarea:focus {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(46, 124, 246, 0.14);
  background: var(--white);
}
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 14px 0 18px; color: var(--ink); }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--navy-700); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  border-radius: 9px;
  transition: all 0.25s ease;
}
.btn-primary {
  color: var(--white);
  background: linear-gradient(180deg, var(--navy-600), var(--navy-800));
  box-shadow: 0 4px 14px rgba(10, 42, 94, 0.3);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(10, 42, 94, 0.38); }
.btn-primary:disabled {
  background: var(--gray-300);
  color: #8895a5;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-gold {
  color: var(--navy-900);
  background: linear-gradient(180deg, #f0d271, var(--gold));
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.3);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); }
.btn .en { font-size: 12px; font-weight: 600; opacity: 0.8; }

.msg { font-size: 13px; margin-top: 12px; padding: 10px 14px; border-radius: 8px; display: none; }
.msg.error { display: block; background: #fdecea; color: var(--red); border: 1px solid #f5c6c2; }
.msg.ok { display: block; background: #e8f5e9; color: var(--green); border: 1px solid #c8e6c9; }

.verified-badge {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--green);
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.review-columns.verified .verified-badge { display: flex; }

/* 上传区 */
.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 30px 18px;
  text-align: center;
  color: var(--gray-600);
  font-size: 13.5px;
  background: #fafbfd;
  transition: all 0.25s ease;
  cursor: pointer;
  margin-bottom: 16px;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--blue-accent);
  background: #f0f6ff;
  color: var(--navy-700);
}
.dropzone .di { font-size: 34px; display: block; margin-bottom: 8px; }
.dropzone .en { display: block; font-family: var(--serif); font-size: 12px; margin-top: 3px; }
.dropzone .file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-800);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  max-width: 100%;
  word-break: break-all;
}
.dropzone .file-chip .x { cursor: pointer; opacity: 0.7; font-weight: 700; }
.dropzone .file-chip .x:hover { opacity: 1; }
.upload-note { font-size: 12px; color: var(--gray-600); margin-top: 10px; line-height: 1.55; }

/* 模型选择 */
.model-options { display: flex; gap: 12px; }
.model-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 9px;
  cursor: pointer;
  background: #fbfcfe;
  transition: all 0.2s ease;
  font-size: 14px;
}
.model-option:has(input:checked) {
  border-color: var(--navy-600);
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(46, 124, 246, 0.12);
}
.model-option input { accent-color: var(--navy-700); width: 15px; height: 15px; }
.model-option .mo-name { font-weight: 700; color: var(--navy-800); }
.model-hint { font-size: 12px; color: var(--gray-600); margin-top: 8px; line-height: 1.5; }

/* 历史记录 */
.history-wrap { max-width: 1500px; margin: 20px auto 0; animation: rise 0.5s ease both; }

/* 任务面板 */
.progress-wrap { margin: 6px 0 14px; }
.progress-bar-outer {
  height: 12px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-inner {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy-600), var(--blue-accent) 60%, var(--gold-light));
  background-size: 200% 100%;
  animation: shimmer 2.2s linear infinite;
  transition: width 0.6s ease;
}
@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--gray-600); margin-top: 6px; }
.progress-meta .pct { font-weight: 700; color: var(--navy-800); font-size: 14px; }

.log-box {
  background: var(--navy-950);
  color: #c4d6ef;
  border-radius: 10px;
  font-family: 'Consolas', 'SF Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 14px 16px;
  height: 210px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.log-box .log-line { display: block; animation: rise 0.3s ease both; }
.log-box .t { color: #5d7ba3; margin-right: 8px; }
.log-box .log-en { color: #7d97bd; padding-left: 58px; display: block; font-style: italic; }
.log-box .err { color: #ff8a80; }

.deliverables { display: none; }
.deliverables.show { display: block; animation: rise 0.5s ease both; }
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fafcff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.file-row:hover { box-shadow: var(--shadow-1); transform: translateY(-1px); }
.file-row .ficon { font-size: 22px; }
.file-row .fname { flex: 1; font-size: 13px; word-break: break-all; color: var(--ink); }
.file-row .fname .sub { display: block; color: var(--gray-600); font-size: 11.5px; }
.file-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mini-btn {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  border: 1.5px solid var(--navy-600);
  background: var(--white);
  color: var(--navy-700);
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}
.mini-btn:hover { background: var(--navy-700); color: var(--white); }
.mini-btn.solid { background: var(--navy-700); color: var(--white); }
.mini-btn.solid:hover { background: var(--navy-800); }

/* 报告预览 */
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 19, 41, 0.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.preview-modal.show { display: flex; }
.preview-shell {
  background: var(--white);
  width: min(980px, 100%);
  height: min(88vh, 1000px);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rise 0.35s ease both;
}
.preview-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--navy-900);
  color: var(--white);
}
.preview-head .pt { flex: 1; font-size: 14.5px; font-weight: 600; }
.preview-head .close {
  background: none; border: none; color: var(--white);
  font-size: 22px; opacity: 0.8; line-height: 1;
}
.preview-head .close:hover { opacity: 1; }
.preview-body { flex: 1; overflow-y: auto; padding: 34px 44px; }

.rp h1 { font-size: 24px; color: var(--navy-800); text-align: center; margin-bottom: 2px; }
.rp .rp-sub { text-align: center; color: var(--gray-600); font-family: var(--serif); margin-bottom: 24px; }
.rp table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0 22px; }
.rp th, .rp td { border: 1px solid var(--gray-300); padding: 8px 12px; text-align: left; vertical-align: top; }
.rp th { background: var(--navy-800); color: var(--white); font-weight: 600; }
.rp td.label { background: var(--gray-100); font-weight: 600; width: 150px; color: var(--navy-800); }
.rp h2 {
  font-size: 18px; color: var(--navy-800);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin: 30px 0 12px;
}
.rp h3 { font-size: 15px; color: var(--navy-700); margin: 18px 0 8px; }
.rp .lv { font-weight: 700; padding: 1px 10px; border-radius: 999px; font-size: 12px; display: inline-block; }
.rp .lv.high { background: #fdecea; color: var(--red); }
.rp .lv.medium { background: #fef3e2; color: var(--orange); }
.rp .lv.low { background: #e8f5e9; color: var(--green); }
.rp .excerpt { background: #f8f9fb; border-left: 3px solid var(--gray-300); padding: 8px 12px; font-size: 12.5px; color: #444; margin: 6px 0; white-space: pre-wrap; }

/* 通知条 */
.notice {
  font-size: 12.5px;
  background: #fff8e6;
  color: #8a6d1a;
  border: 1px solid #f2e2ae;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: none;
}
.notice.show { display: block; }

/* ---------- 管理后台 ---------- */
.admin-main { max-width: 1200px; margin: 0 auto; padding: 30px 22px 50px; width: 100%; }
.admin-login { max-width: 420px; margin: 60px auto; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.admin-tab {
  padding: 10px 22px;
  border: none;
  border-radius: 9px 9px 0 0;
  background: var(--gray-100);
  color: var(--gray-600);
  font-weight: 600;
  font-size: 14px;
}
.admin-tab.active { background: var(--navy-800); color: var(--white); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--white); box-shadow: var(--shadow-1); border-radius: 10px; overflow: hidden; }
.admin-table th { background: var(--navy-800); color: var(--white); text-align: left; padding: 10px 14px; font-weight: 600; }
.admin-table td { padding: 9px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.admin-table tr:hover td { background: #f6f9fd; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.tag.unused { background: var(--gray-100); color: var(--gray-600); }
.tag.bound { background: #e3f0ff; color: var(--navy-600); }
.tag.disabled { background: #fdecea; color: var(--red); }
.tag.completed { background: #e8f5e9; color: var(--green); }
.tag.failed { background: #fdecea; color: var(--red); }
.tag.processing, .tag.pending { background: #fef3e2; color: var(--orange); }
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .review-columns { flex-direction: column; }
  .col-guide, .col-auth, .col-upload, .col-panel { flex: 1 1 auto !important; }
  .col-panel { display: none; }
  .review-columns.verified .col-auth { display: none; }
  .review-columns.verified .col-panel { display: block; opacity: 1; pointer-events: auto; }
  .preview-body { padding: 22px 18px; }
}
