:root {
  --brand: #0d6efd;
  --soft: #f6f8fb;
  --card-radius: 18px;
  --border-soft: rgba(16, 24, 40, 0.06);
  --border-medium: rgba(16, 24, 40, 0.08);
  --text-muted: #64748b;
}

body {
  font-family: "Cairo", sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 10%, #eef4ff, transparent),
    radial-gradient(900px 500px at 90% 20%, #f3f0ff, transparent),
    var(--soft);
  min-height: 100vh;
}

.page-wrap {
  padding: 18px 0 50px;
}

@media (min-width: 992px) {
  .page-wrap {
    padding: 24px 0 60px;
  }
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(13, 110, 253, 0.1);
  border: 1px solid rgba(13, 110, 253, 0.18);
  border-radius: 999px;
  color: #0b5ed7;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.12);
}

.brand-dot--plain {
  box-shadow: none;
}

.main-card {
  border: 0;
  border-radius: var(--card-radius);
  box-shadow: 0 12px 35px rgba(16, 24, 40, 0.1);
  overflow: hidden;
}

.card-header-soft {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(111, 66, 193, 0.1));
  border-bottom: 1px solid var(--border-soft);
}

.section {
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: #fff;
}

@media (min-width: 992px) {
  .section {
    padding: 18px;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.04);
  border: 1px solid var(--border-soft);
  font-weight: 800;
  white-space: nowrap;
}

.mono {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
}

.gate {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.gate.is-open {
  display: flex;
}

.gate-card {
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.gate-head {
  padding: 18px;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.14), rgba(111, 66, 193, 0.1));
  border-bottom: 1px solid var(--border-soft);
}

.gate-body {
  padding: 18px;
}

.gate-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft);
}

.table thead th {
  font-weight: 800;
  background: rgba(13, 110, 253, 0.06);
  white-space: nowrap;
  vertical-align: middle;
}

.table-responsive {
  border-radius: 14px;
}

.teacher-card {
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.06);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-medium);
}

.kv:last-child {
  border-bottom: none;
}

.kv .k {
  color: var(--text-muted);
  font-weight: 700;
}

.kv .v {
  font-weight: 800;
  text-align: left;
}

.btns {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btns .btn {
  flex: 1;
  border-radius: 12px;
}

.btns.flex-column .btn {
  width: 100%;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.top-actions .btn {
  border-radius: 12px;
}

@media (max-width: 576px) {
  .top-actions {
    justify-content: stretch;
  }

  .top-actions > * {
    flex: 1 1 auto;
  }

  .top-actions .pill {
    width: 100%;
    justify-content: center;
  }
}

.teacher-main-name {
  font-weight: 800;
  color: #0f172a;
}

.teacher-sub {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-stack .btn {
  width: 100%;
  border-radius: 12px;
}

.actions-col {
  width: 110px;
}

.modal-rounded {
  border-radius: 16px;
}

.modal-footer-split {
  display: flex;
  justify-content: space-between;
}

#btnDelete {
  display: none;
}
#importResultBox .table th {
  white-space: nowrap;
  width: 180px;
}