/* ============================================================
   RosBotz LMS — Premium Theme v3.0
   Modern glassmorphism · Vibrant accents · Micro-animations
   ============================================================ */

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Brand palette */
  --clr-primary: #6366f1;
  /* Indigo */
  --clr-primary-dark: #4f46e5;
  --clr-primary-glow: rgba(99, 102, 241, 0.25);
  --clr-accent: #06b6d4;
  /* Cyan */
  --clr-accent-glow: rgba(6, 182, 212, 0.2);
  --clr-success: #10b981;
  --clr-warning: #f59e0b;
  --clr-danger: #ef4444;

  /* Sidebar */

  --sidebar-bg: #142449;
  --sidebar-surface: #1e293b;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: rgba(255, 255, 255, 0.55);
  --sidebar-active: var(--clr-primary);

  /* Content area */
  --bg-base: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-card: rgba(255, 255, 255, 0.55);
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 12px 40px rgba(15, 23, 42, 0.12);

  /* Text */
  --text-heading: #0f172a;
  --text-body: #475569;
  --text-muted: #94a3b8;

  /* Radius */
  --r-sm: 0.75rem;
  --r-md: 1.25rem;
  --r-lg: 1.75rem;
  --r-xl: 2.5rem;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-blur: blur(16px);

  /* Transitions */
  --tr-fast: 0.15s ease;
  --tr-med: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   LMS landing portal — premium clay UI (presentation-only override)
   The page markup, links, actions, IDs and application logic remain intact.
   ================================================================ */
html:has(body.auth-portal-page),
body.auth-portal-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden !important;
  background: #f7faff;
}

body.auth-portal-page .lms-global-bg {
  display: none !important;
}

body.auth-portal-page .portal-shell {
  isolation: isolate;
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0 !important;
  padding: clamp(10px, 1.8vh, 20px) clamp(12px, 2.8vw, 54px) !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 3% 4%, rgba(69, 135, 242, .17) 0, rgba(69, 135, 242, .07) 18%, transparent 35%),
    radial-gradient(circle at 98% 93%, rgba(255, 126, 43, .17) 0, rgba(255, 126, 43, .06) 19%, transparent 36%),
    radial-gradient(circle at 74% 0%, rgba(119, 193, 255, .10), transparent 25%),
    linear-gradient(142deg, #f7faff 0%, #fff 46%, #fff9f4 100%) !important;
}

body.auth-portal-page .portal-shell::before,
body.auth-portal-page .portal-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: min(38vw, 620px) !important;
  aspect-ratio: 1.25 !important;
  border: 2px solid rgba(58, 127, 235, .075) !important;
  border-radius: 49% 51% 58% 42% / 48% 42% 58% 52% !important;
  filter: drop-shadow(0 22px 40px rgba(63, 112, 183, .05));
}

body.auth-portal-page .portal-shell::before {
  top: -19%;
  left: -9%;
  transform: rotate(-13deg) !important;
}

body.auth-portal-page .portal-shell::after {
  right: -11%;
  bottom: -24%;
  border-color: rgba(246, 116, 34, .09) !important;
  transform: rotate(19deg) !important;
}

body.auth-portal-page .portal-content {
  display: grid !important;
  grid-template-rows: 18% 68% 14% !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 1760px !important;
  min-height: 0 !important;
  margin-inline: auto;
}

/* Reset Tailwind space-y margins so the logo cannot be pushed off-screen. */
body.auth-portal-page .portal-content > .text-center,
body.auth-portal-page .portal-content > .text-center > *,
body.auth-portal-page .portal-content > .text-center > div > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.auth-portal-page .portal-content > .text-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(3px, .65vh, 8px) !important;
  min-height: 0 !important;
  padding-top: clamp(2px, .5vh, 6px);
}

body.auth-portal-page .portal-content > .text-center > img {
  display: block;
  width: clamp(126px, min(9vw, 15vh), 170px) !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
  filter: drop-shadow(0 8px 13px rgba(22, 47, 88, .10)) !important;
}

body.auth-portal-page .portal-content > .text-center > .space-y-2 {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: clamp(2px, .35vh, 5px) !important;
}

body.auth-portal-page .portal-content h1 {
  color: #14213d !important;
  font-size: clamp(27px, min(2.72vw, 5vh), 52px) !important;
  line-height: 1.06 !important;
  font-weight: 700 !important;
  letter-spacing: -.042em !important;
  text-wrap: balance;
}

body.auth-portal-page .portal-content > .text-center p {
  color: #8792a7 !important;
  font-size: clamp(13px, min(1.15vw, 2.25vh), 20px) !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
  letter-spacing: .015em !important;
}

body.auth-portal-page .portal-content > .text-center > div:last-child {
  width: clamp(46px, 3.4vw, 66px) !important;
  height: 5px !important;
  flex: 0 0 5px;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #347cf0 0 50%, #ff7417 50%) !important;
  box-shadow: 0 5px 12px rgba(49, 105, 195, .18), inset 0 1px 2px rgba(255, 255, 255, .85) !important;
}

body.auth-portal-page .portal-content > .grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: clamp(16px, 1.9vw, 36px) !important;
  min-width: 0;
  min-height: 0;
  padding: clamp(5px, .9vh, 10px) 0 clamp(8px, 1.2vh, 14px) !important;
}

body.auth-portal-page .portal-card {
  display: block !important;
  width: 100%;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  padding: 5px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: clamp(22px, 1.6vw, 30px) !important;
  background: linear-gradient(145deg, rgba(247, 251, 255, .96), rgba(231, 242, 255, .96)) !important;
  box-shadow:
    15px 19px 36px rgba(53, 100, 165, .14),
    -8px -8px 22px rgba(255, 255, 255, .96),
    inset 3px 3px 6px rgba(255, 255, 255, .95),
    inset -4px -5px 10px rgba(80, 132, 199, .08) !important;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease, border-color .28s ease !important;
}

body.auth-portal-page .portal-card:nth-child(even) {
  background: linear-gradient(145deg, rgba(255, 250, 247, .97), rgba(255, 237, 226, .96)) !important;
  box-shadow:
    15px 19px 36px rgba(171, 91, 39, .12),
    -8px -8px 22px rgba(255, 255, 255, .96),
    inset 3px 3px 6px rgba(255, 255, 255, .95),
    inset -4px -5px 10px rgba(215, 110, 42, .075) !important;
}

body.auth-portal-page .portal-card:hover {
  z-index: 2;
  transform: translateY(-6px) scale(1.02) !important;
  border-color: rgba(82, 145, 239, .24) !important;
  box-shadow:
    18px 24px 42px rgba(55, 103, 169, .19),
    -9px -9px 24px rgba(255, 255, 255, .98),
    inset 3px 3px 6px rgba(255, 255, 255, .96) !important;
}

body.auth-portal-page .portal-card:focus-visible,
body.auth-portal-page .portal-card a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .42) !important;
  outline-offset: 4px !important;
}

body.auth-portal-page .portal-card .card-inner {
  display: grid !important;
  grid-template-rows: auto auto 1fr auto !important;
  justify-items: center !important;
  align-items: start !important;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  padding: clamp(18px, 2.15vh, 30px) clamp(14px, 1.55vw, 26px) !important;
  border: 1px solid rgba(255, 255, 255, .82) !important;
  border-radius: clamp(18px, 1.35vw, 25px) !important;
  background: rgba(255, 255, 255, .32) !important;
}

body.auth-portal-page .portal-card .icon-box {
  grid-row: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: clamp(54px, min(4.25vw, 8vh), 76px) !important;
  height: clamp(54px, min(4.25vw, 8vh), 76px) !important;
  margin: 0 0 clamp(15px, 2.1vh, 24px) !important;
  border: 3px solid rgba(255, 255, 255, .8) !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: linear-gradient(145deg, #5a9bff, #2469dc) !important;
  box-shadow:
    8px 11px 20px rgba(47, 117, 226, .30),
    -5px -5px 12px rgba(255, 255, 255, .97),
    inset 4px 4px 7px rgba(255, 255, 255, .36),
    inset -4px -5px 8px rgba(15, 70, 158, .24) !important;
}

body.auth-portal-page .portal-card:nth-child(even) .icon-box {
  background: linear-gradient(145deg, #ff984f, #f35d08) !important;
  box-shadow:
    8px 11px 20px rgba(241, 96, 14, .28),
    -5px -5px 12px rgba(255, 255, 255, .97),
    inset 4px 4px 7px rgba(255, 255, 255, .36),
    inset -4px -5px 8px rgba(161, 53, 3, .23) !important;
}

body.auth-portal-page .portal-card:hover .icon-box {
  transform: translateY(-3px) rotate(2deg) !important;
}

body.auth-portal-page .portal-card .icon-box svg {
  width: clamp(25px, min(2.2vw, 4vh), 36px) !important;
  height: clamp(25px, min(2.2vw, 4vh), 36px) !important;
  stroke-width: 1.8;
}

body.auth-portal-page .portal-card .card-inner > .text-center {
  grid-row: 2;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-self: start;
  width: 100%;
  min-height: 0 !important;
  gap: clamp(7px, 1vh, 12px) !important;
}

body.auth-portal-page .portal-card .card-inner h3 {
  margin: 0 !important;
  color: #14213d !important;
  font-size: clamp(22px, 2vw, 40px) !important;
  line-height: 1.12 !important;
  font-weight: 700 !important;
  letter-spacing: -.032em !important;
  white-space: nowrap;
}

body.auth-portal-page .portal-card .card-inner p {
  display: block !important;
  max-width: 30ch;
  margin: 0 auto !important;
  padding-inline: 0 !important;
  overflow: visible !important;
  color: #66738c !important;
  font-size: clamp(13px, .98vw, 18px) !important;
  line-height: 1.48 !important;
  font-weight: 500 !important;
  text-wrap: balance;
  -webkit-line-clamp: unset !important;
}

body.auth-portal-page .portal-card .card-inner > .cta-button,
body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  grid-row: 4;
  align-self: end;
  width: 100% !important;
  margin: 0 !important;
}

body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: clamp(7px, .9vh, 10px) !important;
}

body.auth-portal-page .portal-card .cta-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: clamp(46px, 6vh, 58px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 clamp(12px, 1.3vw, 22px) !important;
  border: 3px solid rgba(255, 255, 255, .72) !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: linear-gradient(180deg, #4b8ff6, #2d73e4) !important;
  font-size: clamp(12px, .98vw, 18px) !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
  white-space: nowrap;
  box-shadow:
    7px 10px 17px rgba(43, 111, 218, .28),
    -4px -4px 10px rgba(255, 255, 255, .9),
    inset 3px 3px 5px rgba(255, 255, 255, .28),
    inset -3px -4px 7px rgba(18, 68, 151, .22) !important;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease !important;
}

body.auth-portal-page .portal-card:nth-child(even) .cta-button {
  background: linear-gradient(180deg, #ff812c, #f45e08) !important;
  box-shadow:
    7px 10px 17px rgba(236, 91, 10, .26),
    -4px -4px 10px rgba(255, 255, 255, .9),
    inset 3px 3px 5px rgba(255, 255, 255, .28),
    inset -3px -4px 7px rgba(155, 48, 2, .21) !important;
}

body.auth-portal-page .portal-card:hover .cta-button {
  transform: translateY(-2px) scale(1.02) !important;
  filter: saturate(1.06) brightness(1.025);
}

body.auth-portal-page .portal-card .cta-button:active {
  transform: translateY(1px) scale(.985) !important;
}

body.auth-portal-page .portal-card .tutor-register-link {
  margin: 0 !important;
  color: #d85a12 !important;
  font-size: clamp(9px, .7vw, 12px) !important;
  line-height: 1.2;
  font-weight: 800 !important;
  letter-spacing: .14em !important;
}

body.auth-portal-page .portal-content > .mt-20 {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: .48 !important;
}

body.auth-portal-page .portal-content > .mt-20 p {
  color: #50607b;
  font-size: clamp(8px, .56vw, 10px) !important;
  line-height: 1.3;
  white-space: nowrap;
}

@media (max-width: 960px) {
  body.auth-portal-page .portal-content {
    grid-template-rows: 19% 77% 4% !important;
    max-width: 760px !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(9px, 1.35vh, 15px) !important;
    padding-block: 4px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: clamp(9px, 1.3vh, 15px) clamp(10px, 2vw, 18px) !important;
  }

  body.auth-portal-page .portal-card .icon-box {
    width: clamp(40px, 5.7vh, 55px) !important;
    height: clamp(40px, 5.7vh, 55px) !important;
    margin-bottom: clamp(5px, .8vh, 9px) !important;
  }

  body.auth-portal-page .portal-card .card-inner h3 {
    font-size: clamp(17px, 3vw, 26px) !important;
  }

  body.auth-portal-page .portal-card .card-inner p {
    font-size: clamp(10px, 1.8vw, 14px) !important;
    line-height: 1.32 !important;
  }

  body.auth-portal-page .portal-card .cta-button {
    height: clamp(34px, 4.7vh, 44px) !important;
    font-size: clamp(9px, 1.65vw, 13px) !important;
  }

  body.auth-portal-page .portal-content > .mt-20 {
    display: none !important;
  }
}

@media (max-width: 520px) {
  body.auth-portal-page .portal-shell {
    padding: 6px 7px !important;
  }

  body.auth-portal-page .portal-content {
    grid-template-rows: 18% 82% !important;
  }

  body.auth-portal-page .portal-content > .text-center {
    gap: 2px !important;
  }

  body.auth-portal-page .portal-content > .text-center > img {
    width: clamp(104px, 31vw, 128px) !important;
  }

  body.auth-portal-page .portal-content h1 {
    font-size: clamp(18px, 5.35vw, 24px) !important;
    max-width: 94vw;
  }

  body.auth-portal-page .portal-content > .text-center p {
    font-size: clamp(10px, 3vw, 13px) !important;
  }

  body.auth-portal-page .portal-content > .text-center > div:last-child {
    width: 40px !important;
    height: 4px !important;
    flex-basis: 4px;
  }

  body.auth-portal-page .portal-content > .grid {
    gap: 7px !important;
    padding-bottom: 3px !important;
  }

  body.auth-portal-page .portal-card {
    padding: 3px !important;
    border-radius: 18px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: clamp(7px, 1vh, 10px) 7px !important;
    border-radius: 15px !important;
  }

  body.auth-portal-page .portal-card .icon-box {
    width: clamp(34px, 5.4vh, 44px) !important;
    height: clamp(34px, 5.4vh, 44px) !important;
    margin-bottom: 4px !important;
    border-width: 2px !important;
  }

  body.auth-portal-page .portal-card .icon-box svg {
    width: 19px !important;
    height: 19px !important;
  }

  body.auth-portal-page .portal-card .card-inner > .text-center {
    gap: 3px !important;
  }

  body.auth-portal-page .portal-card .card-inner h3 {
    font-size: clamp(13px, 4vw, 17px) !important;
  }

  body.auth-portal-page .portal-card .card-inner p {
    display: -webkit-box !important;
    overflow: hidden !important;
    font-size: clamp(8px, 2.35vw, 10px) !important;
    line-height: 1.25 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2 !important;
  }

  body.auth-portal-page .portal-card .cta-button {
    height: clamp(30px, 4.7vh, 38px) !important;
    padding-inline: 5px !important;
    border-width: 2px !important;
    font-size: clamp(7px, 2.25vw, 10px) !important;
    letter-spacing: .02em !important;
  }

  body.auth-portal-page .portal-card .cta-button svg {
    width: 12px !important;
    height: 12px !important;
    margin-left: 3px !important;
  }

  body.auth-portal-page .portal-card .tutor-register-link {
    font-size: 7px !important;
    letter-spacing: .08em !important;
  }
}

@media (max-height: 650px) and (min-width: 961px) {
  body.auth-portal-page .portal-content {
    grid-template-rows: 20% 76% 4% !important;
  }

  body.auth-portal-page .portal-content > .text-center > img {
    width: 112px !important;
  }

  body.auth-portal-page .portal-content h1 {
    font-size: clamp(25px, 4.4vh, 34px) !important;
  }

  body.auth-portal-page .portal-content > .text-center p {
    font-size: 12px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding-block: 12px !important;
  }

  body.auth-portal-page .portal-content > .mt-20 {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-portal-page .portal-shell *,
  body.auth-portal-page .portal-shell *::before,
  body.auth-portal-page .portal-shell *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ─── Reset / Base ───────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── Animated Background ────────────────────────────────── */
.lms-global-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 40%, #f0fdf4 100%);
}

.lms-global-bg::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  top: -200px;
  left: -150px;
  animation: floatBlob1 18s ease-in-out infinite;
}

.lms-global-bg::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation: floatBlob2 14s ease-in-out infinite;
}

.lms-bg-layer {
  position: absolute;
  border-radius: 50%;
  background: transparent;
  border: none;
}

.lms-bg-layer-1 {
  width: 400px;
  height: 400px;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.07) 0%, transparent 70%);
  animation: floatBlob3 20s ease-in-out infinite;
}

.lms-bg-layer-2 {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 20%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.07) 0%, transparent 70%);
  animation: floatBlob4 16s ease-in-out infinite;
}

@keyframes floatBlob1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(60px, 40px) scale(1.1);
  }

  66% {
    transform: translate(-30px, 70px) scale(0.9);
  }
}

@keyframes floatBlob2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-50px, -40px) scale(1.15);
  }
}

@keyframes floatBlob3 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-40px, 30px);
  }
}

@keyframes floatBlob4 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(30px, -20px);
  }
}

/* ─── Glassmorphism Containers ───────────────────────────── */
.glass-container {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  border-radius: var(--r-xl);
  transition: all var(--tr-med);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.2);
}

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  transition: all var(--tr-med);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--clr-primary-glow);
  transform: translate(30px, -30px);
  transition: all var(--tr-med);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.stat-card:hover::after {
  transform: translate(20px, -20px) scale(1.3);
}

.stat-card.accent-cyan::after {
  background: var(--clr-accent-glow);
}

.stat-card.accent-green::after {
  background: rgba(16, 185, 129, 0.18);
}

.stat-card.accent-amber::after {
  background: rgba(245, 158, 11, 0.18);
}

/* ─── Sidebar ────────────────────────────────────────────── */
.lms-sidebar {
  width: 16rem;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.lms-sidebar::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  pointer-events: none;
}

.sidebar-logo-area {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-logo-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  padding: 0.5rem 0.75rem;
  backdrop-filter: blur(8px);
  transition: all var(--tr-fast);
}

.sidebar-logo-wrap:hover {
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem 1.5rem;
}

.sidebar-section-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  padding: 0 0.75rem;
  margin: 1.25rem 0 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-text);
  transition: all var(--tr-fast);
  position: relative;
  margin-bottom: 2px;
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--tr-fast);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.sidebar-link:hover svg {
  opacity: 1;
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--sidebar-border);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  transition: all var(--tr-med);
}

.sidebar-logout:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

/* ─── Page Header ────────────────────────────────────────── */
.page-header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  height: 4.5rem;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 20px rgba(15, 23, 42, 0.04);
}

.page-header-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.page-header-sub {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ─── Pill Badge ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.badge-primary {
  background: rgba(99, 102, 241, 0.12);
  color: var(--clr-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.1);
  color: var(--clr-accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--clr-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.1);
  color: var(--clr-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--clr-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--r-md);
  padding: 0.65rem 1.25rem;
  transition: all var(--tr-med);
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--tr-fast);
}

.btn:hover::after {
  background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px var(--clr-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px var(--clr-primary-glow);
}

.btn-dark {
  background: var(--text-heading);
  color: #fff;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.2);
}

.btn-dark:hover {
  background: var(--clr-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-heading);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.1);
}

.btn-outline-primary {
  background: transparent;
  color: var(--clr-primary);
  border: 1.5px solid var(--clr-primary);
}

.btn-outline-primary:hover {
  background: var(--clr-primary);
  color: #fff;
}

/* ─── Progress Bar ───────────────────────────────────────── */
.progress-track {
  background: rgba(15, 23, 42, 0.07);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  transition: width var(--tr-slow);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ─── Course Card ────────────────────────────────────────── */
.course-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--tr-med);
  box-shadow: var(--shadow-card);
  position: relative;
}

.course-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--tr-med);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.course-card:hover::before {
  opacity: 1;
}

.course-card-thumb {
  position: relative;
  height: 10rem;
  overflow: hidden;
}

.course-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

.course-card:hover .course-card-thumb img {
  transform: scale(1.07);
}

.course-card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(15, 23, 42, 0.5) 100%);
}

.course-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ─── Enroll Alert Toast ─────────────────────────────────── */
.lms-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--r-lg);
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: slideDown 0.4s ease;
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  font-weight: 700;
}

.lms-toast-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  color: #065f46;
}

.lms-toast-info {
  background: rgba(6, 182, 212, 0.08);
  border: 1.5px solid rgba(6, 182, 212, 0.2);
  color: #0e7490;
}

.lms-toast-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  color: #92400e;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Section Headings ───────────────────────────────────── */
.section-title {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-heading);
}

.section-link {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-primary);
  transition: color var(--tr-fast);
}

.section-link:hover {
  color: var(--clr-primary-dark);
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 3px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ─── Utility Radius ─────────────────────────────────────── */
.rounded-3xl-plus {
  border-radius: 2.5rem;
}

.rounded-4xl {
  border-radius: 3rem;
}

.rounded-5xl {
  border-radius: 4rem;
}

/* ─── line-clamp ─────────────────────────────────────────── */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Avatar Ring ────────────────────────────────────────── */
.avatar-ring {
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  transition: box-shadow var(--tr-fast);
}

.avatar-ring:hover {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.4);
}

/* ─── Icon Box ───────────────────────────────────────────── */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  flex-shrink: 0;
}

.icon-box-sm {
  width: 2rem;
  height: 2rem;
}

.icon-box-md {
  width: 2.75rem;
  height: 2.75rem;
}

.icon-box-lg {
  width: 3.5rem;
  height: 3.5rem;
}

.icon-box-primary {
  background: rgba(99, 102, 241, 0.12);
  color: var(--clr-primary);
}

.icon-box-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--clr-accent);
}

.icon-box-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--clr-success);
}

.icon-box-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--clr-warning);
}

.icon-box-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--clr-danger);
}

/* ─── Dark "next-session" card ───────────────────────────── */
.card-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.3);
  transition: all var(--tr-med);
  position: relative;
  overflow: hidden;
}

.card-dark::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  top: -60px;
  right: -40px;
  pointer-events: none;
}

.card-dark:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 45px rgba(15, 23, 42, 0.4);
}

/* ─── Recommended tag ────────────────────────────────────── */
.tag-recommended {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 0 var(--r-xl) 0 var(--r-md);
}

/* ─── Material list item ─────────────────────────────────── */
.material-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border-radius: var(--r-sm);
  transition: background var(--tr-fast);
  border-left: 3px solid transparent;
}

.material-item:hover {
  background: rgba(99, 102, 241, 0.05);
}

.material-item.type-pdf {
  border-left-color: #ef4444;
}

.material-item.type-video {
  border-left-color: #6366f1;
}

.material-item.type-other {
  border-left-color: #10b981;
}

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(99, 102, 241, 0.4);
}

/* Production responsive LMS system */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

img,
video,
svg,
canvas {
  max-width: 100%;
}

img,
video {
  height: auto;
}

body {
  min-width: 0;
}

body:not(.lms-has-sidebar) {
  height: auto !important;
  min-height: 100vh;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body > *,
main,
header,
section,
article,
form,
.flex,
.grid,
.flex-1,
.flex-grow {
  min-width: 0;
}

.lms-mobile-nav-toggle,
.lms-sidebar-backdrop {
  display: none;
}

.lms-mobile-nav-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10000;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 0.875rem;
  background: #0a1f44;
  color: #fff;
  box-shadow: 0 14px 34px rgba(2, 8, 23, 0.24);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}

.lms-mobile-nav-toggle span {
  width: 1.15rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.lms-mobile-nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.lms-mobile-nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.lms-mobile-nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.lms-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(2, 8, 23, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

body.lms-has-sidebar {
  background: #e8e9e2;
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

body.lms-has-sidebar .lms-app-sidebar {
  width: 20rem;
  min-width: 20rem;
  flex: 0 0 20rem;
  height: 100vh;
}

body.lms-has-sidebar > .lms-app-sidebar + .flex-grow {
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
}

body.lms-has-sidebar main {
  width: 100%;
  max-width: 100%;
}

body.lms-has-sidebar h1,
body.lms-has-sidebar h2 {
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.12;
}

body.lms-has-sidebar h3 {
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.18;
}

body.lms-has-sidebar p,
body.lms-has-sidebar label,
body.lms-has-sidebar input,
body.lms-has-sidebar select,
body.lms-has-sidebar textarea,
body.lms-has-sidebar button,
body.lms-has-sidebar a {
  overflow-wrap: anywhere;
}

body.lms-has-sidebar input,
body.lms-has-sidebar select,
body.lms-has-sidebar textarea {
  max-width: 100%;
}

body.lms-has-sidebar table {
  max-width: 100%;
  border-collapse: collapse;
}

body.lms-has-sidebar .overflow-x-auto {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

body.lms-has-sidebar [class*="grid-cols-4"],
body.lms-has-sidebar [class*="md:grid-cols-4"] {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

body.lms-has-sidebar [class*="grid-cols-3"],
body.lms-has-sidebar [class*="md:grid-cols-3"],
body.lms-has-sidebar [class*="lg:grid-cols-3"] {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

body.lms-has-sidebar [class*="text-[2.5rem]"],
body.lms-has-sidebar [class*="text-5xl"],
body.lms-has-sidebar [class*="text-6xl"] {
  font-size: clamp(34px, 7vw, 64px) !important;
  line-height: 1 !important;
}

body.lms-has-sidebar [class*="rounded-[2rem]"],
body.lms-has-sidebar [class*="rounded-3xl"],
body.lms-has-sidebar [class*="shadow"] {
  min-width: 0;
}

.auth-portal-page,
.auth-portal-page .portal-shell,
.auth-portal-page .portal-content {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 1201px) {
  body.lms-has-sidebar .lms-app-sidebar {
    transform: none !important;
  }
}

@media (max-width: 1200px) {
  body.lms-has-sidebar .lms-app-sidebar {
    width: 16rem !important;
    min-width: 16rem !important;
    flex-basis: 16rem !important;
  }

  body.lms-has-sidebar main {
    padding: clamp(1.25rem, 2vw, 2rem) !important;
  }

  body.lms-has-sidebar header {
    padding-left: clamp(1rem, 2vw, 1.5rem) !important;
    padding-right: clamp(1rem, 2vw, 1.5rem) !important;
  }

  body.lms-has-sidebar header > div {
    gap: 1rem;
  }
}

@media (max-width: 992px) {
  body.lms-has-sidebar {
    display: block !important;
    height: auto !important;
    min-height: 100dvh;
    overflow-x: hidden !important;
  }

  body.lms-has-sidebar .lms-mobile-nav-toggle {
    display: flex;
  }

  body.lms-has-sidebar .lms-app-sidebar,
  body.lms-has-sidebar #admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 80% !important;
    max-width: 300px !important;
    min-width: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    box-shadow: 18px 0 44px rgba(2, 8, 23, 0.32);
  }

  body.lms-sidebar-open .lms-app-sidebar,
  body.lms-sidebar-open #admin-sidebar {
    transform: translateX(0) !important;
  }

  body.lms-sidebar-open .lms-sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body.lms-has-sidebar > .flex-grow,
  body.lms-has-sidebar > main,
  body.lms-has-sidebar > div:not(.lms-global-bg):not(.lms-sidebar-backdrop):not(.lms-app-sidebar) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    overflow: visible !important;
  }

  body.lms-has-sidebar header {
    padding: 1rem 1rem 0.5rem 4.75rem !important;
  }

  body.lms-has-sidebar header > div {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1.125rem !important;
    border-radius: 1.125rem !important;
  }

  body.lms-has-sidebar header input[type="text"],
  body.lms-has-sidebar header input[type="search"] {
    width: min(100%, 22rem) !important;
  }

  body.lms-has-sidebar main {
    padding: 1rem !important;
    overflow: visible !important;
  }

  body.lms-has-sidebar [class*="grid-cols-4"],
  body.lms-has-sidebar [class*="md:grid-cols-4"],
  body.lms-has-sidebar [class*="grid-cols-3"],
  body.lms-has-sidebar [class*="md:grid-cols-3"],
  body.lms-has-sidebar [class*="lg:grid-cols-3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.lms-has-sidebar [class*="p-10"] {
    padding: 1.25rem !important;
  }

  body.lms-has-sidebar [class*="gap-8"] {
    gap: 1.25rem !important;
  }
}

@media (max-width: 768px) {
  body.lms-has-sidebar .lms-mobile-nav-toggle {
    top: 0.75rem;
    left: 0.75rem;
    width: 2.625rem;
    height: 2.625rem;
  }

  body.lms-has-sidebar header {
    padding: 0.75rem 0.75rem 0.375rem 3.875rem !important;
  }

  body.lms-has-sidebar header > div {
    padding: 18px !important;
    border-radius: 18px !important;
    gap: 0.75rem !important;
  }

  body.lms-has-sidebar header > div > div {
    min-width: 0;
  }

  body.lms-has-sidebar header > div > div:first-child {
    flex: 1 1 100%;
  }

  body.lms-has-sidebar header > div > div:last-child {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  body.lms-has-sidebar header input[type="text"],
  body.lms-has-sidebar header input[type="search"] {
    width: 100% !important;
    min-height: 44px;
  }

  body.lms-has-sidebar header .relative:has(input) {
    width: 100%;
    flex: 1 1 100%;
  }

  body.lms-has-sidebar header a[aria-label],
  body.lms-has-sidebar header button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  body.lms-has-sidebar main {
    padding: 0.75rem !important;
  }

  body.lms-has-sidebar [class*="grid-cols-4"],
  body.lms-has-sidebar [class*="md:grid-cols-4"],
  body.lms-has-sidebar [class*="grid-cols-3"],
  body.lms-has-sidebar [class*="md:grid-cols-3"],
  body.lms-has-sidebar [class*="lg:grid-cols-3"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem !important;
  }

  body.lms-has-sidebar [class*="p-8"],
  body.lms-has-sidebar [class*="p-6"],
  body.lms-has-sidebar [class*="p-5"] {
    padding: 18px !important;
  }

  body.lms-has-sidebar [class*="rounded-[2rem]"],
  body.lms-has-sidebar [class*="rounded-3xl"] {
    border-radius: 20px !important;
  }

  body.lms-has-sidebar [class*="ml-[4.25rem]"] {
    margin-left: 0 !important;
  }

  body.lms-has-sidebar .flex.items-center.justify-between {
    gap: 0.75rem;
  }

  body.lms-has-sidebar table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  body.lms-has-sidebar form .grid,
  body.lms-has-sidebar form [class*="grid-cols-2"],
  body.lms-has-sidebar form [class*="grid-cols-3"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.lms-has-sidebar button,
  body.lms-has-sidebar .btn,
  body.lms-has-sidebar input[type="submit"] {
    min-height: 44px;
  }

  .auth-portal-page .portal-shell {
    padding: 24px 16px !important;
  }

  .auth-portal-page .portal-content {
    max-width: 100% !important;
  }

  .auth-portal-page .portal-card,
  .auth-portal-page .card-inner {
    border-radius: 22px !important;
  }
}

@media (max-width: 576px) {
  body.lms-has-sidebar header {
    padding-left: 3.5rem !important;
  }

  body.lms-has-sidebar header > div,
  body.lms-has-sidebar [class*="p-8"],
  body.lms-has-sidebar [class*="p-6"],
  body.lms-has-sidebar [class*="p-5"],
  body.lms-has-sidebar [class*="p-4"] {
    padding: 1rem !important;
  }

  body.lms-has-sidebar [class*="mb-10"],
  body.lms-has-sidebar [class*="mb-8"],
  body.lms-has-sidebar [class*="mb-6"] {
    margin-bottom: 1rem !important;
  }
}

@media (max-width: 420px) {
  body.lms-has-sidebar .lms-mobile-nav-toggle {
    top: 0.625rem;
    left: 0.625rem;
    width: 2.45rem;
    height: 2.45rem;
  }

  body.lms-has-sidebar header {
    padding: 0.625rem 0.625rem 0.375rem 3.25rem !important;
  }

  body.lms-has-sidebar main {
    padding: 0.625rem !important;
  }

  body.lms-has-sidebar h1,
  body.lms-has-sidebar h2 {
    font-size: clamp(22px, 7vw, 28px);
  }

  body.lms-has-sidebar h3 {
    font-size: clamp(18px, 6vw, 24px);
  }

  body.lms-has-sidebar [class*="tracking-[0.2em]"],
  body.lms-has-sidebar [class*="tracking-widest"] {
    letter-spacing: 0.08em !important;
  }
}

@media (orientation: landscape) and (max-width: 900px) {
  body.lms-has-sidebar {
    display: block !important;
    height: auto !important;
  }

  body.lms-has-sidebar .lms-mobile-nav-toggle {
    display: flex;
  }

  body.lms-has-sidebar .lms-app-sidebar,
  body.lms-has-sidebar #admin-sidebar {
    position: fixed !important;
    width: 80% !important;
    max-width: 300px !important;
    height: 100dvh !important;
    transform: translateX(-100%) !important;
    z-index: 9999 !important;
  }

  body.lms-sidebar-open .lms-app-sidebar,
  body.lms-sidebar-open #admin-sidebar {
    transform: translateX(0) !important;
  }

  body.lms-has-sidebar header > div {
    flex-wrap: wrap !important;
  }

  body.lms-has-sidebar [class*="grid-cols-4"],
  body.lms-has-sidebar [class*="md:grid-cols-4"],
  body.lms-has-sidebar [class*="grid-cols-3"],
  body.lms-has-sidebar [class*="md:grid-cols-3"],
  body.lms-has-sidebar [class*="lg:grid-cols-3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Responsive typography scale correction */
body.lms-has-sidebar h1,
body.lms-has-sidebar h2 {
  font-size: clamp(22px, 3vw, 36px) !important;
  line-height: 1.14 !important;
}

body.lms-has-sidebar header h1,
body.lms-has-sidebar header h2 {
  font-size: clamp(22px, 3vw, 36px) !important;
  line-height: 1.12 !important;
  font-weight: 700 !important;
}

body.lms-has-sidebar h3,
body.lms-has-sidebar section h2,
body.lms-has-sidebar section h3,
body.lms-has-sidebar main > div > h3 {
  font-size: clamp(20px, 2.4vw, 28px) !important;
  line-height: 1.18 !important;
}

body.lms-has-sidebar [class*="text-[2.5rem]"],
body.lms-has-sidebar [class*="text-5xl"],
body.lms-has-sidebar [class*="text-6xl"] {
  font-size: clamp(36px, 5vw, 56px) !important;
  line-height: 0.98 !important;
}

body.lms-has-sidebar [class*="text-[10px]"],
body.lms-has-sidebar [class*="text-xs"] {
  font-size: clamp(12px, 1.2vw, 15px) !important;
  line-height: 1.35 !important;
}

body.lms-has-sidebar p,
body.lms-has-sidebar li,
body.lms-has-sidebar td,
body.lms-has-sidebar th,
body.lms-has-sidebar label {
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.45;
}

body.lms-has-sidebar .lms-app-sidebar a,
body.lms-has-sidebar .lms-app-sidebar span {
  font-size: clamp(13px, 1vw, 15px) !important;
  line-height: 1.25 !important;
}

body.lms-has-sidebar .lms-app-sidebar p {
  font-size: clamp(11px, 0.9vw, 13px) !important;
  line-height: 1.25 !important;
}

body.lms-has-sidebar input,
body.lms-has-sidebar select,
body.lms-has-sidebar textarea,
body.lms-has-sidebar input::placeholder,
body.lms-has-sidebar textarea::placeholder {
  font-size: clamp(14px, 1vw, 15px) !important;
  line-height: 1.4 !important;
}

body.lms-has-sidebar header p {
  font-size: clamp(13px, 1vw, 15px) !important;
  line-height: 1.35 !important;
}

body.lms-has-sidebar button,
body.lms-has-sidebar .btn,
body.lms-has-sidebar input[type="submit"],
body.lms-has-sidebar [role="button"] {
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.25;
}

@media (max-width: 992px) {
  body.lms-has-sidebar h1,
  body.lms-has-sidebar h2,
  body.lms-has-sidebar header h1,
  body.lms-has-sidebar header h2 {
    font-size: clamp(24px, 3vw, 32px) !important;
  }

  body.lms-has-sidebar h3,
  body.lms-has-sidebar section h2,
  body.lms-has-sidebar section h3 {
    font-size: clamp(20px, 2.6vw, 24px) !important;
  }

  body.lms-has-sidebar [class*="text-[2.5rem]"],
  body.lms-has-sidebar [class*="text-5xl"],
  body.lms-has-sidebar [class*="text-6xl"] {
    font-size: clamp(42px, 5vw, 48px) !important;
  }

  body.lms-has-sidebar .lms-app-sidebar a,
  body.lms-has-sidebar .lms-app-sidebar span {
    font-size: 14px !important;
  }

  body.lms-has-sidebar header p {
    font-size: 14px !important;
  }
}

@media (max-width: 768px) {
  body.lms-has-sidebar h1,
  body.lms-has-sidebar h2,
  body.lms-has-sidebar header h1,
  body.lms-has-sidebar header h2 {
    font-size: clamp(22px, 5.4vw, 26px) !important;
    line-height: 1.16 !important;
  }

  body.lms-has-sidebar h3,
  body.lms-has-sidebar section h2,
  body.lms-has-sidebar section h3 {
    font-size: clamp(20px, 4.8vw, 22px) !important;
  }

  body.lms-has-sidebar [class*="text-[2.5rem]"],
  body.lms-has-sidebar [class*="text-5xl"],
  body.lms-has-sidebar [class*="text-6xl"] {
    font-size: clamp(36px, 9vw, 42px) !important;
  }

  body.lms-has-sidebar [class*="text-[10px]"],
  body.lms-has-sidebar [class*="text-xs"] {
    font-size: clamp(12px, 3.2vw, 13px) !important;
  }

  body.lms-has-sidebar p,
  body.lms-has-sidebar li,
  body.lms-has-sidebar td,
  body.lms-has-sidebar th,
  body.lms-has-sidebar label {
    font-size: clamp(13px, 3.4vw, 15px);
  }

  body.lms-has-sidebar .lms-app-sidebar a,
  body.lms-has-sidebar .lms-app-sidebar span {
    font-size: clamp(13px, 3.4vw, 14px) !important;
  }

  body.lms-has-sidebar header p {
    font-size: 13px !important;
  }

  body.lms-has-sidebar input,
  body.lms-has-sidebar select,
  body.lms-has-sidebar textarea,
  body.lms-has-sidebar input::placeholder,
  body.lms-has-sidebar textarea::placeholder {
    font-size: 14px !important;
  }
}

/* Restore original LMS utility typography scale */
body.lms-has-sidebar .text-\[10px\],
body.lms-has-sidebar [class*="text-[10px]"] {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

body.lms-has-sidebar .text-\[11px\],
body.lms-has-sidebar [class*="text-[11px]"] {
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body.lms-has-sidebar .text-xs {
  font-size: 12px !important;
  line-height: 1rem !important;
}

body.lms-has-sidebar .text-sm,
body.lms-has-sidebar input.text-sm,
body.lms-has-sidebar input.text-sm::placeholder {
  font-size: 14px !important;
  line-height: 1.25rem !important;
}

body.lms-has-sidebar .text-base {
  font-size: 16px !important;
  line-height: 1.5rem !important;
}

body.lms-has-sidebar .text-lg {
  font-size: 18px !important;
  line-height: 1.75rem !important;
}

body.lms-has-sidebar .text-xl {
  font-size: 20px !important;
  line-height: 1.75rem !important;
}

body.lms-has-sidebar .text-2xl,
body.lms-has-sidebar header h2.text-2xl {
  font-size: 24px !important;
  line-height: 2rem !important;
}

body.lms-has-sidebar [class*="text-[2.5rem]"] {
  font-size: 2.5rem !important;
  line-height: 1 !important;
}

body.lms-has-sidebar .lms-app-sidebar [class*="text-[11px]"] {
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body.lms-has-sidebar .lms-app-sidebar [class*="text-[10px]"] {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

body.lms-has-sidebar button [class*="text-[10px]"],
body.lms-has-sidebar a [class*="text-[10px]"],
body.lms-has-sidebar button.text-\[10px\],
body.lms-has-sidebar a.text-\[10px\] {
  font-size: 10px !important;
}

/* Admin responsive hardening */
body.lms-has-sidebar {
  min-height: 100dvh;
}

body.lms-has-sidebar > .flex,
body.lms-has-sidebar > div > .flex-1,
body.lms-has-sidebar > div > .flex-grow,
body.lms-has-sidebar .flex-1,
body.lms-has-sidebar .flex-grow {
  min-width: 0;
}

body.lms-has-sidebar main,
body.lms-has-sidebar header,
body.lms-has-sidebar form,
body.lms-has-sidebar .grid,
body.lms-has-sidebar .overflow-x-auto {
  min-width: 0;
}

body.lms-has-sidebar table {
  width: 100%;
}

body.lms-has-sidebar th,
body.lms-has-sidebar td {
  vertical-align: middle;
}

body.lms-has-sidebar input,
body.lms-has-sidebar select,
body.lms-has-sidebar textarea {
  min-width: 0;
}

body.lms-has-sidebar [class*="min-w-["] {
  max-width: 100%;
}

body.lms-has-sidebar .custom-scrollbar {
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 993px) {
  body.lms-has-sidebar > .flex,
  body.lms-has-sidebar > div:first-of-type {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 1200px) {
  body.lms-has-sidebar > .flex,
  body.lms-has-sidebar > div:first-of-type {
    min-height: 100dvh !important;
  }

  body.lms-has-sidebar [style*="width:calc(100% - 18rem)"],
  body.lms-has-sidebar [style*="max-width:calc(100% - 18rem)"] {
    width: auto !important;
    max-width: none !important;
    flex: 1 1 auto !important;
  }

  body.lms-has-sidebar [class*="xl:grid-cols-5"],
  body.lms-has-sidebar [class*="lg:grid-cols-6"],
  body.lms-has-sidebar [class*="xl:grid-cols-6"] {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }
}

@media (max-width: 992px) {
  body.lms-has-sidebar > .flex,
  body.lms-has-sidebar > div:first-of-type {
    display: block !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    background: #f8fafc;
  }

  body.lms-has-sidebar > .flex > .flex-1,
  body.lms-has-sidebar > .flex > .flex-grow,
  body.lms-has-sidebar > div > .flex-1,
  body.lms-has-sidebar > div > .flex-grow {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  body.lms-has-sidebar .h-screen,
  body.lms-has-sidebar .h-full {
    height: auto !important;
  }

  body.lms-has-sidebar .min-h-screen {
    min-height: 100dvh !important;
  }

  body.lms-has-sidebar header {
    position: sticky;
    top: 0;
    min-height: auto !important;
    height: auto !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 0.875rem !important;
    z-index: 40;
  }

  body.lms-has-sidebar header > div {
    width: 100%;
    min-width: 0;
  }

  body.lms-has-sidebar header > div:last-child,
  body.lms-has-sidebar header form,
  body.lms-has-sidebar header .flex {
    flex-wrap: wrap;
  }

  body.lms-has-sidebar main {
    height: auto !important;
    min-height: calc(100dvh - 5rem);
    overflow: visible !important;
  }

  body.lms-has-sidebar [class*="max-w-4xl"],
  body.lms-has-sidebar [class*="max-w-5xl"],
  body.lms-has-sidebar [class*="max-w-6xl"],
  body.lms-has-sidebar [class*="max-w-7xl"],
  body.lms-has-sidebar [class*="max-w-[1600px]"],
  body.lms-has-sidebar [class*="max-w-[1700px]"] {
    max-width: 100% !important;
  }

  body.lms-has-sidebar [class*="xl:grid-cols-"],
  body.lms-has-sidebar [class*="lg:grid-cols-"],
  body.lms-has-sidebar [class*="md:grid-cols-"] {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)) !important;
  }

  body.lms-has-sidebar [class*="gap-10"] {
    gap: 1.5rem !important;
  }

  body.lms-has-sidebar [class*="px-10"],
  body.lms-has-sidebar [class*="px-8"] {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  body.lms-has-sidebar [class*="py-8"],
  body.lms-has-sidebar [class*="py-7"] {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  body.lms-has-sidebar .overflow-x-auto,
  body.lms-has-sidebar .custom-scrollbar {
    overflow-x: auto !important;
    overflow-y: visible;
  }

  body.lms-has-sidebar table {
    display: block !important;
    width: 100% !important;
    min-width: 760px;
    overflow-x: auto;
    white-space: normal;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  body.lms-has-sidebar > .flex,
  body.lms-has-sidebar > div:first-of-type {
    width: 100% !important;
  }

  body.lms-has-sidebar header {
    padding-left: 4rem !important;
  }

  body.lms-has-sidebar main {
    padding: 1rem !important;
  }

  body.lms-has-sidebar .grid,
  body.lms-has-sidebar [class*="grid-cols-2"],
  body.lms-has-sidebar [class*="grid-cols-3"],
  body.lms-has-sidebar [class*="grid-cols-4"],
  body.lms-has-sidebar [class*="grid-cols-5"],
  body.lms-has-sidebar [class*="grid-cols-6"],
  body.lms-has-sidebar [class*="sm:grid-cols-"],
  body.lms-has-sidebar [class*="md:grid-cols-"],
  body.lms-has-sidebar [class*="lg:grid-cols-"],
  body.lms-has-sidebar [class*="xl:grid-cols-"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.lms-has-sidebar .flex:not(.lms-app-sidebar):not(.lms-mobile-nav-toggle),
  body.lms-has-sidebar [class*="sm:flex-row"],
  body.lms-has-sidebar [class*="md:flex-row"],
  body.lms-has-sidebar [class*="lg:flex-row"] {
    min-width: 0;
  }

  body.lms-has-sidebar .items-center.justify-between,
  body.lms-has-sidebar .sm\:items-center.sm\:justify-between,
  body.lms-has-sidebar .md\:items-center.md\:justify-between {
    align-items: stretch !important;
  }

  body.lms-has-sidebar form .flex,
  body.lms-has-sidebar header .flex,
  body.lms-has-sidebar main > div > .flex {
    flex-wrap: wrap;
  }

  body.lms-has-sidebar form button,
  body.lms-has-sidebar form input[type="submit"],
  body.lms-has-sidebar form a,
  body.lms-has-sidebar header a,
  body.lms-has-sidebar header button {
    max-width: 100%;
  }

  body.lms-has-sidebar [class*="rounded-[4rem]"],
  body.lms-has-sidebar [class*="rounded-[3rem]"],
  body.lms-has-sidebar [class*="rounded-[2.5rem]"],
  body.lms-has-sidebar [class*="rounded-[2rem]"] {
    border-radius: 1.25rem !important;
  }

  body.lms-has-sidebar [class*="min-h-[85vh]"],
  body.lms-has-sidebar [class*="min-h-[80vh]"] {
    min-height: auto !important;
  }

  body.lms-has-sidebar [class*="w-[120%]"] {
    width: 100% !important;
  }

  body.lms-has-sidebar [class*="left-[-10%]"] {
    left: 0 !important;
  }

  body.lms-has-sidebar table {
    min-width: 680px;
  }

  body.lms-has-sidebar th,
  body.lms-has-sidebar td {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (max-width: 576px) {
  body.lms-has-sidebar header {
    padding-left: 3.75rem !important;
    padding-right: 0.75rem !important;
  }

  body.lms-has-sidebar header > div {
    padding: 0.875rem !important;
  }

  body.lms-has-sidebar main {
    padding: 0.75rem !important;
  }

  body.lms-has-sidebar [class*="px-8"],
  body.lms-has-sidebar [class*="px-6"],
  body.lms-has-sidebar [class*="px-5"],
  body.lms-has-sidebar [class*="px-4"] {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
  }

  body.lms-has-sidebar [class*="py-8"],
  body.lms-has-sidebar [class*="py-7"],
  body.lms-has-sidebar [class*="py-6"],
  body.lms-has-sidebar [class*="py-5"],
  body.lms-has-sidebar [class*="py-4"] {
    padding-top: 0.875rem !important;
    padding-bottom: 0.875rem !important;
  }

  body.lms-has-sidebar .w-20,
  body.lms-has-sidebar .h-20 {
    width: 4rem !important;
    height: 4rem !important;
  }

  body.lms-has-sidebar .w-24,
  body.lms-has-sidebar .h-24 {
    width: 4.5rem !important;
    height: 4.5rem !important;
  }

  body.lms-has-sidebar table {
    min-width: 620px;
  }
}

/* LMS portal selection — compact enterprise proportions (UI only). */
body.auth-portal-page .portal-shell {
  justify-content: flex-start !important;
  padding: clamp(20px, 4.45vh, 40px) clamp(18px, 3vw, 56px) clamp(20px, 4.45vh, 40px) !important;
}

body.auth-portal-page .portal-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 1536px !important;
  min-height: 0 !important;
}

body.auth-portal-page .portal-content > .text-center {
  flex: 0 0 auto;
  width: 100%;
  padding: 0 !important;
  gap: clamp(5px, .75vh, 9px) !important;
}

body.auth-portal-page .portal-content > .text-center > img {
  width: clamp(145px, min(9vw, 18vh), 170px) !important;
  height: auto !important;
}

body.auth-portal-page .portal-content h1 {
  font-size: clamp(32px, min(2.5vw, 6vh), 48px) !important;
  line-height: 1.08 !important;
}

body.auth-portal-page .portal-content > .text-center p {
  font-size: clamp(15px, min(1.05vw, 2.6vh), 20px) !important;
}

body.auth-portal-page .portal-content > .grid {
  display: grid !important;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: 1fr !important;
  align-items: stretch !important;
  width: 100% !important;
  height: clamp(420px, 48.9vh, 440px) !important;
  min-height: 0 !important;
  margin-top: clamp(26px, 5.55vh, 50px) !important;
  padding: 0 !important;
  gap: clamp(18px, 1.67vw, 32px) !important;
}

body.auth-portal-page .portal-card {
  width: 100% !important;
  max-width: 360px;
  height: 100% !important;
  margin-inline: auto;
  border-radius: 28px !important;
}

body.auth-portal-page .portal-card .card-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 28px !important;
  border-radius: 24px !important;
}

body.auth-portal-page .portal-card .icon-box {
  flex: 0 0 72px;
  width: 72px !important;
  height: 72px !important;
  margin: 0 0 20px !important;
  animation: portal-icon-float 4.5s ease-in-out infinite;
}

body.auth-portal-page .portal-card:nth-child(2) .icon-box,
body.auth-portal-page .portal-card:nth-child(4) .icon-box {
  animation-delay: -2.25s;
}

body.auth-portal-page .portal-card .icon-box svg {
  width: 32px !important;
  height: 32px !important;
}

body.auth-portal-page .portal-card .card-inner > .text-center {
  display: grid !important;
  grid-template-rows: 27px 48px !important;
  align-content: start;
  width: 100%;
  min-height: 89px !important;
  gap: 14px !important;
}

body.auth-portal-page .portal-card .card-inner h3 {
  align-self: center;
  margin: 0 !important;
  font-size: 22px !important;
  line-height: 27px !important;
  white-space: nowrap;
}

body.auth-portal-page .portal-card .card-inner p {
  display: -webkit-box !important;
  align-self: start;
  max-width: 30ch;
  margin: 0 auto !important;
  overflow: hidden !important;
  font-size: 16px !important;
  line-height: 24px !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
}

body.auth-portal-page .portal-card .card-inner > .cta-button,
body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  flex: 0 0 auto;
  align-self: center;
  width: 100% !important;
  margin: 30px 0 0 !important;
}

body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

body.auth-portal-page .portal-card .cta-button {
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  font-size: 16px !important;
}

body.auth-portal-page .portal-card .tutor-register-link {
  font-size: 14px !important;
  line-height: 18px !important;
}

body.auth-portal-page .portal-content > .mt-20 {
  flex: 1 1 auto;
  min-height: 20px !important;
  width: 100%;
  margin: 0 !important;
  align-items: flex-end !important;
  padding-bottom: 2px;
}

body.auth-portal-page .portal-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
}

body.auth-portal-page .portal-card:hover .cta-button {
  transform: translateY(-2px) !important;
  filter: brightness(1.04) saturate(1.05);
}

@keyframes portal-icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 1100px) and (min-width: 769px) {
  body.auth-portal-page {
    overflow-y: auto !important;
  }

  body.auth-portal-page .portal-shell {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body.auth-portal-page .portal-content {
    height: auto !important;
    max-width: 760px !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, 380px) !important;
    height: auto !important;
    gap: 24px !important;
    margin-top: 36px !important;
  }

  body.auth-portal-page .portal-content > .mt-20 {
    flex: 0 0 34px;
    align-items: flex-end !important;
  }
}

@media (max-width: 768px) {
  html:has(body.auth-portal-page),
  body.auth-portal-page {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.auth-portal-page .portal-shell {
    height: auto !important;
    min-height: 100vh !important;
    padding: 28px 16px 32px !important;
    overflow: visible !important;
  }

  body.auth-portal-page .portal-content {
    height: auto !important;
    max-width: 420px !important;
  }

  body.auth-portal-page .portal-content > .text-center > img {
    width: 145px !important;
  }

  body.auth-portal-page .portal-content h1 {
    max-width: 390px;
    font-size: clamp(26px, 8vw, 36px) !important;
    line-height: 1.12 !important;
  }

  body.auth-portal-page .portal-content > .text-center p {
    font-size: 15px !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: none !important;
    grid-auto-rows: 380px !important;
    height: auto !important;
    margin-top: 34px !important;
    gap: 20px !important;
  }

  body.auth-portal-page .portal-card {
    max-width: 360px;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: 26px 28px !important;
  }

  body.auth-portal-page .portal-card .icon-box {
    width: 64px !important;
    height: 64px !important;
    flex-basis: 64px;
    margin-bottom: 16px !important;
  }

  body.auth-portal-page .portal-card .card-inner > .text-center {
    grid-template-rows: 27px 44px !important;
    min-height: 85px !important;
    gap: 10px !important;
  }

  body.auth-portal-page .portal-card .card-inner p {
    font-size: 15px !important;
    line-height: 22px !important;
  }

  body.auth-portal-page .portal-card .card-inner > .cta-button,
  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
    margin-top: 24px !important;
  }

  body.auth-portal-page .portal-content > .mt-20 {
    display: flex !important;
    flex: 0 0 auto;
    min-height: 48px !important;
    padding-top: 24px;
  }

  body.auth-portal-page .portal-content > .mt-20 p {
    white-space: normal;
    text-align: center;
  }
}

@media (max-height: 720px) and (min-width: 1101px) {
  body.auth-portal-page .portal-shell {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  body.auth-portal-page .portal-content > .text-center > img {
    width: 118px !important;
  }

  body.auth-portal-page .portal-content h1 {
    font-size: 34px !important;
  }

  body.auth-portal-page .portal-content > .text-center p {
    font-size: 14px !important;
  }

  body.auth-portal-page .portal-content > .grid {
    height: 380px !important;
    margin-top: 22px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: 22px 24px !important;
  }

  body.auth-portal-page .portal-card .icon-box {
    width: 58px !important;
    height: 58px !important;
    flex-basis: 58px;
    margin-bottom: 14px !important;
  }

  body.auth-portal-page .portal-card .card-inner > .cta-button,
  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
    margin-top: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-portal-page .portal-card .icon-box {
    animation: none !important;
  }
}

/* LMS portal selection — 2026 Spatial UI refinement (presentation only). */
body.auth-portal-page .portal-shell {
  padding: clamp(24px, 3.4vh, 34px) clamp(20px, 3vw, 56px) !important;
  background:
    radial-gradient(circle at 8% 8%, rgba(59, 130, 246, .10), transparent 27%),
    radial-gradient(circle at 94% 88%, rgba(249, 115, 22, .09), transparent 25%),
    #fff !important;
}

body.auth-portal-page .portal-shell::before,
body.auth-portal-page .portal-shell::after {
  opacity: .7;
  border-width: 1px !important;
  filter: none !important;
}

body.auth-portal-page .portal-content {
  max-width: 1432px !important;
}

body.auth-portal-page .portal-content > .text-center {
  gap: 7px !important;
}

body.auth-portal-page .portal-content > .text-center > img {
  width: clamp(145px, min(9vw, 17vh), 170px) !important;
  filter: drop-shadow(0 7px 12px rgba(30, 64, 118, .08)) !important;
}

body.auth-portal-page .portal-content h1 {
  font-size: clamp(34px, min(2.5vw, 5.6vh), 48px) !important;
  line-height: 1.08 !important;
  font-weight: 700 !important;
}

body.auth-portal-page .portal-content > .text-center p {
  font-size: clamp(16px, min(1.05vw, 2.35vh), 20px) !important;
  font-weight: 500 !important;
}

body.auth-portal-page .portal-content > .text-center > div:last-child {
  width: 64px !important;
  height: 4px !important;
  flex-basis: 4px;
  border: 0 !important;
  background: linear-gradient(90deg, #3b82f6 0 48%, #f97316 52% 100%) !important;
  box-shadow: 0 4px 10px rgba(59, 130, 246, .12) !important;
}

body.auth-portal-page .portal-content > .grid {
  grid-template-columns: repeat(4, minmax(0, 340px)) !important;
  justify-content: center !important;
  width: 100% !important;
  height: 380px !important;
  margin-top: 40px !important;
  gap: 24px !important;
}

body.auth-portal-page .portal-card,
body.auth-portal-page .portal-card:nth-child(even) {
  width: 100% !important;
  max-width: 340px !important;
  height: 380px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1px solid rgba(207, 220, 239, .8) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 18px 42px rgba(45, 78, 126, .10), 0 3px 10px rgba(45, 78, 126, .045) !important;
}

body.auth-portal-page .portal-card:nth-child(even) {
  border-color: rgba(241, 216, 198, .85) !important;
}

body.auth-portal-page .portal-card:hover {
  transform: translateY(-4px) scale(1.02) !important;
  border-color: rgba(59, 130, 246, .28) !important;
  box-shadow: 0 24px 48px rgba(45, 78, 126, .13), 0 6px 14px rgba(45, 78, 126, .06) !important;
}

body.auth-portal-page .portal-card:nth-child(even):hover {
  border-color: rgba(249, 115, 22, .28) !important;
}

body.auth-portal-page .portal-card .card-inner {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  height: 100% !important;
  padding: 38px 28px 28px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: transparent !important;
}

body.auth-portal-page .portal-card .icon-box,
body.auth-portal-page .portal-card:nth-child(even) .icon-box {
  flex: 0 0 72px;
  width: 72px !important;
  height: 72px !important;
  margin: 0 0 20px !important;
  border: 1px solid rgba(255, 255, 255, .75) !important;
  color: #fff !important;
  background: #3b82f6 !important;
  box-shadow: 0 12px 24px rgba(59, 130, 246, .24), 0 2px 6px rgba(59, 130, 246, .14) !important;
}

body.auth-portal-page .portal-card:nth-child(even) .icon-box {
  background: #f97316 !important;
  box-shadow: 0 12px 24px rgba(249, 115, 22, .22), 0 2px 6px rgba(249, 115, 22, .13) !important;
}

body.auth-portal-page .portal-card .card-inner > .text-center {
  display: grid !important;
  grid-template-rows: 27px 48px !important;
  width: 100%;
  min-height: 87px !important;
  gap: 12px !important;
}

body.auth-portal-page .portal-card .card-inner h3 {
  margin: 0 !important;
  color: #14213d !important;
  font-size: 22px !important;
  line-height: 27px !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
}

body.auth-portal-page .portal-card .card-inner p {
  display: -webkit-box !important;
  max-width: 30ch;
  margin: 0 auto !important;
  overflow: hidden !important;
  color: #66738c !important;
  font-size: 16px !important;
  line-height: 24px !important;
  font-weight: 500 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
}

body.auth-portal-page .portal-card .card-inner > .cta-button,
body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  width: 100% !important;
  margin: 28px 0 0 !important;
}

body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  gap: 8px !important;
}

body.auth-portal-page .portal-card .cta-button,
body.auth-portal-page .portal-card:nth-child(even) .cta-button {
  width: 100% !important;
  height: 54px !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: #3b82f6 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 22px rgba(59, 130, 246, .23) !important;
}

body.auth-portal-page .portal-card:nth-child(even) .cta-button {
  background: #f97316 !important;
  box-shadow: 0 10px 22px rgba(249, 115, 22, .22) !important;
}

body.auth-portal-page .portal-card:hover .cta-button {
  transform: translateY(-2px) !important;
  filter: brightness(1.035);
  box-shadow: 0 14px 26px rgba(59, 130, 246, .28) !important;
}

body.auth-portal-page .portal-card:nth-child(even):hover .cta-button {
  box-shadow: 0 14px 26px rgba(249, 115, 22, .27) !important;
}

body.auth-portal-page .portal-card .cta-button:active {
  transform: translateY(1px) scale(.985) !important;
}

body.auth-portal-page .portal-card .tutor-register-link {
  color: #d95d14 !important;
  font-size: 13px !important;
  line-height: 17px !important;
}

body.auth-portal-page .portal-content > .mt-20 {
  opacity: .38 !important;
}

@media (max-width: 1100px) and (min-width: 769px) {
  body.auth-portal-page .portal-content {
    max-width: 704px !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-columns: repeat(2, minmax(0, 340px)) !important;
    grid-template-rows: repeat(2, 350px) !important;
    height: auto !important;
    margin-top: 34px !important;
    gap: 24px !important;
  }

  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card:nth-child(even) {
    height: 350px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding-top: 26px !important;
  }

  body.auth-portal-page .portal-card .icon-box,
  body.auth-portal-page .portal-card:nth-child(even) .icon-box {
    width: 62px !important;
    height: 62px !important;
    flex-basis: 62px;
    margin-bottom: 16px !important;
  }

  body.auth-portal-page .portal-card .card-inner > .cta-button,
  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
    margin-top: 20px !important;
  }
}

@media (max-width: 768px) {
  body.auth-portal-page .portal-shell {
    padding: 28px 16px 32px !important;
  }

  body.auth-portal-page .portal-content {
    max-width: 380px !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-columns: minmax(0, 340px) !important;
    grid-auto-rows: 350px !important;
    justify-content: center !important;
    margin-top: 32px !important;
    gap: 20px !important;
  }

  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card:nth-child(even) {
    width: 100% !important;
    height: 350px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: 25px 24px 24px !important;
  }

  body.auth-portal-page .portal-card .icon-box,
  body.auth-portal-page .portal-card:nth-child(even) .icon-box {
    width: 62px !important;
    height: 62px !important;
    flex-basis: 62px;
    margin-bottom: 15px !important;
  }

  body.auth-portal-page .portal-card .card-inner > .cta-button,
  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
    margin-top: 20px !important;
  }
}

@media (max-height: 720px) and (min-width: 1101px) {
  body.auth-portal-page .portal-content > .grid {
    height: 340px !important;
    margin-top: 20px !important;
  }

  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card:nth-child(even) {
    height: 340px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding-top: 20px !important;
  }

  body.auth-portal-page .portal-card .icon-box,
  body.auth-portal-page .portal-card:nth-child(even) .icon-box {
    width: 56px !important;
    height: 56px !important;
    flex-basis: 56px;
    margin-bottom: 12px !important;
  }

  body.auth-portal-page .portal-card .card-inner > .cta-button,
  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
    margin-top: 16px !important;
  }
}

/* Keep direct-action cards aligned with the Tutor action group. */
body.auth-portal-page .portal-card:nth-child(even) .card-inner > .cta-button {
  margin: 28px 0 0 !important;
}

@media (max-width: 1100px) and (min-width: 769px) {
  body.auth-portal-page .portal-card:nth-child(even) .card-inner > .cta-button {
    margin-top: 20px !important;
  }
}

@media (max-width: 768px) {
  body.auth-portal-page .portal-content > .mt-20 {
    display: none !important;
  }

  body.auth-portal-page .portal-card:nth-child(even) .card-inner > .cta-button {
    margin-top: 20px !important;
  }
}

@media (max-height: 720px) and (min-width: 1101px) {
  body.auth-portal-page .portal-card:nth-child(even) .card-inner > .cta-button {
    margin-top: 16px !important;
  }
}

/* Anchor every portal action to the bottom of its respective card. */
body.auth-portal-page .portal-card .card-inner > .cta-button,
body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto,
body.auth-portal-page .portal-card:nth-child(even) .card-inner > .cta-button {
  margin-top: auto !important;
  margin-bottom: 0 !important;
}

body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  position: static !important;
  height: 54px;
  flex: 0 0 54px;
}

body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto .tutor-register-link {
  position: absolute;
  right: 28px;
  bottom: 6px;
  left: 28px;
  width: auto;
}

@media (max-width: 768px) {
  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto .tutor-register-link {
    right: 24px;
    left: 24px;
  }
}

/* Position the complete portal-card row at the bottom of desktop viewports. */
@media (min-width: 1101px) {
  body.auth-portal-page .portal-content > .grid {
    margin-top: auto !important;
    margin-bottom: 0 !important;
  }

  body.auth-portal-page .portal-content > .mt-20 {
    display: none !important;
  }
}

/* ================================================================
   Final enterprise Spatial UI layer — CSS-only, no behavior changes.
   ================================================================ */
body.auth-portal-page .portal-shell {
  justify-content: center !important;
  padding: clamp(22px, 3vh, 32px) 24px !important;
  background:
    radial-gradient(circle at 7% 8%, rgba(59, 130, 246, .105), transparent 28%),
    radial-gradient(circle at 94% 91%, rgba(249, 115, 22, .085), transparent 27%),
    #f8fafc !important;
}

body.auth-portal-page .portal-shell::before,
body.auth-portal-page .portal-shell::after {
  width: min(34vw, 520px) !important;
  border-color: rgba(37, 99, 235, .065) !important;
  opacity: .85;
  animation: portal-ambient-drift 16s ease-in-out infinite alternate;
}

body.auth-portal-page .portal-shell::after {
  border-color: rgba(249, 115, 22, .075) !important;
  animation-delay: -8s;
}

body.auth-portal-page .portal-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: calc(100% - 48px) !important;
  height: auto !important;
  max-width: 1500px !important;
  min-height: 0 !important;
  margin: auto !important;
}

body.auth-portal-page .portal-content > .text-center {
  width: 100%;
  gap: clamp(5px, .65vh, 8px) !important;
}

body.auth-portal-page .portal-content > .text-center > img {
  width: clamp(145px, 9vw, 165px) !important;
  height: auto !important;
  opacity: 0;
  animation: portal-logo-enter .62s cubic-bezier(.22, 1, .36, 1) .05s forwards;
}

body.auth-portal-page .portal-content h1 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: clamp(2rem, 3.2vw, 3.5rem) !important;
  line-height: 1.07 !important;
  font-weight: 800 !important;
  letter-spacing: -.03em !important;
  opacity: 0;
  animation: portal-copy-enter .64s cubic-bezier(.22, 1, .36, 1) .15s forwards;
}

body.auth-portal-page .portal-content > .text-center p {
  margin: 0 !important;
  color: #64748b !important;
  font-size: clamp(1rem, 1.4vw, 1.25rem) !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  opacity: 0;
  animation: portal-copy-enter .6s cubic-bezier(.22, 1, .36, 1) .24s forwards;
}

body.auth-portal-page .portal-content > .text-center > div:last-child {
  width: 68px !important;
  height: 4px !important;
  flex-basis: 4px;
  margin-top: 2px !important;
  border: 0 !important;
  background: linear-gradient(90deg, #2563eb 0 48%, #f97316 52% 100%) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .13) !important;
  transform: scaleX(0);
  animation: portal-indicator-enter .5s cubic-bezier(.22, 1, .36, 1) .34s forwards;
}

body.auth-portal-page .portal-content > .grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: 390px !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: 100% !important;
  height: 390px !important;
  margin: 40px 0 0 !important;
  padding: 0 !important;
  gap: 24px !important;
}

body.auth-portal-page .portal-card,
body.auth-portal-page .portal-card:nth-child(even) {
  isolation: isolate;
  position: relative;
  width: 100% !important;
  max-width: none !important;
  height: 390px !important;
  min-height: 390px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(59, 130, 246, .18) !important;
  border-radius: 30px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08), 0 3px 10px rgba(15, 23, 42, .035) !important;
  opacity: 0;
  transform: translateY(24px) scale(.97);
  animation: portal-card-enter .72s cubic-bezier(.22, 1, .36, 1) forwards;
  transition: transform .36s cubic-bezier(.22, 1, .36, 1), border-color .3s ease, box-shadow .36s ease !important;
  will-change: transform;
}

body.auth-portal-page .portal-card:nth-child(even) {
  border-color: rgba(249, 115, 22, .19) !important;
}

body.auth-portal-page .portal-card:nth-child(1) { animation-delay: .15s; }
body.auth-portal-page .portal-card:nth-child(2) { animation-delay: .25s; }
body.auth-portal-page .portal-card:nth-child(3) { animation-delay: .35s; }
body.auth-portal-page .portal-card:nth-child(4) { animation-delay: .45s; }

body.auth-portal-page .portal-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -85px;
  left: 50%;
  width: 230px;
  height: 190px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(59, 130, 246, .105), transparent 68%);
  transform: translateX(-50%);
  opacity: .8;
  transition: opacity .3s ease, transform .4s ease;
}

body.auth-portal-page .portal-card:nth-child(even)::before {
  background: radial-gradient(circle, rgba(249, 115, 22, .10), transparent 68%);
}

body.auth-portal-page .portal-card:hover {
  z-index: 3;
  transform: perspective(900px) translateY(-10px) scale(1.015) rotateX(1deg) !important;
  border-color: rgba(37, 99, 235, .34) !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .14), 0 7px 18px rgba(37, 99, 235, .07) !important;
}

body.auth-portal-page .portal-card:nth-child(even):hover {
  border-color: rgba(234, 88, 12, .34) !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .14), 0 7px 18px rgba(249, 115, 22, .07) !important;
}

body.auth-portal-page .portal-card:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(8px) scale(1.12);
}

body.auth-portal-page .portal-card .card-inner {
  position: relative;
  z-index: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100%;
  height: 100% !important;
  padding: 30px !important;
  border: 0 !important;
  border-radius: 30px !important;
  background: transparent !important;
}

body.auth-portal-page .portal-card .icon-box,
body.auth-portal-page .portal-card:nth-child(even) .icon-box {
  position: relative;
  flex: 0 0 76px;
  width: 76px !important;
  height: 76px !important;
  margin: 0 0 20px !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  color: #fff !important;
  background: linear-gradient(145deg, #3b82f6, #2563eb) !important;
  box-shadow: 0 13px 27px rgba(37, 99, 235, .25), inset 0 1px 1px rgba(255, 255, 255, .32) !important;
  opacity: 0;
  transform: scale(.7) rotate(-8deg);
  animation: portal-icon-enter .55s cubic-bezier(.22, 1, .36, 1) forwards !important;
  transition: transform .28s ease, box-shadow .28s ease !important;
}

body.auth-portal-page .portal-card:nth-child(1) .icon-box { animation-delay: .31s !important; }
body.auth-portal-page .portal-card:nth-child(2) .icon-box { animation-delay: .41s !important; }
body.auth-portal-page .portal-card:nth-child(3) .icon-box { animation-delay: .51s !important; }
body.auth-portal-page .portal-card:nth-child(4) .icon-box { animation-delay: .61s !important; }

body.auth-portal-page .portal-card:nth-child(even) .icon-box {
  background: linear-gradient(145deg, #f97316, #ea580c) !important;
  box-shadow: 0 13px 27px rgba(234, 88, 12, .24), inset 0 1px 1px rgba(255, 255, 255, .32) !important;
}

body.auth-portal-page .portal-card .icon-box::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

body.auth-portal-page .portal-card:hover .icon-box {
  transform: translateY(-3px) rotate(3deg) scale(1.05) !important;
}

body.auth-portal-page .portal-card:hover .icon-box::after {
  animation: portal-icon-pulse .65s ease-out 1;
}

body.auth-portal-page .portal-card .icon-box svg {
  width: 34px !important;
  height: 34px !important;
}

body.auth-portal-page .portal-card .card-inner > .text-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  width: 100%;
  min-height: 0 !important;
  gap: 10px !important;
}

body.auth-portal-page .portal-card .card-inner h3 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: clamp(1.45rem, 1.8vw, 2rem) !important;
  line-height: 1.18 !important;
  font-weight: 800 !important;
  letter-spacing: -.025em !important;
  white-space: nowrap;
}

body.auth-portal-page .portal-card .card-inner p {
  display: -webkit-box !important;
  max-width: 32ch;
  margin: 0 auto !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: clamp(.95rem, 1.1vw, 1.1rem) !important;
  line-height: 1.55 !important;
  font-weight: 500 !important;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3 !important;
}

body.auth-portal-page .portal-card .card-inner > .cta-button,
body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto,
body.auth-portal-page .portal-card:nth-child(even) .card-inner > .cta-button {
  width: 100% !important;
  margin: auto 0 0 !important;
}

body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
  position: static !important;
  height: 56px;
  flex: 0 0 56px;
}

body.auth-portal-page .portal-card .cta-button,
body.auth-portal-page .portal-card:nth-child(even) .cta-button {
  isolation: isolate;
  position: relative;
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  font-size: clamp(1rem, 1.05vw, 1.05rem) !important;
  font-weight: 700 !important;
  box-shadow: 0 11px 23px rgba(37, 99, 235, .24), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
  transition: transform .24s ease, box-shadow .24s ease, filter .24s ease !important;
}

body.auth-portal-page .portal-card:nth-child(even) .cta-button {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  box-shadow: 0 11px 23px rgba(234, 88, 12, .23), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
}

body.auth-portal-page .portal-card .cta-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -35%;
  bottom: -35%;
  left: -42%;
  width: 28%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  transform: skewX(-18deg);
}

body.auth-portal-page .portal-card:hover .cta-button {
  transform: translateY(-3px) scale(1.01) !important;
  box-shadow: 0 16px 29px rgba(37, 99, 235, .3), inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

body.auth-portal-page .portal-card:nth-child(even):hover .cta-button {
  box-shadow: 0 16px 29px rgba(234, 88, 12, .29), inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

body.auth-portal-page .portal-card:hover .cta-button::before {
  animation: portal-button-sheen .72s ease-out 1;
}

body.auth-portal-page .portal-card .cta-button:active {
  transform: translateY(1px) scale(.99) !important;
  box-shadow: 0 6px 13px rgba(37, 99, 235, .19) !important;
}

body.auth-portal-page .portal-card .cta-button svg {
  transition: transform .24s ease !important;
}

body.auth-portal-page .portal-card:hover .cta-button svg {
  transform: translateX(5px) !important;
}

body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto .tutor-register-link {
  right: 30px;
  bottom: 6px;
  left: 30px;
  color: #c94f0b !important;
  font-size: 12px !important;
  line-height: 17px !important;
  font-weight: 700 !important;
}

body.auth-portal-page .portal-content > .mt-20 {
  display: flex !important;
  flex: 0 0 auto;
  min-height: 20px !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  opacity: .36 !important;
}

@keyframes portal-logo-enter {
  from { opacity: 0; transform: translateY(-14px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes portal-copy-enter {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes portal-indicator-enter {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes portal-card-enter {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes portal-icon-enter {
  from { opacity: 0; transform: scale(.7) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes portal-icon-pulse {
  0% { opacity: .34; transform: scale(.82); }
  100% { opacity: 0; transform: scale(1.24); }
}

@keyframes portal-button-sheen {
  from { left: -42%; }
  to { left: 122%; }
}

@keyframes portal-ambient-drift {
  from { translate: 0 0; }
  to { translate: 14px 10px; }
}

@media (max-width: 1199px) and (min-width: 768px) {
  html:has(body.auth-portal-page),
  body.auth-portal-page {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
  }

  body.auth-portal-page .portal-shell {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body.auth-portal-page .portal-content {
    width: min(calc(100% - 32px), 760px) !important;
    height: auto !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, 370px) !important;
    height: auto !important;
    margin-top: 34px !important;
    gap: 24px !important;
  }

  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card:nth-child(even) {
    height: 370px !important;
    min-height: 370px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: 26px !important;
  }

  body.auth-portal-page .portal-card .icon-box,
  body.auth-portal-page .portal-card:nth-child(even) .icon-box {
    width: 66px !important;
    height: 66px !important;
    flex-basis: 66px;
    margin-bottom: 16px !important;
  }
}

@media (max-width: 767px) {
  html:has(body.auth-portal-page),
  body.auth-portal-page {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.auth-portal-page .portal-shell {
    height: auto !important;
    min-height: 100vh !important;
    padding: 26px 16px 32px !important;
    overflow: visible !important;
  }

  body.auth-portal-page .portal-content {
    width: 100% !important;
    max-width: 390px !important;
    height: auto !important;
  }

  body.auth-portal-page .portal-content h1 {
    max-width: 380px;
    font-size: clamp(2rem, 9vw, 2.55rem) !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: none !important;
    grid-auto-rows: 370px !important;
    height: auto !important;
    margin-top: 32px !important;
    gap: 20px !important;
  }

  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card:nth-child(even) {
    height: 370px !important;
    min-height: 370px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: 26px !important;
  }

  body.auth-portal-page .portal-card .icon-box,
  body.auth-portal-page .portal-card:nth-child(even) .icon-box {
    width: 66px !important;
    height: 66px !important;
    flex-basis: 66px;
    margin-bottom: 16px !important;
  }

  body.auth-portal-page .portal-card .card-inner h3 {
    font-size: 1.5rem !important;
  }

  body.auth-portal-page .portal-card .card-inner p {
    font-size: .98rem !important;
  }

  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto .tutor-register-link {
    right: 26px;
    left: 26px;
  }

  body.auth-portal-page .portal-content > .mt-20 {
    display: none !important;
  }
}

@media (max-height: 700px) and (min-width: 1200px) {
  body.auth-portal-page .portal-shell {
    padding-block: 15px !important;
  }

  body.auth-portal-page .portal-content > .text-center > img {
    width: 122px !important;
  }

  body.auth-portal-page .portal-content h1 {
    font-size: 2.25rem !important;
  }

  body.auth-portal-page .portal-content > .text-center p {
    font-size: .95rem !important;
  }

  body.auth-portal-page .portal-content > .grid {
    grid-template-rows: 350px !important;
    height: 350px !important;
    margin-top: 22px !important;
  }

  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card:nth-child(even) {
    height: 350px !important;
    min-height: 350px !important;
  }

  body.auth-portal-page .portal-card .card-inner {
    padding: 22px !important;
  }

  body.auth-portal-page .portal-card .icon-box,
  body.auth-portal-page .portal-card:nth-child(even) .icon-box {
    width: 58px !important;
    height: 58px !important;
    flex-basis: 58px;
    margin-bottom: 12px !important;
  }

  body.auth-portal-page .portal-card .card-inner h3 {
    font-size: 1.35rem !important;
  }

  body.auth-portal-page .portal-card .card-inner p {
    font-size: .9rem !important;
    line-height: 1.4 !important;
  }

  body.auth-portal-page .portal-card .cta-button,
  body.auth-portal-page .portal-card:nth-child(even) .cta-button,
  body.auth-portal-page .portal-card .card-inner > .w-full.mt-auto {
    height: 50px !important;
    min-height: 50px !important;
    flex-basis: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-portal-page .portal-shell::before,
  body.auth-portal-page .portal-shell::after,
  body.auth-portal-page .portal-content > .text-center > img,
  body.auth-portal-page .portal-content h1,
  body.auth-portal-page .portal-content > .text-center p,
  body.auth-portal-page .portal-content > .text-center > div:last-child,
  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card .icon-box,
  body.auth-portal-page .portal-card:hover .icon-box::after,
  body.auth-portal-page .portal-card:hover .cta-button::before {
    animation: none !important;
  }

  body.auth-portal-page .portal-content > .text-center > img,
  body.auth-portal-page .portal-content h1,
  body.auth-portal-page .portal-content > .text-center p,
  body.auth-portal-page .portal-card,
  body.auth-portal-page .portal-card .icon-box {
    opacity: 1 !important;
    transform: none !important;
  }

  body.auth-portal-page .portal-content > .text-center > div:last-child {
    transform: scaleX(1) !important;
  }
}

/* Tutor Dashboard premium Neomorphism redesign. */
@media all {
/* ================================================================
   Tutor Dashboard — Student-module Spatial UI parity (CSS only).
   Scoped to the active Tutor Dashboard route via its unchanged link state.
   ================================================================ */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) {
  --tutor-bg: #f5f7fa;
  --tutor-surface: #ffffff;
  --tutor-blue: #2563eb;
  --tutor-blue-light: #3b82f6;
  --tutor-orange: #f97316;
  --tutor-orange-deep: #ea580c;
  --tutor-text: #0f172a;
  --tutor-muted: #64748b;
  --tutor-border: #e3eaf4;
  --tutor-shadow: 9px 11px 28px rgba(148, 163, 184, .17), -7px -7px 20px rgba(255, 255, 255, .94);
  --tutor-shadow-hover: 15px 19px 38px rgba(120, 140, 169, .22), -8px -8px 22px rgba(255, 255, 255, .98);
  --tutor-inset: inset 4px 4px 10px rgba(148, 163, 184, .13), inset -4px -4px 10px rgba(255, 255, 255, .94);
  background: var(--tutor-bg) !important;
  color: var(--tutor-text);
}

/* ================================================================
   Tutor Dashboard — final Student-matched soft Neomorphism layer.
   ================================================================ */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) {
  --tutor-bg: #eef2f7;
  --tutor-surface: #f8fafc;
  --tutor-blue: #2563eb;
  --tutor-blue-light: #60a5fa;
  --tutor-orange: #f97316;
  --tutor-orange-deep: #ea580c;
  --tutor-text: #0f172a;
  --tutor-muted: #64748b;
  --tutor-raised: 10px 10px 25px rgba(163, 177, 198, .25), -10px -10px 25px rgba(255, 255, 255, .95);
  --tutor-raised-hover: 14px 15px 31px rgba(152, 167, 190, .31), -11px -11px 27px rgba(255, 255, 255, .98);
  --tutor-pressed: inset 5px 5px 11px rgba(163, 177, 198, .2), inset -5px -5px 11px rgba(255, 255, 255, .96);
  background: var(--tutor-bg) !important;
  font-family: "Outfit", "Inter", sans-serif !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) > .flex.h-screen {
  background:
    radial-gradient(circle at 24% 8%, rgba(96, 165, 250, .1), transparent 27%),
    radial-gradient(circle at 94% 86%, rgba(249, 115, 22, .065), transparent 25%),
    var(--tutor-bg) !important;
}

/* Neomorphic sidebar */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar {
  padding: 18px 14px 14px !important;
  border-right: 1px solid rgba(226, 232, 240, .9) !important;
  background: var(--tutor-surface) !important;
  box-shadow: 12px 0 30px rgba(163, 177, 198, .2) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:first-child {
  margin: 0 6px 20px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:first-child a {
  border: 0 !important;
  background: var(--tutor-surface) !important;
  box-shadow: 7px 7px 17px rgba(163, 177, 198, .22), -7px -7px 17px rgba(255, 255, 255, .98) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a {
  min-height: 48px;
  border-radius: 16px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a svg {
  border-radius: 50% !important;
  color: var(--tutor-blue) !important;
  background: var(--tutor-surface) !important;
  box-shadow: 4px 4px 10px rgba(163, 177, 198, .2), -4px -4px 10px rgba(255, 255, 255, .98) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a:hover {
  color: var(--tutor-orange-deep) !important;
  background: #f1f6fd !important;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, .19), -6px -6px 14px rgba(255, 255, 255, .98) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] {
  color: #fff !important;
  border: 0 !important;
  background: linear-gradient(135deg, var(--tutor-blue-light), var(--tutor-blue)) !important;
  box-shadow: 7px 8px 17px rgba(37, 99, 235, .25), -5px -5px 13px rgba(255, 255, 255, .96) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] svg,
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] span {
  color: #fff !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] svg {
  background: rgba(255, 255, 255, .15) !important;
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, .2) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:last-child a {
  color: var(--tutor-orange-deep) !important;
  border: 1px solid rgba(249, 115, 22, .13) !important;
  background: #fff7ed !important;
  box-shadow: 7px 7px 17px rgba(163, 177, 198, .2), -7px -7px 17px rgba(255, 255, 255, .98) !important;
}

/* Floating top header */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
  width: auto;
  height: 94px !important;
  min-height: 94px;
  margin: 18px 22px 0;
  padding: 0 clamp(24px, 3vw, 36px) !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header h2 {
  color: var(--tutor-text) !important;
  font-size: clamp(1.8rem, 2.7vw, 2.5rem) !important;
  font-weight: 800 !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header img {
  background: var(--tutor-surface);
  box-shadow: 6px 6px 14px rgba(163, 177, 198, .23), -5px -5px 13px rgba(255, 255, 255, .98) !important;
}

/* Dashboard canvas and cards */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main {
  padding: 32px !important;
  background: transparent !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl {
  max-width: 1380px !important;
  gap: 32px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid {
  gap: 24px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card {
  min-height: 158px;
  padding: 28px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card > .absolute {
  opacity: .8;
  background: radial-gradient(circle at 90% 15%, rgba(96, 165, 250, .13), transparent 44%) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:nth-child(2) > .absolute {
  background: radial-gradient(circle at 90% 15%, rgba(249, 115, 22, .11), transparent 44%) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:hover {
  box-shadow: var(--tutor-raised-hover) !important;
  transform: translateY(-6px) scale(1.02) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card p {
  color: var(--tutor-muted) !important;
  font-size: 12px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card h3 {
  color: var(--tutor-text) !important;
  font-size: 34px !important;
  font-weight: 800 !important;
}

/* Existing Live Session action */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex {
  min-height: 130px;
  padding: 28px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex::before {
  background: radial-gradient(circle at 12% 50%, rgba(96, 165, 250, .12), transparent 30%) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex .w-10.h-10 {
  color: var(--tutor-blue) !important;
  background: #eef4fb !important;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, .2), -5px -5px 13px rgba(255, 255, 255, .98) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a {
  height: 54px;
  border-radius: 17px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--tutor-orange), var(--tutor-orange-deep)) !important;
  box-shadow: 8px 9px 19px rgba(234, 88, 12, .25), -4px -4px 11px rgba(255, 255, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a:hover {
  box-shadow: 11px 13px 24px rgba(234, 88, 12, .31), -5px -5px 12px #fff !important;
  transform: translateY(-3px) scale(1.01);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a:active {
  box-shadow: inset 4px 4px 9px rgba(154, 52, 5, .3), inset -3px -3px 7px rgba(255, 255, 255, .18) !important;
  transform: translateY(1px) scale(.99);
}

/* Existing welcome information card */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div {
  min-height: 170px;
  padding: 28px !important;
  border: 0 !important;
  border-left: 5px solid var(--tutor-blue-light) !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div h3 {
  color: var(--tutor-blue) !important;
  font-size: 18px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div p {
  color: var(--tutor-muted) !important;
  font-size: 16px !important;
}

@media (max-width: 992px) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
    margin: 12px 14px 0;
    padding-left: 72px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main {
    padding: 24px 18px 32px !important;
  }
}

@media (max-width: 700px) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
    margin: 10px 10px 0;
    border-radius: 20px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card,
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex,
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div {
    padding: 22px !important;
    border-radius: 21px !important;
  }
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-global-bg {
  display: none !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) > .flex.h-screen {
  position: relative;
  background:
    radial-gradient(circle at 23% 9%, rgba(59, 130, 246, .08), transparent 28%),
    radial-gradient(circle at 94% 84%, rgba(249, 115, 22, .07), transparent 26%),
    var(--tutor-bg) !important;
}

/* Tutor sidebar: same light, floating spatial language as Student. */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar {
  width: 252px !important;
  min-width: 252px !important;
  flex: 0 0 252px !important;
  padding: 16px 12px 12px !important;
  border: 0 !important;
  border-right: 1px solid var(--tutor-border) !important;
  background: var(--tutor-bg) !important;
  box-shadow: 10px 0 30px rgba(148, 163, 184, .16) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:first-child {
  height: 82px !important;
  margin: 0 6px 18px !important;
  padding: 10px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:first-child a {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 20px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-shadow) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:first-child img {
  width: min(150px, 100%) !important;
  height: auto !important;
  max-height: 42px;
  object-fit: contain;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) {
  padding-inline: 10px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar p {
  margin-bottom: 9px !important;
  padding-inline: 10px !important;
  color: #94a3b8 !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: .17em !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) > div {
  margin-bottom: 16px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  margin-bottom: 6px;
  padding: 10px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 15px !important;
  color: #64748b !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a svg {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px;
  margin-right: 11px !important;
  padding: 8px;
  border-radius: 11px;
  color: var(--tutor-blue-light) !important;
  background: var(--tutor-surface);
  box-shadow: 3px 4px 9px rgba(148, 163, 184, .18), -3px -3px 8px #fff;
  transition: color .25s ease, transform .25s ease, box-shadow .25s ease;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a span {
  color: inherit !important;
  font-size: 10px !important;
  line-height: 1.3;
  font-weight: 800 !important;
  letter-spacing: .095em !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a:hover {
  color: var(--tutor-orange-deep) !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 5px 6px 14px rgba(148, 163, 184, .16), -4px -4px 10px #fff !important;
  transform: translateX(3px);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:nth-child(2) a:hover svg {
  color: var(--tutor-orange) !important;
  transform: translateX(2px) rotate(2deg);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] {
  color: var(--tutor-blue) !important;
  border-color: rgba(37, 99, 235, .11) !important;
  background: #eef5ff !important;
  box-shadow: var(--tutor-inset) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]::before {
  content: "";
  position: absolute;
  left: -10px;
  width: 4px;
  height: 24px;
  border-radius: 0 6px 6px 0;
  background: var(--tutor-orange);
  box-shadow: 0 0 11px rgba(249, 115, 22, .24);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:last-child {
  margin-top: auto;
  padding: 10px !important;
  background: transparent !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:last-child a {
  min-height: 54px;
  padding: 14px 18px !important;
  border: 1px solid #fed7c3 !important;
  border-radius: 16px !important;
  color: var(--tutor-orange-deep) !important;
  background: #fff7ed !important;
  box-shadow: 5px 6px 14px rgba(148, 163, 184, .15), -4px -4px 10px #fff !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar > div:last-child a:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--tutor-orange), var(--tutor-orange-deep)) !important;
  transform: translateY(-2px);
}

/* Header */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
  height: 92px !important;
  min-height: 92px;
  padding: 0 clamp(22px, 3vw, 40px) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(226, 232, 240, .82) !important;
  background: rgba(245, 247, 250, .92) !important;
  box-shadow: 0 8px 24px rgba(148, 163, 184, .08) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header h2 {
  margin: 0;
  color: var(--tutor-text) !important;
  font-size: clamp(1.65rem, 2.4vw, 2.35rem) !important;
  line-height: 1.08 !important;
  font-weight: 800 !important;
  letter-spacing: -.035em !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header p {
  margin-top: 5px;
  color: var(--tutor-muted) !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: .13em !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header img {
  width: 52px !important;
  height: 52px !important;
  border: 4px solid #fff !important;
  box-shadow: 5px 7px 16px rgba(148, 163, 184, .24), -4px -4px 10px rgba(255, 255, 255, .96) !important;
  transition: transform .25s ease, box-shadow .25s ease;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header img:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 7px 10px 20px rgba(148, 163, 184, .28), -4px -4px 10px #fff !important;
}

/* Dashboard canvas */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main {
  position: relative;
  padding: clamp(24px, 3vw, 40px) !important;
  color: var(--tutor-text);
  background:
    radial-gradient(circle at 16% 8%, rgba(59, 130, 246, .09), transparent 30%),
    radial-gradient(circle at 91% 83%, rgba(16, 185, 129, .06), transparent 29%),
    var(--tutor-bg) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl {
  width: 100%;
  max-width: 1400px !important;
  margin-inline: auto;
}

/* KPI cards */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(16px, 2vw, 24px) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card {
  min-height: 150px;
  padding: 28px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 26px !important;
  background: rgba(255, 255, 255, .74) !important;
  box-shadow: var(--tutor-shadow) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: tutor-card-enter .55s cubic-bezier(.22, 1, .36, 1) both;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:nth-child(2) { animation-delay: .08s; }
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:nth-child(3) { animation-delay: .16s; }

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -45px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(59, 130, 246, .13), transparent 68%);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:nth-child(2)::after {
  background: radial-gradient(circle, rgba(249, 115, 22, .12), transparent 68%);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:hover {
  z-index: 2;
  border-color: rgba(37, 99, 235, .2) !important;
  box-shadow: var(--tutor-shadow-hover) !important;
  transform: translateY(-6px) scale(1.01) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 10px !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: .105em !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--tutor-text) !important;
  font-size: clamp(2.2rem, 3.2vw, 3rem) !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: -.04em;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:nth-child(3) h3 {
  color: var(--tutor-blue-light) !important;
}

/* Live sessions CTA */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex {
  position: relative;
  min-height: 128px;
  padding: 24px 28px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 26px !important;
  background: rgba(255, 255, 255, .78) !important;
  box-shadow: var(--tutor-shadow) !important;
  animation: tutor-card-enter .55s cubic-bezier(.22, 1, .36, 1) .2s both;
  transition: transform .28s ease, box-shadow .28s ease !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(59, 130, 246, .07), transparent 46%, rgba(249, 115, 22, .065));
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex:hover {
  box-shadow: var(--tutor-shadow-hover) !important;
  transform: translateY(-5px);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > .flex {
  position: relative;
  z-index: 1;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex .w-10.h-10 {
  width: 58px !important;
  height: 58px !important;
  border-radius: 18px !important;
  color: var(--tutor-blue) !important;
  background: #eef5ff !important;
  box-shadow: 5px 6px 14px rgba(148, 163, 184, .16), -4px -4px 10px #fff !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex p:first-child {
  color: var(--tutor-blue) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex p:last-child {
  color: var(--tutor-muted) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-width: 240px;
  height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0 24px !important;
  border-radius: 18px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--tutor-blue-light), var(--tutor-blue)) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .24), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
  transition: transform .24s ease, box-shadow .24s ease !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a:hover {
  box-shadow: 0 17px 30px rgba(37, 99, 235, .31) !important;
  transform: translateY(-3px) scale(1.01);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a:active {
  box-shadow: 0 6px 13px rgba(37, 99, 235, .19) !important;
  transform: translateY(1px) scale(.99);
}

/* Tutor overview / existing Getting Started content */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div {
  position: relative;
  min-height: 170px;
  padding: 30px !important;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, .17) !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 93% 22%, rgba(16, 185, 129, .1), transparent 29%),
    linear-gradient(120deg, rgba(59, 130, 246, .11), rgba(255, 255, 255, .7) 53%, rgba(249, 115, 22, .07)) !important;
  box-shadow: var(--tutor-shadow) !important;
  animation: tutor-card-enter .55s cubic-bezier(.22, 1, .36, 1) .28s both;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 18px solid rgba(59, 130, 246, .055);
  border-radius: 50%;
  pointer-events: none;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 12px !important;
  color: var(--tutor-blue-light) !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: .1em !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div p {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  color: #334155 !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
  font-weight: 500;
}

@keyframes tutor-card-enter {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1200px) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar {
    width: 240px !important;
    min-width: 240px !important;
    flex-basis: 240px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main {
    padding: 26px !important;
  }
}

@media (max-width: 992px) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar {
    width: min(82vw, 252px) !important;
    max-width: 252px !important;
    min-width: 0 !important;
    flex-basis: auto !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
    padding-left: 76px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
    height: 82px !important;
    min-height: 82px;
    padding-right: 14px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header h2 {
    font-size: 1.35rem !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header p {
    font-size: 9px !important;
    letter-spacing: .08em !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header img {
    width: 44px !important;
    height: 44px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main {
    padding: 18px 14px 28px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl {
    gap: 18px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:last-child {
    grid-column: auto;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex {
    min-height: 0;
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 20px !important;
    padding: 22px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a {
    width: 100%;
    min-width: 0;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div {
    padding: 24px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card,
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex,
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div {
    animation: none !important;
  }
}

/* Tutor Dashboard authoritative visual finish. Kept last so the premium
   Student-module Neomorphism remains consistent across modern browsers. */
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) {
  --tutor-bg: #eef2f7;
  --tutor-surface: #f8fafc;
  --tutor-blue: #2563eb;
  --tutor-blue-light: #60a5fa;
  --tutor-orange: #f97316;
  --tutor-orange-deep: #ea580c;
  --tutor-text: #0f172a;
  --tutor-muted: #64748b;
  --tutor-raised: 10px 10px 25px rgba(163, 177, 198, .25), -10px -10px 25px rgba(255, 255, 255, .95);
  --tutor-raised-hover: 14px 15px 31px rgba(152, 167, 190, .31), -11px -11px 27px rgba(255, 255, 255, .98);
  background: var(--tutor-bg) !important;
  font-family: "Outfit", "Inter", sans-serif !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) > .flex.h-screen {
  background:
    radial-gradient(circle at 24% 8%, rgba(96, 165, 250, .1), transparent 27%),
    radial-gradient(circle at 94% 86%, rgba(249, 115, 22, .065), transparent 25%),
    var(--tutor-bg) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar {
  background: var(--tutor-surface) !important;
  box-shadow: 12px 0 30px rgba(163, 177, 198, .2) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--tutor-blue-light), var(--tutor-blue)) !important;
  box-shadow: 7px 8px 17px rgba(37, 99, 235, .25), -5px -5px 13px rgba(255, 255, 255, .96) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] svg,
body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) .lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"] span {
  color: #fff !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
  width: auto;
  height: 94px !important;
  min-height: 94px;
  margin: 18px 22px 0;
  padding: 0 clamp(24px, 3vw, 36px) !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main {
  padding: 32px !important;
  background: transparent !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl {
  max-width: 1380px !important;
  gap: 32px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid {
  gap: 24px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card {
  min-height: 158px;
  padding: 28px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card:hover {
  box-shadow: var(--tutor-raised-hover) !important;
  transform: translateY(-6px) scale(1.02) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card h3 {
  color: var(--tutor-text) !important;
  font-size: 34px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex {
  min-height: 130px;
  padding: 28px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a {
  height: 54px;
  border-radius: 17px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--tutor-orange), var(--tutor-orange-deep)) !important;
  box-shadow: 8px 9px 19px rgba(234, 88, 12, .25), -4px -4px 11px rgba(255, 255, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex > a:hover {
  box-shadow: 11px 13px 24px rgba(234, 88, 12, .31), -5px -5px 12px #fff !important;
  transform: translateY(-3px) scale(1.01);
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div {
  min-height: 170px;
  padding: 28px !important;
  border: 0 !important;
  border-left: 5px solid var(--tutor-blue-light) !important;
  border-radius: 24px !important;
  background: var(--tutor-surface) !important;
  box-shadow: var(--tutor-raised) !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div h3 {
  color: var(--tutor-blue) !important;
  font-size: 18px !important;
}

body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div p {
  color: var(--tutor-muted) !important;
  font-size: 16px !important;
}

@media (max-width: 992px) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
    margin: 12px 14px 0;
    padding-left: 72px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main {
    padding: 24px 18px 32px !important;
  }
}

@media (max-width: 700px) {
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) header {
    height: 82px !important;
    min-height: 82px;
    margin: 10px 10px 0;
    border-radius: 20px !important;
  }

  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid > a.glass-card,
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex,
  body:has(.lms-app-sidebar a[href="/tutor/dashboard.php"][class*="bg-[#38b6ff]"]) main > .max-w-6xl > .grid + .flex + div {
    padding: 22px !important;
    border-radius: 21px !important;
  }
}
}
