/* 昕岩 · 律所 AI 工作台 —— 深色企业风，与官网同源的克制风格 */
:root {
  --bg: #0d1117; --bg2: #161b22; --bg3: #1c2230; --line: #2a3140;
  --fg: #e6e9ef; --fg2: #9aa4b2; --fg3: #6b7484;
  --accent: #4f8cff; --accent2: #7aa7ff;
  --high: #e5484d; --mid: #d4a72c; --low: #46a758;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.65 "PingFang SC","Microsoft YaHei",sans-serif; }
button { font: inherit; cursor: pointer; border: none; border-radius: 8px; }
input, select, textarea { font: inherit; background: var(--bg3); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
a { color: var(--accent2); text-decoration: none; }
.hidden { display: none !important; }

.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 26px;
  border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 50; }
.topbar .logo { font-weight: 700; font-size: 16px; letter-spacing: 1px; }
.topbar .logo em { color: var(--accent); font-style: normal; }
.topbar .crumb { color: var(--fg2); font-size: 13px; }
.topbar .right { margin-left: auto; display: flex; gap: 10px; align-items: center; color: var(--fg3); font-size: 12px; }

.btn { background: var(--accent); color: #fff; padding: 9px 20px; border-radius: 8px; }
.btn:hover { background: var(--accent2); }
.btn.ghost { background: transparent; color: var(--fg2); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--fg); border-color: var(--fg3); }
.btn.sm { padding: 4px 12px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 访问码门 */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 26px; }
.gate .brand { font-size: 26px; font-weight: 700; letter-spacing: 2px; }
.gate .brand em { color: var(--accent); font-style: normal; }
.gate .card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 36px 44px; width: 420px; display: flex; flex-direction: column; gap: 16px; }
.gate input { text-align: center; font-size: 18px; letter-spacing: 3px; text-transform: uppercase; }
.gate .tip { color: var(--fg3); font-size: 12px; text-align: center; }
.err { color: var(--high); font-size: 13px; min-height: 18px; }

/* 工作台首页 */
.home { max-width: 1080px; margin: 40px auto; padding: 0 24px; }
.home h1 { font-size: 22px; margin-bottom: 6px; }
.home .sub { color: var(--fg2); margin-bottom: 30px; }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.module { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; cursor: pointer; transition: border-color .15s, transform .15s; }
.module:hover { border-color: var(--accent); transform: translateY(-2px); }
.module.soon { opacity: .55; cursor: default; }
.module.soon:hover { border-color: var(--line); transform: none; }
.module .icon { font-size: 24px; margin-bottom: 12px; }
.module h3 { font-size: 15px; margin-bottom: 6px; }
.module p { color: var(--fg2); font-size: 12.5px; }
.module .tag { display: inline-block; margin-top: 12px; font-size: 11px; color: var(--fg3);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; }
.notice { margin-top: 34px; padding: 14px 18px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--fg2); font-size: 12.5px; }

/* 文件与流程 */
.page { max-width: 1080px; margin: 30px auto; padding: 0 24px; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 56px; text-align: center;
  color: var(--fg2); cursor: pointer; transition: border-color .15s; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--fg); }
.filelist { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.filerow { display: flex; align-items: center; gap: 14px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; }
.filerow .name { font-weight: 600; }
.filerow .meta { color: var(--fg3); font-size: 12px; }
.filerow .right { margin-left: auto; display: flex; gap: 8px; }

.setup { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.setup .row { display: flex; gap: 12px; align-items: center; }
.setup label { width: 90px; color: var(--fg2); }

.progress-box { text-align: center; padding: 70px 0; color: var(--fg2); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 审阅工作台：双视图 */
.workbench { display: flex; height: calc(100vh - 57px); }
.pdfpane { flex: 1.15; overflow: auto; background: #22262e; padding: 18px; }
.pdfpage { position: relative; margin: 0 auto 14px; box-shadow: 0 2px 14px rgba(0,0,0,.5); }
.pdfpage canvas { display: block; }
.hl { position: absolute; background: rgba(79,140,255,.28); border: 1px solid rgba(79,140,255,.75);
  border-radius: 2px; pointer-events: none; transition: opacity .3s; }
.findpane { flex: 1; overflow: auto; border-left: 1px solid var(--line); background: var(--bg); }
.findpane .head { position: sticky; top: 0; background: var(--bg2); padding: 12px 18px;
  border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; z-index: 5; }
.findpane .head .stat { font-size: 12px; color: var(--fg2); }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--line);
  color: var(--fg2); background: transparent; }
.chip.on { border-color: var(--accent); color: var(--accent2); }
.finding { border-bottom: 1px solid var(--line); padding: 15px 18px; cursor: pointer; }
.finding:hover { background: var(--bg2); }
.finding.active { background: var(--bg3); border-left: 3px solid var(--accent); }
.finding .top { display: flex; gap: 8px; align-items: baseline; }
.badge { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 4px; color: #fff; }
.badge.高 { background: var(--high); } .badge.中 { background: var(--mid); color:#1c1500; } .badge.低 { background: var(--low); }
.finding .cno { color: var(--fg3); font-size: 12px; }
.finding .risk { margin-top: 5px; font-size: 13.5px; }
.finding .detail { margin-top: 10px; display: none; }
.finding.active .detail { display: block; }
.quote { background: var(--bg2); border-left: 3px solid var(--accent); padding: 8px 12px;
  margin: 8px 0; font-size: 12.5px; color: var(--fg2); border-radius: 0 6px 6px 0; }
.basis { font-size: 12px; color: var(--fg3); margin: 4px 0; }
.basis .src-reg { color: var(--low); } .basis .src-rule { color: var(--fg3); }
.sugg { background: rgba(70,167,88,.08); border: 1px solid rgba(70,167,88,.3); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.warn { color: var(--mid); font-size: 12px; }
.acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.acts .btn.adopted { background: var(--low); }
.acts .btn.rejected { background: var(--high); }
.decided { font-size: 12px; margin-top: 8px; }
.decided.adopted { color: var(--low); } .decided.rejected { color: var(--high); } .decided.edited { color: var(--accent2); }

.overview { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 14px; font-size: 13px; }
.overview b { color: var(--accent2); }
.overview .mc { color: var(--mid); }

.footer-note { padding: 12px 18px; color: var(--fg3); font-size: 11.5px; border-top: 1px solid var(--line); }
textarea.inline { width: 100%; min-height: 70px; margin-top: 8px; font-size: 13px; }
