/* ============================================================
   SafeExam — application stylesheet (light theme)
   ============================================================ */
:root {
    --bg: #eef2f9;
    --bg-2: #f7f9fd;
    --surface: #ffffff;
    --panel: #ffffff;
    --panel-2: #f6f8fc;
    --border: #e4e9f2;
    --border-soft: #eef1f7;
    --primary: #3b6ef5;
    --primary-d: #2f5ad6;
    --primary-soft: #eef3ff;
    --accent: #6366f1;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #16a34a;
    --info: #0ea5e9;
    --text: #1f2a44;
    --text-2: #36425e;
    --muted: #6b7a90;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 10px 26px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--text); }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { opacity: 0; transform: translateY(14px) scale(.97); } 100% { opacity: 1; transform: none; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes floatY { 50% { transform: translateY(-16px); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* Icons */
.ic { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }
.ic-xl { width: 30px; height: 30px; }

/* ---------- App layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px; flex-shrink: 0; background: var(--surface);
    border-right: 1px solid var(--border); padding: 20px 16px;
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 18px;
    border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; }
.brand:hover { color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: none; }
.brand-mark .logo-mark { width: 100%; height: 100%; }
.logo-mark { display: block; }
.wm { font-weight: 800; color: var(--text); }
.wm-accent { color: var(--primary); }
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: 17px; color: var(--text); }
.brand-text small { font-weight: 500; font-size: 11px; color: var(--muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; color: var(--muted);
    padding: 10px 12px; border-radius: 9px; font-weight: 500; font-size: 14.5px; transition: .15s; }
.sidebar nav a:hover { background: var(--bg-2); color: var(--text); }
.sidebar nav a.active { background: var(--primary-soft); color: var(--primary-d); font-weight: 600; }
.sidebar nav a.active .ic { color: var(--primary); }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.logout-link { display: flex; align-items: center; gap: 11px; color: var(--muted); padding: 10px 12px; border-radius: 9px; font-weight: 500; }
.logout-link:hover { background: #fff1f1; color: var(--danger); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 15px 30px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.85);
    backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.topbar-title { font-size: 19px; font-weight: 700; }
.topbar-left .sub { color: var(--muted); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--border); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(150deg, var(--primary), var(--accent)); color: #fff; font-weight: 700; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip .name { font-weight: 600; font-size: 14px; }
.user-chip .role { font-size: 12px; color: var(--muted); }
.content { padding: 26px 30px 50px; max-width: 1240px; width: 100%; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--border); padding: 22px; border-radius: var(--radius);
    margin-bottom: 20px; box-shadow: var(--shadow-sm); animation: fadeUp .45s ease both; }
.card:hover { box-shadow: var(--shadow); }
.card h3 { font-size: 16px; margin-bottom: 4px; }
.card .card-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.section-title .ic { color: var(--primary); }
.grid { display: grid; gap: 18px; }
.grid > * { animation: fadeUp .45s ease both; }
.grid > *:nth-child(2) { animation-delay: .05s; }
.grid > *:nth-child(3) { animation-delay: .1s; }
.grid > *:nth-child(4) { animation-delay: .15s; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm); transition: .18s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kpi .kpi-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    flex: none; background: var(--primary-soft); color: var(--primary); }
.kpi .kpi-ic .ic { width: 22px; height: 22px; }
.kpi .kpi-num { font-size: 26px; font-weight: 800; line-height: 1; }
.kpi .kpi-label { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kpi.danger .kpi-ic { background: #fdecec; color: var(--danger); }
.kpi.success .kpi-ic { background: #e7f7ed; color: var(--success); }
.kpi.warning .kpi-ic { background: #fdf3e1; color: var(--warning); }

/* Coloured icon chip (result / locked / errors) */
.icon-badge, .big-ic { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 16px;
    background: var(--primary-soft); color: var(--primary); margin: 0 auto 8px; }
.icon-badge.danger, .big-ic.danger { background: #fdecec; color: var(--danger); }
.icon-badge.warning, .big-ic.warning { background: #fdf3e1; color: var(--warning); }
.icon-badge.success, .big-ic.success { background: #e7f7ed; color: var(--success); }
.icon-badge .ic, .big-ic .ic { width: 30px; height: 30px; }

/* ---------- Buttons ---------- */
button, .btn { background: var(--primary); border: 1px solid transparent; padding: 9px 15px; border-radius: 9px;
    color: #fff; cursor: pointer; font-weight: 600; font-size: 14px; transition: .15s;
    display: inline-flex; align-items: center; gap: 8px; font-family: inherit; box-shadow: 0 1px 2px rgba(16,24,40,.06); }
button:hover, .btn:hover { background: var(--primary-d); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,110,245,.28); }
button:active, .btn:active { transform: translateY(0); }
.btn .ic, button .ic { width: 16px; height: 16px; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-danger { background: var(--danger); } .btn-danger:hover { background: #d63a3a; box-shadow: 0 6px 16px rgba(239,68,68,.28); }
.btn-success { background: var(--success); } .btn-success:hover { background: #138a3e; box-shadow: 0 6px 16px rgba(22,163,74,.28); }
.btn-warning { background: var(--warning); color: #43320a; } .btn-warning:hover { background: #e7900b; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: inline-flex; gap: 7px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--text-2); font-size: 13.5px; }
input, textarea, select { width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--border);
    background: #fff; color: var(--text); font-size: 14px; font-family: inherit; transition: .15s; }
input::placeholder, textarea::placeholder { color: #aab4c4; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(59,110,245,.14); }
.helper-text { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field-error { color: var(--danger); font-size: 13px; margin-top: 5px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; }
.checkbox-row input { width: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; min-width: 240px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 11px 12px; color: var(--muted); font-size: 12px; text-transform: uppercase;
    letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg-2); }
td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr { animation: fadeIn .4s ease both; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-2); }

/* ---------- Badges / status ---------- */
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.badge-success { background: #e7f7ed; color: #15803d; }
.badge-danger  { background: #fdecec; color: #c63434; }
.badge-warning { background: #fdf3e1; color: #b9770b; }
.badge-info    { background: #e6f5fd; color: #0b7fb8; }
.badge-muted   { background: #eef1f7; color: var(--muted); }
.status-Active, .status-Completed { color: #15803d; font-weight: 700; }
.status-High { color: #b9770b; font-weight: 700; }
.status-Disqualified, .status-Locked, .status-Disconnected, .status-Expired { color: #c63434; font-weight: 700; }

/* ---------- Toast popups (flash messages) ---------- */
.toast-stack { position: fixed; top: 18px; right: 18px; z-index: 10000; display: flex; flex-direction: column; gap: 12px; max-width: 360px; }
.toast { display: flex; align-items: flex-start; gap: 11px; background: #fff; border: 1px solid var(--border);
    border-left: 4px solid var(--primary); border-radius: 11px; padding: 13px 14px; box-shadow: var(--shadow-lg);
    animation: slideInRight .35s cubic-bezier(.2,.9,.3,1.2) both, toastOut .4s ease forwards 5s; }
.toast .t-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; flex: none; }
.toast .t-msg { font-size: 14px; color: var(--text-2); padding-top: 2px; }
.toast .t-close { margin-left: auto; background: transparent; border: none; color: var(--muted); padding: 0 2px; box-shadow: none; cursor: pointer; }
.toast .t-close:hover { background: transparent; color: var(--text); transform: none; }
.toast.success { border-left-color: var(--success); } .toast.success .t-ic { background: #e7f7ed; color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }  .toast.danger .t-ic  { background: #fdecec; color: var(--danger); }
.toast.warning { border-left-color: var(--warning); } .toast.warning .t-ic { background: #fdf3e1; color: var(--warning); }
.toast.info    { border-left-color: var(--info); }    .toast.info .t-ic    { background: #e6f5fd; color: var(--info); }

/* ---------- Auth (redesigned) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-hero { position: relative; overflow: hidden; padding: 56px 52px; color: #fff;
    background: linear-gradient(140deg, #3b6ef5 0%, #6366f1 55%, #8b5cf6 100%); display: flex; flex-direction: column; }
.auth-hero .blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .35; animation: floatY 9s ease-in-out infinite; }
.auth-hero .blob.b1 { width: 280px; height: 280px; background: #93b4ff; top: -60px; right: -40px; }
.auth-hero .blob.b2 { width: 200px; height: 200px; background: #c4b5fd; bottom: 40px; left: -50px; animation-delay: 1.5s; }
.auth-hero .blob.b3 { width: 120px; height: 120px; background: #a78bfa; bottom: 140px; right: 90px; animation-delay: .8s; }
.auth-hero .hero-inner { position: relative; z-index: 2; margin: auto 0; animation: fadeUp .6s ease both; }
.auth-brand { display: flex; align-items: center; gap: 13px; font-size: 26px; font-weight: 800; }
.auth-brand .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
.auth-hero h1 { color: #fff; font-size: 34px; line-height: 1.18; margin: 26px 0 14px; max-width: 460px; }
.auth-hero p.lead { color: rgba(255,255,255,.86); max-width: 430px; font-size: 15.5px; }
.hero-features { margin-top: 30px; display: flex; flex-direction: column; gap: 15px; }
.hero-features div { display: flex; align-items: center; gap: 13px; font-size: 15px; }
.hero-features .fchip { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: rgba(255,255,255,.16); }
.auth-hero .hero-foot { position: relative; z-index: 2; margin-top: auto; color: rgba(255,255,255,.7); font-size: 13px; }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--bg); }
.auth-card { width: 410px; max-width: 100%; background: #fff; border: 1px solid var(--border);
    border-radius: 18px; padding: 38px; box-shadow: var(--shadow-lg); animation: popIn .5s ease both; }
.auth-card h2 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; font-size: 14.5px; }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 13px; top: 38px; color: var(--muted); pointer-events: none; }
.input-icon input, .input-icon select { padding-left: 40px; }
.auth-footer { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-card .form-group { animation: fadeUp .5s ease both; }
.auth-card .form-group:nth-child(2) { animation-delay: .04s; }
.auth-card .form-group:nth-child(3) { animation-delay: .08s; }
.auth-card .form-group:nth-child(4) { animation-delay: .12s; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-hero { display: none; } }

/* ---------- Auth (centered card) ---------- */
.auth-center { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px;
    background: radial-gradient(760px 420px at 50% -12%, #e6eefe 0%, transparent 72%), var(--bg); }
.auth-center .auth-card { width: 440px; max-width: 100%; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-logo .brand-mark { width: 54px; height: 54px; border-radius: 15px; }
.auth-logo .brand-mark .ic { width: 30px; height: 30px; }
.auth-logo .name { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.auth-logo .tagline { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.auth-center .auth-card h2 { text-align: center; }
.auth-center .auth-card .sub { text-align: center; }
.auth-center .role-tabs { display: flex; gap: 8px; margin-bottom: 6px; }

/* ---------- Exam runtime ---------- */
.exam-shell { max-width: 880px; margin: 0 auto; padding: 22px 18px 90px; }
.exam-topbar { position: sticky; top: 14px; z-index: 50; background: #fff; border: 1px solid var(--border);
    border-radius: 12px; padding: 13px 18px; margin-bottom: 20px; display: flex; justify-content: space-between;
    align-items: center; gap: 14px; flex-wrap: wrap; box-shadow: var(--shadow); }
.exam-topbar .exam-name { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.exam-name .ic { color: var(--primary); }
.exam-meta { display: flex; gap: 10px; align-items: center; }
.pill { background: var(--bg-2); border: 1px solid var(--border); padding: 7px 13px; border-radius: 999px;
    font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.pill .ic { width: 15px; height: 15px; }
.pill.timer.warn { border-color: var(--warning); color: var(--warning); background: #fdf6e9; }
.pill.timer.danger { border-color: var(--danger); color: var(--danger); background: #fdeeee; animation: pulse 1s infinite; }
.pill.viol { border-color: #f3c6c6; color: #c63434; background: #fdeeee; }

.question-card { background: #fff; border: 1px solid var(--border); padding: 20px; border-radius: 12px;
    margin-bottom: 16px; box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(10px); animation: fadeUp .45s ease forwards; }
.question-card:nth-child(2) { animation-delay: .05s; } .question-card:nth-child(3) { animation-delay: .1s; }
.question-card:nth-child(4) { animation-delay: .15s; } .question-card:nth-child(5) { animation-delay: .2s; }
.q-text { font-weight: 600; margin-bottom: 14px; }
.q-index { color: var(--primary); font-weight: 800; margin-right: 6px; }
.option-label { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 9px; margin-bottom: 8px;
    cursor: pointer; background: var(--bg-2); border: 1px solid var(--border); transition: .15s; }
.option-label:hover { border-color: var(--primary); background: var(--primary-soft); }
.option-label.selected { border-color: var(--primary); background: var(--primary-soft); }
.option-label input { width: auto; }

.proctor-pip { position: fixed; bottom: 16px; right: 16px; width: 150px; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 60; background: #000; }
.proctor-pip video { width: 100%; display: block; }
.proctor-pip .pip-label { position: absolute; top: 6px; left: 8px; font-size: 11px; color: #fff;
    background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 6px; display: flex; align-items: center; gap: 5px; }
.proctor-pip .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s infinite; }

#warningBox { position: fixed; top: 22px; left: 50%; transform: translateX(-50%) translateY(-140%);
    background: var(--danger); color: #fff; padding: 13px 22px; border-radius: 11px; font-weight: 700; z-index: 9999;
    box-shadow: var(--shadow-lg); transition: transform .3s cubic-bezier(.2,.9,.3,1.2); max-width: 90vw; text-align: center; }
#warningBox.show { transform: translateX(-50%) translateY(0); }

.overlay { position: fixed; inset: 0; background: rgba(20, 30, 55, .55); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; z-index: 9998; padding: 24px; animation: fadeIn .25s ease; }
.overlay .panel { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 38px;
    max-width: 540px; text-align: center; box-shadow: var(--shadow-lg); animation: popIn .4s ease both; }
.overlay .panel h2 { margin: 10px 0 8px; }
.overlay .panel p { color: var(--muted); margin-bottom: 18px; }
.overlay .checklist { text-align: left; color: var(--text-2); margin: 0 auto 22px; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
.overlay .checklist div { display: flex; gap: 10px; align-items: flex-start; }
.overlay .checklist .ic { color: var(--primary); margin-top: 2px; flex: none; }

/* ---------- Result ---------- */
.result-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.result-card { background: #fff; border: 1px solid var(--border); padding: 40px; border-radius: 18px; text-align: center;
    width: 440px; max-width: 100%; box-shadow: var(--shadow-lg); animation: popIn .5s ease both; }
.result-card .score-number { font-size: 50px; font-weight: 800; margin: 10px 0 2px; }
.ring { --p: 0; width: 128px; height: 128px; border-radius: 50%; margin: 6px auto 14px;
    background: conic-gradient(var(--primary) calc(var(--p)*1%), var(--border) 0); display: grid; place-items: center; }
.ring .inner { width: 100px; height: 100px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 23px; font-weight: 800; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.right { text-align: right; } .center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline-form { display: inline; }
.divider { height: 1px; background: var(--border-soft); margin: 16px 0; }
.tag { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); padding: 22px; text-align: center; }
.meta-row { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.bar { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--border-soft); }
.bar > i { display: block; height: 100%; background: var(--primary); }
canvas { max-width: 100%; }
/* ---------- Live screen monitoring ---------- */
.live-grid { grid-template-columns: 2.3fr 1fr; align-items: start; }
@media (max-width: 900px) { .live-grid { grid-template-columns: 1fr; } }
.live-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: pulse 1.1s infinite; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; }
.live-screen-wrap { position: relative; background: #0b1220; border-radius: 10px; overflow: hidden;
    aspect-ratio: 16 / 9; display: grid; place-items: center; border: 1px solid var(--border); }
.live-screen-wrap img { width: 100%; height: 100%; object-fit: contain; display: none; }
.live-cam-wrap { position: relative; background: #0b1220; border-radius: 10px; overflow: hidden;
    aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1px solid var(--border); }
.live-cam-wrap img { width: 100%; height: 100%; object-fit: cover; display: none; }
.live-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; color: #9fb0c9; text-align: center; padding: 16px; }
.live-wait p { font-weight: 600; color: #c7d2e3; }
.live-wait .ic { color: #5b6b86; }

/* ===================== Live wall (admin multi-student view) ===================== */
.wall-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.wall-tile { padding: 0; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.wall-tile.risk { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(239, 68, 68, .18); }

.wall-shot { position: relative; display: block; background: #0d1526; aspect-ratio: 16 / 10; overflow: hidden; }
.wall-screen { width: 100%; height: 100%; object-fit: contain; display: none; background: #0d1526; }
.wall-cam { position: absolute; right: 8px; bottom: 8px; width: 27%; max-width: 110px;
    border-radius: 7px; border: 2px solid rgba(255, 255, 255, .5); display: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.wall-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #7d8ea8; font-size: 13px; font-weight: 600; text-align: center; padding: 12px; }
.wall-live { position: absolute; left: 8px; top: 8px; display: none; align-items: center; gap: 5px;
    background: rgba(15, 23, 42, .78); color: #fff; font-size: 10px; font-weight: 700;
    letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; }

.wall-meta { padding: 10px 12px 12px; }
.wall-name { font-weight: 700; font-size: 14px; }
.wall-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.wall-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
