*{box-sizing:border-box}body.app-shell,body.dashboard-page{margin:0;font-family:Tahoma,Arial,sans-serif;color:#0f172a;background:#f1f5f9}.auth-layout{min-height:100vh;display:grid;place-items:center;padding:2rem;background:radial-gradient(circle at top right,#dbeafe,transparent 36%),#f8fafc}.auth-card{width:min(100%,520px);padding:2.2rem;border:1px solid #dbeafe;border-radius:24px;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.12)}.wide-card{width:min(100%,620px)}.brand-link{display:inline-block;font-weight:800;color:#1d4ed8;text-decoration:none}.eyebrow{color:#2563eb;font-weight:700}.stack-form{display:grid;gap:.7rem;margin-top:1.3rem}.stack-form label{font-weight:700;display:grid;gap:.35rem}.stack-form input,.stack-form select,.stack-form textarea,.filter-bar input,.filter-bar select,.upload-form input,.upload-form select{width:100%;padding:.78rem;border:1px solid #cbd5e1;border-radius:10px;font:inherit}.form-error,.form-message{padding:.75rem;border-radius:10px;background:#fee2e2;color:#991b1b}.form-message{background:#dcfce7;color:#166534}.is-error{background:#fee2e2!important;color:#991b1b!important}.muted{color:#64748b;font-size:.9rem}.dashboard-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 5%;background:#fff;border-bottom:1px solid #e2e8f0}.dashboard-header nav{display:flex;align-items:center;gap:1rem}.dashboard-header nav a,.link-button{color:#1d4ed8;text-decoration:none;background:none;border:0;font:inherit;cursor:pointer}.dashboard-main{width:min(1180px,92%);margin:2rem auto 4rem}.dashboard-intro h1{margin:.2rem 0}.level-tabs{display:flex;gap:.75rem;flex-wrap:wrap;margin:1.4rem 0}.level-btn{border:1px solid #bfdbfe;background:#fff;color:#1e3a8a;padding:.65rem 1rem;border-radius:999px;cursor:pointer}.level-btn.is-active{background:#1d4ed8;color:#fff;border-color:#1d4ed8}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.summary-card{padding:1.25rem;border-radius:16px;color:#fff;display:grid;gap:.35rem}.summary-card strong{font-size:2rem}.blue{background:#2563eb}.green{background:#16a34a}.red{background:#dc2626}.filter-bar,.upload-form{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap;margin:1.25rem 0}.filter-bar input{flex:2}.filter-bar select{flex:1}.table-card,.upload-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:1.2rem;margin-top:1.25rem;box-shadow:0 6px 20px rgba(15,23,42,.04)}.table-title{display:flex;justify-content:space-between;gap:1rem;align-items:center}.secondary-action{color:#1d4ed8;text-decoration:none}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:800px}th,td{padding:.9rem;border-bottom:1px solid #e2e8f0;text-align:right}th{color:#475569;font-size:.9rem}.upload-form>*{flex:1}.modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:grid;place-items:center;padding:1rem;z-index:30}.modal[hidden]{display:none}.modal-card{width:min(100%,560px);background:#fff;border-radius:18px;padding:1.5rem;position:relative}.modal-close{position:absolute;top:.6rem;left:.7rem;border:0;background:#e2e8f0;border-radius:50%;width:2rem;height:2rem;font-size:1.25rem;cursor:pointer}.attendance-list{padding:0;list-style:none}.attendance-list li{padding:.75rem;border-bottom:1px solid #e2e8f0}.toast{position:fixed;left:1rem;bottom:1rem;background:#0f172a;color:#fff;padding:.8rem 1rem;border-radius:10px;z-index:40}@media(max-width:700px){.summary-grid{grid-template-columns:1fr}.dashboard-header{padding:1rem 4%}.filter-bar,.upload-form{align-items:stretch;flex-direction:column}}


/* Parent login: polished unregistered-phone dialog */
.parent-login-modal[hidden] {
  display: none;
}

.parent-login-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.parent-login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
  animation: parentModalFade 0.22s ease both;
}

.parent-login-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 27rem);
  padding: 2.15rem 1.65rem 1.45rem;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(219, 234, 254, 0.95);
  border-radius: 1.55rem;
  background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28), 0 5px 18px rgba(37, 99, 235, 0.12);
  animation: parentModalRise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.parent-login-dialog::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.28rem;
  content: "";
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.parent-login-modal-close {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  border: 0;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.parent-login-modal-close:hover {
  color: #1e3a8a;
  background: #dbeafe;
  transform: rotate(8deg);
}

.parent-login-alert-icon {
  display: grid;
  width: 4.4rem;
  height: 4.4rem;
  margin: 0 auto 0.9rem;
  place-items: center;
  color: #d97706;
  background: #fff7ed;
  border: 0.55rem solid #ffedd5;
  border-radius: 1.35rem;
}

.parent-login-alert-icon svg {
  width: 2rem;
  height: 2rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.parent-login-dialog-kicker {
  margin: 0;
  color: #2563eb;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.parent-login-dialog h2 {
  margin: 0.35rem 0 0;
  color: #0f172a;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 800;
}

.parent-login-dialog-text {
  margin: 0.8rem auto 1.35rem;
  max-width: 22rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.85;
}

.parent-register-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 0.95rem;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.parent-register-action:hover {
  box-shadow: 0 15px 28px rgba(37, 99, 235, 0.32);
  transform: translateY(-0.15rem);
}

.parent-register-action span:last-child {
  font-family: Arial, sans-serif;
  font-size: 1.2rem;
  transition: transform 0.25s ease;
}

.parent-register-action:hover span:last-child {
  transform: translateX(-0.25rem);
}

.parent-login-dialog-secondary {
  margin-top: 0.75rem;
  padding: 0.35rem 0.7rem;
  color: #64748b;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.parent-login-dialog-secondary:hover {
  color: #1d4ed8;
}

.confirmation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .confirmation-actions {
    grid-template-columns: 1fr;
  }
}

.parent-login-dialog-close:focus-visible,
.parent-login-modal-close:focus-visible,
.parent-register-action:focus-visible,
.parent-login-dialog-secondary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

@keyframes parentModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes parentModalRise {
  from { opacity: 0; transform: translateY(1rem) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 35rem) {
  .parent-login-dialog {
    padding: 2rem 1.15rem 1.2rem;
    border-radius: 1.3rem;
  }

  .parent-login-dialog-text {
    font-size: 0.84rem;
  }
}

body.parent-login-modal-open {
  overflow: hidden;
}


.university-card-field {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.8rem;
}

.university-card-field[hidden] {
  display: none;
}

.university-card-field small {
  color: #64748b;
  font-size: 0.76rem;
}

.university-dashboard-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.university-dashboard-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.card-view-btn,
.delete-student-btn {
  border: 0;
  border-radius: 0.55rem;
  color: #ffffff;
  padding: 0.42rem 0.62rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-view-btn {
  background: #2563eb;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.18);
}

.delete-student-btn {
  background: #dc2626;
  box-shadow: 0 5px 12px rgba(220, 38, 38, 0.16);
}

.card-view-btn:hover,
.delete-student-btn:hover {
  transform: translateY(-0.1rem);
}

.card-view-btn:hover {
  background: #1d4ed8;
}

.delete-student-btn:hover {
  background: #b91c1c;
}

.card-photo-cell,
.muted-cell {
  white-space: nowrap;
}

.muted-cell {
  color: #94a3b8;
  font-size: 0.78rem;
}

.student-card-preview-modal {
  z-index: 70;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(7px);
}

.student-card-preview-card {
  display: grid;
  width: min(100%, 48rem);
  max-height: min(92vh, 54rem);
  gap: 0.75rem;
  padding: 1.45rem;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.student-card-preview-card h2,
.student-card-preview-card p {
  margin: 0;
}

.student-card-preview-status {
  min-height: 1.45rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.student-card-preview-status.is-error { color: #b91c1c; }

.student-card-preview-frame {
  display: grid;
  min-height: 12rem;
  max-height: min(67vh, 38rem);
  place-items: center;
  overflow: auto;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
}

.student-card-preview-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(min(67vh, 38rem) - 1.5rem);
  object-fit: contain;
  border-radius: 0.55rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

@media (max-width: 700px) {
  .student-card-preview-card {
    width: calc(100vw - 1rem);
    max-height: 94dvh;
    padding: 1.1rem;
    border-radius: 1rem;
  }

  .student-card-preview-frame {
    max-height: 67dvh;
    min-height: 10rem;
  }

  .student-card-preview-frame img {
    max-height: calc(67dvh - 1.5rem);
  }
}


/* Firebase phone verification on registration */
.register-intro {
  margin: -0.2rem 0 1.35rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.75;
}

.field-hint {
  color: #64748b;
  font-size: 0.77rem;
  font-weight: 600;
}

.phone-verification-section,
.registration-details {
  display: grid;
  gap: 0.82rem;
  padding: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  background: linear-gradient(145deg, #f8fbff 0%, #eff6ff 100%);
}

.registration-details {
  border-color: #dbeafe;
  background: #ffffff;
}

.registration-details[hidden],
.otp-section[hidden] {
  display: none;
}

.verification-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.verification-heading h2 {
  margin: 0;
  color: #1e3a8a;
  font-size: 1rem;
}

.verification-heading p {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.65;
}

.verification-step {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.22);
}

.verification-button {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.verification-button:hover:not(:disabled) {
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.3);
  transform: translateY(-0.08rem);
}

.verification-button:disabled,
.cta-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

.verification-button-secondary {
  color: #1e3a8a;
  background: #ffffff;
  border: 1px solid #93c5fd;
  box-shadow: none;
}

.verification-button-secondary:hover:not(:disabled) {
  color: #ffffff;
  background: #1d4ed8;
}

.otp-section {
  display: grid;
  gap: 0.72rem;
  padding-top: 0.15rem;
}

#verification-code {
  direction: ltr;
  letter-spacing: 0.38em;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.verification-message,
.verification-success {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.6;
}

.verification-message {
  color: #1e40af;
  background: #dbeafe;
}

.verification-message.is-error {
  color: #991b1b;
  background: #fee2e2;
}

.verification-success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

#parent-phone[readonly] {
  color: #166534;
  background: #f0fdf4;
  border-color: #86efac;
}

@media (max-width: 32rem) {
  .phone-verification-section,
  .registration-details {
    padding: 0.85rem;
  }
}

/* Guardian PIN fields */
.pin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.pin-fields label {
  min-width: 0;
}

.pin-fields input,
#parent-pin {
  direction: ltr;
  letter-spacing: 0.24em;
  text-align: center;
}

@media (max-width: 560px) {
  .pin-fields {
    grid-template-columns: 1fr;
  }
}

/* Teacher dashboard — Bento workspace */
.teacher-dashboard-page {
  min-height: 100vh;
  color: #152238;
  background:
    radial-gradient(circle at 88% 0%, rgba(147, 197, 253, 0.42), transparent 29rem),
    radial-gradient(circle at 8% 26%, rgba(219, 234, 254, 0.7), transparent 25rem),
    #f5f7fb;
}

.teacher-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.8rem;
  padding: 0.8rem max(5vw, 1.25rem);
  border-bottom: 1px solid rgba(203, 213, 225, 0.76);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.teacher-brand,
.teacher-brand:hover {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: #152238;
  text-decoration: none;
}

.teacher-brand-mark {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  color: #fff;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0f3f9c, #2777e8);
  box-shadow: 0 0.6rem 1.25rem rgba(37, 99, 235, 0.22);
  font-size: 1.17rem;
  font-weight: 900;
}

.teacher-brand strong,
.teacher-brand small {
  display: block;
}

.teacher-brand strong { font-size: 0.98rem; }
.teacher-brand small { margin-top: 0.08rem; color: #64748b; font-size: 0.69rem; font-weight: 700; }

.teacher-topbar-actions { display: flex; align-items: center; gap: 0.65rem; }
.teacher-presence,
.topbar-studio-link,
.topbar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.78rem;
  border-radius: 0.72rem;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 800;
  text-decoration: none;
}
.teacher-presence { color: #166534; background: #ecfdf5; }
.teacher-presence i,
.table-status i { width: 0.43rem; height: 0.43rem; margin-left: 0.38rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.15); }
.topbar-studio-link { color: #fff; background: #173d89; box-shadow: 0 0.48rem 1rem rgba(23, 61, 137, 0.18); }
.topbar-studio-link:hover { color: #fff; background: #0f2f71; }
.topbar-logout { color: #475569; background: transparent; border: 1px solid #dbe3ee; cursor: pointer; }
.topbar-logout:hover { color: #b91c1c; border-color: #fecaca; background: #fff5f5; }

.teacher-workspace { width: min(1220px, 92%); margin: 0 auto; padding: 2.4rem 0 4.5rem; }
.teacher-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding: 0.2rem 0 1.55rem; }
.teacher-welcome .eyebrow { margin: 0 0 0.5rem; letter-spacing: 0.03em; }
.teacher-welcome h1 { margin: 0; color: #102345; font-size: clamp(1.72rem, 4vw, 2.42rem); line-height: 1.25; }
.teacher-welcome p:not(.eyebrow) { max-width: 37rem; margin: 0.62rem 0 0; color: #64748b; font-size: 0.94rem; line-height: 1.8; }
.welcome-side { display: grid; justify-items: end; gap: 0.7rem; flex: 0 0 auto; }
.dashboard-date { color: #64748b; font-size: 0.76rem; font-weight: 700; }
.welcome-live-cta { display: inline-flex; align-items: center; gap: 0.52rem; min-height: 2.85rem; padding: 0.7rem 1rem; color: #fff; border-radius: 0.82rem; background: linear-gradient(135deg, #2563eb, #1746ad); box-shadow: 0 0.65rem 1.45rem rgba(37, 99, 235, 0.22); font-size: 0.84rem; font-weight: 800; text-decoration: none; }
.welcome-live-cta:hover { color: #fff; transform: translateY(-1px); }
.teacher-dashboard-error { margin: 0 0 1rem; }

.teacher-bento-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.bento-card { position: relative; min-height: 11.8rem; padding: 1.35rem; overflow: hidden; border: 1px solid rgba(203, 213, 225, 0.8); border-radius: 1.35rem; background: rgba(255, 255, 255, 0.9); box-shadow: 0 0.65rem 1.8rem rgba(15, 23, 42, 0.045); transition: transform 0.22s ease, box-shadow 0.22s ease; }
.bento-card:hover { box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, 0.08); transform: translateY(-2px); }
.bento-live-card { grid-column: span 5; color: #fff; border-color: #123e94; background: linear-gradient(135deg, #0b2f77, #1253bf 68%, #2e79e8); box-shadow: 0 1rem 2rem rgba(30, 78, 168, 0.24); }
.bento-live-card::after { position: absolute; top: -5rem; left: -3.4rem; width: 14rem; height: 14rem; content: ""; border: 1.5rem solid rgba(191, 219, 254, 0.11); border-radius: 50%; }
.bento-stats-card { grid-column: span 4; }
.bento-payment-card { grid-column: span 3; background: linear-gradient(160deg, #fffdf7, #fff); }
.bento-subject-card,
.bento-quick-card,
.bento-activity-card { grid-column: span 4; }
.bento-subject-card { background: linear-gradient(155deg, #f7fbff, #fff); }
.bento-quick-card { background: #102d69; border-color: #102d69; color: #fff; }
.bento-activity-card { background: linear-gradient(155deg, #fbf8ff, #fff); }
.bento-card-heading { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.bento-kicker { color: #64748b; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.04em; }
.bento-live-card .bento-kicker,
.bento-quick-card .bento-kicker { color: rgba(219, 234, 254, 0.87); }
.bento-card-index { color: #94a3b8; font-family: Arial, sans-serif; font-size: 0.72rem; font-weight: 800; }
.live-ready-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 0.28rem rgba(94, 234, 212, 0.16); }
.bento-live-card h2,
.bento-subject-card h2,
.bento-activity-card h2 { position: relative; z-index: 1; margin: 1rem 0 0.38rem; font-size: 1.28rem; }
.bento-live-card p,
.bento-subject-card p,
.bento-activity-card p { position: relative; z-index: 1; margin: 0; color: #64748b; font-size: 0.79rem; line-height: 1.75; }
.bento-live-card p { max-width: 16rem; color: rgba(239, 246, 255, 0.84); }
.bento-primary-action { position: relative; z-index: 1; display: inline-flex; gap: 0.42rem; align-items: center; margin-top: 1.15rem; padding: 0.6rem 0.78rem; color: #11316e; border-radius: 0.67rem; background: #fff; font-size: 0.76rem; font-weight: 900; text-decoration: none; }
.bento-primary-action:hover { color: #0f2f71; background: #eff6ff; }
.bento-level-pill { padding: 0.32rem 0.52rem; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; font-size: 0.66rem; font-weight: 800; }
.bento-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.35rem; }
.bento-stat-row div { padding: 0.72rem; border-radius: 0.82rem; background: #f8fbff; }
.bento-stat-row span,
.payment-bento-values span { display: block; color: #64748b; font-size: 0.7rem; font-weight: 700; }
.bento-stat-row strong,
.payment-bento-values strong { display: block; margin-top: 0.28rem; color: #153a7b; font-family: Arial, sans-serif; font-size: 1.62rem; line-height: 1; }
.bento-mini-legend { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; margin-top: 0.8rem; color: #64748b; font-size: 0.67rem; font-weight: 700; }
.legend-dot { display: inline-block; width: 0.44rem; height: 0.44rem; margin-left: 0.25rem; border-radius: 50%; }.legend-blue { background: #2563eb; }
.payment-bento-values { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.3rem; }.payment-bento-values div { padding: 0.55rem 0; }.payment-bento-values div + div { padding-right: 0.72rem; border-right: 1px solid #e2e8f0; }.payment-bento-values strong { color: #0f766e; }.payment-bento-values div + div strong { color: #b45309; }
.payment-progress-track { width: 100%; height: 0.43rem; margin-top: 0.55rem; overflow: hidden; border-radius: 999px; background: #f1f5f9; }.payment-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0f766e, #34d399); transition: width 0.45s ease; }.bento-payment-card p { margin: 0.65rem 0 0; color: #64748b; font-size: 0.68rem; font-weight: 700; }
.subject-stat-list { display: grid; gap: 0.48rem; margin: 0.9rem 0; }.subject-stat-list div { display: flex; align-items: center; gap: 0.45rem; color: #475569; font-size: 0.77rem; font-weight: 800; }.subject-stat-list strong { margin-right: auto; color: #173d89; font-family: Arial, sans-serif; font-size: 1rem; }.subject-bullet { width: 0.54rem; height: 0.54rem; border-radius: 50%; }.subject-math { background: #2563eb; }.subject-physics { background: #9333ea; }
.quick-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.58rem; margin-top: 1.1rem; }.quick-action-grid a,.quick-action-grid button { display: flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: 0.45rem; color: #e0edff; border: 1px solid rgba(191, 219, 254, 0.24); border-radius: 0.7rem; background: rgba(255,255,255,0.07); font: inherit; font-size: 0.7rem; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }.quick-action-grid a:hover,.quick-action-grid button:hover { color: #fff; background: rgba(147, 197, 253, 0.19); transform: translateY(-1px); }
.bento-activity-card h2 { color: #4c1d95; font-size: 1.04rem; }.activity-footer { position: absolute; right: 1.35rem; bottom: 1.3rem; left: 1.35rem; display: flex; align-items: center; gap: 0.42rem; padding-top: 0.68rem; border-top: 1px solid #ede9fe; color: #7c3aed; font-size: 0.68rem; font-weight: 800; }.activity-pulse { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #8b5cf6; box-shadow: 0 0 0 0.22rem rgba(139, 92, 246, 0.13); }

.teacher-roster { margin-top: 1.25rem; padding: 1.45rem; border: 1px solid rgba(203, 213, 225, 0.84); border-radius: 1.4rem; background: rgba(255, 255, 255, 0.84); box-shadow: 0 0.72rem 1.8rem rgba(15, 23, 42, 0.045); scroll-margin-top: 5.8rem; }
.roster-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }.roster-heading .eyebrow { margin: 0 0 0.35rem; }.roster-heading h2 { margin: 0; color: #102345; font-size: 1.35rem; }.roster-heading p:not(.eyebrow) { margin: 0.42rem 0 0; color: #64748b; font-size: 0.8rem; }.roster-studio-link { padding: 0.65rem 0.82rem; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 0.7rem; background: #eff6ff; font-size: 0.75rem; font-weight: 800; text-decoration: none; }
.teacher-level-tabs { margin: 1.25rem 0 0.9rem; }.teacher-level-tabs .level-btn { border-color: #dbe3ee; color: #475569; background: #fff; font-size: 0.76rem; font-weight: 800; }.teacher-level-tabs .level-btn:hover,.teacher-level-tabs .level-btn.is-active { color: #fff; border-color: #1d4ed8; background: #1d4ed8; box-shadow: 0 0.45rem 0.9rem rgba(37, 99, 235, 0.18); }
.roster-toolbar { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(9rem, 0.45fr) auto; gap: 0.72rem; align-items: end; margin: 1rem 0; padding: 0.75rem; border-radius: 0.95rem; background: #f8fafc; }.teacher-search-field,.teacher-filter-field { display: grid; gap: 0.3rem; color: #64748b; font-size: 0.68rem; font-weight: 800; }.teacher-search-field input,.teacher-filter-field select { min-height: 2.55rem; padding: 0.5rem 0.7rem; color: #1e293b; border: 1px solid #dbe3ee; border-radius: 0.65rem; background: #fff; font: inherit; font-size: 0.78rem; }.teacher-search-field input:focus,.teacher-filter-field select:focus { outline: 3px solid rgba(37, 99, 235, 0.14); border-color: #60a5fa; }.filtered-results-label { align-self: center; padding: 0.58rem 0.68rem; color: #1d4ed8; border-radius: 999px; background: #dbeafe; font-size: 0.69rem; font-weight: 800; white-space: nowrap; }
.teacher-table-card { margin-top: 0; padding: 0; overflow: hidden; border: 1px solid #e2e8f0; box-shadow: none; }.teacher-table-card .table-title { padding: 1rem 1.1rem; border-bottom: 1px solid #e2e8f0; background: #fff; }.table-title h2 { margin: 0.2rem 0 0; color: #102345; font-size: 1rem; }.table-kicker { color: #64748b; font-size: 0.66rem; font-weight: 800; }.table-status { display: inline-flex; align-items: center; padding: 0.43rem 0.6rem; color: #166534; border-radius: 999px; background: #ecfdf5; font-size: 0.67rem; font-weight: 800; }.teacher-table-card th { padding: 0.78rem 0.9rem; color: #64748b; background: #f8fafc; font-size: 0.68rem; }.teacher-table-card td { padding: 0.82rem 0.9rem; font-size: 0.76rem; }.teacher-table-card tbody tr:hover { background: #f8fbff; }

@media (max-width: 980px) { .bento-live-card { grid-column: span 7; }.bento-stats-card { grid-column: span 5; }.bento-payment-card { grid-column: span 4; }.bento-subject-card { grid-column: span 4; }.bento-quick-card { grid-column: span 4; }.bento-activity-card { grid-column: span 12; min-height: 9.5rem; }.bento-activity-card p { max-width: 65%; } }
@media (max-width: 720px) { .teacher-topbar { padding: 0.72rem 1rem; }.teacher-presence { display: none; }.teacher-workspace { width: min(94%, 38rem); padding-top: 1.45rem; }.teacher-welcome,.roster-heading { align-items: stretch; flex-direction: column; }.welcome-side { justify-items: stretch; }.dashboard-date { text-align: right; }.welcome-live-cta,.roster-studio-link { justify-content: center; }.bento-live-card,.bento-stats-card,.bento-payment-card,.bento-subject-card,.bento-quick-card,.bento-activity-card { grid-column: span 12; }.bento-activity-card p { max-width: 100%; }.roster-toolbar { grid-template-columns: 1fr; }.filtered-results-label { justify-self: start; }.teacher-roster { padding: 1rem; } }
@media (max-width: 490px) { .teacher-brand small,.topbar-logout { display: none; }.teacher-topbar-actions { gap: 0.35rem; }.topbar-studio-link { font-size: 0.69rem; }.bento-card { padding: 1.1rem; }.bento-stat-row { margin-top: 1rem; }.quick-action-grid { grid-template-columns: 1fr; }.teacher-level-tabs { gap: 0.45rem; }.teacher-level-tabs .level-btn { padding: 0.55rem 0.7rem; }.table-status { display: none; } }

/* Teacher roster: university card review and account activation */
.teacher-student-identity {
  display: grid;
  gap: 0.28rem;
}

.teacher-account-status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.teacher-account-status.is-active {
  color: #047857;
  background: #ecfdf5;
}

.teacher-account-status.is-inactive {
  color: #b91c1c;
  background: #fef2f2;
}

.card-reupload-btn {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fdba74;
}

.card-reupload-btn:hover:not(:disabled) {
  color: #ffffff;
  background: #c2410c;
}

.card-reupload-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.teacher-account-status.is-pending {
  color: #a16207;
  background: #fef9c3;
}

.card-confirm-btn {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
}

.card-confirm-btn:hover:not(:disabled) {
  color: #ffffff;
  background: #059669;
}

.subscription-upgrade-modal[hidden] {
  display: none;
}

.subscription-upgrade-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 1rem;
  place-items: center;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.subscription-upgrade-dialog {
  width: min(100%, 25rem);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 1.2rem;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.3);
}

.subscription-upgrade-dialog-head {
  padding: 1.25rem;
  color: #ffffff;
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.subscription-upgrade-dialog-head > span {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  margin-bottom: 0.7rem;
  place-items: center;
  color: #fef2f2;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.82rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.subscription-upgrade-dialog h2,
.subscription-upgrade-dialog p {
  margin: 0;
}

.subscription-upgrade-dialog h2 {
  font-size: 1rem;
  font-weight: 800;
}

.subscription-upgrade-dialog-head p {
  margin-top: 0.35rem;
  color: #fee2e2;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.85;
}

.subscription-upgrade-dialog-body {
  padding: 1.15rem 1.25rem 1.3rem;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.95;
}

.subscription-upgrade-actions {
  display: grid;
  gap: 0.58rem;
  margin-top: 1.05rem;
}

.subscription-upgrade-actions a,
.subscription-upgrade-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.72rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.subscription-upgrade-actions a {
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #16a34a);
}

.subscription-upgrade-actions button {
  color: #b91c1c;
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.account-status-chip.is-pending {
  color: #a16207;
  background: #fef9c3;
}

.payment-receipt-view-btn {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.payment-receipt-view-btn:hover:not(:disabled) {
  color: #ffffff;
  background: #2563eb;
}

.payment-receipt-confirm-btn {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.payment-receipt-confirm-btn:hover:not(:disabled) {
  color: #ffffff;
  background: #16a34a;
}

.payment-receipt-reject-btn {
  color: #b91c1c;
  background: #fff1f2;
  border: 1px solid #fda4af;
}

.payment-receipt-reject-btn:hover:not(:disabled) {
  color: #ffffff;
  background: #dc2626;
}

.payment-actions-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

/* Teacher schedule manager */
.schedule-manager {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.schedule-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.schedule-kicker {
  color: #2563eb;
  font-size: 0.66rem;
  font-weight: 800;
}

.schedule-manager h3,
.schedule-manager p {
  margin: 0;
}

.schedule-manager h3 {
  margin-top: 0.18rem;
  color: #102345;
  font-size: 1rem;
}

.schedule-manager-head p {
  margin-top: 0.22rem;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 600;
}

.teacher-absence-btn {
  min-height: 2.55rem;
  padding: 0.55rem 0.8rem;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 0.68rem;
  background: #fff5f5;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.teacher-absence-btn.is-active {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
}

.teacher-absence-status {
  margin: 0.75rem 0 0;
  padding: 0.58rem 0.68rem;
  color: #b91c1c;
  border-radius: 0.62rem;
  background: #fef2f2;
  font-size: 0.74rem;
  font-weight: 800;
}

.schedule-form {
  display: grid;
  grid-template-columns: minmax(9rem, 0.6fr) minmax(12rem, 1fr) auto;
  gap: 0.72rem;
  align-items: end;
  margin-top: 0.9rem;
}

.schedule-form label {
  display: grid;
  gap: 0.32rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
}

.schedule-form select,
.schedule-form input {
  min-height: 2.55rem;
  padding: 0.5rem 0.65rem;
  color: #102345;
  border: 1px solid #bfdbfe;
  border-radius: 0.62rem;
  background: #ffffff;
  font: inherit;
  font-size: 0.77rem;
}

.schedule-form-actions {
  display: flex;
  gap: 0.48rem;
}

.schedule-submit-btn,
.schedule-cancel-btn,
.scheduled-class-actions button {
  min-height: 2.55rem;
  padding: 0.5rem 0.72rem;
  border-radius: 0.62rem;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
}

.schedule-submit-btn {
  color: #ffffff;
  border: 1px solid #2563eb;
  background: #2563eb;
}

.schedule-cancel-btn {
  color: #475569;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.scheduled-class-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.scheduled-class-empty {
  margin: 0;
  padding: 0.72rem;
  color: #64748b;
  border-radius: 0.68rem;
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
}

.scheduled-class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #ffffff;
}

.scheduled-class-info {
  display: grid;
  gap: 0.18rem;
}

.scheduled-class-info strong {
  color: #102345;
  font-size: 0.78rem;
}

.scheduled-class-info span {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

.scheduled-class-actions {
  display: flex;
  gap: 0.42rem;
}

.scheduled-class-actions .edit {
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}

.scheduled-class-actions .delete {
  color: #b91c1c;
  border: 1px solid #fecaca;
  background: #fff5f5;
}

/* Teacher lesson-video repository */
.lesson-repository-manager {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #bbf7d0;
  border-radius: 1rem;
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.lesson-repository-manager h3,
.lesson-repository-manager p { margin: 0; }
.lesson-repository-manager h3 { margin-top: 0.18rem; color: #14532d; font-size: 1rem; }
.lesson-repository-head p { margin-top: 0.22rem !important; color: #64748b; font-size: 0.73rem; font-weight: 600; }

.lesson-video-form {
  display: grid;
  grid-template-columns: minmax(11rem, 0.8fr) minmax(12rem, 1fr) minmax(16rem, 1.35fr) auto;
  gap: 0.72rem;
  align-items: end;
  margin-top: 0.9rem;
}

.lesson-video-form label { display: grid; gap: 0.32rem; color: #64748b; font-size: 0.68rem; font-weight: 800; }
.lesson-video-form input,
.lesson-video-form select {
  min-height: 2.55rem;
  padding: 0.5rem 0.65rem;
  color: #102345;
  border: 1px solid #bbf7d0;
  border-radius: 0.62rem;
  background: #ffffff;
  font: inherit;
  font-size: 0.77rem;
}
.lesson-video-form input[type="url"] { direction: ltr; text-align: left; }
.lesson-video-form select { color: #102345; font: inherit; font-size: 0.77rem; }
.lesson-video-type-help { color: #15803d; font-size: 0.62rem; font-weight: 700; line-height: 1.5; }
.lesson-video-form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.lesson-video-picker,
.lesson-video-submit {
  min-height: 2.55rem;
  padding: 0.5rem 0.85rem;
  color: #ffffff;
  background: linear-gradient(135deg, #15803d, #16a34a);
  border: 1px solid transparent;
  border-radius: 0.62rem;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
}
.lesson-video-picker {
  min-height: 2.55rem;
  padding: 0.5rem 0.7rem;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 0.62rem;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}
.lesson-video-picker:hover:not(:disabled) { color: #ffffff; background: #2563eb; border-color: #2563eb; }
.lesson-video-picker:disabled,
.lesson-video-submit:disabled { opacity: 0.6; cursor: wait; }
.lesson-repository-note { margin-top: 0.68rem !important; color: #64748b; font-size: 0.68rem; line-height: 1.7; }
.teacher-lesson-video-list { display: grid; gap: 0.55rem; margin-top: 0.85rem; }
.teacher-lesson-video-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem; border: 1px solid #dcfce7; border-radius: 0.72rem; background: #ffffff; }
.teacher-lesson-video-copy { display: grid; gap: 0.14rem; min-width: 0; }
.teacher-lesson-video-copy strong { overflow: hidden; color: #14532d; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-lesson-video-type { width: fit-content; padding: 0.16rem 0.42rem; color: #166534; background: #dcfce7; border-radius: 999px; font-size: 0.61rem; font-weight: 900; }
.teacher-lesson-video-copy small { color: #64748b; font-size: 0.65rem; }
.teacher-lesson-video-actions { display: flex; flex: 0 0 auto; gap: 0.4rem; }
.teacher-lesson-video-actions a,
.teacher-lesson-video-actions button { min-height: 2.1rem; padding: 0.38rem 0.55rem; border-radius: 0.5rem; font-size: 0.65rem; font-weight: 800; }
.teacher-lesson-video-actions a { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; text-decoration: none; }
.teacher-lesson-video-actions button { color: #b91c1c; background: #fff5f5; border: 1px solid #fecaca; cursor: pointer; }
.teacher-lesson-empty { margin: 0; padding: 0.72rem; color: #64748b; background: rgba(255, 255, 255, 0.7); border: 1px dashed #bbf7d0; border-radius: 0.65rem; font-size: 0.72rem; text-align: center; }

@media (max-width: 980px) {
  .lesson-video-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-video-form-actions { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .lesson-video-form { grid-template-columns: 1fr; }
  .lesson-video-form-actions { grid-template-columns: 1fr; }
  .lesson-video-picker,
  .lesson-video-submit { width: 100%; }
  .teacher-lesson-video-item { align-items: stretch; flex-direction: column; }
  .teacher-lesson-video-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .teacher-lesson-video-actions a,
  .teacher-lesson-video-actions button { display: grid; place-items: center; }

  .schedule-manager-head,
  .scheduled-class-item {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-form {
    grid-template-columns: 1fr;
  }

  .schedule-form-actions,
  .scheduled-class-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Parent schedule and teacher-absence notice */
.parent-schedule-card {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.parent-schedule-head span {
  color: #2563eb;
  font-size: 0.66rem;
  font-weight: 800;
}

.parent-schedule-head h2 {
  margin: 0.18rem 0 0;
  color: #102345;
  font-size: 1rem;
}

.teacher-absence-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  margin: 0.9rem 0 0;
  padding: 1rem;
  color: #fef08a;
  border: 2px solid #fecaca;
  border-radius: 1rem;
  background: linear-gradient(135deg, #991b1b, #dc2626);
  box-shadow: 0 14px 30px rgba(185, 28, 28, 0.22);
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-weight: 900;
  line-height: 1.8;
}

.parent-schedule-list {
  display: grid;
  gap: 0.56rem;
  margin-top: 0.82rem;
}

.parent-schedule-empty {
  margin: 0;
  padding: 0.72rem;
  color: #64748b;
  border-radius: 0.68rem;
  background: #f8fafc;
  font-size: 0.76rem;
  font-weight: 600;
}

.parent-schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.72rem;
  background: #f8fbff;
}

.parent-schedule-item strong {
  display: block;
  color: #102345;
  font-size: 0.78rem;
}

.parent-schedule-item span {
  display: block;
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

.parent-schedule-item i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3b82f6;
}

.secondary-payment-status {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.45rem 0.58rem;
  border-radius: 0.62rem;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
}

.secondary-payment-status.is-paid {
  color: #166534;
  border: 1px solid #86efac;
  background: #f0fdf4;
}

.secondary-payment-status.is-promised {
  color: #a16207;
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.secondary-payment-status.is-unpaid {
  color: #b91c1c;
  border: 1px solid #fecaca;
  background: #fff1f2;
}

/* Teacher absence popup for the affected student level */
.teacher-absence-modal[hidden] {
  display: none;
}

.teacher-absence-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
}

.teacher-absence-modal-card {
  position: relative;
  width: min(100%, 31rem);
  padding: 2.4rem 1.45rem 1.55rem;
  color: #fef08a;
  border: 3px solid #fecaca;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  box-shadow: 0 25px 55px rgba(69, 10, 10, 0.48);
  text-align: center;
}

.teacher-absence-modal-kicker {
  margin: 0;
  color: #fde047;
  font-size: 0.78rem;
  font-weight: 900;
}

.teacher-absence-modal-card h2 {
  margin: 0.72rem 0;
  color: #fef08a;
  font-size: clamp(1.25rem, 6vw, 1.85rem);
  font-weight: 900;
  line-height: 1.65;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.24);
}

.teacher-absence-modal-card > p:last-child {
  margin: 0;
  color: #fef3c7;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.75;
}

.teacher-absence-modal-close {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  width: 2rem;
  height: 2rem;
  color: #fef08a;
  border: 1px solid rgba(254, 240, 138, 0.62);
  border-radius: 50%;
  background: rgba(127, 29, 29, 0.45);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

/* Public invite action in the teacher dashboard */
.topbar-public-invite {
  min-height: 2.45rem;
  padding: 0.48rem 0.85rem;
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.5);
  border-radius: 0.72rem;
  background: rgba(37, 99, 235, 0.2);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.topbar-public-invite:hover {
  background: rgba(37, 99, 235, 0.42);
  transform: translateY(-1px);
}

.drive-video-modal-card { width: min(42rem, calc(100vw - 2rem)); max-height: min(80vh, 42rem); overflow: hidden; }
.drive-video-modal-note { margin: 0.35rem 0 0.8rem; color: #64748b; font-size: 0.72rem; line-height: 1.7; }
.drive-video-list { display: grid; gap: 0.55rem; max-height: 52vh; overflow-y: auto; padding: 0.15rem 0.25rem 0.25rem 0.1rem; }
.drive-video-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; padding: 0.72rem; color: #0f172a; background: #f8fafc; border: 1px solid #dbeafe; border-radius: 0.72rem; text-align: right; font: inherit; cursor: pointer; transition: 0.2s ease; }
.drive-video-item:hover, .drive-video-item:focus-visible { background: #eff6ff; border-color: #60a5fa; transform: translateY(-1px); outline: none; }
.drive-video-item-copy { display: grid; gap: 0.18rem; min-width: 0; }
.drive-video-item-title { overflow: hidden; color: #1e3a8a; font-size: 0.78rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.drive-video-item-meta { color: #64748b; font-size: 0.66rem; }
.drive-video-item-icon { flex: 0 0 auto; color: #2563eb; font-size: 1.25rem; }
.drive-video-empty, .drive-video-loading { margin: 0; padding: 1rem; color: #64748b; background: #f8fafc; border: 1px dashed #bfdbfe; border-radius: 0.72rem; font-size: 0.75rem; text-align: center; }
@media (max-width: 720px) { .drive-video-modal-card { width: calc(100vw - 1rem); } .drive-video-item-title { white-space: normal; } }


.student-document-drive-btn {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.student-document-drive-btn:hover:not(:disabled) {
  color: #ffffff;
  background: #16a34a;
}

.student-document-drive-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.student-card-preview-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.student-card-preview-actions .student-document-drive-btn {
  min-height: 2.7rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 520px) {
  .student-card-preview-actions .student-document-drive-btn {
    width: 100%;
  }
}


/* Teacher dashboard professional refactor — RTL design system */
.teacher-dashboard-page {
  --primary-blue: #1a56db;
  --primary-hover: #1e40af;
  --surface-white: #ffffff;
  --background-body: #f3f4f6;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --success-green: #10b981;
  --success-bg: #d1fae5;
  --danger-red: #ef4444;
  --danger-bg: #fee2e2;
  --warning-yellow: #f59e0b;
  --border-radius-card: 12px;
  --border-radius-button: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  min-height: 100vh;
  color: var(--text-main);
  background: var(--background-body);
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
  line-height: 1.7;
}

.teacher-dashboard-shell { min-height: 100vh; margin-right: 260px; }
.teacher-sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 70;
  display: flex;
  width: 260px;
  flex-direction: column;
  padding: 1.25rem 1rem;
  background: var(--surface-white);
  border-left: 1px solid var(--border-color);
  box-shadow: -8px 0 28px rgba(15, 23, 42, .04);
}
.teacher-sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.teacher-sidebar-brand .teacher-brand { gap: .65rem; color: var(--text-main); }
.teacher-sidebar-brand .teacher-brand-mark { width: 2.35rem; height: 2.35rem; border-radius: 10px; background: var(--primary-blue); box-shadow: 0 8px 18px rgba(26, 86, 219, .2); }
.teacher-sidebar-brand .teacher-brand strong { font-size: .94rem; }
.teacher-sidebar-brand .teacher-brand small { color: var(--text-muted); font-size: .7rem; }
.teacher-sidebar-close { display: none; border: 0; color: var(--text-muted); background: transparent; font-size: 1.5rem; cursor: pointer; }
.teacher-profile-card { display: flex; align-items: center; gap: .65rem; margin: 1.5rem 0 1.25rem; padding: .75rem; border: 1px solid var(--border-color); border-radius: var(--border-radius-card); background: #f9fafb; }
.teacher-profile-avatar { display: grid; width: 2.5rem; height: 2.5rem; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 50%; background: linear-gradient(135deg, #1a56db, #2563eb); font-weight: 800; }
.teacher-profile-card span:nth-child(2) { display: grid; min-width: 0; }
.teacher-profile-card strong { overflow: hidden; color: var(--text-main); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-profile-card small { color: var(--text-muted); font-size: .68rem; }
.teacher-profile-card i { width: .5rem; height: .5rem; margin-right: auto; border-radius: 50%; background: var(--success-green); box-shadow: 0 0 0 4px var(--success-bg); }
.teacher-sidebar-nav { display: grid; gap: .3rem; }
.teacher-nav-link { display: flex; align-items: center; gap: .7rem; min-height: 2.75rem; padding: .6rem .75rem; color: #4b5563; border-radius: var(--border-radius-button); font-size: .8rem; font-weight: 700; text-decoration: none; transition: color .18s ease, background .18s ease, transform .18s ease; }
.teacher-nav-link:hover { color: var(--primary-blue); background: #eff6ff; transform: translateX(-2px); }
.teacher-nav-link.is-active { color: var(--primary-blue); background: #dbeafe; }
.nav-icon { display: grid; width: 1.55rem; height: 1.55rem; place-items: center; color: currentColor; border-radius: 6px; background: rgba(26, 86, 219, .08); font-size: 1rem; line-height: 1; }
.teacher-sidebar-footer { display: grid; gap: .65rem; margin-top: auto; }
.teacher-sidebar-help { padding: .55rem; color: var(--text-muted); font-size: .72rem; text-align: center; text-decoration: none; }
.teacher-sidebar-logout { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.6rem; color: #b91c1c; border: 1px solid #fecaca; border-radius: var(--border-radius-button); background: #fff5f5; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.teacher-sidebar-logout:hover { color: #991b1b; background: var(--danger-bg); }
.teacher-topbar { position: sticky; top: 0; z-index: 50; min-height: 4rem; padding: .7rem 1.5rem; border-bottom: 1px solid var(--border-color); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-sm); }
.teacher-topbar-start { display: flex; align-items: center; gap: .8rem; }
.teacher-menu-toggle { display: none; width: 2.45rem; height: 2.45rem; color: var(--primary-blue); border: 1px solid #bfdbfe; border-radius: var(--border-radius-button); background: #eff6ff; font-size: 1.1rem; cursor: pointer; }
.teacher-page-heading { display: grid; gap: 0; }
.teacher-page-kicker { color: var(--text-muted); font-size: .65rem; font-weight: 700; }
.teacher-page-heading strong { color: var(--text-main); font-size: 1rem; }
.teacher-topbar-actions { margin-right: auto; }
.teacher-topbar-actions .topbar-studio-link { color: #fff; background: var(--primary-blue); border-radius: var(--border-radius-button); }
.teacher-topbar-actions .topbar-studio-link:hover { background: var(--primary-hover); }
.teacher-topbar-actions .topbar-public-invite { color: var(--primary-blue); border: 1px solid #bfdbfe; border-radius: var(--border-radius-button); background: #eff6ff; }
.teacher-workspace { width: min(1320px, 100%); padding: 2rem 1.5rem 4rem; }
.teacher-welcome { padding-top: .25rem; }
.teacher-welcome h1 { color: var(--text-main); font-size: clamp(1.5rem, 3vw, 2rem); }
.teacher-welcome p:not(.eyebrow) { color: var(--text-muted); font-size: .92rem; }
.bento-card, .teacher-roster { border: 1px solid var(--border-color); border-radius: var(--border-radius-card); background: var(--surface-white); box-shadow: var(--shadow-card); }
.bento-card { min-height: 10.5rem; padding: 1.35rem; }
.bento-live-card { background: linear-gradient(135deg, #163f9e, #1a56db); }
.bento-quick-card { color: var(--text-main); border-color: var(--border-color); background: var(--surface-white); }
.bento-quick-card .bento-kicker { color: var(--text-muted); }
.quick-action-grid a, .quick-action-grid button { color: var(--primary-blue); border: 1px solid #bfdbfe; border-radius: var(--border-radius-button); background: #eff6ff; }
.quick-action-grid a:hover, .quick-action-grid button:hover { color: #fff; background: var(--primary-blue); }
.teacher-roster { padding: 1.25rem; scroll-margin-top: 5rem; }
.schedule-manager, .lesson-repository-manager { border: 1px solid var(--border-color); border-radius: var(--border-radius-card); background: var(--surface-white); }
.lesson-repository-manager { border-color: var(--border-color); background: #fbfdff; }
.lesson-repository-manager h3 { color: var(--text-main); }
.lesson-video-form input, .lesson-video-form select, .schedule-form input, .schedule-form select, .teacher-search-field input, .teacher-filter-field select { border-color: var(--border-color); border-radius: var(--border-radius-button); box-shadow: var(--shadow-sm); }
.lesson-video-form input:focus, .lesson-video-form select:focus, .schedule-form input:focus, .schedule-form select:focus, .teacher-search-field input:focus, .teacher-filter-field select:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(26, 86, 219, .16); }
.lesson-video-picker, .lesson-video-submit, .schedule-submit-btn { color: #fff; border-color: var(--primary-blue); border-radius: var(--border-radius-button); background: var(--primary-blue); }
.lesson-video-picker:hover, .lesson-video-submit:hover, .schedule-submit-btn:hover { background: var(--primary-hover); }
.table-card { border: 1px solid var(--border-color); border-radius: var(--border-radius-card); background: var(--surface-white); box-shadow: var(--shadow-card); }
.table-wrap { overflow-x: auto; }
.teacher-table-card table { min-width: 920px; border-collapse: collapse; }
.teacher-table-card th { color: var(--text-muted); background: #f9fafb; border-bottom: 1px solid var(--border-color); font-size: .76rem; font-weight: 800; }
.teacher-table-card td { color: var(--text-main); border-bottom: 1px solid var(--border-color); font-size: .8rem; }
.teacher-table-card tbody tr { background: var(--surface-white); transition: background .18s ease; }
.teacher-table-card tbody tr:hover { background: #f3f4f6; }
.table-empty-state, .empty-table-cell { padding: 2rem !important; color: var(--text-muted); background: #f9fafb; text-align: center; }
.payment-toggle, .secondary-payment-status { min-height: 2rem; padding: .35rem .65rem; border: 0; border-radius: 999px; font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer; }
.payment-toggle.is-paid, .secondary-payment-status.is-paid { color: #065f46; background: var(--success-bg); }
.payment-toggle.is-unpaid, .secondary-payment-status.is-unpaid { color: #991b1b; background: var(--danger-bg); }
.payment-toggle.is-promised, .secondary-payment-status.is-promised { color: #92400e; background: #fef3c7; }
.teacher-account-status.is-active { color: #065f46; background: var(--success-bg); }
.teacher-account-status.is-inactive { color: #991b1b; background: var(--danger-bg); }
.teacher-account-status.is-pending { color: #92400e; background: #fef3c7; }
.table-action-group { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.table-action-group button { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font-size: .95rem; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease; }
.table-action-group button:hover:not(:disabled) { color: var(--primary-blue); background: #eff6ff; transform: translateY(-1px); }
.table-action-group button.delete-student-btn:hover:not(:disabled) { color: #b91c1c; background: var(--danger-bg); }
.table-action-group button:disabled { cursor: not-allowed; opacity: .55; }
.student-document-drive-btn, .payment-receipt-view-btn, .payment-receipt-confirm-btn, .payment-receipt-reject-btn, .payment-receipt-open-btn, .card-reupload-btn, .card-confirm-btn, .card-view-btn { min-height: 2rem; padding: .35rem .55rem; border-radius: var(--border-radius-button); font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.payment-receipt-open-btn { color: #1d4ed8; border: 1px solid #93c5fd; background: #eff6ff; }
.payment-receipt-open-btn:hover { color: #fff; background: #2563eb; }
.payment-receipt-open-btn[hidden] { display: none; }
.confirm-delete-modal { z-index: 100; background: rgba(17, 24, 39, .6); backdrop-filter: blur(6px); }
.confirm-delete-card { width: min(100%, 27rem); padding: 2rem 1.5rem 1.35rem; text-align: center; }
.confirm-delete-icon { display: grid; width: 3.1rem; height: 3.1rem; margin: 0 auto .75rem; place-items: center; color: #b91c1c; border-radius: 50%; background: var(--danger-bg); font-size: 1.5rem; font-weight: 900; }
.confirm-delete-card h2 { margin: .35rem 0; color: var(--text-main); font-size: 1.15rem; }
.confirm-delete-card p:not(.eyebrow) { margin: .45rem auto 1.15rem; color: var(--text-muted); font-size: .82rem; }
.confirm-delete-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.confirm-delete-actions button { min-height: 2.7rem; border-radius: var(--border-radius-button); font: inherit; font-weight: 800; cursor: pointer; }
.confirm-delete-cancel { color: var(--text-muted); border: 1px solid var(--border-color); background: #f9fafb; }
.confirm-delete-approve { color: #fff; border: 1px solid var(--danger-red); background: var(--danger-red); }
.confirm-delete-approve:hover { background: #dc2626; }
.teacher-sidebar-backdrop[hidden] { display: none; }
@media (max-width: 1023px) {
  .teacher-dashboard-shell { margin-right: 0; }
  .teacher-sidebar { transform: translateX(100%); transition: transform .22s cubic-bezier(.23,1,.32,1); }
  .teacher-sidebar.is-open { transform: translateX(0); }
  .teacher-sidebar-close, .teacher-menu-toggle { display: inline-grid; place-items: center; }
  .teacher-sidebar-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 60; display: block; background: rgba(17, 24, 39, .45); }
  .teacher-workspace { padding-inline: 1rem; }
}
@media (max-width: 720px) {
  .teacher-topbar { padding-inline: .85rem; }
  .teacher-topbar-actions { gap: .35rem; }
  .teacher-topbar-actions .teacher-presence, .teacher-topbar-actions .topbar-messages-link, .teacher-topbar-actions .topbar-logout { display: none; }
  .teacher-topbar-actions .topbar-studio-link, .teacher-topbar-actions .topbar-public-invite { min-height: 2.25rem; padding: .4rem .55rem; font-size: .68rem; }
  .teacher-welcome, .roster-heading { align-items: stretch; flex-direction: column; }
  .welcome-side { justify-items: stretch; }
  .welcome-live-cta, .roster-studio-link { justify-content: center; }
  .roster-toolbar { grid-template-columns: 1fr; }
  .teacher-roster { padding: .8rem; }
  .schedule-form, .lesson-video-form { grid-template-columns: 1fr; }
  .confirm-delete-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .teacher-nav-link, .table-action-group button, .teacher-sidebar { transition: none; }
}

/* Teacher class registry */
.class-registry-manager { margin-top: 1rem; padding: 1.1rem; border: 1px solid #c7d2fe; border-radius: 1rem; background: linear-gradient(145deg,#fff,#eef2ff); box-shadow: 0 8px 22px rgba(30,64,175,.07); }
.class-registry-head { padding-bottom: .8rem; border-bottom: 1px solid #e0e7ff; }
.class-registry-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; margin-top: .85rem; }
.class-registry-filters label { display: grid; gap: .3rem; color: #475569; font-size: .7rem; font-weight: 800; }
.class-registry-filters select { min-height: 2.55rem; padding: .45rem .6rem; color: #0f172a; background: #fff; border: 1px solid #c7d2fe; border-radius: .6rem; font: inherit; font-size: .75rem; }
@media (max-width: 520px) { .class-registry-filters { grid-template-columns: 1fr; } }


/* YouTube integration for the teacher class registry */
.youtube-connection-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .8rem;
}
.youtube-connect-button,
.youtube-picker-button {
  min-height: 2.45rem;
  padding: .45rem .78rem;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: 1px solid #b91c1c;
  border-radius: .65rem;
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.youtube-connect-button:hover,
.youtube-connect-button:focus-visible,
.youtube-picker-button:hover,
.youtube-picker-button:focus-visible {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 16px rgba(185, 28, 28, .18);
  outline: none;
  transform: translateY(-1px);
}
.youtube-connect-button.is-connected {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}
.youtube-connect-button.is-connected:hover,
.youtube-connect-button.is-connected:focus-visible {
  background: #bbf7d0;
  box-shadow: 0 8px 16px rgba(22, 101, 52, .13);
}
.youtube-connection-status {
  color: #64748b;
  font-size: .7rem;
  font-weight: 800;
}
.youtube-connection-status::before {
  display: inline-block;
  width: .48rem;
  height: .48rem;
  margin-left: .34rem;
  content: "";
  vertical-align: middle;
  background: #94a3b8;
  border-radius: 50%;
}
.youtube-connect-button.is-connected + .youtube-connection-status::before {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .13);
}
.class-registry-youtube-field {
  display: grid;
  gap: .48rem;
  padding: .72rem;
  border: 1px solid #fecaca;
  border-radius: .75rem;
  background: linear-gradient(145deg, #fff7f7, #fff);
}
.class-registry-youtube-field[hidden] { display: none; }
.youtube-picker-button { width: 100%; }
.youtube-selected-video {
  overflow: hidden;
  color: #7f1d1d;
  font-size: .7rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.youtube-video-picker-card {
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(80vh, 44rem);
  overflow: hidden;
}
.youtube-picker-note {
  margin: .35rem 0 .85rem;
  color: #64748b;
  font-size: .72rem;
  line-height: 1.8;
}
.youtube-video-picker-list {
  display: grid;
  gap: .55rem;
  max-height: 55vh;
  overflow-y: auto;
  padding: .15rem .25rem .25rem .1rem;
}
.youtube-video-picker-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 4.1rem;
  padding: .6rem;
  color: #0f172a;
  text-align: right;
  background: #f8fafc;
  border: 1px solid #fee2e2;
  border-radius: .72rem;
  font: inherit;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.youtube-video-picker-item:hover,
.youtube-video-picker-item:focus-visible {
  background: #fff1f2;
  border-color: #fca5a5;
  box-shadow: 0 7px 16px rgba(185, 28, 28, .1);
  outline: none;
  transform: translateY(-1px);
}
.youtube-video-picker-item img {
  width: 7.3rem;
  height: 4.1rem;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: .48rem;
  background: #e2e8f0;
}
.youtube-video-picker-item > span {
  display: grid;
  gap: .25rem;
  min-width: 0;
}
.youtube-video-picker-item strong {
  overflow: hidden;
  color: #7f1d1d;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.youtube-video-picker-item small {
  color: #64748b;
  font-size: .65rem;
}
@media (max-width: 620px) {
  .class-registry-head { display: grid; gap: .2rem; }
  .youtube-connection-actions { justify-content: flex-start; }
  .youtube-video-picker-card { width: calc(100vw - 1rem); }
  .youtube-video-picker-item { align-items: flex-start; }
  .youtube-video-picker-item img { width: 6.2rem; height: 3.5rem; }
  .youtube-video-picker-item strong { white-space: normal; }
}


/* Teacher dashboard: zero-scroll app shell and stage tabs */
.teacher-dashboard-page {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: flex;
}

.teacher-dashboard-page .teacher-sidebar {
  position: relative;
  inset: auto;
  flex: 0 0 260px;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.teacher-dashboard-page .teacher-dashboard-shell {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: auto;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  margin-right: 0;
  overflow: hidden;
}

.teacher-dashboard-page .teacher-topbar {
  position: relative;
  top: auto;
  flex: 0 0 auto;
}

.teacher-dashboard-page .teacher-workspace {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: .85rem 1.15rem 1rem;
  overflow: hidden;
}

.teacher-tabs-nav {
  display: flex;
  flex: 0 0 auto;
  gap: .4rem;
  min-height: 2.85rem;
  padding: .3rem;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--border-color);
  border-radius: .8rem;
  background: #f8fafc;
  scrollbar-width: thin;
}

.teacher-tab-button {
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: .45rem .85rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: .55rem;
  background: transparent;
  font: inherit;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.teacher-tab-button:hover,
.teacher-tab-button:focus-visible {
  color: var(--primary-blue);
  background: #eff6ff;
  outline: none;
}

.teacher-tab-button.is-active {
  color: #fff;
  background: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(26, 86, 219, .2);
}

.teacher-tab-panel:not(.is-active) {
  display: none !important;
}

.teacher-tab-panel.is-active {
  min-height: 0;
  overflow: hidden;
}

.teacher-welcome.teacher-tab-panel.is-active {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.teacher-bento-grid.teacher-tab-panel.is-active {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.teacher-roster.teacher-tab-panel.is-active,
.schedule-manager.teacher-tab-panel.is-active,
.class-registry-manager.teacher-tab-panel.is-active,
.lesson-repository-manager.teacher-tab-panel.is-active,
.assignment-manager.teacher-tab-panel.is-active {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .75rem;
  min-height: 0;
  overflow: hidden;
}

.teacher-roster.teacher-tab-panel.is-active {
  padding: .9rem;
}

.teacher-roster .roster-heading,
.teacher-roster .teacher-level-tabs,
.teacher-roster .roster-toolbar {
  flex: 0 0 auto;
}

.teacher-roster .teacher-table-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.teacher-table-card .table-title {
  flex: 0 0 auto;
}

.teacher-table-card .table-scroll-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.teacher-table-card .table-action-group {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: max-content;
}

.teacher-table-card td:last-child {
  min-width: 13rem;
  white-space: normal;
}

.schedule-manager.teacher-tab-panel.is-active,
.class-registry-manager.teacher-tab-panel.is-active,
.lesson-repository-manager.teacher-tab-panel.is-active,
.assignment-manager.teacher-tab-panel.is-active {
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.teacher-dashboard-page .teacher-sidebar-nav {
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
}

.lesson-video-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(8px);
}

.lesson-video-modal[hidden] {
  display: none;
}

.lesson-video-modal-card {
  position: relative;
  width: min(100%, 42rem);
  max-height: min(90vh, 48rem);
  overflow-y: auto;
  padding: 1.25rem;
  border: 1px solid rgba(191, 219, 254, .8);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .28);
}

.lesson-video-modal-close {
  position: absolute;
  top: .65rem;
  left: .65rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #475569;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 1.25rem;
  cursor: pointer;
}

.lesson-video-modal-close:hover {
  color: #fff;
  background: #2563eb;
}

@media (max-width: 1023px) {
  .teacher-dashboard-page .teacher-sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    flex-basis: auto;
  }

  .teacher-dashboard-page .teacher-dashboard-shell {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .teacher-dashboard-page .teacher-workspace {
    padding: .6rem .65rem .75rem;
  }

  .teacher-welcome.teacher-tab-panel.is-active {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-bento-grid.teacher-tab-panel.is-active {
    grid-template-columns: 1fr;
  }

  .teacher-roster.teacher-tab-panel.is-active,
  .schedule-manager.teacher-tab-panel.is-active,
  .class-registry-manager.teacher-tab-panel.is-active,
  .lesson-repository-manager.teacher-tab-panel.is-active,
  .assignment-manager.teacher-tab-panel.is-active {
    padding: .65rem;
  }
}

body.teacher-modal-open {
  overflow: hidden;
}

.lesson-video-modal-open {
  align-self: flex-start;
  min-height: 2.45rem;
  margin: .65rem 0 0;
  padding: .45rem .85rem;
  color: #fff;
  border: 1px solid var(--primary-blue);
  border-radius: var(--border-radius-button);
  background: var(--primary-blue);
  font: inherit;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.lesson-video-modal-open:hover,
.lesson-video-modal-open:focus-visible {
  background: var(--primary-hover);
  outline: none;
}

.payment-receipt-preview-card {
  width: min(100%, 42rem);
  max-height: 92vh;
  overflow-y: auto;
}

.payment-receipt-preview-status {
  margin: .5rem 0 .75rem;
  color: #64748b;
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
}

.payment-receipt-preview-status.is-error {
  color: #b91c1c;
}

.payment-receipt-preview-frame {
  display: grid;
  min-height: 12rem;
  max-height: 62vh;
  place-items: center;
  overflow: auto;
  padding: .65rem;
  border: 1px solid #dbeafe;
  border-radius: .8rem;
  background: #f8fafc;
}

.payment-receipt-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.payment-receipt-preview-frame iframe {
  display: block;
  width: 100%;
  height: 58vh;
  min-height: 22rem;
  border: 0;
  border-radius: .55rem;
  background: #fff;
}

@media (max-width: 700px) {
  .payment-receipt-preview-card {
    width: calc(100vw - 1rem);
    padding: 1rem;
  }

  .payment-receipt-preview-frame {
    max-height: 66dvh;
  }

  .payment-receipt-preview-frame img {
    max-height: calc(66dvh - 1.5rem);
  }

  .payment-receipt-preview-frame iframe {
    height: calc(66dvh - 1.5rem);
    min-height: 18rem;
  }
}


/* Teacher dashboard visual polish: layout and readability only. */
.teacher-dashboard-page {
  background: #eef3f8;
  color: #172033;
}

.teacher-dashboard-page .teacher-sidebar {
  flex-basis: 236px;
  padding: .85rem .65rem .7rem;
  background: #ffffff;
  border-left: 1px solid #dbe4ef;
  box-shadow: -5px 0 18px rgba(15, 23, 42, .05);
}

.teacher-dashboard-page .teacher-sidebar-brand {
  min-height: 3.55rem;
  padding: .45rem .55rem .7rem;
  border-bottom: 1px solid #e7edf5;
}

.teacher-dashboard-page .teacher-brand {
  gap: .55rem;
}

.teacher-dashboard-page .teacher-brand strong {
  font-size: .82rem;
  line-height: 1.25;
}

.teacher-dashboard-page .teacher-brand small {
  margin-top: .12rem;
  color: #64748b;
  font-size: .64rem;
}

.teacher-dashboard-page .teacher-profile-card {
  min-height: 3.55rem;
  margin: .7rem .2rem .55rem;
  padding: .55rem .6rem;
  background: #f8fbff;
  border: 1px solid #e2eaf4;
  border-radius: .85rem;
}

.teacher-dashboard-page .teacher-profile-card strong {
  font-size: .72rem;
}

.teacher-dashboard-page .teacher-profile-card small {
  color: #64748b;
  font-size: .6rem;
}

.teacher-dashboard-page .teacher-sidebar-nav {
  gap: .25rem;
  padding: .35rem .1rem;
}

.teacher-dashboard-page .teacher-nav-link {
  min-height: 2.55rem;
  gap: .62rem;
  padding: .52rem .65rem;
  color: #526176;
  border: 1px solid transparent;
  border-radius: .7rem;
  font-size: .75rem;
  font-weight: 800;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.teacher-dashboard-page .teacher-nav-link:hover {
  color: #1d4ed8;
  background: #f1f6ff;
  border-color: #dbeafe;
  transform: translateX(-2px);
}

.teacher-dashboard-page .teacher-nav-link.is-active {
  color: #1d4ed8;
  background: #e7f0ff;
  border-color: #cfe0ff;
  box-shadow: none;
}

.teacher-dashboard-page .teacher-nav-link .nav-icon {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  border-radius: .55rem;
  font-size: .9rem;
}

.teacher-dashboard-page .teacher-nav-link.is-active .nav-icon {
  color: #2563eb;
  background: #ffffff;
}

.teacher-dashboard-page .teacher-sidebar-footer {
  gap: .45rem;
  padding: .7rem .2rem 0;
  border-top: 1px solid #e7edf5;
}

.teacher-dashboard-page .teacher-sidebar-help,
.teacher-dashboard-page .teacher-sidebar-logout {
  min-height: 2.35rem;
  border-radius: .65rem;
  font-size: .68rem;
}

.teacher-dashboard-page .teacher-topbar {
  min-height: 3.45rem;
  padding: .45rem 1rem;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #dfe7f1;
  box-shadow: 0 3px 14px rgba(15, 23, 42, .05);
}

.teacher-dashboard-page .teacher-page-heading {
  gap: .08rem;
}

.teacher-dashboard-page .teacher-page-kicker {
  color: #64748b;
  font-size: .61rem;
}

.teacher-dashboard-page .teacher-page-heading strong {
  color: #172033;
  font-size: .95rem;
}

.teacher-dashboard-page .teacher-topbar-actions {
  gap: .45rem;
}

.teacher-dashboard-page .teacher-presence,
.teacher-dashboard-page .topbar-studio-link,
.teacher-dashboard-page .topbar-messages-link,
.teacher-dashboard-page .topbar-public-invite,
.teacher-dashboard-page .topbar-logout {
  min-height: 2.25rem;
  padding: .42rem .7rem;
  border-radius: .62rem;
  font-size: .68rem;
  font-weight: 800;
}

.teacher-dashboard-page .teacher-presence {
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

.teacher-dashboard-page .topbar-studio-link {
  color: #ffffff;
  background: #2563eb;
  border: 1px solid #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .18);
}

.teacher-dashboard-page .topbar-public-invite {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.teacher-dashboard-page .topbar-logout {
  color: #b91c1c;
  background: #fff7f7;
  border: 1px solid #fecaca;
}

.teacher-dashboard-page .teacher-workspace {
  gap: .55rem;
  padding: .65rem .85rem .75rem;
  background: #eef3f8;
}

.teacher-dashboard-page .teacher-welcome {
  min-height: 4.6rem;
  padding: .75rem 1rem;
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: .9rem;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
}

.teacher-dashboard-page .teacher-welcome h1 {
  margin: .16rem 0 .22rem;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.teacher-dashboard-page .teacher-welcome > div > p:last-child {
  color: #64748b;
  font-size: .7rem;
}

.teacher-dashboard-page .teacher-tabs-nav {
  min-height: 3rem;
  gap: .28rem;
  padding: .25rem;
  border-color: #dbe4ef;
  border-radius: .78rem;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .035);
  scrollbar-width: none;
}

.teacher-dashboard-page .teacher-tabs-nav::-webkit-scrollbar {
  display: none;
}

.teacher-dashboard-page .teacher-tab-button {
  min-height: 2.45rem;
  padding: .5rem .9rem;
  color: #64748b;
  border-radius: .62rem;
  font-size: .73rem;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.teacher-dashboard-page .teacher-tab-button:hover,
.teacher-dashboard-page .teacher-tab-button:focus-visible {
  color: #1d4ed8;
  background: #eff6ff;
}

.teacher-dashboard-page .teacher-tab-button.is-active {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 4px 11px rgba(37, 99, 235, .2);
}

.teacher-dashboard-page .teacher-roster.teacher-tab-panel.is-active {
  gap: .55rem;
  padding: .65rem;
}

.teacher-dashboard-page .teacher-roster .roster-heading {
  min-height: 4.35rem;
  padding: .65rem .8rem;
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: .85rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .035);
}

.teacher-dashboard-page .roster-heading .eyebrow {
  margin-bottom: .12rem;
  font-size: .62rem;
}

.teacher-dashboard-page .roster-heading h2 {
  margin: 0;
  color: #172033;
  font-size: 1rem;
}

.teacher-dashboard-page .roster-heading p:last-child {
  margin-top: .18rem;
  color: #64748b;
  font-size: .67rem;
}

.teacher-dashboard-page .roster-studio-link {
  min-height: 2.35rem;
  padding: .45rem .72rem;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: .65rem;
  font-size: .68rem;
  font-weight: 900;
}

.teacher-dashboard-page .teacher-level-tabs {
  display: flex;
  gap: .35rem;
  min-height: 2.9rem;
  padding: .28rem;
  overflow-x: auto;
  overflow-y: hidden;
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: .78rem;
  scrollbar-width: none;
}

.teacher-dashboard-page .teacher-level-tabs::-webkit-scrollbar {
  display: none;
}

.teacher-dashboard-page .level-btn {
  min-height: 2.3rem;
  padding: .45rem .78rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .6rem;
  font-size: .69rem;
  font-weight: 900;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.teacher-dashboard-page .level-btn:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.teacher-dashboard-page .level-btn.is-active {
  color: #ffffff;
  background: #2563eb;
  border-color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .16);
}

.teacher-dashboard-page .roster-toolbar {
  grid-template-columns: minmax(0, 1.75fr) minmax(10rem, .8fr) auto;
  gap: .55rem;
  align-items: end;
  padding: .65rem .75rem;
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: .82rem;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .03);
}

.teacher-dashboard-page .teacher-search-field,
.teacher-dashboard-page .teacher-filter-field {
  gap: .28rem;
  color: #475569;
  font-size: .65rem;
  font-weight: 900;
}

.teacher-dashboard-page .teacher-search-field input,
.teacher-dashboard-page .teacher-filter-field select {
  min-height: 2.45rem;
  padding: .45rem .65rem;
  color: #172033;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: .62rem;
  font-size: .72rem;
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.teacher-dashboard-page .teacher-search-field input:focus,
.teacher-dashboard-page .teacher-filter-field select:focus {
  background: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .16);
}

.teacher-dashboard-page .filtered-results-label {
  min-width: 8rem;
  min-height: 2.45rem;
  padding: .48rem .65rem;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: .62rem;
  font-size: .65rem;
  font-weight: 900;
  text-align: center;
}

.teacher-dashboard-page .teacher-table-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: .95rem;
  box-shadow: 0 7px 20px rgba(15, 23, 42, .055);
}

.teacher-dashboard-page .teacher-table-card .table-title {
  min-height: 3.4rem;
  padding: .62rem .85rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.teacher-dashboard-page .teacher-table-card .table-kicker {
  color: #64748b;
  font-size: .61rem;
  font-weight: 800;
}

.teacher-dashboard-page .teacher-table-card .table-title h2 {
  margin: .12rem 0 0;
  color: #172033;
  font-size: .96rem;
}

.teacher-dashboard-page .teacher-table-card .table-status {
  min-height: 1.9rem;
  padding: .35rem .55rem;
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: .55rem;
  font-size: .62rem;
  font-weight: 900;
}

.teacher-dashboard-page .teacher-table-card .table-scroll-container {
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
}

.teacher-dashboard-page .teacher-table-card .table-scroll-container::-webkit-scrollbar {
  width: .45rem;
  height: .45rem;
}

.teacher-dashboard-page .teacher-table-card .table-scroll-container::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 1rem;
}

.teacher-dashboard-page .teacher-table-card table {
  width: 100%;
  min-width: 60rem;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.teacher-dashboard-page .teacher-table-card th,
.teacher-dashboard-page .teacher-table-card td {
  padding: .56rem .65rem;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.teacher-dashboard-page .teacher-table-card th {
  color: #526176;
  background: #f8fafc;
  font-size: .65rem;
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
}

.teacher-dashboard-page .teacher-table-card td {
  color: #334155;
  font-size: .72rem;
}

.teacher-dashboard-page .teacher-table-card th:nth-child(1),
.teacher-dashboard-page .teacher-table-card td:nth-child(1) { width: 24%; }
.teacher-dashboard-page .teacher-table-card th:nth-child(2),
.teacher-dashboard-page .teacher-table-card td:nth-child(2) { width: 16%; }
.teacher-dashboard-page .teacher-table-card th:nth-child(3),
.teacher-dashboard-page .teacher-table-card td:nth-child(3) { width: 17%; }
.teacher-dashboard-page .teacher-table-card th:nth-child(4),
.teacher-dashboard-page .teacher-table-card td:nth-child(4) { width: 22%; }
.teacher-dashboard-page .teacher-table-card th:nth-child(5),
.teacher-dashboard-page .teacher-table-card td:nth-child(5) { width: 21%; }

.teacher-dashboard-page .teacher-table-card tbody tr:nth-child(even) {
  background: #fbfdff;
}

.teacher-dashboard-page .teacher-table-card tbody tr:hover {
  background: #f1f7ff;
}

.teacher-dashboard-page .teacher-student-identity {
  gap: .18rem;
}

.teacher-dashboard-page .teacher-student-identity strong {
  color: #172033;
  font-size: .77rem;
  line-height: 1.35;
}

.teacher-dashboard-page .teacher-account-status {
  width: fit-content;
  padding: .2rem .45rem;
  border-radius: 999px;
  font-size: .59rem;
  font-weight: 900;
}

.teacher-dashboard-page .teacher-table-card .payment-toggle,
.teacher-dashboard-page .teacher-table-card .secondary-payment-status {
  display: inline-flex;
  min-width: 7.7rem;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  padding: .32rem .55rem;
  border-radius: 999px;
  font-size: .63rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.teacher-dashboard-page .teacher-table-card .secondary-payment-status {
  width: min(100%, 11.5rem);
}

.teacher-dashboard-page .teacher-table-card .table-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: .35rem;
  min-width: 0;
}

.teacher-dashboard-page .teacher-table-card .table-action-group button {
  min-height: 2.05rem;
  padding: .34rem .5rem;
  border-radius: .58rem;
  font-size: .63rem;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.teacher-dashboard-page .teacher-table-card .table-action-group button:hover {
  transform: translateY(-1px);
}

.teacher-dashboard-page .teacher-table-card .table-action-group .icon-action {
  display: inline-grid;
  width: 2.05rem;
  min-width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  place-items: center;
  font-size: .82rem;
}

.teacher-dashboard-page .teacher-table-card .student-certificates-btn {
  min-width: 4.25rem;
}

.teacher-dashboard-page .teacher-table-card .empty-table-cell {
  padding: 2rem 1rem;
  color: #64748b;
  text-align: center;
  font-size: .78rem;
}

.teacher-dashboard-page .teacher-sidebar,
.teacher-dashboard-page .teacher-topbar,
.teacher-dashboard-page .teacher-tabs-nav,
.teacher-dashboard-page .teacher-roster,
.teacher-dashboard-page .teacher-table-card,
.teacher-dashboard-page .teacher-table-card button,
.teacher-dashboard-page .teacher-table-card a {
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  .teacher-dashboard-page .teacher-workspace {
    padding-inline: .7rem;
  }
}

@media (max-width: 720px) {
  .teacher-dashboard-page .teacher-topbar {
    min-height: 3.25rem;
    padding: .42rem .65rem;
  }

  .teacher-dashboard-page .teacher-page-heading strong {
    font-size: .82rem;
  }

  .teacher-dashboard-page .teacher-workspace {
    gap: .45rem;
    padding: .5rem;
  }

  .teacher-dashboard-page .teacher-tabs-nav {
    min-height: 2.85rem;
  }

  .teacher-dashboard-page .teacher-roster.teacher-tab-panel.is-active {
    padding: .45rem;
  }

  .teacher-dashboard-page .roster-toolbar {
    grid-template-columns: 1fr;
  }

  .teacher-dashboard-page .filtered-results-label {
    width: 100%;
  }

  .teacher-dashboard-page .teacher-table-card table {
    min-width: 60rem;
  }

  .teacher-dashboard-page .teacher-table-card .table-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-dashboard-page .teacher-nav-link,
  .teacher-dashboard-page .teacher-tab-button,
  .teacher-dashboard-page .level-btn,
  .teacher-dashboard-page .table-action-group button {
    transition: none;
  }
}


/* Teacher dashboard: level strip + section strip */
.teacher-dashboard-page .teacher-level-strip {
  display: flex;
  flex: 0 0 auto;
  gap: .35rem;
  min-height: 2.9rem;
  padding: .28rem;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #cbdcf7;
  border-radius: .78rem;
  background: linear-gradient(135deg, #eef5ff, #ffffff);
  box-shadow: 0 3px 12px rgba(37, 99, 235, .06);
  scrollbar-width: none;
}

.teacher-dashboard-page .teacher-level-strip::-webkit-scrollbar {
  display: none;
}

.teacher-dashboard-page .teacher-level-strip .level-btn {
  flex: 1 0 auto;
  min-width: max-content;
  min-height: 2.35rem;
  padding: .46rem .85rem;
  color: #38516f;
  background: #ffffff;
  border: 1px solid #d8e5f7;
  border-radius: .62rem;
  font-size: .7rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.teacher-dashboard-page .teacher-level-strip .level-btn:hover,
.teacher-dashboard-page .teacher-level-strip .level-btn:focus-visible {
  color: #1d4ed8;
  background: #f5f9ff;
  border-color: #93c5fd;
  outline: none;
}

.teacher-dashboard-page .teacher-level-strip .level-btn:active {
  transform: translateY(1px);
}

.teacher-dashboard-page .teacher-level-strip .level-btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  box-shadow: 0 4px 11px rgba(37, 99, 235, .2);
}

.teacher-dashboard-page .roster-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
}

.teacher-dashboard-page .teacher-search-storage {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.teacher-dashboard-page .student-search-trigger {
  display: inline-grid;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0;
  place-items: center;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: .62rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.teacher-dashboard-page .student-search-trigger:hover,
.teacher-dashboard-page .student-search-trigger:focus-visible {
  color: #ffffff;
  background: #2563eb;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .2);
  outline: none;
}

.teacher-dashboard-page .student-search-trigger:active {
  transform: scale(.96);
}

.teacher-dashboard-page .student-search-modal {
  width: min(92vw, 25rem);
  padding: 0;
  color: #172033;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.teacher-dashboard-page .student-search-modal::backdrop {
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(3px);
}

.teacher-dashboard-page .student-search-dialog {
  position: relative;
  display: grid;
  gap: .7rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 1rem;
}

.teacher-dashboard-page .student-search-dialog h2 {
  margin: 0;
  color: #172033;
  font-size: 1.08rem;
}

.teacher-dashboard-page .student-search-dialog label {
  display: grid;
  gap: .35rem;
  color: #475569;
  font-size: .72rem;
  font-weight: 900;
}

.teacher-dashboard-page .student-search-dialog input {
  min-height: 2.7rem;
  padding: .5rem .7rem;
  color: #172033;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: .65rem;
  font: inherit;
  font-size: .8rem;
  outline: none;
}

.teacher-dashboard-page .student-search-dialog input:focus {
  background: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .16);
}

.teacher-dashboard-page .student-search-modal-close {
  position: absolute;
  top: .65rem;
  left: .65rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.teacher-dashboard-page .student-search-modal-actions {
  display: flex;
  justify-content: flex-start;
  gap: .5rem;
  margin-top: .2rem;
}

.teacher-dashboard-page .student-search-modal-actions button {
  min-width: 5rem;
  min-height: 2.45rem;
  padding: .45rem .8rem;
  border-radius: .62rem;
  font: inherit;
  font-size: .75rem;
  font-weight: 900;
  cursor: pointer;
}

.teacher-dashboard-page .student-search-cancel {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
}

.teacher-dashboard-page .student-search-submit {
  color: #ffffff;
  background: #2563eb;
  border: 1px solid #1d4ed8;
}

.teacher-dashboard-page .teacher-quiz-panel.teacher-tab-panel.is-active {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 1rem;
}

.teacher-dashboard-page .teacher-quiz-card {
  width: min(100%, 42rem);
  padding: 2rem;
  text-align: center;
  background: linear-gradient(145deg, #ffffff, #f3f7ff);
  border: 1px solid #dbe7f5;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

.teacher-dashboard-page .teacher-quiz-card h2 {
  margin: .35rem 0 .5rem;
  color: #172033;
  font-size: 1.35rem;
}

.teacher-dashboard-page .teacher-quiz-card p {
  margin: 0;
  color: #64748b;
  font-size: .82rem;
  line-height: 1.8;
}

.teacher-dashboard-page .teacher-quiz-status {
  display: inline-flex;
  margin-top: 1rem;
  padding: .35rem .75rem;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
}

@media (max-width: 720px) {
  .teacher-dashboard-page .teacher-level-strip .level-btn {
    flex: 0 0 auto;
  }

  .teacher-dashboard-page .roster-heading h2 {
    gap: .35rem;
  }

  .teacher-dashboard-page .student-search-trigger {
    width: 2.2rem;
    min-width: 2.2rem;
    height: 2.2rem;
    min-height: 2.2rem;
  }

  .teacher-dashboard-page .teacher-quiz-panel.teacher-tab-panel.is-active {
    padding: .65rem;
  }

  .teacher-dashboard-page .teacher-quiz-card {
    padding: 1.35rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-dashboard-page .teacher-level-strip .level-btn,
  .teacher-dashboard-page .student-search-trigger {
    transition: none;
  }
}


/* Fixed student roster: no internal or horizontal scrolling */
.teacher-dashboard-page .teacher-table-card {
  min-height: 0;
  overflow: hidden;
}

.teacher-dashboard-page .teacher-table-card .table-scroll-container {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  overscroll-behavior: auto;
  scrollbar-width: none;
}

.teacher-dashboard-page .teacher-table-card .table-scroll-container::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.teacher-dashboard-page .teacher-table-card table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.teacher-dashboard-page .teacher-table-card th,
.teacher-dashboard-page .teacher-table-card td {
  padding: .34rem .4rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-dashboard-page .teacher-table-card th {
  font-size: .6rem;
}

.teacher-dashboard-page .teacher-table-card td {
  font-size: .66rem;
}

.teacher-dashboard-page .teacher-table-card .teacher-student-identity strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .68rem;
}

.teacher-dashboard-page .teacher-table-card .teacher-account-status,
.teacher-dashboard-page .teacher-table-card .payment-toggle,
.teacher-dashboard-page .teacher-table-card .secondary-payment-status {
  min-width: 0;
  max-width: 100%;
  padding: .2rem .35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .56rem;
}

.teacher-dashboard-page .teacher-table-card .table-action-group {
  justify-content: flex-end;
  gap: .2rem;
  min-width: 0;
  max-width: 100%;
}

.teacher-dashboard-page .teacher-table-card .table-action-group button {
  min-width: 1.65rem;
  min-height: 1.65rem;
  max-width: 100%;
  padding: .2rem .3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .55rem;
}

.teacher-dashboard-page .teacher-table-card .table-action-group .icon-action {
  width: 1.65rem;
  min-width: 1.65rem;
  height: 1.65rem;
  font-size: .7rem;
}

.teacher-dashboard-page .teacher-table-card .student-certificates-btn {
  min-width: 3.25rem;
}

.teacher-dashboard-page .roster-pagination {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 2.25rem;
  padding: .28rem .55rem;
  color: #475569;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: .64rem;
  font-weight: 900;
}

.teacher-dashboard-page .roster-pagination[hidden] {
  display: none;
}

.teacher-dashboard-page .roster-page-button {
  min-width: 4rem;
  min-height: 1.75rem;
  padding: .25rem .5rem;
  color: #1d4ed8;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: .5rem;
  font: inherit;
  font-size: .6rem;
  font-weight: 900;
  cursor: pointer;
}

.teacher-dashboard-page .roster-page-button:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .teacher-dashboard-page .teacher-table-card th,
  .teacher-dashboard-page .teacher-table-card td {
    padding: .28rem .25rem;
  }

  .teacher-dashboard-page .teacher-table-card th {
    font-size: .52rem;
  }

  .teacher-dashboard-page .teacher-table-card td {
    font-size: .58rem;
  }

  .teacher-dashboard-page .teacher-table-card .teacher-account-status,
  .teacher-dashboard-page .teacher-table-card .payment-toggle,
  .teacher-dashboard-page .teacher-table-card .secondary-payment-status {
    font-size: .5rem;
  }

  .teacher-dashboard-page .teacher-table-card .table-action-group {
    gap: .12rem;
  }

  .teacher-dashboard-page .teacher-table-card .table-action-group button {
    min-height: 1.5rem;
    min-width: 1.5rem;
    padding-inline: .2rem;
    font-size: .48rem;
  }

  .teacher-dashboard-page .teacher-table-card .table-action-group .icon-action {
    width: 1.5rem;
    min-width: 1.5rem;
    height: 1.5rem;
  }

  .teacher-dashboard-page .teacher-table-card .student-certificates-btn {
    min-width: 2.8rem;
  }
}


/* Roster filter buttons */
.teacher-dashboard-page .roster-toolbar {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}

.teacher-dashboard-page .roster-filter-buttons {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: .3rem;
  min-width: 0;
}

.teacher-dashboard-page .roster-filter-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.35rem;
  padding: .4rem .55rem;
  color: #526176;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: .62rem;
  font: inherit;
  font-size: .64rem;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.teacher-dashboard-page .roster-filter-button:hover,
.teacher-dashboard-page .roster-filter-button:focus-visible {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
  outline: none;
}

.teacher-dashboard-page .roster-filter-button:active {
  transform: scale(.98);
}

.teacher-dashboard-page .roster-filter-button.is-active {
  color: #ffffff;
  background: #2563eb;
  border-color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .18);
}

.teacher-dashboard-page .roster-filter-storage {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.teacher-dashboard-page .roster-search-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 4.8rem;
  padding-inline: .7rem;
}

.teacher-dashboard-page .roster-search-button span:last-child {
  margin-inline-start: .2rem;
  font-size: .62rem;
}

.teacher-dashboard-page .filtered-results-label {
  flex: 0 0 auto;
  min-width: 7.2rem;
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4rem .55rem;
}

@media (max-width: 720px) {
  .teacher-dashboard-page .roster-toolbar {
    flex-wrap: wrap;
  }

  .teacher-dashboard-page .roster-filter-buttons {
    order: 1;
    width: 100%;
  }

  .teacher-dashboard-page .roster-filter-button {
    min-height: 2.25rem;
    padding-inline: .28rem;
    font-size: .56rem;
  }

  .teacher-dashboard-page .roster-search-button {
    order: 2;
    flex: 1 1 7rem;
  }

  .teacher-dashboard-page .filtered-results-label {
    order: 3;
    flex: 1 1 8rem;
    min-width: 0;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-dashboard-page .roster-filter-button {
    transition: none;
  }
}


/* Student roster: scroll only inside the names/list area */
.teacher-dashboard-page .teacher-table-card .table-scroll-container {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
}

.teacher-dashboard-page .teacher-table-card .table-scroll-container::-webkit-scrollbar {
  display: block;
  width: .42rem;
}

.teacher-dashboard-page .teacher-table-card .table-scroll-container::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 1rem;
}

.teacher-dashboard-page .teacher-table-card th:last-child,
.teacher-dashboard-page .teacher-table-card td:last-child {
  display: none;
}

.teacher-dashboard-page .teacher-table-card th:nth-child(1),
.teacher-dashboard-page .teacher-table-card td:nth-child(1) { width: 30%; }
.teacher-dashboard-page .teacher-table-card th:nth-child(2),
.teacher-dashboard-page .teacher-table-card td:nth-child(2) { width: 19%; }
.teacher-dashboard-page .teacher-table-card th:nth-child(3),
.teacher-dashboard-page .teacher-table-card td:nth-child(3) { width: 24%; }
.teacher-dashboard-page .teacher-table-card th:nth-child(4),
.teacher-dashboard-page .teacher-table-card td:nth-child(4) { width: 27%; }

.teacher-dashboard-page .teacher-table-card .teacher-student-identity {
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.teacher-dashboard-page .teacher-table-card .student-name-action {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: #0f172a;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: .86rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.teacher-dashboard-page .teacher-table-card .student-name-action:hover,
.teacher-dashboard-page .teacher-table-card .student-name-action:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
  outline: none;
}

.teacher-dashboard-page .teacher-table-card .teacher-account-status {
  width: fit-content;
  font-size: .7rem;
  font-weight: 900;
}

.teacher-dashboard-page .teacher-table-card .phone-cell {
  color: #0f172a;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .015em;
  direction: ltr;
  text-align: right;
  white-space: nowrap;
}

.teacher-dashboard-page .teacher-table-card .payment-cell .payment-toggle,
.teacher-dashboard-page .teacher-table-card .secondary-payment-status {
  min-height: 2.25rem;
  padding: .42rem .7rem;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.25;
}

.teacher-dashboard-page .teacher-table-card .payment-cell .payment-toggle {
  width: min(100%, 14rem);
}

.teacher-dashboard-page .student-actions-card {
  width: min(94vw, 30rem);
  max-height: min(86vh, 42rem);
  overflow-y: auto;
}

.teacher-dashboard-page .student-actions-card h2 {
  margin: .2rem 0 .15rem;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 900;
}

.teacher-dashboard-page .student-actions-level {
  margin: 0 0 .8rem;
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}

.teacher-dashboard-page .student-actions-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.teacher-dashboard-page .student-action-modal-button {
  min-height: 2.8rem;
  padding: .55rem .7rem;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: .68rem;
  font: inherit;
  font-size: .75rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.teacher-dashboard-page .student-action-modal-button:hover,
.teacher-dashboard-page .student-action-modal-button:focus-visible {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .2);
  outline: none;
}

.teacher-dashboard-page .student-action-modal-button:active {
  transform: scale(.98);
}

.teacher-dashboard-page .student-action-modal-button.danger {
  color: #b91c1c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.teacher-dashboard-page .student-action-modal-button.danger:hover,
.teacher-dashboard-page .student-action-modal-button.danger:focus-visible {
  color: #ffffff;
  background: #dc2626;
}

@media (max-width: 720px) {
  .teacher-dashboard-page .teacher-table-card .student-name-action {
    font-size: .74rem;
  }

  .teacher-dashboard-page .teacher-table-card .phone-cell {
    font-size: .7rem;
  }

  .teacher-dashboard-page .teacher-table-card .payment-cell .payment-toggle,
  .teacher-dashboard-page .teacher-table-card .secondary-payment-status {
    min-height: 2rem;
    padding-inline: .4rem;
    font-size: .64rem;
  }

  .teacher-dashboard-page .student-actions-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-dashboard-page .student-action-modal-button {
    transition: none;
  }
}


/* Global teacher absence toggle */
.teacher-global-absence-control {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.25rem;
  padding: .2rem;
  border: 1px solid #fecaca;
  border-radius: var(--border-radius-button, .7rem);
  background: #fff7f7;
}

.teacher-global-absence-btn {
  min-height: 1.85rem;
  padding: .32rem .68rem;
  color: #b91c1c;
  border: 1px solid transparent;
  border-radius: .52rem;
  background: transparent;
  font: inherit;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.teacher-global-absence-btn:hover { background: #fee2e2; }
.teacher-global-absence-btn:active { transform: scale(.97); }
.teacher-global-absence-btn:disabled { opacity: .62; cursor: wait; }
.teacher-global-absence-btn.is-active {
  color: #fff;
  background: #dc2626;
  border-color: #b91c1c;
}
.teacher-global-absence-btn.is-active:hover { background: #b91c1c; }

.teacher-global-absence-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: .28rem .55rem;
  border-radius: .48rem;
  font-size: .65rem;
  font-weight: 900;
  white-space: nowrap;
}
.teacher-global-absence-status.is-present {
  color: #166534;
  background: #dcfce7;
}
.teacher-global-absence-status.is-absent {
  color: #991b1b;
  background: #fee2e2;
}

@media (max-width: 720px) {
  .teacher-global-absence-control { gap: .2rem; padding: .14rem; }
  .teacher-global-absence-btn,
  .teacher-global-absence-status { font-size: .6rem; }
  .teacher-global-absence-btn { padding-inline: .48rem; }
  .teacher-global-absence-status { padding-inline: .4rem; }
}


/* Register page — fixed, centered mobile layout */
html:has(body.register-page),
body.register-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.register-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(147, 197, 253, .42), transparent 34%),
    radial-gradient(circle at 95% 100%, rgba(191, 219, 254, .48), transparent 38%),
    #f4f8fd;
}

.register-page .auth-layout {
  position: fixed;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  place-items: center;
  padding: clamp(.5rem, 2.2vh, 1.25rem) clamp(.5rem, 3vw, 1.5rem);
  overflow: hidden;
  overscroll-behavior: none;
}

.register-page .auth-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 620px);
  max-height: calc(100dvh - 1rem);
  min-height: 0;
  padding: clamp(.75rem, 2.4vh, 1.45rem) clamp(.8rem, 3vw, 2rem);
  overflow: hidden;
  border-color: #dbeafe;
  border-radius: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 16px 36px rgba(30, 64, 175, .12);
}

.register-page .brand-link,
.register-page .eyebrow,
.register-page h1,
.register-page .register-intro {
  text-align: center;
}

.register-page .brand-link {
  align-self: center;
  font-size: clamp(.86rem, 2.6vw, 1rem);
}

.register-page .eyebrow {
  margin: .35rem 0 .1rem;
  font-size: clamp(.82rem, 2.45vw, 1rem);
}

.register-page h1 {
  margin: .2rem 0 .15rem;
  color: #0f172a;
  font-size: clamp(1.5rem, 5.8vw, 2.2rem);
  line-height: 1.2;
}

.register-page .register-intro {
  margin: .15rem 0 .45rem;
  font-size: clamp(.72rem, 2.4vw, .9rem);
  line-height: 1.45;
}

.register-page .stack-form {
  gap: clamp(.28rem, 1vh, .62rem);
  min-height: 0;
  margin-top: .35rem;
  overflow: hidden;
}

.register-page .stack-form label {
  gap: .2rem;
  font-size: clamp(.72rem, 2.35vw, .86rem);
  line-height: 1.25;
}

.register-page .stack-form input,
.register-page .stack-form select {
  min-height: clamp(2rem, 5.2vh, 2.55rem);
  padding: .38rem .62rem;
  border-radius: .62rem;
  font-size: clamp(.78rem, 2.5vw, .92rem);
}

.register-page .field-hint {
  font-size: .72em;
}

.register-page .stack-form > label > .field-hint {
  margin-top: .05rem;
  font-size: clamp(.61rem, 1.9vw, .72rem);
  line-height: 1.2;
}

.register-page .pin-fields {
  gap: clamp(.45rem, 2vw, .8rem);
}

.register-page .registration-details {
  gap: clamp(.35rem, 1.1vh, .62rem);
  padding: clamp(.55rem, 1.5vh, .9rem);
  border-radius: .95rem;
}

.register-page .verification-heading {
  gap: .5rem;
}

.register-page .verification-heading h2 {
  margin: 0;
  font-size: clamp(.9rem, 3vw, 1.08rem);
  line-height: 1.2;
}

.register-page .verification-heading p {
  margin: .1rem 0 0;
  font-size: clamp(.62rem, 1.9vw, .74rem);
  line-height: 1.35;
}

.register-page .verification-step {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-size: .75rem;
}

.register-page .registration-details > label {
  font-size: clamp(.72rem, 2.35vw, .84rem);
}

.register-page #submit-btn {
  min-height: clamp(2rem, 5.4vh, 2.55rem);
  margin-top: .1rem;
  padding-block: .35rem;
  border-radius: .62rem;
  font-size: clamp(.75rem, 2.5vw, .9rem);
}

.register-page #register-message:not([hidden]) {
  margin: .05rem 0;
  padding: .42rem .58rem;
  font-size: clamp(.66rem, 2vw, .78rem);
  line-height: 1.3;
}

@media (max-width: 560px) {
  .register-page .auth-layout {
    padding: .5rem;
  }

  .register-page .auth-card {
    max-height: calc(100dvh - 1rem);
    padding: .7rem .72rem;
  }

  .register-page .pin-fields {
    gap: .45rem;
  }
}

@media (max-height: 620px) {
  .register-page .auth-card {
    padding-block: .48rem;
  }

  .register-page .brand-link { font-size: .8rem; }
  .register-page .eyebrow { margin-top: .15rem; font-size: .76rem; }
  .register-page h1 { margin-block: .08rem; font-size: 1.35rem; }
  .register-page .register-intro { margin-block: .05rem .2rem; font-size: .65rem; }
  .register-page .stack-form { gap: .22rem; margin-top: .15rem; }
  .register-page .stack-form label { gap: .12rem; font-size: .68rem; }
  .register-page .stack-form input,
  .register-page .stack-form select { min-height: 1.78rem; padding-block: .22rem; }
  .register-page .registration-details { gap: .25rem; padding: .45rem; }
  .register-page .verification-heading h2 { font-size: .84rem; }
  .register-page .verification-heading p { font-size: .57rem; }
  .register-page #submit-btn { min-height: 1.8rem; }
}


/* Parent login page — same fixed centered shell as registration */
html:has(body.parent-login-page),
body.parent-login-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.parent-login-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(147, 197, 253, .42), transparent 34%),
    radial-gradient(circle at 95% 100%, rgba(191, 219, 254, .48), transparent 38%),
    #f4f8fd;
}

.parent-login-page .auth-layout {
  position: fixed;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  place-items: center;
  padding: clamp(.5rem, 2.2vh, 1.25rem) clamp(.5rem, 3vw, 1.5rem);
  overflow: hidden;
  overscroll-behavior: none;
}

.parent-login-page .auth-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  max-height: calc(100dvh - 1rem);
  min-height: 0;
  padding: clamp(1rem, 3.4vh, 2.2rem) clamp(.85rem, 3vw, 2.2rem);
  overflow: hidden;
  border-color: #dbeafe;
  border-radius: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 16px 36px rgba(30, 64, 175, .12);
}

.parent-login-page .brand-link,
.parent-login-page .eyebrow,
.parent-login-page h1,
.parent-login-page .auth-card > p:not(.eyebrow):not(.muted),
.parent-login-page .muted {
  text-align: center;
}

.parent-login-page .brand-link {
  align-self: center;
  font-size: clamp(.86rem, 2.6vw, 1rem);
}

.parent-login-page .eyebrow {
  margin: .4rem 0 .1rem;
  font-size: clamp(.82rem, 2.45vw, 1rem);
}

.parent-login-page h1 {
  margin: .2rem 0 .2rem;
  color: #0f172a;
  font-size: clamp(1.5rem, 5.8vw, 2.2rem);
  line-height: 1.2;
}

.parent-login-page .auth-card > p:not(.eyebrow):not(.muted) {
  margin: .1rem 0 .65rem;
  color: #64748b;
  font-size: clamp(.72rem, 2.4vw, .9rem);
  line-height: 1.55;
}

.parent-login-page .stack-form {
  gap: clamp(.35rem, 1.2vh, .72rem);
  min-height: 0;
  margin-top: .35rem;
  overflow: hidden;
}

.parent-login-page .stack-form label {
  gap: .2rem;
  font-size: clamp(.75rem, 2.4vw, .9rem);
  line-height: 1.25;
}

.parent-login-page .stack-form input {
  min-height: clamp(2.15rem, 5.8vh, 2.8rem);
  padding: .4rem .65rem;
  border-radius: .62rem;
  font-size: clamp(.82rem, 2.6vw, .96rem);
}

.parent-login-page #parent-pin {
  direction: ltr;
  letter-spacing: .24em;
  text-align: center;
}

.parent-login-page .stack-form > .field-hint {
  margin-top: -.28rem;
  font-size: clamp(.62rem, 2vw, .74rem);
  line-height: 1.25;
  text-align: center;
}

.parent-login-page #login-error:not([hidden]) {
  margin: .05rem 0;
  padding: .45rem .6rem;
  font-size: clamp(.68rem, 2vw, .8rem);
  line-height: 1.35;
  text-align: center;
}

.parent-login-page .stack-form .cta-button {
  min-height: clamp(2.15rem, 5.8vh, 2.8rem);
  margin-top: .1rem;
  border-radius: .62rem;
  font-size: clamp(.8rem, 2.7vw, .96rem);
}

.parent-login-page .muted {
  margin: .85rem 0 0;
  font-size: clamp(.64rem, 2vw, .76rem);
  line-height: 1.55;
}

@media (max-width: 560px) {
  .parent-login-page .auth-layout { padding: .5rem; }
  .parent-login-page .auth-card { max-height: calc(100dvh - 1rem); padding: .85rem .75rem; }
}

@media (max-height: 620px) {
  .parent-login-page .auth-card { padding-block: .55rem; }
  .parent-login-page .brand-link { font-size: .8rem; }
  .parent-login-page .eyebrow { margin-top: .15rem; font-size: .76rem; }
  .parent-login-page h1 { margin-block: .08rem; font-size: 1.35rem; }
  .parent-login-page .auth-card > p:not(.eyebrow):not(.muted) { margin-block: .05rem .25rem; font-size: .65rem; }
  .parent-login-page .stack-form { gap: .26rem; margin-top: .15rem; }
  .parent-login-page .stack-form label { gap: .12rem; font-size: .7rem; }
  .parent-login-page .stack-form input { min-height: 1.85rem; padding-block: .24rem; }
  .parent-login-page .stack-form .cta-button { min-height: 1.85rem; }
  .parent-login-page .muted { margin-top: .4rem; font-size: .6rem; }
}


.sofizpay-payment-help {
  margin: .45rem 0 .1rem;
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}
.teacher-dashboard-page .teacher-payments-panel.teacher-tab-panel.is-active {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
  -webkit-overflow-scrolling: touch;
}

.teacher-dashboard-page .teacher-payments-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, .82);
  box-shadow: 0 18px 40px rgba(2, 6, 23, .18);
}

.teacher-dashboard-page .teacher-payments-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.teacher-dashboard-page .teacher-payments-heading h2 {
  margin: .25rem 0 .35rem;
  color: #f8fafc;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.teacher-dashboard-page .teacher-payments-heading p {
  margin: 0;
  color: #cbd5e1;
  font-size: .9rem;
}

.teacher-dashboard-page .teacher-payments-count {
  flex: 0 0 auto;
  min-width: 6.5rem;
  padding: .55rem .8rem;
  color: #dbeafe;
  text-align: center;
  font-weight: 800;
  border: 1px solid rgba(96, 165, 250, .35);
  border-radius: .8rem;
  background: rgba(37, 99, 235, .2);
}

.teacher-dashboard-page .teacher-payments-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: .9rem;
  overscroll-behavior: contain;
}

.teacher-dashboard-page .teacher-payments-table-wrap table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
}

.teacher-dashboard-page .teacher-payments-table-wrap th,
.teacher-dashboard-page .teacher-payments-table-wrap td {
  padding: .75rem .85rem;
  text-align: right;
  vertical-align: middle;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
}

.teacher-dashboard-page .teacher-payments-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #bfdbfe;
  font-size: .78rem;
  background: #172554;
}

.teacher-dashboard-page .teacher-payments-table-wrap td {
  color: #e2e8f0;
  font-size: .9rem;
}

.teacher-dashboard-page .teacher-payments-table-wrap tbody tr:hover {
  background: rgba(59, 130, 246, .08);
}

.teacher-dashboard-page .teacher-payments-table-wrap .payment-student-name {
  color: #fff;
  font-weight: 800;
}

.teacher-dashboard-page .teacher-payments-table-wrap .payment-muted {
  color: #94a3b8;
}

.teacher-dashboard-page .teacher-payments-table-wrap .payment-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: .25rem .65rem;
  color: #bbf7d0;
  font-weight: 800;
  border: 1px solid rgba(74, 222, 128, .28);
  border-radius: 999px;
  background: rgba(22, 101, 52, .3);
}

.teacher-dashboard-page .teacher-payments-table-wrap .payment-status-badge.is-pending {
  color: #fde68a;
  border-color: rgba(250, 204, 21, .28);
  background: rgba(133, 77, 14, .3);
}

.teacher-dashboard-page .teacher-payments-table-wrap .payment-receipt-view-btn {
  min-height: 2.2rem;
  padding: .4rem .7rem;
  color: #dbeafe;
  font: inherit;
  font-weight: 800;
  border: 1px solid rgba(96, 165, 250, .35);
  border-radius: .65rem;
  background: rgba(37, 99, 235, .3);
  cursor: pointer;
}

.teacher-dashboard-page .teacher-payments-empty {
  margin: 1rem 0 0;
  padding: 1.2rem;
  color: #cbd5e1;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, .3);
  border-radius: .8rem;
}

@media (max-width: 900px) {
  .teacher-dashboard-page .teacher-payments-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .teacher-dashboard-page .teacher-payments-count {
    align-self: flex-start;
  }
}
.parent-login-page .auth-secondary-action,
.force-pin-page .auth-secondary-action {
  min-height: 2.2rem;
  padding: .45rem .8rem;
  color: #1d4ed8;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  border: 1px solid #bfdbfe;
  border-radius: .62rem;
  background: #eff6ff;
  cursor: pointer;
}

.parent-login-page .auth-secondary-action:hover,
.force-pin-page .auth-secondary-action:hover {
  background: #dbeafe;
}

.parent-login-page .form-success,
.force-pin-page .form-success {
  margin: .05rem 0;
  padding: .5rem .65rem;
  color: #166534;
  font-size: .78rem;
  line-height: 1.45;
  text-align: center;
  border-radius: .6rem;
  background: #dcfce7;
}

.parent-login-page .form-success.is-error,
.force-pin-page .form-success.is-error {
  color: #991b1b;
  background: #fee2e2;
}

.force-pin-page .force-pin-intro {
  margin: .2rem 0 .75rem;
  color: #64748b;
  line-height: 1.6;
  text-align: center;
}

.force-pin-page .auth-card {
  width: min(100%, 520px);
}

.force-pin-page .stack-form input {
  direction: ltr;
  letter-spacing: .2em;
  text-align: center;
}

.force-pin-page .stack-form .cta-button {
  min-height: 2.65rem;
}

@media (max-width: 560px) {
  .parent-login-page .auth-secondary-action,
  .force-pin-page .auth-secondary-action {
    min-height: 2rem;
    font-size: .76rem;
  }

  .force-pin-page .force-pin-intro {
    font-size: .8rem;
  }
}
.teacher-tab-button[data-dashboard-tab="forgot-pin-requests"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
}

.forgot-pin-tab-badge {
  display: inline-grid;
  min-width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  padding: 0 .28rem;
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
}

.forgot-pin-tab-badge[hidden] {
  display: none;
}

.teacher-tab-button[data-dashboard-tab="forgot-pin-requests"].has-forgot-pin-requests {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff1f2;
}
.forgot-pin-dialog,
.forgot-pin-success-dialog {
  width: min(100%, 31rem);
}

.forgot-pin-form {
  display: grid;
  gap: .7rem;
  margin-top: 1rem;
  text-align: right;
}

.forgot-pin-form label {
  color: #dbeafe;
  font-size: .92rem;
  font-weight: 800;
}

.forgot-pin-form input {
  width: 100%;
  min-height: 3.2rem;
  padding: .75rem 1rem;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  text-align: center;
  direction: ltr;
  background: #fff;
  border: 1px solid rgba(147, 197, 253, .7);
  border-radius: .8rem;
  outline: none;
}

.forgot-pin-form input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .2);
}

.forgot-pin-submit,
.forgot-pin-call-action {
  width: 100%;
  min-height: 3.1rem;
  margin-top: .35rem;
  justify-content: center;
}

.forgot-pin-success-icon {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  color: #dcfce7;
  font-size: 1.65rem;
  font-weight: 900;
  background: #16a34a;
  border-radius: 50%;
}

.forgot-pin-call-action {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.forgot-pin-call-action:hover,
.forgot-pin-call-action:focus-visible {
  background: linear-gradient(135deg, #15803d, #166534);
}

/* قائمة التلاميذ: عرض الجدول مباشرة دون الإطار العلوي أو زر بدء الحصة */
.teacher-dashboard-page .teacher-roster.teacher-tab-panel.is-active .roster-heading {
  display: none;
}

.teacher-dashboard-page .teacher-roster.teacher-tab-panel.is-active {
  gap: .4rem;
  padding: .55rem;
}

.teacher-dashboard-page .teacher-roster.teacher-tab-panel.is-active .roster-toolbar {
  margin: 0;
}

.teacher-dashboard-page .teacher-roster.teacher-tab-panel.is-active .teacher-table-card {
  margin-top: 0;
}

/* الدفعات الإلكترونية: نجاح العملية ومحاولات الدفع غير المكتملة */
.teacher-electronic-summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}

.electronic-summary-success,
.electronic-summary-attempts {
  display: inline-flex;
  min-height: 1.9rem;
  align-items: center;
  padding: .35rem .6rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}

.electronic-summary-success { color: #166534; background: #dcfce7; border: 1px solid #86efac; }
.electronic-summary-attempts { color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; }

.payment-status-badge.is-failed { color: #991b1b; background: #fee2e2; border-color: #fca5a5; }
.payment-status-badge.is-attempt { color: #92400e; background: #fef3c7; border-color: #fcd34d; }
.payment-status-badge.is-pending { color: #1d4ed8; background: #dbeafe; border-color: #93c5fd; }
.payment-status-badge.is-paid { color: #166534; background: #dcfce7; border-color: #86efac; }

.payment-reconcile-btn {
  min-height: 2.1rem;
  padding: .38rem .62rem;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: var(--border-radius-button);
  font: inherit;
  font-size: .67rem;
  font-weight: 900;
  cursor: pointer;
}

.payment-reconcile-btn:hover:not(:disabled) { color: #fff; background: #2563eb; }

.sofizpay-reconcile-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(4px);
}

.sofizpay-reconcile-dialog {
  width: min(100%, 28rem);
  padding: 1.25rem;
  direction: rtl;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(15, 23, 42, .25);
}

.sofizpay-reconcile-dialog h3 { margin: 0; color: #1e3a8a; font-size: 1rem; }
.sofizpay-reconcile-dialog p { margin: .6rem 0 .9rem; color: #64748b; font-size: .8rem; line-height: 1.6; }
.sofizpay-reconcile-dialog input { width: 100%; min-height: 2.7rem; padding: .65rem .75rem; direction: ltr; border: 1px solid #93c5fd; border-radius: .65rem; font: inherit; }
.sofizpay-reconcile-actions { display: flex; gap: .55rem; justify-content: flex-start; margin-top: .9rem; }
.sofizpay-reconcile-cancel, .sofizpay-reconcile-confirm { min-height: 2.35rem; padding: .45rem .8rem; border-radius: .6rem; font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; }
.sofizpay-reconcile-cancel { color: #475569; background: #f1f5f9; border: 1px solid #cbd5e1; }
.sofizpay-reconcile-confirm { color: #fff; background: #2563eb; border: 1px solid #2563eb; }

.payment-attempt-dismiss-btn {
  min-height: 2.1rem;
  padding: .38rem .62rem;
  color: #991b1b;
  background: #fff1f2;
  border: 1px solid #fda4af;
  border-radius: var(--border-radius-button);
  font: inherit;
  font-size: .67rem;
  font-weight: 900;
  cursor: pointer;
}

.payment-attempt-dismiss-btn:hover:not(:disabled) { color: #fff; background: #dc2626; }
.payment-retained-label { color: #166534; font-size: .65rem; font-weight: 800; white-space: nowrap; }

@media (max-width: 720px) {
  .teacher-electronic-summary { order: 3; width: 100%; }
  .teacher-payments-heading { flex-wrap: wrap; }
}


/* Professional level-aware teacher overview */
.overview-context-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.15rem 1.35rem;
  border: 1px solid #dbe5f2;
  border-radius: 1.25rem;
  background: linear-gradient(120deg, #ffffff 0%, #f8fbff 58%, #eef5ff 100%);
  box-shadow: 0 .6rem 1.6rem rgba(15, 23, 42, .06);
}
.overview-context-copy h1 { margin: .2rem 0 .35rem; color: #102345; font-size: clamp(1.28rem, 2.5vw, 1.85rem); }
.overview-context-copy p:not(.eyebrow) { margin: 0; color: #64748b; font-size: .78rem; line-height: 1.7; }
.overview-context-meta { display: grid; min-width: 15rem; gap: .25rem; padding: .75rem .9rem; border: 1px solid #dbeafe; border-radius: .9rem; background: rgba(255,255,255,.82); }
.overview-academy-label { color: #64748b; font-size: .64rem; font-weight: 800; }
.overview-context-meta strong { color: #1d4ed8; font-size: .93rem; }
.overview-context-meta .dashboard-date { color: #475569; font-size: .68rem; }
.overview-class-state { display: inline-flex; width: fit-content; padding: .2rem .48rem; color: #166534; border-radius: 999px; background: #dcfce7; font-size: .62rem; font-weight: 900; }
.overview-dashboard-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .85rem; }
.overview-dashboard-grid .bento-card { min-height: 9.5rem; padding: 1.05rem; }
.overview-hero-card { grid-column: span 5; color: #fff; border-color: #123e94; background: linear-gradient(135deg, #0b2f77, #1556c7 68%, #2f7ee8); }
.overview-hero-card .bento-kicker { color: #bfdbfe; }
.overview-hero-card h2 { position: relative; z-index: 1; margin: .95rem 0 .3rem; font-size: 1.35rem; }
.overview-hero-card p { position: relative; z-index: 1; max-width: 22rem; margin: 0; color: #dbeafe; font-size: .76rem; line-height: 1.75; }
.overview-kpi-card { grid-column: span 2; display: grid; align-content: center; gap: .35rem; background: #fff; }
.overview-kpi-label { color: #64748b; font-size: .68rem; font-weight: 900; }
.overview-kpi-card strong { color: #153a7b; font-family: Arial, sans-serif; font-size: 2rem; line-height: 1; }
.overview-kpi-card small { color: #94a3b8; font-size: .63rem; font-weight: 700; }
.overview-kpi-green { background: linear-gradient(145deg, #f0fdf4, #fff); }
.overview-kpi-green strong { color: #15803d; }
.overview-kpi-blue { background: linear-gradient(145deg, #eff6ff, #fff); }
.overview-kpi-blue strong { color: #1d4ed8; }
.overview-revenue-card { grid-column: span 5; background: linear-gradient(145deg, #fffdf2, #fff); }
.overview-revenue-mark { padding: .25rem .42rem; color: #a16207; border-radius: .45rem; background: #fef3c7; font-size: .62rem; font-weight: 900; }
.overview-revenue-card > strong { display: block; margin: 1rem 0 .25rem; color: #0f766e; font-family: Arial, sans-serif; font-size: 1.9rem; }
.overview-revenue-card p { margin: 0; color: #64748b; font-size: .68rem; }
.overview-revenue-split { display: flex; gap: 1rem; margin-top: .9rem; color: #64748b; font-size: .68rem; font-weight: 800; }
.overview-revenue-split b { margin-right: .25rem; color: #153a7b; font-family: Arial, sans-serif; font-size: .95rem; }
.overview-attention-card { grid-column: span 4; background: linear-gradient(145deg, #fff7ed, #fff); }
.attention-pulse { width: .52rem; height: .52rem; border-radius: 50%; background: #f97316; box-shadow: 0 0 0 .25rem rgba(249,115,22,.14); }
.overview-attention-list { display: grid; gap: .42rem; margin-top: .85rem; }
.overview-attention-list div { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .46rem .55rem; border-radius: .6rem; background: rgba(255,255,255,.8); color: #64748b; font-size: .67rem; font-weight: 800; }
.overview-attention-list strong { color: #c2410c; font-family: Arial, sans-serif; font-size: 1.05rem; }
.overview-class-card { grid-column: span 3; background: linear-gradient(145deg, #f5f3ff, #fff); }
.overview-class-card h2 { margin: .9rem 0 .3rem; color: #4c1d95; font-size: 1.05rem; }
.overview-class-card p { min-height: 2.4rem; margin: 0; color: #64748b; font-size: .68rem; line-height: 1.7; }
.overview-secondary-action { display: inline-flex; margin-top: .7rem; padding: .48rem .65rem; color: #5b21b6; border: 1px solid #ddd6fe; border-radius: .55rem; background: #f5f3ff; font-size: .66rem; font-weight: 900; text-decoration: none; }
.overview-activity-card { grid-column: span 6; background: linear-gradient(145deg, #fbf8ff, #fff); }
.overview-activity-card h2 { margin: .9rem 0 .3rem; color: #4c1d95; font-size: 1.05rem; }
.overview-activity-card p { margin: 0; color: #64748b; font-size: .72rem; }
.overview-quick-card { grid-column: span 6; color: #fff; border-color: #102d69; background: #102d69; }
.overview-quick-card .bento-kicker { color: #bfdbfe; }
.overview-quick-card .quick-action-grid { margin-top: .85rem; }
.overview-quick-card .quick-action-grid a,.overview-quick-card .quick-action-grid button { color: #e0edff; border-color: rgba(191,219,254,.24); background: rgba(255,255,255,.07); }
@media (max-width: 1080px) {
  .overview-hero-card { grid-column: span 6; }
  .overview-kpi-card { grid-column: span 2; }
  .overview-revenue-card { grid-column: span 6; }
  .overview-attention-card { grid-column: span 6; }
  .overview-class-card { grid-column: span 6; }
}
@media (max-width: 720px) {
  .overview-context-bar { grid-template-columns: 1fr; gap: .8rem; }
  .overview-context-meta { min-width: 0; }
  .overview-hero-card,.overview-kpi-card,.overview-revenue-card,.overview-attention-card,.overview-class-card,.overview-activity-card,.overview-quick-card { grid-column: span 12; }
}

/* Teacher notification campaigns */
.teacher-dashboard-page .teacher-notifications-panel.teacher-tab-panel.is-active {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  margin-top: 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
  -webkit-overflow-scrolling: touch;
}
.teacher-notifications-card { padding: 1.35rem; border: 1px solid var(--border-color); border-radius: var(--border-radius-card); background: var(--surface-white); box-shadow: var(--shadow-card); }
.teacher-notifications-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border-color); }
.teacher-notifications-heading h2 { margin: .2rem 0 .35rem; font-size: clamp(1.15rem, 2vw, 1.45rem); }
.teacher-notifications-heading p { margin: 0; color: var(--text-muted); font-size: .82rem; }
.teacher-notifications-status { display: inline-flex; align-items: center; padding: .42rem .72rem; border-radius: 999px; color: #047857; background: #ecfdf5; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.teacher-notification-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin: 1.1rem 0; }
.teacher-notification-steps span { padding: .62rem .7rem; border: 1px solid var(--border-color); border-radius: .7rem; color: var(--text-muted); background: #f8fafc; font-size: .75rem; font-weight: 700; text-align: center; }
.teacher-notification-steps span.is-done { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.teacher-notification-steps span.is-current { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.teacher-notification-form fieldset { min-width: 0; margin: 0; padding: .9rem; border: 1px solid var(--border-color); border-radius: .85rem; }
.teacher-notification-form legend { padding: 0 .3rem; color: var(--text-main); font-size: .84rem; font-weight: 800; }
.teacher-notification-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.teacher-notification-option { display: flex; align-items: flex-start; gap: .55rem; margin-top: .5rem; padding: .65rem .7rem; border: 1px solid #e2e8f0; border-radius: .65rem; background: #fff; cursor: pointer; }
.teacher-notification-option:hover { border-color: #93c5fd; background: #f8fbff; }
.teacher-notification-option input { flex: 0 0 auto; margin-top: .2rem; accent-color: #2563eb; }
.teacher-notification-option strong, .teacher-notification-option small { display: block; }
.teacher-notification-option strong { font-size: .78rem; }
.teacher-notification-option small { margin-top: .15rem; color: var(--text-muted); font-size: .68rem; line-height: 1.45; }
.teacher-notification-target-fieldset { margin-top: 1rem !important; }
.teacher-notification-student-picker { margin-top: .7rem; padding: .7rem; border: 1px solid #bfdbfe; border-radius: .7rem; background: #f8fbff; }
.teacher-notification-student-picker[hidden] { display: none; }
.teacher-notification-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .55rem; color: #1e3a8a; font-size: .75rem; }
.teacher-notification-picker-heading button { padding: .35rem .55rem; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: .45rem; font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.teacher-notification-student-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; max-height: 14rem; overflow-y: auto; }
.teacher-notification-student-list > p { margin: .2rem; color: #64748b; font-size: .7rem; }
.teacher-notification-student-option { display: flex; align-items: flex-start; gap: .45rem; padding: .5rem; color: #334155; background: #fff; border: 1px solid #e2e8f0; border-radius: .5rem; cursor: pointer; }
.teacher-notification-student-option:has(input:checked) { border-color: #60a5fa; background: #eff6ff; }
.teacher-notification-student-option input { flex: 0 0 auto; margin-top: .18rem; accent-color: #2563eb; }
.teacher-notification-student-option strong, .teacher-notification-student-option small { display: block; }
.teacher-notification-student-option strong { font-size: .72rem; }
.teacher-notification-student-option small { margin-top: .12rem; color: #64748b; font-size: .6rem; }
.teacher-notification-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin-top: 1rem; }
.teacher-notification-fields label { display: grid; gap: .35rem; color: var(--text-main); font-size: .78rem; font-weight: 800; }
.teacher-notification-fields .teacher-notification-body-label { grid-column: 1 / -1; }
.teacher-notification-fields input, .teacher-notification-fields select, .teacher-notification-fields textarea, .teacher-notification-schedule-fields input { width: 100%; border: 1px solid #cbd5e1; border-radius: .65rem; padding: .7rem .75rem; color: var(--text-main); background: #fff; font: inherit; font-size: .78rem; }
.teacher-notification-fields textarea { min-height: 6.2rem; resize: vertical; }
.teacher-notification-fields input:focus, .teacher-notification-fields select:focus, .teacher-notification-fields textarea:focus, .teacher-notification-schedule-fields input:focus { border-color: #2563eb; outline: 0; box-shadow: 0 0 0 3px #2563eb1a; }
.teacher-notification-audience { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: .8rem .95rem; border: 1px solid #a7f3d0; border-radius: .75rem; background: #ecfdf5; }
.teacher-notification-audience strong, .teacher-notification-audience small { display: block; }
.teacher-notification-audience strong { color: #065f46; font-size: .78rem; }
.teacher-notification-audience small { margin-top: .16rem; color: #047857; font-size: .68rem; }
.teacher-notification-audience b { color: #065f46; font-size: 1rem; white-space: nowrap; }
.teacher-notification-delivery, .teacher-notification-channel-fieldset { margin-top: 1rem !important; }
.teacher-notification-channel-fieldset { background: #f8fafc; }
.teacher-notification-channel-status { margin: .65rem 0 0; padding: .6rem .7rem; border-radius: .55rem; color: #92400e; background: #fffbeb; font-size: .7rem; font-weight: 700; }
.teacher-notification-channel-status.is-configured { color: #047857; background: #ecfdf5; }
.teacher-notification-channel-status.is-sms { color: #1d4ed8; background: #eff6ff; }
.teacher-notification-channel-status.is-messenger { color: #6b21a8; background: #faf5ff; }
.teacher-notification-option.is-disabled { cursor: not-allowed; opacity: .55; }
.teacher-notification-option.is-disabled:hover { border-color: #e2e8f0; background: #fff; }
.teacher-notification-schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .65rem; padding: .7rem; border: 1px solid #fed7aa; border-radius: .65rem; background: #fff7ed; }
.teacher-notification-schedule-fields[hidden] { display: none; }
.teacher-notification-schedule-fields label { display: grid; gap: .3rem; color: #9a3412; font-size: .72rem; font-weight: 800; }
.teacher-notification-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.teacher-notification-session { display: flex; align-items: flex-start; gap: .55rem; color: var(--text-main); font-size: .75rem; }
.teacher-notification-session input { flex: 0 0 auto; margin-top: .2rem; accent-color: #059669; }
.teacher-notification-session strong, .teacher-notification-session small { display: block; }
.teacher-notification-session small { margin-top: .18rem; color: var(--text-muted); font-size: .67rem; }
.teacher-notification-form-actions button:disabled { cursor: wait; opacity: .6; }
.teacher-notification-feedback { margin: .75rem 0 0; padding: .65rem .75rem; border-radius: .6rem; color: #065f46; background: #ecfdf5; font-size: .75rem; font-weight: 700; }
.teacher-notification-feedback.is-error { color: #991b1b; background: #fef2f2; }
.teacher-notification-history { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.teacher-notification-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.teacher-notification-history-heading h3 { margin: 0; font-size: .95rem; }
.teacher-notification-refresh, .teacher-notification-cancel { border: 1px solid #cbd5e1; border-radius: .55rem; padding: .42rem .65rem; color: #334155; background: #fff; font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer; }
.teacher-notification-history-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .7rem; margin-top: .6rem; padding: .7rem .75rem; border: 1px solid #e2e8f0; border-radius: .65rem; background: #fbfdff; }
.teacher-notification-history-item strong, .teacher-notification-history-item small { display: block; }
.teacher-notification-history-item strong { font-size: .76rem; }
.teacher-notification-history-item small { margin-top: .12rem; color: var(--text-muted); font-size: .65rem; }
.teacher-notification-history-status { color: #1d4ed8; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.teacher-notification-history-status.status-sent { color: #047857; }
.teacher-notification-history-status.status-failed { color: #b91c1c; }
.teacher-notification-history-status.status-cancelled { color: #64748b; }
.teacher-notification-history-date { text-align: left; white-space: nowrap; }
.teacher-notification-empty { margin: .8rem 0 0; color: var(--text-muted); font-size: .75rem; }
.teacher-notifications-tab { color: #047857; }
.teacher-dashboard-page .teacher-tab-button.teacher-notifications-tab.is-active { color: #fff; background: #059669; border-color: #059669; }
@media (max-width: 720px) { .teacher-notification-grid, .teacher-notification-fields, .teacher-notification-student-list { grid-template-columns: 1fr; } .teacher-notification-fields .teacher-notification-body-label { grid-column: auto; } .teacher-notification-form-actions, .teacher-notification-audience { align-items: stretch; flex-direction: column; } .teacher-notification-form-actions .cta-button { width: 100%; } .teacher-notification-steps { grid-template-columns: 1fr; } .teacher-notification-history-item { grid-template-columns: 1fr auto; } .teacher-notification-history-date { grid-column: 1 / -1; text-align: right; } }

/* Notification delivery and read statistics */
.teacher-notification-statistics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.teacher-notification-stat { display: grid; gap: .18rem; padding: .75rem .85rem; border: 1px solid #bfdbfe; border-radius: .75rem; background: #eff6ff; }
.teacher-notification-stat strong { color: #1d4ed8; font-size: 1.35rem; line-height: 1; }
.teacher-notification-stat span { color: #475569; font-size: .7rem; font-weight: 700; }
.teacher-notification-stat-read { border-color: #a7f3d0; background: #ecfdf5; }
.teacher-notification-stat-read strong { color: #047857; }
.teacher-notification-stat-unread { border-color: #fed7aa; background: #fff7ed; }
.teacher-notification-stat-unread strong { color: #c2410c; }
.teacher-notification-history-statistics { grid-column: 1 / -1; margin-top: -.15rem !important; color: #475569 !important; font-size: .68rem !important; font-weight: 700; }
@media (max-width: 560px) { .teacher-notification-statistics { grid-template-columns: 1fr; } }


/* Referral withdrawal review */
.teacher-dashboard-page .teacher-referral-withdrawals-panel.teacher-tab-panel.is-active {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  margin-top: 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
  -webkit-overflow-scrolling: touch;
}
.teacher-referral-withdrawals-card { padding: 1.35rem; }
.teacher-referral-withdrawal-summary { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.teacher-referral-withdrawal-summary span { padding: .42rem .62rem; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; font-size: .72rem; font-weight: 900; white-space: nowrap; }
.teacher-referral-withdrawal-toolbar { display: flex; align-items: end; justify-content: space-between; gap: .8rem; margin: 1rem 0; padding: .75rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #f8fafc; }
.teacher-referral-withdrawal-toolbar label { display: grid; gap: .3rem; color: #475569; font-size: .72rem; font-weight: 800; }
.teacher-referral-withdrawal-toolbar select { min-width: 11rem; padding: .55rem .65rem; color: #0f172a; background: #fff; border: 1px solid #cbd5e1; border-radius: .55rem; font: inherit; font-size: .75rem; }
.teacher-referral-withdrawal-toolbar select:focus { outline: 0; border-color: #2563eb; box-shadow: 0 0 0 3px #2563eb1a; }
.teacher-referral-withdrawals-card .teacher-payments-table-wrap { overflow-x: auto; }
.teacher-referral-withdrawals-card table { min-width: 62rem; }
.teacher-baridimob-account { direction: ltr; text-align: left; letter-spacing: .04em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.teacher-referral-withdrawal-actions { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 10rem; }
.teacher-referral-withdrawal-actions button { min-height: 2.1rem; padding: .35rem .5rem; border-radius: .5rem; font: inherit; font-size: .68rem; font-weight: 900; cursor: pointer; }
.teacher-withdrawal-approve { color: #fff; background: #059669; border: 1px solid #059669; }
.teacher-withdrawal-approve:hover { background: #047857; }
.teacher-withdrawal-reject { color: #b91c1c; background: #fff; border: 1px solid #fecaca; }
.teacher-withdrawal-reject:hover { background: #fef2f2; }
.teacher-referral-withdrawal-actions button:disabled { opacity: .55; cursor: wait; }
.teacher-withdrawal-reviewed { color: #64748b; font-size: .7rem; line-height: 1.55; }
.teacher-referral-withdrawals-feedback { margin: .8rem 0 0; padding: .65rem .75rem; color: #065f46; background: #ecfdf5; border-radius: .6rem; font-size: .75rem; font-weight: 800; }
.teacher-referral-withdrawals-feedback.is-error { color: #991b1b; background: #fef2f2; }
@media (max-width: 720px) { .teacher-referral-withdrawal-toolbar { align-items: stretch; flex-direction: column; } .teacher-referral-withdrawal-toolbar select, .teacher-referral-withdrawal-toolbar button { width: 100%; } .teacher-referral-withdrawal-summary { align-items: flex-start; flex-direction: column; } }


.teacher-referral-activity { margin: 1rem 0 1.25rem; padding: 1rem; border: 1px solid #dbeafe; border-radius: .85rem; background: #f8fbff; }
.teacher-referral-activity-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.teacher-referral-activity-heading h3 { margin: 0; color: #0f172a; font-size: .95rem; }
.teacher-referral-activity-heading p { margin: .25rem 0 0; color: #64748b; font-size: .7rem; line-height: 1.6; }
.teacher-referral-activity-heading > span { padding: .35rem .55rem; color: #1d4ed8; background: #eff6ff; border-radius: 999px; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.teacher-referral-activity-list { display: grid; gap: .55rem; }
.teacher-referral-activity-card { border: 1px solid #dbeafe; border-radius: .7rem; background: #fff; overflow: hidden; }
.teacher-referral-activity-card summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .75rem; cursor: pointer; list-style: none; }
.teacher-referral-activity-card summary::-webkit-details-marker { display: none; }
.teacher-referral-activity-card summary::before { content: "＋"; order: 2; color: #2563eb; font-size: 1rem; font-weight: 900; }
.teacher-referral-activity-card[open] summary::before { content: "−"; }
.teacher-referral-activity-card summary > span:first-child { min-width: 8rem; }
.teacher-referral-activity-card summary strong, .teacher-referral-activity-card summary small { display: block; }
.teacher-referral-activity-card summary strong { color: #0f172a; font-size: .78rem; }
.teacher-referral-activity-card summary small { margin-top: .18rem; color: #64748b; font-size: .66rem; }
.teacher-referral-activity-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.teacher-referral-activity-stats b { padding: .28rem .42rem; color: #475569; background: #f1f5f9; border-radius: .4rem; font-size: .65rem; white-space: nowrap; }
.teacher-referral-activity-stats b:nth-child(2) { color: #047857; background: #ecfdf5; }
.teacher-referral-activity-stats b:nth-child(3) { color: #92400e; background: #fffbeb; }
.teacher-referral-activity-card ul { display: grid; gap: .4rem; margin: 0; padding: .65rem .75rem .75rem; border-top: 1px solid #e2e8f0; list-style: none; }
.teacher-referral-activity-card li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem .6rem; background: #f8fafc; border-radius: .5rem; }
.teacher-referral-activity-card li strong, .teacher-referral-activity-card li small { display: block; }
.teacher-referral-activity-card li strong { color: #334155; font-size: .7rem; }
.teacher-referral-activity-card li small { margin-top: .15rem; color: #64748b; font-size: .62rem; }
.teacher-referral-activity-card li b { padding: .28rem .4rem; border-radius: .4rem; font-size: .64rem; white-space: nowrap; }
.teacher-referral-activity-card li b.is-registered { color: #1d4ed8; background: #eff6ff; }
.teacher-referral-activity-card li b.is-upgraded { color: #047857; background: #ecfdf5; }
.teacher-referral-referral-copy { display: grid; gap: .35rem; min-width: 0; flex: 1 1 auto; }
.teacher-referral-referral-copy > strong { direction: ltr; text-align: right; }
.teacher-referral-referral-copy > small { margin: 0; }
.teacher-referral-level-list { display: grid; gap: .35rem; margin-top: .15rem; }
.teacher-referral-level-detail { padding: .45rem .5rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .45rem; }
.teacher-referral-level-detail header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.teacher-referral-level-detail header strong { color: #1e3a8a; font-size: .68rem; }
.teacher-referral-level-detail header span { color: #64748b; font-size: .6rem; }
.teacher-referral-level-detail ul { display: flex; flex-wrap: wrap; gap: .25rem; margin: .35rem 0 0; padding: 0; border: 0; list-style: none; }
.teacher-referral-level-detail li { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .35rem; color: #334155; background: #f8fafc; border-radius: .3rem; font-size: .62rem; }
.teacher-referral-level-detail li small { margin: 0; font-size: .56rem; font-weight: 800; }
.teacher-referral-level-detail li small.is-paid { color: #047857; }
.teacher-referral-level-detail li small.is-unpaid { color: #b45309; }
.teacher-referral-level-list > p { margin: 0; color: #64748b; font-size: .62rem; }
.teacher-referral-activity-empty { margin: 0; padding: .8rem; color: #64748b; border: 1px dashed #cbd5e1; border-radius: .55rem; background: #fff; font-size: .72rem; text-align: center; }
.teacher-referral-activity-empty.is-error { color: #991b1b; background: #fef2f2; }
@media (max-width: 720px) { .teacher-referral-activity-heading { flex-direction: column; } .teacher-referral-activity-card summary { align-items: flex-start; flex-direction: column; } .teacher-referral-activity-card summary::before { display: none; } .teacher-referral-activity-stats { justify-content: flex-start; } .teacher-referral-activity-card li { align-items: flex-start; flex-direction: column; } }


/* Teacher dashboard: internal scrollable section navigation */
.teacher-dashboard-page .teacher-main-frame {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  direction: rtl;
  flex: 1 1 auto;
  gap: .85rem;
  min-height: 0;
  padding: .65rem;
  overflow: hidden;
  border: 1px solid #d8e2ee;
  border-radius: 1rem;
  background: #f8fafc;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
}

.teacher-dashboard-page .teacher-tabs-nav {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: .3rem;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  padding: .45rem;
  overflow-x: hidden;
  overflow-y: auto;
  direction: rtl;
  border: 1px solid #dbe4ef;
  border-radius: .8rem;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #bfdbfe transparent;
}

.teacher-dashboard-page .teacher-tabs-nav::-webkit-scrollbar {
  display: block;
  width: .38rem;
}

.teacher-dashboard-page .teacher-tabs-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #bfdbfe;
}

.teacher-dashboard-page .teacher-tab-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem .7rem;
  text-align: right;
  white-space: normal;
}

.teacher-dashboard-page .teacher-tab-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  direction: rtl;
}

.teacher-dashboard-page .teacher-tab-content > .teacher-tab-panel.is-active {
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.teacher-dashboard-page .teacher-tab-content > .teacher-bento-grid.teacher-tab-panel.is-active {
  flex: 1 1 auto;
  overflow: auto;
}

.teacher-dashboard-page .teacher-tab-content > .teacher-roster.teacher-tab-panel.is-active,
.teacher-dashboard-page .teacher-tab-content > .schedule-manager.teacher-tab-panel.is-active,
.teacher-dashboard-page .teacher-tab-content > .class-registry-manager.teacher-tab-panel.is-active,
.teacher-dashboard-page .teacher-tab-content > .lesson-repository-manager.teacher-tab-panel.is-active,
.teacher-dashboard-page .teacher-tab-content > .assignment-manager.teacher-tab-panel.is-active {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .teacher-dashboard-page .teacher-main-frame {
    grid-template-columns: minmax(165px, 190px) minmax(0, 1fr);
    gap: .6rem;
  }

  .teacher-dashboard-page .teacher-tab-button {
    padding-inline: .55rem;
    font-size: .69rem;
  }
}

@media (max-width: 720px) {
  .teacher-dashboard-page .teacher-main-frame {
    grid-template-columns: minmax(138px, 38vw) minmax(0, 1fr);
    gap: .45rem;
    padding: .45rem;
    border-radius: .8rem;
  }

  .teacher-dashboard-page .teacher-tabs-nav {
    padding: .32rem;
    border-radius: .65rem;
  }

  .teacher-dashboard-page .teacher-tab-button {
    min-height: 2.55rem;
    padding: .48rem .45rem;
    font-size: .65rem;
  }
}

@media (max-width: 430px) {
  .teacher-dashboard-page .teacher-main-frame {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .teacher-dashboard-page .teacher-tab-button {
    font-size: .61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-dashboard-page .teacher-tab-button {
    transition: none;
  }
}


/* The external teacher sidebar was replaced by the internal right-side section menu. */
.teacher-dashboard-page .teacher-dashboard-shell {
  margin-right: 0;
}

/* Independent Facebook Messenger control panel */
.teacher-messenger-panel.teacher-tab-panel.is-active { display: block; flex: 1 1 0; min-height: 0; margin-top: 1.25rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.teacher-messenger-card { padding: 1.35rem; border: 1px solid #e2e8f0; border-radius: 1.1rem; background: #ffffff; box-shadow: 0 12px 30px rgba(15,23,42,.07); }
.teacher-messenger-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid #e2e8f0; }
.teacher-messenger-heading h2 { margin: .2rem 0 .35rem; font-size: clamp(1.15rem, 2vw, 1.45rem); }
.teacher-messenger-heading p { margin: 0; color: #64748b; font-size: .82rem; }
.teacher-messenger-status-badge { display: inline-flex; align-items: center; min-height: 2rem; padding: .42rem .72rem; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.teacher-messenger-status-badge.is-loading { color: #475569; background: #e2e8f0; }
.teacher-messenger-status-badge.is-safe { color: #047857; background: #dcfce7; }
.teacher-messenger-status-badge.is-warning { color: #92400e; background: #fef3c7; }
.teacher-messenger-status-badge.is-danger { color: #991b1b; background: #fee2e2; }
.teacher-messenger-safety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.teacher-messenger-safety-card { padding: .85rem; border: 1px solid; border-radius: .8rem; }
.teacher-messenger-safety-card span, .teacher-messenger-safety-card strong, .teacher-messenger-safety-card small { display: block; }
.teacher-messenger-safety-card span { font-size: .7rem; font-weight: 900; }
.teacher-messenger-safety-card strong { margin-top: .25rem; font-size: .88rem; }
.teacher-messenger-safety-card small { margin-top: .3rem; font-size: .67rem; line-height: 1.5; }
.teacher-messenger-safety-card.is-safe { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.teacher-messenger-safety-card.is-warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.teacher-messenger-safety-card.is-danger { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.teacher-messenger-quota { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.teacher-messenger-quota > div { padding: .7rem; border-radius: .7rem; background: #f8fafc; border: 1px solid #e2e8f0; }
.teacher-messenger-quota span, .teacher-messenger-quota strong { display: block; }
.teacher-messenger-quota span { color: #64748b; font-size: .68rem; }
.teacher-messenger-quota strong { margin-top: .2rem; color: #0f172a; font-size: 1.1rem; }
.teacher-messenger-form { display: grid; gap: 1rem; }
.teacher-messenger-form fieldset { min-width: 0; margin: 0; padding: .9rem; border: 1px solid #e2e8f0; border-radius: .85rem; }
.teacher-messenger-form legend { padding: 0 .3rem; color: #0f172a; font-size: .84rem; font-weight: 800; }
.teacher-messenger-settings-grid, .teacher-messenger-fields-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.teacher-messenger-form label { display: grid; gap: .35rem; color: #0f172a; font-size: .78rem; font-weight: 800; }
.teacher-messenger-form input, .teacher-messenger-form select, .teacher-messenger-form textarea { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: .65rem; padding: .7rem .75rem; color: #0f172a; background: #fff; font: inherit; font-size: .78rem; }
.teacher-messenger-form textarea { resize: vertical; min-height: 7rem; }
.teacher-messenger-form label small, .teacher-messenger-form fieldset > small { color: #64748b; font-size: .66rem; font-weight: 600; line-height: 1.45; }
.teacher-messenger-checkbox { display: flex !important; align-items: flex-start; gap: .55rem; margin-top: .7rem; padding: .65rem .7rem; border: 1px solid #e2e8f0; border-radius: .65rem; background: #fff; cursor: pointer; }
.teacher-messenger-checkbox input { width: auto; margin-top: .2rem; accent-color: #059669; }
.teacher-messenger-checkbox span, .teacher-messenger-checkbox strong, .teacher-messenger-checkbox small { display: block; }
.teacher-messenger-checkbox strong { font-size: .76rem; }
.teacher-messenger-checkbox small { margin-top: .15rem; color: #64748b; font-size: .66rem; font-weight: 600; }
.teacher-messenger-secondary-button { margin-top: .75rem; border: 1px solid #bfdbfe; border-radius: .6rem; padding: .6rem .8rem; color: #1d4ed8; background: #eff6ff; font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; }
.teacher-messenger-student-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; max-height: 15rem; overflow-y: auto; margin-top: .7rem; padding: .7rem; border: 1px solid #bfdbfe; border-radius: .7rem; background: #f8fbff; }
.teacher-messenger-student-list[hidden] { display: none; }
.teacher-messenger-student-list > p { grid-column: 1 / -1; margin: .2rem; color: #64748b; font-size: .7rem; }
.teacher-messenger-student-option { display: flex !important; align-items: flex-start; gap: .45rem; padding: .5rem; color: #334155 !important; background: #fff; border: 1px solid #e2e8f0; border-radius: .5rem; cursor: pointer; }
.teacher-messenger-student-option input { width: auto; margin-top: .18rem; accent-color: #2563eb; }
.teacher-messenger-student-option strong, .teacher-messenger-student-option small { display: block; }
.teacher-messenger-student-option strong { font-size: .72rem; }
.teacher-messenger-student-option small { margin-top: .12rem; color: #64748b; font-size: .6rem; font-weight: 600; }
.teacher-messenger-policy-note { margin: .75rem 0 0; padding: .7rem .8rem; border-radius: .65rem; color: #1e40af; background: #eff6ff; font-size: .72rem; line-height: 1.6; }
.teacher-messenger-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .25rem; }
.teacher-messenger-feedback { color: #047857; font-size: .75rem; font-weight: 800; }
.teacher-messenger-feedback.is-error { color: #b91c1c; }
.teacher-messenger-form button:disabled { cursor: wait; opacity: .6; }
@media (max-width: 820px) { .teacher-messenger-settings-grid, .teacher-messenger-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .teacher-messenger-heading, .teacher-messenger-actions { align-items: stretch; flex-direction: column; } .teacher-messenger-safety-grid, .teacher-messenger-quota, .teacher-messenger-settings-grid, .teacher-messenger-fields-grid, .teacher-messenger-student-list { grid-template-columns: 1fr; } .teacher-messenger-status-badge { align-self: flex-start; } }
.teacher-messenger-tab { color: #7c3aed; }
.teacher-dashboard-page .teacher-tab-button.teacher-messenger-tab.is-active { color: #fff; background: #7c3aed; border-color: #7c3aed; }


/* Messenger audience filter results */
.teacher-messenger-student-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: #475569;
  font-size: 0.9rem;
}

.teacher-messenger-student-list-toolbar .teacher-messenger-secondary-button {
  flex: 0 0 auto;
  margin-top: 0;
}

@media (max-width: 640px) {
  .teacher-messenger-student-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
