/* 🆕 (Update 75) پوششِ محتوا و بانکِ سؤال — /question-bank/coverage */
.qbc {
    --qbc-ink: #172033; --qbc-ink-2: #475467; --qbc-ink-3: #667085;
    --qbc-bg: #f4f6f9; --qbc-surface: #ffffff; --qbc-line: #e3e8ef; --qbc-line-2: #eef2f6;
    --qbc-act: #1d4f91; --qbc-act-2: #173f75;
    --qbc-ok: #0f766e; --qbc-ok-bg: #e6f6f3; --qbc-warn: #8a4b08; --qbc-warn-bg: #fdf3e1;
    --qbc-bad: #b42318; --qbc-bad-bg: #fdeeec; --qbc-violet: #4c3bb5; --qbc-violet-bg: #efedfb;
    --qbc-r: 14px;
    max-width: 1280px; margin: 0 auto; padding: 16px; color: var(--qbc-ink); font-size: 13.5px;
}
[data-theme="dark"] .qbc {
    --qbc-ink: #e6eaf2; --qbc-ink-2: #c3cad6; --qbc-ink-3: #98a2b3;
    --qbc-bg: #0f1522; --qbc-surface: #151c2c; --qbc-line: #273246; --qbc-line-2: #1d2638;
    --qbc-act: #5b8def; --qbc-act-2: #7aa3f3;
    --qbc-ok: #5fd4c2; --qbc-ok-bg: rgba(15,118,110,.18); --qbc-warn: #f5c56b; --qbc-warn-bg: rgba(245,158,11,.12);
    --qbc-bad: #f59a92; --qbc-bad-bg: rgba(220,38,38,.14); --qbc-violet: #b3a8f5; --qbc-violet-bg: rgba(99,102,241,.16);
}
.qbc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.qbc-head h1 { margin: 0 0 4px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.qbc-head h1 i { color: var(--qbc-act); }
.qbc-head p { margin: 0; color: var(--qbc-ink-2); line-height: 1.9; }
.qbc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--qbc-line); background: var(--qbc-surface); color: var(--qbc-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.qbc-btn:hover { border-color: var(--qbc-act); }
.qbc-btn:focus-visible { outline: 3px solid rgba(29,79,145,.35); outline-offset: 2px; }
.qbc-btn.primary { background: var(--qbc-act); border-color: var(--qbc-act); color: #fff; }
.qbc-btn.primary:hover { background: var(--qbc-act-2); }
.qbc-btn.ghost { background: transparent; }
.qbc-btn.danger { color: var(--qbc-bad); }
.qbc-btn.sm { min-height: 30px; padding: 0 9px; font-size: 12px; }
.qbc-btn:disabled { opacity: .5; cursor: not-allowed; }
.qbc-spin { animation: qbc-rot .9s linear infinite; display: inline-block; }
@keyframes qbc-rot { to { transform: rotate(360deg); } }
.qbc-muted { color: var(--qbc-ink-3); font-size: 12.5px; line-height: 1.9; margin: 6px 0; }
.qbc-alert { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.qbc-alert.err { background: var(--qbc-bad-bg); color: var(--qbc-bad); }
.qbc-alert .qbc-btn { margin-inline-start: auto; }
.qbc-empty { text-align: center; padding: 60px 16px; color: var(--qbc-ink-2); }
.qbc-empty i { font-size: 40px; }
.qbc-empty-line { text-align: center; color: var(--qbc-ink-3); padding: 24px; }
.qbc-skel { display: grid; gap: 10px; }
.qbc-skel span { height: 64px; border-radius: 12px; background: linear-gradient(90deg, var(--qbc-line-2), var(--qbc-surface), var(--qbc-line-2)); background-size: 200% 100%; animation: qbc-sh 1.2s infinite; }
@keyframes qbc-sh { to { background-position: -200% 0; } }

.qbc-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.qbc-kpi { background: var(--qbc-surface); border: 1px solid var(--qbc-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.qbc-kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.qbc-kpi span { font-size: 12px; color: var(--qbc-ink-3); }
.qbc-kpi.ok b { color: var(--qbc-ok); } .qbc-kpi.bad b { color: var(--qbc-bad); } .qbc-kpi.warn b { color: var(--qbc-warn); }

.qbc-card { background: var(--qbc-surface); border: 1px solid var(--qbc-line); border-radius: var(--qbc-r); padding: 14px 16px; margin-bottom: 14px; }
.qbc-perm { border-inline-start: 4px solid var(--qbc-act); }
.qbc-perm.active { border-inline-start-color: var(--qbc-ok); }
.qbc-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; }
.qbc-card-head h2 { margin: 0; font-size: 15.5px; display: flex; align-items: center; gap: 6px; }
.qbc-card-head h2 i { color: var(--qbc-act); }
.qbc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--qbc-line-2); color: var(--qbc-ink-2); text-decoration: none; white-space: nowrap; }
.qbc-chip.ok { background: var(--qbc-ok-bg); color: var(--qbc-ok); }
.qbc-chip.warn { background: var(--qbc-warn-bg); color: var(--qbc-warn); }
.qbc-chip.bad { background: var(--qbc-bad-bg); color: var(--qbc-bad); }
.qbc-chip.violet { background: var(--qbc-violet-bg); color: var(--qbc-violet); }

.qbc-targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.qbc-targets label { display: flex; flex-direction: column; gap: 3px; background: var(--qbc-bg); border-radius: 10px; padding: 8px 10px; }
.qbc-targets span { font-weight: 700; font-size: 12.5px; }
.qbc-targets small { color: var(--qbc-ink-3); font-size: 11px; line-height: 1.6; }
.qbc input[type=number], .qbc input[type=search], .qbc select { min-height: 36px; border: 1px solid var(--qbc-line); border-radius: 8px; padding: 0 10px; font: inherit; background: var(--qbc-surface); color: var(--qbc-ink); }
.qbc input[type=number] { width: 100%; font-variant-numeric: tabular-nums; }
.qbc-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 6px 0 10px; }
.qbc-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--qbc-ink-2); }
.qbc-check { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; cursor: pointer; }
.qbc-switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; max-width: 420px; }
.qbc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qbc-switch-ui { flex-shrink: 0; width: 40px; height: 22px; border-radius: 999px; background: var(--qbc-line); position: relative; transition: background .15s; margin-top: 2px; }
.qbc-switch-ui::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.qbc-switch input:checked + .qbc-switch-ui { background: var(--qbc-ok); }
.qbc-switch input:checked + .qbc-switch-ui::after { inset-inline-start: 21px; }
.qbc-switch input:focus-visible + .qbc-switch-ui { outline: 3px solid rgba(29,79,145,.35); outline-offset: 2px; }
.qbc-switch small { display: block; color: var(--qbc-ink-3); font-size: 11.5px; line-height: 1.7; }
.qbc-preview { background: var(--qbc-bg); border-radius: 10px; padding: 10px 12px; line-height: 2; display: flex; flex-direction: column; gap: 2px; }
.qbc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.qbc-progress { height: 10px; border-radius: 999px; background: var(--qbc-line-2); overflow: hidden; margin: 12px 0 8px; }
.qbc-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--qbc-ok), var(--qbc-act)); border-radius: 999px; transition: width .4s; }
.qbc-job-line { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--qbc-ink-2); }
.qbc-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; font-size: 12.5px; color: var(--qbc-ink-2); }
.qbc-stats span { display: inline-flex; gap: 4px; align-items: center; }
.qbc-stats .ok { color: var(--qbc-ok); } .qbc-stats .warn { color: var(--qbc-warn); } .qbc-stats .bad { color: var(--qbc-bad); }
.qbc-items { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; }
.qbc-items li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--qbc-line-2); border-radius: 10px; }
.qbc-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.qbc-item-main small { color: var(--qbc-ink-3); overflow-wrap: anywhere; }
.qbc-item-n { font-weight: 800; color: var(--qbc-ok); white-space: nowrap; }
.qbc-item-n small { font-weight: 500; color: var(--qbc-ink-3); }

.qbc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; position: sticky; top: 0; z-index: 5; background: var(--qbc-bg); padding: 8px; border-radius: 12px; }
.qbc-filters input[type=search] { flex: 1 1 200px; }

.qbc-book { background: var(--qbc-surface); border: 1px solid var(--qbc-line); border-radius: var(--qbc-r); margin-bottom: 10px; overflow: hidden; }
.qbc-book-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: transparent; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.qbc-book-head:focus-visible { outline: 3px solid rgba(29,79,145,.35); outline-offset: -3px; }
.qbc-book-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.qbc-book-title small { color: var(--qbc-ink-3); }
.qbc-book-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 170px; }
.qbc-book-meter small { color: var(--qbc-ink-3); font-size: 11.5px; }
.qbc-meter { display: flex; width: 160px; height: 8px; border-radius: 999px; background: var(--qbc-bad-bg); overflow: hidden; }
.qbc-meter .c { background: var(--qbc-ok); } .qbc-meter .w { background: #f2b544; }
.qbc-rows { border-top: 1px solid var(--qbc-line-2); }
.qbc-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(150px, .9fr) minmax(220px, 1.4fr) minmax(130px, auto); gap: 8px 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--qbc-line-2); }
.qbc-row:last-child { border-bottom: 0; }
.qbc-row.t1 { display: block; background: var(--qbc-bg); font-weight: 800; padding: 8px 14px; }
.qbc-row.t1 i { color: var(--qbc-act); margin-inline-end: 4px; }
.qbc-row.t3 .qbc-row-title { padding-inline-start: 22px; color: var(--qbc-ink-2); }
.qbc-row-title { display: flex; gap: 6px; align-items: center; min-width: 0; }
.qbc-row-title span { overflow-wrap: anywhere; }
.qbc-row-title i { color: var(--qbc-ink-3); font-size: 12px; }
.qbc-row-content, .qbc-row-q { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.qbc-row-st { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.qbc-q { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 7px; border-radius: 8px; background: var(--qbc-line-2); font-variant-numeric: tabular-nums; }
.qbc-q small { font-size: 10.5px; color: var(--qbc-ink-3); }
.qbc-q i { font-style: normal; font-size: 11px; color: var(--qbc-ink-3); }
.qbc-q.ok { background: var(--qbc-ok-bg); } .qbc-q.ok b { color: var(--qbc-ok); }
.qbc-q.warn { background: var(--qbc-warn-bg); } .qbc-q.warn b { color: var(--qbc-warn); }
.qbc-q.bad b { color: var(--qbc-bad); }
.qbc-row.s-nocontent .qbc-row-title span { color: var(--qbc-ink-3); }

.qbc-toast { position: fixed; bottom: 18px; inset-inline-start: 50%; transform: translateX(50%); z-index: 3000; background: #12391f; color: #fff; padding: 10px 16px; border-radius: 12px; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.qbc-toast.err { background: #5b1414; }
.qbc-modal-back { position: fixed; inset: 0; z-index: 2500; background: rgba(15,21,34,.55); display: grid; place-items: center; padding: 16px; }
.qbc-modal { background: var(--qbc-surface); color: var(--qbc-ink); border-radius: 16px; padding: 18px; width: min(520px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.qbc-modal h2 { margin: 0 0 8px; font-size: 16px; }
.qbc-modal p { margin: 0; line-height: 2; color: var(--qbc-ink-2); }

@media (max-width: 1000px) {
    .qbc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qbc-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qbc-row { grid-template-columns: 1fr 1fr; }
    .qbc-row-st { justify-content: flex-start; }
}
@media (max-width: 620px) {
    .qbc { padding: 10px; }
    .qbc-head { flex-direction: column; }
    .qbc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qbc-row { grid-template-columns: 1fr; }
    .qbc-book-meter { display: none; }
    .qbc-actions .qbc-btn { flex: 1 1 100%; }
    .qbc-filters select, .qbc-filters input[type=search] { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .qbc-spin, .qbc-skel span { animation: none; } .qbc-progress span { transition: none; } }

/* 🆕 (Update 76) کتاب‌هایِ مشترک بینِ رشته‌ها — /question-bank/shared-books */
.qsb-group { border: 1px solid var(--qbc-line-2); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.qsb-group.sug { background: var(--qbc-bg); }
.qsb-canon, .qsb-sug-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.qsb-members { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qsb-members li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px; border-radius: 10px; background: var(--qbc-surface); border: 1px solid var(--qbc-line-2); }
.qsb-members li.canon { border-color: var(--qbc-ok); }
.qsb-name { min-width: 0; overflow-wrap: anywhere; }
.qsb-field { font-size: 11.5px; font-weight: 700; color: var(--qbc-violet); background: var(--qbc-violet-bg); border-radius: 999px; padding: 1px 8px; }
.qsb-acts { margin-inline-start: auto; display: inline-flex; flex-wrap: wrap; gap: 4px; }
.qsb-manual { display: flex; flex-direction: column; gap: 10px; }
.qsb-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 10px; background: var(--qbc-bg); border-radius: 10px; }
.qsb-editor { width: min(860px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.qsb-rows { overflow: auto; flex: 1; border: 1px solid var(--qbc-line-2); border-radius: 10px; margin-top: 8px; }
.qsb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--qbc-line-2); }
.qsb-row:last-child { border-bottom: 0; }
.qsb-row.d0 { background: var(--qbc-bg); font-weight: 800; }
.qsb-row.d1 .qsb-row-title { padding-inline-start: 14px; }
.qsb-row.d2 .qsb-row-title { padding-inline-start: 28px; color: var(--qbc-ink-2); }
.qsb-row.m-none .qsb-row-title { color: var(--qbc-bad); }
.qsb-row select { width: 100%; }
.qsb-row-target { color: var(--qbc-ink-2); overflow-wrap: anywhere; }
@media (max-width: 620px) {
    .qsb-row { grid-template-columns: 1fr; }
    .qsb-acts { margin-inline-start: 0; }
}
