/* myschool design system — paper + ink + gold. Independent from /app styles. */
:root {
  --ms-paper: #faf7f0; --ms-ink: #1c1917; --ms-muted: #78716c;
  --ms-gold: #b45309; --ms-gold-2: #f59e0b; --ms-line: #e7e0d3;
  --ms-green: #047857; --ms-red: #b91c1c; --ms-blue: #1d4ed8;
}
* { box-sizing: border-box; }
body.ms-body {
  margin: 0; font-family: Tahoma, Vazirmatn, sans-serif; color: var(--ms-ink);
  background: var(--ms-paper);
  background-image: radial-gradient(circle at 85% -40px, #fde68a55, transparent 60%),
    radial-gradient(circle at 10% 110%, #a7f3d055, transparent 55%);
  background-attachment: fixed; min-height: 100vh;
}
.ms-wrap { max-width: 880px; margin: 0 auto; padding: 18px 14px 60px; }
.ms-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px 16px; }
.ms-top h1 { margin: 0; font-size: clamp(20px, 5vw, 28px); font-weight: 800; }
.ms-top a { color: var(--ms-gold); font-size: 13px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--ms-line); background: #fff; padding: 10px 18px; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center; }
.ms-topbtn { color: var(--ms-gold); font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
  border: 1px solid var(--ms-line); background: #fff; padding: 10px 18px; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.ms-topacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
@media (max-width: 360px) { .ms-grid { grid-template-columns: 1fr; } .ms-wrap { padding: 12px 10px 60px; } }
.ms-card { background: #fff; border: 1px solid var(--ms-line); border-radius: 22px; padding: 20px 18px;
  box-shadow: 0 12px 30px rgba(28, 25, 23, .08); animation: msIn .45s ease both; }
.ms-bar { height: 6px; border-radius: 999px; margin: -6px 0 14px;
  background: var(--ms-accent, linear-gradient(90deg, var(--ms-gold-2), var(--ms-gold))); }
.ms-sch { font-size: 18px; font-weight: 800; }
.ms-city { font-size: 12px; color: var(--ms-muted); margin-top: 2px; }
.ms-role { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--ms-ink); padding: 5px 14px; border-radius: 999px; }
.ms-counts { display: flex; gap: 8px; margin-top: 12px; }
.ms-count { flex: 1; background: var(--ms-paper); border: 1px solid var(--ms-line); border-radius: 14px;
  padding: 10px 6px; text-align: center; font-size: 12px; color: var(--ms-muted); }
.ms-count b { display: block; font-size: 22px; color: var(--ms-ink); }
.ms-go { width: 100%; margin-top: 14px; border: 0; cursor: pointer; font-family: inherit;
  font-weight: 800; font-size: 15px; color: #fff; padding: 13px; border-radius: 14px; min-height: 50px;
  background: linear-gradient(135deg, var(--ms-gold-2), var(--ms-gold));
  box-shadow: 0 8px 20px rgba(180, 83, 9, .35); }
.ms-go:hover { filter: brightness(1.06); }
.ms-sec { margin-top: 22px; }
.ms-sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.ms-sec-h h2 { margin: 0; font-size: 17px; }
.ms-sec-h span { font-size: 12px; color: var(--ms-muted); }
.ms-req { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--ms-line);
  border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; flex-wrap: wrap; animation: msIn .45s ease both; }
.ms-req .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ms-req .dot.ok { background: var(--ms-green); } .ms-req .dot.wait { background: var(--ms-gold-2); }
.ms-req .dot.bad { background: var(--ms-red); }
.ms-req .tx { flex: 1; min-width: 160px; }
.ms-req .t1 { font-weight: 800; font-size: 14px; }
.ms-req .t2 { font-size: 12px; color: var(--ms-muted); margin-top: 2px; }
.ms-req .dt { font-size: 12px; color: var(--ms-muted); white-space: nowrap; }
.ms-chip { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.ms-chip.ok { background: #d1fae5; color: var(--ms-green); }
.ms-chip.wait { background: #fef3c7; color: var(--ms-gold); }
.ms-chip.bad { background: #fee2e2; color: var(--ms-red); }
.ms-empty { text-align: center; background: #fff; border: 1px dashed var(--ms-line); border-radius: 22px;
  padding: 36px 18px; color: var(--ms-muted); }
.ms-empty .big { font-size: 56px; }
.ms-toast { position: fixed; bottom: 18px; right: 50%; transform: translateX(50%); z-index: 99;
  background: var(--ms-ink); color: #fff; padding: 12px 22px; border-radius: 14px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
/* drawer menu (role pages): burger next to the title, schools slide in */
.ms-burger { border: 1px solid var(--ms-line); background: #fff; border-radius: 12px;
  min-width: 44px; min-height: 44px; font-size: 20px; cursor: pointer; color: var(--ms-ink);
  display: inline-flex; align-items: center; justify-content: center; font-family: inherit; }
.ms-drawer-veil { position: fixed; inset: 0; background: rgba(28, 25, 23, .45); z-index: 90; }
.ms-drawer { position: fixed; top: 0; bottom: 0; right: 0; width: min(320px, 85vw); z-index: 91;
  background: var(--ms-paper); border-left: 1px solid var(--ms-line);
  box-shadow: -12px 0 30px rgba(28, 25, 23, .18); padding: 18px 16px 30px; overflow-y: auto;
  animation: msDrawerIn .25s ease both; }
.ms-drawer h3 { margin: 0 0 12px; font-size: 16px; }
.ms-drawer .ms-sch-item { width: 100%; text-align: right; font-family: inherit; cursor: pointer;
  background: #fff; border: 1px solid var(--ms-line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px; font-size: 14px; font-weight: 800; color: var(--ms-ink); }
.ms-drawer .ms-sch-item span { display: block; font-size: 12px; font-weight: 400; color: var(--ms-muted); margin-top: 2px; }
.ms-drawer .ms-sch-item:disabled { opacity: .55; cursor: default; }
.ms-drawer .ms-sch-item.cur { border-color: var(--ms-gold); box-shadow: 0 0 0 1px var(--ms-gold); }
@keyframes msDrawerIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
/* current-school chip next to the title + placeholder section tabs */
.ms-sch-name { font-size: 13px; font-weight: 700; color: var(--ms-gold); background: #fef3c7;
  border: 1px solid var(--ms-line); border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
.ms-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.ms-tabs button { flex: 1 1 140px; font-family: inherit; cursor: pointer; font-weight: 800; font-size: 14px;
  color: var(--ms-ink); background: #fff; border: 1px solid var(--ms-line); border-radius: 14px;
  padding: 12px 6px; min-height: 50px; box-shadow: 0 6px 16px rgba(28, 25, 23, .06); }
.ms-tabs button.on { background: var(--ms-ink); color: #fff; border-color: var(--ms-ink); }
/* shared small buttons (manager tools + settings panes) */
.ms-btn { font-family: inherit; cursor: pointer; font-size: 13px; font-weight: 700;
  border: 1px solid var(--ms-line); background: #fff; color: var(--ms-ink);
  border-radius: 10px; padding: 8px 14px; min-height: 40px; }
.ms-btn.go { background: linear-gradient(135deg, var(--ms-gold-2), var(--ms-gold)); color: #fff; border: 0; }
.ms-btn.danger { color: var(--ms-red); border-color: #fecaca; background: #fef2f2; }
.ms-btn.ok { color: var(--ms-green); border-color: #a7f3d0; background: #ecfdf5; }
/* selected pick-button (attendance editor: موجه/غیرموجه) — without these rules
   the JS toggled `.on` but nothing changed on screen, so taps looked dead. */
.ms-btn.on { background: var(--ms-ink); color: #fff; border-color: var(--ms-ink);
  box-shadow: 0 6px 14px rgba(28, 25, 23, .2); }
.ms-btn.ok.on { background: var(--ms-green); border-color: var(--ms-green); color: #fff; }
.ms-btn.danger.on { background: var(--ms-red); border-color: var(--ms-red); color: #fff; }
.ms-err { color: var(--ms-red); font-size: 13px; min-height: 20px; margin: 8px 0 0; }
/* weekly timetable grid: days = rows, periods = columns */
.ms-tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--ms-line);
  border-radius: 16px; }
.ms-grid-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 560px;
  font-size: 13px; }
.ms-grid-table th, .ms-grid-table td { border-bottom: 1px solid var(--ms-line);
  border-left: 1px solid var(--ms-line); padding: 8px 6px; text-align: center;
  min-width: 96px; vertical-align: top; }
.ms-grid-table tr:last-child th, .ms-grid-table tr:last-child td { border-bottom: 0; }
.ms-grid-table th:last-child, .ms-grid-table td:last-child { border-left: 0; }
.ms-grid-table thead th, .ms-grid-table tr:first-child th { background: var(--ms-paper);
  font-weight: 800; position: sticky; top: 0; }
.ms-daycol { background: var(--ms-paper); font-weight: 800; white-space: nowrap;
  min-width: 70px !important; position: sticky; right: 0; }
.ms-celltime { font-size: 11px; color: var(--ms-muted); font-weight: 400; direction: ltr; }
.ms-cellsub { font-weight: 800; }
.ms-celltch { font-size: 11px; color: var(--ms-muted); margin-top: 2px; }
/* status + reason line inside an attendance cell (manager day matrix): the
   cell takes the free width first; if the text still doesn't fit it wraps
   inside the cell (never clipped) — long unbreakable strings stay contained. */
.ms-cellinfo { font-size: 10px; color: var(--ms-muted); margin-top: 2px;
  overflow-wrap: anywhere; }
.ms-att-table .ms-daycol { width: 150px; }
.ms-plus { cursor: pointer; color: var(--ms-gold); font-size: 22px; font-weight: 800; }
.ms-plus:hover { background: #fef3c7; }
.ms-x { border: 0; background: none; cursor: pointer; color: var(--ms-red);
  font-size: 13px; padding: 4px 8px; font-family: inherit; }
/* status-change popup (manager attendance editor) */
.ms-modal { position: fixed; z-index: 92; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: min(440px, 92vw); max-height: 88vh;
  overflow-y: auto; background: #fff; border: 1px solid var(--ms-line);
  border-radius: 24px; padding: 22px 20px;
  box-shadow: 0 24px 60px rgba(28, 25, 23, .25); animation: msPop .22s ease both; }
.ms-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ms-modal-head .ms-av { width: 62px; height: 62px; font-size: 26px; }
.ms-modal-head .nm { font-weight: 800; font-size: 17px; }
.ms-modal-head .mt { font-size: 12px; color: var(--ms-muted); margin-top: 2px; }
.ms-modal .ms-cur { display: inline-block; margin-top: 10px; }
.ms-modal label { display: block; font-size: 12px; font-weight: 700; margin: 12px 0 6px; }
.ms-modal input, .ms-modal select { width: 100%; font-family: inherit; font-size: 14px;
  padding: 10px 12px; border: 1px solid var(--ms-line); border-radius: 12px;
  background: var(--ms-paper); color: var(--ms-ink); }
.ms-modal .ms-acts { display: flex; gap: 8px; margin-top: 14px; }
.ms-modal .ms-acts .ms-btn { flex: 1; }
@keyframes msPop { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
/* generic bordered list row (reasons viewer + shared panes) */
.ms-item { background: #fff; border: 1px solid var(--ms-line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px; }
.ms-item .t1 { font-weight: 800; font-size: 14px; }
.ms-item .t2 { font-size: 12px; color: var(--ms-muted); margin-top: 2px; }
/* impact chip: زیاد (orange) — کم/متوسط/خیلی زیاد reuse ok/wait/bad */
.ms-chip.mid { background: #ffedd5; color: #c2410c; }
/* teacher quick-mark popup: searchable reason-item picker + تاثیر select.
   Each popup feeds from ONE list only (plus ≠ minus). */
.tmark-q { margin-bottom: 8px; }
.tmark-hint { font-weight: 400; color: var(--ms-muted); font-size: 11px; }
.tmark-list { max-height: 32vh; overflow-y: auto; border: 1px solid var(--ms-line);
  border-radius: 14px; background: var(--ms-paper); padding: 8px 10px; }
.tmark-cat { font-size: 12px; font-weight: 800; color: var(--ms-gold); margin: 10px 4px 4px; }
.tmark-grp:first-child .tmark-cat { margin-top: 2px; }
.tmark-item { display: block; width: 100%; text-align: right; font-family: inherit;
  cursor: pointer; background: #fff; border: 1px solid var(--ms-line);
  border-radius: 12px; padding: 9px 12px; margin: 4px 0; font-size: 13px;
  color: var(--ms-ink); }
.tmark-item[hidden] { display: none; }
.tmark-item:hover { border-color: var(--ms-gold-2); background: #fffbeb; }
.tmark-item.on { background: var(--ms-ink); border-color: var(--ms-ink); color: #fff; }
.tmark-tip { font-size: 11px; color: var(--ms-muted); margin: 6px 2px 0; }
/* AI smart-match block under the reason box (level-2 quick-mark AI) */
.tmark-smart { margin-top: 10px; border: 1px dashed var(--ms-line);
  border-radius: 14px; background: linear-gradient(180deg, #fffdf5, #fffef9);
  padding: 8px 10px 6px; }
.tmark-smart-head { display: flex; align-items: center;
  justify-content: space-between; gap: 8px; }
.tmark-smart-head b { font-size: 12px; color: var(--ms-ink); }
.tmark-smart-head [data-smart-status] { font-weight: 500; font-size: 11px;
  color: var(--ms-muted); }
.tmark-smart-list { margin-top: 6px; }
.tmark-sm { display: flex; align-items: center; gap: 6px; width: 100%;
  text-align: right; font-family: inherit; cursor: pointer; background: #fff;
  border: 1px solid var(--ms-line); border-radius: 12px; padding: 8px 10px;
  margin: 4px 0; font-size: 13px; color: var(--ms-ink); }
.tmark-sm:hover { border-color: var(--ms-gold-2); background: #fffbeb; }
.tmark-sm.on { background: var(--ms-ink); border-color: var(--ms-ink); color: #fff; }
.tmark-sm-src { flex: none; }
.tmark-sm-txt { flex: 1 1 auto; min-width: 0; }
.tmark-sm-cat { flex: none; font-style: normal; font-size: 11px; font-weight: 600;
  color: var(--ms-muted); max-width: 38%; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
/* quick-mark popup: flex column so the title and the «تاثیر + ثبت/انصراف»
   footer stay fixed; only the middle content scrolls. This is more robust
   than the old sticky footer, which still depended on the modal's own scroll
   position and could be pushed below a long item list on phones. */
.ms-modal.tmark-modal { display: flex; flex-direction: column; overflow: hidden;
  padding: 0; max-height: 88dvh; }
.tmark-modal .ms-modal-head { flex: 0 0 auto; padding: 22px 20px 0;
  margin-bottom: 0; }
.tmark-modal .tmark-body { flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 0 20px 2px; overscroll-behavior: contain; scrollbar-width: thin; }
/* one scroll container instead of a nested list scrollbar; the user can
   reach every item while the action bar never moves */
.tmark-modal .tmark-list { max-height: none; overflow: visible; }
.tmark-modal .tmark-foot { position: static; flex: 0 0 auto; margin: 0;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-top: 1px solid var(--ms-line);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 -8px 20px rgba(28, 25, 23, .06); }
.tmark-foot label { margin: 0; }
.tmark-impact { display: flex; align-items: center; gap: 10px; }
.tmark-impact select { flex: 1; }
.tmark-foot .ms-acts { margin: 10px 0 0; }
/* attendance day-matrix cell tints */
.ms-cellok { background: #ecfdf5; font-size: 18px; }
.ms-cellbad { background: #fef2f2; font-size: 18px; }
.ms-cellwarn { background: #fffbeb; font-size: 18px; }
.ms-cellmut { background: #fafaf9; font-size: 13px; }
.ms-cellnone { color: var(--ms-line); font-size: 16px; }
/* attendance register avatars */
.ms-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--ms-line); background: #fff; }
.ms-av-none { display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ms-gold-2), var(--ms-gold)); color: #fff;
  font-weight: 800; font-size: 20px; border-color: transparent; }
/* jalali calendar popup */
.ms-cal { position: fixed; z-index: 93; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: min(340px, 92vw);
  background: #fff; border: 1px solid var(--ms-line); border-radius: 22px;
  padding: 18px 16px; box-shadow: 0 24px 60px rgba(28, 25, 23, .25);
  animation: msPop .2s ease both; }
.ms-cal-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: 16px; }
.ms-cal-nav { border: 1px solid var(--ms-line); background: var(--ms-paper);
  border-radius: 12px; min-width: 42px; min-height: 42px; font-size: 20px;
  cursor: pointer; color: var(--ms-ink); font-family: inherit; }
.ms-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  text-align: center; }
.ms-cal-wd { font-size: 11px; color: var(--ms-muted); font-weight: 700; padding: 4px 0; }
.ms-cal-day { aspect-ratio: 1; border: 0; background: none; border-radius: 12px;
  font-family: inherit; font-size: 14px; cursor: pointer; color: var(--ms-ink);
  min-height: 40px; }
.ms-cal-day:not(.ms-cal-dim):hover { background: var(--ms-paper); }
.ms-cal-dim { cursor: default; }
.ms-cal-today { box-shadow: inset 0 0 0 2px var(--ms-gold-2); }
.ms-cal-sel { background: linear-gradient(135deg, var(--ms-gold-2), var(--ms-gold)) !important;
  color: #fff; font-weight: 800; }
.ms-cal-todaybtn { width: 100%; margin-top: 12px; font-family: inherit; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--ms-gold); background: #fef3c7;
  border: 1px solid var(--ms-line); border-radius: 12px; padding: 10px; }
@keyframes msPop { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
/* small screens: tab buttons flow 2-per-row (never a single squeezed row,
   never one lonely button per row); weekly grids stay scrollable but compact */
@media (max-width: 560px) {
  .ms-tabs button { flex: 1 1 calc(50% - 8px); width: auto; font-size: 13px;
    padding: 10px 4px; min-height: 48px; }
  .ms-top { flex-wrap: wrap; }
  .ms-top h1 { font-size: 19px; }
  .ms-grid-table { min-width: 0; font-size: 12px; }
  .ms-grid-table th, .ms-grid-table td { min-width: 62px; padding: 6px 4px; }
  .ms-daycol { min-width: 50px !important; }
  /* attendance matrix on phones: fit the screen width (nothing cut off) and let
     columns/notes wrap freely; no forced min-width and no sticky overlay. */
  .ms-att-table { min-width: 0; }
  .ms-att-table th, .ms-att-table td { min-width: 0; overflow-wrap: anywhere; }
  .ms-att-table .ms-daycol { width: auto; min-width: 44px !important;
    position: static; white-space: normal; }
  .ms-cellsub { font-size: 12px; }
  .ms-plus { font-size: 18px; }
}
@keyframes msIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* --- 📚 کتاب‌های درس + 🧪 استودیوی آزمون و سؤال (manager console) ---
   بلوکِ کوچکِ اختصاصیِ همین دو بخش؛ بقیهٔ صفحه از کلاس‌های بالا استفاده می‌کند. */
.ms-ai-frm label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0 6px; }
.ms-ai-frm input, .ms-ai-frm select { width: 100%; font-family: inherit; font-size: 15px;
  padding: 12px 14px; border: 1px solid var(--ms-line); border-radius: 14px;
  background: var(--ms-paper); color: var(--ms-ink); }
.ms-ai-frm input:focus, .ms-ai-frm select:focus { outline: 2px solid var(--ms-gold-2); outline-offset: 1px; }
.ms-st-q { border: 1px solid var(--ms-line); border-radius: 14px; background: #fff;
  padding: 10px 12px; margin: 8px 0; }
.ms-st-qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ms-st-qtext { font-size: 14px; line-height: 1.9; font-weight: 700; }
.ms-st-opts { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 2px; }
.ms-st-opt { display: flex; align-items: flex-start; gap: 8px; text-align: right; font-size: 13px;
  line-height: 1.8; border: 1px solid var(--ms-line); background: #fff; color: var(--ms-ink);
  padding: 8px 12px; border-radius: 12px; }
.ms-st-opt.right { background: #ecfdf5; border-color: #a7f3d0; color: var(--ms-green); font-weight: 700; }
.ms-st-badge { font-size: 11px; font-weight: 700; color: var(--ms-muted); background: var(--ms-paper);
  border: 1px solid var(--ms-line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.ms-st-ans { margin-top: 8px; font-size: 13px; line-height: 1.9; border: 1px solid var(--ms-line);
  border-radius: 12px; padding: 8px 10px; background: var(--ms-paper); }
.ms-st-src { font-size: 11px; color: var(--ms-muted); margin-top: 6px; line-height: 1.8; }
.ms-st-meta { font-size: 12px; color: var(--ms-muted); line-height: 1.9; margin: 6px 0; }
.ms-st-warn { font-size: 12px; color: var(--ms-red); font-weight: 700; line-height: 1.9; margin: 6px 0; }
.ms-st-head { border: 1px solid var(--ms-line); border-radius: 16px; background: var(--ms-paper);
  padding: 12px 14px; margin: 10px 0; }
.ms-st-kv { display: flex; gap: 6px; font-size: 12px; margin-top: 4px; }
.ms-st-kv > span:first-child { color: var(--ms-muted); min-width: 88px; flex: none; }
.ms-drop { border: 2px dashed var(--ms-line); border-radius: 16px; background: var(--ms-paper);
  padding: 20px 14px; text-align: center; font-size: 13px; color: var(--ms-muted); cursor: pointer; }
.ms-drop.hot { border-color: var(--ms-gold); background: #fffbeb; color: var(--ms-gold); }
.ms-bar-p { height: 8px; border-radius: 999px; background: var(--ms-line); overflow: hidden; margin: 8px 0; }
.ms-bar-p > i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--ms-gold-2), var(--ms-gold)); }
/* دکمه‌های در حالِ کار (in-flight) نباید دوباره کلیک شوند */
.ms-btn:disabled, .ms-go:disabled { opacity: .55; cursor: default; }
.ms-btn:disabled:hover, .ms-go:disabled:hover { filter: none; }
/* --- فرم‌های مشترک درخواست و درگاه ورود به کلاس/مدرسه --- */
.ms-frm label { display: block; font-size: 13px; font-weight: 800; color: var(--ms-ink); margin: 12px 0 6px; }
.ms-frm input, .ms-frm select, .ms-frm textarea {
  width: 100%; font-family: inherit; font-size: 14px; padding: 11px 14px;
  border: 1.5px solid var(--ms-line); border-radius: 14px;
  background: var(--ms-paper); color: var(--ms-ink); transition: border-color .18s, box-shadow .18s;
}
.ms-frm input:focus, .ms-frm select:focus, .ms-frm textarea:focus {
  outline: none; border-color: var(--ms-gold-2); background: #fff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}
.ms-hint { font-size: 12px; color: var(--ms-muted); margin: 8px 0 0; line-height: 1.75; }
.ms-acts { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.ms-gate-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a; border-radius: 20px; padding: 18px 20px; margin-bottom: 16px;
}
.ms-gate-hero .gh-main { display: flex; align-items: center; gap: 14px; }
.ms-gate-hero .gh-ic {
  width: 56px; height: 56px; border-radius: 18px; background: #fff;
  border: 1px solid #fde68a; display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 6px 16px rgba(180, 83, 9, .12); flex-shrink: 0;
}
.ms-gate-hero .gh-t1 { font-size: 17px; font-weight: 800; color: var(--ms-ink); }
.ms-gate-hero .gh-t2 { font-size: 12px; color: var(--ms-muted); margin-top: 4px; line-height: 1.6; }
.ms-step-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ms-step-pill {
  flex: 1 1 150px; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--ms-line); border-radius: 14px;
  padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--ms-ink);
}
.ms-step-pill .sp-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--ms-ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.ms-step-pill.done { border-color: #a7f3d0; background: #ecfdf5; color: var(--ms-green); }
.ms-step-pill.done .sp-num { background: var(--ms-green); }
.ms-prof-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.ms-prof-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--ms-line); background: #fff;
}
.ms-prof-chip.ok { color: var(--ms-green); border-color: #a7f3d0; background: #ecfdf5; }
.ms-prof-chip.no { color: var(--ms-red); border-color: #fecaca; background: #fef2f2; }
.ms-code-box {
  background: var(--ms-paper); border: 1.5px dashed #d6cfc2; border-radius: 18px;
  padding: 18px 16px; text-align: center; margin-top: 8px;
}
.ms-code-input {
  width: min(280px, 100%) !important; font-size: 22px !important; font-weight: 800 !important;
  letter-spacing: 5px !important; text-align: center !important; direction: ltr !important;
  text-transform: uppercase; background: #fff !important; border: 2px solid var(--ms-line) !important;
  border-radius: 14px !important; padding: 12px 16px !important; margin: 6px auto 0; display: block;
}
.ms-code-input:focus { border-color: var(--ms-gold) !important; }
