:root { --navy:#1e3a8a; --blue:#2563eb; --light:#f1f5f9; --border:#dbe3ee; --danger:#b91c1c; --ok:#15803d; }
* { box-sizing:border-box; }
body { margin:0; font-family:Segoe UI,Arial,sans-serif; background:var(--light); color:#172033; }
header { background:var(--navy); color:#fff; padding:18px 28px; }
header h1 { margin:0 0 4px; font-size:20px; }
header p { margin:0; opacity:.8; font-size:13px; }
nav { margin-top:14px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
nav a { color:#fff; text-decoration:none; padding:7px 13px; border-radius:6px; background:rgba(255,255,255,.12); font-size:14px; }
nav a.active, nav a:hover { background:rgba(255,255,255,.28); }
nav .who { margin-left:8px; font-size:13px; opacity:.9; }
.notifications { position:relative; margin-left:auto; }
.notifications summary { list-style:none; cursor:pointer; padding:8px 11px; border-radius:8px; font-size:18px; line-height:1; background:linear-gradient(180deg,rgba(255,255,255,.24),rgba(255,255,255,.08)); border:1px solid rgba(255,255,255,.22); box-shadow:0 2px 0 rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.25); transition:transform .12s ease, box-shadow .12s ease; }
.notifications summary::-webkit-details-marker { display:none; }
.notifications summary:hover { transform:translateY(-1px); box-shadow:0 4px 10px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.3); }
.notifications[open] summary { background:rgba(255,255,255,.3); box-shadow:inset 0 2px 4px rgba(0,0,0,.2); transform:translateY(1px); }
.notification-count { display:inline-block; min-width:18px; margin-left:5px; padding:2px 5px; border-radius:999px; background:linear-gradient(180deg,#ef4444,#b91c1c); color:#fff; font-size:11px; font-weight:800; text-align:center; vertical-align:middle; box-shadow:0 1px 3px rgba(0,0,0,.3); }
.notification-menu { position:absolute; right:0; top:calc(100% + 10px); width:360px; max-width:calc(100vw - 32px); padding:0; background:#fff; color:#172033; border:1px solid var(--border); border-radius:12px; box-shadow:0 20px 45px rgba(15,23,42,.3), 0 2px 8px rgba(15,23,42,.12), inset 0 1px 0 #fff; z-index:30; overflow:hidden; transform-origin:top right; animation:notif-in .14s ease-out; }
@keyframes notif-in { from { opacity:0; transform:translateY(-6px) scale(.97); } to { opacity:1; transform:none; } }
.notification-heading { display:block; padding:11px 14px; font-size:13px; font-weight:800; letter-spacing:.03em; color:#fff; background:linear-gradient(180deg,#2550b5,var(--navy)); box-shadow:inset 0 -2px 4px rgba(0,0,0,.15); }
.notification-item { display:flex; gap:10px; margin:9px 10px; padding:10px; border:1px solid var(--border); border-left:4px solid var(--blue); border-radius:8px; background:linear-gradient(180deg,#f8fbff,#eff6ff); box-shadow:0 2px 5px rgba(15,23,42,.08); }
.notification-icon { flex:none; width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:#fff; border:1px solid var(--border); box-shadow:0 1px 3px rgba(15,23,42,.12); font-size:15px; }
.notification-content { display:block; min-width:0; }
.notification-content strong { display:block; font-size:13px; }
.notification-content span { display:block; margin-top:3px; font-size:12px; color:#475569; line-height:1.4; }
.notification-content time { display:block; margin-top:4px; font-size:11px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:.04em; }
.notification-item.tone-success { border-left-color:#15803d; background:linear-gradient(180deg,#f6fef9,#ecfdf5); }
.notification-item.tone-warn { border-left-color:#d97706; background:linear-gradient(180deg,#fffdf6,#fffbeb); }
.notification-item.tone-danger { border-left-color:#b91c1c; background:linear-gradient(180deg,#fff8f8,#fef2f2); }
.notification-empty { margin:12px 14px 16px; font-size:13px; color:#64748b; }
.notification-read { padding:2px 10px 12px; text-align:right; }
.notification-read .btn { font-size:12px; padding:6px 10px; }
.container { max-width:1180px; margin:24px auto; padding:0 20px 40px; }
h1 { font-size:24px; margin:0 0 18px; }
h2 { font-size:17px; margin:0 0 14px; }
.card { background:#fff; border:1px solid var(--border); border-radius:10px; padding:18px; box-shadow:0 1px 3px rgba(15,23,42,.05); }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:20px; }
.stat span { display:block; font-size:13px; color:#64748b; }
.stat strong { display:block; font-size:30px; margin-top:6px; color:var(--navy); }
.grid { display:grid; grid-template-columns:minmax(280px,1fr) minmax(420px,2fr); gap:18px; align-items:start; }
@media (max-width:860px) { .grid { grid-template-columns:1fr; } }
.card + .card { margin-top:18px; }
label { display:block; font-size:13px; font-weight:600; color:#334155; margin-bottom:12px; }
label input, label select { display:block; width:100%; margin-top:5px; padding:9px 10px; border:1px solid #cbd5e1; border-radius:6px; font:inherit; background:#fff; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field-row.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:760px) { .field-row.three { grid-template-columns:1fr; } }
button, .btn { font:inherit; }
.btn { display:inline-block; background:var(--blue); color:#fff; border:0; border-radius:6px; padding:9px 14px; cursor:pointer; text-decoration:none; }
.btn:hover { filter:brightness(.95); }
.btn.ghost { background:#e2e8f0; color:#1e293b; }
.btn.danger { background:var(--danger); }
.btn.small { padding:5px 9px; font-size:12px; }
.actions { display:flex; gap:8px; margin-top:6px; flex-wrap:wrap; }
.link { color:var(--blue); text-decoration:none; font-weight:600; font-size:13px; }
.link:hover { text-decoration:underline; }
.inline { display:inline; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { padding:9px 10px; border-bottom:1px solid var(--border); text-align:left; vertical-align:middle; }
th { background:#f8fafc; color:#475569; font-size:12px; text-transform:uppercase; letter-spacing:.03em; }
td.empty { color:#64748b; font-style:italic; }
.alert { padding:11px 14px; border-radius:7px; margin-bottom:16px; font-size:14px; }
.alert.success { background:#dcfce7; color:#166534; border:1px solid #86efac; }
.alert.info { background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; }
.alert.error { background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; }
.ok-text { color:var(--ok); }
.hint { color:#64748b; font-size:13px; }
.warning-list { margin:0; padding-left:20px; }
.warning-list li { margin-bottom:7px; }
.bad { color:var(--danger); font-weight:700; }
.good { color:var(--ok); font-weight:700; }
.status-badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; }
.status-present { background:#dcfce7; color:#166534; }
.status-late { background:#ffedd5; color:#c2410c; }
.status-absent { background:#fee2e2; color:#991b1b; }

/* Live lecture status — bold colours on both the badge and the whole row */
.lecture-status { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:999px; font-size:12px; font-weight:800; white-space:nowrap; }
.lecture-status.live { background:#16a34a; color:#fff; box-shadow:0 1px 4px rgba(22,163,74,.35); }
.lecture-status.ended { background:#dc2626; color:#fff; box-shadow:0 1px 4px rgba(220,38,38,.3); }
.lecture-status.upcoming { background:#e2e8f0; color:#334155; }
.pulse-dot { width:8px; height:8px; border-radius:50%; background:#fff; flex:0 0 auto; animation: lecture-pulse 1.4s infinite; }
@keyframes lecture-pulse {
    0% { box-shadow:0 0 0 0 rgba(255,255,255,.85); }
    70% { box-shadow:0 0 0 7px rgba(255,255,255,0); }
    100% { box-shadow:0 0 0 0 rgba(255,255,255,0); }
}
tr.lecture-row-live > td { background:#ecfdf5; }
tr.lecture-row-live > td:first-child { box-shadow:inset 3px 0 0 #16a34a; }
tr.lecture-row-ended > td { background:#fef2f2; }
tr.lecture-row-ended > td:first-child { box-shadow:inset 3px 0 0 #dc2626; }
.filter { margin-bottom:14px; }
.filter label { max-width:320px; }

/* BSE official timetable */
.tt-tabs { margin-bottom:18px; }
.tt-scope { margin-bottom:18px; }
.tt-tabs a { flex:0 1 auto; }
.tt-summary td, .tt-summary th { font-size:13px; }
.tt-grid { table-layout:fixed; min-width:1280px; font-size:12px; }
.tt-grid th, .tt-grid td { padding:8px 7px; border:1px solid var(--border); }
.tt-group-row th { text-align:center; font-size:12px; letter-spacing:.04em; }
.tt-time-row th { text-align:center; font-size:11px; text-transform:none; letter-spacing:0; background:#f1f5f9; }
.tt-grid .tt-day { min-width:78px; background:#f8fafc; font-weight:700; }
.tt-cell { background:#fff; vertical-align:top; }
.tt-block-1, .tt-b1 { background:#eff6ff; }
.tt-block-2, .tt-b2 { background:#ecfdf5; }
.tt-block-3, .tt-b3 { background:#fff1f2; }
.tt-group-row .tt-block-1 { color:#1d4ed8; }
.tt-group-row .tt-block-2 { color:#0f766e; }
.tt-group-row .tt-block-3 { color:#9f1239; }
.tt-class { margin-top:4px; line-height:1.35; }
.tt-practical { display:inline-block; padding:2px 6px; border-radius:4px; background:#1e293b; color:#fff; font-size:10px; font-weight:700; letter-spacing:.02em; }
.tt-now { display:inline-block; margin-left:6px; padding:2px 7px; border-radius:999px; background:#1e293b; color:#fff; font-size:10px; font-weight:700; }
.tt-current-row td { background:#fffbeb; }
.tt-current-head { box-shadow:inset 0 -3px 0 #1e293b; }
.tt-key { background:#f8fafc; border:1px solid var(--border); color:#334155; line-height:1.7; }
.tt-legend { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.tt-legend-1 { background:#dbeafe; color:#1d4ed8; }
.tt-legend-2 { background:#ccfbf1; color:#0f766e; }
.tt-legend-3 { background:#ffe4e6; color:#9f1239; }

/* Lecturer panel timetable */
.card.wide { grid-column:1 / -1; }
.tt-stats .card { margin:0; padding:12px 14px; }
.tt-stats .stat strong { font-size:24px; }
.tt-filter { display:flex; align-items:end; gap:10px; margin-bottom:14px; }
.tt-filter label { max-width:320px; margin:0; }
.tt-filter .btn { margin-bottom:1px; }
.tt-week { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); gap:10px; overflow-x:auto; padding-bottom:6px; }
@media (max-width:1200px) { .tt-week { grid-template-columns:repeat(4,minmax(150px,1fr)); } }
@media (max-width:760px) { .tt-week { grid-template-columns:repeat(2,minmax(150px,1fr)); } }
.tt-day { min-width:0; padding:10px; border:1px solid var(--border); border-radius:9px; background:#f8fafc; }
.tt-day.today { border-color:var(--blue); background:#eff6ff; box-shadow:0 0 0 2px rgba(37,99,235,.12); }
.tt-day h3 { display:flex; align-items:center; justify-content:space-between; gap:4px; margin:0 0 9px; font-size:13px; }
.tt-today { padding:2px 6px; border-radius:999px; background:var(--blue); color:#fff; font-size:10px; font-weight:800; letter-spacing:.03em; }
.tt-empty { margin:0; font-size:12px; color:#94a3b8; font-style:italic; }
.tt-slot { margin-bottom:8px; padding:9px 10px; border:1px solid var(--border); border-left:4px solid var(--slot-colour,#2563eb); border-radius:7px; background:#fff; box-shadow:0 2px 5px rgba(15,23,42,.07); }
.tt-slot .tt-time { display:block; font-size:11px; font-weight:800; color:var(--slot-colour,#2563eb); }
.tt-slot strong { display:block; margin:3px 0; font-size:13px; line-height:1.3; }
.tt-slot .tt-room { display:block; font-size:11px; color:#64748b; }
.tt-actions { display:flex; align-items:center; gap:8px; margin-top:7px; padding-top:6px; border-top:1px dashed var(--border); }
.tt-list { margin-top:16px; }
.tt-list > summary { cursor:pointer; padding:6px 0; font-size:13px; font-weight:700; color:#334155; }
.tt-docs h2 { margin-bottom:4px; }
.tt-upload { padding:14px; border:1px dashed #94a3b8; border-radius:9px; background:#f8fafc; margin-bottom:16px; }
.tt-upload label { margin-bottom:10px; }

/* Uploaded official timetable document */
.tt-doc-card { margin-bottom:18px; border:1px solid #bfdbfe; box-shadow:0 6px 18px rgba(30,64,175,.08); }
.tt-doc-head { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.tt-doc-head h2 { margin:2px 0 3px; }
.tt-doc-label { display:inline-block; padding:3px 9px; border-radius:999px; background:var(--blue); color:#fff; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.tt-doc-viewer { margin-top:14px; border:1px solid var(--border); border-radius:9px; overflow:hidden; background:#e2e8f0; }
.tt-doc-viewer iframe { display:block; width:100%; height:min(78vh,900px); min-height:420px; border:0; background:#fff; }
.tt-cohort-badge { display:inline-block; padding:3px 8px; border-radius:999px; background:#e0e7ff; color:#3730a3; font-size:11px; font-weight:800; letter-spacing:.03em; }
.tt-cohort-index th, .tt-cohort-index td { font-size:13px; }
.tt-cohort-index .tt-mine { background:#eff6ff; box-shadow:inset 3px 0 0 var(--blue); }

/* QR + accounts */
.auth-wrap { max-width:460px; margin:50px auto; }
.regno { display:flex; align-items:center; gap:4px; margin-top:5px; }
.regno input { display:block; width:auto; margin:0; padding:8px 5px; text-align:center; text-transform:uppercase; }
.regno input:nth-of-type(1), .regno input:nth-of-type(2) { width:40px; }
.regno input:nth-of-type(3) { width:80px; }
.regno input:nth-of-type(4) { width:44px; }
.regno input:nth-of-type(5) { width:64px; }
.regno > span { font-weight:700; color:#64748b; }
.auth-card { background:#fff; border:1px solid var(--border); border-radius:12px; padding:26px; box-shadow:0 4px 16px rgba(15,23,42,.08); }
.tabs { display:flex; gap:8px; margin-bottom:20px; }
.tabs a { flex:1; text-align:center; padding:9px; border-radius:6px; background:#e2e8f0; color:#334155; text-decoration:none; font-weight:600; font-size:14px; }
.tabs a.active { background:var(--navy); color:#fff; }
.qr-box { display:inline-block; background:#fff; padding:14px; border:1px solid var(--border); border-radius:10px; }
.qr-box svg { display:block; width:260px; height:260px; }
.big-code { font-size:30px; font-weight:800; letter-spacing:.18em; color:var(--navy); }
.pill { display:inline-block; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:700; background:#dcfce7; color:#166534; }
.pill.off { background:#fee2e2; color:#991b1b; }
.pill.warn { background:#fef9c3; color:#854d0e; }
.center { text-align:center; }
.stack { display:grid; gap:14px; }
.meta { color:#64748b; font-size:12px; }

/* Profile picture */
.avatar { border-radius:50%; object-fit:cover; display:inline-block; vertical-align:middle; background:#dbeafe; border:2px solid rgba(255,255,255,.6); }
.avatar-initials { display:inline-flex; align-items:center; justify-content:center; font-weight:800; color:var(--navy); background:#dbeafe; border-color:#fff; }
.profile-card { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.profile-card .profile-text { margin-right:auto; }
.profile-card .avatar-initials { font-size:22px; }
.avatar-row { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
label input[type=file] { padding:8px; }
