/* Admin (nexlink) colors applied to instructor portal */
:root,
html.light-theme,
html.dark-theme,
html.semi-dark,
html.minimal-theme {
  --instr-radius: 14px;
  --instr-gap: 1rem;
  --instr-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --bs-body-font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;

  /* Balanced mobile type scale */
  --text-xs: 0.75rem;      /* 12 — badges, captions */
  --text-sm: 0.8125rem;    /* 13 — meta, subtitles, help */
  --text-base: 0.9375rem;  /* 15 — body, nav labels, card titles */
  --text-md: 1rem;         /* 16 — inputs, buttons, strong body */
  --text-lg: 1.0625rem;    /* 17 — section titles, appbar */
  --text-xl: 1.1875rem;    /* 19 — page / hero names */
  --text-2xl: 1.375rem;    /* 22 — large empty-state icons only */
  --icon-sm: 1.125rem;
  --icon-md: 1.25rem;
  --icon-lg: 1.375rem;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-body: 1.45;

  /* Legacy aliases → admin primary purple */
  --fmf-green: #6054ce;
  --fmf-green-mid: #4f43b6;
  --fmf-green-soft: #9485e8;
  --fmf-mint: #f0eefb;
  --fmf-mint-deep: #e4e0f7;
  --fmf-gradient: linear-gradient(90deg, #6054ce, #9485e8);

  --haze-sidebar-bg: #fff;
  --haze-sidebar-text: #56566c;
  --haze-sidebar-active-bg: #f0eefb;
  --haze-bg: #fbfbfe;
  --haze-surface: #fff;
  --haze-surface-2: #fbfbfe;
  --haze-surface-3: #f0f1f5;
  --haze-border: #e4e4ec;
  --haze-border-strong: #b0b0c2;
  --haze-text: #56566c;
  --haze-heading: #18283b;
  --haze-muted: #737387;
  --haze-soft: #757d8a;
  --haze-primary: #6054ce;
  --haze-primary-hover: #4f43b6;
  --haze-primary-soft: #f0eefb;
  --dreams-gradient: linear-gradient(90deg, #6054ce 50%, #9485e8 100%);
  --dreams-focus: rgb(96 84 206 / 22%);

  --bs-primary: #6054ce;
  --bs-primary-rgb: 96, 84, 206;
  --bs-link-color: #6054ce;
  --bs-link-hover-color: #4f43b6;
}

/* Keep instructor portal on the admin light palette even if OS theme is dark */
html.dark-theme body.instructor-portal {
  color-scheme: light;
}

body.instructor-portal {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--instr-font);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  background: var(--haze-bg);
  color: var(--haze-text);
  overflow-x: hidden;
}

html body.instructor-portal .btn-primary,
html body.instructor-portal .btn-primary:active,
html body.instructor-portal .btn-primary.active {
  --bs-btn-bg: var(--haze-primary);
  --bs-btn-border-color: var(--haze-primary);
  background: var(--dreams-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgb(96 84 206 / 18%);
}

html body.instructor-portal .btn-primary:hover,
html body.instructor-portal .btn-primary:focus-visible {
  background: linear-gradient(90deg, #4f43b6, #7f74d9) !important;
  border-color: transparent !important;
  color: #fff !important;
  filter: none;
}

html body.instructor-portal .btn-outline-primary {
  color: var(--haze-primary) !important;
  border-color: var(--haze-primary) !important;
  background: transparent !important;
}

html body.instructor-portal .btn-outline-primary:hover,
html body.instructor-portal .btn-outline-primary:focus-visible {
  background: var(--haze-primary) !important;
  border-color: var(--haze-primary) !important;
  color: #fff !important;
}

html body.instructor-portal .form-check-input:checked {
  background-color: var(--haze-primary) !important;
  border-color: var(--haze-primary) !important;
}

html body.instructor-portal .form-control:focus,
html body.instructor-portal .form-select:focus {
  border-color: var(--haze-primary) !important;
  box-shadow: 0 0 0 .2rem rgb(96 84 206 / 18%) !important;
}

.instructor-gradient-text {
  background-image: var(--fmf-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

html body.instructor-portal,
html body.instructor-portal .form-control,
html body.instructor-portal .form-select,
html body.instructor-portal .form-label,
html body.instructor-portal .btn,
html body.instructor-portal .table,
html body.instructor-portal .nav-link,
html body.instructor-portal .instructor-nav-link,
html body.instructor-portal .select2-container--bootstrap-5 .select2-selection,
html body.instructor-portal .select2-container--bootstrap-5 .select2-results__option,
html body.instructor-portal .select2-container--bootstrap-5 .select2-selection__rendered {
  font-family: var(--instr-font) !important;
}

.instructor-container {
  width: min(720px, calc(100% - 1.5rem));
  margin: 0 auto;
}

/* ===== App bar ===== */
.instructor-appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--haze-border);
}

.instructor-appbar-inner {
  width: min(720px, calc(100% - 1.5rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  gap: .65rem;
  min-height: 4rem;
  padding: .55rem 0;
}

.instructor-appbar-btn {
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: .9rem;
  background: #fff;
  color: var(--fmf-green);
  font-size: var(--icon-lg);
  line-height: 1;
  box-shadow: 0 4px 14px rgb(17 24 39 / 8%);
  -webkit-tap-highlight-color: transparent;
}

.instructor-appbar-btn:active {
  transform: scale(.97);
}

.instructor-appbar-title {
  text-align: center;
  min-width: 0;
}

.instructor-appbar-title strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: var(--fw-black);
  letter-spacing: -.02em;
  color: var(--haze-heading);
  line-height: var(--lh-tight);
}

.instructor-appbar-title small {
  display: block;
  margin-top: .15rem;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.instructor-appbar-menu {
  border: 0;
  border-radius: .9rem;
  box-shadow: 0 12px 32px rgb(17 24 39 / 12%);
  padding: .4rem;
  min-width: 11rem;
}

.instructor-appbar-menu .dropdown-item {
  border-radius: .65rem;
  font-weight: 600;
  font-size: var(--text-base);
  padding: .55rem .7rem;
}

.instructor-main {
  flex: 1 0 auto;
  width: 100%;
  padding: 1rem 0 2.25rem;
}

/* ===== Sidebar (prepared shell) ===== */
.instructor-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgb(24 20 55 / 42%);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

body.instructor-sidebar-open .instructor-sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.instructor-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: min(20rem, calc(100vw - 2.25rem));
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f7f8f7;
  border-radius: 0 1.35rem 1.35rem 0;
  box-shadow: 12px 0 40px rgb(0 0 0 / 14%);
  transform: translateX(-105%);
  transition: transform .26s cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
}

.instructor-sidebar.is-open {
  transform: translateX(0);
}

.instructor-sidebar-hero {
  position: relative;
  padding:
    max(1.1rem, calc(env(safe-area-inset-top) + .55rem))
    1rem
    1.35rem;
  background: linear-gradient(145deg, #5348c0 0%, var(--fmf-green) 55%, #4f43b6 100%);
  border-radius: 0 0 1.5rem 1.5rem;
  color: #fff;
  box-shadow: 0 10px 28px rgb(96 84 206 / 22%);
}

.instructor-sidebar-close {
  position: absolute;
  top: max(.65rem, env(safe-area-inset-top));
  right: .75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: .7rem;
  background: rgb(255 255 255 / 16%);
  color: #fff;
  font-size: var(--icon-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.instructor-sidebar-hero-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: .35rem;
}

.instructor-sidebar-avatar {
  width: 5.1rem;
  height: 5.1rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
  margin-bottom: .75rem;
}

.instructor-sidebar-hero-name {
  display: block;
  font-size: var(--text-xl);
  font-weight: var(--fw-black);
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
  color: #fff;
  max-width: 100%;
  padding: 0 .5rem;
}

.instructor-sidebar-id-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .55rem;
  padding: .28rem .75rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
  border: 1px solid rgb(255 255 255 / 22%);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .02em;
}

.instructor-sidebar-hero-campus {
  display: block;
  margin-top: .65rem;
  max-width: 16rem;
  color: rgb(255 255 255 / 78%);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.35;
}

.instructor-sidebar-nav {
  display: grid;
  gap: .55rem;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding: 1rem .85rem .35rem;
}

.instructor-sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem .85rem;
  border-radius: 1rem;
  text-decoration: none;
  color: var(--haze-heading);
  background: #fff;
  box-shadow: 0 6px 18px rgb(17 24 39 / 6%);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.instructor-sidebar-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgb(17 24 39 / 9%);
  color: var(--haze-heading);
}

.instructor-sidebar-link.is-active {
  box-shadow:
    0 8px 20px rgb(96 84 206 / 12%),
    inset 0 0 0 1.5px rgb(96 84 206 / 22%);
}

.instructor-sidebar-link-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--icon-md);
  flex-shrink: 0;
}

.instructor-sidebar-link-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}

.instructor-sidebar-link-label {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  letter-spacing: -.01em;
  line-height: var(--lh-tight);
  color: var(--haze-heading);
}

.instructor-sidebar-link-sub {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--haze-muted);
  line-height: 1.25;
}

.instructor-sidebar-link-chevron {
  color: var(--haze-border-strong);
  font-size: var(--icon-md);
  flex-shrink: 0;
}

.instructor-sidebar-link.is-soon .instructor-sidebar-link-label::after {
  content: "Soon";
  margin-left: .4rem;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--haze-muted);
  vertical-align: middle;
}

.instructor-sidebar-link.theme-blue .instructor-sidebar-link-icon {
  background: #e3f0ff;
  color: #1d6fb8;
}

.instructor-sidebar-link.theme-purple .instructor-sidebar-link-icon {
  background: var(--haze-primary-soft);
  color: var(--haze-primary);
}

.instructor-sidebar-link.theme-green .instructor-sidebar-link-icon {
  background: var(--haze-primary-soft);
  color: var(--haze-primary);
}

.instructor-sidebar-link.theme-teal .instructor-sidebar-link-icon {
  background: #e0f5f2;
  color: #0f766e;
}

.instructor-sidebar-link.theme-orange .instructor-sidebar-link-icon {
  background: #fff0e4;
  color: #c45d16;
}

.instructor-sidebar-link.is-active.theme-blue .instructor-sidebar-link-icon,
.instructor-sidebar-link.is-active.theme-purple .instructor-sidebar-link-icon,
.instructor-sidebar-link.is-active.theme-green .instructor-sidebar-link-icon,
.instructor-sidebar-link.is-active.theme-teal .instructor-sidebar-link-icon,
.instructor-sidebar-link.is-active.theme-orange .instructor-sidebar-link-icon {
  filter: saturate(1.05);
}

.instructor-sidebar-foot {
  margin-top: auto;
  padding: .55rem .85rem max(.95rem, env(safe-area-inset-bottom));
  display: grid;
  gap: .55rem;
}

.instructor-sidebar-logout .instructor-sidebar-link-icon {
  background: #fde8e8;
  color: #b42318;
}

.instructor-sidebar-logout .instructor-sidebar-link-label {
  color: #b42318;
}

body.instructor-sidebar-open {
  overflow: hidden;
}

.instructor-footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid rgb(0 0 0 / 4%);
  padding: 1rem 0 max(1.4rem, env(safe-area-inset-bottom));
  color: var(--haze-muted);
  background: transparent;
  text-align: center;
}

.instructor-card {
  background: rgb(255 255 255 / 88%);
  border: 1px solid rgb(96 84 206 / 8%);
  border-radius: var(--instr-radius);
  padding: 1.15rem 1.25rem;
  box-shadow: 0 12px 32px rgb(96 84 206 / 6%);
  backdrop-filter: blur(8px);
}

.instructor-page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.instructor-page-title h1 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -.02em;
}

.instructor-page-title p {
  margin: .25rem 0 0;
  color: var(--haze-muted);
  font-size: var(--text-base);
}

.instructor-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--instr-gap);
}

.instructor-stat {
  border: 1px solid rgb(96 84 206 / 10%);
  border-radius: 12px;
  padding: 1rem;
  background: linear-gradient(145deg, #fff 0%, var(--fmf-mint) 100%);
}

.instructor-stat span {
  display: block;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  margin-bottom: .35rem;
}

.instructor-stat strong {
  font-size: var(--text-xl);
  letter-spacing: -.02em;
  background-image: var(--fmf-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.instructor-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--instr-gap);
  margin-top: 1rem;
}

.instructor-quick-link {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--haze-border);
  text-decoration: none;
  color: inherit;
  background: var(--haze-surface);
}

.instructor-quick-link:hover {
  border-color: color-mix(in srgb, var(--haze-primary) 40%, var(--haze-border));
  background: var(--haze-primary-soft);
}

.instructor-quick-link i {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--haze-primary);
  font-size: var(--icon-md);
}

.instructor-session-list {
  display: grid;
  gap: .75rem;
}

.instructor-session-item {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: .85rem 1rem;
  border: 1px solid var(--haze-border);
  border-radius: 12px;
}

.instructor-session-item .time {
  font-weight: 700;
  font-size: var(--text-sm);
}

/* ===== Login (mobile Sign In layout) ===== */
html body.instructor-portal.instructor-login-page {
  position: relative;
  color: var(--haze-heading);
  background: #2a2558 !important;
  overflow-x: hidden;
  display: block;
}

.instructor-login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #f0eefb;
}

.instructor-login-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  opacity: .42;
  filter: blur(.6px) saturate(.85) brightness(1.06);
  transform: scale(1.04);
}

.instructor-login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(251 251 254 / 55%) 0%, rgb(251 251 254 / 35%) 40%, rgb(240 238 251 / 50%) 100%);
}

.instructor-login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 28rem;
  margin: 0 auto;
  background: transparent;
  animation: instructorLoginIn .45s cubic-bezier(.22, 1, .36, 1) both;
}

.instructor-login-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding:
    1.25rem
    max(1.35rem, env(safe-area-inset-right))
    1.25rem
    max(1.35rem, env(safe-area-inset-left));
}

.instructor-login-brand {
  text-align: center;
  margin: 0 0 1.35rem;
}

.instructor-login-logo-wrap {
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto .85rem;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgb(96 84 206 / 10%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructor-login-logo {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.instructor-login-welcome {
  margin: 0 0 .4rem;
  font-size: var(--text-xl);
  font-weight: var(--fw-black);
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
  color: var(--haze-heading);
}

.instructor-login-subtitle {
  margin: 0;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-snug);
  font-weight: var(--fw-medium);
}

.instructor-login-brand,
.instructor-login-form {
  width: 100%;
}

.instructor-login-field {
  margin-bottom: 1rem;
}

.instructor-login-input {
  position: relative;
}

.instructor-login-input-icon {
  position: absolute;
  top: 50%;
  left: 1.1rem;
  transform: translateY(-50%);
  color: #9a9a9a;
  font-size: var(--icon-sm);
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

html body.instructor-login-page .instructor-login-input .form-control {
  min-height: 3.4rem;
  height: 3.4rem;
  padding: .85rem 3.1rem .85rem 2.9rem;
  font-size: 16px;
  font-weight: 500;
  border-radius: 1.15rem !important;
  border: 0 !important;
  outline: 0 !important;
  background: #fff !important;
  color: #1a1a1a !important;
  box-shadow: 0 6px 20px rgb(17 24 39 / 9%) !important;
  transition: box-shadow .18s ease;
}

html body.instructor-login-page .instructor-login-input .form-control::placeholder {
  color: #b0b0b0;
  font-weight: 400;
}

html body.instructor-login-page .instructor-login-input .form-control:focus,
html body.instructor-login-page .instructor-login-input .form-control:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow:
    0 6px 20px rgb(17 24 39 / 11%),
    0 0 0 3px rgb(96 84 206 / 16%) !important;
}

.instructor-login-toggle {
  position: absolute;
  top: 50%;
  right: .45rem;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: #9a9a9a;
  font-size: var(--icon-md);
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.instructor-login-toggle:active,
.instructor-login-toggle:focus-visible {
  color: var(--fmf-green);
  background: var(--haze-primary-soft);
}

.instructor-login-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: .15rem 0 1.35rem;
}

.instructor-login-remember {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  color: var(--haze-muted);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.instructor-login-remember-check {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.instructor-login-remember-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.instructor-login-remember-box {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: .45rem;
  border: 2px solid #c4bdf5;
  background: #fff;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgb(17 24 39 / 6%);
  transition:
    background .2s ease,
    border-color .2s ease,
    color .2s ease,
    box-shadow .2s ease,
    transform .22s cubic-bezier(.34, 1.56, .64, 1);
}

.instructor-login-remember-box i {
  display: block;
  transform: scale(.35) rotate(-18deg);
  opacity: 0;
  transition:
    transform .22s cubic-bezier(.34, 1.56, .64, 1),
    opacity .16s ease;
}

.instructor-login-remember-check input:checked + .instructor-login-remember-box {
  background: var(--fmf-green);
  border-color: var(--fmf-green);
  color: #fff;
  box-shadow: 0 6px 16px rgb(96 84 206 / 28%);
  transform: scale(1.06);
}

.instructor-login-remember-check input:checked + .instructor-login-remember-box i {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.instructor-login-remember-check input:focus-visible + .instructor-login-remember-box {
  box-shadow:
    0 2px 8px rgb(17 24 39 / 6%),
    0 0 0 3px rgb(96 84 206 / 22%);
}

.instructor-login-remember:active .instructor-login-remember-box {
  transform: scale(.94);
}

.instructor-login-remember:active .instructor-login-remember-check input:checked + .instructor-login-remember-box {
  transform: scale(1);
}

.instructor-login-help {
  color: var(--fmf-green);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
}

.instructor-login-help:hover,
.instructor-login-help:focus-visible {
  color: var(--haze-primary-hover);
  text-decoration: underline;
}

html body.instructor-login-page .instructor-login-submit,
html body.instructor-login-page .instructor-login-submit:active,
html body.instructor-login-page .instructor-login-submit.active {
  width: 100%;
  min-height: 3.35rem;
  margin-top: .15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 1rem !important;
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  letter-spacing: .01em;
  border: 0 !important;
  background: var(--fmf-green) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgb(96 84 206 / 22%) !important;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, filter .15s ease;
}

html body.instructor-login-page .instructor-login-submit i {
  font-size: var(--icon-md);
  line-height: 1;
}

html body.instructor-login-page .instructor-login-submit:hover,
html body.instructor-login-page .instructor-login-submit:focus-visible {
  background: var(--haze-primary-hover) !important;
  filter: none;
  color: #fff !important;
}

.instructor-login-submit:active {
  transform: scale(.985);
}

@keyframes instructorLoginIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .instructor-login-shell {
    animation: none;
  }

  .instructor-login-remember-box,
  .instructor-login-remember-box i {
    transition: none;
  }
}

.attendance-period-cell .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  cursor: pointer;
}

.attendance-check-all .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
}

.coming-soon-panel {
  text-align: center;
  padding: 2.75rem 1.25rem 2.5rem;
}

.coming-soon-panel i {
  width: 4rem;
  height: 4rem;
  border-radius: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: var(--haze-primary-soft);
  color: var(--haze-primary);
  font-size: 2rem;
}

.coming-soon-panel h4 {
  margin: 1rem 0 .4rem;
  font-size: var(--text-lg);
  font-weight: var(--fw-black);
  color: var(--haze-heading);
  letter-spacing: -.02em;
}

.coming-soon-panel p {
  margin: 0 auto;
  max-width: 28ch;
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--haze-muted);
  font-weight: var(--fw-medium);
}

.coming-soon-page .instructor-page-title {
  display: none;
}

.coming-soon-page .instructor-card {
  border: 0;
  box-shadow: 0 10px 28px rgb(17 24 39 / 7%);
}

/* ===== Lecturer dashboard ===== */
.dash-hero {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.05rem 1.1rem;
  border-radius: 1.35rem;
  color: #fff;
  background: linear-gradient(105deg, #5348c0 0%, var(--haze-primary) 48%, #7c6fd9 100%);
  box-shadow: 0 14px 32px rgb(96 84 206 / 22%);
  margin-bottom: 1.25rem;
}

.dash-hero-icon {
  width: 3rem;
  height: 3rem;
  border-radius: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 18%);
  font-size: var(--icon-lg);
  flex-shrink: 0;
}

.dash-hero-copy {
  flex: 1;
  min-width: 0;
}

.dash-hero-copy strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.dash-hero-copy small {
  display: block;
  margin-top: .15rem;
  opacity: .85;
  font-size: var(--text-sm);
  font-weight: 500;
}

.dash-hero-pill {
  padding: .4rem .8rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
  border: 1px solid rgb(255 255 255 / 22%);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

.dash-section {
  margin-bottom: 1.35rem;
}

.dash-section-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .85rem;
}

.dash-section-head h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--fw-black);
  color: var(--fmf-green);
  letter-spacing: -.01em;
  line-height: var(--lh-tight);
}

.dash-count-badge {
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 .4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--text-xs);
  font-weight: 800;
}

.dash-count-badge--muted {
  background: var(--haze-surface-3);
  color: var(--haze-muted);
}

.dash-class-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}

.dash-class-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgb(17 24 39 / 7%);
  transition: transform .15s ease, box-shadow .15s ease;
}

.dash-class-card:active {
  transform: scale(.985);
}

.dash-class-card-top {
  position: relative;
  padding: .95rem 1rem 1rem;
  min-height: 5.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dash-class-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--icon-sm);
  margin-bottom: .85rem;
}

.dash-class-badge {
  position: absolute;
  top: .85rem;
  right: .9rem;
  max-width: calc(100% - 4.2rem);
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-class-title {
  margin-top: auto;
  padding-right: .15rem;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--haze-heading);
  letter-spacing: -.01em;
}

.dash-class-card-body {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem .85rem .85rem;
  background: #fff;
  border-top: 1px solid rgb(0 0 0 / 3%);
}

.dash-class-day-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  flex-shrink: 0;
}

.dash-class-days {
  font-size: var(--text-xs);
  color: var(--haze-muted);
  font-weight: 600;
  line-height: 1.3;
}

.dash-class-card.theme-0 .dash-class-card-top { background: #e8f3ff; }
.dash-class-card.theme-0 .dash-class-icon,
.dash-class-card.theme-0 .dash-class-day-icon { background: #cfe6ff; color: #1d6fb8; }
.dash-class-card.theme-0 .dash-class-badge { background: #cfe6ff; color: #1d6fb8; }

.dash-class-card.theme-1 .dash-class-card-top { background: #f1e9ff; }
.dash-class-card.theme-1 .dash-class-icon,
.dash-class-card.theme-1 .dash-class-day-icon { background: #e0d0ff; color: #6b3fb8; }
.dash-class-card.theme-1 .dash-class-badge { background: #e0d0ff; color: #6b3fb8; }

.dash-class-card.theme-2 .dash-class-card-top { background: #fff0e4; }
.dash-class-card.theme-2 .dash-class-icon,
.dash-class-card.theme-2 .dash-class-day-icon { background: #ffe0c8; color: #c45d16; }
.dash-class-card.theme-2 .dash-class-badge { background: #ffe0c8; color: #c45d16; }

.dash-class-card.theme-3 .dash-class-card-top { background: #f0eefb; }
.dash-class-card.theme-3 .dash-class-icon,
.dash-class-card.theme-3 .dash-class-day-icon { background: #e4e0f7; color: var(--haze-primary); }
.dash-class-card.theme-3 .dash-class-badge { background: #e4e0f7; color: var(--haze-primary); }

.dash-empty {
  grid-column: 1 / -1;
  padding: 1.25rem .5rem;
  font-size: var(--text-base);
}

.dash-session-list {
  display: grid;
  gap: .7rem;
}

.dash-session-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: .75rem;
  align-items: center;
  padding: .9rem 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgb(17 24 39 / 6%);
}

.dash-session-time {
  font-weight: 800;
  font-size: var(--text-sm);
  color: var(--fmf-green);
}

.dash-session-meta strong {
  display: block;
  font-size: var(--text-base);
  color: var(--haze-heading);
  line-height: 1.2;
}

.dash-session-meta small {
  display: block;
  margin-top: .2rem;
  color: var(--haze-muted);
  font-size: var(--text-xs);
}

.dash-session-mark {
  border-radius: .7rem !important;
}

@media (max-width: 575.98px) {
  .dash-session-item {
    grid-template-columns: 1fr;
  }

  .dash-session-mark {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .instructor-container,
  .instructor-appbar-inner {
    width: min(880px, calc(100% - 2.5rem));
  }

}

/* ===== Attendance (today-only mobile sheet) ===== */
body.instructor-attendance-page .instructor-footer {
  display: none;
}

body.instructor-attendance-page.att-submit-visible .instructor-main {
  padding-bottom: 5.5rem;
}

.att-page {
  padding-bottom: 1.25rem;
}

.att-back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .9rem;
  padding: .35rem .15rem;
  color: var(--haze-primary);
  font-weight: 700;
  font-size: var(--text-base);
  text-decoration: none;
}

.att-back-link i {
  font-size: var(--icon-sm);
}

.att-live-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #5348c0 0%, var(--fmf-green) 48%, #7c6fd9 100%);
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.05rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 14px 32px rgb(96 84 206 / 20%);
}

.att-live-hero::after {
  content: "";
  position: absolute;
  right: -1.5rem;
  top: -1.5rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
  pointer-events: none;
}

.att-live-hero-top {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .35rem;
}

.att-live-hero-top strong {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -.02em;
}

.att-live-pulse {
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: #c4bdf5;
  box-shadow: 0 0 0 0 rgb(196 189 245 / 70%);
  animation: attLivePulse 1.6s ease-out infinite;
}

.att-live-hero-copy {
  margin: 0 0 .9rem;
  color: rgb(255 255 255 / 86%);
  font-size: var(--text-base);
  line-height: 1.4;
  font-weight: 500;
  max-width: 34ch;
}

.att-date-field--hero {
  background: rgb(255 255 255 / 14%);
  border-color: rgb(255 255 255 / 18%);
  color: #fff;
  pointer-events: none;
}

.att-date-field--hero .att-date-icon {
  color: #bfdbfe;
}

.att-date-lock-pill {
  margin-left: auto;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 18%);
  font-size: var(--text-xs);
  font-weight: 700;
}

@keyframes attLivePulse {
  0% { box-shadow: 0 0 0 0 rgb(196 189 245 / 65%); }
  70% { box-shadow: 0 0 0 10px rgb(196 189 245 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(196 189 245 / 0%); }
}

.att-available {
  margin-bottom: 1rem;
}

.att-available-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .7rem;
}

.att-available-head h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--fw-black);
  color: var(--fmf-green);
  line-height: var(--lh-tight);
}

.att-available-count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--text-xs);
  font-weight: 800;
}

.att-available-list {
  display: grid;
  gap: .7rem;
}

.att-available-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1.5rem 1rem;
  background: #fff;
  border-radius: 1.1rem;
  color: var(--haze-muted);
  font-weight: 600;
  box-shadow: 0 8px 22px rgb(17 24 39 / 5%);
}

.att-available-empty i {
  font-size: var(--text-2xl);
}

.att-session-card {
  display: grid;
  gap: .35rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 1.1rem;
  padding: .95rem 1rem;
  background: #fff;
  box-shadow: 0 8px 22px rgb(17 24 39 / 6%);
  border-left: 4px solid var(--fmf-green);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}

.att-session-card:active {
  transform: scale(.985);
}

.att-session-card.theme-0 { border-left-color: #3b82f6; }
.att-session-card.theme-1 { border-left-color: #8b5cf6; }
.att-session-card.theme-2 { border-left-color: #f59e0b; }
.att-session-card.theme-3 { border-left-color: #16a34a; }

.att-session-card.is-active {
  box-shadow:
    0 10px 24px rgb(96 84 206 / 12%),
    inset 0 0 0 1.5px rgb(96 84 206 / 25%);
}

.att-session-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.att-session-status {
  padding: .18rem .5rem;
  border-radius: 999px;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.att-session-periods {
  color: var(--haze-muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.att-session-subject {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--haze-heading);
  letter-spacing: -.01em;
  line-height: 1.25;
}

.att-session-class {
  color: var(--haze-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.att-session-time {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .15rem;
  color: var(--haze-primary);
  font-size: var(--text-sm);
  font-weight: 700;
}

.att-picker-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1.5rem 1rem;
  color: var(--haze-muted);
  font-weight: 600;
  text-align: center;
}

.att-picker-hint i {
  font-size: var(--icon-lg);
  color: var(--fmf-green);
}

.att-info-card {
  background: #fff;
  border-radius: 1.2rem;
  padding: 1rem;
  box-shadow: 0 10px 28px rgb(17 24 39 / 7%);
  margin-bottom: 1rem;
}

.att-switch-sessions {
  width: 100%;
  margin-top: .85rem;
  border: 0;
  border-radius: .85rem;
  padding: .65rem .85rem;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-weight: 700;
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.att-switch-sessions[hidden] {
  display: none !important;
}

.att-info-main {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .9rem;
}

.att-info-icon {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--icon-sm);
  flex-shrink: 0;
}

.att-info-copy strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--haze-heading);
  line-height: 1.25;
}

.att-info-copy small {
  display: block;
  margin-top: .2rem;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.att-date-field {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem .9rem;
  border: 1px solid #e5e7eb;
  border-radius: .9rem;
  background: var(--haze-surface-2);
  color: var(--haze-text);
  font-weight: 700;
  font-size: var(--text-md);
  pointer-events: none;
  user-select: none;
}

.att-date-icon {
  color: var(--haze-primary);
  font-size: var(--icon-sm);
}

.att-date-lock {
  margin-left: auto;
  color: var(--haze-soft);
  font-size: var(--icon-md);
}

.att-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  color: var(--fmf-green);
  font-weight: 600;
}

.att-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.25rem 2rem;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 10px 28px rgb(17 24 39 / 6%);
  min-height: 18rem;
}

.att-empty-art {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #eef5ff, #f3f4f6);
  color: #93a4b8;
  font-size: 2.25rem;
  margin-bottom: 1rem;
  position: relative;
}

.att-empty-art::after {
  content: "+";
  position: absolute;
  right: -.15rem;
  bottom: -.1rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--haze-primary);
  color: #fff;
  font-size: var(--text-md);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgb(96 84 206 / 35%);
}

.att-empty-text {
  margin: 0 0 1.1rem;
  color: var(--haze-muted);
  font-size: var(--text-md);
  font-weight: 600;
}

.att-empty-btn {
  min-width: 9.5rem;
  border: 0 !important;
  border-radius: .75rem !important;
  background: var(--fmf-green) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: .7rem 1.2rem !important;
}

.att-students-card {
  background: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -2px 24px rgb(17 24 39 / 6%);
  overflow: hidden;
  min-height: 16rem;
}

.att-students-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem .75rem;
  border-bottom: 1px solid var(--haze-border);
}

.att-students-title {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}

.att-students-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--icon-sm);
}

.att-students-title strong {
  font-size: var(--text-lg);
  font-weight: var(--fw-black);
  color: var(--haze-heading);
  line-height: var(--lh-tight);
}

.att-students-count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--text-xs);
  font-weight: 800;
}

.att-select-all {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.att-student-list {
  padding: 0 .35rem .5rem;
}

.att-student-row {
  display: grid;
  grid-template-columns: 2.1rem 1fr auto;
  gap: .7rem;
  align-items: center;
  padding: .85rem .65rem;
  border-bottom: 1px solid var(--haze-border);
  border-radius: .75rem;
  -webkit-tap-highlight-color: transparent;
}

.att-student-row:last-child {
  border-bottom: 0;
}

.att-student-no {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-weight: 800;
  font-size: var(--text-sm);
}

.att-student-meta strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--haze-heading);
  line-height: 1.2;
}

.att-student-meta small {
  display: block;
  margin-top: .18rem;
  color: var(--haze-muted);
  font-size: var(--text-xs);
  font-weight: 500;
}

.att-student-checks {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.att-check {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.att-check input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.att-check-box {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: .45rem;
  border: 2px solid #c4bdf5;
  background: #fff;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.att-check input:checked + .att-check-box {
  background: var(--haze-primary);
  border-color: var(--haze-primary);
  color: #fff;
}

.att-select-all .att-check-box {
  border-color: #c4bdf5;
}

.att-select-all .att-check input:checked + .att-check-box {
  background: var(--fmf-green);
  border-color: var(--fmf-green);
}

.att-submit-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding:
    .75rem
    max(.85rem, env(safe-area-inset-right))
    max(.85rem, env(safe-area-inset-bottom))
    max(.85rem, env(safe-area-inset-left));
  background: rgb(251 251 254 / 94%);
  border-top: 1px solid var(--haze-border);
  box-shadow: 0 -8px 24px rgb(17 24 39 / 6%);
  backdrop-filter: blur(8px);
}

.att-submit-bar[hidden] {
  display: none !important;
}

.att-submit-bar .att-submit-btn {
  width: min(720px, 100%);
  min-height: 3.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0 !important;
  border-radius: 1rem !important;
  background: var(--fmf-green) !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: var(--text-md) !important;
  box-shadow: 0 10px 24px rgb(96 84 206 / 22%);
}

.att-submit-bar .att-submit-btn i {
  font-size: var(--icon-md);
}

.att-submit-bar .att-submit-btn:disabled {
  opacity: .75;
}

/* Attendance confirm / success dialogs */
body.att-dialog-open {
  overflow: hidden;
}

.att-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgb(24 20 55 / 48%);
  backdrop-filter: blur(2px);
}

.att-dialog-backdrop[hidden] {
  display: none !important;
}

.att-dialog {
  width: min(100%, 19.5rem);
  border-radius: 1.35rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgb(0 0 0 / 22%);
  animation: attDialogIn .28s cubic-bezier(.22, 1, .36, 1) both;
}

.att-dialog-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.85rem 1rem 1.55rem;
}

.att-dialog-hero--confirm {
  background: var(--haze-primary);
}

.att-dialog-hero--success {
  background: #16a34a;
}

.att-dialog-hero--error {
  background: #dc2626;
}

.att-dialog-hero-icon {
  position: relative;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 22%);
  color: #fff;
  font-size: 2.1rem;
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 28%);
}

.att-dialog-hero-icon::before {
  content: "";
  position: absolute;
  inset: -.35rem;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 45%);
  opacity: 0;
  pointer-events: none;
}

.att-dialog-hero-icon.is-animating {
  animation: attCheckPop .55s cubic-bezier(.22, 1, .36, 1) both;
}

.att-dialog-hero-icon.is-animating::before {
  animation: attCheckRing .7s ease-out .05s both;
}

.att-dialog-hero-icon.is-animating i {
  display: inline-block;
  animation: attCheckBounce .5s cubic-bezier(.34, 1.56, .64, 1) .12s both;
}

@keyframes attCheckPop {
  0% { transform: scale(0); opacity: 0; }
  55% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes attCheckBounce {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes attCheckRing {
  0% { transform: scale(.7); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.att-dialog-body {
  padding: 1.25rem 1.2rem 1.35rem;
  text-align: center;
}

.att-dialog-body h3 {
  margin: 0 0 .45rem;
  font-size: var(--text-lg);
  font-weight: var(--fw-black);
  color: var(--haze-heading);
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
}

.att-dialog-body p {
  margin: 0 0 1.25rem;
  color: #4b5563;
  font-size: var(--text-base);
  line-height: var(--lh-body);
  font-weight: var(--fw-medium);
}

.att-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
}

.att-dialog-actions--single {
  justify-content: center;
}

.att-dialog-cancel {
  border: 0;
  background: transparent;
  color: var(--haze-soft);
  font-weight: 700;
  font-size: var(--text-md);
  padding: .55rem .9rem;
}

.att-dialog-ok {
  min-width: 5.75rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: var(--text-md);
  padding: .65rem 1.35rem;
}

.att-dialog-ok--confirm {
  background: var(--haze-primary);
}

.att-dialog-ok--success {
  background: var(--haze-primary);
  min-width: 7rem;
}

.att-dialog-ok--error {
  background: var(--haze-primary);
  min-width: 7rem;
}

/* Global notify dialog works on login too (no app shell) */
body.instructor-login-page.att-dialog-open {
  overflow: hidden;
}

.att-dialog-actions--single .att-dialog-ok {
  width: 100%;
  max-width: 11rem;
}

@keyframes attDialogIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .att-dialog,
  .att-dialog-hero-icon.is-animating,
  .att-dialog-hero-icon.is-animating::before,
  .att-dialog-hero-icon.is-animating i {
    animation: none;
  }
}

/* ===== Profile / Change Password ===== */
.prof-page {
  padding-bottom: .5rem;
}

.prof-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.35rem 1.1rem 1.4rem;
  margin-bottom: 1rem;
  border-radius: 1.35rem;
  background: linear-gradient(145deg, #5348c0 0%, var(--fmf-green) 55%, #4f43b6 100%);
  color: #fff;
  box-shadow: 0 14px 32px rgb(96 84 206 / 20%);
}

.prof-avatar {
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
  margin-bottom: .75rem;
}

.prof-name {
  display: block;
  font-size: var(--text-xl);
  font-weight: var(--fw-black);
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
}

.prof-id-pill {
  display: inline-flex;
  margin-top: .5rem;
  padding: .28rem .75rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
  border: 1px solid rgb(255 255 255 / 22%);
  font-size: var(--text-sm);
  font-weight: 700;
}

.prof-meta {
  display: block;
  margin-top: .55rem;
  color: rgb(255 255 255 / 78%);
  font-size: var(--text-sm);
  font-weight: 600;
}

.prof-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.15rem 1.1rem 1.25rem;
  box-shadow: 0 10px 28px rgb(17 24 39 / 7%);
}

.prof-card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.15rem;
}

.prof-card-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--icon-md);
  flex-shrink: 0;
}

.prof-card-head strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--haze-heading);
  line-height: 1.2;
}

.prof-card-head small {
  display: block;
  margin-top: .15rem;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.prof-field {
  margin-bottom: .85rem;
}

.prof-input {
  position: relative;
}

.prof-input-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #9a9a9a;
  font-size: var(--icon-sm);
  z-index: 2;
  pointer-events: none;
}

html body.instructor-profile-page .prof-input .form-control {
  min-height: 3.25rem;
  height: 3.25rem;
  padding: .8rem 3rem .8rem 2.85rem;
  font-size: 16px;
  font-weight: 500;
  border: 0 !important;
  border-radius: 1.05rem !important;
  background: #fff !important;
  color: #1a1a1a !important;
  box-shadow: 0 6px 18px rgb(17 24 39 / 8%) !important;
}

html body.instructor-profile-page .prof-input .form-control::placeholder {
  color: #b0b0b0;
  font-weight: 400;
}

html body.instructor-profile-page .prof-input .form-control:focus,
html body.instructor-profile-page .prof-input .form-control:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow:
    0 6px 18px rgb(17 24 39 / 10%),
    0 0 0 3px rgb(96 84 206 / 16%) !important;
}

.prof-toggle {
  position: absolute;
  top: 50%;
  right: .35rem;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: #9a9a9a;
  font-size: var(--icon-sm);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.prof-toggle:active,
.prof-toggle:focus-visible {
  color: var(--fmf-green);
  background: var(--haze-primary-soft);
}

.prof-hint {
  margin: .15rem 0 1rem;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
}

html body.instructor-profile-page .prof-submit {
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0 !important;
  border-radius: 1rem !important;
  background: var(--fmf-green) !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: var(--text-md) !important;
  box-shadow: 0 10px 24px rgb(96 84 206 / 22%);
}

html body.instructor-profile-page .prof-submit i {
  font-size: var(--icon-md);
}

/* ===== My Timetable ===== */
.tt-page {
  padding-bottom: .5rem;
}

.tt-back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .9rem;
  padding: .35rem .15rem;
  border: 0;
  background: transparent;
  color: var(--haze-primary);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  box-shadow: none;
}

.tt-back-link i {
  font-size: var(--icon-sm);
  line-height: 1;
}

.tt-loading,
.tt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .55rem;
  padding: 2.5rem 1rem;
  background: #fff;
  border-radius: 1.15rem;
  color: var(--haze-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: 0 8px 22px rgb(17 24 39 / 5%);
}

.tt-loading {
  flex-direction: row;
  color: var(--fmf-green);
}

.tt-empty i {
  font-size: 2rem;
  color: var(--haze-soft);
}

.tt-empty--error {
  color: #b42318;
}

.tt-empty--error i {
  color: #b42318;
}

.tt-year-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: var(--haze-primary-soft);
  color: var(--fmf-green);
  font-size: var(--text-xs);
  font-weight: 700;
}

.tt-year-chip small {
  color: var(--haze-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.tt-day {
  margin-bottom: 1.15rem;
}

.tt-day-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  border-radius: .95rem;
  background: linear-gradient(105deg, #5348c0 0%, var(--fmf-green) 60%, #4f43b6 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgb(96 84 206 / 18%);
  margin-bottom: .75rem;
}

.tt-day-banner-left {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.tt-day-banner-left i {
  font-size: 1rem;
}

.tt-day-banner-left strong {
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: -.01em;
}

.tt-day-count {
  font-size: var(--text-xs);
  font-weight: 700;
  opacity: .95;
  white-space: nowrap;
}

.tt-slot-list {
  display: grid;
  gap: .75rem;
}

.tt-slot-card {
  background: #fff;
  border-radius: 1.1rem;
  padding: 1rem 1.05rem;
  box-shadow: 0 8px 22px rgb(17 24 39 / 6%);
  border: 1px solid rgb(0 0 0 / 3%);
}

.tt-slot-title {
  margin: 0 0 .7rem;
  font-size: var(--text-base);
  font-weight: var(--fw-black);
  color: var(--haze-heading);
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
}

.tt-slot-row {
  display: grid;
  grid-template-columns: 1.45rem auto 1fr;
  align-items: center;
  gap: .45rem;
  margin-bottom: .45rem;
}

.tt-slot-row:last-child {
  margin-bottom: 0;
}

.tt-slot-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--text-xs);
}

.tt-slot-icon--time {
  background: var(--haze-primary);
}

.tt-slot-icon--room {
  background: #f59e0b;
}

.tt-slot-label {
  color: var(--haze-soft);
  font-size: var(--text-xs);
  font-weight: 600;
}

.tt-slot-value {
  color: var(--haze-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -.01em;
  text-align: left;
}

/* ===== Cross-device responsive (keep mobile look; enhance tablet/laptop) ===== */

/* Small phones: prevent accidental horizontal scroll */
@media (max-width: 359.98px) {
  .instructor-container,
  .instructor-appbar-inner {
    width: calc(100% - 1rem);
  }

  .instructor-appbar-title strong {
    font-size: var(--text-base);
  }

  .dash-hero {
    padding: .9rem .85rem;
  }
}

/* Tablet portrait / large phones landscape */
@media (min-width: 600px) {
  .dash-class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

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

/* Tablet and up — persistent sidebar + content shift */
@media (min-width: 768px) {
  body.instructor-portal:not(.instructor-login-page) {
    --instr-sidebar-w: 17.75rem;
  }

  .instructor-sidebar-backdrop,
  .instructor-sidebar-close,
  #btnInstructorSidebarOpen {
    display: none !important;
  }

  .instructor-sidebar {
    transform: none !important;
    width: var(--instr-sidebar-w);
    max-width: none;
    border-radius: 0;
    background: #fff;
    box-shadow: inset -1px 0 0 var(--haze-border);
    z-index: 60;
  }

  .instructor-sidebar.is-open {
    transform: none !important;
  }

  .instructor-sidebar-hero {
    border-radius: 0;
  }

  .instructor-appbar,
  .instructor-main,
  .instructor-footer {
    margin-left: var(--instr-sidebar-w);
    width: calc(100% - var(--instr-sidebar-w));
  }

  .instructor-appbar-inner {
    min-height: 4.25rem;
    grid-template-columns: 1fr 2.75rem;
  }

  .instructor-appbar-title {
    text-align: left;
  }

  body.instructor-portal:not(.instructor-login-page) .att-submit-bar {
    left: var(--instr-sidebar-w);
  }

  body.instructor-sidebar-open {
    overflow: auto;
  }

  .instructor-main {
    padding: 1.25rem 0 2.5rem;
  }

  .dash-hero {
    padding: 1.2rem 1.35rem;
  }

  .dash-section-head {
    margin-bottom: 1rem;
  }

  .att-info-card {
    padding: 1.15rem 1.2rem;
  }

  .att-students-card {
    border-radius: 1.25rem;
  }

  .att-student-list {
    padding: .25rem .65rem .85rem;
  }

  .prof-hero {
    padding: 1.6rem 1.35rem 1.65rem;
  }

  .prof-card {
    padding: 1.35rem 1.35rem 1.45rem;
  }

  .tt-day-banner {
    padding: .95rem 1.15rem;
  }

  .att-dialog {
    width: min(100%, 21rem);
  }
}

/* Laptop / desktop */
@media (min-width: 1024px) {
  body.instructor-portal:not(.instructor-login-page) {
    --instr-sidebar-w: 18.5rem;
    background:
      radial-gradient(ellipse 70% 40% at 50% -10%, rgb(96 84 206 / 7%), transparent 60%),
      var(--haze-bg);
  }

  .instructor-container,
  .instructor-appbar-inner {
    width: min(1040px, calc(100% - 3rem));
  }

  .att-submit-bar .att-submit-btn {
    width: min(1040px, 100%);
  }

  .dash-class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }

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

  .att-info-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem 1.5rem;
  }

  .att-info-main {
    margin-bottom: 0;
  }

  .att-date-field {
    min-width: 14rem;
    justify-self: end;
  }

  .att-students-head {
    padding: 1.1rem 1.2rem .85rem;
  }

  .instructor-appbar {
    background: rgb(255 255 255 / 92%);
    backdrop-filter: blur(10px);
  }
}

/* Wide desktop */
@media (min-width: 1280px) {
  .instructor-container,
  .instructor-appbar-inner {
    width: min(1120px, calc(100% - 4rem));
  }

  .att-submit-bar .att-submit-btn {
    width: min(1120px, 100%);
  }

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

  .tt-day {
    margin-bottom: 1.35rem;
  }
}

/* Mouse / trackpad affordances — do not change touch feel */
@media (hover: hover) and (pointer: fine) {
  .dash-class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgb(17 24 39 / 10%);
  }

  .tt-slot-card:hover {
    box-shadow: 0 12px 28px rgb(17 24 39 / 9%);
  }

  .instructor-sidebar-link:hover {
    background: var(--haze-primary-soft);
  }

  .att-back-link:hover,
  .tt-back-link:hover {
    opacity: .85;
  }

  .att-student-row:hover {
    background: rgb(96 84 206 / 3%);
  }

  .instructor-appbar-btn:hover {
    background: var(--haze-primary-soft);
  }
}

/* Landscape phones: compact sidebar only (login stays mobile layout) */
@media (max-height: 480px) and (orientation: landscape) {
  body.instructor-portal:not(.instructor-login-page) .instructor-sidebar-hero {
    padding-top: .75rem;
    padding-bottom: 1rem;
  }

  body.instructor-portal:not(.instructor-login-page) .instructor-sidebar-avatar {
    width: 3.75rem;
    height: 3.75rem;
    margin-bottom: .45rem;
  }
}

/* Print / reduced-motion already handled; ensure dialogs fit tall tablets */
@media (min-width: 768px) and (min-height: 900px) {
  .att-dialog-backdrop {
    padding: 2rem;
  }
}
