: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;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

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);
}

.session-pill {
  max-width: 120px;
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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-group + .nav-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.76);
}

.nav-group-title {
  padding: 4px 10px 7px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.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: 600;
  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: #ffffff;
}

.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 {
  --modal-padding: 22px;
  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);
}

.modal-card.modal-wide {
  margin-left: auto;
  margin-right: 0;
  border-radius: 22px 0 0 22px;
}

.modal-card > .panel-header:first-child {
  position: sticky;
  top: calc(-1 * var(--modal-padding));
  z-index: 2;
  margin: calc(-1 * var(--modal-padding)) calc(-1 * var(--modal-padding)) 18px;
  padding: 18px var(--modal-padding) 12px;
  border-bottom: 1px solid rgba(219, 229, 242, 0.82);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.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.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.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;
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.dashboard-hero-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 17px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.dashboard-hero-card.primary {
  border-color: rgba(96, 165, 250, 0.55);
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 44%), #ffffff;
}

.dashboard-hero-card.success {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}

.dashboard-hero-card.danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.dashboard-hero-card span,
.analytics-pill span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-hero-card strong {
  color: var(--text);
  font-size: 22px;
}

.dashboard-hero-card small,
.course-health-item span {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
}

.alert-card-list,
.course-health-list {
  display: grid;
  gap: 8px;
}

.alert-card,
.course-health-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 13px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.alert-card {
  border-color: #fed7aa;
  background: #fff7ed;
}

.alert-card span {
  color: var(--warning);
  font-size: 11px;
  font-weight: 700;
}

.course-health-item strong,
.course-health-item span {
  display: block;
}

.course-health-item > span {
  font-weight: 800;
}

.course-health-item > span.success {
  color: #047857;
}

.course-health-item > span.danger {
  color: var(--danger);
}

.analytics-pill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.analytics-pill {
  padding: 12px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 13px;
  background: #f8fafc;
}

.analytics-pill.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.analytics-pill.danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.analytics-pill strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.student-profile-header {
  align-items: flex-start;
}

.student-profile-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-photo-preview {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-secondary));
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.student-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-sections {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-section {
  padding: 13px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 16px;
  background: #fbfdff;
}

.profile-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.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;
}

.permission-note {
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #92400e;
  font-size: 11px;
}

.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);
}

.check-card.sensitive {
  border-color: #fed7aa;
  background: #fff7ed;
}

.check-card.sensitive small {
  color: #b45309;
}

.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;
}

.payment-tabs {
  width: 100%;
  max-width: 760px;
  border-radius: 18px;
}

.payment-tabs .section-tab {
  flex: 1 1 86px;
  padding-inline: 12px;
}

.finance-overview-panel {
  display: grid;
  gap: 13px;
}

.finance-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.finance-hero-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 15px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    #ffffff;
}

.finance-hero-card.primary {
  border-color: rgba(96, 165, 250, 0.5);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.11), rgba(255, 255, 255, 0.96));
}

.finance-hero-card.danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7f7, #ffffff);
}

.finance-hero-card.warning {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.finance-hero-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.finance-hero-card strong {
  color: var(--text);
  font-size: 22px;
}

.finance-hero-card small {
  color: var(--muted);
  line-height: 1.45;
}

.compact-finance-summary {
  margin: 0;
}

.compact-finance-summary .finance-card {
  padding: 12px;
}

.compact-finance-summary .finance-card strong {
  font-size: 16px;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.quick-action-card {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 15px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.quick-action-card:hover {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.quick-action-card strong {
  font-size: 12px;
}

.quick-action-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.dashboard-search-panel {
  display: grid;
  gap: 10px;
}

.dashboard-search-input {
  min-height: 42px;
  border-radius: 14px;
  font-size: 12px;
}

.quick-search-results,
.notification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.quick-search-card,
.notification-tile {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(219, 229, 242, 0.95);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.quick-search-card span {
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-search-card strong,
.notification-tile strong {
  font-size: 12px;
}

.quick-search-card small,
.notification-tile span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.notification-tile.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.notification-tile.danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.workflow-grid,
.report-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.workflow-card,
.report-hub-card {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 15px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.workflow-card:hover,
.report-hub-card:hover,
.report-hub-card.active {
  border-color: rgba(96, 165, 250, 0.58);
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.workflow-card strong,
.report-hub-card strong {
  font-size: 12px;
}

.workflow-card span,
.report-hub-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.student-home-hero {
  overflow: hidden;
  position: relative;
}

.student-home-hero::after {
  content: "";
  position: absolute;
  right: -56px;
  top: -72px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(56, 189, 248, 0.18));
  pointer-events: none;
}

.student-hero-content,
.student-dashboard-grid,
.student-home-grid,
.student-exam-grid,
.student-meta-row {
  display: grid;
  gap: 12px;
}

.student-hero-content {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 14px;
}

.student-eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.student-profile-chip {
  display: grid;
  gap: 2px;
  min-width: 128px;
  padding: 10px 12px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  text-align: right;
}

.student-profile-chip span {
  color: var(--muted);
  font-size: 11px;
}

.student-home-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-kpi-card,
.student-focus-card,
.student-exam-card {
  border: 1px solid rgba(219, 229, 242, 0.92);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-soft);
}

.student-kpi-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 132px;
  padding: 14px;
}

.student-kpi-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.student-kpi-card strong,
.student-big-number {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.student-kpi-card.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #38bdf8);
}

.student-kpi-card.primary span {
  color: rgba(255, 255, 255, 0.82);
}

.student-kpi-card.success {
  border-color: rgba(21, 128, 61, 0.18);
  background: #f0fdf4;
}

.student-kpi-card.danger {
  border-color: rgba(220, 38, 38, 0.2);
  background: #fff7f7;
}

.student-dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  margin-bottom: 16px;
}

.student-focus-card {
  padding: 16px;
}

.student-focus-card h3,
.student-exam-card h3 {
  margin: 0 0 6px;
}

.student-meta-row {
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.student-meta-row span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

.student-exam-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.student-exam-card.live {
  border-color: rgba(220, 38, 38, 0.16);
  background: linear-gradient(180deg, #fff7f7, #ffffff);
}

.quiz-editor-summary,
.result-hub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.quiz-editor-summary div {
  padding: 10px 12px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 12px;
  background: #f8fafc;
}

.quiz-editor-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quiz-editor-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.result-tabs {
  margin-top: 13px;
}

.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;
}

.backup-safety {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #92400e;
}

.backup-safety strong,
.export-center-card strong {
  font-size: 12px;
}

.backup-safety span,
.export-center-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.export-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.export-center-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.export-center-card > div:first-child {
  display: grid;
  gap: 3px;
}

.student-filter {
  grid-template-columns: minmax(0, 1fr) auto;
}

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

.filter-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.table-toolbar > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.toolbar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 800;
}

.toolbar-chip.success {
  background: #dcfce7;
  color: #047857;
}

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

.export-action {
  position: relative;
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.export-action::before {
  content: attr(data-format);
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.mini-stat {
  padding: 11px 12px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 12px;
  background: #ffffff;
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.mini-stat.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.mini-stat.danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.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::before {
  content: "!";
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--warning);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

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

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.confirm-actions .btn {
  min-width: 130px;
}

.confirm-actions .btn.danger {
  order: 2;
}

.confirm-actions .btn.secondary {
  order: 1;
  background: #f8fafc;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.confirm-actions .btn.secondary:hover {
  background: #eef2f7;
}

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

.form-section {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(219, 229, 242, 0.9);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.88));
}

.form-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

.form-section-title strong {
  color: var(--text);
  font-size: 12px;
}

.form-section-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.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;
  position: relative;
}

.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;
  transition: color 0.18s ease;
}

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;
}

.required-field > span::after {
  content: " *";
  color: var(--danger);
}

.field:focus-within > span {
  color: var(--brand-strong);
}

.readonly-field input,
.readonly-field select,
.readonly-field textarea,
input:read-only:not([type="file"]),
textarea:read-only {
  background: #f8fafc;
  color: #475569;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(148, 163, 184, 0.52);
  background: #ffffff;
}

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 {
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: linear-gradient(135deg, var(--danger), #fb7185);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

button[data-action*="delete"],
button[data-action*="cancel-payment"],
button[data-action*="cancel-exam"] {
  border-color: rgba(220, 38, 38, 0.18);
}

.btn:disabled,
.btn.is-busy {
  cursor: wait;
  opacity: 0.72;
  filter: saturate(0.86);
}

.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: 1px solid rgba(219, 229, 242, 0.86);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.smart-table {
  background: #fff;
}

.smart-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  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;
}

tbody tr:last-child td {
  border-bottom: 0;
}

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);
}

tbody tr[hidden] {
  display: none;
}

td .actions {
  gap: 6px;
}

td .btn.small {
  min-height: 28px;
  padding: 5px 9px;
}

.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;
}

.btn.ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--brand-strong);
}

.student-table th:nth-child(1) {
  width: 28%;
}

.student-table th:nth-child(2) {
  width: 30%;
}

.student-table th:nth-child(3) {
  width: 18%;
}

.student-cell {
  display: grid;
  gap: 3px;
}

.student-cell strong {
  font-size: 12px;
}

.student-cell span,
.student-cell small,
.fee-status-block span {
  color: var(--muted);
  font-size: 11px;
}

.fee-status-block {
  display: grid;
  gap: 4px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 120px;
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.74);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 12px;
}

.empty-state span {
  font-size: 11px;
}

.empty-state::before {
  content: "No Data";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.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.88);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  display: grid;
  gap: 9px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.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: 36px;
  padding: 7px 10px;
}

.question-card textarea {
  min-height: 58px;
  padding: 9px 10px;
  resize: vertical;
}

.question-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 2px 0 4px;
}

.question-toolbar h3 {
  align-self: center;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.question-toolbar-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 132px auto;
  gap: 10px;
  align-items: center;
}

.question-toolbar-controls .field {
  min-width: 0;
  gap: 4px;
}

.question-card .question-toolbar-controls .field span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.question-toolbar-controls .mark-field input {
  text-align: center;
}

.question-toolbar-controls input,
.question-toolbar-controls select,
.question-action-group {
  min-height: 44px;
  border-radius: 14px;
}

.question-action-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.question-action-group .btn {
  min-height: 34px;
  border: 1px solid #d7e5f7;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.question-action-group .equation-open-btn {
  min-height: 44px;
  padding-inline: 14px;
  border-radius: 14px;
  background: #eef5ff;
  color: var(--brand-strong);
  white-space: nowrap;
}

.question-remove-btn {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  background: #f8fbff;
  font-size: 18px;
  line-height: 1;
}

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

.question-select input {
  width: auto;
}

.question-meta-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.7fr);
  gap: 9px;
}

.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: 8px;
  padding-left: 0;
}

.choice-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-weight: 600;
  border-radius: 12px;
  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: 36px;
  padding: 7px 10px;
}

.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;
}

.math-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 6px;
}

.math-toolbar .btn.small {
  min-width: 42px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.math-preview {
  min-height: 0;
  max-height: 86px;
  overflow: auto;
  padding: 7px 10px;
  border: 1px solid rgba(203, 213, 225, 0.62);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(255, 255, 255, 0.96));
  color: var(--muted);
  line-height: 1.45;
}

.math-preview.is-empty {
  display: none;
}

.preview-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.math-inline-wrap {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
}

.math-display-wrap {
  display: block;
  margin: 5px 0;
  overflow-x: auto;
}

.math-inline,
.math-chip {
  display: inline-block;
  padding: 0 3px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
}

.math-chip {
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.equation-mark-cell {
  display: grid;
  grid-template-columns: minmax(68px, 1fr) auto;
  gap: 7px;
  align-items: end;
}

.equation-open-btn {
  min-height: 36px;
  margin-bottom: 0;
  padding-inline: 10px;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 11px;
}

.question-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

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

.question-extra {
  min-width: 0;
  border: 1px solid rgba(203, 213, 225, 0.62);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.72);
}

.question-extra summary {
  min-height: 34px;
  padding: 8px 10px;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style-position: inside;
}

.question-extra[open] {
  padding-bottom: 8px;
}

.question-extra[open] summary {
  border-bottom: 1px solid rgba(203, 213, 225, 0.55);
  margin-bottom: 8px;
}

.question-extra .field {
  padding: 0 8px;
}

.question-extra textarea {
  min-height: 58px;
}

.equation-backdrop {
  align-items: center;
}

.equation-modal {
  width: min(960px, calc(100vw - 24px));
}

.equation-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
  gap: 14px;
}

.equation-compose {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.equation-mathfield {
  display: block;
  min-height: 92px;
  padding: 12px;
  border: 2px solid rgba(37, 99, 235, 0.42);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 24px;
  box-shadow:
    inset 0 1px 0 rgba(15, 23, 42, 0.04),
    0 0 0 4px rgba(37, 99, 235, 0.055);
}

.equation-mathfield::part(placeholder) {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  border: 1px dashed rgba(37, 99, 235, 0.55);
  border-radius: 4px;
}

.equation-hint {
  margin-top: 6px;
  line-height: 1.45;
}

.equation-palette {
  display: grid;
  gap: 9px;
  max-height: 310px;
  overflow: auto;
  padding-right: 2px;
}

.equation-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.equation-group:nth-child(2) {
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.equation-group strong {
  color: var(--text);
  font-size: 12px;
}

.equation-symbol-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.equation-symbol {
  min-width: 42px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(191, 210, 235, 0.86);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  color: var(--brand-strong);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 800;
}

.equation-symbol:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.equation-preview-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.equation-live-preview {
  min-height: 128px;
  overflow-x: auto;
  padding: 14px 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  display: grid;
  place-items: center;
}

@media (max-width: 860px) {
  .equation-workspace {
    grid-template-columns: 1fr;
  }

  .equation-palette {
    max-height: 230px;
  }
}

@media (max-width: 620px) {
  .equation-mark-cell {
    grid-template-columns: 1fr;
  }

  .equation-open-btn {
    width: 100%;
  }

  .equation-modal {
    width: calc(100vw - 14px);
    max-height: calc(100vh - 18px);
    overflow: auto;
  }
}

.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;
}

.timeline-list {
  display: grid;
  gap: 8px;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 10px 12px 10px 32px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffff;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.timeline-item.success::before {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.timeline-item.warning::before {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.timeline-item.danger::before {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.timeline-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.timeline-item strong {
  font-size: 12px;
}

.timeline-item small {
  color: var(--muted);
  line-height: 1.45;
}

.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));
}

.bar-row.danger .bar span {
  background: linear-gradient(90deg, #f97316, var(--danger));
}

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

.toast-stack {
  position: sticky;
  top: 82px;
  z-index: 9;
  display: grid;
  gap: 8px;
}

.message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: var(--brand-strong);
  box-shadow: var(--shadow-soft);
}

.message strong {
  font-size: 11px;
}

.message span {
  color: inherit;
  font-size: 12px;
  line-height: 1.35;
}

.toast-close {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: inherit;
}

.message.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: var(--danger);
}

.message.error .toast-close {
  background: rgba(220, 38, 38, 0.1);
}

.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-toolbar {
    grid-template-columns: 1fr;
  }

  .question-toolbar-controls {
    grid-template-columns: minmax(180px, 1fr) 120px auto;
  }
}

@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,
  .question-toolbar,
  .question-toolbar-controls {
    grid-template-columns: 1fr;
  }

  .question-remove-btn,
  .equation-open-btn {
    width: 100%;
  }

  .question-action-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .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 {
  --modal-padding: 14px;
  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));
  }

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

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

  .student-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .dashboard-hero-grid,
  .dashboard-split,
  .analytics-pill-grid {
    grid-template-columns: 1fr;
  }

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

  .finance-hero-grid,
  .student-filter,
  .report-filter,
  .export-center-grid,
  .quick-search-results,
  .notification-grid {
    grid-template-columns: 1fr;
  }

  .student-hero-content,
  .student-home-grid,
  .student-exam-grid,
  .student-meta-row {
    grid-template-columns: 1fr;
  }

  .student-profile-chip {
    text-align: left;
  }

  .student-kpi-card {
    min-height: auto;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions .btn {
    flex: 1;
  }

  .table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 9px;
  }

  .table-wrap tr {
    overflow: hidden;
    border: 1px solid rgba(219, 229, 242, 0.9);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 34px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(219, 229, 242, 0.78);
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .table-wrap td[colspan] {
    grid-template-columns: 1fr;
  }

  .table-wrap td[colspan]::before {
    display: none;
  }

  .table-wrap td .actions {
    justify-content: flex-start;
  }

  .actions {
    gap: 6px;
  }

  .actions .btn,
  .export-center-card .btn,
  .report-filter .btn {
    min-height: 30px;
    white-space: normal;
  }
}

.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;
  }

  .modal-backdrop {
    align-items: start;
    padding: 8px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .modal-card > .panel-header:first-child {
    margin-bottom: 12px;
  }
}

.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;
}
