/* پنل معلم و والدین؛ روی rocket.css سوار است */
.small { font-size: .85rem; }
a.btn { display: inline-block; text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.missions .topbar { margin-bottom: 8px; }
.missions .topbar h1 { margin: 0; }
.missions .msg { margin-bottom: 12px; }
.missions .msg:not(.bad):not(.good) { background: #eef2ff; color: #2a3a7a; }   /* پیام عادی (مثل «مدیریت مدیر کل») روی آسمان تیره خوانا باشد */
.missions h2 { font-size: 1.2rem; }
.mission .go { color: var(--brand); font-weight: 800; }
.mission-list .mission { grid-template-columns: 64px 1fr auto; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-grid { display: grid; gap: 12px; }
.form-grid + .form-grid { margin-top: 18px; padding-top: 14px; border-top: 2px dashed var(--line); }
textarea.text-input { resize: vertical; line-height: 1.8; }
.kind .choice { cursor: pointer; text-align: right; display: block; padding: 12px; }
.kind .choice .s { color: var(--ink-soft); font-size: .8rem; font-weight: 400; }
.kind .choice input { accent-color: var(--brand); }
.kind .choice:has(input:checked) { border-color: var(--brand); background: #eaf2ff; box-shadow: 0 0 0 3px #bcd5ff; }
.kid-rows { display: grid; gap: 8px; }
.kid-row { display: grid; grid-template-columns: 1fr 9.5em; gap: 8px; }
select.text-input { appearance: auto; }
.btn.danger { background: var(--bad); box-shadow: 0 3px 0 #a82a2a; }
.btn.warn { background: var(--warn); color: #3a2300; box-shadow: 0 3px 0 #b86f00; }
.more summary { cursor: pointer; font-weight: 800; }
.more[open] summary { margin-bottom: 12px; }
.admin-teacher { padding: 10px 0; border-top: 1px solid var(--line); }
.admin-teacher:first-of-type { border-top: 0; }
.admin-teacher .at-head { font-size: 1rem; margin-bottom: 4px; }
.admin-teacher .at-head .s { color: var(--ink-soft); font-size: .82rem; font-weight: 400; }
.admin-cls { padding: 6px 0; margin-inline-start: 14px; border-inline-start: 2px solid var(--line); padding-inline-start: 10px; }
.admin-cls > summary { cursor: pointer; }
.admin-cls > summary .arrow { color: var(--ink-soft); }
.admin-cls > summary .s { color: var(--ink-soft); font-size: .85rem; font-weight: 400; }
.admin-cls[open] > summary { margin-bottom: 8px; }

/* فهرست دانش‌آموزان */
.st-list { display: grid; gap: 4px; }
.st-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.st-row:last-child { border-bottom: 0; }
.st-row .av { width: 44px; height: 44px; border-radius: 50%; background: #eaf2ff; color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.st-row .s, .dev-list .s { color: var(--ink-soft); font-size: .85rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; background: #eaf2ff; color: var(--brand-dark); border-radius: 99px; padding: 0 8px; }
.tag.warn { background: #fff1db; color: #8a5300; }
@media (max-width: 560px) {
  .st-row { grid-template-columns: 44px 1fr; }
  .st-row > .btn { grid-column: 1 / -1; }
}

/* پنجرهٔ دانش‌آموز */
body.modal-open { overflow: hidden; }
.modal-back { position: fixed; inset: 0; background: rgba(8, 10, 30, .6); z-index: 10; }
.modal { position: fixed; z-index: 11; inset: 5vh 50% auto auto; transform: translateX(50%); width: min(520px, calc(100vw - 24px));
  max-height: 90vh; overflow: auto; display: grid; gap: 14px; }
.modal h3 { font-size: 1rem; }
.dev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dev-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f7f9ff; border-radius: 12px; padding: 8px 12px; }
.dev-list li.admin-t { flex-wrap: wrap; }
.dev-list li.admin-t > details { flex-basis: 100%; }

/* کد و لینک ورود دانش‌آموز (پنجرهٔ دانش‌آموز) */
.login-code { border: 2px solid var(--line); border-radius: 18px; padding: 14px; text-align: center; background: #fff; color: var(--ink); display: grid; gap: 6px; justify-items: center; }
.lc-label { font-weight: 800; color: var(--brand-dark); font-size: .9rem; }
.lc-code { font-weight: 800; font-size: 1.5rem; letter-spacing: .15em; font-family: ui-monospace, Menlo, Consolas, monospace; user-select: all; }
.lc-link { font-size: .8rem; word-break: break-all; max-width: 100%; }
.lc-help { font-size: .78rem; color: var(--ink-soft); max-width: 320px; line-height: 1.6; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(20, 25, 60, .92); color: #fff; padding: 8px 20px;
  border-radius: 99px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 20; }
#toast.show { opacity: 1; }

/* چاپ (بانک سؤال) */
@media print {
  body { background: #fff; }
  #app { max-width: none; padding: 0; }
  .no-print, #toast, #modal { display: none !important; }
}

/* گزارش‌ها */
.st-reports { display: grid; gap: 10px; margin-top: 12px; }
.st-report { display: grid; gap: 6px; }
.st-report .w-head { display: flex; align-items: center; gap: 8px; }
.st-report .w-head b { font-size: 1.1rem; }
.st-report .w-head .btn { margin-inline-start: auto; }
.st-report .s, .modal.report .s { font-size: .88rem; }
.subj-avg { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.subj-avg .meter { grid-column: 1 / -1; }
.subj-avg:last-child { border-bottom: 0; }
.modal.report { max-width: 640px; width: min(640px, calc(100vw - 24px)); }

/* بانک سؤال و پاسخنامه (bank.js) */
.print-only { display: none; }
.bank-bar { display: grid; gap: 10px; margin-bottom: 12px; }
.bank-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.bank-grades { display: flex; flex-wrap: wrap; gap: 8px; }
.bank-mode { color: #c5cdf5; font-size: .88rem; }
.chip-s { border: 2px solid var(--line); background: #fff; color: var(--brand-dark); border-radius: 99px; padding: 4px 14px; font-weight: 600; font-size: .88rem; }
.chip-s:hover { border-color: #8db4ff; }
.chip-s[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.bank-grades .chip-s { font-size: 1rem; padding: 6px 18px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-bottom: 12px; color: #c5cdf5; }
.crumb { background: none; border: 0; padding: 2px 4px; color: #fff; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 5px; text-align: right; }
.crumb.cur { text-decoration: none; color: #c5cdf5; }
.crumbs .sep { opacity: .6; }
.bank-subjs { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.bank-subj { display: grid; justify-items: center; gap: 2px; text-align: center; background: #fff; border: 3px solid var(--line); border-radius: 20px; padding: 16px 10px; box-shadow: 0 6px 0 var(--line); }
.bank-subj:hover { border-color: #8db4ff; }
.bank-subj .ic { font-size: 2.2rem; line-height: 1.3; }
.bank-subj .t { font-weight: 800; font-size: 1.1rem; }
.bank-subj .s { color: var(--ink-soft); font-size: .85rem; }
.bank-head { display: grid; gap: 10px; }
.bank-head .s { color: var(--ink-soft); font-size: .9rem; }
.bank-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: #fff; padding: 7px 14px; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.bank-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.bank-mission { margin-top: 20px; display: grid; gap: 10px; scroll-margin-top: 12px; }
.missions .bank-mission h2 { color: #fff; font-size: 1.15rem; }
.bank-mission h2 .s { font-size: .85rem; color: #c5cdf5; font-weight: 400; }
.bq { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 6px 18px rgba(0, 0, 20, .25); display: grid; gap: 10px; }
.bq-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bq-n { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.bq-q { font-size: 1.1rem; font-weight: 700; line-height: 1.9; }
.bq-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bq-opt { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; text-align: right; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; font-weight: 600; width: 100%; }
button.bq-opt:hover { border-color: #8db4ff; background: #f7f9ff; }
.bq-opt .k { width: 26px; height: 26px; border-radius: 8px; background: #eaf2ff; color: var(--brand-dark); display: grid; place-items: center; font-size: .72rem; }
.bq-opt.right { background: var(--good-bg); border-color: var(--good); }
.bq-opt.right .k { background: var(--good); color: #fff; }
.bq-opt.wrong { background: var(--bad-bg); border-color: var(--bad); }
.bq-mark { font-weight: 800; font-size: 1.1rem; }
.bq-opt.right .bq-mark { color: #14804d; }
.bq-opt.wrong .bq-mark { color: #c24141; }
.bq-why { background: #fff8e6; border-radius: 12px; padding: 8px 12px; font-size: .95rem; line-height: 1.9; }
.bq-good { color: #14804d; }
.bq-bad { color: #c24141; }
.bq-gen, .bq-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bank-hit { display: grid; gap: 4px; margin-bottom: 14px; }
.bank-hit .crumb { justify-self: start; font-size: .9rem; }
.bank-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.dash-tools { display: grid; margin-top: 16px; }
@media (max-width: 560px) { .bq-opts { grid-template-columns: 1fr; } .bq { padding: 12px; } }
@media print {
  .print-only { display: block; }
  .bank-head, .bq { box-shadow: none; border: 1px solid #bbb; }
  .bank-head { padding: 8px 0; border: 0; }
  .missions .bank-mission h2, .bank-mission h2 .s { color: #000; }
  .bank-mission { margin-top: 10px; gap: 6px; }
  .bq { break-inside: avoid; padding: 8px 10px; gap: 6px; }
  .bq-opts { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .bq-opt { padding: 3px 8px; }
}
