:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #f9f8f5;
  --ink: #1c2321;
  --ink-2: #4a5552;
  --ink-3: #7c8784;
  --line: #e3e1da;
  --line-2: #eeece6;
  --accent: #0f5f59;
  --accent-2: #137a72;
  --accent-soft: #e2f1ee;
  --amber: #b4600b;
  --amber-soft: #fbefdc;
  --green: #2d7a3e;
  --green-soft: #e3f2e5;
  --red: #b3372f;
  --red-soft: #fbe6e3;
  --blue: #2f5ea8;
  --blue-soft: #e5edf9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 35, 33, .06), 0 4px 16px rgba(28, 35, 33, .05);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.boot { padding: 40px; color: var(--ink-3); }
.hidden { display: none !important; }

/* ---------- layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: linear-gradient(to right, #16201e 232px, transparent 232px); }
.side { background: #16201e; color: #d9e4e1; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 650; color: #fff; font-size: 15px; }
.brand img { width: 28px; height: 28px; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7f9692; padding: 14px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c9d6d3; text-decoration: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(159, 227, 215, .14); color: #fff; }
.nav .badge { margin-inline-start: auto; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding: 14px 10px 0; font-size: 12.5px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .role { color: #8fb0aa; word-break: break-all; }
.side-foot .role b { font-weight: 500; text-transform: capitalize; }
.side-foot button { margin-top: 10px; background: none; border: 1px solid rgba(255,255,255,.18); color: #d9e4e1; border-radius: 7px; padding: 5px 10px; cursor: pointer; }
.main { padding: 28px 32px 60px; min-width: 0; }
.main-col { min-width: 0; }
.impersonate-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff4d6; color: #6b4e00; border-bottom: 1px solid #f0d58a; padding: 10px 32px; font-size: 13.5px; position: sticky; top: 0; z-index: 30; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbar { display: none; }

/* ---------- components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-body { padding: 16px 18px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: #cfccc3; background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #efc4be; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 0; background: none; padding: 4px 6px; border-radius: 6px; cursor: pointer; color: var(--ink-3); }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--red); background: var(--red-soft); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 13px; cursor: pointer; font-weight: 550; color: var(--ink-2); }
.seg button + button { border-inline-start: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(19, 122, 114, .14); }
textarea { min-height: 70px; resize: vertical; }
select.inline { width: auto; padding: 4px 8px; font-size: 13px; }
input.search { width: 240px; }
label.field { display: block; margin-bottom: 13px; }
label.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.check { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.check:hover { background: var(--surface-2); }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check-list { border: 1px solid var(--line); border-radius: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chips label { border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px; cursor: pointer; user-select: none; font-weight: 550; }
.day-chips input { display: none; }
.day-chips label:has(input:checked) { background: var(--accent); color: #fff; border-color: var(--accent); }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: -6px; margin-bottom: 12px; }
.callout { padding: 10px 14px; border-radius: 8px; background: var(--amber-soft); color: #7a420a; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.callout.info { background: var(--blue-soft); color: #1f4278; }
.callout.block { display: block; }
.callout.ok { background: var(--green-soft); color: #1f5a2c; }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: start; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: end; }
table.t tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.empty { padding: 34px 18px; text-align: center; color: var(--ink-3); }

/* parents & students */
.parent-card .card-head h2 { display: flex; align-items: center; gap: 10px; }
.contact { display: flex; gap: 14px; color: var(--ink-3); font-size: 13px; flex-wrap: wrap; }
.student { border-top: 1px solid var(--line-2); }
.student:first-child { border-top: 0; }
.student-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 6px; gap: 10px; flex-wrap: wrap; }
.student-name { font-weight: 650; font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
.student table.t th { background: none; border-bottom-color: var(--line-2); }
.student table.t { margin-bottom: 6px; }
.student .add-row { padding: 0 18px 12px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 24px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* period picker */
.period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period .range { font-weight: 600; min-width: 190px; text-align: center; }

/* Schedule (teacher and manager): one horizontal row per lesson, grouped by day */
.row-day { margin-bottom: 16px; }
.row-day h3 { font-size: 13.5px; margin: 0 0 6px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.row-day.today h3 { color: var(--accent); }
.card.rows { padding: 0; overflow: hidden; }
.lrow { border-bottom: 1px solid var(--line-2); border-inline-start: 4px solid var(--blue); }
.lrow:last-child { border-bottom: 0; }
.lrow-main { display: grid; grid-template-columns: 110px minmax(0, 1fr) 150px auto; gap: 14px; align-items: center; padding: 10px 14px; }
.lrow-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.lrow-who { color: var(--ink-2); margin-top: 2px; }
.lrow-act { white-space: nowrap; text-align: end; }
.lrow.progress { border-inline-start-color: var(--accent-2); background: var(--accent-soft); }
.lrow.confirm { border-inline-start-color: var(--amber); background: var(--amber-soft); }
.lrow.completed { border-inline-start-color: var(--green); }
.lrow.canceled { border-inline-start-color: #b9b5aa; opacity: .7; }
.lrow.canceled .lrow-time { text-decoration: line-through; }
.lrow-confirm { padding: 0 14px 12px; padding-inline-start: 138px; display: flex; flex-direction: column; gap: 8px; }
.lrow-confirm .att { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.lrow-confirm .att .check { margin: 0; }
.lrow-btns, .cancel-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cancel-box input { flex: 1; min-width: 220px; }
.badge.live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (max-width: 760px) {
  .lrow-main { grid-template-columns: 1fr auto; }
  .lrow-what { grid-column: 1 / -1; order: 3; }
  .lrow-act { grid-column: 1 / -1; order: 4; text-align: start; }
  .lrow-confirm { padding-inline-start: 14px; }
}
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }

/* teacher home */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.mini .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.progress { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent-2); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.pending-row:last-child { border-bottom: 0; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(22, 32, 30, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 760px; }
.overlay.popup-layer { z-index: 70; padding-top: 12vh; }
.clash-list { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.clash-list li { border: 1px solid var(--line-2); border-inline-start: 4px solid var(--red); border-radius: 8px; padding: 8px 12px; background: var(--surface-2); }
.clash-list li.student { border-inline-start-color: var(--amber); }
.clash-list .when { font-weight: 600; }
.prop-status { margin-top: 5px; max-width: 280px; }
.propose { border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px 2px; margin-bottom: 12px; }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
.modal-b { padding: 18px 20px 6px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.modal-f .left { margin-inline-end: auto; display: flex; gap: 8px; }
.err { color: var(--red); background: var(--red-soft); padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; }

/* toasts */
#toasts { position: fixed; inset-inline-end: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: #16201e; color: #fff; padding: 10px 14px; border-radius: 9px; box-shadow: var(--shadow); max-width: 380px; animation: up .18s ease-out; }
.toast.error { background: var(--red); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: #16201e; color: #e9f2f0; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { font-size: 34px; max-width: 420px; color: #fff; }
.login-art p { color: #a9c0bb; max-width: 420px; font-size: 15px; }
.login-art .rings { position: absolute; inset-inline-end: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(159, 227, 215, .08); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-form .box { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 22px; margin-bottom: 6px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 62px; }
.pw-eye { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.pw-rules { list-style: none; margin: -4px 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 12.5px; color: var(--ink-3); }
.pw-rules li::before { content: '○'; margin-inline-end: 6px; }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { content: '✓'; }
code.uname { font-family: var(--mono); font-size: 12.5px; background: var(--line-2); padding: 1px 6px; border-radius: 5px; }
.cred { font-size: 14px; gap: 6px 14px; margin: 0 0 12px; }
.side-foot .btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.side-foot .btns button { margin-top: 0; }
.code-input { font-family: var(--mono); font-size: 24px !important; letter-spacing: 10px; text-align: center; }
.dev { margin-top: 14px; padding: 10px 12px; border: 1px dashed #d6b77c; border-radius: 8px; background: #fffaf0; font-size: 12.5px; color: #7a5a14; }

/* report */
.parent-block { margin-bottom: 14px; }
.parent-total { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
details.lessons summary { white-space: nowrap; cursor: pointer; color: var(--accent); font-size: 12.5px; }
details.lessons table { margin-top: 6px; font-size: 12.5px; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell b { white-space: nowrap; }
.bar-cell i { display: block; height: 6px; border-radius: 3px; background: var(--accent-2); opacity: .75; }
.zero { color: #c2c0b8; }

/* teacher availability (manager): booked hours, proposals and free hours (green) per teacher */
.av-pick { margin-bottom: 16px; }
.av-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.av-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-weight: 550; cursor: pointer; user-select: none; }
.av-chip input { margin: 0; accent-color: var(--accent); }
.av-chip.on { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
.av-legend { margin: 14px 0 4px; }
.legend i.lg-free { background: #bfe3c6; border: 1px solid var(--green); }
.legend i.lg-past { background: repeating-linear-gradient(45deg, #dcd9d1 0 2px, transparent 2px 4px); border: 1px solid var(--line); }
.card.av-teacher { margin-top: 12px; }
.av-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.av-grid { border-collapse: separate; border-spacing: 2px; width: 100%; table-layout: fixed; font-size: 12px; padding: 6px 8px 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.av-grid.week { min-width: 760px; }
.av-grid.month { min-width: 640px; }
.av-grid th { font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 3px 2px; text-align: center; white-space: nowrap; }
.av-grid thead th.today, .av-grid tr.today .av-day { color: var(--accent); }
.av-grid.week th:first-child { width: 48px; }
.av-grid.month th:first-child { width: 64px; }
.av-grid .av-hour, .av-grid .av-day { text-align: end; padding-inline-end: 6px; font-variant-numeric: tabular-nums; }
.av-cell { border-radius: 5px; padding: 3px 6px; vertical-align: top; overflow: hidden; line-height: 1.25; }
.av-grid.week .av-cell { height: 40px; }
.av-grid.month .av-cell { height: 20px; padding: 2px 3px; font-size: 10.5px; vertical-align: middle; }
.av-cell b, .av-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-cell b i { font-style: normal; font-weight: 500; color: var(--ink-3); }
.av-cell span { font-size: 11px; color: var(--ink-2); }
.av-cell .av-more { font-weight: 600; color: var(--blue); }
.av-cell.free { background: #cfead3; cursor: pointer; text-align: center; vertical-align: middle; transition: background .12s; }
.av-cell.free span { color: #fff; font-weight: 650; opacity: 0; }
.av-cell.free:hover { background: var(--green); }
.av-cell.free:hover span { opacity: 1; }
.av-cell.booked { background: var(--blue-soft); border-inline-start: 3px solid var(--blue); cursor: pointer; }
.av-cell.booked:hover { filter: brightness(.96); }
.av-cell.booked.progress { background: var(--accent-soft); border-inline-start-color: var(--accent-2); }
.av-cell.booked.confirm { background: var(--amber-soft); border-inline-start-color: var(--amber); }
.av-cell.booked.completed { background: #e9ecf0; border-inline-start-color: #8a96a8; }
.av-grid.month .av-cell.booked span { font-size: 10.5px; color: var(--blue); font-weight: 600; }
.av-cell.proposed { background: var(--amber-soft); border: 1px dashed var(--amber); }
.av-cell.proposed span { color: var(--amber); }
.av-cell.past { background: repeating-linear-gradient(45deg, #eceae4 0 3px, transparent 3px 6px); }
.av-bar { display: flex; height: 8px; min-width: 120px; border-radius: 99px; overflow: hidden; background: var(--line-2); }
.av-bar i { display: block; height: 100%; }
.av-bar i.b { background: var(--blue); }
.av-bar i.f { background: #7cc48a; }

@media (max-width: 980px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { display: none; position: fixed; z-index: 60; width: 250px; }
  .side.open { display: flex; }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: #16201e; color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 40; }
  .topbar button { background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 7px; padding: 4px 10px; }
  .main { padding: 18px 16px 50px; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 32px 24px; min-height: 0; }
  .login-art h1 { font-size: 24px; }
  .grid2, .grid3, .pw-rules { grid-template-columns: 1fr; }
  input.search { width: 100%; }
}

/* ---------- language switch (top right; mirrored to the top left in Arabic) and right-to-left layout */
.lang-btn { position: fixed; top: 10px; inset-inline-end: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; box-shadow: var(--shadow); }
.lang-btn:hover { border-color: var(--accent-2); }
.main { padding-top: 44px; }
.impersonate-bar { padding-inline-end: 150px; }
[dir=rtl] .shell { background: linear-gradient(to left, #16201e 232px, transparent 232px); }
[dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3, [dir=rtl] .nav-group, [dir=rtl] table.t th { letter-spacing: 0; text-transform: none; }
[dir=rtl] .side-foot .role { word-break: normal; }
[dir=rtl] input[type=date], [dir=rtl] input[type=time], [dir=rtl] input[type=number] { text-align: end; }
@media (max-width: 820px) {
  .lang-btn { top: 9px; inset-inline-end: 84px; padding: 3px 10px; font-size: 12.5px; }
  .main { padding-top: 18px; }
  [dir=rtl] .shell { background: none; }
}
@media print {
  .side, .topbar, .toolbar, .no-print { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* Teacher: student actions and course picker (requests sent to the manager) */
.st-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.course-pick { align-items: center; }
.course-pick input[type=number] { width: 64px; padding: 3px 6px; margin-inline-start: auto; }
