/* 平台端、企业端管理页面的样式（律所端的在 firm.css）。颜色、字体沿用 style.css 里的变量。 */

/* 平台端的侧栏用石墨色，与企业端的墨蓝、律所端的墨绿区分 */
body.platform { --ink: #2a2724; --ink-2: #3b3733; }
body.platform #nav { background: #2a2724; color: #aaa49b; }
body.platform .brand small { color: #d9c08c; letter-spacing: 3px; }
body.platform .nav-group { color: #7d766c; }
body.platform .nav-user small, body.platform .nav-model { color: #9a948a; }

/* ---------- 数字卡片 ---------- */
.end-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.end-tile {
  display: block; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text); transition: border-color .15s;
}
a.end-tile:hover { border-color: var(--gold); }
.end-tile b { display: block; font-family: Georgia, var(--serif); font-size: 26px; font-weight: 400; line-height: 1.25; color: var(--ink); white-space: nowrap; }
.end-tile span { display: block; font-weight: 600; color: var(--ink); margin-top: 4px; }
.end-tile small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.end-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.end-card-head a { font-size: 13.5px; }
.page > .grid { margin: 16px 0; }

/* ---------- 需要处理 ---------- */
.end-todo { list-style: none; margin: 10px 0 0; padding: 0; }
.end-todo li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid #efe9db; }
.end-todo li:last-child { border-bottom: 0; }
.end-todo li > span:nth-child(2) { flex: 1; }
.end-todo .badge { flex: none; }
.end-todo a { flex: none; font-size: 13.5px; }

/* ---------- 最近 14 天的柱状图 ---------- */
.end-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 14px; padding-bottom: 22px; position: relative; }
.end-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.end-bar i { display: block; width: 100%; max-width: 34px; min-height: 2px; background: var(--gold); border-radius: 2px 2px 0 0; opacity: .85; }
.end-bar em { font-style: normal; font-size: 12px; line-height: 1.5; color: var(--muted); }
.end-bar span { position: absolute; bottom: -22px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.end-note { color: var(--muted); }

@media (max-width: 700px) {
  .end-tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .end-tile b { font-size: 21px; }
  .end-bar span { display: none; }
  .end-bars { padding-bottom: 0; }
}

/* ---------- 平台的专题库（平台端“专题库”页、律所端“知识库授权”页） ---------- */
.kb-lib .end-card-head { align-items: center; flex-wrap: wrap; }
.kb-lib .end-card-head h3 { margin: 0; }
.kb-desc { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
.kb-counts { margin: 8px 0 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
tr.kb-off td { color: var(--muted); }
.kb-radio { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; cursor: pointer; }
.kb-radio small { color: var(--muted); }
.kb-types { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0 24px; }

/* 律所端：平台授权给本所的每个专题库 */
.kb-plib { padding: 14px 0; border-top: 1px solid var(--line); }
.kb-desc + .kb-plib { margin-top: 14px; }
.kb-plib-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.kb-plib-head b { font-family: var(--serif); font-size: 16px; color: var(--ink); margin-right: 10px; }
.kb-plib-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.kb-plib-head .btn { flex: none; }
.kb-plib-on { margin-top: 8px; font-size: 13.5px; }
.kb-plib-on .hf-label { margin-right: 10px; }
.kb-cos { margin-top: 12px; padding: 12px 14px; background: #faf7f0; border: 1px solid var(--line); border-radius: var(--radius); }
.kb-all { font-weight: 600; }
.kb-co-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 18px; margin: 10px 0 14px; }
.kb-co-list .badge { margin-left: 4px; }

/* 材料的出处：原文弹窗和右侧栏的标签行里、回答下方的出处标签里 */
.doc-origin { color: var(--muted); font-size: 13.5px; line-height: 22px; margin-left: 4px; }
.source-from { color: var(--muted); font-size: 13.5px; }

/* ---------- 总管理员（super.js） ---------- */
/* 顶部的提示条：进入某一家律所或企业后一直显示。琥珀色，和普通页面明显不同 */
#super-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 38px; z-index: 46; display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 0 16px; background: #e9a23b; color: #2b1d00; font-size: 13.5px; letter-spacing: .5px; box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.super-bar-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.super-bar-text b { font-weight: 600; }
.super-bar-btn { flex: none; border: 1px solid #2b1d00; background: transparent; color: #2b1d00; border-radius: 4px; padding: 2px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.super-bar-btn:hover { background: #2b1d00; color: #f6dcae; }
/* 提示条占了顶上 38 像素：页面整体往下让，吸附在窗口上的几块也跟着下移 */
body.super-acting { padding-top: 38px; min-height: calc(100vh - 38px); }
body.super-acting #nav, body.super-acting #doc-side { top: 38px; height: calc(100vh - 38px); }
body.super-acting .turn.has-toc > .toc { top: 62px; }

/* 选择进入哪一家：一行一家，点了就进入 */
.super-list { margin-top: 12px; max-height: min(52vh, 460px); overflow-y: auto; scrollbar-width: thin; border: 1px solid var(--line); border-radius: 4px; }
.super-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; width: 100%; text-align: left;
  padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; cursor: pointer;
}
.super-row:last-child { border-bottom: 0; }
.super-row:hover:not(:disabled) { background: var(--gold-soft); }
.super-row.on { box-shadow: inset 3px 0 0 var(--gold); }
.super-row.off { cursor: not-allowed; opacity: .5; }
.super-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.super-name small { margin-left: 8px; font-weight: 400; font-size: 13.5px; color: var(--gold-deep); }
.super-sub { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
.super-empty { padding: 18px 14px; color: var(--muted); font-size: 13.5px; text-align: center; }
.auth-platform .auth-card .super-row:hover:not(:disabled) { background: #2a2724; }

/* 侧栏分组下面的一行说明（例如：总管理员在律所端不能试用提问） */
.nav-note { padding: 2px 22px 8px; font-size: 13px; line-height: 1.6; color: #c9b68a; }
.auth-card button.link { color: var(--brand); font-size: 13.5px; }
.auth-card button.link:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 公开判决查询（cases.js） ---------- */
/* 左栏的“公开判决”按钮：青绿色实心，和其他菜单项明显不同 */
.nav-item.cases { display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin: 8px 14px 4px; padding: 8px 12px; border-radius: 6px; background: #14857c; color: #fff; border-left: 0; letter-spacing: 2px; }
.nav-item.cases:hover { background: #17998f; color: #fff; }
.nav-item.cases.active { background: #1fb3a7; color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.nav-item.cases .ico { margin: 0; }
.nav-item.cases .ico svg { width: 16px; height: 16px; }
.cases-tag { margin-left: 12px; padding: 1px 9px; border: 1px solid #14857c; border-radius: 3px; color: #14857c; font: 12.5px/20px var(--sans); letter-spacing: 1px; vertical-align: 4px; }
.cases-left { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.cases-bar { display: flex; gap: 10px; }
.cases-bar input { flex: 1; min-width: 0; font-size: 15.5px; padding: 10px 14px; }
.cases-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 12px 0 4px; font-size: 13.5px; color: var(--muted); }
.cases-filters label { display: flex; align-items: center; gap: 8px; }
.cases-filters select { width: auto; min-width: 110px; padding: 5px 10px; font-size: 13.5px; color: var(--text); }
.cases-results { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.cases-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.cases-summary b { font-family: var(--serif); font-size: 15px; color: var(--ink); }
.cases-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cases-title { font-weight: 600; color: var(--ink); line-height: 1.6; }
.cases-item .case-part { margin-left: 0; }
.cases-more { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.cases-more summary { cursor: pointer; }
.cases-more .case-part { color: var(--text); }
.cases-pager { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
/* 平台“律所管理”每行的开通状态 */
.firm-cases { display: flex; align-items: center; gap: 6px; }
.firm-cases b { font-weight: 400; color: var(--muted); }
.firm-cases b.on { color: #14857c; font-weight: 600; }
.firm-cases .btn { padding: 0 8px; font-size: 13.5px; line-height: 20px; }

/* 平台总览：数字卡片下面那句“另有演示律所 N 家，未计入” */
.end-demo-note { margin: -8px 0 18px; color: var(--muted); font-size: 13.5px; }

/* 企业管理首页“本月用在哪”：每行一条横条（D-022 B9） */
.use-bars { margin-top: 10px; }
.use-bar { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) 4em; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #efe9db; font-size: 14.5px; }
.use-bar:last-child { border-bottom: 0; }
.use-bar i { display: block; height: 10px; background: #f1ede3; border-radius: 5px; overflow: hidden; }
.use-bar em { display: block; height: 100%; background: var(--gold); border-radius: 5px; }
.use-bar b { text-align: right; font-weight: 400; color: var(--muted); white-space: nowrap; }

/* 手机版面（D-022 A1）：总管理员的提示条放两行，单位名称才看得全 */
@media (max-width: 760px) {
  #super-bar { height: 52px; gap: 8px; padding: 0 10px; font-size: 13px; line-height: 1.4; }
  .super-bar-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  body.super-acting { padding-top: 52px; min-height: calc(100vh - 52px); }
}
