/* Мұғалім панелі: бүйір мәзірі + бөлімдер. Түстер styles.css токендерінен алынады. */
.teacher-body {
  --t-danger: #b34d4d;
  --t-danger-soft: #fbeaea;
  --t-green-soft: #e7f3ed;
  --t-gold-soft: #fbf1d9;
  --t-surface: #fffefa;
  --t-radius: 18px;
  --t-sidebar: 248px;
  font-size: 15px;
}
.hidden { display: none !important; }
.teacher-body svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.teacher-body .brand-mark svg { stroke: none; }
.teacher-body :focus-visible { outline: 3px solid #a8b8e7; outline-offset: 2px; }
.teacher-body .primary-button { min-height: 44px; gap: 8px; padding: 0 18px; border-radius: 12px; font-size: 14px; }
.teacher-body .primary-button svg, .teacher-body .secondary-button svg { width: 18px; height: 18px; }
.teacher-body .secondary-button { min-height: 44px; border-radius: 12px; color: var(--ink); font-size: 14px; }
.teacher-body .primary-button:disabled, .teacher-body .secondary-button:disabled { cursor: wait; opacity: .6; transform: none; }
.t-button-block { width: 100%; }

/* ---------- Кіру ---------- */
.teacher-login { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; }
.teacher-login-card { display: grid; gap: 6px; width: min(100%, 440px); padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: var(--t-surface); box-shadow: var(--shadow-soft); }
.teacher-login-card .brand { margin-bottom: 18px; }
.teacher-login-card h1 { margin: 0; color: var(--ink-strong); font-size: 28px; letter-spacing: -.03em; }
.teacher-login-card > p { margin: 0 0 6px; color: var(--muted); line-height: 1.55; }

/* ---------- Каркас ---------- */
.teacher-app { background: linear-gradient(to right, rgba(255, 254, 250, .78) var(--t-sidebar), transparent 0); display: grid; grid-template-columns: var(--t-sidebar) minmax(0, 1fr); min-height: 100dvh; }
.t-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; gap: 22px; height: 100dvh; padding: 22px 16px; border-right: 1px solid var(--line); background: rgba(255, 254, 250, .78); backdrop-filter: blur(10px); }
.t-sidebar-brand { padding: 0 8px; }
.t-sidebar-brand .brand-mark, .t-sidebar-brand .brand-mark svg { width: 38px; height: 38px; }
.t-sidebar-brand .brand-copy strong { font-size: 17px; }
.t-nav { display: grid; gap: 4px; }
.t-nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; font: 600 15px 'Inter', sans-serif; text-align: left; transition: background .15s ease, color .15s ease; }
.t-nav-item svg { width: 20px; height: 20px; flex: none; }
.t-nav-item span { flex: 1; }
.t-nav-item:hover { background: var(--blue-soft); color: var(--blue-dark); }
.t-nav-item.is-active { background: var(--blue-dark); color: #fff; }
.t-nav-count { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: rgba(36, 59, 128, .08); color: inherit; font-size: 12px; font-weight: 700; text-align: center; }
.t-nav-item.is-active .t-nav-count { background: rgba(255, 255, 255, .18); }
@media (min-width: 861px) {
  .t-sidebar-foot { display: contents; }
  .t-sidebar-foot .t-side-link { margin-top: -10px; padding-top: 0; border-top: 0; position: relative; }
  .t-sidebar-foot .t-side-link::before { position: absolute; top: -6px; right: 12px; left: 12px; height: 1px; background: var(--line); content: ''; }
  .t-sidebar-foot .t-user { margin-top: auto; }
}
.t-side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.t-side-link svg { width: 20px; height: 20px; }
.t-side-link:hover { background: var(--blue-soft); color: var(--blue-dark); }
.t-user { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--t-surface); }
.t-user-copy { display: grid; flex: 1; min-width: 0; }
.t-user-copy strong { overflow: hidden; color: var(--ink-strong); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.t-user-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.t-main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 48px; outline: none; }
.t-main > * { max-width: 1180px; }
.t-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.t-header h1 { margin: 0 0 4px; color: var(--ink-strong); font-size: clamp(24px, 3vw, 30px); letter-spacing: -.03em; }
.t-header p { margin: 0; color: var(--muted); line-height: 1.5; }
.t-header-actions { display: flex; align-items: center; gap: 8px; }
.t-status { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--t-green-soft); color: var(--green); font-size: 13px; font-weight: 600; white-space: nowrap; }
.t-status::before { width: 8px; height: 8px; border-radius: 50%; background: currentColor; content: ''; }
.t-status.is-loading { background: var(--blue-soft); color: var(--blue); }
.t-status.is-error { background: var(--t-danger-soft); color: var(--t-danger); white-space: normal; }

/* ---------- Карточкалар мен статистика ---------- */
.t-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.t-stat { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--t-radius); background: var(--t-surface); box-shadow: var(--shadow-card); }
.t-stat strong { display: block; color: var(--ink-strong); font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.t-stat span:not(.t-stat-icon) { color: var(--muted); font-size: 13px; line-height: 1.3; }
.t-stat-icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.t-stat-icon svg { width: 22px; height: 22px; }
.is-blue { background: var(--blue-soft); color: var(--blue-dark); }
.is-gold { background: var(--t-gold-soft); color: #9a6a12; }
.is-orange { background: var(--orange-soft); color: #b8612f; }
.is-green { background: var(--t-green-soft); color: var(--green); }

.t-panel { display: grid; gap: 16px; }
.t-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.t-panel-head h2 { margin: 0 0 4px; color: var(--ink-strong); font-size: 22px; letter-spacing: -.02em; }
.t-panel-head p { margin: 0; color: var(--muted); }
.t-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--t-radius); background: var(--t-surface); box-shadow: var(--shadow-card); }
.t-card-flush { padding: 0; overflow: hidden; }
.t-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.t-card-head h3, .t-editor-head h3 { margin: 0; color: var(--ink-strong); font-size: 17px; }
.t-card-head .t-help { margin-top: 2px; }

/* ---------- Пішіндер ---------- */
.t-form { display: grid; gap: 14px; }
.t-field { display: grid; gap: 6px; min-width: 0; }
.t-field > span { color: var(--ink); font-size: 14px; font-weight: 600; }
.t-field em { color: var(--muted); font-style: normal; font-weight: 500; }
.t-field input, .t-field select, .t-field textarea, .t-select select, .t-search input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #ddd9cd; border-radius: 12px; background: #fff; color: var(--ink);
  font: 500 15px 'Inter', sans-serif; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.t-field textarea { min-height: 160px; padding: 12px; font-family: var(--mono); font-size: 13px; line-height: 1.5; resize: vertical; }
.t-field input:focus, .t-field select:focus, .t-field textarea:focus, .t-select select:focus, .t-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.t-field input.t-mono { font-family: var(--mono); letter-spacing: .02em; }
.t-help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.t-message { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-dark); font-size: 14px; }
.t-message.is-success { background: var(--t-green-soft); color: var(--green); }
.t-message.is-error { background: var(--t-danger-soft); color: var(--t-danger); }
.t-message:empty { display: none; }
.t-form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.t-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.t-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.t-steps > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.t-step-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-size: 14px; font-weight: 700; }
.t-step-body { display: grid; gap: 10px; min-width: 0; padding-top: 4px; }
.t-step-body > strong { color: var(--ink-strong); font-size: 15px; }

.t-toolbar { display: flex; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.t-search { position: relative; flex: 1; min-width: 0; }
.t-search svg { position: absolute; top: 50%; left: 12px; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.t-search input { padding-left: 38px; }
.t-select { flex: none; }
.t-select select { width: auto; min-width: 180px; padding-right: 32px; }
.t-select-small select { min-height: 38px; min-width: 160px; font-size: 14px; }

.t-segment { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f0eee6; }
.t-segment-item { flex: 1; min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font: 600 14px 'Inter', sans-serif; }
.t-segment-item.is-active { background: #fff; box-shadow: 0 2px 6px rgba(38, 53, 94, .1); color: var(--blue-dark); }

.t-pick { display: grid; gap: 8px; }
.t-pick-toolbar { display: flex; align-items: center; gap: 10px; }
.t-search-small input { min-height: 40px; font-size: 14px; }
.t-link-button { flex: none; min-height: 40px; padding: 0 6px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font: 600 14px 'Inter', sans-serif; }
.t-link-button:hover { color: var(--blue-dark); text-decoration: underline; }
.t-check-list { display: grid; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.t-check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.t-check:first-child { border-top: 0; }
.t-check:hover { background: #f8f9fd; }
.t-check:has(input:checked) { background: var(--blue-soft); }
.t-check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--blue-dark); }
.t-check-copy { display: grid; flex: 1; min-width: 0; }
.t-check-copy strong { color: var(--ink-strong); font-size: 14px; font-weight: 600; }
.t-check-copy small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.t-check-empty { padding: 16px; color: var(--muted); font-size: 14px; text-align: center; }

.t-advanced { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.t-advanced summary { padding: 12px; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; }
.t-advanced .t-field { padding: 0 12px 12px; }
.t-ai-button { justify-self: start; border-color: #cdd6f1; background: var(--blue-soft); color: var(--blue-dark); }
.t-ai-button:hover { background: #e2e8fa; }

/* ---------- Тізімдер (кесте орнына) ---------- */
.t-list { display: grid; }
.t-row { display: grid; align-items: center; gap: 14px; min-height: 64px; padding: 12px 20px; border-top: 1px solid var(--line); }
.t-list > .t-row:first-child { border-top: 0; }
.t-row-head { min-height: 0; padding-top: 10px; padding-bottom: 10px; background: #faf8f2; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.t-row-head + .t-row { border-top: 0; }
.t-row-students { grid-template-columns: minmax(0, 2fr) 90px minmax(110px, 1fr) 132px; }
.t-row-assign { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 140px 88px; }
.t-row-result { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(140px, 1fr) 100px; }
.t-row-practice { grid-template-columns: minmax(0, 1.4fr) minmax(140px, 1fr) 90px minmax(0, 1.4fr); }
.t-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-person-copy { display: grid; min-width: 0; }
.t-person-copy strong { overflow: hidden; color: var(--ink-strong); font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.t-person-copy small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.t-avatar { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-size: 14px; font-weight: 700; }
.t-cell-muted { color: var(--muted); font-size: 14px; }
.t-actions { display: flex; justify-content: flex-end; gap: 4px; }
.t-icon-button { display: inline-grid; flex: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s ease, color .15s ease; }
.t-icon-button svg { width: 19px; height: 19px; }
.t-icon-button:hover { background: var(--blue-soft); color: var(--blue-dark); }
.t-icon-button.is-danger:hover { background: var(--t-danger-soft); color: var(--t-danger); }
.t-empty { display: grid; justify-items: center; gap: 10px; padding: 36px 20px; color: var(--muted); text-align: center; }
.t-empty svg { width: 36px; height: 36px; color: #c3c7d3; }
.t-empty strong { color: var(--ink); font-size: 15px; }
.t-empty p { max-width: 380px; margin: 0; font-size: 14px; line-height: 1.5; }

/* Чиптер */
.t-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; background: #f0eee6; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.t-chip.is-blue { background: var(--blue-soft); color: var(--blue-dark); }
.t-chip.is-green { background: var(--t-green-soft); color: var(--green); }
.t-chip.is-gold { background: var(--t-gold-soft); color: #8a5d0c; }
.t-chip.is-red { background: var(--t-danger-soft); color: var(--t-danger); }
.t-chip.is-dot::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ''; }

/* Нәтиже жолағы */
.t-score { display: grid; grid-template-columns: minmax(60px, 1fr) auto; align-items: center; gap: 10px; }
.t-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #eeece4; }
.t-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.t-bar i.is-mid { background: #d9a23a; }
.t-bar i.is-low { background: var(--t-danger); }
.t-score b { min-width: 44px; color: var(--ink-strong); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.t-score small { color: var(--muted); font-size: 12px; }

/* ---------- Тест карточкалары ---------- */
.t-test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.t-test { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--t-radius); background: var(--t-surface); box-shadow: var(--shadow-card); }
.t-test h3 { margin: 0; color: var(--ink-strong); font-size: 17px; line-height: 1.3; }
.t-test-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.t-test-stats { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.t-test-stats b { color: var(--ink); font-weight: 600; }
.t-test-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.t-test-foot .primary-button { flex: 1; min-height: 40px; font-size: 14px; }
.t-test-grid > .t-empty { grid-column: 1 / -1; border: 1px dashed #d8d4c8; border-radius: var(--t-radius); }

.t-editor { display: grid; gap: 18px; border-color: #cdd6f1; }
.t-editor-head { display: flex; align-items: center; justify-content: space-between; }
.t-preview { display: grid; gap: 8px; }
.t-preview:empty { display: none; }
.t-preview-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.t-preview-item p { margin: 0 0 8px; color: var(--ink-strong); font-size: 14px; font-weight: 600; line-height: 1.45; }
.t-preview-item pre { margin: 0 0 8px; padding: 8px 10px; overflow-x: auto; border-radius: 8px; background: #f5f3ec; font: 13px/1.45 var(--mono); }
.t-preview-item ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.t-preview-item li { padding: 4px 8px; border-radius: 6px; color: var(--ink); font-size: 14px; }
.t-preview-item li.is-correct { background: var(--t-green-soft); color: var(--green); font-weight: 600; }
.t-preview-item li.is-correct::after { content: ' ✓'; }

.t-assign-layout { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); align-items: start; gap: 16px; }

/* ---------- Диалог ---------- */
.teacher-dialog { width: min(calc(100vw - 32px), 460px); padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 24px 70px rgba(38, 53, 94, .25); }
.teacher-dialog::backdrop { background: rgba(31, 45, 78, .45); }
.teacher-dialog-card { display: grid; gap: 16px; padding: 24px; border-radius: 20px; background: var(--t-surface); }
.teacher-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.teacher-dialog-card h2 { margin: 0; color: var(--ink-strong); font-size: 20px; letter-spacing: -.02em; }
.teacher-confirm-message { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.6; }
.teacher-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
#teacher-dialog-form.is-confirm .primary-button { background: var(--t-danger); box-shadow: none; }
#teacher-dialog-form.is-confirm .primary-button:hover { background: #963f3f; }

/* ---------- Toast ---------- */
.t-toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.t-toast { display: flex; align-items: center; gap: 10px; max-width: min(380px, calc(100vw - 40px)); padding: 12px 16px; border-radius: 12px; background: var(--ink-strong); box-shadow: 0 12px 30px rgba(31, 45, 78, .25); color: #fff; font-size: 14px; animation: t-toast-in .2s ease-out; }
.t-toast svg { width: 18px; height: 18px; flex: none; color: #8fd3b2; }
.t-toast.is-error svg { color: #ffb4a8; }
@keyframes t-toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .t-toast { animation: none; } }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .t-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-assign-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .teacher-app { grid-template-columns: 1fr; }
  .t-sidebar { position: sticky; top: 0; z-index: 20; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; height: auto; padding: 10px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .t-sidebar-brand .brand-copy small { display: none; }
  .t-sidebar-foot { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .t-side-link span, .t-user-copy { display: none; }
  .t-side-link { width: 44px; padding: 0; justify-content: center; }
  .t-user { padding: 0; border: 0; background: transparent; }
  .t-user .t-avatar { display: none; }
  .t-nav { display: flex; order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .t-nav::-webkit-scrollbar { display: none; }
  .t-nav-item { flex: none; min-height: 44px; padding: 0 12px; border-bottom: 3px solid transparent; border-radius: 0; font-size: 14px; }
  .t-nav-item svg { display: none; }
  .t-nav-item.is-active { border-bottom-color: var(--blue-dark); background: transparent; color: var(--blue-dark); }
  .t-nav-item.is-active .t-nav-count { background: var(--blue-soft); }
  .t-main { padding-top: 20px; }
  .t-grid-3 { grid-template-columns: 1fr 1fr; }
  .t-row-students { grid-template-columns: minmax(0, 1fr) 132px; }
  .t-row-students > .t-col-class, .t-row-students > .t-col-progress { display: none; }
  .t-row-students .t-person-copy small.t-mobile-only { display: block; }
}

@media (max-width: 640px) {
  .teacher-body { font-size: 16px; }
  .t-header { align-items: center; margin-bottom: 16px; }
  .t-header h1 { margin: 0; font-size: 22px; }
  .t-header p { display: none; }
  .t-header-actions .t-status:not(.is-error) { display: none; }
  .t-stats { gap: 8px; margin-bottom: 20px; }
  .t-stat { gap: 10px; padding: 12px; }
  .t-stat-icon { width: 36px; height: 36px; }
  .t-stat-icon svg { width: 18px; height: 18px; }
  .t-stat strong { font-size: 20px; }
  .t-stat span:not(.t-stat-icon) { font-size: 12px; }
  .t-panel-head { align-items: stretch; flex-direction: column; }
  .t-panel-head p { font-size: 14px; }
  .t-panel-head .primary-button { width: 100%; }
  .t-toolbar { flex-direction: column; }
  .t-select select { width: 100%; }
  .t-card { padding: 16px; }
  .t-card-flush { padding: 0; }
  .t-card-head { align-items: stretch; flex-direction: column; padding: 14px 16px; }
  .t-row { padding: 12px 16px; }
  .t-row-head { display: none; }
  .t-row-assign, .t-row-result, .t-row-practice { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .t-row-assign { grid-template-columns: minmax(0, 1fr) auto auto; }
  .t-row-students { grid-template-columns: minmax(0, 1fr) auto; }
  .t-toolbar { padding: 14px 16px; }
  .t-row-assign > .t-col-test, .t-row-result > .t-col-test, .t-row-practice > .t-col-tasks { grid-column: 1 / -1; order: 3; }
  .t-row-result > .t-col-date { display: none; }
  .t-row-practice > .t-col-attempts { display: none; }
  .t-grid-3 { grid-template-columns: 1fr; }
  .t-steps > li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .t-step-num { width: 28px; height: 28px; font-size: 13px; }
  .t-form-actions, .teacher-dialog-actions { flex-direction: column-reverse; }
  .t-form-actions button, .teacher-dialog-actions button { width: 100%; }
  .t-field input, .t-field select, .t-field textarea, .t-search input, .t-select select { font-size: 16px; }
  .t-toast-region { right: 16px; bottom: 16px; left: 16px; }
}

@media (max-width: 520px) {
  .t-nav { overflow: visible; }
  .t-nav-item { flex: 1 1 0; justify-content: center; min-width: 0; padding: 0 4px; font-size: 13px; }
  .t-nav-item span { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .t-nav-count { display: none; }
}

.t-mobile-only { display: none; }
