:root {
  --primary: #6c63ff;
  --primary-dark: #5750d9;
  --green: #10b981;
  --blue: #1e3a5f;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --danger: #dc2626;
  --warn: #f59e0b;
  --bg: #f8fafc;
  --radius: 14px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.theme-dark { background: linear-gradient(135deg, #1e3a5f, #2d1b69 52%, #6c63ff); min-height: 100vh; }
.theme-student { background: linear-gradient(135deg, #0f766e, #1e3a5f 52%, #3b82f6); min-height: 100vh; }
.theme-muted, .theme-app { background: #f8fafc; min-height: 100vh; }

.home { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.hero { width: min(880px, 100%); text-align: center; color: white; }
.brandmark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; margin: 0 auto 16px; background: rgba(255,255,255,.18); font-size: 30px; }
.hero h1 { margin: 0; font-size: clamp(44px, 8vw, 70px); letter-spacing: 0; }
.hero h1 span { color: var(--green); }
.hero p { color: rgba(255,255,255,.78); font-size: 20px; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 42px auto 0; max-width: 720px; }
.glass-card { text-align: left; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.11); border-radius: 18px; padding: 28px; color: white; min-height: 170px; display: grid; align-content: center; transition: .2s; }
.glass-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.18); }
.glass-card strong { font-size: 26px; margin-bottom: 10px; }
.glass-card small { color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.5; }
.hero footer { margin-top: 38px; color: rgba(255,255,255,.45); font-size: 13px; }

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth { display: grid; place-items: center; }
.panel, .white-card { background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px rgba(17,24,39,.12); }
.login-panel { width: min(430px, 100%); padding: 28px; }
.mini-brand { color: var(--primary); font-weight: 800; margin-bottom: 12px; }
.panel h1, .white-card h1 { margin: 0 0 8px; }
.panel p, .white-card p { color: var(--muted); line-height: 1.45; }
label { display: grid; gap: 7px; margin: 14px 0; color: #374151; font-weight: 700; font-size: 14px; }
input, textarea, select { width: 100%; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: white; outline: none; }
textarea { resize: vertical; min-height: 120px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; overflow-x: hidden; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,.15); }

.btn { border: 0; border-radius: 12px; padding: 12px 16px; min-height: 44px; font-weight: 800; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.btn.primary { background: var(--primary); color: white; box-shadow: 0 12px 24px rgba(108,99,255,.22); }
.btn.success { background: var(--green); color: white; box-shadow: 0 12px 24px rgba(16,185,129,.2); }
.btn.danger { background: var(--danger); color: white; }
.btn.ghost { background: rgba(255,255,255,.12); color: white; border: 1px dashed rgba(255,255,255,.24); }
.btn.ghost-dark { background: #f3f4f6; color: #374151; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.disabled, .btn:disabled.disabled { background: #e5e7eb; color: #6b7280; box-shadow: none; cursor: not-allowed; opacity: 1; }
.btn.compact-btn { min-height: 38px; padding: 9px 12px; }
.form-msg { margin-top: 12px; color: var(--danger); font-weight: 700; font-size: 14px; }

.topbar { height: 62px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 10; }
.topbar.dark { background: rgba(255,255,255,.1); color: white; border-bottom-color: rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.brand { font-weight: 900; color: var(--primary); }
.topbar.dark .brand { color: white; }
.topbar nav { display: flex; align-items: center; gap: 14px; }
.draft-save-summary { display: flex; align-items: center; gap: 12px; }
.draft-save-summary [data-draft-status] { font-size: 13px; font-weight: 800; color: #dbeafe; }
.draft-save-summary [data-draft-status][data-state="saved"] { color: #86efac; }
.draft-save-summary [data-draft-status][data-state="saving"] { color: #fde68a; }
.draft-save-summary [data-draft-status][data-state="error"] { color: #fca5a5; }
.nav-action { border: 0; background: transparent; font: inherit; font-weight: 900; cursor: pointer; }
.nav-action:disabled { opacity: .55; cursor: wait; }
.container { max-width: 1120px; margin: 0 auto; padding: 28px 18px; }
.page-title { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.page-title h1 { margin: 0; font-size: 30px; }
.page-title p { margin: 6px 0 0; color: var(--muted); }
.session-list { display: grid; gap: 12px; }
.session-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.rich-session .actions { justify-content: flex-end; }
.exam-group { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(17,24,39,.07); overflow: hidden; }
.exam-main-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; }
.exam-main-info, .class-app-info { min-width: 0; display: flex; align-items: center; gap: 14px; }
.exam-main-info strong, .class-app-info strong { display: block; font-size: 16px; }
.exam-main-info small, .class-app-info small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 700; }
.exam-template-icon { min-width: 76px; min-height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(108,99,255,.12), rgba(16,185,129,.12)); color: var(--primary); font-weight: 900; }
.exam-actions, .class-app-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.exam-action { border: 1px solid var(--line); min-height: 40px; border-radius: 11px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; background: white; color: #374151; font-weight: 900; cursor: pointer; transition: .15s ease; }
.exam-action:hover { transform: translateY(-1px); border-color: #c7d2fe; box-shadow: 0 10px 22px rgba(17,24,39,.08); }
.edit-action { background: #f8fafc; color: #1e3a5f; }
.primary-action { border-color: transparent; background: var(--primary); color: white; box-shadow: 0 12px 24px rgba(108,99,255,.18); }
.primary-action:hover { border-color: transparent; background: var(--primary-dark); color: white; }
.quiet-action { min-width: 54px; padding: 0 12px; background: #f8fafc; color: #4b5563; }
.danger-action { background: #fff; color: #991b1b; border-color: #fee2e2; }
.danger-action:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.class-app-list { border-top: 1px solid #edf2f7; background: #f8fafc; padding: 10px 12px 12px; display: grid; gap: 8px; }
.class-app-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #edf2f7; border-radius: 12px; background: white; }
.class-app-empty { border: 1px dashed #d1d5db; border-radius: 12px; color: var(--muted); padding: 14px; text-align: center; font-weight: 700; background: white; }
.small-code { padding: 7px 10px; font-size: 13px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.46); backdrop-filter: blur(8px); }
.modal-card { width: min(620px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow: auto; background: white; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(15,23,42,.28); }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0 0 4px; font-size: 22px; }
.modal-head p { margin: 0; color: var(--muted); line-height: 1.4; }
.modal-close { border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: #374151; min-height: 38px; padding: 0 12px; font-weight: 900; cursor: pointer; }
.class-picker { padding: 14px 18px 4px; display: grid; gap: 10px; }
.class-choice { margin: 0; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 12px; border: 1px solid #e5e7eb; border-radius: 14px; padding: 13px 14px; background: #f8fafc; cursor: pointer; }
.class-choice:hover { border-color: var(--primary); background: rgba(108,99,255,.06); }
.class-choice input { width: 18px; height: 18px; accent-color: var(--primary); }
.class-choice strong { display: block; color: var(--ink); }
.class-choice small { display: block; margin-top: 2px; color: var(--muted); font-weight: 700; }
.class-choice.already { opacity: .65; cursor: default; }
.modal-msg { min-height: 20px; padding: 4px 20px 0; color: var(--danger); font-weight: 800; font-size: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 18px 18px; }
.code { font-family: ui-monospace, Consolas, monospace; color: var(--primary); background: rgba(108,99,255,.1); padding: 8px 12px; border-radius: 10px; font-weight: 900; }
.badge { border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; background: #f3f4f6; color: #4b5563; }
.badge.active { background: #dcfce7; color: #15803d; }
.badge.waiting { background: #fef3c7; color: #b45309; }
.icon-action { border: 1px solid var(--line); background: #f8fafc; color: #374151; border-radius: 11px; min-height: 42px; padding: 0 12px; font-weight: 900; cursor: pointer; }
.icon-action:hover { border-color: var(--primary); color: var(--primary); background: rgba(108,99,255,.08); }
.icon-action.danger-text:hover { border-color: #fecaca; color: #dc2626; background: #fef2f2; }

.waiting-prof { min-height: 100vh; padding: 24px; max-width: 780px; margin: 0 auto; color: white; }
.backlink { color: rgba(255,255,255,.72); display: inline-block; margin-bottom: 18px; }
.center { text-align: center; padding: 28px; }
.pill, .room-chip { display: inline-flex; border-radius: 999px; padding: 7px 12px; background: rgba(108,99,255,.1); color: var(--primary); font-weight: 800; }
.room-code { font-family: ui-monospace, Consolas, monospace; font-size: clamp(44px, 11vw, 68px); letter-spacing: .18em; color: var(--blue); margin: 16px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.glass-list { margin-top: 18px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); border-radius: 18px; padding: 20px; }
.student-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.1); margin-top: 8px; }
.student-row div { display: grid; gap: 3px; }
.student-row span { color: rgba(255,255,255,.72); font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.cancel-student { border: 1px solid rgba(254,202,202,.35); background: rgba(220,38,38,.16); color: #fecaca; border-radius: 10px; padding: 9px 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.cancel-student:hover { background: rgba(220,38,38,.28); color: white; }
.cancel-student:disabled { opacity: .55; cursor: wait; }

.question-editor { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; max-width: 1080px; margin: 0 auto; padding: 24px; }
.question-editor aside { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 16px; color: white; align-self: start; position: sticky; top: 82px; }
.qnav-btn { width: 100%; display: flex; justify-content: space-between; margin: 7px 0; border: 0; border-radius: 10px; padding: 10px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.75); cursor: pointer; }
.qnav-btn.active { background: var(--primary); color: white; }
.qnav-btn.done { color: #86efac; }
.editor-card { min-width: 0; background: white; border-radius: 18px; padding: 22px; box-shadow: 0 24px 70px rgba(17,24,39,.14); }
.question-editor-main { min-width: 0; display: grid; gap: 14px; }
.exam-title-card { display: grid; gap: 8px; }
.exam-title-card label { margin: 0; font-weight: 900; color: #111827; }
.exam-title-card input { margin-top: 8px; font-size: 18px; font-weight: 900; }
.editor-title-msg { min-height: 18px; font-size: 13px; font-weight: 800; color: var(--muted); }
.editor-title-msg.success { color: #059669; }
.editor-title-msg.error { color: #b91c1c; }
.option-line { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; margin: 10px 0; }
.letter { border: 2px solid var(--line); background: white; color: #4b5563; border-radius: 12px; width: 46px; height: 46px; font-weight: 900; cursor: pointer; }
.letter.selected { background: var(--green); border-color: var(--green); color: white; }
.helper { color: #6b7280; font-size: 13px; margin: 8px 0 0; line-height: 1.4; }
.editor-alert { display: none; border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; border-radius: 12px; padding: 12px 14px; font-weight: 800; margin: 0 0 16px; }
.upload-group { display: grid; gap: 9px; margin: 18px 0; }
.upload-group strong { color: #374151; font-size: 14px; }
.media-type-group { display: grid; gap: 9px; margin: 18px 0 8px; }
.media-type-group > strong { color: #374151; font-size: 14px; }
.media-type-group > strong span { color: var(--muted); font-weight: 700; }
.media-type-group > small { color: var(--muted); line-height: 1.4; }
.media-type-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.media-type-btn { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; color: #4b5563; font-weight: 900; cursor: pointer; }
.media-type-btn:hover { border-color: rgba(108,99,255,.45); color: var(--primary); }
.media-type-btn.active { border-color: var(--primary); background: rgba(108,99,255,.1); color: var(--primary); box-shadow: inset 0 0 0 1px rgba(108,99,255,.18); }
.upload-box { margin: 0; min-height: 132px; border: 2px dashed #d1d5db; border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 18px; background: #f9fafb; color: #4b5563; text-align: center; cursor: pointer; transition: .18s; }
.upload-box:hover, .upload-box.loading { border-color: var(--primary); background: rgba(108,99,255,.06); color: var(--primary); }
.upload-box input { display: none; }
.upload-box small { color: #9ca3af; font-weight: 500; line-height: 1.35; }
.upload-icon { width: 48px; height: 48px; box-sizing: border-box; display: grid; place-items: center; border-radius: 13px; background: white; border: 1px solid var(--line); color: currentColor; box-shadow: 0 6px 18px rgba(17,24,39,.06); }
.upload-icon svg { width: 26px; height: 26px; display: block; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.upload-preview { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #f3f4f6; }
.upload-preview img, .upload-preview video { width: 100%; max-height: 260px; display: block; object-fit: contain; }
.remove-media { position: absolute; top: 10px; right: 10px; border: 0; border-radius: 10px; padding: 8px 10px; background: var(--danger); color: white; font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(220,38,38,.22); }

.student-wait { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; color: white; text-align: center; }
.student-wait { display: grid; place-items: center; }
.pulse-icon { width: 92px; height: 92px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 42px; animation: pulse 2s infinite; }
@keyframes pulse { 50% { transform: scale(1.05); opacity: .72; } }

.exam-shell { min-height: 100vh; display: block; }
.exam-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.exam-nav { background: rgba(255,255,255,.96); border-right: 1px solid var(--line); padding: 20px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.exam-nav h2 { margin: 0 0 10px; }
.timer { font-family: ui-monospace, Consolas, monospace; font-size: 32px; font-weight: 900; color: var(--blue); margin-bottom: 16px; }
.exam-nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px; }
.exam-dot { aspect-ratio: 1; border: 0; border-radius: 10px; font-weight: 900; cursor: pointer; background: #e5e7eb; color: #374151; }
.exam-dot.current { background: var(--primary); color: white; }
.exam-dot.answered { background: #d1fae5; color: #047857; }
.exam-dot.blank { background: #fee2e2; color: #b91c1c; }
.exam-page { padding: 24px; overflow: auto; }
.exam-head { color: white; max-width: 980px; margin: 0 auto 16px; display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.exam-head h1 { margin: 0; }
.exam-card { max-width: 980px; margin: 0 auto 16px; background: white; border-radius: 18px; padding: 22px; box-shadow: 0 18px 48px rgba(17,24,39,.14); scroll-margin-top: 16px; }
.exam-card.active { outline: 4px solid rgba(108,99,255,.28); }
.subject-pill { display: inline-flex; color: white; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 900; margin-bottom: 10px; }
.exam-options { display: block; margin-top: 18px; }
.exam-options { display: grid; gap: 10px; }
.exam-option { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; }
.exam-option { margin-bottom: 10px; }
.exam-option input { display: none; }
.exam-option .mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #f3f4f6; font-weight: 900; }
.exam-option.selected { border-color: var(--green); background: #ecfdf5; }
.exam-option.selected .mark { background: var(--green); color: white; }
.media { margin-top: 12px; border-radius: 12px; overflow: hidden; background: #f3f4f6; }
.media img, .media video { width: 100%; max-height: 340px; object-fit: contain; display: block; }

.result-page { min-height: 100vh; max-width: 820px; margin: 0 auto; padding: 24px; }
.simple-result { display: grid; place-items: center; }
.result-card { width: min(760px, 100%); padding: clamp(34px, 6vw, 64px); }
.trophy { width: 78px; height: 78px; border-radius: 999px; display: grid; place-items: center; margin: 0 auto 12px; background: linear-gradient(135deg, var(--green), #3b82f6); font-size: 38px; }
.result-congrats { margin: 18px 0 4px; color: var(--muted); font-weight: 800; }
.result-score { margin: 0; font-size: clamp(62px, 14vw, 120px); line-height: .95; font-weight: 900; color: #111827; letter-spacing: 0; }
.result-note { margin: 18px 0 28px; color: var(--muted); }
.result-list { display: grid; gap: 10px; margin-top: 16px; }
.result-item { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.12); color: white; border-radius: 14px; padding: 14px; }

.monitor-topbar { height: 66px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 20px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.monitor-back { color: var(--primary); font-weight: 900; }
.monitor-topbar > div { text-align: center; display: grid; gap: 2px; }
.monitor-topbar strong { font-size: 18px; }
.monitor-topbar span { color: var(--muted); font-size: 13px; }
.monitor-topbar .btn { justify-self: end; }
.monitor-page { max-width: 1180px; margin: 0 auto; padding: 28px 18px 42px; }
.monitor-hero { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; background: linear-gradient(135deg, #1e3a5f, #2d1b69 58%, #6c63ff); color: white; border-radius: 22px; padding: 28px; box-shadow: 0 24px 70px rgba(30,58,95,.18); }
.monitor-hero h1 { margin: 4px 0 8px; font-size: clamp(32px, 5vw, 54px); letter-spacing: 0; }
.monitor-hero p { color: rgba(255,255,255,.76); margin: 0; max-width: 660px; line-height: 1.45; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 900; color: #a5b4fc !important; }
.live-pill { flex: 0 0 auto; border-radius: 999px; padding: 10px 14px; background: rgba(16,185,129,.18); border: 1px solid rgba(167,243,208,.28); color: #bbf7d0; font-weight: 900; }
.monitor-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 14px 36px rgba(17,24,39,.07); position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -28px; top: -28px; width: 84px; height: 84px; border-radius: 50%; opacity: .12; background: currentColor; }
.metric-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric-card strong { display: block; margin: 7px 0 4px; font-size: clamp(26px, 3vw, 38px); letter-spacing: 0; }
.metric-card small { color: #9ca3af; font-weight: 700; }
.metric-card.blue { color: #2563eb; }
.metric-card.green { color: #059669; }
.metric-card.purple { color: var(--primary); }
.metric-card.orange { color: #d97706; }
.monitor-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.monitor-card { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 36px rgba(17,24,39,.07); overflow: hidden; }
.card-title { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.card-title h2 { margin: 0; font-size: 20px; }
.card-title span { color: var(--muted); font-size: 13px; font-weight: 800; }
.student-monitor-list, .grade-list { padding: 12px; display: grid; gap: 10px; }
.monitor-student { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #edf2f7; }
.avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(108,99,255,.12); color: var(--primary); font-weight: 900; }
.monitor-student strong, .grade-row strong { display: block; }
.monitor-student span, .grade-row span { color: var(--muted); font-size: 13px; }
.grade-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px; border-radius: 14px; background: #f8fafc; border: 1px solid #edf2f7; }
.grade-detail { border-radius: 14px; background: #f8fafc; border: 1px solid #edf2f7; overflow: hidden; }
.grade-detail summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px; }
.grade-detail summary::-webkit-details-marker { display: none; }
.grade-detail[open] summary { border-bottom: 1px solid #e5e7eb; background: white; }
.grade-score { min-width: 92px; border-radius: 12px; padding: 8px 10px; text-align: center; font-weight: 900; }
.grade-score b { display: block; }
.grade-score small { display: block; margin-top: 2px; }
.grade-score.good { background: #dcfce7; color: #15803d; }
.grade-score.warn { background: #fef3c7; color: #b45309; }
.grade-score.bad { background: #fee2e2; color: #b91c1c; }
.question-result-list { display: grid; gap: 8px; padding: 12px; }
.question-result { border-radius: 11px; padding: 10px; display: grid; gap: 4px; border: 1px solid #e5e7eb; background: white; }
.question-result strong { font-size: 13px; }
.question-result span, .question-result small { color: var(--muted); }
.question-result.ok { border-left: 4px solid #10b981; }
.question-result.miss { border-left: 4px solid #ef4444; }
.empty-state { color: var(--muted); text-align: center; padding: 28px 12px; }
.success-msg { color: #059669 !important; }

.home-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 980px; }
.glass-card.admin { background: rgba(16,185,129,.14); }
.nav-actions { display: flex; gap: 18px; align-items: center; font-weight: 800; }

.admin-page { max-width: 1220px; margin: 0 auto; padding: 28px 18px 48px; }
.admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 30px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1e3a5f, #2d1b69 58%, #6c63ff);
  color: white;
  box-shadow: 0 24px 70px rgba(30,58,95,.16);
  margin-bottom: 18px;
}
.admin-hero h1 { margin: 4px 0 8px; font-size: clamp(32px, 5vw, 56px); letter-spacing: 0; }
.admin-hero p { margin: 0; color: rgba(255,255,255,.76); max-width: 720px; line-height: 1.45; }
.admin-hero-card {
  flex: 0 0 190px;
  min-height: 150px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 6px;
}
.admin-hero-card span, .admin-hero-card small { color: rgba(255,255,255,.72); font-weight: 800; }
.admin-hero-card strong { font-size: 56px; line-height: 1; }
.admin-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.admin-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.admin-layout.lists { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(17,24,39,.07);
  overflow: hidden;
}
.admin-card.wide { grid-column: span 2; }
.admin-form { padding: 14px 18px 18px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-bars { padding: 12px 14px 14px; display: grid; gap: 10px; }
.admin-bar { display: grid; gap: 8px; }
.admin-bar div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.admin-bar span { color: var(--muted); font-weight: 900; }
.admin-bar i { display: block; height: 10px; min-width: 20px; border-radius: 999px; background: linear-gradient(90deg, #10b981, #3b82f6, #6c63ff); }
.admin-tables { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 14px; padding: 14px; }
.admin-tables h3 { margin: 0 0 10px; }
.diagnostic-table { width: 100%; border-collapse: collapse; }
.diagnostic-table th, .diagnostic-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.diagnostic-table th { width: 44%; color: #475569; font-weight: 700; }
.diagnostic-table tr:last-child th, .diagnostic-table tr:last-child td { border-bottom: 0; }
.mini-row { border: 1px solid #edf2f7; background: #f8fafc; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 4px; }
.mini-row strong { overflow-wrap: anywhere; }
.mini-row span { color: var(--muted); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }

.subject-admin-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid #edf2f7; background: #f8fafc; border-radius: 14px; padding: 12px; margin-bottom: 9px; }
.subject-admin-row strong { overflow-wrap: anywhere; }
.subject-color-dot { width: 14px; height: 14px; border-radius: 999px; box-shadow: 0 0 0 3px rgba(17,24,39,.06); }
.subject-admin-main { min-width: 0; display: grid; gap: 3px; }
.subject-admin-main small { color: #64748b; font-size: .82rem; }
.subject-admin-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.subject-form-actions { justify-content: flex-start; margin-top: 4px; }
@media (max-width: 640px) {
  .subject-admin-row { grid-template-columns: 16px minmax(0, 1fr); }
  .subject-admin-actions { grid-column: 2; justify-content: flex-start; }
}

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); background: #f8fafc; }
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-sidebar .brand { font-size: 20px; margin-bottom: 8px; }
.admin-sidebar p { margin: 0 0 8px; color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.uf-list { display: grid; gap: 8px; }
.uf-item {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #374151;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}
.uf-item b { color: inherit; }
.uf-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.uf-item span { color: var(--muted); font-size: 13px; }
.uf-item.active { border-color: rgba(108,99,255,.45); background: rgba(108,99,255,.1); color: var(--primary); }
.sidebar-link { min-height: 42px; display: flex; align-items: center; padding: 10px 12px; border-radius: 12px; color: #374151; font-weight: 800; }
.sidebar-button { border: 0; background: transparent; width: 100%; font: inherit; cursor: pointer; }
.danger-text { color: var(--danger) !important; }
.sidebar-button:disabled { opacity: .55; cursor: wait; }
.sidebar-link:hover { background: #f3f4f6; color: var(--primary); }
.sidebar-link.active { background: rgba(108,99,255,.1); color: var(--primary); }
.sidebar-menu-group { display: grid; gap: 4px; margin-top: 8px; padding-top: 10px; border-top: 1px solid #edf2f7; }
.sidebar-group-title { padding: 0 12px 3px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.sidebar-empty { color: var(--muted); font-size: 13px; line-height: 1.4; }
.admin-workspace { min-width: 0; padding: 22px 24px 36px; display: grid; gap: 14px; align-content: start; }
.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px 28px;
  color: white;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e3a5f, #2d1b69 58%, #6c63ff);
  box-shadow: 0 24px 70px rgba(30,58,95,.16);
}
.admin-header h1 { margin: 4px 0 8px; font-size: clamp(30px, 4vw, 46px); letter-spacing: 0; }
.admin-header.compact h1 { font-size: clamp(28px, 3.4vw, 42px); }
.admin-header span { color: rgba(255,255,255,.74); }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.admin-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.admin-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.admin-editor-grid { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.admin-catalog-stack { display: grid; gap: 14px; align-items: start; }
.admin-catalog-stack > .admin-card:first-child .admin-form { max-width: 980px; }
.admin-catalog-card { min-width: 0; }
.admin-list-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, .35fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.admin-list-toolbar-wide { grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, .55fr)) auto; }
.admin-list-toolbar label { display: grid; gap: 6px; margin: 0; color: #475569; font-size: 12px; font-weight: 900; }
.admin-list-toolbar input,
.admin-list-toolbar select { width: 100%; min-height: 42px; margin: 0; background: #fff; }
.admin-clear-filters { min-height: 42px; white-space: nowrap; }
.admin-list-panel { padding: 14px; max-height: min(56vh, 680px); overflow: auto; }
.registration-prefix { display: inline-flex; margin-right: 10px; border-radius: 999px; padding: 3px 8px; color: #1e3a8a; background: #dbeafe; font-family: ui-monospace, Consolas, monospace; font-size: 12px; vertical-align: middle; }
.chart-card { min-height: 0; }
.chart-card .card-title { padding: 14px 16px; }
.admin-bars.compact { max-height: 246px; overflow: auto; }
.admin-bars.compact .admin-bar { gap: 6px; }
.admin-bars.compact .admin-bar div { font-size: 13px; }
.school-matrix { padding: 12px; display: grid; gap: 10px; max-height: 190px; overflow: auto; }
.school-matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) 86px 86px; gap: 10px; align-items: center; padding: 12px; border: 1px solid #edf2f7; background: #f8fafc; border-radius: 14px; }
.school-matrix-row strong { display: block; overflow-wrap: anywhere; }
.school-matrix-row span { color: var(--muted); font-size: 13px; }
.school-matrix-row b { text-align: center; border-radius: 12px; background: white; border: 1px solid #e5e7eb; padding: 9px 8px; color: #374151; }
.device-list { padding: 12px; display: grid; gap: 10px; max-height: 190px; overflow: auto; }
.device-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 10px; align-items: center; padding: 12px; border: 1px solid #edf2f7; background: #f8fafc; border-radius: 14px; }
.device-row strong { display: block; overflow-wrap: anywhere; }
.device-row span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.device-row b { text-align: center; border-radius: 12px; background: white; border: 1px solid #e5e7eb; padding: 9px 8px; color: #374151; font-size: 12px; text-transform: uppercase; }
.exam-list { padding: 12px; display: grid; gap: 10px; max-height: 190px; overflow: auto; }
.exam-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; align-items: center; padding: 12px; border: 1px solid #edf2f7; background: #f8fafc; border-radius: 14px; }
.exam-row strong { display: block; overflow-wrap: anywhere; }
.exam-row span { color: var(--muted); font-size: 13px; }
.exam-row b { text-align: center; border-radius: 12px; background: white; border: 1px solid #e5e7eb; padding: 9px 8px; color: #374151; font-size: 12px; text-transform: uppercase; }
.school-checks { display: grid; gap: 8px; max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #f8fafc; }
.school-check { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin: 0; padding: 8px; border-radius: 10px; font-weight: 800; color: #374151; }
.school-check:hover { background: white; }
.school-check input { width: 18px; height: 18px; padding: 0; flex: 0 0 auto; }
.school-check span { line-height: 1.35; }
.admin-shell .admin-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; gap: 12px; }
.admin-shell .metric-card { min-height: 118px; padding: 16px; }
.admin-shell .metric-card strong { font-size: clamp(28px, 3vw, 38px); }
.local-school-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(108,99,255,.25);
  background: rgba(108,99,255,.08);
  border-radius: 14px;
  padding: 13px;
  color: #374151;
}
.local-school-card strong { color: var(--primary); overflow-wrap: anywhere; }
.local-school-card span, .local-school-card small { color: var(--muted); font-weight: 800; overflow-wrap: anywhere; }
.wifi-mini-list { display: grid; gap: 4px; margin-top: 3px; }
.wifi-mini-list small { display: block; border-radius: 8px; background: rgba(255,255,255,.7); border: 1px solid rgba(108,99,255,.12); padding: 5px 7px; font-size: 12px; }

.theme-captive { min-height: 100vh; background: linear-gradient(135deg, #eef2ff, #ffffff 54%, #ecfeff); }
.captive-shell { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.captive-card { width: min(500px, 100%); background: rgba(255,255,255,.94); border: 1px solid #e5e7eb; border-radius: 24px; padding: 30px; box-shadow: 0 24px 70px rgba(17,24,39,.14); text-align: center; }
.captive-card h1 { margin: 14px 0 8px; font-size: 30px; }
.captive-card p { color: #5b6475; line-height: 1.5; margin: 0; }
.captive-icon, .captive-ok { width: 68px; height: 68px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; font-weight: 900; color: #6c63ff; background: rgba(108,99,255,.12); }
.captive-ok { color: #047857; background: rgba(16,185,129,.14); }
.captive-info { margin: 22px 0; display: grid; gap: 8px; padding: 16px; border: 1px solid #e5e7eb; border-radius: 18px; background: #f9fafb; text-align: left; }
.captive-info div { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; border-bottom: 1px solid #edf2f7; padding-bottom: 8px; }
.captive-info div:last-child { border-bottom: 0; padding-bottom: 0; }
.captive-info span { color: #6b7280; font-size: 13px; font-weight: 800; }
.captive-info strong { color: #111827; text-align: right; overflow-wrap: anywhere; }
.captive-brand { display: grid; justify-items: center; gap: 4px; margin-bottom: 10px; }
.captive-brand strong { font-size: 18px; color: #111827; }
.captive-brand span, .captive-note { color: #6b7280; font-size: 13px; }
.captive-note { display: block; margin-top: 14px; line-height: 1.35; }
.captive-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.captive-choice-btn { min-height: 86px; border-radius: 18px; padding: 16px; display: grid; align-content: center; gap: 5px; text-decoration: none; border: 1px solid #e5e7eb; background: #fff; color: #111827; box-shadow: 0 12px 28px rgba(17,24,39,.08); }
.captive-choice-btn strong { font-size: 18px; }
.captive-choice-btn span { color: #6b7280; font-size: 13px; line-height: 1.25; }
.captive-choice-btn.student { color: #fff; border-color: transparent; background: linear-gradient(135deg, #6c63ff, #7c3aed); }
.captive-choice-btn.student span { color: rgba(255,255,255,.86); }
.captive-choice-btn.teacher { background: #f8fafc; }
.captive-url { margin-top: 14px; display: grid; gap: 5px; border: 1px dashed rgba(108,99,255,.35); border-radius: 16px; padding: 12px; background: rgba(108,99,255,.06); text-align: center; }
.captive-url span { color: #6b7280; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.captive-url strong { color: #111827; font-size: 18px; overflow-wrap: anywhere; }
.captive-exit { margin-top: 14px; min-height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; color: #6c63ff; background: rgba(108,99,255,.1); font-weight: 900; text-decoration: none; }
.admin-sidebar .sidebar-link:nth-of-type(1) { margin-top: 8px; }
.super-page { max-width: 980px; margin: 0 auto; padding: 24px; display: grid; gap: 16px; }
.settings-preview { padding: 16px; }
.settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.settings-grid div { border: 1px solid #edf2f7; background: #f8fafc; border-radius: 14px; padding: 14px; display: grid; gap: 6px; }
.settings-grid span { color: var(--muted); font-size: 13px; font-weight: 900; }
.settings-grid strong { overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .home-grid, .home-grid.three, .question-editor, .exam-shell { grid-template-columns: 1fr; }
  .exam-nav { position: sticky; top: 0; height: auto; z-index: 5; border-right: 0; border-bottom: 1px solid var(--line); }
  .exam-nav-grid { grid-template-columns: repeat(10, 1fr); }
  .page-title, .session-card, .exam-head { align-items: stretch; flex-direction: column; }
  .monitor-topbar { grid-template-columns: 1fr; height: auto; padding: 12px; text-align: center; }
  .monitor-topbar .btn { justify-self: stretch; }
  .monitor-hero { align-items: stretch; flex-direction: column; }
  .monitor-stats, .monitor-grid { grid-template-columns: 1fr; }
  .admin-hero { align-items: stretch; flex-direction: column; }
  .admin-hero-card { flex-basis: auto; min-height: 120px; }
  .admin-metrics, .admin-layout, .admin-layout.lists, .admin-tables, .admin-form-grid { grid-template-columns: 1fr; }
  .admin-card.wide { grid-column: auto; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
  .admin-workspace { padding: 14px; }
  .admin-header { align-items: stretch; flex-direction: column; }
  .header-actions { justify-content: stretch; }
  .header-actions .btn { flex: 1; }
  .admin-shell .admin-metrics, .admin-charts, .admin-forms, .admin-editor-grid { grid-template-columns: 1fr; }
  .admin-list-toolbar, .admin-list-toolbar-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-search-field { grid-column: 1 / -1; }
  .school-matrix-row { grid-template-columns: 1fr; }
  .device-row { grid-template-columns: 1fr; }
  .exam-row { grid-template-columns: 1fr; }
  .exam-main-row { align-items: stretch; flex-direction: column; }
  .exam-actions, .class-app-actions { justify-content: stretch; }
  .exam-actions > *, .class-app-actions > * { flex: 1; }
  .class-app-row { grid-template-columns: 1fr; align-items: stretch; }
  .modal-head, .modal-foot { align-items: stretch; flex-direction: column; }
  .settings-grid { grid-template-columns: 1fr; }
  .captive-choice { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .admin-list-toolbar, .admin-list-toolbar-wide { grid-template-columns: 1fr; }
  .admin-search-field { grid-column: auto; }
  .admin-clear-filters { width: 100%; }
  .admin-list-panel { max-height: none; overflow: visible; }
}

/* Gestão segura de usuários */
.user-management-grid { margin-top: 22px; }
.staff-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  background: #fff;
}
.staff-user-row + .staff-user-row { margin-top: 10px; }
.staff-user-row.is-inactive { opacity: .68; background: #f8fafc; }
.staff-user-main { min-width: 0; display: grid; gap: 4px; }
.staff-user-main strong { font-size: 1rem; color: #0f172a; }
.staff-user-main span, .staff-user-main small { color: #64748b; overflow-wrap: anywhere; }
.staff-user-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.modal-admin-form { padding-top: 18px; }
.danger-zone { border-color: #fecaca; background: linear-gradient(180deg, #fff, #fff7f7); }
.danger-zone > p { margin: 0; padding: 0 18px 16px; color: #7f1d1d; line-height: 1.55; }
.danger-zone > .btn { margin: 0 18px 18px; }
.current-user-name { color: rgba(255,255,255,.72); font-size: .9rem; }

@media (max-width: 720px) {
  .staff-user-row { align-items: stretch; flex-direction: column; }
  .staff-user-actions { justify-content: stretch; }
  .staff-user-actions .btn { flex: 1 1 140px; }
}
.student-declaration{display:grid;gap:.45rem;padding:.85rem;border:1px solid var(--border);border-radius:12px;background:rgba(74,139,255,.07)}
.student-declaration span{display:flex;align-items:flex-start;gap:.65rem;font-weight:700;line-height:1.35}
.student-declaration input{width:1.15rem;height:1.15rem;margin:.1rem 0 0;flex:0 0 auto}
.student-declaration small{color:var(--muted);line-height:1.45}
.pcd-results-card { margin-top: 1rem; }
.pcd-results-card > label { display: grid; gap: .45rem; max-width: 760px; }
.pcd-results-list { display: grid; gap: .9rem; margin-top: 1rem; }
.pcd-result-form { border: 1px solid var(--line, #dbe3ef); border-radius: 14px; padding: 1rem; display: grid; gap: .9rem; }
.pcd-result-student { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.pcd-result-student span { color: var(--muted, #64748b); font-size: .86rem; }
.pcd-subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.pcd-subject-grid label { display: grid; gap: .3rem; }
.pcd-subject-grid label span { color: var(--muted, #64748b); font-size: .78rem; }
.pcd-result-form .btn { justify-self: start; }
@media (max-width: 640px) {
  .pcd-result-student { align-items: flex-start; flex-direction: column; }
  .pcd-subject-grid { grid-template-columns: 1fr; }
}

.pcd-bulk-page { min-width: 0; }
.pcd-bulk-intro { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pcd-bulk-intro h2 { margin: 0 0 .35rem; }
.pcd-bulk-intro p { margin: 0; color: var(--muted, #64748b); }
.pcd-bulk-summary,
.pcd-application-count { flex: 0 0 auto; padding: .55rem .8rem; border: 1px solid var(--line, #dbe3ef); border-radius: 999px; color: var(--muted, #64748b); font-size: .84rem; }
.pcd-application-stack { display: grid; gap: 1rem; margin-top: 1rem; }
.pcd-application-card { min-width: 0; }
.pcd-application-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.pcd-application-head h2 { margin: .1rem 0 .25rem; }
.pcd-application-head span { color: var(--muted, #64748b); font-size: .85rem; }
.pcd-table-wrap { overflow-x: auto; border: 1px solid var(--line, #dbe3ef); border-radius: 12px; }
.pcd-entry-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.pcd-entry-table th,
.pcd-entry-table td { padding: .75rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line, #dbe3ef); }
.pcd-entry-table th { color: var(--muted, #64748b); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.pcd-entry-table tbody tr:last-child td { border-bottom: 0; }
.pcd-entry-table td > strong,
.pcd-entry-table td > small { display: block; }
.pcd-entry-table td > small { margin-top: .2rem; color: var(--muted, #64748b); }
.pcd-score-field { display: grid; gap: .3rem; min-width: 112px; }
.pcd-score-field > span { font-size: .8rem; color: var(--muted, #64748b); }
.pcd-score-input { width: 100%; min-width: 80px; }
.essay-option { display: flex !important; align-items: flex-start; gap: .7rem; margin-top: .8rem; padding: .8rem; border: 1px solid var(--line, #dbe3ef); border-radius: 12px; }
.essay-option input { width: auto; margin-top: .2rem; }
.essay-option span { display: grid; gap: .2rem; }
.essay-option small { color: var(--muted, #64748b); }
.essay-entry-table { min-width: 560px; }
.pcd-application-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.pcd-application-actions .form-msg { margin: 0; }

@media (max-width: 720px) {
  .pcd-bulk-intro,
  .pcd-application-head,
  .pcd-application-actions { align-items: flex-start; flex-direction: column; }
  .pcd-application-actions .btn { width: 100%; }
}
.academic-import-card .card-title { align-items: center; gap: 18px; }
.academic-import-card .card-title p { margin: 5px 0 0; color: var(--muted); }
.academic-import-controls { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 12px; align-items: end; }
.admin-file-field { display: grid; gap: 7px; color: var(--muted); font-size: .85rem; font-weight: 700; }
.admin-file-field input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--input-bg, #07182b); }
.academic-import-result { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); display: grid; gap: 4px; }
.academic-import-result.is-approved { border-color: rgba(45, 212, 150, .48); background: rgba(16, 185, 129, .08); color: var(--text); }
.academic-import-result.is-error { border-color: rgba(251, 113, 133, .52); background: rgba(244, 63, 94, .08); color: #fecdd3; }
@media (max-width: 900px) { .academic-import-controls { grid-template-columns: 1fr; } .academic-import-controls .btn { width: 100%; } }
