/* Result card (used on the public page and in the admin preview) */
.rh-card { --rh-ink:#1d2433; --rh-muted:#667085; --rh-line:#e4e7ec; --rh-green:#1a56db;
	background:#fff; border:1px solid var(--rh-line); border-radius:14px; padding:28px; max-width:760px; margin:0 auto;
	color:var(--rh-ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; font-size:15px; line-height:1.5; box-sizing:border-box; }
.rh-card *, .rh-front * { box-sizing:border-box; }
.rh-card-head { display:flex; gap:16px; align-items:center; border-bottom:3px double var(--rh-ink); padding-bottom:16px; margin-bottom:18px; }
.rh-card-logo { width:64px; height:64px; object-fit:contain; flex:none; }
.rh-card-head h3 { margin:0; font:700 22px/1.2 Georgia,"Times New Roman",serif; color:var(--rh-ink); }
.rh-card-head p { margin:4px 0 0; color:var(--rh-muted); }
.rh-card-who { display:flex; gap:18px; align-items:center; margin-bottom:18px; }
.rh-card-photo { width:84px; height:84px; border-radius:12px; object-fit:cover; flex:none; }
.rh-card-initials { display:inline-flex; align-items:center; justify-content:center; font:700 26px Georgia,serif; }
.rh-card-who dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 24px; margin:0; flex:1; }
.rh-card-who dt { font-size:12px; color:var(--rh-muted); }
.rh-card-who dd { margin:0; font-weight:600; }
.rh-card-table { width:100%; border-collapse:collapse; margin:0; }
.rh-card-table th { text-align:left; font-size:13px; color:var(--rh-muted); font-weight:600; padding:9px 10px; border-bottom:2px solid var(--rh-ink); }
.rh-card-table td { padding:9px 10px; border-bottom:1px solid #eef0f3; }
.rh-card-sum { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:18px 0; }
.rh-card-sum div { background:#f6f7f9; border-radius:10px; padding:10px 12px; }
.rh-card-sum span { display:block; font-size:12px; color:var(--rh-muted); }
.rh-card-sum strong { font:700 20px Georgia,serif; }
.rh-card-verdict { margin:0; padding:12px 16px; border-radius:10px; font-weight:600; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.rh-card-verdict span { font-weight:400; }
.rh-card-verdict.is-pass { background:#e8f0fe; color:#1e429f; }
.rh-card-verdict.is-fail { background:#fdecea; color:#a32b1f; }
.rh-card-note { margin:16px 0 0; padding-top:12px; border-top:1px dashed var(--rh-line); color:var(--rh-muted); font-size:13px; }

/* Public result checker */
.rh-front { max-width:760px; margin:0 auto; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; color:#1d2433; }
.rh-front-panel { background:#fff; border:1px solid #e4e7ec; border-radius:14px; padding:28px; }
.rh-front-panel h2 { margin:0 0 6px; font:700 24px/1.2 Georgia,"Times New Roman",serif; }
.rh-front-sub { margin:0 0 20px; color:#667085; }
.rh-front .rh-check-form { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.rh-front .rh-check-form label { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:600; color:#3b4658; }
.rh-front .rh-check-form select, .rh-front .rh-check-form input { width:100%; height:46px; padding:0 12px; font-size:15px; border:1px solid #d0d5dd; border-radius:10px; background:#fff; color:#1d2433; box-shadow:none; }
.rh-front .rh-check-form select:focus, .rh-front .rh-check-form input:focus { outline:none; border-color:#1a56db; box-shadow:0 0 0 3px rgba(14,124,102,.15); }
.rh-front .rh-front-btn, .rh-front .rh-front-btn2 { height:46px; padding:0 22px; border:1px solid transparent; border-radius:10px; font-size:15px; font-weight:600; cursor:pointer; }
.rh-front .rh-front-btn { grid-column:1 / -1; background:#1a56db; color:#fff; }
.rh-front .rh-front-btn:hover { background:#1e429f; }
.rh-front .rh-front-btn:disabled { opacity:.6; cursor:wait; }
.rh-front .rh-front-btn2 { background:#fff; color:#1d2433; border-color:#d0d5dd; }
.rh-front-error { margin:14px 0 0; padding:12px 16px; border-radius:10px; background:#fdecea; color:#a32b1f; font-weight:600; }
.rh-front-result { margin-top:20px; }
.rh-front-actions { display:flex; gap:10px; justify-content:center; margin-top:16px; }
.rh-front [hidden] { display:none !important; }

@media (max-width:640px) {
	.rh-front .rh-check-form { grid-template-columns:1fr; }
	.rh-card { padding:18px; }
	.rh-card-who { flex-direction:column; align-items:flex-start; }
	.rh-card-sum { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media print {
	body * { visibility:hidden !important; }
	.rh-card, .rh-card * { visibility:visible !important; }
	.rh-card { position:absolute; left:0; top:0; width:100%; max-width:none; border:0; border-radius:0; }
}

.rh-opt { color:#1a56db; font-weight:700; }
.rh-card-foot { margin:8px 0 0; font-size:12px; color:#667085; }

/* ---------- Result card templates ---------- */
.rh-card { --rh-accent:#1a56db; }
.rh-card dl { margin:0; }
.rh-card dd { margin:0; }
.rh-card h3, .rh-card h4, .rh-card p { text-transform:none; letter-spacing:normal; }
.rh-card img { max-width:100%; height:auto; }
.rh-card .rh-card-initials { display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.rh-card-verdict { margin-top:16px; }

/* Modern */
.rh-t-modern { padding:0; overflow:hidden; }
.rm-band { display:flex; align-items:center; gap:16px; padding:22px 28px; background:var(--rh-accent); color:#fff; }
.rm-band h3 { margin:0; font:700 21px/1.2 -apple-system,"Segoe UI",Roboto,sans-serif; color:#fff; }
.rm-band p { margin:3px 0 0; opacity:.85; color:#fff; }
.rm-logo { width:56px; height:56px; object-fit:contain; background:#fff; border-radius:12px; padding:4px; flex:none; }
.rm-badge { margin-left:auto; padding:6px 14px; border-radius:999px; background:rgba(255,255,255,.2); font-weight:600; font-size:13px; text-align:center; }
.rm-body { padding:24px 28px 28px; }
.rm-student { display:flex; gap:18px; align-items:center; margin-bottom:20px; }
.rm-photo { width:92px; height:92px; border-radius:18px; object-fit:cover; flex:none; font-size:28px; }
.rm-student h4 { margin:0 0 8px; font-size:22px; line-height:1.2; color:var(--rh-ink); }
.rm-chips { display:flex; flex-wrap:wrap; gap:6px; }
.rm-chips span { padding:4px 12px; border-radius:999px; background:#eef2f6; background:color-mix(in srgb, var(--rh-accent) 12%, #fff); color:#1d2433; font-size:13px; font-weight:600; }
.rm-extra { display:flex; flex-wrap:wrap; gap:4px 20px; margin-top:10px; font-size:13px; }
.rm-extra div { display:flex; gap:6px; }
.rm-extra dt { color:var(--rh-muted); }
.rm-extra dd { font-weight:600; }
.rm-table { width:100%; border-collapse:collapse; }
.rm-table th { background:var(--rh-accent); color:#fff; text-align:left; padding:10px 12px; font-size:13px; font-weight:600; }
.rm-table th:first-child { border-radius:10px 0 0 10px; }
.rm-table th:last-child { border-radius:0 10px 10px 0; }
.rm-table td { padding:10px 12px; border-bottom:1px solid #eef0f3; }
.rm-table tbody tr:nth-child(even) td { background:#fafbfc; }
.rm-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px; margin-top:20px; }
.rm-tiles div { background:#f6f7f9; border-left:4px solid var(--rh-accent); border-radius:8px; padding:10px 14px; }
.rm-tiles span { display:block; font-size:12px; color:var(--rh-muted); }
.rm-tiles strong { font-size:20px; }

/* Profile */
.rh-t-profile { text-align:center; max-width:560px; }
.rp-top { display:flex; align-items:center; justify-content:center; gap:10px; color:var(--rh-muted); font-weight:600; margin-bottom:18px; }
.rp-logo { width:36px; height:36px; object-fit:contain; }
.rp-photo { width:112px; height:112px; border-radius:50%; object-fit:cover; border:4px solid var(--rh-accent); font-size:34px; }
.rp-name { margin:12px 0 2px; font-size:24px; color:var(--rh-ink); }
.rp-sub { margin:0 0 18px; color:var(--rh-muted); }
.rp-panel { text-align:left; border:1px solid var(--rh-line); border-radius:12px; overflow:hidden; margin-top:16px; }
.rp-head { background:var(--rh-accent); color:#fff; padding:11px 16px; font-weight:700; text-align:center; }
.rp-dl > div { display:flex; justify-content:space-between; gap:12px; padding:9px 16px; }
.rp-dl > div:nth-child(odd) { background:#f6f7f9; }
.rp-dl dt { color:var(--rh-muted); }
.rp-dl dd { font-weight:600; text-align:right; }
.rp-table { width:100%; border-collapse:collapse; }
.rp-table th { text-align:left; padding:9px 16px; font-size:13px; color:var(--rh-muted); border-bottom:1px solid var(--rh-line); }
.rp-table td { padding:9px 16px; border-bottom:1px solid #eef0f3; }
.rp-panel .rh-card-foot { padding:0 16px 12px; }

/* Transcript */
.rh-t-transcript { border:1px solid var(--rh-ink); border-radius:4px; font-family:Georgia,"Times New Roman",serif; }
.rs-head { text-align:center; border-bottom:2px solid var(--rh-ink); padding-bottom:14px; margin-bottom:16px; }
.rs-logo { width:56px; height:56px; object-fit:contain; display:block; margin:0 auto 6px; }
.rs-head h3 { margin:0; font:700 22px Georgia,serif; letter-spacing:.02em; }
.rs-head p { margin:4px 0 0; color:var(--rh-muted); font-style:italic; }
.rs-two { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:16px; }
.rs-info > div { display:flex; justify-content:space-between; gap:10px; padding:5px 0; border-bottom:1px dotted #b8c0cc; font-size:14px; }
.rs-info dt { color:var(--rh-muted); }
.rs-info dd { font-weight:700; text-align:right; }
.rs-table { width:100%; border-collapse:collapse; font-size:14px; }
.rs-table th, .rs-table td { border:1px solid #98a2b3; padding:7px 10px; text-align:left; }
.rs-table th { background:#f2f4f7; }
.rs-sign { display:flex; justify-content:space-between; gap:40px; margin-top:44px; }
.rs-sign span { flex:1; text-align:center; border-top:1px solid var(--rh-ink); padding-top:6px; font-size:13px; color:var(--rh-muted); }

/* Dashboard */
.rh-t-dashboard { padding:0; overflow:hidden; }
.rd-head { display:flex; align-items:center; gap:14px; padding:20px 26px; background:#1d2433; border-bottom:4px solid var(--rh-accent); }
.rd-head h3 { margin:0; color:#fff; font:700 20px/1.2 -apple-system,"Segoe UI",Roboto,sans-serif; }
.rd-head p { margin:3px 0 0; color:#aab4c5; }
.rd-logo { width:48px; height:48px; object-fit:contain; background:#fff; border-radius:10px; padding:3px; }
.rd-grid { display:grid; grid-template-columns:210px 1fr; }
.rd-grid aside { background:#f6f7f9; padding:22px 18px; text-align:center; }
.rd-photo { width:96px; height:96px; border-radius:50%; object-fit:cover; font-size:30px; }
.rd-grid aside h4 { margin:10px 0 12px; font-size:18px; color:var(--rh-ink); }
.rd-dl { text-align:left; font-size:13px; }
.rd-dl > div { padding:6px 0; border-top:1px solid var(--rh-line); }
.rd-dl dt { color:var(--rh-muted); font-size:12px; }
.rd-dl dd { font-weight:600; }
.rd-main { padding:22px 24px; }
.rd-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(96px,1fr)); gap:10px; margin-bottom:18px; }
.rd-tiles div { border:1px solid var(--rh-line); border-radius:12px; padding:10px 12px; }
.rd-tiles span { display:block; font-size:12px; color:var(--rh-muted); }
.rd-tiles strong { font-size:22px; color:var(--rh-accent); }
.rd-row { display:grid; grid-template-columns:minmax(90px,150px) 1fr 44px 34px; gap:10px; align-items:center; padding:7px 0; }
.rd-bar { height:10px; border-radius:999px; background:#eceff3; overflow:hidden; }
.rd-bar i { display:block; height:100%; border-radius:999px; background:var(--rh-accent); }
.rd-num { text-align:right; font-weight:700; }
.rd-grade { text-align:center; font-weight:700; color:var(--rh-accent); }
.rh-t-dashboard .rh-card-note { margin:0; padding:14px 26px; }

/* Certificate */
.rh-t-certificate { padding:14px; }
.rc-frame { border:6px double var(--rh-accent); padding:30px 32px; text-align:center; font-family:Georgia,"Times New Roman",serif; }
.rc-logo { width:60px; height:60px; object-fit:contain; margin-bottom:6px; }
.rc-school { margin:0; font-size:15px; font-weight:700; letter-spacing:.08em; text-transform:uppercase !important; color:var(--rh-muted); }
.rc-title { margin:10px 0 4px; font:700 30px/1.2 Georgia,serif; color:var(--rh-accent); }
.rc-lead { margin:0; font-style:italic; color:var(--rh-muted); }
.rc-name { display:inline-block; margin:8px 0 6px; padding:0 20px 4px; font:700 30px Georgia,serif; color:var(--rh-ink); border-bottom:2px solid var(--rh-accent); }
.rc-text { margin:8px auto 18px; max-width:540px; line-height:1.6; }
.rc-table { width:100%; border-collapse:collapse; font-size:14px; text-align:left; }
.rc-table th { padding:6px 10px; border-bottom:2px solid var(--rh-accent); color:var(--rh-muted); font-weight:600; }
.rc-table td { padding:6px 10px; border-bottom:1px solid #eef0f3; }
.rc-frame .rs-sign { margin-top:38px; }

@media (max-width:640px) {
	.rm-student { flex-direction:column; align-items:flex-start; }
	.rs-two { grid-template-columns:1fr; }
	.rd-grid { grid-template-columns:1fr; }
	.rm-band { flex-wrap:wrap; }
	.rm-badge { margin-left:0; }
}
@media print {
	.rh-card, .rh-card * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* ---------- Student dashboard ---------- */
.rh-portal { --rh-ink:#1d2433; --rh-muted:#667085; --rh-line:#e4e7ec; max-width:980px; margin:0 auto; color:#1d2433; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; font-size:15px; line-height:1.5; }
.rh-portal *, .rh-portal *::before, .rh-portal *::after { box-sizing:border-box; }
.rh-portal [hidden] { display:none !important; }
.rh-portal-panel { background:#fff; border:1px solid var(--rh-line); border-radius:14px; padding:24px; margin-top:18px; }
.rh-portal-panel h2, .rh-portal-panel h3 { margin:0 0 8px; color:var(--rh-ink); }
.rh-portal-panel h2 { font:700 24px/1.2 Georgia,"Times New Roman",serif; }
.rh-portal-panel h3 { font-size:17px; }
.rh-portal-sub { margin:0 0 18px; color:var(--rh-muted); }

/* sign in */
.rh-portal-login-wrap { max-width:460px; margin:0 auto; }
.rh-portal-login { display:grid; gap:14px; }
.rh-portal-login label { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:600; color:#3b4658; }
.rh-portal-login input, .rh-portal-login select { width:100%; height:46px; padding:0 12px; font-size:15px; border:1px solid #d0d5dd; border-radius:10px; background:#fff; color:#1d2433; box-shadow:none; }
.rh-portal-login input:focus, .rh-portal-login select:focus { outline:none; border-color:var(--rh-accent); box-shadow:0 0 0 3px rgba(14,124,102,.15); }
.rh-pl-roll { display:grid; gap:14px; grid-template-columns:1fr 1fr; }
.rh-portal .rh-front-btn { height:46px; padding:0 22px; border:1px solid transparent; border-radius:10px; font-size:15px; font-weight:600; cursor:pointer; background:var(--rh-accent); color:#fff; }
.rh-portal .rh-front-btn:hover { filter:brightness(.92); }
.rh-portal .rh-front-btn:disabled { opacity:.6; cursor:wait; }
.rh-portal .rh-front-btn2 { height:40px; padding:0 16px; border:1px solid #d0d5dd; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; background:#fff; color:#1d2433; }
.rh-portal .rh-front-btn2:hover { background:#f7f8fa; }
.rh-portal .rh-front-error { margin:14px 0 0; padding:12px 16px; border-radius:10px; background:#fdecea; color:#a32b1f; font-weight:600; }
.rh-portal-switch { margin:16px 0 0; text-align:center; }
.rh-linkbtn { background:none; border:0; padding:0; color:var(--rh-accent); font-weight:600; font-size:14px; cursor:pointer; text-decoration:underline; }

/* dashboard */
.rh-portal-top { display:flex; align-items:center; gap:18px; padding:22px 24px; border-radius:16px; background:#1d2433; color:#fff; border-bottom:4px solid var(--rh-accent); }
.rh-portal-avatar { width:76px; height:76px; border-radius:50%; object-fit:cover; flex:none; font-size:26px; }
.rh-portal-who { flex:1; min-width:0; }
.rh-portal-who p { margin:0; color:#aab4c5; font-size:13px; }
.rh-portal-who h2 { margin:2px 0 4px; color:#fff; font:700 26px/1.2 Georgia,"Times New Roman",serif; }
.rh-portal-who span { color:#c9d1de; font-size:14px; }
.rh-portal-top .rh-front-btn2 { background:transparent; color:#fff; border-color:rgba(255,255,255,.35); }
.rh-portal-top .rh-front-btn2:hover { background:rgba(255,255,255,.1); }
.rh-portal-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; margin-top:18px; }
.rh-portal-tiles > div { background:#fff; border:1px solid var(--rh-line); border-left:4px solid var(--rh-accent); border-radius:12px; padding:14px 16px; }
.rh-portal-tiles span { display:block; font-size:12px; color:var(--rh-muted); font-weight:600; }
.rh-portal-tiles strong { display:block; font-size:30px; line-height:1.15; color:var(--rh-ink); }
.rh-portal-tiles em { font-style:normal; font-size:13px; color:var(--rh-muted); }
.rh-portal-tiles em.is-up { color:#1e429f; }
.rh-portal-tiles em.is-down { color:#a32b1f; }
.rh-portal-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:18px; }
.rh-portal-grid .rh-portal-panel { margin-top:18px; }
.rh-progress-row { display:grid; grid-template-columns:minmax(90px,150px) 1fr 52px; gap:12px; align-items:center; padding:7px 0; }
.rh-progress-label { font-size:14px; font-weight:600; }
.rh-progress-bar { height:12px; border-radius:999px; background:#eceff3; overflow:hidden; }
.rh-progress-bar i { display:block; height:100%; border-radius:999px; background:var(--rh-accent); }
.rh-progress-num { text-align:right; font-weight:700; }
.rh-portal-facts { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }
.rh-portal-facts p { margin:0; padding:10px 12px; border-radius:10px; background:#f6f7f9; }
.rh-portal-facts span { display:block; font-size:12px; color:var(--rh-muted); }
.rh-portal-dl { margin:0; }
.rh-portal-dl > div { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid #eef0f3; }
.rh-portal-dl > div:last-child { border-bottom:0; }
.rh-portal-dl dt { color:var(--rh-muted); }
.rh-portal-dl dd { margin:0; font-weight:600; text-align:right; }
.rh-portal-item { display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid #eef0f3; flex-wrap:wrap; }
.rh-portal-item:last-child { border-bottom:0; }
.rh-portal-item-main { flex:1; min-width:200px; }
.rh-portal-item-main strong { display:block; }
.rh-portal-item-main span { color:var(--rh-muted); font-size:14px; }
.rh-portal-status { padding:4px 12px; border-radius:999px; font-size:13px; font-weight:600; }
.rh-portal-status.is-pass { background:#e8f0fe; color:#1e429f; }
.rh-portal-status.is-fail { background:#fdecea; color:#a32b1f; }
.rh-portal-empty { text-align:center; padding:40px 24px; }
.rh-portal-cardwrap { margin-top:18px; }
.rh-portal-cardbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.rh-portal-cardbar h3 { margin:0; font-size:17px; }
.rh-portal-cardbar span { display:inline-flex; gap:8px; }

@media (max-width:760px) {
	.rh-portal-grid { grid-template-columns:1fr; }
	.rh-portal-top { flex-wrap:wrap; }
	.rh-pl-roll { grid-template-columns:1fr; }
	.rh-progress-row { grid-template-columns:1fr 52px; }
	.rh-progress-bar { grid-column:1 / -1; order:3; }
}

.rh-front .rh-check-form .rh-span { grid-column:1 / -1; }

/* Teacher's remark (added in 2.11) */
.rh-card-comment { margin:16px 0 0; padding:10px 14px; border-left:4px solid var(--rh-accent); background:#f6f7f9; border-radius:0 8px 8px 0; font-size:14px; }
@media print {
	.rh-card-comment { background:none; }
}

/* ---------- School report (added in 2.13) ---------- */
.rh-rr { padding:10px; border:3px solid var(--rh-accent); border-radius:0; max-width:820px; background:#fff; }
.rr-frame { border:1px solid var(--rh-accent); padding:28px 30px 24px; font-family:Georgia,"Times New Roman",serif; color:var(--rh-ink); }
.rr-frame p, .rr-frame h3 { margin:0; text-transform:none; }
.rr-head { text-align:center; }
.rr-logo { display:block; width:64px; height:64px; margin:0 auto 10px; object-fit:contain; border-radius:50%; }
.rr-head h3 { font:700 26px/1.15 Georgia,"Times New Roman",serif; letter-spacing:.16em; text-transform:uppercase !important; color:var(--rh-accent); }
.rr-motto { margin-top:6px !important; font-size:12px; font-style:italic; color:var(--rh-muted); }
.rr-title { display:flex; align-items:center; gap:16px; margin:18px 0 20px; }
.rr-title::before, .rr-title::after { content:""; flex:1; height:1px; background:var(--rh-accent); opacity:.45; }
.rr-title span { font-size:13px; font-weight:600; letter-spacing:.3em; text-transform:uppercase; color:var(--rh-ink); }
.rr-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 28px; margin-bottom:22px; }
.rr-field span, .rr-box span, .rr-comments span { display:block; font-size:9px; letter-spacing:.18em; text-transform:uppercase; color:var(--rh-muted); }
.rr-field strong { display:block; min-height:26px; padding-top:4px; border-bottom:1px solid var(--rh-ink); font-size:14px; font-weight:600; }
.rr-table { width:100%; border-collapse:collapse; font-size:13px; border:1px solid var(--rh-accent); }
.rr-table th { padding:8px 8px; background:var(--rh-accent); color:#fff; font-size:10px; letter-spacing:.14em; text-transform:uppercase; text-align:center; font-weight:700; }
.rr-table td { padding:7px 8px; border:1px solid var(--rh-line); text-align:center; }
.rr-table .rr-subj { text-align:left; }
.rr-table .rr-rem { text-align:left; font-size:12px; color:var(--rh-muted); }
.rr-table td.rr-final { background:#f3f0e8; }
.rr-key { margin-top:10px !important; text-align:center; font-size:10.5px; font-style:italic; color:var(--rh-muted); }
.rr-boxes { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:14px; }
.rr-box { border:1px solid var(--rh-line); padding:7px 10px 8px; }
.rr-box strong { display:block; min-height:22px; margin-top:3px; font-size:14px; }
.rr-comments { margin-top:14px; border:1px solid var(--rh-line); padding:8px 12px 10px; min-height:96px; }
.rr-comments p { margin-top:6px !important; font-size:13.5px; line-height:1.55; }
.rr-note { margin-top:12px !important; font-size:11.5px; color:var(--rh-muted); text-align:center; }
.rr-signs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px; margin-top:44px; }
.rr-signs span { padding-top:6px; border-top:1px solid var(--rh-ink); text-align:center; font-size:9px; letter-spacing:.18em; text-transform:uppercase; color:var(--rh-muted); }
@media (max-width:640px) {
	.rh-rr:not(.rh-sheet) .rr-frame { padding:18px 14px; }
	.rh-rr:not(.rh-sheet) .rr-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.rh-rr:not(.rh-sheet) .rr-boxes { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.rh-rr:not(.rh-sheet) .rr-head h3 { font-size:19px; letter-spacing:.1em; }
	.rh-rr:not(.rh-sheet) .rr-table { font-size:12px; }
	.rh-rr:not(.rh-sheet) .rr-signs { gap:12px; }
}
@media print {
	.rh-rr { border-width:3px; }
	.rr-table th, .rr-table td.rr-final { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
	.rr-frame { padding:20px 24px; }
}
.rr-table th.rr-rem { color:#fff; font-size:10px; }

/* Signature pictures (added in 2.16) */
.rh-sig { display:block; max-height:54px; max-width:80%; margin:-60px auto 6px; object-fit:contain; position:relative; }
.rs-sign span, .rr-signs span { position:relative; }
.rs-sign span, .rr-signs span { padding-top:6px; }
.rh-signname{display:block;font-size:13px;letter-spacing:0;text-transform:none;color:var(--rh-ink);font-weight:700;margin-bottom:2px}
.rh-card-teacher{margin:12px 0 0;font-size:13px;color:var(--rh-ink)}
.rh-uses-note{margin:0 0 12px;padding:8px 12px;background:#eff6ff;border-radius:8px;color:#1a56db;font-size:13px}

/* Student dashboard: announcements and school fees */
.rh-portal .rh-portal-panel.rh-notices,
.rh-portal .rh-portal-panel.rh-fees { margin-top:18px; }
.rh-notice { padding:14px 16px; border:1px solid var(--rh-line); border-left:4px solid var(--rh-accent); border-radius:12px; background:#fff; margin-bottom:10px; }
.rh-notice.is-pinned { background:#f3f7ff; }
.rh-notice header { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:baseline; }
.rh-notice header span { font-size:12px; color:var(--rh-muted); }
.rh-notice-pin { color:#c27803; }
.rh-notice-body { margin-top:6px; font-size:15px; line-height:1.55; color:var(--rh-ink); }
.rh-notice-body p { margin:0 0 8px; }
.rh-fee-tiles { margin-top:6px; }
.rh-fee-tiles strong.rh-owing { color:#a32b1f; }
.rh-fee-tiles strong.rh-clear { color:#1e429f; }
.rh-fee-table { width:100%; border-collapse:collapse; font-size:14px; }
.rh-fee-table th { text-align:left; font-size:12px; color:var(--rh-muted); font-weight:600; padding:8px 10px; border-bottom:1px solid var(--rh-line); }
.rh-fee-table td { padding:10px; border-bottom:1px solid #eef0f3; vertical-align:middle; }
.rh-portal-status.is-part { background:#fff4d6; color:#8a5a00; }
.rh-fee-sub { margin:20px 0 6px; font-size:15px; }
.rh-fee-note { margin-top:12px; font-size:13px; }
.rh-fee-tiles strong { font-size:24px; }

/* Fee ledger: settled rows, overpayment notes */
.rh-fee-table tr.is-settled td { color: #5b6470; }
.rh-fee-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.rh-fee-notes li { background: #eef6ff; border-left: 4px solid #2f6fd0; border-radius: 8px; padding: 10px 14px; font-size: 14px; line-height: 1.5; }

/* Dashboard menu and pages */
.rh-dmenu { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-top:18px; }
.rh-menu-tile { position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:left; padding:20px; background:#fff; border:1px solid var(--rh-line); border-bottom:4px solid var(--rh-accent); border-radius:14px; cursor:pointer; font:inherit; color:var(--rh-ink); transition:transform .15s, box-shadow .15s; }
.rh-menu-tile:hover, .rh-menu-tile:focus-visible { transform:translateY(-2px); box-shadow:0 8px 20px rgba(29,36,51,.1); outline:none; }
.rh-menu-ico { display:inline-flex; align-items:center; justify-content:center; width:46px; height:46px; border-radius:12px; background:#eef2fb; color:var(--rh-accent); margin-bottom:8px; }
.rh-menu-tile strong { font-size:18px; }
.rh-menu-tile em { font-style:normal; font-size:14px; color:var(--rh-muted); }
.rh-menu-tile em.rh-owing { color:#a32b1f; font-weight:600; }
.rh-menu-badge { position:absolute; top:14px; right:14px; min-width:24px; height:24px; padding:0 7px; border-radius:999px; background:#d92d20; color:#fff; font-size:13px; line-height:24px; text-align:center; }
.rh-view { margin-top:18px; }
.rh-view-bar { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.rh-view-bar h3 { margin:0; font-size:20px; }
.rh-view > .rh-portal-panel:first-of-type { margin-top:14px; }
.rh-portal-grid.rh-grid-one { grid-template-columns:1fr; }
@media print { .rh-view-bar, .rh-dmenu { display:none; } }

/* ---------- Phone-first student dashboard (2.49) ---------- */
.rh-tabbar { display:none; }
.rh-tab { position:relative; }
.rh-tab-dot { position:absolute; top:6px; left:calc(50% + 7px); width:9px; height:9px; border-radius:50%; background:#d92d20; border:2px solid #fff; }
.rh-portal button, .rh-portal a { -webkit-tap-highlight-color:transparent; }
.rh-portal .rh-front-btn2, .rh-portal .rh-front-btn { min-height:44px; }

@media (max-width:760px) {
	.rh-portal { font-size:16px; }
	.rh-portal.rh-has-tabs { padding-bottom:92px; }

	/* header: one tidy line */
	.rh-portal-top { flex-wrap:nowrap; gap:12px; padding:14px 14px; border-radius:14px; }
	.rh-portal-avatar { width:52px; height:52px; font-size:19px; }
	.rh-portal-who p { font-size:12px; }
	.rh-portal-who h2 { font-size:19px; margin:0 0 2px; overflow-wrap:anywhere; }
	.rh-portal-who span { font-size:12.5px; display:block; line-height:1.35; }
	.rh-portal-top .rh-front-btn2 { min-height:38px; height:38px; padding:0 12px; font-size:13px; flex:none; }

	.rh-portal-panel { padding:16px; border-radius:14px; margin-top:12px; }
	.rh-view { margin-top:12px; }
	.rh-view .rh-portal-panel.rh-notices, .rh-view .rh-portal-panel.rh-fees { padding:0; border:0; background:transparent; margin-top:10px; }

	/* page title bar */
	.rh-view-bar { flex-wrap:nowrap; gap:10px; position:sticky; top:0; z-index:5; background:#fff; margin:0 -4px; padding:8px 4px; border-bottom:1px solid var(--rh-line); }
	.rh-view-bar .rh-front-btn2 { flex:none; padding:0 12px; }
	.rh-view-bar h3 { font-size:18px; }

	/* home menu: big, thumb-friendly rows */
	.rh-dmenu { grid-template-columns:1fr; gap:10px; margin-top:12px; }
	.rh-menu-tile { display:grid; grid-template-columns:52px 1fr; column-gap:14px; align-items:center; padding:14px 16px; border-bottom-width:1px; border-left:4px solid var(--rh-accent); }
	.rh-menu-ico { grid-row:1 / 3; width:52px; height:52px; margin:0; }
	.rh-menu-tile strong { font-size:17px; align-self:end; }
	.rh-menu-tile em { align-self:start; font-size:14px; }
	.rh-menu-badge { top:50%; right:14px; transform:translateY(-50%); }

	/* result tiles: two across */
	.rh-portal-tiles { grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
	.rh-portal-tiles > div { padding:12px 14px; }
	.rh-portal-tiles > div:first-child { grid-column:1 / -1; }
	.rh-portal-tiles strong { font-size:26px; }
	.rh-portal-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.rh-fee-tiles { grid-template-columns:minmax(0,1fr); gap:8px; }
	.rh-fee-tiles > div:first-child { grid-column:auto; }
	.rh-fee-tiles > div { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; align-items:center; }
	.rh-fee-tiles > div span { grid-column:1; grid-row:1; }
	.rh-fee-tiles > div em { grid-column:1; grid-row:2; }
	.rh-fee-tiles > div strong { grid-column:2; grid-row:1 / 3; font-size:22px; white-space:nowrap; }
	.rh-portal-item { gap:10px; padding:12px 0; }
	.rh-portal-item .rh-front-btn2 { width:100%; }
	.rh-portal-cardbar span { width:100%; }
	.rh-portal-cardbar span .rh-front-btn2 { flex:1; }

	/* fees: compact cards */
	.rh-fee-notes li { font-size:14px; padding:12px; }
	.rh-fee-sub { margin:18px 0 8px; }

	.rh-notice { padding:14px; }
	.rh-notice header { flex-direction:column; gap:2px; }

	/* sign in */
	.rh-portal-login input, .rh-portal-login select { height:50px; font-size:16px; border-radius:12px; }
	.rh-portal .rh-front-btn { height:50px; font-size:16px; border-radius:12px; width:100%; }
	.rh-portal-login-wrap h2 { font-size:22px; }
	.rh-linkbtn { font-size:15px; padding:8px 0; }

	/* bottom tab bar */
	.rh-tabbar { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); position:fixed; left:0; right:0; bottom:0; z-index:9999; background:#fff; border-top:1px solid var(--rh-line); box-shadow:0 -4px 16px rgba(29,36,51,.08); padding:6px 6px calc(6px + env(safe-area-inset-bottom)); }
	.rh-tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:52px; border:0; border-radius:12px; background:none; color:#667085; font:600 11.5px/1.1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; cursor:pointer; }
	.rh-tab.is-on { color:var(--rh-accent); background:#eef2fb; }
	.rh-tab:active { transform:scale(.96); }
}
@media (max-width:380px) {
	.rh-portal-who h2 { font-size:17px; }
	.rh-portal-tiles strong { font-size:23px; }
}
@media print { .rh-tabbar { display:none !important; } }

/* ---------- Report card: phone layout, one-sheet print, three signatures (2.50) ---------- */
.rr-table { table-layout:fixed; }
.rr-table th.rr-subj { width:32%; }
.rr-table th.rr-rem { width:27%; }
.rr-table td.rr-subj { overflow-wrap:anywhere; }
.rr-table td.rr-rem { overflow-wrap:anywhere; }

/* signatures: a fixed box for the picture, then the line, name and title */
.rr-signs span.rh-sb, .rs-sign span.rh-sb { display:flex; flex-direction:column; justify-content:flex-end; border-top:0; padding-top:0; text-align:center; }
.rh-sigarea { display:flex; align-items:flex-end; justify-content:center; height:50px; font-weight:400; }
.rh-sigarea .rh-sig { margin:0; max-height:48px; max-width:92%; object-fit:contain; }
.rh-sbl { display:block; font-style:normal; border-top:1px solid var(--rh-ink); padding-top:5px; margin-top:2px; }
.rr-signs .rh-sbl { font-size:9px; letter-spacing:.16em; text-transform:uppercase; color:var(--rh-muted); }
.rs-sign .rh-sbl { font-size:13px; color:var(--rh-muted); }
.rh-sbl .rh-signname { font-size:13px; letter-spacing:0; text-transform:none; color:var(--rh-ink); font-weight:700; margin-bottom:2px; }
.rr-signs { margin-top:26px; align-items:end; }
.rs-sign { margin-top:26px; gap:24px; }

@media (max-width:640px) {
	.rh-rr:not(.rh-sheet) { padding:5px; border-width:2px; }
	.rh-rr:not(.rh-sheet) .rr-frame { padding:14px 11px 16px; }
	.rh-rr:not(.rh-sheet) .rr-logo { width:52px; height:52px; margin-bottom:6px; }
	.rh-rr:not(.rh-sheet) .rr-head h3 { font-size:17px; letter-spacing:.07em; line-height:1.25; }
	.rh-rr:not(.rh-sheet) .rr-motto { font-size:11.5px; }
	.rh-rr:not(.rh-sheet) .rr-title { margin:12px 0 14px; gap:10px; }
	.rh-rr:not(.rh-sheet) .rr-title span { font-size:11px; letter-spacing:.16em; white-space:nowrap; }
	.rh-rr:not(.rh-sheet) .rr-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; margin-bottom:14px; }
	.rh-rr:not(.rh-sheet) .rr-field strong { font-size:13px; min-height:22px; overflow-wrap:anywhere; }
	.rh-rr:not(.rh-sheet) .rr-field span, .rh-rr:not(.rh-sheet) .rr-box span, .rh-rr:not(.rh-sheet) .rr-comments span { font-size:8.5px; letter-spacing:.12em; }
	.rh-rr:not(.rh-sheet) .rr-table { font-size:11.5px; }
	.rh-rr:not(.rh-sheet) .rr-table th { padding:6px 2px; font-size:8.5px; letter-spacing:.05em; }
	.rh-rr:not(.rh-sheet) .rr-table td { padding:5px 3px; }
	.rh-rr:not(.rh-sheet) .rr-table th.rr-subj { width:34%; }
	.rh-rr:not(.rh-sheet) .rr-table th.rr-rem { width:29%; }
	.rh-rr:not(.rh-sheet) .rr-table td.rr-rem { font-size:10.5px; line-height:1.3; }
	.rh-rr:not(.rh-sheet) .rr-key { font-size:9.5px; line-height:1.4; }
	.rh-rr:not(.rh-sheet) .rr-boxes { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
	.rh-rr:not(.rh-sheet) .rr-box { padding:6px 9px 7px; }
	.rh-rr:not(.rh-sheet) .rr-box strong { font-size:15px; min-height:20px; }
	.rh-rr:not(.rh-sheet) .rr-comments { min-height:0; padding:7px 10px 9px; }
	.rh-rr:not(.rh-sheet) .rr-comments p { font-size:13px; min-height:34px; }
	.rh-rr:not(.rh-sheet) .rr-note { font-size:10.5px; }
	.rh-rr:not(.rh-sheet) .rr-signs { gap:6px; margin-top:20px; }
	.rh-rr:not(.rh-sheet) .rh-sigarea { height:42px; }
	.rh-rr:not(.rh-sheet) .rh-sigarea .rh-sig { max-height:40px; }
	.rh-rr:not(.rh-sheet) .rr-signs .rh-sbl { font-size:7.5px; letter-spacing:.08em; }
	.rh-rr:not(.rh-sheet) .rh-sbl .rh-signname { font-size:10.5px; line-height:1.25; overflow-wrap:anywhere; }
	.rh-rr:not(.rh-sheet) .rs-sign { gap:8px; }
	.rh-rr:not(.rh-sheet) .rs-sign .rh-sbl { font-size:11px; }

}

/* one sheet when printed */
@page { size:A4 portrait; margin:8mm; }
@media print {
	.rh-card { break-inside:avoid; page-break-inside:avoid; }
	.rh-rr { padding:6px; max-width:none; }
	.rr-frame { padding:12px 16px 12px; }
	.rr-logo { width:44px; height:44px; margin-bottom:4px; }
	.rr-head h3 { font-size:20px; }
	.rr-motto { margin-top:3px !important; font-size:11px; }
	.rr-title { margin:8px 0 10px; }
	.rr-fields { gap:8px 22px; margin-bottom:10px; }
	.rr-field strong { min-height:20px; padding-top:2px; font-size:13px; }
	.rr-table { font-size:11.5px; }
	.rr-table th { padding:5px 6px; }
	.rr-table td { padding:3px 6px; }
	.rr-key { margin-top:6px !important; font-size:9.5px; }
	.rr-boxes { gap:8px; margin-top:8px; }
	.rr-box { padding:4px 8px 5px; }
	.rr-box strong { min-height:16px; margin-top:1px; font-size:13px; }
	.rr-comments { margin-top:8px; min-height:0; padding:5px 10px 6px; }
	.rr-comments p { margin-top:3px !important; font-size:12px; min-height:26px; }
	.rr-note { margin-top:6px !important; }
	.rr-signs { margin-top:10px; gap:24px; }
	.rh-sigarea { height:44px; }
	.rh-sigarea .rh-sig { max-height:42px; }
	.rs-sign { margin-top:14px; }
	.rc-frame .rs-sign { margin-top:14px; }
}
@media print {
	.rh-printing .rh-noprint { display:none !important; }
	.rh-printing .rh-card { position:static !important; width:auto !important; }
	.rh-printing, .rh-printing body { height:auto !important; background:#fff !important; }
}
.rr-signs { align-items:start; }
.rr-signs span.rh-sb, .rs-sign span.rh-sb { justify-content:flex-start; }
@media (max-width:640px) { .rh-rr:not(.rh-sheet) .rr-table th.rr-rem { font-size:8.5px; letter-spacing:.05em; } }
@media (max-width:760px) { .rh-portal-tiles:not(.rh-fee-tiles) > div:last-child:nth-child(even) { grid-column:1 / -1; } }

/* ---- Daily attendance (teacher register and student page) ---- */
.rh-att-today { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin:6px 0 10px; }
.rh-att-chip { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid var(--rh-line,#e3e8f0); border-radius:12px; background:#fff; text-decoration:none; color:inherit; }
.rh-att-chip strong { font-size:14px; }
.rh-att-chip span { font-size:12px; color:#667085; }
.rh-att-chip.is-done { border-color:#12b76a; background:#ecfdf3; }
.rh-att-chip.is-done span { color:#067647; }
.rh-att-chip.is-part { border-color:#f79009; background:#fffaeb; }
.rh-att-chip.is-part span { color:#b54708; }
.rh-att-link.is-done { border-color:#12b76a; color:#067647; }
.rh-att-bulk { margin:4px 0 10px; }
.rh-att-list { display:flex; flex-direction:column; border:1px solid var(--rh-line,#e3e8f0); border-radius:12px; overflow:hidden; background:#fff; }
.rh-att-row { display:grid; grid-template-columns:minmax(150px,1.2fr) auto minmax(120px,1fr); gap:10px; align-items:center; padding:10px 12px; border-bottom:1px solid var(--rh-line,#e3e8f0); }
.rh-att-row:last-child { border-bottom:0; }
.rh-att-name { display:flex; align-items:center; gap:8px; min-width:0; flex-wrap:wrap; }
.rh-att-name strong { font-size:14px; }
.rh-att-name small { color:#667085; }
.rh-att-no { width:24px; height:24px; border-radius:50%; background:#f2f4f7; color:#475467; font:700 11px/24px sans-serif; text-align:center; flex:none; }
.rh-att-opts { display:flex; gap:6px; flex-wrap:wrap; }
.rh-att-opt { position:relative; cursor:pointer; }
.rh-att-opt input { position:absolute; opacity:0; pointer-events:none; }
.rh-att-opt span { display:inline-block; min-width:64px; text-align:center; padding:8px 10px; border-radius:999px; border:1.5px solid #d0d5dd; background:#fff; font:600 12.5px/1 sans-serif; color:#475467; }
.rh-att-opt.s-P input:checked + span { background:#12b76a; border-color:#12b76a; color:#fff; }
.rh-att-opt.s-A input:checked + span { background:#f04438; border-color:#f04438; color:#fff; }
.rh-att-opt.s-L input:checked + span { background:#f79009; border-color:#f79009; color:#fff; }
.rh-att-opt.s-E input:checked + span { background:#6172f3; border-color:#6172f3; color:#fff; }
.rh-att-opt input:focus-visible + span { outline:2px solid #1a56db; outline-offset:2px; }
.rh-att-note { min-width:0; }
@media (max-width:760px) {
	.rh-att-row { grid-template-columns:1fr; gap:8px; }
	.rh-att-opts { display:grid; grid-template-columns:repeat(4,1fr); }
	.rh-att-opt span { display:block; min-width:0; padding:10px 4px; }
}
/* student page */
.rh-att-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:8px 0; }
.rh-att-stats > div { padding:12px 8px; border-radius:12px; background:#f7f9fc; text-align:center; }
.rh-att-stats strong { display:block; font-size:22px; line-height:1.1; }
.rh-att-stats span { font-size:12px; color:#667085; }
.rh-att-stats .s-P strong, .rh-att-notes b.s-P { color:#067647; }
.rh-att-stats .s-A strong, .rh-att-notes b.s-A { color:#d92d20; }
.rh-att-stats .s-L strong, .rh-att-notes b.s-L { color:#b54708; }
.rh-att-stats .s-E strong, .rh-att-notes b.s-E { color:#444ce7; }
.rh-att-legend { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; font-size:12px; color:#667085; margin:6px 0 0; }
.rh-att-legend i { display:inline-block; width:12px; height:12px; border-radius:4px; margin-right:4px; vertical-align:-1px; }
i.s-P { background:#12b76a; } i.s-A { background:#f04438; } i.s-L { background:#f79009; } i.s-E { background:#6172f3; }
.rh-att-cal { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; margin-top:8px; }
.rh-att-cal b { text-align:center; font-size:11px; color:#98a2b3; }
.rh-att-cal span { aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; border-radius:10px; font-size:13px; background:#f7f9fc; color:#98a2b3; }
.rh-att-cal span.is-blank { background:none; }
.rh-att-cal span.s-P { background:#12b76a; color:#fff; font-weight:700; }
.rh-att-cal span.s-A { background:#f04438; color:#fff; font-weight:700; }
.rh-att-cal span.s-L { background:#f79009; color:#fff; font-weight:700; }
.rh-att-cal span.s-E { background:#6172f3; color:#fff; font-weight:700; }
.rh-att-notes { list-style:none; margin:6px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; font-size:14px; }
@media print { .rh-att-panel { break-inside:avoid; } }

/* Student fees on phones: real tables (fees, and payment receipts) that scroll left and right. */
.rh-swipe { display:none; }
@media (max-width:760px) {
	.rh-swipe { display:flex; align-items:center; justify-content:flex-end; gap:4px; margin:6px 2px 4px; font-size:12px; color:#667085; }
	.rh-fees .rh-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--rh-line,#e3e8f0); border-radius:12px; background:#fff; overscroll-behavior-x:contain; scrollbar-width:thin; }
	.rh-fees .rh-table-wrap::-webkit-scrollbar { height:5px; }
	.rh-fees .rh-table-wrap::-webkit-scrollbar-thumb { background:#c7d0e0; border-radius:4px; }
	.rh-fees .rh-fee-table { min-width:620px; font-size:14px; }
	.rh-fees .rh-fee-table th { background:#eef3fd; color:#1e3a8a; white-space:nowrap; padding:11px 14px; }
	.rh-fees .rh-fee-table td { white-space:nowrap; padding:13px 14px; }
	.rh-fees .rh-fee-table th:first-child, .rh-fees .rh-fee-table td:first-child { position:sticky; left:0; z-index:1; background:#fff; box-shadow:2px 0 0 #eef0f3; }
	.rh-fees .rh-fee-table th:first-child { background:#eef3fd; }
	.rh-fees .rh-fee-table tbody tr:last-child td { border-bottom:0; }
	.rh-fees .rh-fee-table td:first-child { max-width:150px; overflow:hidden; text-overflow:ellipsis; }
}


/* ---------- Report card: one design language for every template (2.62) ---------- */
.rh-rr { position:relative; }
.rh-rr.rh-t-modern, .rh-rr.rh-t-dashboard, .rh-rr.rh-t-profile, .rh-rr.rh-t-certificate, .rh-rr.rh-t-transcript, .rh-rr.rh-t-classic { padding:10px; overflow:visible; text-align:left; max-width:820px; background:#fff; border:3px solid var(--rh-accent); border-radius:0; }
.rr-frame { position:relative; overflow:hidden; }
.rr-frame > *:not(.rr-wm) { position:relative; z-index:1; }
.rr-wm { position:absolute !important; z-index:0; top:50%; left:50%; width:62%; max-width:430px; max-height:62%; transform:translate(-50%,-50%); object-fit:contain; opacity:.08; pointer-events:none; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.rr-table td, .rr-box, .rr-comments { background:transparent; }
.rr-table td.rr-final { background:rgba(243,240,232,.75); }
.rr-who { display:flex; gap:20px; align-items:flex-start; margin-bottom:22px; }
.rr-who .rr-fields { flex:1; margin-bottom:0; }
.rr-photo { width:92px; height:112px; flex:none; object-fit:cover; border:1px solid var(--rh-ink); padding:2px; background:#fff; }
.rr-photo.rh-card-initials { display:flex; align-items:center; justify-content:center; font:700 28px Georgia,serif; color:#fff; }
.rr-lead { margin:0 auto 18px !important; max-width:560px; text-align:center; font-size:14px; line-height:1.6; font-style:italic; }
.rr-bar { display:block; height:5px; margin-top:4px; background:#e6e9ef; border-radius:3px; overflow:hidden; }
.rr-bar b { display:block; height:100%; background:var(--rh-accent); }

/* Modern: full colour band */
.rh-t-modern { padding:0 !important; border:0 !important; }
.rr-v-modern { border:0; }
.rr-v-modern .rr-head { margin:-28px -30px 20px; padding:22px 30px 18px; background:var(--rh-accent); color:#fff; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.rr-v-modern .rr-head h3, .rr-v-modern .rr-motto { color:#fff; }
.rr-v-modern .rr-logo { background:#fff; padding:3px; }
.rr-v-modern .rr-table th { background:#1f2937; }

/* Profile: left aligned heading */
.rr-v-profile .rr-head { display:flex; align-items:center; gap:16px; text-align:left; border-bottom:2px solid var(--rh-accent); padding-bottom:12px; }
.rr-v-profile .rr-logo { margin:0; }
.rr-v-profile .rr-head h3 { font-size:22px; }
.rr-v-profile .rr-title::before { display:none; }
.rr-v-profile .rr-title { justify-content:flex-start; }

/* Transcript: plain black rules */
.rh-t-transcript { border:1px solid #111 !important; }
.rr-v-transcript { border:1px solid #111; --rh-accent:#111; }
.rr-v-transcript .rr-table th { background:#111; }
.rr-v-transcript .rr-head h3 { color:#111; letter-spacing:.2em; }

/* Dashboard */
.rr-v-dashboard .rr-table td.rr-final { text-align:center; min-width:70px; }

/* Certificate: ornate double frame */
.rh-t-certificate { padding:14px !important; }
.rr-v-certificate { border:1px solid var(--rh-accent); outline:1px solid var(--rh-accent); outline-offset:-7px; padding:36px 38px 28px; }
.rr-v-certificate .rr-title span { font-size:18px; letter-spacing:.34em; color:var(--rh-accent); }
.rr-v-certificate .rr-fields { margin-bottom:14px; }

@media (max-width:640px) {
	.rr-who { flex-direction:column; align-items:center; gap:10px; }
	.rr-who .rr-fields { width:100%; }
	.rr-photo { width:72px; height:88px; }
	.rr-v-modern .rr-head { margin:-14px -11px 14px; padding:16px 11px 12px; }
	.rr-v-profile .rr-head h3 { font-size:16px; }
	.rr-v-certificate { padding:20px 14px; }
	.rr-v-certificate .rr-title span { font-size:12px; letter-spacing:.18em; }
	.rr-lead { font-size:12.5px; }
}
@media print {
	.rr-photo { width:70px; height:84px; }
	.rr-who { margin-bottom:8px; gap:14px; }
	.rr-v-modern .rr-head { margin:-12px -16px 10px; padding:10px 16px 8px; }
	.rr-v-certificate { padding:16px 22px 12px; }
	.rr-lead { margin-bottom:8px !important; font-size:12px; }
	.rh-rr.rh-t-modern, .rh-rr.rh-t-dashboard, .rh-rr.rh-t-profile, .rh-rr.rh-t-certificate, .rh-rr.rh-t-transcript, .rh-rr.rh-t-classic { padding:6px; max-width:none; }
}

/* Student dashboard: the report card keeps its full sheet look on a phone, scaled to fit the screen (2.65) */
.rh-sheetfit { width:100%; overflow:hidden; position:relative; }
.rh-card.rh-sheet { box-sizing:border-box; max-width:none; transform-origin:0 0; }
.rh-sheetfit.is-ready .rh-card.rh-sheet { position:absolute; left:0; top:0; }
.rh-sheet-hint { display:none; margin:6px 0 0; font-size:12px; color:var(--rh-muted); text-align:center; }
@media (max-width:680px) { .rh-sheet-hint { display:block; } }
@media print {
	.rh-sheet-hint { display:none !important; }
	.rh-sheetfit { height:auto !important; overflow:visible !important; }
	.rh-sheetfit.is-ready .rh-card.rh-sheet { position:static !important; transform:none !important; width:auto !important; }
}

/* Promotion line on the third-term report card (2.73) */
.rr-promo { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:12px; padding:9px 14px; border:2px solid var(--rh-line,#cbd5e1); }
.rr-promo span { margin:0; }
.rr-promo strong { font-size:15px; letter-spacing:.06em; }
.rr-promo.is-promoted, .rr-promo.is-completed { border-color:#1e7a46; color:#1e7a46; }
.rr-promo.is-repeated { border-color:#b42318; color:#b42318; }
@media print { .rr-promo { -webkit-print-color-adjust:exact; print-color-adjust:exact; } }
