:root {
  --mint: #C8E6D0;
  --mint-dark: #6C8C78;
  --blue: #4A6D90;
  --bg: #ffffff;
  --viewport-bg: #eaf6ef;
  --border-soft: rgba(148, 163, 184, 0.25);
  --text-main: #111827;
  --text-muted: #6B7280;
  --liquid-sky: rgba(170, 221, 187, 0.18);
  --liquid-mint: rgba(140, 210, 170, 0.18);
  --liquid-ice: rgba(255, 255, 255, 0.7);
  --liquid-bg: rgba(255, 255, 255, 0.58);
  --liquid-bg-strong: rgba(255, 255, 255, 0.74);
  --liquid-border: rgba(255, 255, 255, 0.38);
  --liquid-border-strong: rgba(255, 255, 255, 0.55);
  --liquid-shadow: 0 22px 56px rgba(15, 23, 42, 0.14);
  --liquid-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
  --liquid-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --liquid-blur: blur(26px);
  --liquid-sheen: radial-gradient(120% 140% at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.35) 35%, rgba(255, 255, 255, 0) 60%);
  --liquid-caustic: radial-gradient(90% 90% at 100% 0%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 45%);
  --liquid-noise: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 2px, rgba(255, 255, 255, 0) 2px 8px);
  --glass: var(--liquid-bg);
  --glass-border: var(--liquid-border);
  --glass-shadow: var(--liquid-shadow);
  --glass-highlight: var(--liquid-highlight);
  --glass-blur: var(--liquid-blur);
  --glass-sheen-strong: rgba(255, 255, 255, 0.6);
  --glass-sheen: rgba(255, 255, 255, 0.35);
  --glass-tint: rgba(255, 255, 255, 0.18);
  --glass-x: 48%;
  --glass-y: 22%;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(246, 249, 255, 0.9);
  --border-subtle: rgba(15, 23, 42, 0.1);
  --page-gutter: 1rem;
  --card-pad: 1rem;
  --page-gradient: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(244, 252, 247, 1) 55%, rgba(224, 244, 232, 1) 100%);
  --page-backdrop:
    radial-gradient(120% 120% at 8% -10%, rgba(190, 230, 204, 0.2) 0%, rgba(190, 230, 204, 0) 55%),
    radial-gradient(110% 90% at 90% 10%, rgba(160, 220, 190, 0.16) 0%, rgba(160, 220, 190, 0) 60%),
    radial-gradient(140% 120% at 50% 80%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 65%),
    var(--page-gradient);
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-card: 0 20px 46px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 30px 60px rgba(15, 23, 42, 0.12);
  --transition-quick: 0.18s ease;
  --transition-smooth: 0.5s ease;
}

html,
body {
  min-height: 100%;
  min-height: 100dvh;
  background-color: var(--viewport-bg);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--text-main);
}

html {
  background-image: var(--page-backdrop);
  background-repeat: no-repeat;
  background-size: cover;
}

body {
  min-height: 100dvh;
  min-height: 100svh;
  position: relative;
  z-index: 0;
  background-color: transparent;
  background-image: none;
}

@supports (-webkit-touch-callout: none) {
  html,
  body {
    min-height: -webkit-fill-available;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(198, 236, 212, 0.26) 0%, rgba(198, 236, 212, 0) 70%),
    radial-gradient(45% 55% at 85% 15%, rgba(170, 226, 196, 0.22) 0%, rgba(170, 226, 196, 0) 70%),
    radial-gradient(50% 60% at 65% 80%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(60px);
  opacity: 0.9;
  pointer-events: none;
  z-index: -2;
  animation: liquid-drift 22s ease-in-out infinite;
}

@media (max-width: 991.98px) {
  body::before {
    animation: none;
    filter: blur(36px);
    opacity: 0.62;
  }
}

/* Transición premium en cada sección */
.app-main .col-12 {
  animation: page-enter 0.22s ease-out both;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .app-main .col-12 {
    animation: none;
  }
  body::before,
  .glass-surface::before,
  .card::before,
  .card-soft::before,
  .hero-card::before,
  .schedule-card::before,
  .login-page .liquid-shell::before,
  :is(.role-profesor, .role-estudiante) .teacher-welcome::before,
  .role-profesor .teacher-mobile-hero::before,
  .role-profesor .teacher-mobile-tile::before,
  .role-estudiante .student-mobile-hero::before,
  :is(.role-admin, .role-profesor, .role-estudiante) .admin-panel::before,
  :is(.role-admin, .role-profesor, .role-estudiante) .admin-panel-wide::before,
  :is(.role-admin, .role-profesor, .role-estudiante) .admin-tile::before,
  :is(.role-profesor, .role-estudiante) .admin-hero::before,
  .role-estudiante .student-summary-card::before,
  .role-estudiante .student-summary-mini::before,
  .role-estudiante .student-class-card::before,
  .role-estudiante .student-mobile-tile::before,
  .role-estudiante .student-group-card::before,
  .role-profesor .teacher-section-card::before,
  .role-profesor .teacher-class-card::before,
  .role-profesor .teacher-schedule::before,
  .role-estudiante .teacher-schedule::before {
    animation: none;
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.995);
  }
  to {
    opacity: 1;
    /* Important: avoid leaving an identity transform on the page container.
       A transformed ancestor turns `position: fixed` into "fixed to that box",
       which cuts full-screen backdrops like the carnet overlay. */
    transform: none;
  }
}

@keyframes liquid-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2%, -1%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(2%, 1%, 0) scale(1.02);
  }
}

@keyframes liquid-shimmer {
  0% {
    background-position: 0% 0%, 100% 0%, 0 0;
  }
  50% {
    background-position: 100% 60%, 0% 40%, 0 0;
  }
  100% {
    background-position: 0% 0%, 100% 0%, 0 0;
  }
}

.login-page {
  background-color: transparent !important;
}

.app-footer {
  padding: 0.35rem 1rem 0.95rem;
  text-align: center;
}

.app-footer-text {
  display: inline-block;
  font-size: 0.72rem;
  color: rgba(75, 85, 99, 0.9);
  letter-spacing: 0.01em;
}

.app-footer-legal {
  margin: 0.2rem auto 0;
  max-width: 980px;
  line-height: 1.45;
  text-align: center;
  text-wrap: pretty;
}

.app-footer-time {
  margin: 0.18rem auto 0;
  max-width: 980px;
  line-height: 1.45;
  text-wrap: pretty;
}

.app-footer-device {
  color: rgba(31, 95, 74, 0.92);
}

.app-footer-link {
  color: #1f5f4a;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 95, 74, 0.35);
  transition: color var(--transition-quick), border-color var(--transition-quick);
}

.app-footer-link:hover,
.app-footer-link:focus-visible {
  color: #174c3b;
  border-bottom-color: rgba(23, 76, 59, 0.75);
}

@media (max-width: 576px) {
  .app-footer {
    padding-bottom: calc(0.95rem + env(safe-area-inset-bottom));
  }

  .app-footer-text {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .app-footer-legal {
    max-width: min(94vw, 980px);
    padding-inline: 0.15rem;
  }

  .admin-toolbar {
    padding: 0.75rem;
  }

  .admin-toolbar .btn,
  .directory-primary-action {
    width: 100%;
  }
}

.legal-page {
  max-width: 980px;
  margin: 0 auto 1.25rem;
}

.legal-card {
  padding: 1.5rem 1.2rem;
}

.legal-header {
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.09);
}

.legal-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(31, 95, 74, 0.92);
  font-weight: 700;
}

.legal-title {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
}

.legal-subtitle {
  margin: 0;
  color: rgba(17, 24, 39, 0.86);
  font-weight: 600;
}

.legal-updated {
  margin: 0;
  color: rgba(75, 85, 99, 0.95);
  font-size: 0.9rem;
}

.legal-card p,
.legal-card li {
  color: rgba(17, 24, 39, 0.92);
  line-height: 1.62;
}

.legal-section {
  margin-bottom: 1.15rem;
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.48rem;
}

.legal-section h3 {
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0.8rem 0 0.35rem;
}

.legal-card ul {
  margin-bottom: 0.62rem;
}

@media (min-width: 768px) {
  .legal-card {
    padding: 1.8rem 1.65rem;
  }
}


.navbar-clean {
  background-color: rgba(255, 255, 255, 0.7);
  background-image:
    radial-gradient(220px 140px at 20% 0%, var(--glass-sheen-strong), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, var(--glass-tint), rgba(255, 255, 255, 0));
  background-blend-mode: screen;
  background-size: 220% 220%, 100% 100%;
  background-position: 0% 0%, 0 0;
  border: 1px solid var(--liquid-border);
  border-left: 0;
  border-right: 0;
  border-top: 0;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  backdrop-filter: var(--glass-blur) saturate(150%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(150%);
}

.navbar-clean .navbar-brand {
  min-width: 0;
  gap: 0.5rem;
}

.navbar-clean .sidebar-toggle {
  color: var(--text-main);
}

.navbar-clean .navbar-brand img {
  height: 48px;
  width: auto;
}

.navbar-clean .brand-text {
  line-height: 1.15;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5fb 100%);
  box-shadow: 0 0 0 1px rgba(15,23,42,0.12), 0 10px 18px rgba(15,23,42,0.18);
}

.brand-text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.78rem;
  line-height: 1.05;
  font-weight: 500;
  color: #6b7280;
  margin-top: 4px;
}

.user-chip {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.6);
  background-image:
    radial-gradient(120px 60px at 20% 0%, var(--glass-sheen-strong), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, var(--glass-tint), rgba(255, 255, 255, 0));
  background-blend-mode: screen;
  background-size: 200% 200%, 100% 100%;
  background-position: 0% 0%, 0 0;
  border: 1px solid var(--liquid-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-name {
  font-size: 0.8rem;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.signin-logo {
  height: 190px;
}

@media (min-width: 992px) {
  .admin-section-menu {
    display: none;
    margin-top: 0.75rem;
    padding: 1.1rem 1.2rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--liquid-border);
    box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
    backdrop-filter: var(--glass-blur) saturate(140%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(140%);
  }

  .admin-section-menu-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2b3543;
    margin-bottom: 0.75rem;
  }

  .admin-section-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .admin-section-menu-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 16px;
    color: #364152;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .admin-section-menu-link i {
    font-size: 1.05rem;
  }

  .admin-section-menu-link.active {
    background: #e5eefc;
    color: #1f3148;
  }

  .admin-section-menu-link:hover {
    background: #f0f4fa;
    color: #1f3148;
  }

  .admin-section-menu.open {
    display: block;
  }
  .signin-logo {
    height: 200px;
  }
}

.recovery-logo {
  height: 170px;
}

@media (min-width: 992px) {
  .recovery-logo {
    height: 190px;
  }
}

.form-control,
.form-select {
  border-color: var(--liquid-border);
  background-color: rgba(255, 255, 255, 0.6);
  min-height: 42px;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 0.15rem rgba(74, 109, 144, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.app-main {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

.teacher-mobile-header {
  padding: 0.35rem 0.15rem 0.65rem;
  border: 0;
  border-bottom: 1px solid var(--liquid-border);
  position: sticky;
  top: 0;
  z-index: 1025;
  background: rgba(255, 255, 255, 0.7);
  background-image:
    radial-gradient(200px 120px at 30% 0%, var(--glass-sheen-strong), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, var(--glass-tint), rgba(255, 255, 255, 0));
  background-blend-mode: screen;
  background-size: 220% 220%, 100% 100%;
  background-position: 0% 0%, 0 0;
  backdrop-filter: var(--glass-blur) saturate(150%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(150%);
}

.card-soft {
  border-radius: var(--radius-lg);
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  transition: transform var(--transition-quick), box-shadow var(--transition-quick), border-color var(--transition-quick), filter var(--transition-quick);
}

.card-soft:hover {
  transform: translateY(-1px);
  box-shadow: var(--liquid-shadow), var(--liquid-highlight);
  border-color: var(--liquid-border-strong);
}

.hero-card {
  background: linear-gradient(145deg, rgba(233, 242, 255, 0.85) 0%, rgba(248, 251, 255, 0.55) 60%, rgba(255, 255, 255, 0.6) 100%), var(--liquid-bg);
  border: 1px solid var(--liquid-border);
  box-shadow: var(--liquid-shadow);
  backdrop-filter: var(--glass-blur) saturate(140%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(140%);
}

.badge-pill-muted {
  background: rgba(255, 255, 255, 0.35);
  color: #1f3148;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-main {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(240, 245, 252, 0.55) 100%);
  border-color: var(--liquid-border);
  color: #1f3148;
  border-radius: 999px;
  font-size: 0.85rem;
  padding-inline: 1.1rem;
  min-height: 40px;
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  line-height: 1.15;
  transition: transform var(--transition-quick), box-shadow var(--transition-quick), filter var(--transition-quick), background-color var(--transition-quick), border-color var(--transition-quick), color var(--transition-quick);
}

.btn:not(.btn-link) {
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn:not(.btn-link):hover {
  transform: translateY(-1px);
  box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn:not(.btn-link):active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-main:hover {
  filter: brightness(0.97);
  box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.btn.btn-save {
  background:
    radial-gradient(140% 180% at 28% 8%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(132deg, rgba(36, 99, 235, 0.92) 0%, rgba(59, 130, 246, 0.9) 62%, rgba(147, 197, 253, 0.88) 100%);
  color: #f8fbff;
  border-color: rgba(255, 255, 255, 0.64);
  text-shadow: 0 1px 0 rgba(23, 32, 58, 0.22);
}

.btn.btn-save:hover,
.btn.btn-save:focus {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.78);
  filter: saturate(108%) brightness(1.02);
}

.directory-add-btn.btn.btn-save {
  background:
    radial-gradient(140% 180% at 28% 8%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(132deg, rgba(20, 123, 92, 0.94) 0%, rgba(38, 166, 120, 0.92) 58%, rgba(151, 231, 194, 0.9) 100%);
  border-color: rgba(235, 255, 247, 0.72);
  color: #f6fffb;
  text-shadow: 0 1px 0 rgba(16, 53, 42, 0.24);
}

.directory-add-btn.btn.btn-save:hover,
.directory-add-btn.btn.btn-save:focus {
  color: #ffffff;
  border-color: rgba(245, 255, 250, 0.88);
  filter: saturate(112%) brightness(1.03);
}

.btn.btn-delete {
  color: #fff5f6;
  border-color: rgba(255, 223, 225, 0.66);
  background:
    radial-gradient(140% 180% at 28% 8%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(136deg, rgba(220, 38, 38, 0.93) 0%, rgba(239, 68, 68, 0.92) 62%, rgba(252, 165, 165, 0.88) 100%);
  text-shadow: 0 1px 0 rgba(65, 14, 14, 0.24);
}

.btn.btn-delete:hover,
.btn.btn-delete:focus {
  color: #ffffff;
  border-color: rgba(255, 240, 241, 0.85);
  filter: saturate(110%) brightness(1.02);
}

.btn-outline-soft {
  border-radius: 999px;
  border-color: var(--liquid-border);
  font-size: 0.8rem;
  min-height: 40px;
}

.btn-xs {
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
}

.admin-actions-wrap {
  align-items: center;
  justify-content: center;
}

.admin-actions-wrap .admin-action-btn {
  min-width: 8.6rem;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}

.admin-directory-shell {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(245, 250, 255, 0.58) 55%, rgba(255, 255, 255, 0.72) 100%),
    var(--liquid-bg);
  border: 1px solid var(--liquid-border);
}

.admin-inline-create {
  background:
    linear-gradient(150deg, rgba(240, 248, 255, 0.72) 0%, rgba(255, 255, 255, 0.62) 58%, rgba(235, 247, 239, 0.7) 100%),
    var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.admin-toolbar {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.admin-toolbar .btn,
.directory-primary-action {
  min-height: 38px;
}

.directory-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.directory-module {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.directory-module::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.directory-intro-module {
  padding: 1.15rem !important;
}

.directory-module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.directory-primary-action {
  min-width: 11.5rem;
}

.directory-count {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding-inline: 0.9rem;
}

.directory-header-copy {
  max-width: 760px;
  padding: 0.35rem 0.2rem;
}

.directory-section-title {
  font-size: clamp(1.45rem, 1.12rem + 0.8vw, 2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #14263f;
}

.directory-section-copy {
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.5;
}

.directory-summary-stack {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.directory-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 126px;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.86), rgba(243, 248, 255, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.directory-summary-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f7d95;
}

.directory-summary-value {
  margin-top: 0.45rem;
  font-size: clamp(2rem, 1.7rem + 0.7vw, 2.5rem);
  line-height: 1;
  color: #14263f;
}

.directory-summary-caption {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: #52657b;
}

.directory-shell-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  margin-bottom: 0.95rem;
  padding: 0.1rem 0.25rem 0;
}

.directory-shell-head-tight {
  margin-bottom: 0.8rem;
}

.directory-shell-meta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: #4a627a;
  font-size: 0.84rem;
  font-weight: 600;
}

.directory-toolbar-shell,
.directory-table-shell {
  padding: 1.1rem !important;
}

.directory-search .input-group-text {
  color: #52708c;
  padding-inline: 0.8rem 0.55rem;
}

.directory-search .form-control {
  border-left: 0;
}

.directory-table-wrap {
  max-height: min(68vh, 860px);
  border-radius: var(--radius-md);
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.18);
}

.directory-table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.directory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.95));
  box-shadow:
    inset 0 -1px 0 rgba(15, 23, 42, 0.06),
    0 8px 18px rgba(15, 23, 42, 0.04);
}

.directory-table thead th:first-child {
  border-radius: 16px 0 0 16px;
}

.directory-table thead th:last-child {
  border-radius: 0 16px 16px 0;
}

.directory-table tbody tr:nth-child(even) td {
  background: transparent;
}

.directory-table tbody tr:hover td {
  background: transparent;
}

.directory-data-row > td {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.84);
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.directory-data-row > td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px 0 0 18px;
}

.directory-data-row > td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0 18px 18px 0;
}

.directory-data-row:hover > td {
  background: rgba(244, 250, 246, 0.96);
  transform: translateY(-1px);
  transition: background-color var(--transition-quick), transform var(--transition-quick), box-shadow var(--transition-quick);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.07);
}

.directory-table.table-sm td,
.directory-table.table-sm th {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.directory-actions .btn,
.directory-actions form .btn {
  min-height: 30px;
}

.directory-actions-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.directory-action-btn {
  min-height: 34px;
  padding: 0.42rem 0.72rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.directory-id-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: #22354d;
}

.directory-name-cell {
  font-size: 1rem;
  color: #10243d;
}

.directory-email-cell {
  color: #334b67;
  font-weight: 500;
}

.directory-access-chip {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.directory-composer {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.46);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.78), rgba(241, 247, 255, 0.68));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.directory-composer-head {
  margin-bottom: 1rem;
}

.student-create-pagehead {
  align-items: flex-end !important;
}

.student-create-back {
  min-height: 40px;
  padding-inline: 1rem;
  color: #415870;
}

.student-create-shell {
  padding: 1.05rem;
}

.student-create-flow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.directory-toolbar {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  padding: 1rem;
}

.directory-toolbar-block {
  padding: 0.2rem;
}

.directory-toolbar-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: stretch;
  min-height: 100%;
  padding: 0.2rem;
}

.directory-toolbar-actions .btn {
  min-height: 52px;
}

.directory-inline-info-row td {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.directory-inline-info {
  padding: 0.35rem 0 0.55rem;
}

.directory-info-panel {
  padding: 0.9rem;
  border-radius: var(--radius-md);
  background:
    linear-gradient(160deg, rgba(247, 251, 255, 0.88), rgba(239, 247, 242, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.directory-info-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem 0.8rem;
  margin-bottom: 0.75rem;
}

.directory-info-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.directory-info-heading strong {
  font-size: 1rem;
  color: #18314c;
}

.directory-create-modal .modal-dialog {
  max-width: min(1080px, calc(100vw - 28px));
}

.directory-create-modal .modal-content {
  background:
    radial-gradient(320px 200px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 68%),
    linear-gradient(165deg, rgba(240, 247, 255, 0.88), rgba(228, 239, 255, 0.8));
}

.directory-create-modal .modal-header {
  padding: 1rem 1.15rem 0.9rem;
}

.directory-create-modal .modal-body {
  padding: 0.35rem 1.15rem 1.15rem;
}

.directory-form-section {
  padding: 1rem;
  border-radius: var(--radius-md);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.74), rgba(242, 247, 255, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.student-create-section {
  border-color: rgba(220, 230, 240, 0.78);
  background:
    linear-gradient(155deg, rgba(252, 253, 255, 0.82), rgba(244, 248, 255, 0.72));
}

.student-create-panel {
  height: auto;
}

.student-create-panel-primary {
  padding: 1rem;
}

.student-create-panel-secondary {
  padding: 1rem;
  background:
    linear-gradient(160deg, rgba(248, 251, 255, 0.84), rgba(243, 248, 255, 0.74));
}

.student-create-panel-head {
  margin-bottom: 0.85rem;
}

.student-create-panel-head h4 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  color: #18314c;
}

.student-create-panel-head p {
  max-width: 30rem;
  line-height: 1.42;
}

.student-create-section-head {
  margin-bottom: 0.8rem;
}

.student-create-section-head h5 {
  font-size: 1.06rem;
  color: #18314c;
}

.student-create-section-head p {
  max-width: 34rem;
  line-height: 1.4;
}

.student-create-section-compact .student-create-section-head {
  margin-bottom: 0.7rem;
}

.student-create-grid {
  row-gap: 0.95rem;
}

.student-create-grid-primary {
  row-gap: 1rem;
}

.directory-form-section-head {
  margin-bottom: 0.9rem;
}

.directory-form-field {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.student-create-shell .form-label {
  color: #61768d;
  font-weight: 600;
  margin-bottom: 0.42rem !important;
}

.student-create-shell .form-control,
.student-create-shell .form-select {
  min-height: 46px;
  border-color: rgba(216, 227, 239, 0.86);
  background: rgba(255, 255, 255, 0.74);
}

.student-create-shell .form-control::placeholder {
  color: #8a9bae;
}

.student-create-email-group .input-group-text {
  border-color: rgba(216, 227, 239, 0.86);
  background: rgba(243, 248, 255, 0.92);
  color: #56708a;
  font-weight: 600;
}

.directory-form-kicker {
  display: inline-block;
  margin-bottom: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #547188;
}

.directory-form-note {
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(232, 240, 249, 0.7);
  color: #36506a;
  font-size: 0.8rem;
  line-height: 1.45;
}

.student-create-note {
  margin-top: 0.1rem;
  border: 1px solid rgba(218, 228, 239, 0.76);
  background: linear-gradient(155deg, rgba(236, 243, 251, 0.82), rgba(244, 248, 253, 0.76));
}

@media (min-width: 768px) {
  .directory-form-field-balanced .form-label {
    min-height: 2.85rem;
    display: flex;
    align-items: flex-end;
    white-space: nowrap;
  }
}

.student-create-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(214, 225, 239, 0.72);
}

.student-create-footer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 34rem;
}

.student-create-footer .form-text {
  color: #5e7388;
}

.student-create-actions .btn {
  min-width: 10.5rem;
}

.student-create-footnote {
  color: #677b90;
}

.directory-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.directory-info-item {
  min-height: 102px;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.48);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.directory-info-item-wide {
  grid-column: span 2;
}

.directory-info-item-access {
  grid-column: span 2;
}

.directory-info-label {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.directory-info-value {
  display: block;
  font-size: 0.98rem;
  line-height: 1.35;
  color: #1d3047;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.directory-info-access-row {
  margin-top: 0.15rem;
}

.directory-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  margin-top: 1rem;
  padding: 0.85rem 0.35rem 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.48);
}

.directory-pagination-meta {
  font-size: 0.84rem;
  color: #52657b;
}

.student-edit-back-btn.btn {
  min-height: 40px;
  padding-inline: 0.95rem;
  color: #eff6ff;
}

.student-edit-alert {
  background:
    linear-gradient(150deg, rgba(255, 248, 222, 0.92), rgba(255, 238, 176, 0.82));
  box-shadow: var(--liquid-shadow-soft);
}

.student-edit-shell {
  align-items: stretch;
}

.student-edit-main-card {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(242, 247, 255, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.student-edit-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.15rem;
  align-items: center;
  padding: 0.35rem;
}

.student-edit-avatar {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(145deg, rgba(226, 241, 255, 0.95), rgba(217, 248, 234, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #143252;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.student-edit-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-edit-hero-body {
  min-width: 0;
}

.student-edit-hero-title {
  font-size: clamp(1.35rem, 1.12rem + 0.55vw, 1.8rem);
  line-height: 1.05;
  color: #132841;
}

.student-edit-hero-copy {
  max-width: 52ch;
  color: #556b80;
  line-height: 1.5;
}

.student-edit-hero-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.student-edit-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.62);
  color: #2d4761;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.student-edit-pill.is-active {
  color: #11643f;
  background: rgba(226, 252, 239, 0.86);
}

.student-edit-pill.is-inactive {
  color: #8a5a11;
  background: rgba(255, 247, 212, 0.88);
}

.student-edit-section {
  padding: 1.05rem;
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(241, 247, 255, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.student-edit-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.95rem;
}

.student-edit-section-head h6 {
  color: #17304f;
}

.student-edit-upload {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.student-edit-upload-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #607488;
}

.student-edit-upload-note a {
  color: #1b5ca7;
  font-weight: 600;
  text-decoration: none;
}

.student-edit-form-actions {
  margin-top: 0.15rem;
}

.student-profile-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.student-profile-overview-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 92px;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.82), rgba(242, 248, 255, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.student-profile-overview-card strong {
  color: #183454;
  font-size: 0.98rem;
}

.student-profile-overview-card span:last-child {
  color: #607488;
  font-size: 0.84rem;
}

.student-profile-section {
  position: relative;
}

.student-profile-section-head {
  align-items: flex-start;
  margin-bottom: 1.05rem;
}

.student-profile-section-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.student-profile-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.student-profile-section-copy {
  max-width: 34rem;
  margin-top: 0.1rem;
  color: #597188 !important;
  line-height: 1.45;
}

.student-edit-tabs-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.student-edit-tab-nav {
  gap: 0.65rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(241, 247, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.student-edit-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.6rem 1rem;
  border-radius: 999px !important;
  color: #36506a;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.student-edit-tab-btn:hover,
.student-edit-tab-btn:focus-visible {
  color: #17304f;
  background: rgba(255, 255, 255, 0.76);
}

.student-edit-tab-btn.active {
  color: #143252 !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(233, 244, 255, 0.84)) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.student-edit-tab-content > .tab-pane {
  animation: student-edit-tab-fade 180ms ease;
}

.student-edit-tab-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.student-enrollment-intro {
  flex-direction: column;
  align-items: flex-start;
}

.student-enrollment-intro p {
  max-width: 42rem;
}

.student-access-intro {
  flex-direction: column;
  align-items: flex-start;
}

.student-access-intro p {
  max-width: 42rem;
}

.student-risk-intro {
  flex-direction: column;
  align-items: flex-start;
}

.student-risk-intro p {
  max-width: 44rem;
}

.student-edit-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.student-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.student-enrollment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.student-enrollment-summary-card,
.student-enrollment-summary-note {
  padding: 0.95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.student-enrollment-summary-card {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.84), rgba(242, 248, 255, 0.74));
}

.student-enrollment-summary-value {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  color: #183454;
  font-weight: 700;
}

.student-enrollment-summary-note {
  grid-column: 1 / -1;
  background:
    linear-gradient(155deg, rgba(236, 244, 255, 0.88), rgba(245, 249, 255, 0.78));
  color: #4b627d;
  line-height: 1.45;
  padding-block: 0.82rem;
}

.student-enrollment-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.student-enrollment-module {
  height: 100%;
}

.student-enrollment-mode-panel {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(241, 248, 255, 0.7));
}

.student-enrollment-subpanel {
  background:
    linear-gradient(155deg, rgba(248, 251, 255, 0.84), rgba(240, 247, 255, 0.72));
}

.student-enrollment-availability {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.student-enrollment-availability.is-ready {
  background: rgba(229, 251, 239, 0.9);
  color: #1c6a46;
}

.student-enrollment-availability.is-empty {
  background: rgba(246, 249, 255, 0.82);
  color: #5f7389;
}

.student-enrollment-active-panel,
.student-enrollment-move-panel {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(243, 248, 255, 0.7));
}

.student-edit-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.student-edit-sidecard,
.student-edit-danger-card,
.student-edit-academic-card,
.student-edit-deactivate-card {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.student-edit-sidecard {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(238, 245, 255, 0.72));
}

.student-edit-danger-card {
  background:
    linear-gradient(160deg, rgba(255, 250, 251, 0.88), rgba(255, 241, 241, 0.76));
}

.student-edit-academic-card {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(242, 247, 255, 0.74));
}

.student-edit-deactivate-card {
  background:
    linear-gradient(160deg, rgba(255, 250, 251, 0.88), rgba(255, 241, 241, 0.76));
}

.student-edit-sidehead {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.student-access-card {
  padding: 0.9rem;
  border-radius: 20px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.78), rgba(241, 247, 255, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.student-access-card-strong {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1.1rem;
}

.student-access-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.student-access-body {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(247, 251, 255, 0.88), rgba(240, 247, 255, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.56);
  color: #556b80;
}

.student-access-action {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.student-access-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem 0.9rem;
}

.student-academic-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 1rem;
}

.student-academic-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.student-academic-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.45rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #2f4963;
  font-size: 0.82rem;
  font-weight: 600;
}

.student-academic-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.student-academic-module {
  padding: 1rem;
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.78), rgba(242, 248, 255, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.student-academic-module-danger {
  background:
    linear-gradient(155deg, rgba(255, 248, 249, 0.88), rgba(255, 240, 240, 0.76));
}

.student-risk-module {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem;
}

.student-risk-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255, 243, 244, 0.94), rgba(255, 236, 238, 0.82));
  border: 1px solid rgba(255, 217, 222, 0.72);
  color: #7b3c46;
  font-size: 0.9rem;
  line-height: 1.45;
}

.student-risk-alert i {
  font-size: 1rem;
  color: #bb4258;
  margin-top: 0.06rem;
}

.student-risk-alert strong,
.student-risk-alert span {
  display: block;
}

.student-risk-alert span {
  margin-top: 0.15rem;
}

.student-risk-form {
  margin-top: 0.1rem;
}

.student-academic-module-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.student-academic-note {
  max-width: 360px;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  background: rgba(237, 245, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #4f6780;
  font-size: 0.82rem;
  line-height: 1.45;
}

.student-academic-panel {
  padding: 0.95rem;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.74), rgba(244, 248, 255, 0.66));
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.student-academic-subpanel {
  margin-top: 0.2rem;
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.student-academic-checklist {
  max-height: 240px;
  overflow: auto;
}

.student-academic-checkitem {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.72rem 0.78rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.student-academic-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem 0.8rem;
}

.student-academic-empty {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(242, 247, 255, 0.72);
  border: 1px dashed rgba(128, 148, 172, 0.28);
  color: #5f7389;
}

.student-academic-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.student-academic-list-item {
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.56);
}

.student-academic-list-item-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1rem;
}

.student-academic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.student-academic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.student-academic-action-btn {
  min-width: 11rem;
}

.student-academic-danger-note {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.56);
  color: #6c3340;
}

.student-risk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.2rem;
}

.student-risk-footnote {
  color: #7b5560;
  font-size: 0.84rem;
}

.student-risk-history {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.student-risk-history-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.56);
  color: #73414d;
}

.student-risk-history-card strong {
  color: #562a34;
  font-weight: 700;
}

@keyframes student-edit-tab-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

@media (max-width: 991.98px) {
  .student-create-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .directory-module-grid {
    grid-template-columns: 1fr;
  }

  .directory-summary-stack {
    max-width: 420px;
  }

  .directory-shell-head {
    align-items: flex-start;
  }

  .directory-actions-inline {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .directory-info-item-wide,
  .directory-info-item-access {
    grid-column: span 2;
  }

  .directory-pagination {
    align-items: flex-start;
  }

  .student-edit-sidebar {
    position: static;
  }

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

  .student-enrollment-layout,
  .student-enrollment-summary,
  .student-profile-overview,
  .student-risk-history {
    grid-template-columns: 1fr;
  }

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

  .student-enrollment-intro p {
    max-width: none;
  }

  .student-access-intro p {
    max-width: none;
  }

  .student-risk-intro p {
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .student-create-shell {
    padding: 0.95rem;
  }

  .student-create-actions {
    width: 100%;
  }

  .student-create-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .directory-intro-module,
  .directory-toolbar-shell,
  .directory-table-shell {
    padding: 0.9rem !important;
  }

  .directory-summary-stack {
    width: 100%;
  }

  .directory-toolbar-actions {
    flex-direction: column;
    gap: 0.55rem;
  }

  .directory-toolbar-actions .btn {
    width: 100%;
  }

  .directory-info-panel {
    padding: 0.8rem;
  }

  .directory-info-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .directory-info-item {
    min-height: auto;
  }

  .directory-info-item-wide,
  .directory-info-item-access {
    grid-column: span 1;
  }

  .directory-shell-meta {
    width: 100%;
    justify-content: center;
  }

  .directory-pagination {
    flex-direction: column;
    align-items: stretch;
  }

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

  .student-edit-avatar {
    width: 66px;
    height: 66px;
    border-radius: 20px;
  }

  .student-edit-section {
    padding: 0.9rem;
  }

  .student-edit-tab-nav {
    flex-direction: column;
    border-radius: 24px;
  }

  .student-edit-tab-btn {
    width: 100%;
    justify-content: flex-start;
  }

  .student-edit-section-head,
  .student-access-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-academic-head,
  .student-academic-module-head,
  .student-academic-block-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-academic-summary,
  .student-academic-actions {
    width: 100%;
    justify-content: stretch;
  }

  .student-academic-summary-pill,
  .student-academic-actions .btn,
  .student-academic-action-btn {
    width: 100%;
  }

  .student-academic-module,
  .student-academic-panel {
    padding: 0.9rem;
  }
}

.table thead.table-light th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* Grid de tarjetas para listados */
.materias-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.materias-head,
.materias-row {
  display: grid;
  grid-template-columns: 2.2fr 0.7fr 1fr 3fr 0.9fr;
  gap: 12px;
  align-items: center;
}

.materias-grid.reportes-grid .materias-head,
.materias-grid.reportes-grid .materias-row {
  grid-template-columns: 1.8fr 1.6fr 1fr 1.6fr;
}

.materias-head {
  font-weight: 600;
  font-size: 0.85rem;
  color: #5b667a;
  padding: 0 6px;
}

.materias-row {
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  background-image:
    radial-gradient(200px 120px at var(--glass-x) var(--glass-y), var(--glass-sheen-strong), rgba(255, 255, 255, 0) 65%),
    linear-gradient(160deg, var(--glass-tint), rgba(255, 255, 255, 0));
  background-blend-mode: screen;
  background-size: 220% 220%, 100% 100%;
  background-position: 0% 0%, 0 0;
}

.materias-nombre {
  font-weight: 600;
  color: #0b1b33;
}

.materias-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.55);
  color: #2b3a55;
  border: 1px solid var(--liquid-border);
  white-space: nowrap;
}

.materias-actions {
  display: flex;
  justify-content: flex-end;
}

.materias-dist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: stretch;
}

.materias-dist-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 0.35rem 0.45rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-family: inherit;
}

.materias-dist-label {
  display: block;
  font-size: 0.66rem;
  line-height: 1.1;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.16rem;
  font-family: inherit;
}

.materias-dist-value {
  display: block;
  font-size: 0.83rem;
  line-height: 1.15;
  font-weight: 700;
  color: #0f172a;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.materias-level-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.materias-level-item {
  border: 1px solid var(--liquid-border) !important;
  border-radius: 15px !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

.materias-level-button {
  padding: 0.7rem 0.85rem !important;
}

.materias-level-title {
  margin-right: auto;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f3148;
}

.materias-level-button .badge {
  margin-left: 0.45rem;
  margin-right: 0.25rem;
}

.materias-level-button::after {
  margin-left: 0.35rem;
}

.materias-grid-subjects-by-level {
  gap: 8px;
}

.materias-grid-subjects-by-level .materias-head,
.materias-grid-subjects-by-level .materias-row {
  grid-template-columns: 1.95fr 1.15fr 2.7fr auto;
}

.materias-grid-subjects-by-level .materias-head {
  font-size: 0.8rem;
  padding: 0 4px;
}

.materias-grid-subjects-by-level .materias-row {
  padding: 8px 10px;
  border-radius: 14px;
}

.materias-grid-subjects-by-level .materias-nombre {
  font-size: 0.98rem;
  line-height: 1.2;
}

.materias-grid-subjects-by-level .materias-pill {
  justify-content: flex-start;
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.74rem;
  line-height: 1.1;
  white-space: normal;
  text-align: left;
}

.materias-grid-subjects-by-level .materias-dist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  align-items: center;
}

.materias-grid-subjects-by-level .materias-dist-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  min-height: 26px;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  gap: 0.26rem;
}

.materias-grid-subjects-by-level .materias-dist-label {
  margin-bottom: 0;
  font-size: 0.62rem;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
}

.materias-grid-subjects-by-level .materias-dist-value {
  font-size: 0.82rem;
  line-height: 1;
}

.materias-grid-subjects-by-level .materias-actions .btn {
  min-height: 28px;
  padding: 0.12rem 0.62rem;
  font-size: 0.75rem;
}

/* Reportes admin (accordion) */
.reportes-accordion-button {
  background: rgba(255, 255, 255, 0.65);
  background-image:
    radial-gradient(200px 120px at var(--glass-x) var(--glass-y), var(--glass-sheen-strong), rgba(255, 255, 255, 0) 65%),
    linear-gradient(160deg, var(--glass-tint), rgba(255, 255, 255, 0));
  background-blend-mode: screen;
  background-size: 220% 220%, 100% 100%;
  background-position: 0% 0%, 0 0;
  border: 1px solid var(--liquid-border);
  padding: 0.9rem 1rem;
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  backdrop-filter: var(--glass-blur) saturate(140%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(140%);
}

.reportes-accordion-button:not(.collapsed) {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--liquid-border-strong);
  color: #0b1b33;
  box-shadow: var(--liquid-shadow), var(--liquid-highlight);
}

.reportes-accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(74, 109, 144, 0.16);
}

.reportes-accordion-button .badge {
  font-weight: 600;
  background: #eef2ff !important;
  color: #2b3a55 !important;
  border: 1px solid #e1e7fb;
}

.reportes-accordion-row .reportes-accordion-col {
  flex: 1;
}

.reportes-accordion-left {
  justify-content: flex-start;
}

.reportes-accordion-center {
  text-align: center;
}

.reportes-accordion-right {
  text-align: right;
}

@media (max-width: 768px) {
  .reportes-accordion-center,
  .reportes-accordion-right {
    text-align: left;
  }
}

@media (max-width: 992px) {
  .materias-head {
    display: none;
  }
  .materias-row {
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-areas:
      "nombre nombre acciones"
      "nivel tipo acciones"
      "dist dist dist";
  }
  .materias-grid:not(.reportes-grid) .materias-row > :nth-child(1) { grid-area: nombre; }
  .materias-grid:not(.reportes-grid) .materias-row > :nth-child(2) { grid-area: nivel; }
  .materias-grid:not(.reportes-grid) .materias-row > :nth-child(3) { grid-area: tipo; }
  .materias-grid:not(.reportes-grid) .materias-row > :nth-child(4) { grid-area: dist; }
  .materias-grid:not(.reportes-grid) .materias-row > :nth-child(5) { grid-area: acciones; }
  .materias-actions { align-items: flex-start; }

  .materias-grid-subjects-by-level .materias-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "nombre acciones"
      "tipo acciones"
      "dist dist";
  }

  .materias-grid-subjects-by-level .materias-row > :nth-child(1) { grid-area: nombre; }
  .materias-grid-subjects-by-level .materias-row > :nth-child(2) { grid-area: tipo; }
  .materias-grid-subjects-by-level .materias-row > :nth-child(3) { grid-area: dist; }
  .materias-grid-subjects-by-level .materias-row > :nth-child(4) { grid-area: acciones; }

  .materias-grid.reportes-grid .materias-row {
    grid-template-columns: 1.6fr 1fr;
    grid-template-areas:
      "nombre acciones"
      "nivel acciones"
      "tipo tipo";
  }
  .materias-grid.reportes-grid .materias-row > :nth-child(1) { grid-area: nombre; }
  .materias-grid.reportes-grid .materias-row > :nth-child(2) { grid-area: nivel; }
  .materias-grid.reportes-grid .materias-row > :nth-child(3) { grid-area: tipo; }
  .materias-grid.reportes-grid .materias-row > :nth-child(4) { grid-area: acciones; }

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

  .materias-grid-subjects-by-level .materias-dist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .materias-grid-subjects-by-level .materias-dist-item {
    min-height: 34px;
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.14rem;
    padding: 0.24rem 0.4rem;
  }

  .materias-grid-subjects-by-level .materias-dist-label {
    font-size: 0.6rem;
  }

  .materias-grid-subjects-by-level .materias-dist-value {
    font-size: 0.76rem;
  }
}

@media (max-width: 575.98px) {
  .materias-dist {
    grid-template-columns: 1fr;
  }

  .materias-grid-subjects-by-level .materias-dist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .materias-grid-subjects-by-level .materias-actions {
    justify-content: flex-end;
  }
}

/* Tablas estilo "tarjetas" compactas */
.table {
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.table thead th {
  background: transparent;
  border-bottom: 0;
}

.table tbody tr {
  background: transparent;
}

.table tbody td {
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid var(--liquid-border);
  border-bottom: 1px solid var(--liquid-border);
  box-shadow: none;
  vertical-align: middle;
}

.table tbody td + td {
  border-left-width: 0;
}

.table tbody td:first-child {
  border-left: 1px solid var(--liquid-border);
  border-radius: 14px 0 0 14px;
}

.table tbody td:last-child {
  border-right: 1px solid var(--liquid-border);
  border-radius: 0 14px 14px 0;
}

.table tbody td[colspan] {
  border-left: 1px solid var(--liquid-border);
  border-right: 1px solid var(--liquid-border);
  border-radius: 14px;
}

.table-sm td,
.table-sm th {
  padding: 0.6rem 0.75rem;
}

.table-responsive-mobile {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  scrollbar-gutter: stable;
}

.table-responsive-mobile::after {
  content: none;
}

.table-responsive-mobile table {
  min-width: 100%;
}

.form-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.xsmall {
  font-size: 0.78rem;
  line-height: 1.2;
}

.signin-card {
  max-width: 360px;
}

.login-page .login-screen {
  min-height: clamp(470px, 70vh, 760px);
  padding-inline: 0.25rem;
}

.login-page .signin-card-login {
  width: min(100%, 360px);
  margin-inline: auto;
}


.login-page .liquid-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.login-page .liquid-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  min-height: 40px;
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(240, 245, 252, 0.55) 100%);
  border: 1px solid var(--liquid-border);
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition: transform var(--transition-quick), box-shadow var(--transition-quick), border-color var(--transition-quick);
}

.login-page .liquid-shell::before {
  content: none;
}

.login-page .liquid-field:hover .liquid-shell,
.login-page .liquid-field:focus-within .liquid-shell {
  transform: translateY(-1px);
  box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-color: var(--liquid-border);
}

.login-page .liquid-shell .form-control {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.2rem 0;
  min-height: 34px;
  width: 100%;
  /* Keep >=16px on mobile Safari to prevent automatic zoom on focus. */
  font-size: 1rem;
  color: #1f3148;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.login-page .liquid-shell .form-control:focus {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.login-page .liquid-shell > * {
  position: relative;
  z-index: 1;
}

.login-page .liquid-shell .form-control::placeholder {
  color: rgba(31, 49, 72, 0.6);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1rem;
}

.login-footer {
  margin-inline: auto;
  max-width: 360px;
  padding-bottom: max(0.2rem, env(safe-area-inset-bottom));
}

.login-footer-byline {
  font-size: 0.9em;
}

.login-footer a {
  text-underline-offset: 2px;
}

@media (max-width: 575.98px) {
  .login-page .login-screen {
    min-height: clamp(420px, 62vh, 640px);
  }

  .login-page .signin-card-login .signin-logo {
    height: 132px;
  }

  .login-page .liquid-field {
    max-width: 100%;
  }

  .login-page .liquid-shell {
    min-height: 44px;
  }

  .login-page .liquid-shell .form-control {
    min-height: 38px;
  }
}

/* Sidebar profesor */
.teacher-sidebar {
  background-color: rgba(255, 255, 255, 0.65);
  border-radius: 1rem;
}

.sidebar-nav .nav-link {
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  color: var(--text-main);
}

.sidebar-nav .nav-link i {
  font-size: 1rem;
}

.sidebar-nav .nav-link:hover {
  background-color: rgba(72, 149, 239, 0.08);
  text-decoration: none;
}

.sidebar-nav .nav-link.active {
  background-color: rgba(72, 149, 239, 0.14);
  font-weight: 500;
}

/* Avatares de perfil */
.avatar-perfil-lg,
.avatar-perfil-xl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #74b9ff, #a29bfe);
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-perfil-lg {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
}

.avatar-perfil-xl {
  width: 90px;
  height: 90px;
  font-size: 2rem;
  overflow: hidden;
}

.avatar-perfil-lg img,
.avatar-perfil-xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

/* Ajuste de espacio entre elementos del sidebar (ampliado) */
.sidebar-nav {
  gap: 0.75rem !important;
}

.sidebar-nav .nav-link {
  padding: 0.7rem 0.95rem !important;
  border-radius: 12px;
  font-size: 0.95rem;
}

.sidebar-nav .nav-link i {
  font-size: 1.2rem !important;
  margin-right: 6px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 1035;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.68);
  background-image:
    radial-gradient(240px 140px at 50% 0%, var(--glass-sheen-strong), rgba(255, 255, 255, 0) 65%),
    linear-gradient(160deg, var(--glass-tint), rgba(255, 255, 255, 0));
  background-blend-mode: screen;
  background-size: 220% 220%, 100% 100%;
  background-position: 0% 0%, 0 0;
  border: 0;
  border-top: 1px solid var(--liquid-border);
  backdrop-filter: var(--glass-blur) saturate(150%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(150%);
  box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.12);
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.45rem 0.25rem;
  border-radius: 12px;
  transition: transform var(--transition-quick), box-shadow var(--transition-quick), background-color var(--transition-quick), color var(--transition-quick);
}

.bottom-nav a span {
  display: block;
  font-size: 0.72rem;
  margin-top: 3px;
  letter-spacing: 0.01em;
}

.bottom-nav a.active {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--liquid-border);
  box-shadow: var(--liquid-shadow-soft);
  color: #1f3148;
  font-weight: 600;
}

.bottom-nav a i {
  font-size: 1.15rem;
}


/* Botón volver premium y breadcrumb */
.volver-premium{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 14px;
  font-size:0.85rem;
  border-radius:999px;
  border:1px solid var(--liquid-border);
  background: rgba(255, 255, 255, 0.65);
  color:#111827;
  text-decoration:none;
  box-shadow:var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition:all var(--transition-quick);
}
.volver-premium:hover{
  transform:translateX(-3px);
  opacity:0.85;
}

.breadcrumb-mini{
  font-size:0.8rem;
  color: var(--text-muted);
  margin-top:0.25rem;
}

/* Quitar viñetas de navegación lateral */
.sidebar-nav,
.sidebar-nav .nav-item {
  list-style:none;
}


/* Layout general profesor */
.teacher-layout {
  align-items: flex-start;
}

/* Sidebar profesor - versión móvil */
@media (max-width: 991.98px) {
  .teacher-layout {
    flex-direction: column;
  }
  .sidebar-fixed {
    position: fixed;
    top: 72px;
    left: 0;
    height: calc(100vh - 72px);
    max-width: 80%;
    width: 260px;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform .25s ease-out;
  }
  .sidebar-fixed.sidebar-open {
    transform: translateX(0);
  }
  .teacher-sidebar {
    height: 100%;
    overflow-y: auto;
  }

  .sidebar-fixed.sidebar-open .teacher-sidebar {
    box-shadow: 0 8px 30px rgba(15,23,42,0.25);
  }

  .teacher-mobile-header .sidebar-toggle {
    color: var(--text-main);
  }
}

/* Tablas responsivas en móvil */
@media (max-width: 767.98px) {
  :root {
    --page-gutter: 0.85rem;
    --card-pad: 0.9rem;
  }

  .app-main {
    padding-inline: var(--page-gutter);
  }

  .app-main section {
    padding-inline: 0;
  }

  .app-main .row {
    margin-inline: 0;
  }

  .app-main .row > div {
    padding-inline: 0;
  }

  .page-header > * {
    padding-inline: var(--card-pad);
  }

  .navbar-clean .container-fluid {
    justify-content: space-between;
  }
  .navbar-clean .navbar-brand {
    margin-inline: 0;
  }
  .navbar-clean .navbar-collapse,
  .navbar-clean .navbar-toggler {
    display: none !important;
  }
  .navbar-clean .navbar-nav {
    display: none !important;
  }
  .app-main {
    padding-top: 0.6rem;
    padding-bottom: 5rem;
  }
  .navbar-clean .navbar-brand img {
    height: 40px;
  }
  .brand-text {
    font-size: 0.82rem;
    line-height: 1.1;
  }
  .app-main h2, .app-main h3, .app-main h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .app-main section {
    padding-inline: 0.35rem;
  }
  .card-soft {
    border-radius: 14px;
    padding: var(--card-pad) !important;
  }
  h1, .h1 { font-size: 1.4rem; }
  h2, .h2 { font-size: 1.25rem; }
  h3, .h3 { font-size: 1.1rem; }
  h4, .h4 { font-size: 1.05rem; }
  .teacher-layout { gap: 0.85rem; }
  .sidebar-fixed {
    width: 88%;
    max-width: 320px;
  }
  .table-responsive-mobile {
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(15,23,42,0.07);
    margin-bottom: 0.35rem;
    margin-inline: 0;
  }
  .table-responsive-mobile table {
    min-width: 100%;
  }
  .table-responsive-mobile table:not(.schedule-table):not(.schedule-grid) :is(th, td) {
    min-width: 0;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
  }
  .table-responsive-mobile table:not(.schedule-table):not(.schedule-grid) :is(th, td).u-email-text,
  .table-responsive-mobile table:not(.schedule-table):not(.schedule-grid) :is(th, td)[data-label*="Correo"],
  .table-responsive-mobile table:not(.schedule-table):not(.schedule-grid) :is(th, td)[data-label*="email" i] {
    overflow-wrap: anywhere;
    word-break: break-all;
    hyphens: none;
  }
  .u-email-text {
    overflow-wrap: anywhere;
    word-break: break-all;
    hyphens: none;
  }
  .user-chip {
    padding: 0.15rem 0.45rem;
  }
  .table-sm > :not(caption) > * > * {
    padding: 0.45rem 0.4rem;
    font-size: 0.9rem;
  }
  .btn {
    min-height: 38px;
  }
  .btn-sm {
    min-height: 34px;
  }

  /* Prevent iOS zoom on focus for form fields on mobile. */
  .form-control,
  .form-select,
  textarea.form-control {
    font-size: 1rem;
  }
  .navbar-clean {
    padding-block: 0.45rem !important;
  }
}

@media (max-width: 575.98px) {
  :root {
    --page-gutter: 0.75rem;
    --card-pad: 0.8rem;
  }

  .navbar-brand img {
    height: 36px !important;
  }
  .brand-text {
    font-size: 0.78rem;
  }
  .app-main .row > div {
    padding-inline: 0.35rem;
  }
  .card-soft {
    padding: var(--card-pad) !important;
    border-radius: 12px;
  }
  .table-responsive-mobile {
    border-radius: 10px;
  }
  .table-responsive-mobile table {
    min-width: 100%;
  }
  .teacher-mobile-header {
    padding: 0.25rem 0 0.55rem;
  }
  .sidebar-fixed {
    top: 64px;
    height: calc(100vh - 64px);
  }
}

/* Admin panel redesign */
.role-admin {
  --admin-ink: #0f172a;
  --admin-accent: #0f766e;
  --admin-accent-soft: rgba(15, 118, 110, 0.14);
  --admin-wash: #f1f6ff;
}

.role-admin .admin-portal {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-top: 0.75rem;
}

.role-admin .admin-hero {
  position: relative;
  border-radius: 28px;
  padding: 1.6rem;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(148, 163, 184, 0.22) 0%, rgba(148, 163, 184, 0) 60%),
    radial-gradient(120% 120% at 100% 0%, rgba(226, 232, 240, 0.4) 0%, rgba(226, 232, 240, 0) 62%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.78) 0%, rgba(242, 245, 249, 0.5) 100%),
    var(--liquid-bg);
  border: 1px solid var(--liquid-border);
  box-shadow: var(--liquid-shadow);
  backdrop-filter: var(--glass-blur) saturate(140%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(140%);
  overflow: hidden;
}

.role-admin .admin-hero::before,
.role-admin .admin-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.role-admin .admin-hero::before {
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
}

.role-admin .admin-hero::after {
  width: 220px;
  height: 220px;
  right: -60px;
  top: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0) 70%);
  opacity: 0.75;
}

.role-admin .admin-hero > * {
  position: relative;
  z-index: 1;
}

.role-admin .admin-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #335267;
  font-weight: 700;
}

.role-admin .admin-hero h2 {
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  font-weight: 700;
  margin: 0.35rem 0 0.4rem;
  color: var(--admin-ink);
}

.role-admin .admin-hero-sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 520px;
}

.role-admin .admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.role-admin .admin-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #7a4b00;
  font-size: 0.85rem;
}

.role-admin .admin-alert i {
  font-size: 1.1rem;
}

.role-admin .admin-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.role-admin .admin-hero-stats .admin-stat-card:last-child {
  grid-column: span 2;
}

.role-admin .admin-stat-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--liquid-border);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  backdrop-filter: var(--glass-blur) saturate(140%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(140%);
}

.role-admin .admin-stat-card span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #52627a;
}

.role-admin .admin-stat-card strong {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--admin-ink);
}

.role-admin .admin-stat-card small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.role-admin .admin-panels {
  display: grid;
  gap: 1.2rem;
}

.role-admin .admin-legend {
  margin: 0.2rem auto 0;
  padding-bottom: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 520px;
}

.role-admin .admin-panel {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  border: 1px solid var(--liquid-border);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  backdrop-filter: var(--glass-blur) saturate(140%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(140%);
}

.role-admin .admin-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.role-admin .admin-panel-header h3 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  font-weight: 700;
  color: var(--admin-ink);
}

.role-admin .admin-panel-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.role-admin .admin-panel-badge {
  background: rgba(15, 118, 110, 0.12);
  color: #0f5e5b;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.role-admin .admin-panel-grid {
  display: grid;
  gap: 0.7rem;
}

.role-admin .admin-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  border: 1px solid var(--liquid-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 246, 255, 0.55) 100%), var(--liquid-bg);
  text-decoration: none;
  color: var(--admin-ink);
  transition: transform var(--transition-quick), box-shadow var(--transition-quick);
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  backdrop-filter: var(--glass-blur) saturate(140%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(140%);
}

.role-admin .admin-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--liquid-shadow), var(--liquid-highlight);
}

.role-admin .admin-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.role-admin .admin-tile-icon i {
  font-size: 1.2rem;
  color: #0f4c5c;
}

.role-admin .admin-tile-body h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.role-admin .admin-tile-body p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.role-admin .admin-tile-meta {
  display: inline-flex;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4b5563;
}

@keyframes admin-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.role-admin .admin-animate {
  animation: admin-rise 0.6s ease-out both;
}

.role-admin .admin-panels .admin-panel:nth-child(1) {
  animation-delay: 0.06s;
}

.role-admin .admin-panels .admin-panel:nth-child(2) {
  animation-delay: 0.12s;
}

.role-admin .admin-panels .admin-panel:nth-child(3) {
  animation-delay: 0.18s;
}

@media (prefers-reduced-motion: reduce) {
  .role-admin .admin-animate {
    animation: none;
  }
  .role-admin .admin-tile {
    transition: none;
  }
}

/* Admin móvil */
@media (max-width: 991.98px) {
  .role-admin .app-main {
    padding-bottom: 6rem;
  }

  .role-admin .navbar-clean {
    padding-block: 0.5rem;
  }

  .bottom-nav-admin {
    gap: 0.35rem;
    padding: 0.45rem 0.85rem calc(0.45rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.08);
  }

  .bottom-nav-admin a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 0.5rem 0.2rem;
    border-radius: 14px;
    background: transparent;
    border: 0;
    transition: all 0.18s ease;
  }

  .bottom-nav-admin a.active {
    background: var(--admin-accent-soft);
    color: #0f4c5c;
    font-weight: 600;
  }

  .bottom-nav-admin i {
    font-size: 1.2rem;
  }

  .bottom-nav-admin span {
    display: block;
    font-size: 0.72rem;
    margin-top: 3px;
    letter-spacing: 0.01em;
  }

  .role-admin .admin-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .role-admin .admin-hero-actions .btn {
    width: 100%;
  }

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

  .role-admin .admin-panel {
    padding: 1.1rem;
  }

  .role-admin .table-responsive-mobile {
    overflow-x: visible;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .role-admin .table-responsive-mobile table {
    min-width: 0;
  }

  .role-admin table.table {
    border-spacing: 0;
  }

  .role-admin table.table thead {
    display: none;
  }

  .role-admin table.table tbody tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0.35rem 0.75rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 0.75rem;
  }

  .role-admin table.table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    overflow: hidden;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
  }

  .role-admin table.table tbody td.admin-email-cell,
  .role-admin table.table tbody td[data-label*="Correo"] {
    overflow-wrap: anywhere;
    word-break: break-all;
    hyphens: none;
  }

  .role-admin table.table tbody td[data-label="Acciones"] {
    overflow: visible;
  }

  .role-admin table.table tbody td[data-label="Acciones"] .d-flex {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .role-admin table.table tbody td.admin-actions-cell {
    justify-content: center;
  }

  .role-admin table.table tbody td.admin-actions-cell::before {
    content: '';
    flex: 0 0 auto;
  }

  .role-admin table.table tbody td.admin-actions-cell .admin-actions-wrap {
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
  }

  .role-admin table.table tbody td::before {
    content: attr(data-label);
    flex: 0 0 44%;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
  }

  .role-admin table.table tbody td:last-child {
    justify-content: flex-end;
  }

  .role-admin table.table tbody td.admin-actions-cell:last-child {
    justify-content: center;
  }

  .role-admin table.table tbody td:last-child::before {
    content: '';
    margin-right: 0;
  }

  .role-admin .table-sm > :not(caption) > * > * {
    padding: 0.45rem 0;
  }

  .role-admin .schedule-grid-wrap {
    overflow-x: auto;
  }

  .role-admin table.schedule-grid {
    border-spacing: 0;
    min-width: 520px;
  }

  .role-admin table.schedule-grid thead {
    display: table-header-group;
  }

  .role-admin table.schedule-grid tbody tr {
    display: table-row;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .role-admin table.schedule-grid tbody td,
  .role-admin table.schedule-grid thead th {
    display: table-cell;
    padding: 0.45rem 0.5rem;
    border: 0;
    box-shadow: none;
    background: transparent;
    text-align: center;
    vertical-align: middle;
  }

  .role-admin table.schedule-grid tbody td::before {
    content: none;
  }

  .role-admin table.schedule-grid tbody td:first-child,
  .role-admin table.schedule-grid thead th:first-child {
    text-align: left;
    padding-left: 0.25rem;
  }

  .role-admin table.schedule-grid tbody td:nth-child(2),
  .role-admin table.schedule-grid thead th:nth-child(2) {
    text-align: left;
  }
}

@media (min-width: 992px) {
  .role-admin .admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
  }

  .role-admin .admin-hero-stats {
    margin-top: 0;
  }

  .role-admin .admin-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .role-admin .admin-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-admin .admin-hero-stats .admin-stat-card:last-child {
    grid-column: span 1;
  }
}

/* Teacher panel redesign */
.role-profesor {
  --admin-ink: #0f172a;
  --admin-accent: #0f766e;
  --admin-accent-soft: rgba(15, 118, 110, 0.14);
  --admin-wash: #f1f6ff;
}

.role-profesor .admin-portal {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-top: 0.75rem;
}

.role-profesor .teacher-welcome {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1rem 1.2rem;
  border-radius: 26px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.role-profesor .teacher-welcome > * {
  position: relative;
  z-index: 1;
}

.role-profesor .teacher-welcome-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.role-profesor .teacher-welcome .avatar-perfil-lg {
  width: 86px;
  height: 86px;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.role-profesor .teacher-legend {
  margin: 0.2rem auto 0;
  padding-bottom: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 520px;
}

.role-profesor .teacher-welcome-title {
  margin: 0 0 0.15rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--admin-ink);
}

.role-profesor .teacher-welcome-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.role-profesor .admin-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #335267;
  font-weight: 700;
}

.role-profesor .admin-hero-sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 520px;
}

.role-profesor .admin-panels {
  display: grid;
  gap: 1.2rem;
}

.role-profesor .admin-panel {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1.2rem 1.25rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.role-profesor .admin-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.role-profesor .admin-panel-header h3 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  font-weight: 700;
  color: var(--admin-ink);
}

.role-profesor .admin-panel-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.role-profesor .admin-panel-link {
  font-size: 0.8rem;
  text-decoration: none;
  color: #0f5e5b;
  font-weight: 600;
}

.role-profesor .admin-panel-grid {
  display: grid;
  gap: 0.7rem;
}

.role-profesor .admin-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(145deg, #ffffff 0%, var(--admin-wash) 100%);
  text-decoration: none;
  color: var(--admin-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.role-profesor .admin-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1);
}

.role-profesor .admin-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.role-profesor .admin-tile-icon i {
  font-size: 1.2rem;
  color: #0f4c5c;
}

.role-profesor .admin-tile-body h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.role-profesor .admin-tile-body p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.role-profesor .admin-panel-wide {
  background: #ffffff;
}

.role-profesor .teacher-section-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.role-profesor .teacher-section-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(145deg, #ffffff 0%, #f2f6fb 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-profesor .teacher-section-card:hover,
.role-profesor .teacher-section-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.role-profesor .teacher-section-card .btn {
  min-height: 34px;
  white-space: nowrap;
}

.role-profesor .teacher-section-action {
  border-color: var(--liquid-border);
  color: #1f3148;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition: transform var(--transition-quick), box-shadow var(--transition-quick), border-color var(--transition-quick);
}

.role-profesor .teacher-section-action:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--liquid-border-strong);
  transform: translateY(-1px);
  box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.role-profesor .teacher-schedule {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.95rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(135deg, #f8faff 0%, #f2f6ff 55%, #eef3f9 100%);
  position: relative;
  z-index: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.role-profesor .teacher-schedule::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(226, 232, 240, 0.5), rgba(226, 232, 240, 0));
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.role-profesor .teacher-schedule-main {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.role-profesor .teacher-schedule-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.16);
  color: #0a5a58;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
}

.role-profesor .teacher-schedule-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--admin-ink);
  padding-left: 0.55rem;
  line-height: 1.2;
}

.role-profesor .teacher-schedule-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 0.55rem;
}

.role-profesor .teacher-schedule-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: #5b6b7c;
  padding-left: 0.55rem;
}

.role-profesor .teacher-schedule-side {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-end;
  align-self: flex-start;
  justify-content: flex-start;
  min-width: 170px;
  position: relative;
  z-index: 1;
}

.role-profesor .teacher-schedule-eta {
  text-align: center;
  display: grid;
  place-items: center;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--liquid-border);
  background: rgba(255, 255, 255, 0.65);
  min-width: 130px;
  box-shadow: var(--liquid-shadow-soft);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.role-profesor .teacher-schedule-eta span {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.1rem;
  text-align: center;
}

.role-profesor .teacher-schedule-eta strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f3148;
}

.role-profesor .teacher-schedule-link {
  border-color: var(--liquid-border);
  color: #1f3148;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.35rem 0.95rem;
  font-weight: 600;
  box-shadow: var(--liquid-shadow-soft);
  min-width: 130px;
  text-align: center;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.role-profesor .teacher-schedule-link:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--liquid-border-strong);
}

.role-profesor .teacher-schedule-empty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  color: var(--text-muted);
}

.role-profesor .teacher-schedule-empty i {
  font-size: 1.1rem;
}

.role-profesor .teacher-class-empty {
  text-align: center;
  color: var(--text-muted);
}

.role-profesor .admin-animate {
  animation: admin-rise 0.6s ease-out both;
}

.role-profesor .admin-panels .admin-panel:nth-child(1) {
  animation-delay: 0.04s;
}

.role-profesor .admin-panels .admin-panel:nth-child(2) {
  animation-delay: 0.08s;
}

.role-profesor .admin-panels .admin-panel:nth-child(3) {
  animation-delay: 0.12s;
}

.role-profesor .admin-panels .admin-panel:nth-child(4) {
  animation-delay: 0.16s;
}

@media (prefers-reduced-motion: reduce) {
  .role-profesor .admin-animate {
    animation: none;
  }
  .role-profesor .admin-tile {
    transition: none;
  }
}

@media (max-width: 991.98px) {
  .role-profesor .app-main {
    padding-bottom: 6rem;
  }

  .role-profesor .admin-panel {
    padding: 1.1rem;
  }

  .role-profesor .admin-panel-grid {
    grid-template-columns: 1fr;
  }

  .role-profesor .teacher-schedule {
    flex-direction: column;
    align-items: stretch;
  }

  .role-profesor .teacher-schedule-side {
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    min-width: 0;
  }

  .role-profesor .teacher-schedule-eta {
    text-align: center;
    width: 100%;
    min-width: 0;
  }

  .role-profesor .teacher-schedule-link {
    width: 100%;
    text-align: center;
  }

  .role-profesor .teacher-class-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .role-profesor .admin-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-profesor .admin-panel-wide {
    grid-column: span 3;
  }
}

/* Student panel redesign (aligned with teacher) */
.role-estudiante {
  --admin-ink: #0f172a;
  --admin-accent: #0f766e;
  --admin-accent-soft: rgba(15, 118, 110, 0.14);
  --admin-wash: #f1f6ff;
}

.role-estudiante .admin-portal {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-top: 0.75rem;
}

.role-estudiante .teacher-welcome {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1rem 1.2rem;
  border-radius: 26px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.role-estudiante .teacher-welcome > * {
  position: relative;
  z-index: 1;
}

.role-estudiante .teacher-welcome-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.role-estudiante .teacher-welcome .avatar-perfil-lg {
  width: 86px;
  height: 86px;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.role-estudiante .teacher-legend {
  margin: 0.2rem auto 0;
  padding-bottom: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 520px;
}

.role-estudiante .teacher-welcome-title {
  margin: 0 0 0.15rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--admin-ink);
}

.role-estudiante .teacher-welcome-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.role-estudiante .admin-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #335267;
  font-weight: 700;
}

.role-estudiante .admin-hero-sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 520px;
}

.role-estudiante .admin-panels {
  display: grid;
  gap: 1.2rem;
}

.role-estudiante .admin-panel {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1.2rem 1.25rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.role-estudiante .admin-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.role-estudiante .admin-panel-header h3 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  font-weight: 700;
  color: var(--admin-ink);
}

.role-estudiante .admin-panel-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.role-estudiante .admin-panel-link {
  font-size: 0.8rem;
  text-decoration: none;
  color: #0f5e5b;
  font-weight: 600;
}

.role-estudiante .admin-panel-grid {
  display: grid;
  gap: 0.7rem;
}

.role-estudiante .admin-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(145deg, #ffffff 0%, var(--admin-wash) 100%);
  text-decoration: none;
  color: var(--admin-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.role-estudiante .admin-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1);
}

.role-estudiante .admin-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.role-estudiante .admin-tile-icon i {
  font-size: 1.2rem;
  color: #0f4c5c;
}

.role-estudiante .admin-tile-body h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.role-estudiante .admin-tile-body p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.role-estudiante .admin-panel-wide {
  background: #ffffff;
}

.role-estudiante .teacher-section-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.role-estudiante .teacher-section-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(145deg, #ffffff 0%, #f2f6fb 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-estudiante .teacher-section-card.is-hidden {
  display: none;
}

.role-estudiante .teacher-section-card:hover,
.role-estudiante .teacher-section-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.role-estudiante .teacher-section-card .btn {
  min-height: 34px;
  white-space: nowrap;
}

.role-estudiante .teacher-section-action {
  border-color: var(--liquid-border);
  color: #1f3148;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition: transform var(--transition-quick), box-shadow var(--transition-quick), border-color var(--transition-quick);
}

.role-estudiante .teacher-section-action:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--liquid-border-strong);
  transform: translateY(-1px);
  box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.role-estudiante .teacher-schedule {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.95rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(135deg, #f8faff 0%, #f2f6ff 55%, #eef3f9 100%);
  position: relative;
  z-index: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.role-estudiante .teacher-schedule::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(226, 232, 240, 0.5), rgba(226, 232, 240, 0));
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.role-estudiante .teacher-schedule-main {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.role-estudiante .teacher-schedule-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.16);
  color: #0a5a58;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
}

.role-estudiante .teacher-schedule-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--admin-ink);
  padding-left: 0.55rem;
  line-height: 1.2;
}

.role-estudiante .teacher-schedule-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 0.55rem;
}

.role-estudiante .teacher-schedule-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: #5b6b7c;
  padding-left: 0.55rem;
}

.role-estudiante .teacher-schedule-side {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-end;
  align-self: flex-start;
  justify-content: flex-start;
  min-width: 170px;
  position: relative;
  z-index: 1;
}

.role-estudiante .teacher-schedule-eta {
  text-align: center;
  display: grid;
  place-items: center;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--liquid-border);
  background: rgba(255, 255, 255, 0.65);
  min-width: 130px;
  box-shadow: var(--liquid-shadow-soft);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.role-estudiante .teacher-schedule-eta span {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.1rem;
  text-align: center;
}

.role-estudiante .teacher-schedule-eta strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f3148;
}

.role-estudiante .teacher-schedule-link {
  border-color: var(--liquid-border);
  color: #1f3148;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.35rem 0.95rem;
  font-weight: 600;
  box-shadow: var(--liquid-shadow-soft);
  min-width: 130px;
  text-align: center;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.role-estudiante .teacher-schedule-link:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--liquid-border-strong);
}

.role-estudiante .teacher-schedule-empty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  color: var(--text-muted);
}

.role-estudiante .teacher-schedule-empty i {
  font-size: 1.1rem;
}

.role-estudiante .teacher-class-empty {
  text-align: center;
  color: var(--text-muted);
}

.role-estudiante .student-next-class {
  padding: 0.95rem 1.05rem;
}

.role-estudiante .student-next-class .teacher-schedule {
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  gap: 0.9rem;
}

.role-estudiante .student-next-class .teacher-schedule-tag {
  font-size: 0.6rem;
  padding: 0.18rem 0.45rem;
}

.role-estudiante .student-next-class .teacher-schedule-title {
  font-size: 1.05rem;
}

.role-estudiante .student-next-class .teacher-schedule-sub {
  font-size: 0.82rem;
}

.role-estudiante .student-next-class .teacher-schedule-time {
  font-size: 0.8rem;
}

.role-estudiante .student-next-class .teacher-schedule-side {
  min-width: 140px;
}

.role-estudiante .student-next-class .teacher-schedule-eta {
  min-width: 110px;
  padding: 0.35rem 0.5rem;
}

.role-estudiante .student-next-class .teacher-schedule-link {
  min-width: 110px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
}

.role-estudiante .student-next-class .teacher-class-meta {
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.role-estudiante .student-next-class .teacher-class-meta-item {
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
}

.role-estudiante .student-next-class .teacher-class-meta-item span {
  font-size: 0.62rem;
}

.role-estudiante .admin-animate {
  animation: admin-rise 0.6s ease-out both;
}

.role-estudiante .admin-panels .admin-panel:nth-child(1) {
  animation-delay: 0.04s;
}

.role-estudiante .admin-panels .admin-panel:nth-child(2) {
  animation-delay: 0.08s;
}

.role-estudiante .admin-panels .admin-panel:nth-child(3) {
  animation-delay: 0.12s;
}

.role-estudiante .admin-panels .admin-panel:nth-child(4) {
  animation-delay: 0.16s;
}

.role-estudiante .student-summary-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.45rem;
}

.role-estudiante .student-summary-card,
.role-estudiante .student-summary-mini {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 92px;
}

.role-estudiante .student-summary-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #3f4f63;
}

.role-estudiante .student-summary-title {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1f3148;
}

.role-estudiante .student-summary-caption {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.role-estudiante .student-summary-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(15, 118, 110, 0.12);
  display: grid;
  place-items: center;
  color: #0f4c5c;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.role-estudiante .student-summary-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--admin-ink);
  line-height: 1.1;
}

.role-estudiante .student-summary-sub {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.role-estudiante .student-summary-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f5e5b;
  text-decoration: none;
  margin-top: 0.1rem;
}

.role-estudiante .student-summary-action i {
  font-size: 0.95rem;
}


.role-estudiante .student-summary-mini-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.role-estudiante .student-summary-mini-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(15, 118, 110, 0.12);
  display: grid;
  place-items: center;
  color: #0f4c5c;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.role-estudiante .student-summary-mini-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1f3148;
}

.role-estudiante .student-summary-mini-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.role-estudiante .student-summary-mini-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: #5c6b7c;
}

.role-estudiante .student-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.role-estudiante .student-summary-grid .student-summary-mini {
  border-radius: 18px;
  border: 1px solid var(--liquid-border);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 0.85rem;
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  min-height: 140px;
  gap: 0.5rem;
}

.role-estudiante .student-summary-grid .student-summary-action {
  margin-top: auto;
}

.role-estudiante .student-summary-mini-pill {
  border-radius: 999px;
  border: 1px solid var(--liquid-border);
  background: rgba(255, 255, 255, 0.55);
  padding: 0.12rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1f3148;
}

.role-estudiante .student-summary-mini-date {
  font-size: 0.72rem;
  color: #6b7280;
}

.role-estudiante .student-summary-mini-empty {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.role-estudiante .student-summary-detail-card {
  border-radius: 18px;
  border: 1px solid var(--liquid-border);
  background: rgba(255, 255, 255, 0.65);
  padding: 0.75rem 0.85rem;
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.role-estudiante .student-summary-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.role-estudiante .student-summary-detail-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5c6b7c;
  font-weight: 700;
}

.role-estudiante .student-summary-detail-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.role-estudiante .student-summary-detail-total {
  padding: 0.3rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.08);
  text-align: right;
  min-width: 98px;
}

.role-estudiante .student-summary-detail-total span {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5c6b7c;
}

.role-estudiante .student-summary-detail-total strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f4c5c;
}

.role-estudiante .student-summary-detail-grid {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-estudiante .student-summary-pill {
  border-radius: 10px;
  border: 1px solid var(--liquid-border);
  background: rgba(255, 255, 255, 0.55);
  padding: 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #4b5b6f;
}

.role-estudiante .student-summary-pill span {
  font-size: 0.7rem;
  color: #6b7280;
}

.role-estudiante .student-summary-pill strong {
  font-weight: 700;
  color: #1f3148;
  font-size: 0.9rem;
}

.role-estudiante .student-summary-detail-action {
  margin-top: 0.4rem;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 575.98px) {
  .role-estudiante .student-summary-detail-head {
    align-items: flex-start;
  }

  .role-estudiante .student-summary-detail-total {
    text-align: left;
    width: 100%;
  }

  .role-estudiante .student-summary-detail-action {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .role-estudiante .admin-animate {
    animation: none;
  }
  .role-estudiante .admin-tile {
    transition: none;
  }
}

@media (min-width: 992px) {
  .role-estudiante .admin-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-estudiante .admin-panel-wide {
    grid-column: span 3;
  }

  .role-estudiante .student-summary-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .role-estudiante .app-main {
    padding-bottom: 6rem;
  }

  .role-estudiante .admin-panel {
    padding: 1.1rem;
  }

  .role-estudiante .admin-panel-grid {
    grid-template-columns: 1fr;
  }

  .role-estudiante .student-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .role-estudiante .teacher-schedule {
    flex-direction: column;
    align-items: stretch;
  }

  .role-estudiante .teacher-schedule-side {
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    min-width: 0;
  }

  .role-estudiante .teacher-schedule-eta {
    text-align: center;
    width: 100%;
    min-width: 0;
  }

  .role-estudiante .teacher-schedule-link {
    width: 100%;
    text-align: center;
  }

  .role-estudiante .teacher-class-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-estudiante .student-next-class {
    padding: 0.85rem 0.95rem;
  }

  .role-estudiante .student-next-class .admin-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
  }

  .role-estudiante .student-next-class .admin-panel-link {
    font-size: 0.75rem;
  }

  .role-estudiante .student-next-class .teacher-schedule {
    padding: 0.7rem 0.8rem;
    gap: 0.6rem;
  }

  .role-estudiante .student-next-class .teacher-schedule::after {
    display: none;
  }

  .role-estudiante .student-next-class .teacher-schedule-main {
    gap: 0.2rem;
  }

  .role-estudiante .student-next-class .teacher-schedule-title,
  .role-estudiante .student-next-class .teacher-schedule-sub,
  .role-estudiante .student-next-class .teacher-schedule-time {
    padding-left: 0;
  }

  .role-estudiante .student-next-class .teacher-schedule-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    align-self: stretch;
    justify-items: stretch;
    align-items: stretch;
  }

  .role-estudiante .student-next-class .teacher-schedule-eta,
  .role-estudiante .student-next-class .teacher-schedule-link {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .role-estudiante .student-next-class .teacher-schedule-eta {
    gap: 0.35rem;
    padding: 0.45rem 0.6rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: rgba(15, 118, 110, 0.08);
    box-shadow: none;
  }

  .role-estudiante .student-next-class .teacher-schedule-eta span {
    margin: 0;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: #5c6b7c;
  }

  .role-estudiante .student-next-class .teacher-schedule-eta strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f4c5c;
  }

  .role-estudiante .student-next-class .teacher-class-meta {
    display: none;
  }

  .role-estudiante .student-next-class .teacher-class-meta-item {
    padding: 0.45rem 0.55rem;
  }

  .role-estudiante .student-next-class .teacher-class-meta-item:nth-child(3) {
    grid-column: span 2;
  }
}

/* Profesor móvil premium */
@media (max-width: 991.98px) {
  .page-header-inline > * {
    padding-inline: 0.35rem;
  }

  .role-estudiante .student-dashboard-header {
    display: none;
  }

  .role-estudiante .student-dashboard-mobile {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .role-estudiante .student-dashboard-mobile .student-summary-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .role-estudiante .student-mobile-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: calc(var(--card-pad) + 0.1rem);
    border-radius: 18px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
  }

  .role-estudiante .student-mobile-hero-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
  }

  .role-estudiante .student-mobile-hero-text {
    min-width: 0;
  }

  .role-estudiante .student-mobile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .role-estudiante .student-mobile-hero .avatar-perfil-lg {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(222, 245, 233, 0.9) 100%);
    border: 1px solid var(--liquid-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    color: #1f3148;
  }

  .role-estudiante .student-mobile-hero .avatar-perfil-lg img {
    display: block;
  }

  .role-estudiante .student-mobile-hero h2 {
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .role-estudiante .student-welcome {
    font-size: 0.85rem;
    color: var(--text-muted);
  }

  .role-estudiante .student-mobile-section {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .role-estudiante .student-mobile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .role-estudiante .student-mobile-link {
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: #0f5e5b;
  }

  .role-estudiante .student-mobile-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
  }

  .role-estudiante .student-mobile-section .section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3f4f63;
    margin: 0;
    padding-inline: 0.75rem;
  }

  .role-estudiante .student-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .role-estudiante .student-dashboard-mobile .student-summary-mini {
    border-radius: 18px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 0.8rem;
    box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
    min-height: 120px;
  }

  .role-estudiante .student-mobile-tile {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.95rem 0.85rem;
    border-radius: 20px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.66);
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
    min-height: 120px;
    transition: transform var(--transition-quick), box-shadow var(--transition-quick), border-color var(--transition-quick);
  }

  .role-estudiante .student-mobile-tile:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: var(--liquid-shadow-soft);
  }

  .role-estudiante .student-mobile-tile:focus-visible {
    outline: 2px solid rgba(46, 125, 88, 0.45);
    outline-offset: 2px;
  }

  .role-estudiante .student-mobile-tile i {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: #1f3148;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--liquid-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  .role-estudiante .student-mobile-tile span {
    font-weight: 600;
    font-size: 0.9rem;
  }

  .role-estudiante .student-mobile-tile small {
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  .role-estudiante .student-class-card {
    padding: 0.85rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  .role-estudiante .student-class-wide {
    gap: 0.8rem;
  }

  .role-estudiante .student-class-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .role-estudiante .student-class-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
  }

  .role-estudiante .student-class-title {
    font-weight: 700;
    font-size: 1rem;
  }

  .role-estudiante .student-class-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
  }

  .role-estudiante .student-class-time {
    font-size: 0.78rem;
    color: var(--text-muted);
  }

  .role-estudiante .student-class-eta {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f3148;
    margin-top: 0.2rem;
  }

  .role-estudiante .student-class-badge {
    min-width: 120px;
    padding: 0.45rem 0.6rem;
    border-radius: 14px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.6);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }

  .role-estudiante .student-class-badge span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.1rem;
  }

  .role-estudiante .student-class-badge strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1f3148;
  }

  .role-estudiante .student-class-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .role-estudiante .student-class-meta-item {
    padding: 0.55rem 0.6rem;
    border-radius: 14px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
  }

  .role-estudiante .student-class-meta-item span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
  }

  .role-estudiante .student-class-meta-item strong {
    font-weight: 600;
  }

  .role-estudiante .student-class-empty {
    text-align: center;
    color: var(--text-muted);
  }

  .role-estudiante .student-schedule-day {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5c6b7c;
    font-weight: 700;
    margin: 0 0 0.15rem;
    padding-inline: 0.75rem;
  }

  .role-estudiante .student-schedule-list {
    display: grid;
    gap: 0.5rem;
  }

  .role-estudiante .student-schedule-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 18px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
    text-align: left;
  }

  .role-estudiante .student-schedule-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
  }

  .role-estudiante .student-schedule-item strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f3148;
  }

  .role-estudiante .student-schedule-item span {
    font-size: 0.74rem;
    color: var(--text-muted);
  }

  .role-estudiante .student-schedule-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1f3148;
    white-space: nowrap;
  }

  .role-estudiante .student-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .role-estudiante .student-group-list.student-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .role-estudiante .student-group-card {
    padding: 0.55rem 0.7rem;
    border-radius: 18px;
    border: 1px solid var(--liquid-border);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    text-align: left;
  }

  .role-estudiante .student-group-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 0.6rem;
    row-gap: 0.1rem;
  }

  .role-estudiante .student-group-info {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    align-items: flex-start;
    flex: 1;
  }

  .role-estudiante .student-group-info strong {
    font-size: 0.92rem;
  }

  .role-estudiante .student-group-info span {
    line-height: 1.2;
  }

  .role-estudiante .student-group-section {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.1rem;
  }

  .role-estudiante .student-group-card .btn {
    min-height: 30px;
    white-space: nowrap;
    align-self: start;
    font-size: 0.78rem;
    padding-inline: 0.75rem;
    margin-top: 0;
    align-self: center;
  }

  .role-estudiante .student-group-card.is-hidden {
    display: none;
  }

  .role-estudiante .student-groups-footer {
    display: flex;
    justify-content: center;
    margin-top: 0.35rem;
  }

  .role-profesor .teacher-dashboard-header {
    display: none;
  }

  .role-profesor .teacher-dashboard-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .role-profesor .teacher-mobile-hero {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: var(--card-pad);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
  }

  .role-profesor .teacher-mobile-hero .avatar-perfil-lg {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .role-profesor .teacher-mobile-hero h2 {
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .role-profesor .teacher-welcome {
    font-size: 0.85rem;
    color: var(--text-muted);
  }

  .role-profesor .teacher-mobile-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .role-profesor .teacher-mobile-section .section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0;
    padding-inline: 0.8rem;
  }

  .role-profesor .teacher-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .role-profesor .teacher-mobile-tile-wide {
    grid-column: span 2;
  }

  .role-profesor .teacher-mobile-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.8rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    min-height: 128px;
  }

  .role-profesor .teacher-mobile-tile i {
    font-size: 1.25rem;
    color: #1f3148;
  }

  .role-profesor .teacher-mobile-tile span {
    font-weight: 600;
    font-size: 0.9rem;
  }

  .role-profesor .teacher-mobile-tile small {
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  .role-profesor .teacher-section-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .role-profesor .teacher-section-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(145deg, #ffffff 0%, #f2f6fb 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .role-profesor .teacher-section-card:hover,
  .role-profesor .teacher-section-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  }

  .role-profesor .teacher-section-card .btn {
    min-height: 34px;
    white-space: nowrap;
  }

  .role-profesor .teacher-section-action {
    border-color: var(--liquid-border);
    color: #1f3148;
    background: rgba(255, 255, 255, 0.65);
    padding: 0.35rem 0.9rem;
    font-weight: 600;
    box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    transition: transform var(--transition-quick), box-shadow var(--transition-quick), border-color var(--transition-quick);
  }

  .role-profesor .teacher-section-action:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: var(--liquid-border-strong);
    transform: translateY(-1px);
    box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  .role-profesor .teacher-class-card {
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .role-profesor .teacher-class-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
  }

  .role-profesor .teacher-class-title {
    font-weight: 700;
    font-size: 1rem;
  }

  .role-profesor .teacher-class-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
  }

  .role-profesor .teacher-class-time {
    font-size: 0.78rem;
    color: var(--text-muted);
  }

  .role-profesor .teacher-class-eta {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f3148;
    margin-top: 0.2rem;
  }

  .role-profesor .teacher-class-empty {
    text-align: center;
    color: var(--text-muted);
  }
}

@media (max-width: 575.98px) {
  .role-estudiante .student-class-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .role-estudiante .student-class-badge {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .role-estudiante .student-class-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-estudiante .student-group-list.student-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Profesor - Mi clase (desktop) */
.teacher-class-desktop {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.teacher-class-status {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.teacher-class-title {
  font-weight: 700;
}

.teacher-class-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.teacher-class-badge {
  min-width: 170px;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(74,109,144,0.18);
  background: rgba(74,109,144,0.08);
  text-align: center;
}

.teacher-class-badge span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.teacher-class-badge strong {
  font-size: 1rem;
  font-weight: 700;
  color: #1f3148;
}

.teacher-class-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.teacher-class-meta-item {
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.84rem;
}

.teacher-class-meta-item span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.teacher-class-meta-item strong {
  font-weight: 600;
}

/* Horarios (estudiantes y profesores) */
.schedule-shell {
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.schedule-card {
  position: relative;
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 1rem;
  animation: schedule-rise 0.45s ease both;
}

.schedule-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.schedule-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0;
}

.schedule-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.25rem 0 0;
}

.schedule-legend {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  color: #475569;
}

.schedule-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.schedule-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.schedule-dot.is-class {
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 0 0 1px #cbd5e1;
}

.schedule-dot.is-empty {
  background: #e2e8f0;
}

.schedule-scroll {
  position: relative;
}

.schedule-table {
  border-collapse: separate;
  border-spacing: 0 0.35rem;
  table-layout: fixed;
  width: 100%;
}

.schedule-table thead th {
  background: transparent;
  border: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  padding: 0.35rem 0.4rem;
}

.schedule-table thead th span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  min-height: 28px;
  color: #0f172a;
}

.schedule-time-head span {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.schedule-table tbody th {
  background: transparent;
  border: 0;
  padding: 0.3rem 0.35rem;
  text-align: left;
  vertical-align: middle;
}

.schedule-table tbody th,
.schedule-table tbody td {
  height: 72px;
}

.schedule-time-block {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.55rem;
  border-radius: 18px;
  background:
    radial-gradient(140% 120% at 22% 12%, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(155deg, rgba(252, 254, 255, 0.94) 0%, rgba(236, 245, 252, 0.86) 100%);
  color: #0f172a;
  border: 1px solid rgba(203, 213, 225, 0.72);
  width: 100%;
  min-height: 54px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.schedule-time-block::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.schedule-lesson {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: inherit;
  text-transform: uppercase;
  line-height: 1.1;
}

.schedule-range {
  display: block;
  font-size: 0.6rem;
  color: #64748b;
  letter-spacing: 0.02em;
}

.schedule-table tbody td {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0.3rem 0.35rem;
}

.schedule-table thead th,
.schedule-table tbody th,
.schedule-table tbody td {
  width: 16.66%;
}

.schedule-slot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 54px;
  padding: 0.45rem 0.5rem;
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background:
    radial-gradient(160% 125% at 22% 10%, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(150deg, rgba(252, 254, 255, 0.95) 0%, rgba(236, 245, 252, 0.86) 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
  transition: transform var(--motion-medium), box-shadow var(--motion-medium), border-color var(--motion-medium), background var(--motion-medium);
  height: 100%;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.schedule-slot::before,
.schedule-day-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(100% 100% at 24% 0%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.schedule-slot > *,
.schedule-day-item > * {
  position: relative;
  z-index: 1;
}

.schedule-slot.has-class {
  background:
    radial-gradient(155% 120% at 20% 8%, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(145deg, rgba(252, 254, 255, 0.9) 0%, var(--schedule-bg, rgba(226, 232, 240, 0.62)) 100%);
  border-color: var(--schedule-border, rgba(148, 163, 184, 0.35));
}

.schedule-slot.has-class:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.schedule-slot.is-empty {
  background:
    radial-gradient(135% 110% at 20% 8%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 64%),
    linear-gradient(150deg, rgba(250, 252, 255, 0.92) 0%, rgba(238, 244, 250, 0.82) 100%);
  color: #94a3b8;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.schedule-main {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.82rem;
}

.schedule-sub {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.schedule-teacher {
  font-size: 0.68rem;
  color: #475569;
  letter-spacing: 0.01em;
}

.schedule-action {
  align-self: center;
  font-size: 0.68rem;
  padding: 0.2rem 0.68rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.52) !important;
  color: #1f3148 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

.schedule-action::before,
.schedule-action::after {
  content: none !important;
}

.schedule-action:hover,
.schedule-action:focus-visible {
  background: linear-gradient(180deg, #ffffff 0%, #e8f1fa 100%) !important;
  border-color: rgba(100, 116, 139, 0.54) !important;
  color: #0f4c5c !important;
  transform: translateY(-1px);
}

.schedule-time-break {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.2);
  color: #9a3412;
}

.schedule-break-slot {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.2);
  color: #9a3412;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.schedule-mobile {
  display: none;
  margin-top: 0.75rem;
}

.schedule-tab-input {
  display: none;
}

.schedule-tab-labels {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.schedule-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.schedule-tab-panels {
  margin-top: 0.6rem;
}

.schedule-day-panel {
  display: none;
}

.schedule-day-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.schedule-day-list {
  display: grid;
  gap: 0.5rem;
}

.schedule-day-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background:
    radial-gradient(150% 120% at 22% 10%, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(150deg, rgba(252, 254, 255, 0.95) 0%, rgba(236, 245, 252, 0.86) 100%);
  padding: 0.55rem 0.65rem;
  text-align: center;
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  min-height: 64px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transition: transform var(--motion-medium), box-shadow var(--motion-medium), border-color var(--motion-medium), background var(--motion-medium);
}

.schedule-day-item.has-class {
  background:
    radial-gradient(155% 120% at 20% 8%, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(145deg, rgba(252, 254, 255, 0.9) 0%, var(--schedule-bg, rgba(226, 232, 240, 0.62)) 100%);
  border-color: var(--schedule-border, rgba(148, 163, 184, 0.35));
}

.schedule-day-item.has-class:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.schedule-day-time {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f172a;
}

.schedule-day-main {
  font-weight: 700;
  font-size: 0.82rem;
  color: #0f172a;
}

.schedule-day-sub {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.schedule-day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  align-items: center;
  justify-content: center;
}

.schedule-day-prof {
  font-size: 0.68rem;
  color: #475569;
  text-transform: none;
  letter-spacing: 0.01em;
}

.schedule-day-item.is-break {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.2);
  color: #9a3412;
  font-weight: 700;
  text-transform: uppercase;
}

.schedule-day-item.is-free {
  background:
    radial-gradient(135% 110% at 20% 8%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 64%),
    linear-gradient(150deg, rgba(250, 252, 255, 0.92) 0%, rgba(238, 244, 250, 0.82) 100%);
  border: 1px dashed #e2e8f0;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.schedule-day-empty {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 0.6rem 0.8rem;
  border-radius: 18px;
  border: 1px dashed rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.6);
}

#schedule-student-lunes:checked ~ .schedule-tab-labels label[for="schedule-student-lunes"],
#schedule-teacher-lunes:checked ~ .schedule-tab-labels label[for="schedule-teacher-lunes"] {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#schedule-student-martes:checked ~ .schedule-tab-labels label[for="schedule-student-martes"],
#schedule-teacher-martes:checked ~ .schedule-tab-labels label[for="schedule-teacher-martes"] {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#schedule-student-miercoles:checked ~ .schedule-tab-labels label[for="schedule-student-miercoles"],
#schedule-teacher-miercoles:checked ~ .schedule-tab-labels label[for="schedule-teacher-miercoles"] {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#schedule-student-jueves:checked ~ .schedule-tab-labels label[for="schedule-student-jueves"],
#schedule-teacher-jueves:checked ~ .schedule-tab-labels label[for="schedule-teacher-jueves"] {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#schedule-student-viernes:checked ~ .schedule-tab-labels label[for="schedule-student-viernes"],
#schedule-teacher-viernes:checked ~ .schedule-tab-labels label[for="schedule-teacher-viernes"] {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#schedule-student-lunes:checked ~ .schedule-tab-panels .panel-lunes,
#schedule-teacher-lunes:checked ~ .schedule-tab-panels .panel-lunes {
  display: block;
}

#schedule-student-martes:checked ~ .schedule-tab-panels .panel-martes,
#schedule-teacher-martes:checked ~ .schedule-tab-panels .panel-martes {
  display: block;
}

#schedule-student-miercoles:checked ~ .schedule-tab-panels .panel-miercoles,
#schedule-teacher-miercoles:checked ~ .schedule-tab-panels .panel-miercoles {
  display: block;
}

#schedule-student-jueves:checked ~ .schedule-tab-panels .panel-jueves,
#schedule-teacher-jueves:checked ~ .schedule-tab-panels .panel-jueves {
  display: block;
}

#schedule-student-viernes:checked ~ .schedule-tab-panels .panel-viernes,
#schedule-teacher-viernes:checked ~ .schedule-tab-panels .panel-viernes {
  display: block;
}

@media (max-width: 768px) {
  .schedule-head {
    align-items: flex-start;
  }

  .schedule-desktop {
    display: none;
  }

  .schedule-mobile {
    display: block;
  }
}

@keyframes schedule-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Liquid glass system */
.glass-surface,
.card,
.card-soft,
.hero-card,
.schedule-card,
:is(.role-profesor, .role-estudiante) .teacher-welcome,
.role-profesor .teacher-mobile-hero,
.role-profesor .teacher-mobile-tile,
.role-estudiante .student-mobile-hero,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel-wide,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-tile,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-hero,
.role-estudiante .student-summary-card,
.role-estudiante .student-summary-mini,
.role-estudiante .student-class-card,
.role-estudiante .student-mobile-tile,
.role-estudiante .student-group-card,
.role-profesor .teacher-section-card,
.role-profesor .teacher-class-card,
.role-profesor .teacher-schedule,
.role-estudiante .teacher-schedule {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--glass);
  background-image:
    radial-gradient(220px 140px at var(--glass-x) var(--glass-y), var(--glass-sheen-strong), rgba(255, 255, 255, 0) 65%),
    radial-gradient(320px 220px at calc(var(--glass-x) + 12%) calc(var(--glass-y) + 18%), var(--glass-sheen), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, var(--glass-tint), rgba(255, 255, 255, 0));
  background-blend-mode: screen;
  background-size: 220% 220%, 260% 260%, 100% 100%;
  background-position: 0% 0%, 100% 0%, 0 0;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* Liquid glass shimmer layer */
.glass-surface::before,
.card::before,
.card-soft::before,
.hero-card::before,
.schedule-card::before,
:is(.role-profesor, .role-estudiante) .teacher-welcome::before,
.role-profesor .teacher-mobile-hero::before,
.role-profesor .teacher-mobile-tile::before,
.role-estudiante .student-mobile-hero::before,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel::before,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel-wide::before,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-tile::before,
:is(.role-profesor, .role-estudiante) .admin-hero::before,
.role-estudiante .student-summary-card::before,
.role-estudiante .student-summary-mini::before,
.role-estudiante .student-class-card::before,
.role-estudiante .student-mobile-tile::before,
.role-estudiante .student-group-card::before,
.role-profesor .teacher-section-card::before,
.role-profesor .teacher-class-card::before,
.role-profesor .teacher-schedule::before,
.role-estudiante .teacher-schedule::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background-image: var(--liquid-sheen), var(--liquid-caustic), var(--liquid-noise);
  background-size: 200% 200%, 240% 240%, 160px 160px;
  background-position: 0% 0%, 100% 0%, 0 0;
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: liquid-shimmer 24s ease-in-out infinite;
}

/* Liquid glass cards motion */
.glass-card,
.card,
.card-soft,
.hero-card,
.schedule-card,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel-wide,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-tile,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-hero,
.role-estudiante .student-summary-card,
.role-estudiante .student-summary-mini,
.role-estudiante .student-class-card,
.role-estudiante .student-mobile-tile,
.role-estudiante .student-group-card,
.role-profesor .teacher-mobile-tile,
.role-profesor .teacher-class-card,
.role-profesor .teacher-section-card,
.role-profesor .teacher-schedule,
.role-estudiante .teacher-schedule {
  transition: transform var(--transition-quick), box-shadow var(--transition-quick), border-color var(--transition-quick);
  will-change: transform;
}

.glass-card:hover,
.card:hover,
.card-soft:hover,
.hero-card:hover,
.schedule-card:hover,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel:hover,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-panel-wide:hover,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-tile:hover,
:is(.role-admin, .role-profesor, .role-estudiante) .admin-hero:hover,
.role-estudiante .student-summary-card:hover,
.role-estudiante .student-summary-mini:hover,
.role-estudiante .student-class-card:hover,
.role-estudiante .student-mobile-tile:hover,
.role-estudiante .student-group-card:hover,
.role-profesor .teacher-mobile-tile:hover,
.role-profesor .teacher-class-card:hover,
.role-profesor .teacher-section-card:hover,
.role-profesor .teacher-schedule:hover,
.role-estudiante .teacher-schedule:hover {
  transform: translateY(-1px);
  box-shadow: var(--liquid-shadow), var(--glass-highlight);
  border-color: var(--liquid-border-strong);
}

/* Coherencia visual panel estudiante */
.role-estudiante .student-mobile-tile,
.role-estudiante .student-summary-card,
.role-estudiante .student-summary-mini,
.role-estudiante .student-group-card,
.role-estudiante .student-class-card {
  border-radius: 20px;
  padding: 0.8rem 0.9rem;
  gap: 0.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  will-change: transform;
  cursor: pointer;
}

.role-estudiante .student-mobile-tile,
.role-estudiante .student-summary-card,
.role-estudiante .student-summary-mini {
  min-height: 96px;
}

/* Hover unificado (igual a Mis materias) */
.role-estudiante .student-group-card:hover,
.role-estudiante .student-summary-card:hover,
.role-estudiante .student-summary-mini:hover,
.role-estudiante .student-mobile-tile:hover,
.role-estudiante .student-class-card:hover,
.role-estudiante .student-summary-stack .student-summary-card:focus-within,
.role-estudiante .student-summary-stack .student-summary-mini:focus-within {
  transform: translateY(-2px) !important;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14), var(--glass-highlight) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

.floating-card {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1080;
  width: min(92vw, 420px);
  max-width: 420px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--liquid-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--liquid-shadow);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease;
}

.floating-card.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.floating-card .floating-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f3148;
  margin-bottom: 2px;
}

.floating-card .floating-card-body {
  font-size: 0.85rem;
  color: #1f3148;
}

.floating-card .btn-close {
  margin-left: auto;
  margin-top: 2px;
}

.floating-card--warning {
  border-color: #f1c078;
}

.floating-card--danger {
  border-color: #ee9a9a;
}

.floating-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.floating-card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1075;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.floating-card-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Liquid glass full-system polish */
:root {
  --liquid-accent: #4a6d90;
  --liquid-accent-strong: #2f587f;
  --liquid-danger: #db5c7d;
  --liquid-warning: #ba893d;
  --liquid-success: #468c74;
}

.card.border-0 {
  border: 1px solid var(--glass-border) !important;
}

.card.shadow-sm,
.shadow-sm {
  box-shadow: var(--liquid-shadow-soft) !important;
}

.btn-primary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-danger,
.btn-secondary,
.btn-light {
  border-radius: 999px;
  border-color: var(--liquid-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(232, 244, 236, 0.58) 100%);
  color: #1f3148;
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
}

.btn-primary {
  background:
    radial-gradient(140% 180% at 28% 8%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(132deg, rgba(76, 119, 160, 0.92) 0%, rgba(80, 146, 131, 0.88) 54%, rgba(132, 186, 161, 0.86) 100%);
  color: #f8fbff;
  border-color: rgba(255, 255, 255, 0.62);
  text-shadow: 0 1px 0 rgba(23, 32, 58, 0.24);
}

.btn-primary:hover,
.btn-primary:focus {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.76);
  filter: saturate(108%) brightness(1.02);
}

.btn-outline-primary {
  color: #315b86;
}

.btn-outline-secondary,
.btn-light {
  color: #33405d;
}

.btn-outline-dark {
  color: #25314d;
}

.btn-outline-danger {
  color: #89314a;
  border-color: rgba(235, 154, 177, 0.55);
  background:
    radial-gradient(140% 180% at 28% 8%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(136deg, rgba(252, 229, 237, 0.76) 0%, rgba(245, 204, 219, 0.58) 100%);
}

.btn-secondary {
  color: #2f3f5d;
  border-color: rgba(155, 172, 210, 0.5);
}

.btn-close {
  opacity: 0.72;
  transition: opacity var(--transition-quick), transform var(--transition-quick);
}

.btn-close:hover {
  opacity: 1;
  transform: scale(1.05);
}

.alert {
  border-radius: 18px;
  border: 1px solid var(--liquid-border);
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  color: #1f2940;
}

.alert-primary {
  background: linear-gradient(140deg, rgba(219, 236, 247, 0.88), rgba(209, 233, 221, 0.68));
}

.alert-secondary {
  background: linear-gradient(140deg, rgba(239, 245, 240, 0.88), rgba(226, 237, 231, 0.7));
}

.alert-success {
  background: linear-gradient(140deg, rgba(210, 245, 236, 0.9), rgba(185, 233, 215, 0.7));
}

.alert-warning {
  background: linear-gradient(140deg, rgba(255, 237, 202, 0.9), rgba(252, 217, 164, 0.72));
}

.alert-danger {
  background: linear-gradient(140deg, rgba(255, 220, 230, 0.9), rgba(252, 192, 209, 0.72));
}

.alert-info {
  background: linear-gradient(140deg, rgba(212, 236, 255, 0.9), rgba(188, 220, 247, 0.72));
}

.accordion-item {
  border: 1px solid var(--liquid-border);
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.accordion-item + .accordion-item {
  margin-top: 0.75rem;
}

.accordion-button {
  background:
    radial-gradient(220px 130px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 66%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.66), rgba(223, 232, 255, 0.5));
  border-bottom: 1px solid rgba(255, 255, 255, 0.44);
  color: #1f2e4a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.accordion-button:not(.collapsed) {
  background:
    radial-gradient(220px 130px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 68%),
    linear-gradient(160deg, rgba(234, 241, 255, 0.78), rgba(220, 230, 255, 0.64));
  color: #142745;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.17rem rgba(74, 109, 144, 0.2);
}

.dropdown-menu {
  border-radius: 16px;
  border: 1px solid var(--liquid-border);
  padding: 0.45rem;
  background:
    radial-gradient(220px 130px at 20% 0%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, rgba(241, 246, 255, 0.92), rgba(228, 236, 255, 0.86));
  box-shadow: 0 20px 44px rgba(14, 24, 51, 0.2);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.dropdown-item {
  border-radius: 10px;
  color: #243555;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  background: rgba(74, 109, 144, 0.14);
  color: #1f3148;
}

/* Softer modal backdrop (Bootstrap default is too dark for this UI). */
.modal-backdrop {
  --bs-backdrop-bg: #0b1620;
  --bs-backdrop-opacity: 0.24;
}

.modal-backdrop.show {
  background:
    radial-gradient(920px 520px at 16% 12%, rgba(174, 221, 204, 0.22), rgba(0, 0, 0, 0) 62%),
    radial-gradient(880px 500px at 86% 18%, rgba(205, 228, 255, 0.2), rgba(0, 0, 0, 0) 60%),
    rgba(11, 22, 32, 0.28);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.carnet-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1090;
  pointer-events: none; /* allow page scroll/click outside the panel */
  opacity: 0;
  transition: opacity 160ms ease;
  background:
    radial-gradient(900px 520px at 20% 10%, rgba(74, 109, 144, 0.16), rgba(0, 0, 0, 0) 62%),
    radial-gradient(760px 440px at 84% 26%, rgba(108, 140, 120, 0.12), rgba(0, 0, 0, 0) 62%),
    rgba(11, 22, 32, 0.42);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.carnet-overlay::before {
  content: none;
}

.carnet-overlay.show {
  opacity: 1;
}

.carnet-overlay-panel {
  pointer-events: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(520px, calc(100vw - 28px));
  max-height: min(90vh, 920px);
  border-radius: 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  transition: transform 160ms ease, opacity 160ms ease;
  will-change: transform, opacity;
  opacity: 0;
}

.carnet-overlay.show .carnet-overlay-panel {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.carnet-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px 6px 6px;
  border-bottom: 0;
}

.carnet-overlay-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: #1f3148;
  margin: 0;
}

.carnet-overlay-body {
  padding: 0;
  background: transparent;
}

.carnet-overlay iframe.carnet-iframe {
  height: min(74vh, 720px);
}

@media (max-width: 575.98px) {
  .carnet-overlay-panel {
    width: calc(100vw - 18px);
    max-height: 88vh;
  }
  .carnet-overlay iframe.carnet-iframe {
    height: 78vh;
  }
}

.modal-content {
  border-radius: 22px;
  border: 1px solid var(--liquid-border);
  background:
    radial-gradient(220px 130px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 68%),
    linear-gradient(165deg, rgba(237, 244, 255, 0.86), rgba(224, 234, 255, 0.78));
  box-shadow: 0 30px 70px rgba(14, 22, 44, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.modal-header,
.modal-footer {
  border-color: rgba(255, 255, 255, 0.42);
}

.nav-tabs {
  border-bottom: 0;
  gap: 0.45rem;
}

.nav-tabs .nav-link {
  border-radius: 999px;
  border: 1px solid var(--liquid-border);
  color: #334566;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.75), rgba(230, 238, 255, 0.52));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.nav-tabs .nav-link:hover {
  border-color: var(--liquid-border-strong);
  color: #233451;
}

.nav-tabs .nav-link.active {
  border-color: rgba(105, 152, 128, 0.42);
  color: #1f3148;
  background:
    radial-gradient(170px 90px at 50% 0%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 62%),
    linear-gradient(150deg, rgba(230, 241, 237, 0.8), rgba(214, 233, 224, 0.66));
}

.pagination {
  gap: 0.35rem;
}

.page-link {
  border-radius: 12px;
  border: 1px solid var(--liquid-border);
  color: #32496f;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.74), rgba(229, 236, 255, 0.54));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.page-link:hover {
  color: #1d345f;
  border-color: var(--liquid-border-strong);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.84), rgba(214, 225, 255, 0.64));
}

.page-item.active .page-link {
  border-color: rgba(255, 255, 255, 0.66);
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(22, 31, 56, 0.3);
  background:
    radial-gradient(160px 100px at 32% 6%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 56%),
    linear-gradient(132deg, rgba(74, 109, 144, 0.94), rgba(87, 147, 128, 0.9));
}

.badge {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(226, 236, 255, 0.6));
  color: #2d426b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.badge.bg-success {
  background: linear-gradient(140deg, rgba(183, 238, 217, 0.85), rgba(149, 221, 194, 0.74)) !important;
  color: #1e654f !important;
}

.badge.bg-danger {
  background: linear-gradient(140deg, rgba(255, 212, 225, 0.88), rgba(245, 173, 194, 0.76)) !important;
  color: #7a2a43 !important;
}

.badge.bg-warning {
  background: linear-gradient(140deg, rgba(255, 235, 195, 0.92), rgba(249, 210, 145, 0.8)) !important;
  color: #7a541f !important;
}

.badge.bg-secondary {
  background: linear-gradient(140deg, rgba(231, 236, 250, 0.9), rgba(210, 220, 243, 0.76)) !important;
  color: #3e4f71 !important;
}

.list-group {
  gap: 0.5rem;
}

.list-group-item {
  border-radius: 14px !important;
  border: 1px solid var(--liquid-border);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.76), rgba(229, 237, 255, 0.56));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.table tbody tr:hover td {
  border-color: var(--liquid-border-strong);
  filter: brightness(1.01);
}

.input-group-text {
  border-color: var(--liquid-border);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.8), rgba(228, 236, 255, 0.58));
  color: #314569;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.form-check-input {
  border: 1px solid var(--liquid-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), var(--liquid-shadow-soft);
  background-color: rgba(255, 255, 255, 0.64);
}

.form-check-input:focus {
  border-color: rgba(74, 109, 144, 0.64);
  box-shadow: 0 0 0 0.15rem rgba(74, 109, 144, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.form-check-input:checked {
  background-color: rgba(74, 109, 144, 0.66);
  border-color: rgba(74, 109, 144, 0.62);
}

.form-switch .form-check-input {
  width: 2.8rem;
  height: 1.55rem;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.58);
  background-color: rgba(220, 226, 245, 0.72);
  background-image:
    radial-gradient(circle at 28% 50%, rgba(255, 255, 255, 0.96) 0 40%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(199, 208, 237, 0.62));
  background-size: 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.44), 0 6px 16px rgba(15, 23, 42, 0.16);
}

.form-switch .form-check-input:checked {
  border-color: rgba(255, 255, 255, 0.72);
  background-color: rgba(74, 109, 144, 0.72);
  background-image:
    radial-gradient(circle at 72% 50%, rgba(255, 255, 255, 0.98) 0 40%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(145deg, rgba(74, 109, 144, 0.95), rgba(87, 147, 128, 0.88));
}

.traslado-confirm-check .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(37, 99, 235, 0.8);
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16);
}

.traslado-confirm-check .form-check-input:checked {
  background-color: rgba(37, 99, 235, 0.94);
  border-color: rgba(29, 78, 216, 0.92);
}

.traslado-confirm-check .form-check-label {
  color: #1f2f47 !important;
}

.navbar-toggler {
  border-radius: 999px;
  border: 1px solid var(--liquid-border);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.76), rgba(228, 237, 255, 0.56));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

/* Reusable liquid elements */
.liquid-icon-square {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background:
    radial-gradient(160px 110px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 68%),
    linear-gradient(165deg, rgba(236, 243, 255, 0.86), rgba(217, 227, 253, 0.76));
  border: 1px solid var(--liquid-border-strong);
  box-shadow: 0 26px 46px rgba(18, 26, 52, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.liquid-panel {
  position: relative;
  border-radius: 28px;
  border: 1px solid var(--liquid-border-strong);
  background:
    radial-gradient(180px 120px at 20% 0%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 72%),
    linear-gradient(165deg, rgba(238, 245, 255, 0.64), rgba(221, 230, 255, 0.5));
  box-shadow: 0 28px 60px rgba(12, 21, 46, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.liquid-toggle {
  --toggle-w: 120px;
  --toggle-h: 58px;
  position: relative;
  width: var(--toggle-w);
  height: var(--toggle-h);
  border-radius: 999px;
  border: 1px solid var(--liquid-border-strong);
  background:
    radial-gradient(170px 90px at 30% 0%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 70%),
    linear-gradient(155deg, rgba(236, 245, 255, 0.72), rgba(212, 223, 255, 0.6));
  box-shadow: 0 20px 40px rgba(16, 28, 55, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.liquid-toggle::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(var(--toggle-h) - 8px);
  height: calc(var(--toggle-h) - 8px);
  border-radius: 50%;
  background:
    radial-gradient(110% 110% at 28% 22%, rgba(255, 255, 255, 0.95), rgba(232, 241, 255, 0.72) 55%, rgba(195, 208, 235, 0.65) 100%);
  box-shadow: 0 12px 24px rgba(21, 33, 61, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transition: transform var(--transition-smooth);
}

.liquid-toggle.is-on::before {
  transform: translateX(calc(var(--toggle-w) - var(--toggle-h)));
}

@media (max-width: 991.98px) {
  :is(.role-admin, .role-profesor, .role-estudiante, .role-director) .app-main {
    padding-bottom: 7.4rem;
  }

  .bottom-nav,
  .bottom-nav-admin {
    left: 50%;
    right: auto;
    width: min(94vw, 640px);
    bottom: 0.65rem;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 1px solid var(--liquid-border);
    padding: 0.38rem 0.5rem calc(0.38rem + env(safe-area-inset-bottom));
    background:
      radial-gradient(240px 150px at 50% 0%, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 66%),
      linear-gradient(160deg, rgba(248, 252, 249, 0.74), rgba(228, 243, 234, 0.62));
    box-shadow: 0 24px 52px rgba(13, 22, 44, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px) saturate(165%);
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    gap: 0.22rem;
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
  }

  .bottom-nav.scroll-hidden,
  .bottom-nav-admin.scroll-hidden {
    transform: translateX(-50%) translateY(calc(100% + 1.1rem));
    opacity: 0;
    pointer-events: none;
  }

  .bottom-nav a,
  .bottom-nav-admin a {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    position: relative;
    padding: 0.42rem 0.3rem;
    border: 1px solid transparent;
  }

  .bottom-nav a.active,
  .bottom-nav-admin a.active {
    border-color: rgba(255, 255, 255, 0.72);
    background:
      radial-gradient(170px 90px at 50% 0%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 66%),
      linear-gradient(150deg, rgba(251, 253, 252, 0.9), rgba(230, 244, 236, 0.7));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 10px 22px rgba(18, 28, 52, 0.2);
    color: #1d2f57;
  }

  .bottom-nav a.active::before,
  .bottom-nav-admin a.active::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
  }

  .bottom-nav a i,
  .bottom-nav-admin a i {
    font-size: 1.18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav,
  .bottom-nav-admin {
    transition: none !important;
  }
}

/* Apple Liquid Glass alignment (WWDC25 principles) */
:root {
  --lg-radius-xl: 28px;
  --lg-radius-lg: 22px;
  --lg-radius-md: 16px;
  --lg-radius-sm: 12px;
  --lg-radius-pill: 999px;
  --lg-regular-start: rgba(255, 255, 255, 0.78);
  --lg-regular-end: rgba(232, 245, 237, 0.56);
  --lg-regular-border: rgba(255, 255, 255, 0.58);
  --lg-regular-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  --lg-clear-start: rgba(255, 255, 255, 0.56);
  --lg-clear-end: rgba(255, 255, 255, 0.22);
  --lg-clear-dimming: linear-gradient(180deg, rgba(24, 33, 42, 0.16), rgba(24, 33, 42, 0.12));
}

/* Use Liquid Glass mainly as interactive/navigation layer */
.navbar-clean,
.bottom-nav,
.bottom-nav-admin,
.teacher-sidebar,
.teacher-mobile-header,
.user-chip,
.btn:not(.btn-link),
.form-control,
.form-select,
.input-group-text,
.accordion-button,
.dropdown-menu,
.modal-content,
.page-link,
.nav-tabs .nav-link,
.floating-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(220px 140px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 66%),
    linear-gradient(160deg, var(--lg-regular-start), var(--lg-regular-end));
  border-color: var(--lg-regular-border);
  box-shadow: var(--lg-regular-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}

/* Keep mobile dock fixed; this prevents it from falling to page bottom in flow */
.bottom-nav,
.bottom-nav-admin {
  position: fixed;
}

.navbar-clean,
.bottom-nav,
.bottom-nav-admin,
.btn,
.user-chip,
.page-link,
.nav-tabs .nav-link {
  border-radius: var(--lg-radius-pill);
}

.card,
.card-soft,
.hero-card,
.schedule-card,
.floating-card,
.modal-content,
.accordion-item,
.dropdown-menu {
  border-radius: var(--lg-radius-lg);
}

.form-control,
.form-select,
.input-group-text {
  border-radius: var(--lg-radius-md);
}

/* Scroll-edge separation (subtle, not decorative) */
.navbar-clean::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background: linear-gradient(180deg, rgba(225, 239, 231, 0.52), rgba(225, 239, 231, 0));
  pointer-events: none;
}

.bottom-nav::before,
.bottom-nav-admin::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: -8px;
  height: 8px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(225, 239, 231, 0.5), rgba(225, 239, 231, 0));
  pointer-events: none;
}

/* Keep content layer cleaner to avoid glass-on-glass clutter */
.table:not(.schedule-table) thead th,
.list-group-item,
.accordion-body,
.table-responsive-mobile {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

.table:not(.schedule-table) thead th {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.card .card,
.card .card-soft,
.card-soft .card,
.card-soft .card-soft {
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

/* Interactive response: subtle scale + inner glow */
.liquid-interactive {
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.12s linear;
  transform-origin: center;
  will-change: auto;
}

.liquid-interactive:hover {
  transform: translate3d(0, -1px, 0);
}

.liquid-interactive:active,
.liquid-interactive.is-pressed {
  transform: scale(0.992);
}

/* Clear variant: only for media-rich backgrounds with dimming support */
.liquid-clear {
  background:
    radial-gradient(220px 140px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 66%),
    linear-gradient(160deg, var(--lg-clear-start), var(--lg-clear-end)) !important;
  border-color: rgba(255, 255, 255, 0.62) !important;
}

.liquid-clear::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--lg-clear-dimming);
  pointer-events: none;
  opacity: 0.28;
}

/* Accessibility: increase opacity when contrast is requested */
@media (prefers-contrast: more) {
  .navbar-clean,
  .bottom-nav,
  .bottom-nav-admin,
  .teacher-sidebar,
  .teacher-mobile-header,
  .user-chip,
  .btn:not(.btn-link),
  .form-control,
  .form-select,
  .input-group-text,
  .accordion-button,
  .dropdown-menu,
  .modal-content,
  .page-link,
  .nav-tabs .nav-link {
    background:
      radial-gradient(220px 140px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 66%),
      linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(236, 245, 240, 0.84));
    border-color: rgba(255, 255, 255, 0.76);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }
}

/* Motion polish: performance-first for smoother hover */
:root {
  --motion-ease-fluid: cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-fast: 120ms;
  --motion-mid: 180ms;
}

:is(
  .glass-card,
  .card,
  .card-soft,
  .hero-card,
  .schedule-card,
  .admin-panel,
  .admin-panel-wide,
  .admin-tile,
  .admin-hero,
  .teacher-welcome,
  .teacher-mobile-hero,
  .teacher-mobile-tile,
  .student-mobile-hero,
  .student-summary-card,
  .student-summary-mini,
  .student-class-card,
  .student-mobile-tile,
  .student-group-card,
  .teacher-section-card,
  .teacher-class-card,
  .teacher-schedule,
  .liquid-interactive,
  .btn:not(.btn-link),
  .page-link,
  .nav-tabs .nav-link,
  .dropdown-item
) {
  backface-visibility: hidden;
  transform: translateZ(0);
  transition-property: transform, opacity !important;
  transition-duration: var(--motion-mid), var(--motion-fast) !important;
  transition-timing-function: var(--motion-ease-fluid), linear !important;
  will-change: auto;
}

/* Keep shimmer disabled to avoid extra paint work */
:is(
  .glass-surface,
  .card,
  .card-soft,
  .hero-card,
  .schedule-card,
  .admin-panel,
  .admin-panel-wide,
  .admin-tile,
  .admin-hero,
  .teacher-welcome,
  .teacher-mobile-hero,
  .teacher-mobile-tile,
  .student-mobile-hero,
  .student-summary-card,
  .student-summary-mini,
  .student-class-card,
  .student-mobile-tile,
  .student-group-card,
  .teacher-section-card,
  .teacher-class-card,
  .teacher-schedule
)::before {
  animation: none !important;
  opacity: 0.18;
}

@media (hover: hover) and (pointer: fine) {
  :is(
    .glass-card,
    .card,
    .card-soft,
    .hero-card,
    .schedule-card,
    .admin-panel,
    .admin-panel-wide,
    .admin-tile,
    .admin-hero,
    .teacher-welcome,
    .teacher-mobile-hero,
    .teacher-mobile-tile,
    .student-mobile-hero,
    .student-summary-card,
    .student-summary-mini,
    .student-class-card,
    .student-mobile-tile,
    .student-group-card,
    .teacher-section-card,
    .teacher-class-card,
    .teacher-schedule,
    .liquid-interactive,
    .btn:not(.btn-link),
    .page-link,
    .nav-tabs .nav-link
  ) {
    will-change: transform;
  }

  :is(
    .glass-card:hover,
    .card:hover,
    .card-soft:hover,
    .hero-card:hover,
    .schedule-card:hover,
    .admin-panel:hover,
    .admin-panel-wide:hover,
    .admin-tile:hover,
    .admin-hero:hover,
    .teacher-welcome:hover,
    .teacher-mobile-hero:hover,
    .teacher-mobile-tile:hover,
    .student-mobile-hero:hover,
    .student-summary-card:hover,
    .student-summary-mini:hover,
    .student-class-card:hover,
    .student-mobile-tile:hover,
    .student-group-card:hover,
    .teacher-section-card:hover,
    .teacher-class-card:hover,
    .teacher-schedule:hover,
    .liquid-interactive:hover,
    .btn:not(.btn-link):hover,
    .page-link:hover,
    .nav-tabs .nav-link:hover
  ) {
    transform: translate3d(0, -1px, 0);
  }
}

@media (hover: none), (pointer: coarse) {
  :is(
    .glass-card:hover,
    .card:hover,
    .card-soft:hover,
    .hero-card:hover,
    .schedule-card:hover,
    .admin-panel:hover,
    .admin-panel-wide:hover,
    .admin-tile:hover,
    .admin-hero:hover,
    .teacher-welcome:hover,
    .teacher-mobile-hero:hover,
    .teacher-mobile-tile:hover,
    .student-mobile-hero:hover,
    .student-summary-card:hover,
    .student-summary-mini:hover,
    .student-class-card:hover,
    .student-mobile-tile:hover,
    .student-group-card:hover,
    .teacher-section-card:hover,
    .teacher-class-card:hover,
    .teacher-schedule:hover,
    .liquid-interactive:hover
  ) {
    transform: none !important;
  }
}

/* Student mobile fixes: overflow + compact layout */
.role-estudiante .teacher-section-card > div {
  min-width: 0;
}

.role-estudiante .teacher-section-card strong,
.role-estudiante .student-summary-mini-title,
.role-estudiante .student-summary-mini-sub {
  overflow-wrap: normal;
  word-break: normal;
}

.role-estudiante .student-groups-toggle {
  min-width: 9rem;
}

@media (max-width: 991.98px) {
  .role-estudiante .student-dashboard-mobile .teacher-welcome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  .role-estudiante .student-dashboard-mobile .teacher-welcome .avatar-perfil-lg {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    margin: 0;
  }

  .role-estudiante .student-dashboard-mobile .teacher-welcome .teacher-welcome-body {
    flex: 1 1 calc(100% - 72px);
    min-width: 0;
  }

  .role-estudiante .student-dashboard-mobile .student-mobile-hero-actions {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 0.45rem;
    gap: 0.6rem !important;
  }

  .role-estudiante .admin-panel-header {
    flex-wrap: wrap;
  }

  .role-estudiante .admin-panel-header .admin-panel-link {
    margin-left: 0;
  }

  .role-estudiante .student-mobile-hero-actions {
    width: 100%;
  }

  .role-estudiante .student-mobile-hero-actions .btn {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 7.4rem;
  }

  .role-estudiante .student-dashboard-mobile .student-mobile-hero-actions .btn-main:hover,
  .role-estudiante .student-dashboard-mobile .student-mobile-hero-actions .btn-main:focus-visible,
  .role-estudiante .student-dashboard-mobile .student-mobile-hero-actions .btn-outline-soft:hover,
  .role-estudiante .student-dashboard-mobile .student-mobile-hero-actions .btn-outline-soft:focus-visible,
  .role-estudiante .student-dashboard-mobile .student-mobile-hero-actions .btn-outline-secondary:hover,
  .role-estudiante .student-dashboard-mobile .student-mobile-hero-actions .btn-outline-secondary:focus-visible {
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.36);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(228, 245, 235, 0.66) 100%);
  }
}

@media (max-width: 991.98px) {
  .role-profesor .teacher-welcome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  .role-profesor .teacher-welcome .avatar-perfil-lg {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    margin: 0;
  }

  .role-profesor .teacher-welcome .teacher-welcome-body {
    flex: 1 1 calc(100% - 72px);
    min-width: 0;
  }

  .role-profesor .teacher-mobile-hero-actions {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 0.45rem;
    gap: 0.6rem !important;
  }

  .role-profesor .teacher-mobile-hero-actions .btn {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 7.4rem;
  }

  .role-profesor .teacher-mobile-hero-actions .btn-outline-secondary:hover,
  .role-profesor .teacher-mobile-hero-actions .btn-outline-secondary:focus-visible {
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.36);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(228, 245, 235, 0.66) 100%);
  }

  .role-profesor .teacher-next-class {
    padding: 0.85rem 0.95rem;
  }

  .role-profesor .teacher-next-class .admin-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
  }

  .role-profesor .teacher-next-class .admin-panel-link {
    font-size: 0.75rem;
  }

  .role-profesor .teacher-next-class .teacher-schedule {
    padding: 0.7rem 0.8rem;
    gap: 0.6rem;
  }

  .role-profesor .teacher-next-class .teacher-schedule::after {
    display: none;
  }

  .role-profesor .teacher-next-class .teacher-schedule-main {
    gap: 0.2rem;
  }

  .role-profesor .teacher-next-class .teacher-schedule-title,
  .role-profesor .teacher-next-class .teacher-schedule-sub,
  .role-profesor .teacher-next-class .teacher-schedule-time {
    padding-left: 0;
  }

  .role-profesor .teacher-next-class .teacher-schedule-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    align-self: stretch;
    justify-items: stretch;
    align-items: stretch;
  }

  .role-profesor .teacher-next-class .teacher-schedule-eta,
  .role-profesor .teacher-next-class .teacher-schedule-link {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .role-profesor .teacher-next-class .teacher-schedule-eta {
    gap: 0.35rem;
    padding: 0.45rem 0.6rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: rgba(15, 118, 110, 0.08);
    box-shadow: none;
  }

  .role-profesor .teacher-next-class .teacher-schedule-eta span {
    margin: 0;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: #5c6b7c;
  }

  .role-profesor .teacher-next-class .teacher-schedule-eta strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f4c5c;
  }

  .role-profesor .teacher-next-class .teacher-class-meta {
    display: none;
  }
}

@media (min-width: 992px) {
  .navbar-clean {
    margin: 0.75rem var(--page-gutter) 0.55rem;
    border: 1px solid var(--liquid-border);
    border-radius: clamp(24px, 2.2vw, 32px);
    overflow: hidden;
  }
}

@media (max-width: 991.98px) {
  .navbar-clean {
    margin: 0.45rem 0.5rem 0.4rem;
    border: 1px solid var(--liquid-border);
    border-radius: 22px;
    overflow: hidden;
  }
}

@media (max-width: 575.98px) {
  .role-estudiante .student-summary-grid,
  .role-estudiante .student-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* ES: Accesos rápidos (móvil): mantener palabras completas.
     Solución: poner ícono arriba y texto abajo para ganar ancho útil (sin partir palabras).
     EN: Student quick access (mobile): keep whole words.
     Solution: stack icon above text to increase usable width (no word-splitting). */
  .role-estudiante .student-quick-grid .admin-tile {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.8rem 0.85rem;
  }

  .role-estudiante .student-quick-grid .admin-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .role-estudiante .student-quick-grid .admin-tile-body {
    min-width: 0;
    width: 100%;
  }

  .role-estudiante .student-quick-grid .admin-tile-body p {
    font-size: 0.78rem;
  }

  .role-estudiante .student-summary-grid .student-summary-mini {
    min-height: 0;
  }

  .role-estudiante .teacher-section-card {
    flex-direction: column;
    align-items: stretch;
  }

  .role-estudiante .teacher-section-card .btn {
    width: 100%;
  }

  .role-estudiante .student-groups-footer {
    width: 100%;
  }

  .role-estudiante .student-groups-toggle {
    width: 100%;
  }

  .role-estudiante .student-mobile-hero-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .role-profesor .teacher-mobile-hero-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* Global button style aligned with login button ("Acceder") */
.btn:not(.btn-link) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(240, 245, 252, 0.55) 100%) !important;
  border-color: var(--liquid-border) !important;
  color: #1f3148 !important;
  border-radius: 999px;
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%) !important;
  text-shadow: none !important;
}

.btn:not(.btn-link):hover,
.btn:not(.btn-link):focus-visible {
  filter: brightness(0.97) !important;
  box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

.btn:not(.btn-link):active {
  filter: brightness(0.95) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

.role-admin table.schedule-grid .form-check-input {
  width: 1.02rem;
  height: 1.02rem;
  margin: 0;
  border: 1.5px solid #334155 !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.role-admin table.schedule-grid .form-check-input:checked {
  border-color: #1d4f7a !important;
  background-color: #1d4f7a !important;
}

.role-admin table.schedule-grid .form-check-input:focus {
  border-color: #1d4f7a !important;
  box-shadow: 0 0 0 0.2rem rgba(29, 79, 122, 0.22) !important;
}

/* Keep passkey notifications centered on screen */
#floating-passkey-card.floating-card {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) scale(0.98) !important;
  z-index: 1080 !important;
}

#floating-passkey-card.floating-card.show {
  transform: translate(-50%, -50%) scale(1) !important;
}

#floating-passkey-backdrop.floating-card-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1075 !important;
}

/* Passkeys actions: make buttons full-width on mobile for better alignment */
@media (max-width: 767.98px) {
  .passkey-actions form {
    width: 100%;
  }
  .passkey-actions button.btn {
    width: 100%;
  }
}

/* Carnet (modal/iframe) */
.carnet-iframe {
  height: min(78vh, 780px);
  background: transparent;
}

.carnet-stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.carnet-stage.carnet-stage-overlay {
  min-height: auto;
  padding: 10px 10px 12px 10px;
}

.carnet-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* Carnet ID (rediseño completo) */
.carnet-id {
  /* Match system "liquid glass" theme variables */
  --id-ink: #1f3148;
  --id-ink-2: rgba(31, 49, 72, 0.62);
  --id-border: var(--liquid-border-strong);
  --id-surface: rgba(255, 255, 255, 0.92);
  --id-surface-2: rgba(242, 249, 255, 0.88);
  --id-accent: var(--blue);
  --id-accent-2: var(--mint-dark);

  width: min(460px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100vh - 24px);
  border-radius: 26px;
  border: 1px solid var(--id-border);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--liquid-shadow);
  background:
    var(--liquid-sheen),
    radial-gradient(900px 520px at 18% 10%, var(--liquid-sky), rgba(255, 255, 255, 0) 62%),
    radial-gradient(760px 420px at 84% 30%, var(--liquid-mint), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, var(--id-surface), var(--id-surface-2));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  /* Keep typography consistent with the rest of the app. */
  font-family: inherit;
  animation: carnet-id-enter 0.28s ease-out both;
  transform-origin: 50% 75%;
}

.carnet-id::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(440px 240px at 20% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 62%),
    radial-gradient(520px 260px at 88% 16%, rgba(74, 109, 144, 0.12), rgba(255, 255, 255, 0) 66%),
    radial-gradient(520px 260px at 90% 86%, rgba(108, 140, 120, 0.10), rgba(255, 255, 255, 0) 70%),
    var(--liquid-caustic);
  opacity: 0.9;
  pointer-events: none;
}

.carnet-id::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-noise);
  opacity: 0.10;
  pointer-events: none;
}

.carnet-id-watermark {
  position: absolute;
  right: -18px;
  bottom: -34px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 3.4rem;
  color: rgba(11, 18, 32, 0.06);
  transform: rotate(-12deg);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.carnet-id-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px 14px;
}

.carnet-id-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.carnet-id-logo {
  width: 44px;
  height: 44px;
  padding: 7px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 14px 30px rgba(9, 16, 35, 0.10);
  object-fit: contain;
  flex: 0 0 auto;
}

.carnet-id-brand-text {
  min-width: 0;
}

.carnet-id-school {
  font-weight: 700;
  color: rgba(31, 49, 72, 0.92);
  font-size: 0.98rem;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carnet-id-sub {
  margin-top: 2px;
  font-weight: 600;
  color: var(--id-ink-2);
  font-size: 0.84rem;
}

.carnet-id-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(220px 130px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 68%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.74), rgba(230, 238, 255, 0.52));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: rgba(31, 49, 72, 0.82);
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transform: rotate(2deg);
  user-select: none;
}

.carnet-id-close:hover {
  color: rgba(11, 18, 32, 0.92);
  transform: rotate(2deg) translateY(-1px);
}

.carnet-id-close:active {
  transform: rotate(2deg) translateY(0);
}

.carnet-id-close:focus-visible {
  outline: 3px solid rgba(24, 163, 255, 0.28);
  outline-offset: 2px;
}

.carnet-id-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  padding: 8px 16px 10px 16px;
  align-items: center;
}

.carnet-id-photo {
  width: 160px;
  height: 160px;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(240px 160px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 70%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.78), rgba(230, 238, 255, 0.56));
  box-shadow: var(--liquid-shadow-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}

/* Stack initial + img in the same cell (avoid implicit grid rows which can "cut" the photo). */
.carnet-id-photo > * {
  grid-area: 1 / 1;
}

.carnet-id-photo[data-has-img="1"] .carnet-id-initial {
  /* Show initials until the image is confirmed loaded (JS sets data-img-ready="1"). */
  opacity: 1;
}

.carnet-id-photo[data-has-img="1"] img {
  opacity: 0;
}

.carnet-id-photo[data-img-ready="1"] .carnet-id-initial {
  opacity: 0;
}

.carnet-id-photo[data-img-ready="1"] img {
  opacity: 1;
}

.carnet-id-photo.is-broken .carnet-id-initial {
  opacity: 1;
}

.carnet-id-photo.is-broken img {
  opacity: 0;
}

.carnet-id-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side at 28% 18%, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 68%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  opacity: 0.7;
  pointer-events: none;
}

.carnet-id-photo img {
  width: 100%;
  height: 100%;
  display: block;
  /* Fill the container (no letterboxing). */
  object-fit: cover;
  object-position: center;
  transition: opacity 140ms ease;
}

.carnet-id-initial {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 4.2rem;
  letter-spacing: 0.02em;
  color: rgba(11, 18, 32, 0.90);
  transition: opacity 140ms ease;
}

.carnet-id-hero-text {
  min-width: 0;
}

.carnet-id-name {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(31, 49, 72, 0.94);
  font-size: clamp(1.65rem, 3.2vw, 2.05rem);
  line-height: 1.06;
  overflow-wrap: normal;
  word-break: normal;
}

.carnet-id-role-under {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(220px 140px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 66%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.70), rgba(230, 238, 255, 0.48));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  color: rgba(31, 49, 72, 0.84);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

.carnet-id-subline {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.carnet-id-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.56);
  color: rgba(11, 18, 32, 0.82);
  font-weight: 600;
  font-size: 0.86rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carnet-id-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.26);
}

.carnet-id-facts {
  position: relative;
  z-index: 1;
  padding: 10px 16px 14px 16px;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.carnet-id-fact {
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(220px 140px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 66%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.72), rgba(230, 238, 255, 0.48));
  box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  padding: 12px 12px;
}

.carnet-id-fact-wide {
  grid-column: 1 / -1;
}

.carnet-id-k {
  margin: 0;
  font-weight: 700;
  color: rgba(31, 49, 72, 0.60);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.carnet-id-v {
  margin: 8px 0 0 0;
  font-weight: 700;
  color: rgba(31, 49, 72, 0.92);
  font-size: 1.12rem;
  line-height: 1.12;
}

.carnet-id-mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.carnet-id-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 12px 16px 14px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.carnet-id-footer-left {
  min-width: 0;
}

.carnet-id-footer-k {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.70rem;
  color: rgba(11, 18, 32, 0.62);
}

.carnet-id-footer-v {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: rgba(11, 18, 32, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.carnet-id-barcode {
  width: 120px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(11, 18, 32, 0.66) 0 2px,
      rgba(11, 18, 32, 0.12) 2px 4px,
      rgba(11, 18, 32, 0.82) 4px 5px,
      rgba(11, 18, 32, 0.10) 5px 8px
    );
  opacity: 0.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.carnet-id-course {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(11, 18, 32, 0.66);
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background:
    radial-gradient(220px 140px at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 66%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.62), rgba(230, 238, 255, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

@keyframes carnet-id-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 575.98px) {
  .carnet-id-hero {
    grid-template-columns: 132px 1fr;
    gap: 12px;
  }
  .carnet-id-photo {
    width: 132px;
    height: 132px;
    border-radius: 20px;
  }
  .carnet-id-name {
    font-size: 1.72rem;
    -webkit-line-clamp: 4;
  }
  .carnet-id-facts {
    grid-template-columns: 1fr;
  }
  .carnet-id-fact-wide {
    grid-column: auto;
  }
  .carnet-id-footer-v {
    max-width: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carnet-id {
    animation: none;
  }
}

/* Carnet premium (foto protagonista) */
.carnet-card.carnet-card-premium {
  --carnet-ink: #0b1220;
  --carnet-border: rgba(15, 23, 42, 0.16);
  --carnet-accent: #0b4f7a;
  --carnet-accent-2: #0d2b4f;
  --carnet-glow: rgba(20, 184, 166, 0.32);

  border-radius: 26px;
  border: 1px solid var(--carnet-border);
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(11, 79, 122, 0.16), rgba(255, 255, 255, 0) 62%),
    radial-gradient(760px 420px at 84% 30%, rgba(20, 184, 166, 0.12), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.90));
  box-shadow: 0 28px 70px rgba(9, 16, 35, 0.18);
  overflow: hidden;
}

.carnet-card.carnet-card-premium::before {
  content: none;
}

.carnet-hero-premium {
  position: relative;
  height: 64%;
  overflow: hidden;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(135deg, rgba(11, 79, 122, 0.10), rgba(13, 43, 79, 0.06));
}

.carnet-hero-photo {
  position: absolute;
  inset: 0;
}

.carnet-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.carnet-hero-photo .carnet-initial {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 5.5rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.96);
  background:
    radial-gradient(760px 440px at 50% 0%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 66%),
    linear-gradient(135deg, var(--carnet-accent) 0%, var(--carnet-accent-2) 78%);
}

.carnet-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 16, 35, 0.58) 0%, rgba(9, 16, 35, 0.14) 44%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(540px 280px at 18% 12%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 62%),
    radial-gradient(520px 320px at 82% 16%, rgba(20, 184, 166, 0.22), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.carnet-hero-top {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.95);
}

.carnet-hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.carnet-hero-logo {
  width: 38px;
  height: 38px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.20);
  object-fit: contain;
  flex: 0 0 auto;
}

.carnet-hero-school {
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 0.98rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.carnet-hero-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  font-weight: 950;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 0.70rem;
}

.carnet-hero-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.carnet-hero-name {
  font-weight: 980;
  letter-spacing: 0.2px;
  font-size: 2.05rem;
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carnet-meta-premium {
  padding: 14px 14px 16px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.carnet-meta-item {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background:
    radial-gradient(240px 160px at 30% 0%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(240, 246, 255, 0.64));
  box-shadow: 0 14px 34px rgba(14, 24, 51, 0.08);
  padding: 12px 12px;
}

.carnet-meta-wide {
  grid-column: 1 / -1;
}

.carnet-meta-k {
  font-weight: 950;
  color: rgba(11, 18, 32, 0.62);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.carnet-meta-v {
  margin-top: 7px;
  font-weight: 980;
  color: var(--carnet-ink);
  font-size: 1.08rem;
  line-height: 1.1;
}

.carnet-meta-empty {
  grid-column: 1 / -1;
  border-radius: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.62);
  padding: 14px 12px;
  text-align: center;
}

.carnet-meta-empty-title {
  font-weight: 950;
  color: rgba(11, 18, 32, 0.80);
}

.carnet-meta-empty-sub {
  margin-top: 6px;
  font-weight: 700;
  color: rgba(11, 18, 32, 0.56);
  font-size: 0.92rem;
}

@media (max-width: 575.98px) {
  .carnet-iframe {
    height: 78vh;
  }
  .carnet-lg { height: min(720px, calc(100vh - 18px)); }
}

/* Carnet liquid glass (nuevo diseño desde 0) */
.carnet-lg {
  --lg-ink: #0f2745;
  --lg-muted: rgba(15, 39, 69, 0.64);
  --lg-border: rgba(255, 255, 255, 0.55);
  --lg-border-2: rgba(255, 255, 255, 0.35);
  --lg-accent: #0b4f7a;
  --lg-accent-2: #14b8a6;

  width: min(440px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100vh - 24px);
  aspect-ratio: 5 / 8;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  overflow: hidden;
  position: relative;
  box-shadow: 0 34px 90px rgba(9, 16, 35, 0.18);
  background:
    radial-gradient(940px 520px at 40% -20%, rgba(11, 79, 122, 0.18), rgba(255, 255, 255, 0) 60%),
    radial-gradient(740px 420px at 86% 10%, rgba(20, 184, 166, 0.14), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(243, 247, 255, 0.86));
}

.carnet-lg-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(320px 200px at var(--glass-x, 52%) var(--glass-y, 18%), rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 68%),
    linear-gradient(165deg, rgba(237, 244, 255, 0.62), rgba(224, 234, 255, 0.52));
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  pointer-events: none;
}

.carnet-lg::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.carnet-lg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 260px at 18% 8%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 66%),
    radial-gradient(620px 320px at 84% 18%, rgba(20, 184, 166, 0.18), rgba(255, 255, 255, 0) 72%);
  opacity: 0.9;
  pointer-events: none;
}

.carnet-lg-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px 14px;
}

.carnet-lg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.carnet-lg-logo {
  width: 42px;
  height: 42px;
  padding: 7px;
  border-radius: 16px;
  border: 1px solid var(--lg-border-2);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 30px rgba(9, 16, 35, 0.14);
  object-fit: contain;
}

.carnet-lg-brand-text {
  min-width: 0;
}

.carnet-lg-school {
  font-weight: 950;
  letter-spacing: 0.2px;
  color: var(--lg-ink);
  font-size: 0.98rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carnet-lg-sub {
  margin-top: 2px;
  color: var(--lg-muted);
  font-weight: 700;
  font-size: 0.84rem;
}

.carnet-lg-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.50);
  background: rgba(255, 255, 255, 0.40);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: rgba(15, 39, 69, 0.86);
  font-weight: 950;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.carnet-lg-main {
  position: relative;
  z-index: 1;
  padding: 10px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.carnet-lg-photo {
  width: 228px;
  height: 228px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background:
    radial-gradient(220px 140px at 30% 0%, rgba(255, 255, 255, 0.92), rgba(230, 238, 255, 0.62));
  box-shadow: 0 32px 68px rgba(9, 16, 35, 0.18);
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}

.carnet-lg-photo::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  background:
    radial-gradient(closest-side at 30% 20%, rgba(11, 79, 122, 0.30), rgba(255, 255, 255, 0) 72%),
    radial-gradient(closest-side at 76% 64%, rgba(20, 184, 166, 0.22), rgba(255, 255, 255, 0) 74%);
  filter: blur(14px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

.carnet-lg-photo > * {
  position: relative;
  z-index: 1;
}

.carnet-lg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background:
    radial-gradient(closest-side at 28% 20%, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 66%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  opacity: 0.55;
  pointer-events: none;
  z-index: 2;
}

.carnet-lg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carnet-lg-initial {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 4.8rem;
  letter-spacing: 0.02em;
  color: var(--lg-ink);
}

.carnet-lg-name {
  margin-top: 2px;
  font-weight: 980;
  letter-spacing: 0.2px;
  color: var(--lg-ink);
  font-size: 2.05rem;
  line-height: 1.04;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carnet-lg-details {
  width: 100%;
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.carnet-lg-wide {
  grid-column: 1 / -1;
}

.carnet-lg-chip {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    radial-gradient(220px 140px at var(--glass-x, 52%) var(--glass-y, 18%), rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 70%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.58), rgba(230, 238, 255, 0.46));
  box-shadow: 0 18px 40px rgba(9, 16, 35, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  padding: 12px 12px;
  text-align: left;
}

.carnet-lg-k {
  font-weight: 950;
  color: rgba(15, 39, 69, 0.64);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.carnet-lg-v {
  margin-top: 7px;
  font-weight: 980;
  color: var(--lg-ink);
  font-size: 1.12rem;
  line-height: 1.12;
}

@media (max-width: 575.98px) {
  .carnet-lg-photo { width: 198px; height: 198px; }
  .carnet-lg-name { font-size: 1.85rem; }
  .carnet-lg-details { grid-template-columns: 1fr; }
  .carnet-lg-wide { grid-column: auto; }
}

/* Superadmin users: simplified controls */
.role-admin .superadmin-users-shell {
  border-radius: 24px;
}

.role-admin .superadmin-users-search {
  min-width: min(100%, 260px);
}

.role-admin .superadmin-users-list {
  display: grid;
  gap: 0.85rem;
}

.role-admin .superadmin-user-card {
  border: 1px solid var(--liquid-border);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
}

.role-admin .superadmin-user-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.role-admin .superadmin-user-name {
  font-size: 1rem;
  font-weight: 700;
  color: #182235;
}

.role-admin .superadmin-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.role-admin .superadmin-user-badges .badge {
  font-size: 0.72rem;
}

.role-admin .superadmin-user-actions {
  display: grid;
  gap: 0.45rem;
}

.role-admin .superadmin-user-action {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.role-admin .superadmin-user-action summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  color: #23344b;
}

.role-admin .superadmin-user-action summary::-webkit-details-marker {
  display: none;
}

.role-admin .superadmin-user-action[open] summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.role-admin .superadmin-user-action summary i.bi-chevron-down {
  transition: transform 0.2s ease;
}

.role-admin .superadmin-user-action[open] summary i.bi-chevron-down {
  transform: rotate(180deg);
}

.role-admin .superadmin-action-form {
  padding: 0.75rem 0.85rem 0.85rem;
}

.role-admin .superadmin-action-form .form-control,
.role-admin .superadmin-action-form .form-select {
  min-height: 38px;
}

@media (max-width: 767.98px) {
  .role-admin .superadmin-user-card {
    padding: 0.8rem 0.82rem;
  }

  .role-admin .superadmin-user-badges {
    width: 100%;
  }

  .role-admin .superadmin-user-action summary {
    font-size: 0.9rem;
    padding: 0.6rem 0.72rem;
  }

  .role-admin .superadmin-action-form {
    padding: 0.65rem 0.72rem 0.75rem;
  }
}

/* Superadmin modules: clean data-first layout */
.role-admin .superadmin-layout {
  align-items: flex-start;
  margin-top: 0.2rem;
}

.role-admin .superadmin-menu-col,
.role-admin .superadmin-main-col {
  display: flex;
  flex-direction: column;
}

.role-admin .superadmin-main-col {
  gap: 0.92rem;
}

.role-admin .superadmin-main-col > * {
  margin-bottom: 0 !important;
}

.role-admin .superadmin-menu-col #superadminSectionMenu.admin-section-menu {
  margin-top: 0;
}

.role-admin .superadmin-module-shell {
  border-radius: 24px;
}

.role-admin .superadmin-module-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-end;
}

.role-admin .superadmin-dashboard-page {
  display: grid;
  gap: 0.95rem;
  margin-top: 0.15rem;
}

.role-admin .superadmin-hero-shell {
  border-radius: 30px;
}

.role-admin .superadmin-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(480px, 1fr);
  gap: 1.05rem;
  align-items: start;
}

.role-admin .superadmin-dashboard-intro {
  padding: 0.22rem 0.25rem 0.12rem 0.18rem;
}

.role-admin .superadmin-eyebrow {
  display: inline-flex;
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #415572;
  font-weight: 700;
  margin-bottom: 0.38rem;
}

.role-admin .superadmin-dashboard-intro h2 {
  font-size: clamp(2.3rem, 2.1rem + 1.15vw, 3.65rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #15243a;
  font-weight: 800;
}

.role-admin .superadmin-dashboard-intro p {
  max-width: 700px;
  font-size: clamp(1.2rem, 1.05rem + 0.4vw, 1.9rem);
  line-height: 1.32;
  color: #5c6674;
}

.role-admin .superadmin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
  align-content: start;
}

.role-admin .superadmin-stat-card {
  border: 1px solid var(--liquid-border);
  border-radius: 18px;
  padding: 0.78rem 0.92rem;
  min-height: 128px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--liquid-shadow-soft), var(--liquid-highlight);
}

.role-admin .superadmin-stat-card span {
  display: block;
  font-size: 0.72rem;
  color: #617089;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.role-admin .superadmin-stat-card strong {
  display: block;
  font-size: 2.95rem;
  line-height: 0.96;
  font-weight: 800;
  color: #0f1c31;
  margin-top: 0.42rem;
}

.role-admin .superadmin-stat-card small {
  display: block;
  color: #697586;
  margin-top: 0.34rem;
  font-size: 0.8rem;
}

.role-admin .superadmin-stat-grid .superadmin-stat-card:nth-child(4) {
  grid-column: 1 / 2;
}

.role-admin .superadmin-stat-grid .superadmin-stat-card:nth-child(5) {
  grid-column: 2 / 3;
}

.role-admin .superadmin-dashboard-bottom .superadmin-main-col {
  gap: 0;
}

.role-admin .superadmin-portal .admin-panels {
  align-items: start;
}

.role-admin .superadmin-redesign-panel {
  display: grid;
  gap: 0.82rem;
  align-content: start;
}

.role-admin .superadmin-redesign-panel .admin-panel-header {
  margin-bottom: 0.08rem;
}

.role-admin .superadmin-redesign-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
}

.role-admin .superadmin-redesign-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  padding: 0.72rem 0.78rem;
  display: grid;
  gap: 0.28rem;
}

.role-admin .superadmin-redesign-overview-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #64748b;
}

.role-admin .superadmin-redesign-overview-card strong {
  font-size: 1.12rem;
  line-height: 1.2;
  font-weight: 800;
  color: #15253c;
}

.role-admin .superadmin-redesign-overview-card p {
  margin: 0;
  color: #5f6d81;
  font-size: 0.84rem;
  line-height: 1.35;
}

.role-admin .superadmin-redesign-overview-card .superadmin-ops-track {
  margin-top: 0.18rem;
}

.role-admin .superadmin-redesign-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.role-admin .superadmin-redesign-list-item {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  padding: 0.6rem 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.role-admin .superadmin-redesign-item-main h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #16243a;
}

.role-admin .superadmin-redesign-item-main p {
  margin: 0.14rem 0 0;
  font-size: 0.83rem;
  color: #5f6d81;
}

.role-admin .superadmin-redesign-jobs-list {
  gap: 0.46rem;
}

.role-admin .superadmin-redesign-job-meta {
  display: flex;
  gap: 0.34rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.role-admin .superadmin-ops-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.68rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}

.role-admin .superadmin-ops-state.is-ok {
  color: #0f6b3b;
  background: rgba(15, 107, 59, 0.12);
  border-color: rgba(15, 107, 59, 0.24);
}

.role-admin .superadmin-ops-state.is-warn {
  color: #8a4b02;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.26);
}

.role-admin .superadmin-ops-state.is-bad {
  color: #9f1239;
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.24);
}

.role-admin .superadmin-ops-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  overflow: hidden;
}

.role-admin .superadmin-ops-track.compact {
  width: 100%;
}

.role-admin .superadmin-ops-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #117a65);
}

.role-admin .superadmin-redesign-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.62rem;
}

.role-admin .superadmin-jobs-priority strong {
  display: block;
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.25;
  color: #16243a;
}

.role-admin .superadmin-audit-panel .admin-panel-header {
  align-items: center;
  margin-bottom: 0.72rem;
}

.role-admin .superadmin-audit-summary {
  background: rgba(15, 118, 110, 0.1);
  color: #0f5e5b;
}

.role-admin .superadmin-audit-panel .table-responsive {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  padding: 0.2rem 0.55rem;
}

.role-admin .superadmin-audit-table thead th {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e2b42;
  border-bottom-color: rgba(148, 163, 184, 0.28);
}

.role-admin .superadmin-audit-table tbody td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

.role-admin .superadmin-action-text {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(190, 91, 132, 0.24);
  border-radius: 999px;
  background: rgba(190, 91, 132, 0.1);
  padding: 0.2rem 0.58rem;
  font-family: "SFMono-Regular", Menlo, Consolas, Monaco, monospace;
  color: #be5b84;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.role-admin .superadmin-module-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.17rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.78);
  color: #344256;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.role-admin .superadmin-audit-footer {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  align-items: center;
}

.role-admin .superadmin-list {
  display: grid;
  gap: 0.6rem;
}

.role-admin .superadmin-item-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.75rem 0.82rem;
}

.role-admin .superadmin-kv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.role-admin .superadmin-kv-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
}

.role-admin .superadmin-kv-key {
  font-size: 0.74rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.role-admin .superadmin-kv-value {
  font-size: 0.82rem;
  color: #1f2937;
}

@media (max-width: 991.98px) {
  .role-admin .superadmin-main-col {
    gap: 0.82rem;
  }

  .role-admin .superadmin-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .role-admin .superadmin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-admin .superadmin-stat-grid .superadmin-stat-card:nth-child(4),
  .role-admin .superadmin-stat-grid .superadmin-stat-card:nth-child(5) {
    grid-column: auto;
  }

  .role-admin .superadmin-stat-card strong {
    font-size: 2.2rem;
  }

  .role-admin .superadmin-dashboard-intro h2 {
    font-size: clamp(1.95rem, 1.8rem + 1vw, 2.45rem);
  }

  .role-admin .superadmin-dashboard-intro p {
    font-size: 1.1rem;
  }

  .role-admin .superadmin-redesign-overview {
    grid-template-columns: 1fr;
  }

  .role-admin .superadmin-redesign-list-item {
    align-items: flex-start;
  }

  .role-admin .superadmin-redesign-job-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .role-admin .superadmin-layout {
    margin-top: 0.05rem;
  }

  .role-admin .superadmin-audit-panel .table-responsive {
    padding: 0.15rem 0.4rem;
  }

  .role-admin .superadmin-audit-footer {
    align-items: stretch;
  }

  .role-admin .superadmin-audit-footer .btn {
    width: 100%;
  }

  .role-admin .superadmin-redesign-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .role-admin .superadmin-redesign-job-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .role-admin .superadmin-redesign-footer {
    align-items: stretch;
  }

  .role-admin .superadmin-redesign-footer .btn {
    width: 100%;
  }

  .role-admin .superadmin-dashboard-page {
    gap: 0.78rem;
  }

  .role-admin .superadmin-stat-grid {
    grid-template-columns: 1fr;
  }

  .role-admin .superadmin-stat-card {
    min-height: 108px;
  }

  .role-admin .superadmin-stat-card strong {
    font-size: 1.95rem;
  }

  .role-admin .superadmin-dashboard-intro h2 {
    font-size: 1.72rem;
  }

  .role-admin .superadmin-dashboard-intro p {
    font-size: 1rem;
  }
}
