:root {
  --bg: #eef4ff;
  --bg-soft: #f8fbff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #dbe5f2;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #dbeafe;
  --accent: #f97316;
  --success: #15803d;
  --danger: #dc2626;
  --warning: #b45309;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.16), transparent 30rem),
    linear-gradient(135deg, var(--bg), #fbfdff 60%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--brand-soft);
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(219, 229, 242, 0.8);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  padding-left: 46px;
}

.brand::before {
  content: "🎓";
  position: absolute;
  left: 0;
  top: 50%;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-secondary, #38bdf8));
  transform: translateY(-50%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.brand:has(.brand-logo)::before {
  display: none;
}

.brand-logo {
  position: absolute;
  left: 0;
  top: 50%;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.brand strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.userbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(219, 229, 242, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  padding: 24px clamp(16px, 4vw, 44px);
}

.sidebar {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(219, 229, 242, 0.84);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 12px;
  height: fit-content;
  position: sticky;
  top: 94px;
  backdrop-filter: blur(18px);
}

.nav-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px;
  background: transparent;
  color: var(--muted);
  border-radius: 14px;
  text-align: left;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  background: #f1f5f9;
  color: #64748b;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-button.active,
.nav-button:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-secondary, #38bdf8));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.nav-button.active .nav-icon,
.nav-button:hover .nav-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #64748b;
}

.main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.panel,
.login-card,
.exam-card {
  background: var(--panel);
  border: 1px solid rgba(219, 229, 242, 0.86);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.panel {
  padding: clamp(16px, 2vw, 24px);
}

.panel:first-child {
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(26px, 4vw, 38px);
}

h2 {
  font-size: 21px;
}

h3 {
  font-size: 16px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 460px);
  padding: clamp(24px, 4vw, 34px);
  position: relative;
  overflow: hidden;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: -80px -120px auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  pointer-events: none;
}

.reset-link {
  width: 100%;
  margin-top: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 460px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(219, 229, 242, 0.92);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.modal-card.modal-wide {
  width: min(100%, 980px);
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 6px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.section-tab {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.section-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #38bdf8);
}

.compact-search {
  width: min(100%, 320px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.detail-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.detail-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}

.finance-card {
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.finance-card.danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.finance-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.fee-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(2, minmax(120px, 1fr)) minmax(100px, 0.7fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.student-course-finance {
  display: grid;
  gap: 10px;
}

.student-finance-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(3, minmax(105px, 1fr)) minmax(130px, 1fr) repeat(2, minmax(95px, 0.7fr));
  gap: 9px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.student-finance-title {
  align-self: center;
}

.student-finance-title span,
.finance-mini span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.finance-mini {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.batch-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: 430px;
  overflow-y: auto;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.check-card input {
  min-height: auto;
}

.check-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.video-watermark-card {
  position: relative;
  overflow: hidden;
}

.student-watermark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.55);
  font-size: 10px;
  pointer-events: none;
  animation: watermarkDrift 8s infinite alternate ease-in-out;
}

.app-footer {
  margin: 18px 0 4px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

@keyframes watermarkDrift {
  from { transform: translate(-20px, -18px); }
  to { transform: translate(6px, 4px); }
}

.badge.warning {
  color: #92400e;
  background: #fef3c7;
}

.payment-due-hint {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.institute-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.institute-preview img,
.institute-logo-placeholder {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  object-fit: contain;
}

.institute-preview span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.report-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  align-items: end;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.answer-explanation {
  margin-top: 8px;
  padding: 9px;
  border-radius: 8px;
  background: #eff6ff;
}

.answer-explanation p {
  margin: 4px 0 0;
}

.analytics-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 280px));
  gap: 12px;
  margin: 14px 0;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28rem),
    rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(14px);
}

.confirm-card {
  width: min(100%, 500px);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(219, 229, 242, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.confirm-card h2 {
  margin-bottom: 8px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.form-grid {
  display: grid;
  gap: 13px;
}

.import-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.import-card {
  padding: 16px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.field {
  display: grid;
  gap: 7px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: auto;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(148, 163, 184, 0.34);
  background: #ffffff;
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.07),
    0 6px 14px rgba(15, 23, 42, 0.045);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #38bdf8);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
  transition: box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.btn:hover {
  filter: brightness(0.98);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.26);
}

.btn.secondary {
  background: #eef4ff;
  color: var(--brand-strong);
  box-shadow: none;
}

.btn.secondary:hover {
  background: #dbeafe;
}

.btn.danger {
  background: linear-gradient(135deg, var(--danger), #fb7185);
}

.btn.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

.check input {
  width: auto;
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.multi-select.open .multi-select-trigger {
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.07);
}

.multi-select-arrow {
  flex: 0 0 auto;
  font-size: 18px;
  transition: transform 0.18s ease;
}

.multi-select.open .multi-select-arrow {
  transform: rotate(180deg);
}

.multi-select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.multi-select-option:hover {
  background: #f1f5f9;
}

.multi-select-option.selected {
  background: #eff6ff;
  color: var(--brand-strong);
}

.multi-select-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: transparent;
  background: #ffffff;
}

.multi-select-option.selected .multi-select-check {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.multi-select-option span {
  color: var(--text);
  font-size: 14px;
}

.multi-select-empty {
  margin: 8px;
}

.grid-2,
.grid-3,
.stats-grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3,
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  padding: 18px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    #ffffff;
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.stat strong {
  display: block;
  font-size: clamp(28px, 5vw, 40px);
  margin-top: 6px;
  letter-spacing: -0.05em;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

.smart-table {
  border: 1px solid rgba(219, 229, 242, 0.9);
  background: #fff;
}

.smart-table thead th {
  background: #f8fafc;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

tbody tr:hover {
  background: rgba(248, 250, 252, 0.78);
  box-shadow: inset 1px 0 0 rgba(56, 189, 248, 0.22);
}

.details-row,
.details-row:hover {
  background: #f8fafc;
}

.quiz-submissions-row td {
  padding: 0 12px 16px;
  background: #fbfdff;
}

.quiz-submissions-row:hover {
  background: #fbfdff;
  box-shadow: none;
}

.nested-submissions {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(219, 229, 242, 0.86);
  border-radius: 14px;
  background: #ffffff;
}

.nested-submissions.empty {
  padding: 14px;
  color: var(--muted);
  font-weight: 700;
}

.nested-submissions-head,
.nested-submission-row {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.8fr 0.8fr 1.2fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
}

.nested-submissions-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nested-submission-row {
  border-top: 1px solid var(--line);
}

.nested-submission-row:hover {
  background: rgba(248, 250, 252, 0.72);
}

.submission-detail-list {
  display: grid;
  gap: 16px;
}

.submission-detail-card {
  padding: 17px 18px;
  border: 1px solid rgba(202, 219, 238, 0.86);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.submission-detail-card:hover {
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.08);
}

.submission-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.submission-detail-header h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.submission-summary {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(90px, 0.8fr));
  gap: 10px 24px;
}

.submission-summary > span {
  display: grid;
  gap: 3px;
}

.submission-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.submission-summary strong {
  color: var(--text);
  font-size: 13px;
}

.submission-summary .summary-success {
  color: var(--success);
}

.submission-summary .summary-danger {
  color: var(--danger);
}

.result-actions {
  flex-wrap: nowrap;
}

.result-actions .btn {
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.badge.success {
  background: #dcfce7;
  color: var(--success);
}

.badge.danger {
  background: #fee2e2;
  color: var(--danger);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-builder {
  display: grid;
  gap: 15px;
}

.editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 999px;
  background: #f8fafc;
  width: fit-content;
}

.editor-tab {
  min-height: 36px;
  padding: 8px 15px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.editor-tab.active {
  background: #ffffff;
  color: var(--brand-strong);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.editor-tab-panel {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.editor-tab-panel.active {
  position: static;
  display: grid;
  width: auto;
  height: auto;
  gap: 15px;
  overflow: visible;
}

.workspace-hero .panel-header {
  align-items: center;
}

.question-card {
  border: 1px solid rgba(219, 229, 242, 0.92);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: #ffffff;
  display: grid;
  gap: 13px;
}

.question-card .field {
  gap: 0;
}

.question-card .field span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.question-card input,
.question-card select,
.question-card textarea {
  border-radius: 14px;
  border-color: #d7e5f7;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.question-card input[type="radio"],
.question-card input[type="checkbox"] {
  width: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.question-card input[type="radio"]:hover,
.question-card input[type="checkbox"]:hover,
.question-card input[type="radio"]:focus,
.question-card input[type="checkbox"]:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.question-card input:hover,
.question-card select:hover,
.question-card textarea:hover {
  border-color: #d7e5f7;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 10px rgba(15, 23, 42, 0.032);
}

.question-card input:focus,
.question-card select:focus,
.question-card textarea:focus {
  border-color: rgba(148, 163, 184, 0.36);
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.075),
    0 6px 14px rgba(15, 23, 42, 0.05);
}

.question-card input,
.question-card select {
  min-height: 42px;
  padding: 9px 11px;
}

.question-card textarea {
  min-height: 92px;
  padding: 11px;
}

.question-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.question-toolbar h3 {
  font-size: 17px;
  font-weight: 800;
}

.question-select {
  display: grid;
  place-items: center;
}

.question-select input {
  width: auto;
}

.question-meta-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(220px, 1.25fr) minmax(120px, 0.65fr);
  gap: 12px;
}

.question-card .question-meta-grid .field,
.question-card > .field {
  gap: 7px;
}

.question-card .question-meta-grid .field span,
.question-card > .field span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.question-meta-grid input[readonly] {
  color: var(--muted);
  font-weight: 800;
  background: #f8fafc;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-left: 0;
}

.choice-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-weight: 600;
  border-radius: 16px;
  transition: background 0.18s ease;
}

.choice-row > input[type="radio"] {
  width: auto;
  accent-color: var(--danger);
}

.choice-row > input[type="text"],
.choice-row > input:not([type]) {
  min-height: 40px;
  padding: 9px 11px;
}

.warning-box {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  color: var(--warning);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #0f172a;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.profile-photo {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.brand {
  min-height: 40px;
  justify-content: center;
  padding-left: 54px;
}

.brand-logo {
  width: 40px;
  height: 40px;
}

.brand:has(.brand-logo) {
  padding-left: 54px;
}

.userbar {
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-color: rgba(191, 210, 235, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.user-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.userbar-name {
  min-width: 0;
  max-width: 160px;
}

.userbar-name strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.userbar .btn.small {
  min-height: 28px;
  padding: 7px 10px;
  border-radius: 999px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.notification-card > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.notification-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 14px;
  align-items: center;
}

.bar-row > div:first-child {
  display: grid;
  gap: 3px;
}

.bar {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.option-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px;
  align-items: center;
}

.message {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.message.error {
  background: #fee2e2;
  color: var(--danger);
}

.exam-page {
  min-height: 100vh;
  padding: clamp(14px, 4vw, 28px);
}

.exam-card {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 24px);
}

.exam-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.timer {
  min-width: 122px;
  padding: 12px 14px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  text-align: center;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.answer-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.answer-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.answer-option:hover {
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.045);
}

.answer-option input {
  width: auto;
  margin-top: 4px;
}

.answer-review {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}

.answer-review-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--danger);
  border-radius: var(--radius-sm);
  background: #fff;
}

.answer-review-card.correct {
  border-left-color: var(--success);
}

.answer-review-card.wrong {
  border-left-color: var(--danger);
}

.answer-review-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    top: auto;
    z-index: 20;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(78px, 1fr);
    overflow-x: auto;
    padding: 8px;
    border-radius: 24px;
  }

  .nav-button {
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    min-width: 78px;
    padding: 9px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .nested-submissions-head {
    display: none;
  }

  .nested-submission-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .submission-summary {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .question-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .panel-header,
  .exam-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
  }

  .userbar {
    justify-content: space-between;
    border-radius: 18px;
  }

  .grid-2,
  .grid-3,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    border-radius: 16px;
  }

  .submission-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .submission-summary {
    grid-template-columns: 1fr;
  }

  .submission-detail-header .actions,
  .submission-detail-header .btn {
    width: 100%;
  }

  .question-meta-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .fee-row,
  .analytics-filters {
    grid-template-columns: 1fr;
  }

  .option-row {
    grid-template-columns: 1fr;
  }

  .choice-list {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .choice-row {
    grid-template-columns: auto 1fr;
  }

  .choice-row > input:not([type]),
  .choice-row > input[type="text"] {
    grid-column: auto;
  }

  .actions .btn,
  .panel-header .btn,
  .panel-header .actions {
    width: 100%;
  }

  .actions {
    align-items: stretch;
  }

  .editor-tabs {
    width: 100%;
    border-radius: 18px;
  }

  .editor-tab {
    flex: 1;
  }

  h1 {
    font-size: 28px;
  }
}

/* Compact typography and layout */
:root {
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
  --shadow-soft: 0 5px 14px rgba(15, 23, 42, 0.055);
}

html {
  font-size: 12px;
}

body,
button,
input,
select,
textarea {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
}

body,
p,
span,
label,
td,
th,
a,
button,
input,
select,
textarea,
.muted,
.field span,
.badge,
.check,
.nav-button {
  font-weight: 400;
}

h1,
h2,
h3,
.brand strong,
.panel-header strong,
.stat strong,
.finance-card strong,
table strong,
.btn {
  font-weight: 700;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 13px;
}

.brand strong {
  font-size: 16px;
}

.brand span,
.muted,
.field span,
th,
.badge,
.btn.small {
  font-size: 11px;
}

input::placeholder,
textarea::placeholder {
  color: #b8c1cf;
  opacity: 1;
  font-weight: 400;
}

.topbar {
  gap: 10px;
  padding: 9px clamp(12px, 2.5vw, 28px);
}

.brand {
  gap: 2px;
  padding-left: 36px;
}

.brand::before {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.16);
}

.userbar {
  gap: 8px;
  padding: 5px;
}

.layout {
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 14px;
  padding: 14px clamp(12px, 2.5vw, 28px);
}

.sidebar {
  top: 68px;
  padding: 7px;
  box-shadow: var(--shadow-soft);
}

.nav-button {
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
}

.nav-icon {
  width: 25px;
  height: 25px;
  border-radius: 7px;
}

.nav-icon svg {
  width: 14px;
  height: 14px;
}

.nav-button.active,
.nav-button:hover {
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.15);
}

.main {
  gap: 11px;
}

.panel {
  padding: 14px;
}

.panel-header {
  gap: 8px;
  margin-bottom: 11px;
}

.form-grid,
.quiz-builder,
.editor-tab-panel.active {
  gap: 9px;
}

.grid-2,
.grid-3,
.stats-grid,
.finance-summary,
.detail-grid,
.analytics-filters {
  gap: 9px;
}

.field {
  gap: 4px;
}

input,
select,
textarea {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
}

textarea {
  min-height: 70px;
}

.btn {
  min-height: 32px;
  padding: 6px 11px;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.13);
}

.btn.small {
  min-height: 27px;
  padding: 4px 8px;
}

.stat,
.finance-card,
.detail-item,
.fee-row,
.question-card,
.import-card {
  padding: 10px;
}

.stat strong {
  font-size: 22px;
  margin-top: 3px;
}

.finance-card strong {
  font-size: 17px;
}

.finance-summary {
  margin: 10px 0 14px;
}

th,
td {
  padding: 8px;
}

th {
  font-size: 10px;
}

.badge {
  padding: 3px 7px;
}

.modal-backdrop,
.confirm-backdrop {
  padding: 12px;
}

.modal-card,
.confirm-card {
  padding: 14px;
}

.section-tabs,
.editor-tabs {
  padding: 4px;
}

.section-tab,
.editor-tab {
  min-height: 29px;
  padding: 5px 10px;
  font-weight: 400;
}

.multi-select-trigger {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
}

.multi-select-menu {
  padding: 5px;
  border-radius: 8px;
}

.multi-select-option {
  gap: 7px;
  padding: 7px;
}

.multi-select-check {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

@media (max-width: 1180px) {
  .student-finance-row {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 680px) {
  .student-finance-row {
    grid-template-columns: 1fr;
  }
}

.check {
  min-height: 30px;
  padding: 5px 8px;
}

.login-page,
.exam-page {
  padding: 14px;
}

.login-card,
.exam-card {
  padding: 16px;
}

@media (max-width: 960px) {
  .sidebar {
    width: auto;
    max-width: calc(100vw - 24px);
    min-width: 0;
    padding: 5px;
    border-radius: 14px;
    overscroll-behavior-x: contain;
  }

  .nav-button {
    min-width: 64px;
    padding: 6px;
    font-size: 10px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  h1 {
    font-size: 19px;
  }

  h2 {
    font-size: 15px;
  }

  .panel {
    padding: 11px;
  }
}

.brand,
.brand:has(.brand-logo) {
  min-height: 40px;
  justify-content: center;
  padding-left: 54px;
}

.brand-logo {
  width: 40px;
  height: 40px;
}

.userbar {
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-color: rgba(191, 210, 235, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.user-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.userbar-name {
  min-width: 0;
  max-width: 160px;
}

.userbar-name strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.userbar .btn.small {
  min-height: 28px;
  padding: 7px 10px;
  border-radius: 999px;
}
