[hidden] { display:none !important; }
input[type=time] { padding:10px 12px; border:1px solid var(--border); border-radius:11px; background:#fff; font:inherit; color:var(--text); }
/* Nibras Campus — components on top of the Nibras light theme (uikit.css + nibras.css). Logical properties for RTL. */
:root { --campus-violet:#6842A6; --campus-violet-soft:#efe8fb; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: var(--mono); }
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; } .row.between { justify-content:space-between; } .grow { flex:1 1 auto; min-width:0; }
.stack > * + * { margin-top: 14px; } .mt-1 { margin-top:8px } .mt-2 { margin-top:16px } .mt-3 { margin-top:24px } .mb-1 { margin-bottom:8px } .mb-2 { margin-bottom:16px }
.impersonate-bar { background:#142a4b; color:#fff; text-align:center; padding:6px 12px; font-size:12px; position:sticky; top:0; z-index:300; }
.topbar-date { font-size:11px; color:var(--muted); white-space:nowrap; }
@media (max-width: 900px) { .topbar-date { display:none; } }
.role-switch { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:10px; color:var(--muted); padding:0 6px 10px; }
.role-switch .chip { font-size:10px; }
.signout-btn { width:30px; height:30px; background:transparent !important; border-color:transparent !important; color:#8DA0B8; }
.brand img { display:block; }
.brand span:last-child { display:flex; flex-direction:column; line-height:1; }

/* course header + tabs */
.course-hero { display:flex; gap:18px; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; margin-bottom:6px; }
.course-hero .code { font-family:var(--mono); font-size:12px; color:var(--accent); font-weight:600; letter-spacing:.02em; }
.course-hero h1 { margin:2px 0 4px; }
.course-hero .who { color:var(--muted); font-size:12.5px; }
.course-tabs { display:flex; gap:4px; overflow-x:auto; border-bottom:1px solid var(--border); margin:14px 0 22px; scrollbar-width:none; }
.course-tabs a { padding:10px 14px; font-size:13px; font-weight:500; color:var(--muted); border-bottom:2px solid transparent; white-space:nowrap; margin-bottom:-1px; }
.course-tabs a:hover { color:var(--text); text-decoration:none; }
.course-tabs a.on { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.crumbs { font-size:12px; color:var(--muted); display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-bottom:6px; }
.crumbs a { color:var(--muted); } .crumbs a:hover { color:var(--accent); }

/* course page sections & module rows */
.csection { margin-bottom:16px; }
.csection > .card { padding:0; overflow:hidden; }
.csection .sh { display:flex; align-items:center; gap:12px; padding:16px 22px; border-bottom:1px solid var(--line-2); }
.csection .sh h2 { margin:0; font-size:16px; }
.csection .sh .wk { font-size:11px; color:var(--muted); }
.csection.current > .card { box-shadow:0 0 0 2px var(--accent-soft), var(--shadow); }
.csection .ssum { padding:12px 22px 0; color:var(--text-2); font-size:13px; }
.csection.hidden-sec { opacity:.6; }
.mrows { list-style:none; margin:0; padding:6px 10px 10px; }
.mrow { display:flex; align-items:center; gap:12px; padding:9px 12px; border-radius:12px; }
.mrow:hover { background:#ffffff9c; }
.mrow .mic { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent); flex:0 0 auto; }
.mrow .mic .ic { width:18px; height:18px; }
.mrow.t-assign .mic, .mrow.t-quiz .mic, .mrow.t-workshop .mic, .mrow.t-lesson .mic { background:#fdf0e3; color:#b4651c; }
.mrow.t-forum .mic, .mrow.t-chat .mic, .mrow.t-live .mic { background:#e6f4ee; color:#287864; }
.mrow.t-lecture .mic, .mrow.t-video .mic, .mrow.t-lab3d .mic, .mrow.t-interactive .mic { background:var(--campus-violet-soft); color:var(--campus-violet); }
.mrow .mname { font-weight:600; color:var(--text); }
.mrow .mname:hover { color:var(--accent); text-decoration:none; }
.mrow .mmeta { font-size:11.5px; color:var(--muted); display:flex; gap:10px; flex-wrap:wrap; }
.mrow.dim { opacity:.55; }
.mrow .restrict { font-size:11.5px; color:#8A6414; background:var(--amber-100); border-radius:8px; padding:3px 8px; display:inline-flex; gap:6px; align-items:center; margin-top:3px; }
.mrow .restrict .ic { width:12px; height:12px; }
.mrow .label-content { padding:6px 0; color:var(--text-2); }
.compl { width:26px; height:26px; border-radius:8px; border:1.5px solid var(--border); background:#fff; display:grid; place-items:center; cursor:pointer; color:transparent; flex:0 0 auto; padding:0; }
.compl.done { background:var(--green); border-color:var(--green); color:#fff; }
.compl.auto { cursor:default; border-style:dashed; }
.compl.auto.done { border-style:solid; }
.compl .ic { width:14px; height:14px; }
.edit-tools { display:flex; gap:2px; }
.edit-tools button, .edit-tools a { width:28px; height:28px; border-radius:8px; border:0; background:transparent; color:var(--muted); display:grid; place-items:center; cursor:pointer; }
.edit-tools button:hover, .edit-tools a:hover { background:var(--surface-2); color:var(--accent); }
.edit-tools .ic { width:15px; height:15px; }
.edit-tools form { display:contents; }
.add-activity { margin:4px 22px 16px; }
.progress-strip { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); }
.progress-strip .bar { width:160px; }

/* activity chooser */
.chooser { position:fixed; inset:0; background:#0b162680; z-index:250; display:grid; place-items:center; padding:20px; }
.chooser[hidden] { display:none; }
.chooser .panel { background:#fff; border-radius:22px; max-width:920px; width:100%; max-height:86vh; overflow:auto; padding:24px; box-shadow:var(--shadow-lg); }
.chooser .types { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:10px; }
.chooser .types a { display:flex; gap:10px; align-items:flex-start; padding:12px; border-radius:14px; border:1px solid var(--line-2); color:var(--text); }
.chooser .types a:hover { border-color:var(--accent); background:var(--accent-soft); text-decoration:none; }
.chooser .types b { display:block; font-size:13px; } .chooser .types small { color:var(--muted); font-size:11px; line-height:1.4; display:block; }
.chooser .types .ic { width:20px; height:20px; color:var(--accent); flex:0 0 auto; margin-top:2px; }

/* module page header */
.mod-head { display:flex; gap:16px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; margin-bottom:18px; }
.mod-head .mic { width:48px; height:48px; border-radius:14px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent); }
.mod-head .mic .ic { width:24px; height:24px; }
.mod-head h1 { margin:0 0 4px; }
.mod-dates { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:var(--muted); }
.mod-dates b { color:var(--text-2); font-weight:600; }
.mod-nav { display:flex; justify-content:space-between; gap:12px; margin-top:26px; }
.mod-nav a { max-width:45%; }
.prose { line-height:1.75; font-size:14.5px; color:var(--text); }
.prose h1, .prose h2, .prose h3 { margin-top:1.2em; }
.prose img { max-width:100%; border-radius:12px; }
.prose table { border-collapse:collapse; width:100%; margin:12px 0; } .prose td, .prose th { border:1px solid var(--line-2); padding:6px 10px; }
.prose code { background:var(--surface-2); padding:1px 5px; border-radius:5px; font-family:var(--mono); font-size:.9em; }
.prose pre { background:#0f1b2b; color:#e8eef6; padding:14px; border-radius:12px; overflow:auto; } .prose pre code { background:none; color:inherit; }
.prose blockquote { border-inline-start:3px solid var(--accent); margin:0; padding:4px 14px; color:var(--text-2); background:var(--accent-soft); border-radius:0 10px 10px 0; }

/* forms */
.form-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:4px 18px; }
.form-grid .full { grid-column:1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns:1fr; } }
.field input[type=text], .field input[type=email], .field input[type=number], .field input[type=password], .field input[type=datetime-local], .field input[type=date], .field input[type=search], .field input[type=url], .field select, .field textarea,
.input { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:11px; background:#fff; font:inherit; color:var(--text); }
.field textarea { min-height:90px; resize:vertical; }
.field .help { font-size:11.5px; color:var(--muted); }
.field.check { flex-direction:row; align-items:center; gap:8px; }
.field.check label { font-weight:500; }
fieldset.fs { border:1px solid var(--line-2); border-radius:16px; padding:14px 18px 6px; margin:0 0 16px; }
fieldset.fs legend { font-weight:600; font-size:13px; padding:0 6px; }
.form-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:10px; flex-wrap:wrap; }
.note { padding:10px 14px; border-radius:12px; background:var(--accent-soft); color:var(--text-2); font-size:13px; }
.note-error { background:var(--red-100); color:#8b2a33; } .note-ok { background:var(--green-100); color:#1F7A4D; } .note-warn { background:var(--amber-100); color:#7a5512; }

/* generic UI bits */
.stat-row { display:flex; gap:18px; flex-wrap:wrap; }
.stat-row .s b { display:block; font-size:22px; font-weight:700; letter-spacing:-.02em; } .stat-row .s span { font-size:11.5px; color:var(--muted); }
.pill { display:inline-block; padding:2px 9px; border-radius:99px; font-size:11px; background:var(--surface-2); color:var(--text-2); font-weight:600; }
.tag-ai { background:var(--campus-violet-soft); color:var(--campus-violet); }
.avatar.sm { width:26px; height:26px; font-size:9px; }
.people-list li { gap:10px; }
.course-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:16px; }
.course-card { display:flex; flex-direction:column; gap:10px; padding:0 !important; overflow:hidden; color:var(--text); }
.course-card:hover { text-decoration:none; box-shadow:var(--shadow-md); }
.course-card .band { height:74px; background:linear-gradient(120deg, var(--cc, #285ed6), color-mix(in srgb, var(--cc, #285ed6) 40%, #fff)); position:relative; }
.course-card .band span { position:absolute; inset-inline-start:18px; bottom:10px; color:#fff; font-family:var(--mono); font-size:12px; font-weight:600; background:#0003; padding:2px 8px; border-radius:7px; }
.course-card .body { padding:4px 18px 18px; display:flex; flex-direction:column; gap:8px; }
.course-card h3 { margin:0; font-size:15px; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
table.table td .actions { display:flex; gap:6px; justify-content:flex-end; }
.kv { display:grid; grid-template-columns:max-content 1fr; gap:6px 16px; font-size:13px; } .kv dt { color:var(--muted); } .kv dd { margin:0; }
.ai-badge { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; color:var(--campus-violet); background:var(--campus-violet-soft); padding:2px 8px; border-radius:99px; }
.ai-badge .ic { width:12px; height:12px; }
.skeleton-line { height:12px; border-radius:6px; background:linear-gradient(90deg, var(--surface-2), #fff, var(--surface-2)); background-size:200% 100%; animation:sk 1.2s infinite; margin:8px 0; }
@keyframes sk { to { background-position:-200% 0; } }
.spinner { width:18px; height:18px; border:2px solid var(--accent-soft); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; display:inline-block; vertical-align:middle; }
@keyframes spin { to { transform:rotate(360deg); } }
.campus-login .nibras-login-story { background:radial-gradient(ellipse at 80% 10%, #d9e6ff 0, transparent 50%), radial-gradient(ellipse at 10% 90%, #efe8fb 0, transparent 55%), #f6f8fc; }
@media print { .side, .topbar, .course-tabs, .no-print, #companion { display:none !important; } main.content { padding:0 !important; } }

/* phone-width safety net: grid tracks never grow past the viewport because of a wide child; wide tables scroll inside themselves */
.grid > *, .stack > *, .row > .grow { min-width: 0; }
select, .input, textarea { max-width: 100%; }
@media (max-width: 760px) {
  main table.table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  main pre { max-width: 100%; overflow-x: auto; }
}

/* languages */
.lang-toggle .lang-more { display:inline-flex; align-items:center; gap:5px; }
.lang-toggle .lang-more .ic { width:14px; height:14px; }
.lang-toggle .lang-more span { font-size:11px; max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.i18n-bar { position:fixed; inset-inline-start:50%; bottom:22px; transform:translateX(-50%); z-index:400; display:flex; gap:10px; align-items:center;
  background:#142a4b; color:#fff; padding:9px 16px; border-radius:99px; font-size:12px; box-shadow:var(--shadow-lg); }
[dir="rtl"] .i18n-bar { transform:translateX(50%); }
:root:lang(zh-Hans), :root:lang(zh-Hant), :root:lang(yue) { --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif; }
:root:lang(ja) { --font: "Inter", "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", system-ui, sans-serif; }
:root:lang(ko) { --font: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", system-ui, sans-serif; }
:root:lang(hi), :root:lang(mr), :root:lang(ne) { --font: "Inter", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari", system-ui, sans-serif; }
:root:lang(ur) { --font: "Noto Nastaliq Urdu", "Plex Arabic", "Geeza Pro", system-ui, sans-serif; }
:root:lang(ckb), :root:lang(sdh), :root:lang(hac), :root:lang(lki), :root:lang(fa), :root:lang(prs), :root:lang(ps), :root:lang(ug), :root:lang(sd) { --font: "Plex Arabic", "Geeza Pro", "Noto Naskh Arabic", system-ui, sans-serif; }
.dt-trbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line-2)}
.dt-tabs button .ic{width:12px;height:12px}
