@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-Regular.ttf); font-display: swap; }
@font-face { font-family: Vazirmatn; font-weight: bold; src: url(fonts/Vazirmatn-Bold.ttf); font-display: swap; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Vazirmatn, sans-serif; background: #f4f5f7; color: #1d2430; line-height: 1.8; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; background: #14365c; color: #fff; }
header a, header .plain { color: #fff; text-decoration: none; }
.brand { font-weight: bold; font-size: 1.25rem; }
nav { display: flex; gap: 16px; align-items: center; }
nav form { margin: 0; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
section { background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 16px; margin-bottom: 14px; overflow-x: auto; }
h1 { font-size: 1.2rem; margin-top: 0; } h2 { font-size: 1.05rem; margin-top: 0; }
label { display: block; margin-bottom: 10px; }
input, select, textarea { display: block; width: 100%; font: inherit; padding: 8px; border: 1px solid #c5cad3; border-radius: 7px; background: #fff; }
button, .button { font: inherit; background: #14365c; color: #fff; border: 0; border-radius: 7px; padding: 7px 18px; cursor: pointer; text-decoration: none; display: inline-block; margin-inline-end: 10px; }
.plain { background: none; padding: 0; color: #14365c; text-decoration: underline; }
.error { background: #fdecec; color: #8f1d1d; padding: 10px; border-radius: 8px; }
.pre { white-space: pre-line; }
.active { font-weight: bold; }
.off { opacity: .55; }
.question table { width: 100%; border-collapse: collapse; }
.question table.grid td, .question table.grid th { border: 1px solid #999; padding: 3px 6px; }
.question p { margin: 0; } .stem { font-weight: bold; }
.question table.match > tbody > tr > td:first-child { width: 80%; }
.question table.grp > tbody > tr > td:first-child { width: 6%; }
small[dir] { white-space: nowrap; }
.ok { background: #e9f7ee; color: #1c6b34; padding: 10px; border-radius: 8px; }
.check input { display: inline; width: auto; }
fieldset { border: 1px solid #c5cad3; border-radius: 7px; margin: 0 0 10px; padding: 8px 12px; }
legend { padding: 0 6px; }
/* داشبورد مدرس: پنل کناری سمت راست + ناحیه‌ی اصلی */
.dashboard-page main { max-width: 1180px; }
.dashboard { display: flex; gap: 16px; align-items: flex-start; }
.sidebar { width: 320px; flex: 0 0 320px; }
.sidebar section { padding: 12px; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dash-main { flex: 1; min-width: 0; }
.dashboard.sidebar-collapsed .sidebar { display: none; }
.qtable { width: 100%; border-collapse: collapse; }
.qtable th, .qtable td { border: 1px solid #dfe3e8; padding: 6px; vertical-align: top; text-align: right; }
.qtable .num { text-align: center; white-space: nowrap; }
.qtable textarea { margin-bottom: 4px; }
.qtable .opts label { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; font-size: .92rem; }
.qtable .opts input { flex: 1; }
.qtable tfoot td { font-weight: bold; background: #eef2f7; }
@media (max-width: 900px) {
  .dashboard { flex-direction: column; }
  .dashboard .sidebar { display: block; position: fixed; top: 0; right: 0; bottom: 0;
    width: min(340px, 92vw); flex: none; z-index: 60; background: #f4f5f7; overflow-y: auto;
    padding: 12px; box-shadow: -4px 0 18px rgba(0,0,0,.2);
    transform: translateX(105%); transition: transform .2s ease; }
  .dashboard.sidebar-collapsed .sidebar { display: block; transform: translateX(105%); }
  .dashboard:not(.sidebar-collapsed) .sidebar { transform: none; }
}
