/* ============================================================
   PLATAFORMA E-LEARNING - main.css
   Estilo institucional - San Jorge LMS
   CLASES CRÍTICAS: no renombrar para integración backend
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
img { max-width: 100%; }

/* --- VARIABLES DE COLOR --- */
:root {
  /* --- PALETA PREMIUM (HSL) --- */
  --color-primary-h: 161;
  --color-primary-s: 62%;
  --color-primary-l: 44%;
  --color-primary: hsl(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l));
  --color-primary-hover: hsl(var(--color-primary-h), var(--color-primary-s), 38%);
  --color-primary-soft: hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.12);
  
  --color-accent: #6366f1;
  --color-accent-soft: rgba(99, 102, 241, 0.1);
  
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  
  --color-nav-bg: rgba(15, 23, 42, 0.9);
  --color-topbar-bg: rgba(255, 255, 255, 0.75);
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inv: #ffffff;
  
  /* --- SUPERFICIES & GLASS --- */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  /* --- SOMBRAS MULTICAPA --- */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, hsla(161, 62%, 44%, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(230, 84%, 63%, 0.05) 0px, transparent 50%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.login-splash-active {
  overflow: hidden;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- LOGIN SPLASH --- */
.login-welcome-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  animation: splashIn 0.55s ease both;
}

.login-welcome-splash__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(57, 217, 176, 0.16), transparent 26%),
    radial-gradient(circle at bottom left, rgba(57, 217, 176, 0.12), transparent 30%),
    linear-gradient(145deg, #071b14 0%, #0b2b1f 52%, #0a241b 100%);
}

.login-welcome-splash__backdrop::before,
.login-welcome-splash__backdrop::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  filter: blur(8px);
}

.login-welcome-splash__backdrop::before {
  width: 42vw;
  height: 42vw;
  top: -12vw;
  right: -8vw;
}

.login-welcome-splash__backdrop::after {
  width: 36vw;
  height: 36vw;
  left: -10vw;
  bottom: -10vw;
}

.login-welcome-splash__content {
  position: relative;
  z-index: 2;
  width: min(92vw, 760px);
  padding: 32px 24px;
  text-align: center;
  color: #f8fafc;
}

.login-welcome-splash__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.login-welcome-splash__mark img {
  width: min(64vw, 430px);
  max-width: 100%;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.28));
}

.login-welcome-splash__eyebrow {
  margin-bottom: 10px;
  color: rgba(166, 245, 221, 0.92);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-welcome-splash h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.login-welcome-splash__user {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
}

.login-welcome-splash__copy {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.98rem;
  line-height: 1.7;
}

.login-welcome-splash.is-exiting {
  animation: splashFadeOut 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splashFadeOut {
  0% {
    opacity: 1;
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.04);
    visibility: hidden;
  }
}

/* --- TOPBAR (header superior con logo y usuario) --- */
#site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1200;
  background: var(--color-topbar-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  padding: 0 28px;
  min-height: 72px;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
#site-topbar .topbar-logo { display: flex; align-items: center; gap: 10px; }
#site-topbar .topbar-logo img { height: 50px; }
#site-topbar .topbar-logo .logo-text { font-size: 0.92rem; font-weight: 800; color: var(--text-strong); line-height: 1.2; letter-spacing: -0.02em; }
#site-topbar .topbar-right { display: flex; align-items: center; gap: 16px; }
#site-topbar .topbar-user-link { font-size: 0.85rem; color: var(--color-primary); }
#site-topbar .topbar-user-info { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; font-weight: 600; }
.student-topbar-user-button {
  max-width: 220px;
}

.student-topbar-user-name {
  display: inline-block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

#site-topbar .topbar-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #93a6b0 0%, #c8d1d7 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}
#site-topbar .topbar-icons { display: flex; gap: 8px; align-items: center; }
#site-topbar .topbar-notifications { position: relative; }
#site-topbar .topbar-icon-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.42);
  cursor: pointer;
  font-size: 1.05rem;
  color: #4b5f6d;
  padding: 9px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
#site-topbar .topbar-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-strong);
}
#site-topbar .topbar-icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--color-primary); color: #fff;
  border-radius: 50%; font-size: 0.65rem; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}
.topbar-notifications__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  z-index: 220;
}
.topbar-notifications__header,
.topbar-notifications__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(248, 250, 252, 0.92);
}
.topbar-notifications__header strong,
.topbar-notifications__header span,
.topbar-notifications__copy strong,
.topbar-notifications__copy span,
.topbar-notifications__copy small,
.notifications-page__copy strong,
.notifications-page__copy span,
.notifications-page__copy small {
  display: block;
}
.topbar-notifications__header span {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 4px;
}
.topbar-notifications__mark-all,
.topbar-notifications__link {
  border: 0;
  background: transparent;
  color: #10b981;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.topbar-notifications__list {
  max-height: 420px;
  overflow: auto;
  display: grid;
}
.topbar-notifications__item {
  width: 100%;
  border: 0;
  background: #ffffff;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  border-top: 1px solid rgba(241, 245, 249, 0.96);
}
.topbar-notifications__item:hover,
.notifications-page__item:hover {
  background: rgba(248, 250, 252, 0.92);
}
.topbar-notifications__item.is-read,
.notifications-page__item.is-read {
  background: rgba(248, 250, 252, 0.72);
}
.topbar-notifications__icon,
.notifications-page__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
}
.topbar-notifications__copy strong,
.notifications-page__copy strong {
  color: #0f172a;
  font-size: 0.9rem;
}
.topbar-notifications__copy span,
.notifications-page__copy span {
  color: #526579;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 4px;
}
.topbar-notifications__copy small,
.notifications-page__copy small {
  color: #94a3b8;
  font-size: 0.74rem;
  margin-top: 6px;
}
.topbar-notifications__empty,
.notifications-page__empty {
  padding: 24px 18px;
  color: #64748b;
  text-align: center;
}
.notifications-page {
  display: grid;
  gap: 20px;
}
.notifications-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.notifications-page__header h1 {
  margin: 4px 0 0;
  color: #0f172a;
}
.notifications-page__list {
  display: grid;
  gap: 12px;
}
.notifications-page__item {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  border-radius: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.05);
}
.notifications-page__pagination {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.notifications-page__pagination a {
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #334155;
  background: rgba(241, 245, 249, 0.92);
  font-weight: 700;
}
.notifications-page__pagination a.is-active {
  background: #10b981;
  color: #ffffff;
}

/* --- NAVBAR principal --- */
#site-navbar {
  background: linear-gradient(90deg, rgba(8, 15, 27, 0.94) 0%, rgba(15, 28, 45, 0.92) 100%);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  min-height: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
#site-navbar .navbar-links { display: flex; align-items: center; gap: 0; }
#site-navbar .navbar-links a {
  color: #fff !important;
  padding: 15px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
#site-navbar .navbar-links a:hover,
#site-navbar .navbar-links a.active {
  color: #fff !important;
  border-bottom-color: var(--color-primary);
  text-decoration: none;
  background: rgba(255,255,255,0.08);
}
#site-navbar .navbar-right { display: flex; align-items: center; gap: 16px; }
#site-navbar .navbar-search-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
}
#site-navbar .edit-mode-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: rgba(226,232,240,0.8); }
#site-navbar .toggle-switch { position: relative; width: 36px; height: 20px; }
#site-navbar .toggle-switch input { opacity: 0; width: 0; height: 0; }
#site-navbar .toggle-slider {
  position: absolute; inset: 0; background: #666; border-radius: 20px; cursor: pointer; transition: 0.3s;
}
#site-navbar .toggle-slider::before {
  content: ''; position: absolute; width: 14px; height: 14px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s;
}
#site-navbar .toggle-switch input:checked + .toggle-slider { background: var(--color-green); }
#site-navbar .toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* --- SIDEBAR del curso --- */
#course-sidebar {
  width: 220px;
  min-width: 200px;
  background: linear-gradient(180deg, rgba(12, 24, 38, 0.95) 0%, rgba(19, 37, 57, 0.93) 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 0;
  flex-shrink: 0;
  box-shadow: 12px 0 32px rgba(15, 23, 42, 0.08);
  transition: width 0.3s;
}
#course-sidebar.collapsed { width: 0; overflow: hidden; }
#course-sidebar .sidebar-toggle-btn {
  position: absolute; right: -16px; top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.42);
  border-radius: 50%; width: 28px; height: 28px;
  backdrop-filter: blur(10px);
  cursor: pointer; font-size: 0.75rem; z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
#course-sidebar .sidebar-section { border-bottom: 1px solid var(--color-border); }
#course-sidebar .sidebar-section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; background: rgba(31,191,143,0.16); color: #fff;
}
#course-sidebar .sidebar-section-title.inactive {
  background: rgba(255,255,255,0.06); color: rgba(241,245,249,0.86);
}
#course-sidebar .sidebar-section-items { list-style: none; }
#course-sidebar .sidebar-section-items li a {
  display: block; padding: 10px 20px; font-size: 0.82rem; color: rgba(226,232,240,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
#course-sidebar .sidebar-section-items li a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
#course-sidebar .sidebar-topic-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 0.83rem; font-weight: 700; color: rgba(241,245,249,0.92);
  cursor: pointer; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05);
}
#course-sidebar .sidebar-topic-title .chevron { font-size: 0.7rem; color: rgba(226,232,240,0.55); }

/* --- LAYOUT PRINCIPAL --- */
#page-wrapper { display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
#main-content { flex: 1; padding: 34px 28px 40px; max-width: 1180px; margin: 0 auto; width: 100%; }
#course-layout { display: flex; flex: 1; position: relative; }
#course-main { flex: 1; padding: 32px 28px; overflow: auto; }

/* --- FOOTER --- */
#site-footer {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(8,15,27,1) 100%);
  color: var(--color-footer-text);
  text-align: center;
  padding: 18px 24px;
  font-size: 0.8rem;
}
#site-footer a { color: rgba(255,255,255,0.84); }

/* --- LANDING PAGE --- */
#landing-hero {
  background: linear-gradient(135deg, #2c2c2c 60%, #c0392b 100%);
  color: #fff; padding: 60px 24px; text-align: center;
}
#landing-hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
#landing-hero p { font-size: 1.1rem; margin-bottom: 28px; opacity: 0.9; }
#landing-announcements { max-width: 900px; margin: 32px auto; padding: 0 16px; }
#landing-announcements h2 { font-size: 1.3rem; margin-bottom: 16px; border-bottom: 3px solid var(--color-primary); padding-bottom: 6px; display: inline-block; }

.announcement-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 4px; padding: 20px; margin-bottom: 16px;
}
.announcement-card h3 { font-size: 1rem; color: var(--color-primary); margin-bottom: 6px; }
.announcement-card .ann-meta { font-size: 0.78rem; color: #888; margin-bottom: 10px; }
.announcement-card p { font-size: 0.9rem; line-height: 1.6; }
.announcement-card .btn-more {
  display: inline-block; margin-top: 12px;
  background: var(--color-primary); color: #fff;
  padding: 6px 18px; border-radius: 3px; font-size: 0.85rem;
}
.announcement-card .btn-more:hover { background: var(--color-primary-dark); text-decoration: none; }

/* --- LOGIN PAGE --- */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.login-bg-modern {
  position: absolute;
  inset: 0;
  background: url('../img/login-bg-modern.png') center/cover no-repeat;
  z-index: 1;
}

.login-bg-modern::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(26, 92, 42, 0.4) 100%);
}

#login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  padding: 20px;
}

#login-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-content-wrapper {
  display: flex;
  flex-direction: column;
  color: #fff;
}

.login-logo {
  margin-bottom: 32px;
  text-align: center;
}

.login-logo img {
  height: 90px;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
}

.logo-fallback {
  font-size: 4rem;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.login-header .subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

#login-form .form-group {
  margin-bottom: 20px;
}

#login-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.input-wrapper {
  position: relative;
}

#login-form input[type="text"],
#login-form input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 1rem;
  color: #fff;
  transition: all 0.2s ease;
}

#login-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

#login-form input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

#btn-login {
  width: 100%;
  padding: 14px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

#btn-login:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

#btn-login:active {
  transform: translateY(0);
}

.icon-arrow {
  transition: transform 0.2s ease;
}

#btn-login:hover .icon-arrow {
  transform: translateX(4px);
}

.login-alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.login-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.login-alert.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.login-forgot {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.login-forgot:hover {
  color: #fff;
  text-decoration: none;
}

.login-divider {
  position: relative;
  text-align: center;
  margin: 32px 0;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.login-divider span {
  position: relative;
  background: #1f2937;
  padding: 0 16px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 99px;
}

#btn-institutional {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s ease;
}

#btn-institutional:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.login-footer-info {
  margin-top: 40px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  line-height: 1.6;
}

.login-footer-info .contact {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
}

/* --- DASHBOARD / ÁREA PERSONAL --- */
.page-title { font-size: 2rem; font-weight: 800; color: #102130; margin-bottom: 26px; letter-spacing: -0.05em; }
.welcome-msg { font-size: 1.25rem; margin-bottom: 28px; color: var(--text-soft); font-weight: 500; }
.section-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-soft);
}

.section-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
  letter-spacing: -0.02em;
}

.section-card h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}
.timeline-filters { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.timeline-filters select, .timeline-filters .sort-btn {
  padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 0.85rem; background: #fff; cursor: pointer; color: #334155;
  transition: border-color 0.2s;
}
.timeline-filters select:hover { border-color: #94a3b8; }
.timeline-empty { text-align: center; padding: 40px 0; color: #94a3b8; font-size: 0.95rem; }
.timeline-empty .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.8; }

/* --- CALENDARIO --- */
#calendar-container {
  background: var(--surface-card);
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-header h3 { font-size: 1.1rem; font-weight: 700; }
.calendar-nav { display: flex; align-items: center; gap: 16px; }
.calendar-nav a { font-size: 0.85rem; color: var(--color-primary); }
.calendar-controls { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar-controls select { padding: 6px 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 0.82rem; }
#btn-new-event {
  background: var(--color-primary); color: #fff; border: none;
  padding: 7px 18px; border-radius: 3px; font-size: 0.85rem; cursor: pointer;
}
#btn-new-event:hover { background: var(--color-primary-dark); }
.calendar-table { width: 100%; border-collapse: collapse; }
.calendar-table th {
  text-align: center; padding: 8px 4px; font-size: 0.82rem;
  font-weight: 600; color: #555; border-bottom: 1px solid var(--color-border);
}
.calendar-table td {
  text-align: center; padding: 10px 4px; font-size: 0.85rem;
  border: 1px solid rgba(226,232,240,0.7); vertical-align: top; min-height: 48px;
  background: rgba(255,255,255,0.45);
}
.calendar-table td.today .day-num {
  background: var(--color-primary); color: #fff;
  border-radius: 50%; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
}
.calendar-table td.other-month { color: #ccc; }
.calendar-links { margin-top: 12px; font-size: 0.8rem; }
.calendar-links a { color: var(--color-primary); margin-right: 12px; }

.student-calendar-page {
  overflow: hidden;
}

.student-calendar-table {
  table-layout: fixed;
}

.student-calendar-table td {
  padding: 0;
  height: 120px;
}

.student-calendar-table__cell {
  position: relative;
}

.student-calendar-table__cell.today {
  background: rgba(16, 185, 129, 0.06);
}

.student-calendar-table__cell.has-events {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.92));
}

.student-calendar-day-button {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.student-calendar-day-button:hover {
  background: rgba(15, 23, 42, 0.03);
  box-shadow: inset 0 0 0 1px rgba(31, 191, 143, 0.18);
}

.student-calendar-day-button:focus-visible {
  outline: 2px solid rgba(31, 191, 143, 0.42);
  outline-offset: -2px;
}

.student-calendar-day-button .day-num {
  font-weight: 800;
  color: #334155;
}

.student-calendar-day-button__summary {
  display: grid;
  gap: 8px;
  width: 100%;
}

.student-calendar-day-button__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.student-calendar-day-button__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.student-calendar-day-button__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
}

/* --- MIS CURSOS --- */
.courses-toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.courses-toolbar .filter-btn {
  padding: 8px 16px; border: 1px solid #cbd5e1; border-radius: 6px;
  background: #f8fafc; font-size: 0.88rem; cursor: pointer; color: #475569; font-weight: 500;
  transition: all 0.2s;
}
.courses-toolbar .filter-btn:hover { background: #e2e8f0; }
.courses-toolbar .filter-btn.active { background: #0f172a; color: #fff; border-color: #0f172a; }
#course-search-input {
  flex: 1; min-width: 220px; padding: 9px 14px;
  border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.9rem;
  transition: outline 0.2s, border-color 0.2s;
}
#course-search-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1); }
.courses-toolbar .sort-select, .courses-toolbar .view-select {
  padding: 8px 14px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 0.88rem; background: #fff; cursor: pointer; color: #475569;
}
#courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.course-card {
  background: var(--surface-card-strong); border: 1px solid rgba(255,255,255,0.42);
  border-radius: 18px; overflow: hidden; position: relative;
  backdrop-filter: blur(14px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-4px); box-shadow: 0 20px 36px rgba(15,23,42,0.12); border-color: rgba(31,191,143,0.2); }
.course-card .course-thumb { width: 100%; height: 140px; object-fit: cover; background: #f1f5f9; border-bottom: 1px solid #f1f5f9; }
.course-card .course-info { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.course-card .course-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.course-card .course-name a { color: #0f172a; }
.course-card .course-name a:hover { color: var(--color-primary); }
.course-card .course-period { font-size: 0.75rem; color: #64748b; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-top: auto; }
.course-card .course-menu-btn {
  position: absolute; bottom: 16px; right: 14px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 50%; width: 28px; height: 28px;
  cursor: pointer; font-size: 1rem; color: #64748b; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.course-card .course-menu-btn:hover { background: #e2e8f0; color: #0f172a; }

/* --- COURSE VIEW --- */
#course-view-header { margin-bottom: 28px; }
#course-view-header h1 { font-size: 1.8rem; font-weight: 800; color: #1e293b; letter-spacing: -0.5px; }
.course-tabs { display: flex; border-bottom: 2px solid #e2e8f0; margin-bottom: 24px; gap: 8px; }
.course-tabs .tab-link {
  padding: 10px 20px; font-size: 0.95rem; color: #64748b; font-weight: 500;
  border-bottom: 3px solid transparent; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -2px;
}
.course-tabs .tab-link.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 700; }
.course-tabs .tab-link:hover { text-decoration: none; color: #1e293b; }
.course-welcome-banner { width: 100%; max-width: 600px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.course-meta-links { margin-bottom: 24px; background: rgba(255,255,255,0.68); padding: 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.42); backdrop-filter: blur(12px); }
.course-meta-links span { display: block; font-size: 0.95rem; color: #334155; font-weight: 600; }
.course-section { margin-bottom: 24px; border: 1px solid rgba(255,255,255,0.42); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card); background: rgba(255,255,255,0.76); backdrop-filter: blur(12px); }
.course-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: rgba(248,250,252,0.92); border-bottom: 1px solid rgba(226,232,240,0.72);
  cursor: pointer; font-weight: 700; font-size: 1rem; color: #0f172a;
  transition: background 0.2s;
}
.course-section-header:hover { background: rgba(241,245,249,0.96); }
.course-section-header .collapse-icon { font-size: 0.85rem; color: #64748b; transition: transform 0.2s; }
.course-section-body { background: rgba(255,255,255,0.78); padding: 16px 20px; }
.course-activity {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.95rem;
}
.course-activity:last-child { border-bottom: none; }
.course-activity .activity-icon { font-size: 1.25rem; color: #64748b; width: 28px; text-align: center; }
.course-activity a { color: #0f172a; font-weight: 500; transition: color 0.2s; }
.course-activity a:hover { color: var(--color-primary); }
.collapse-all-btn { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 6px 12px; color: #475569; font-size: 0.82rem; cursor: pointer; margin-bottom: 16px; font-weight: 600; transition: all 0.2s; }
.collapse-all-btn:hover { background: #e2e8f0; color: #0f172a; }

/* --- BOTONES GENERALES --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 8px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px 0 hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* --- COURSE OVERVIEW & SUMMARY --- */
.teacher-course-alert-banner {
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1);
}

.teacher-course-alert-banner__copy strong {
  display: block;
  font-size: 1.1rem;
  color: var(--color-primary-hover);
  margin-bottom: 4px;
}

.teacher-course-alert-banner__copy p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.teacher-lms-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.teacher-lms-summary-card {
  padding: 32px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
}

.teacher-lms-summary-card--link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
  text-decoration: none;
}

.teacher-lms-summary-card__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.teacher-lms-summary-card strong {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.teacher-lms-summary-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  #site-topbar { padding: 10px 14px; }
  #site-topbar .topbar-right {
    gap: 10px;
  }
  #site-topbar .topbar-user-info {
    gap: 8px;
  }
  #site-topbar .topbar-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.82rem;
  }
  #site-topbar .topbar-logo .logo-text {
    font-size: 0.84rem;
  }
  #site-navbar {
    padding: 0 12px 12px;
    flex-wrap: wrap;
    gap: 10px;
  }
  #site-navbar .navbar-links {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #site-navbar .navbar-links::-webkit-scrollbar {
    display: none;
  }
  #site-navbar .navbar-links a {
    white-space: nowrap;
    padding: 14px 14px 12px;
  }
  #site-navbar .navbar-right {
    width: 100%;
    justify-content: space-between;
  }
  #main-content { padding: 16px 12px; }
  #course-layout { flex-direction: column; }
  #course-sidebar {
    width: calc(100% - 24px);
    min-width: 0;
    margin: 12px;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .sidebar-toggle-btn {
    top: auto;
    bottom: -14px;
    right: 18px;
    transform: none;
  }
  #course-main {
    padding: 16px 12px 30px;
  }
  .course-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .course-actions-row,
  .courses-shell-head {
    flex-direction: column;
    align-items: stretch;
  }
  #login-bg { display: none; }
  #login-panel { width: 100%; }
  #courses-grid { grid-template-columns: 1fr 1fr; }
  .courses-toolbar { flex-direction: column; align-items: stretch; }
  #admin-wrapper {
    flex-direction: column;
  }
  #admin-sidebar {
    width: 100%;
    min-height: auto;
  }
  #admin-sidebar .sidebar-header {
    padding: 18px 20px;
  }
  #admin-sidebar .nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #admin-sidebar .nav-list::-webkit-scrollbar {
    display: none;
  }
  #admin-sidebar .nav-item {
    flex: 0 0 auto;
  }
  #admin-sidebar .nav-item .nav-link {
    border-radius: 14px;
    padding: 12px 16px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  #admin-sidebar .nav-item .nav-link:hover,
  #admin-sidebar .nav-item .nav-link.active {
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }
  #admin-main {
    padding: 22px 14px 30px;
    min-width: 0;
    overflow-x: auto;
  }
  .admin-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .admin-header-actions > div {
    width: 100%;
  }
  .admin-header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .table-admin {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .login-welcome-splash__content {
    padding: 24px 18px;
  }
  .login-welcome-splash__mark img {
    width: min(78vw, 360px);
  }
  .teacher-reports-hero {
    flex-direction: column;
    padding: 24px 22px;
  }
  .teacher-reports-hero h1 {
    font-size: 1.8rem;
  }
  .teacher-reports-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .teacher-report-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-shell {
    grid-template-columns: 1fr;
  }
  .dashboard-side-card {
    position: static;
    top: auto;
  }
  #admin-main {
    padding: 26px 18px;
  }
}
@media (max-width: 480px) {
  .admin-header-actions h1 {
    font-size: 1.65rem;
    line-height: 1.08;
  }
  .teacher-mini-calendar__head h3 {
    font-size: 1.45rem;
  }
  .teacher-mini-calendar__surface {
    padding: 10px;
  }
  .teacher-mini-calendar__table-head span {
    min-height: 34px;
    padding: 0 6px;
    font-size: 0.72rem;
  }
  .teacher-mini-calendar__table-cell {
    min-height: 46px;
    padding: 6px;
    font-size: 0.82rem;
  }
  .teacher-mini-calendar__table-cell.has-event::after {
    width: 8px;
    height: 8px;
    right: 6px;
    bottom: 6px;
  }
  #courses-grid { grid-template-columns: 1fr; }
  #landing-hero h1 { font-size: 1.5rem; }
  #site-topbar {
    padding: 10px 12px;
    min-height: 64px;
  }
  #site-topbar .topbar-icons {
    gap: 6px;
  }
  #site-topbar .topbar-icon-btn {
    padding: 8px;
  }
  #site-topbar .topbar-user-info {
    font-size: 0.78rem;
  }
  #site-topbar #user-dropdown-btn {
    max-width: 136px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page-title {
    font-size: 1.7rem;
  }
  .courses-shell {
    padding: 22px 18px 24px;
  }
  .course-card .course-thumb {
    height: 168px;
  }
  .course-section-header,
  .course-section-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .teacher-report-stat {
    padding: 18px;
  }
  .teacher-report-stat-value {
    font-size: 1.7rem;
  }
  .teacher-report-panel {
    padding: 18px 16px 14px;
  }
  .dashboard-side-card__header {
    flex-direction: column;
  }
  .dashboard-agenda-card__hero,
  .dashboard-empty-state-agenda {
    grid-template-columns: 1fr;
  }
  .dashboard-agenda-card__mark,
  .dashboard-empty-state__icon {
    justify-self: start;
  }
  .teacher-mini-calendar__head {
    flex-direction: column;
    align-items: stretch;
  }
  .teacher-calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .teacher-calendar-toolbar__filter select {
    min-width: 0;
    width: 100%;
  }
  .teacher-calendar-toolbar__nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .teacher-calendar-toolbar__nav strong {
    font-size: 1.35rem;
  }
  .teacher-mini-calendar__surface {
    padding: 12px;
  }
  .teacher-mini-calendar__table-head span {
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
  .teacher-mini-calendar__table-cell {
    min-height: 54px;
    padding: 8px;
    font-size: 0.9rem;
  }
  .teacher-mini-calendar__hint {
    font-size: 0.84rem;
  }
  .event-quick-modal__dialog {
    width: min(94vw, 720px);
    margin: 4vh auto;
    padding: 20px;
  }
  .event-quick-form__grid {
    grid-template-columns: 1fr;
  }
  .student-mini-calendar__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .student-mini-calendar__cell {
    min-height: 48px;
    padding: 6px;
    font-size: 0.86rem;
  }
  .dashboard-event-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }
  .login-welcome-splash__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }
  .login-welcome-splash__copy {
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  #site-topbar .topbar-logo .logo-text {
    display: none;
  }
  #site-navbar .navbar-links a {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.84rem;
  }
}

/* --- AREA ADMIN --- */
#admin-wrapper {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(31,191,143,0.1), transparent 26%),
    linear-gradient(180deg, rgba(247,250,252,0.9) 0%, rgba(238,244,243,0.9) 100%);
}
#admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, rgba(14,24,39,0.96) 0%, rgba(19,36,54,0.95) 100%);
  color: #ecf0f1;
  flex-shrink: 0;
  min-height: calc(100vh - 64px - 44px);
  box-shadow: 18px 0 34px rgba(15,23,42,0.08);
  z-index: 10;
}
#admin-sidebar .sidebar-header {
  padding: 24px;
  background: rgba(255,255,255,0.02);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
#admin-sidebar .sidebar-header h2 {
  font-size: 1.15rem;
  margin: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
#admin-sidebar .nav-list { list-style: none; padding: 12px 0; margin: 0; }
#admin-sidebar .nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  color: rgba(226,232,240,0.76);
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  border-left: 5px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-left-color 0.2s ease, box-shadow 0.2s ease;
}
#admin-sidebar .nav-item .nav-link:hover,
#admin-sidebar .nav-item .nav-link.active {
  background: linear-gradient(135deg, rgba(31,191,143,0.92) 0%, rgba(14,158,117,0.92) 100%);
  color: #fff;
  text-decoration: none;
  border-left: 5px solid rgba(255,255,255,0.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
#admin-main { flex: 1; min-width: 0; overflow: hidden; padding: 40px 48px; background: transparent; }
.admin-card {
  background: rgba(255,255,255,0.8); 
  border-radius: 20px; 
  padding: 28px;
  box-shadow: var(--shadow-card); 
  margin-bottom: 30px;
  border: 1px solid rgba(255,255,255,0.42);
  backdrop-filter: blur(16px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.admin-card:hover {
  box-shadow: 0 18px 34px rgba(15,23,42,0.1);
}

/* KPIs Premium for Billing */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.admin-kpi-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

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

.admin-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
}

.admin-kpi-card--danger::before { background: var(--color-danger); }
.admin-kpi-card--warning::before { background: var(--color-warning); }
.admin-kpi-card--success::before { background: var(--color-success); }

.admin-kpi-card__icon {
  font-size: 2.2rem;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.admin-kpi-card__value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.admin-kpi-card__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Enhanced Progress Bar */
.admin-payment-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.admin-payment-progress__bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.admin-payment-progress__fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.admin-payment-progress__fill.is-paid {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.admin-payment-progress__fill.is-partial {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.admin-payment-progress__fill.is-pending {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Sync Badge */
.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-top: 8px;
}

.sync-indicator svg {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: start;
}
.dashboard-shell-teacher {
  grid-template-columns: 1fr;
}
.dashboard-main-column,
.dashboard-side-column {
  min-width: 0;
}
.dashboard-side-card {
  position: sticky;
  top: 96px;
}
.dashboard-side-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-side-card__eyebrow {
  margin: 0 0 6px;
  color: var(--color-primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.dashboard-side-card__header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.dashboard-side-card__copy {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.92rem;
  max-width: 34ch;
}
.dashboard-event-list {
  display: grid;
  gap: 12px;
}
.dashboard-event-item {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: rgba(248,250,252,0.95);
  border: 1px solid rgba(226,232,240,0.9);
}
.dashboard-event-item__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15,23,42,0.06) 0%, rgba(15,23,42,0.02) 100%);
}
.dashboard-event-item__date span {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
}
.dashboard-event-item__date strong {
  font-size: 1.3rem;
  color: #102130;
}
.dashboard-event-item__content {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.dashboard-event-item__content strong {
  color: #102130;
}
.dashboard-event-item__content span,
.dashboard-event-item__content small {
  color: #64748b;
}

.dashboard-event-item.is-past {
  opacity: 0.72;
}

.dashboard-event-item.is-past .dashboard-event-item__content strong,
.dashboard-event-item.is-past .dashboard-event-item__content span,
.dashboard-event-item.is-past .dashboard-event-item__content small {
  color: #94a3b8;
  text-decoration: line-through;
}

.timeline-item--past {
  opacity: 0.6;
}

.timeline-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.timeline-status--submitted,
.timeline-status--graded {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.timeline-status--draft {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.timeline-status--pending {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.timeline-status--finished {
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
}

.timeline-status--event {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.timeline-action-btn--success {
  background: linear-gradient(135deg, #16a34a, #10b981);
  border-color: transparent;
  color: #fff;
}

.timeline-action-btn--success:hover {
  color: #fff;
}

.timeline-action-btn--muted {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #475569;
}

.timeline-action-btn--dark {
  background: #334155;
  border-color: #334155;
  color: #fff;
}

.timeline-action-btn--dark:hover {
  color: #fff;
}

.course-thumb--gradient {
  display: grid;
  place-items: center;
  min-height: 140px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* --- EVALUATION BUILDER & FORM OVERHAUL --- */
.teacher-evaluation-builder__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .teacher-evaluation-builder__grid {
    grid-template-columns: 1fr;
  }
}

.teacher-type-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.teacher-type-selector__option {
  cursor: pointer;
  position: relative;
}

.teacher-type-selector__option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.teacher-type-selector__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.teacher-type-selector__option input:checked + .teacher-type-selector__card {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--color-primary);
  transform: translateY(-4px);
}

.teacher-type-selector__card:hover {
  border-color: var(--color-primary-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.teacher-evaluation-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.teacher-type-selector__copy strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-main);
}

.teacher-type-selector__copy small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.teacher-evaluation-builder__title-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 2px solid var(--glass-border);
  background: rgba(255,255,255,0.5);
  transition: all 0.2s;
  color: var(--text-main);
}

.teacher-evaluation-builder__title-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.teacher-evaluation-builder__config-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.teacher-evaluation-builder__config-head h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
}

.teacher-evaluation-builder__config-head p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* --- FORM FIELDS --- */
.teacher-inline-form__field {
  margin-bottom: 24px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.teacher-inline-form__field[hidden] {
  display: none;
}

.teacher-inline-form__field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.teacher-inline-form__field input[type="text"],
.teacher-inline-form__field input[type="number"],
.teacher-inline-form__field input[type="datetime-local"],
.teacher-inline-form__field textarea,
.teacher-inline-form__field select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all 0.2s;
}

.teacher-inline-form__field input:focus,
.teacher-inline-form__field select:focus,
.teacher-inline-form__field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.teacher-evaluation-form-card {
  background: transparent;
}

/* --- ANNOUNCEMENT BUILDER --- */
.teacher-announcement-builder__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .teacher-announcement-builder__grid {
    grid-template-columns: 1fr;
  }
}

.teacher-announcement-builder__side {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.teacher-announcement-builder__side-head h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
}

.teacher-announcement-builder__side-head p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.teacher-announcement-builder__actions {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}

.teacher-stack-card--announcements {
  gap: 20px;
}

.teacher-announcement-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s ease;
}

.teacher-announcement-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-soft);
}

.teacher-announcement-card__title h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.student-course-progress {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.student-course-progress__bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.student-course-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.student-course-progress__text {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
}
.dashboard-empty-copy {
  margin: 0;
  color: #94a3b8;
  font-size: 0.92rem;
}
.dashboard-empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 10px 0 4px;
}
.dashboard-empty-state-agenda {
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(248,250,252,0.95) 0%, rgba(241,245,249,0.92) 100%);
  border: 1px solid rgba(226,232,240,0.88);
}
.dashboard-empty-state__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(31,191,143,0.16) 0%, rgba(59,130,246,0.12) 100%);
}
.dashboard-agenda-card {
  display: grid;
  gap: 20px;
}
.dashboard-agenda-card__hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.dashboard-agenda-card__mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(31,191,143,0.18) 0%, rgba(59,130,246,0.14) 100%);
  color: #0f766e;
  font-size: 1.8rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}
.dashboard-agenda-card__copy-block h3 {
  margin: 0;
  font-size: 1.45rem;
}
.dashboard-agenda-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.teacher-mini-calendar {
  display: grid;
  gap: 20px;
}
.teacher-mini-calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.teacher-mini-calendar__head h3 {
  margin: 0;
  font-size: 1.7rem;
  color: #334155;
  text-transform: capitalize;
}
.teacher-mini-calendar__surface {
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
  border-radius: 18px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.teacher-mini-calendar__surface:hover {
  text-decoration: none;
  border-color: #cbd5e1;
}
.teacher-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.teacher-calendar-toolbar__filter select {
  min-width: 230px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.95rem;
}
.teacher-calendar-toolbar__nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #ef4444;
}
.teacher-calendar-toolbar__nav strong {
  color: #334155;
  font-size: 1.7rem;
  font-weight: 800;
  text-transform: capitalize;
}
.teacher-mini-calendar__table-head,
.teacher-mini-calendar__table-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.teacher-mini-calendar__table-head {
  border-top: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
}
.teacher-mini-calendar__table-head span {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
}
.teacher-mini-calendar__table-grid {
  border-left: 1px solid #e2e8f0;
}
.teacher-mini-calendar__table-cell {
  min-height: 72px;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 12px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
}
.teacher-mini-calendar__table-cell[type="button"] {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.teacher-mini-calendar__table-cell[type="button"]:hover {
  background: #f8fafc;
}
.teacher-mini-calendar__table-cell.is-empty {
  color: transparent;
  background: #fafcff;
}
.teacher-mini-calendar__table-cell.is-today {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  font-weight: 800;
}
.teacher-mini-calendar__table-cell.has-event {
  position: relative;
}
.teacher-mini-calendar__table-cell.has-event::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  position: absolute;
  bottom: 10px;
  right: 10px;
}
.teacher-mini-calendar__table-cell.has-task {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  font-weight: 800;
}
.teacher-mini-calendar__table-cell.has-mixed {
  background: linear-gradient(135deg, rgba(99,102,241,0.14) 0%, rgba(31,191,143,0.14) 100%);
  color: #0f766e;
  font-weight: 800;
}
.teacher-mini-calendar__table-cell.has-task::after,
.teacher-mini-calendar__table-cell.has-mixed::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #6366f1;
  position: absolute;
  bottom: 10px;
  right: 10px;
}
.teacher-mini-calendar__table-cell.has-mixed::after {
  background: linear-gradient(135deg, #6366f1 0%, #1fbf8f 100%);
}
.teacher-mini-calendar__hint {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.teacher-calendar-toolbar__nav-link {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.teacher-calendar-toolbar__nav-link:hover {
  color: #10b981;
}

.teacher-mini-calendar__table-cell {
  min-height: 80px;
  height: auto;
  display: grid;
  align-content: start;
  align-items: stretch;
  padding: 0;
  background: #ffffff;
}

.teacher-mini-calendar__table-cell.is-empty {
  background: #f8fafc;
}

.teacher-mini-calendar__table-cell.is-today {
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
}

.teacher-mini-calendar__table-cell.has-event::after {
  display: none;
}

.teacher-mini-calendar__day-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 4px;
  text-align: left;
  cursor: pointer;
}

.teacher-mini-calendar__table-cell:not(.has-event) .teacher-mini-calendar__day-trigger {
  min-height: 100%;
  padding-bottom: 16px;
}

.teacher-mini-calendar__day-trigger:hover {
  background: rgba(15, 23, 42, 0.02);
}

.teacher-mini-calendar__day-trigger--static {
  cursor: default;
}

.teacher-mini-calendar__day-number {
  font-weight: 800;
}

.teacher-mini-calendar__day-add {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
}

.teacher-mini-calendar__events {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.teacher-mini-calendar__event-pill,
.teacher-mini-calendar__more {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.teacher-mini-calendar__event-pill:hover,
.teacher-mini-calendar__more:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.12);
  filter: brightness(0.98);
}

.teacher-mini-calendar__event-pill.is-course {
  background: #22c55e;
  color: #ffffff;
}

.teacher-mini-calendar__event-pill.is-reminder {
  background: #eab308;
  color: #1f2937;
}

.teacher-mini-calendar__event-pill.is-general {
  background: #3b82f6;
  color: #ffffff;
}

.teacher-mini-calendar__more {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

.teacher-calendar-popover[hidden] {
  display: none;
}

.teacher-calendar-popover {
  position: fixed;
  inset: 0;
  z-index: 1250;
}

.teacher-calendar-popover__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
}

.teacher-calendar-popover__panel {
  position: relative;
  width: min(92vw, 680px);
  max-height: calc(100vh - 72px);
  overflow: auto;
  margin: 36px auto;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.teacher-calendar-popover__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  color: #334155;
  cursor: pointer;
}

.teacher-calendar-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 52px;
}

.teacher-calendar-popover__header h2,
.teacher-calendar-popover__card h3,
.teacher-calendar-popover__meta p,
.teacher-calendar-popover__description {
  margin: 0;
}

.teacher-calendar-popover__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 0.8rem;
  font-weight: 800;
}

.teacher-calendar-popover__list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.teacher-calendar-popover__card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px 18px 18px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: 0 16px 26px rgba(15, 23, 42, 0.06);
}

.teacher-calendar-popover__card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 20px 0 0 20px;
  background: var(--teacher-calendar-event-color, #3b82f6);
}

.teacher-calendar-popover__card-head,
.teacher-calendar-popover__actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.teacher-calendar-popover__meta {
  display: grid;
  gap: 6px;
}

.teacher-calendar-popover__meta p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.teacher-calendar-popover__description {
  color: #334155;
  line-height: 1.7;
}

body.teacher-calendar-popover-open {
  overflow: hidden;
}
.dashboard-side-card--teacher-calendar {
  position: static;
  overflow: hidden;
}
.event-quick-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}
.event-quick-modal.is-open {
  display: block;
}
.event-quick-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(4px);
}
.event-quick-modal__dialog {
  position: relative;
  width: min(92vw, 720px);
  margin: 6vh auto;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
  padding: 26px;
}
.event-quick-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}
.event-quick-modal__header h2 {
  margin: 0 0 8px;
  color: #102130;
}
.event-quick-modal__header p:last-child {
  margin: 0;
  color: #64748b;
}
.event-quick-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.event-quick-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.event-quick-form__field {
  display: grid;
  gap: 7px;
}
.event-quick-form__field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}
.event-quick-form__field input,
.event-quick-form__field select,
.event-quick-form__field textarea,
.event-quick-form__static {
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: #1e293b;
}
.event-quick-form__static {
  background: #f8fafc;
}
.event-quick-form__checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
}
.event-quick-form__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.student-mini-calendar {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.student-mini-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 0.9rem;
}
.student-mini-calendar__header strong {
  color: #1e293b;
  font-size: 1.05rem;
}
.student-mini-calendar__weekdays,
.student-mini-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.student-mini-calendar__weekdays span {
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
  padding: 8px 0;
}
.student-mini-calendar__cell {
  min-height: 54px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px;
  border-radius: 12px;
  color: #334155;
  background: #fff;
  font-weight: 600;
}
.student-mini-calendar__cell.is-empty {
  visibility: hidden;
}
.student-mini-calendar__cell.is-today {
  border-color: #0ea5e9;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.18);
}
.student-mini-calendar__cell.has-activity {
  background: rgba(31, 191, 143, 0.14);
  border-color: rgba(31, 191, 143, 0.36);
  color: #0f766e;
}
.student-calendar-empty {
  margin: 14px 0 0;
  color: #64748b;
}
.student-calendar-activity-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.student-calendar-activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  max-height: 140px;
  overflow: hidden;
  transform-origin: top;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease,
    max-height 0.28s ease,
    margin 0.24s ease,
    padding 0.24s ease,
    border-width 0.24s ease;
}
.student-calendar-activity-date {
  min-width: 62px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  font-weight: 800;
}
.student-calendar-activity-copy {
  display: grid;
  gap: 4px;
}
.student-calendar-activity-copy strong {
  color: #1e293b;
}
.student-calendar-activity-copy span {
  color: #64748b;
  font-size: 0.88rem;
}
.student-calendar-activity-item.is-past {
  opacity: 0.6;
}

.student-calendar-activity-item.is-hidden-past {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  pointer-events: none;
}

.student-calendar-past-toggle {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  color: #475569;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.student-calendar-past-toggle:hover {
  transform: translateY(-1px);
  border-color: #94a3b8;
  background: #ffffff;
}

.student-calendar-past-list {
  display: grid;
  gap: 12px;
}

.student-calendar-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.student-calendar-modal[hidden] {
  display: none;
}

.student-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 20px;
}

.student-calendar-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}

.student-calendar-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 16px;
}

.student-calendar-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
}

.student-calendar-modal__header,
.student-calendar-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-calendar-modal__header h2,
.student-calendar-modal__meta,
.student-calendar-modal__description {
  margin: 0;
}

.student-calendar-modal__body {
  display: grid;
  gap: 10px;
}

.student-calendar-modal__meta {
  color: #526579;
}

.student-calendar-modal__description {
  color: #334155;
  line-height: 1.7;
}

.student-calendar-modal__dialog--rich {
  width: min(100%, 680px);
  padding: 0;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.student-calendar-modal__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 28px 22px;
  background:
    radial-gradient(circle at top right, rgba(31, 191, 143, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(248, 250, 252, 0.96));
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.student-calendar-modal__eyebrow {
  margin: 0 0 8px;
  color: #10b981;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.student-calendar-modal__hero h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.student-calendar-modal__hero-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.student-calendar-modal__day-badge,
.student-calendar-modal__count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.student-calendar-modal__day-badge {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.student-calendar-modal__count-badge {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.student-calendar-modal__event-list {
  display: grid;
  gap: 14px;
  padding: 24px 28px 8px;
  max-height: 60vh;
  overflow: auto;
}

.student-calendar-modal__event-card {
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.student-calendar-modal__event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.student-calendar-modal__event-head h3,
.student-calendar-modal__event-line,
.student-calendar-modal__event-desc {
  margin: 0;
}

.student-calendar-modal__event-head h3 {
  color: #0f172a;
  font-size: 1rem;
}

.student-calendar-modal__event-meta {
  display: grid;
  gap: 8px;
}

.student-calendar-modal__event-line {
  color: #526579;
  font-size: 0.9rem;
  line-height: 1.6;
}

.student-calendar-modal__event-desc {
  color: #334155;
  line-height: 1.7;
}

.student-calendar-modal__event-actions {
  display: flex;
  justify-content: flex-end;
}

.student-calendar-modal__empty {
  padding: 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
  text-align: center;
}

.student-calendar-modal__actions {
  padding: 0 28px 28px;
}

body.student-calendar-modal-open {
  overflow: hidden;
}

.student-calendar-page__hint {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 0.94rem;
  line-height: 1.6;
}

.student-calendar-table__cell.has-events {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.student-calendar-day-button {
  position: relative;
  border-radius: 16px;
}

.student-calendar-day-button::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 0.22s ease;
}

.student-calendar-day-button:hover::after,
.student-calendar-day-button:focus-visible::after {
  border-color: rgba(31, 191, 143, 0.24);
}

.student-calendar-day-button__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.student-calendar-day-button__label::before {
  content: "•";
  color: #10b981;
  font-size: 0.95rem;
  line-height: 1;
}

.student-calendar-modal__dialog--rich {
  border: 1px solid rgba(226, 232, 240, 0.92);
}

.student-calendar-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.student-calendar-modal__close:hover {
  background: #fff;
  color: #0f172a;
}

.student-calendar-modal__title-wrap {
  display: grid;
  gap: 6px;
}

.student-calendar-modal__event-kicker {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.student-calendar-modal__event-card {
  position: relative;
  overflow: hidden;
}

.student-calendar-modal__event-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--student-calendar-accent, #3788d8);
}

.student-calendar-modal__event-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-calendar-modal__event-line::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.72);
  flex-shrink: 0;
}
.student-shared-calendar {
  margin-top: 16px;
}

.student-shared-calendar--page .teacher-mini-calendar__surface {
  min-height: 0;
}
.admin-card-title {
  font-size: 1.25rem; font-weight: 700; color: #2c3e50; margin-bottom: 24px;
  padding-bottom: 14px; border-bottom: 1px solid #f1f3f5;
  display: flex; align-items: center; gap: 10px;
}
.admin-header-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px; padding-bottom: 18px; border-bottom: 1px solid rgba(148,163,184,0.22);
}
.admin-header-actions h1 { font-size: 2rem; color: #102130; margin: 0; font-weight: 800; letter-spacing: -0.04em; }
.table-admin { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-admin th {
  background: rgba(248,250,252,0.92); color: #495057; padding: 16px;
  font-weight: 700; text-align: left; font-size: 0.85rem;
  border-bottom: 1px solid rgba(148,163,184,0.24); text-transform: uppercase; letter-spacing: 0.6px;
}
.table-admin td {
  padding: 16px; border-bottom: 1px solid #f1f3f5;
  color: #343a40; font-size: 0.95rem; vertical-align: middle;
}
.table-admin tr:hover td { background: rgba(255,247,245,0.82); }
.admin-form label { display: block; font-weight: 600; margin-bottom: 8px; color: #495057; font-size: 0.92rem; }
.admin-form input[type="text"],
.admin-form input[type="date"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
  width: 100%; padding: 12px 16px; border: 1px solid rgba(148,163,184,0.24);
  border-radius: 14px; font-size: 0.95rem; margin-bottom: 20px; background: rgba(255,255,255,0.88);
  transition: border-color 0.25s, box-shadow 0.25s;
  color: #333;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12);
}
.admin-form select[multiple] {
  padding: 8px; height: auto; min-height: 120px;
  border-radius: 14px; background: rgba(255,255,255,0.88);
}
.admin-form select[multiple] option { padding: 6px 10px; border-radius: 6px; }
.admin-form select[multiple] option:checked { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.admin-form select[multiple]:disabled { background: rgba(241,245,249,0.8); color: #94a3b8; cursor: not-allowed; }
.admin-form-actions { display: flex; gap: 14px; margin-top: 14px; }
.admin-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-inline-fields > div {
  min-width: 0;
}

.admin-inline-fields input,
.admin-inline-fields select,
.admin-inline-fields textarea {
  width: 100%;
  max-width: 100%;
}
.flash-msg {
  padding: 16px 20px; border-radius: 8px; margin-bottom: 28px;
  font-size: 0.95rem; display: flex; align-items: center; gap: 12px;
  font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.flash-msg.success { background: #e8f5e9; color: #2e7d32; border-left: 5px solid #4caf50; }
.flash-msg.error { background: #ffebee; color: #c62828; border-left: 5px solid #ef5350; }
.badge-status {
  padding: 5px 12px; border-radius: 20px; font-size: 0.75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; display: inline-block;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.badge-status.\31, .badge-status.activo, .badge-status.publico { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge-status.inactivo, .badge-status.oculto, .badge-status.cerrado { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.badge-status.\30 { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.badge-status.planificado { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

.btn-sm { padding: 6px 14px; font-size: 0.82rem; border-radius: 4px; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #e67e22; text-decoration: none; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; text-decoration: none; }

/* --- ADMIN DASHBOARD REFRESH --- */
.nav-link-icon {
  display: inline-flex;
  width: 22px;
  justify-content: center;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-bottom: 26px;
}

.admin-kpi-card {
  padding: 24px 24px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.admin-kpi-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-kpi-card__label {
  margin: 0;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-kpi-card__value {
  display: block;
  font-size: 3rem;
  line-height: 1;
  color: #0f172a;
  margin-bottom: 12px;
}

.admin-kpi-card__meta {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.admin-kpi-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-kpi-card__trend--up {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.admin-kpi-card__trend--down {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  margin-bottom: 24px;
}

.admin-card-title--stacked {
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-card-title--stacked h3 {
  margin: 6px 0 0;
  color: #0f172a;
  font-size: 1.6rem;
}

.admin-section-kicker {
  display: inline-block;
  color: #0d8a68;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-section-note {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.7;
}

.admin-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 18px;
  align-items: end;
  min-height: 290px;
  margin-top: 12px;
}

.admin-bar-chart__item {
  display: grid;
  gap: 10px;
  align-items: end;
}

.admin-bar-chart__value {
  text-align: center;
  font-weight: 800;
  color: #0f172a;
}

.admin-bar-chart__bar-wrap {
  height: 190px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.48), rgba(241, 245, 249, 0.92));
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.admin-bar-chart__bar {
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(180deg, #3b82f6, #10b981);
}

.admin-bar-chart__label {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.4;
}

.admin-activity-list {
  display: grid;
  gap: 14px;
}

.admin-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-activity-item__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-activity-item__badge--usuario {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.admin-activity-item__badge--entrega {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.admin-activity-item__badge--evento {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
}

.admin-activity-item__content {
  display: grid;
  gap: 4px;
}

.admin-activity-item__content strong {
  color: #0f172a;
}

.admin-activity-item__content span,
.admin-activity-item time {
  color: #64748b;
  font-size: 0.9rem;
}

.admin-empty-state {
  display: grid;
  gap: 6px;
  padding: 20px 0;
  color: #64748b;
}

.admin-empty-state strong {
  color: #0f172a;
}

.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-counter-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(13, 138, 104, 0.12);
  color: #0d8a68;
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(170px, 1fr)) auto;
  gap: 16px;
  align-items: end;
}

.admin-inline-fields__actions {
  display: flex;
  justify-content: flex-end;
}

.period-row-form {
  display: block;
}

.period-row-form__name input {
  margin-bottom: 0;
}

.period-status-select {
  margin-bottom: 0;
}

.period-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.admin-modal.is-open {
  display: flex;
}

.admin-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(5px);
}

.admin-modal__dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}

.admin-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-modal__header h3 {
  margin: 0;
  color: #0f172a;
}

.admin-modal__close {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.admin-modal__body {
  color: #475569;
  line-height: 1.7;
}

.admin-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* --- REPORTES DOCENTE --- */
.teacher-reports-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  margin-bottom: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.10), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #fff8f6 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}
.teacher-reports-eyebrow {
  margin: 0 0 10px;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.teacher-reports-hero h1 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.teacher-reports-subtitle {
  max-width: 680px;
  margin: 0;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.7;
}
.teacher-reports-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}
.teacher-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.teacher-report-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.teacher-report-stat:hover {
  transform: translateY(-2px);
  border-color: #fecaca;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}
.teacher-report-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.teacher-report-stat-value {
  color: #0f172a;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.teacher-report-stat-label {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
}
.teacher-report-stat-blue .teacher-report-stat-icon {
  background: #dbeafe;
  color: #2563eb;
}
.teacher-report-stat-amber .teacher-report-stat-icon {
  background: #fef3c7;
  color: #d97706;
}
.teacher-report-stat-green .teacher-report-stat-icon {
  background: #dcfce7;
  color: #16a34a;
}
.teacher-report-stat-rose .teacher-report-stat-icon {
  background: #ffe4e6;
  color: #e11d48;
}
.teacher-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
}
.teacher-report-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.teacher-report-panel:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}
.teacher-report-panel-wide {
  grid-column: 1 / -1;
}
.teacher-report-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.teacher-report-kicker {
  margin: 0 0 6px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.teacher-report-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.teacher-report-panel-meta {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.5;
}
.teacher-report-table-wrap {
  overflow-x: auto;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  background: #fff;
}
.teacher-report-table {
  min-width: 100%;
}
.teacher-report-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.teacher-report-table td {
  color: #1e293b;
  border-bottom: 1px solid #eef2f7;
}
.teacher-report-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}
.teacher-report-table tbody tr:hover td {
  background: #fff7f5;
}
.teacher-report-primary-cell {
  font-weight: 600;
  color: #0f172a;
}
.teacher-report-number {
  font-weight: 700;
  color: #111827;
}
.teacher-report-muted {
  color: #64748b;
  white-space: nowrap;
}
.teacher-report-empty-cell {
  text-align: center;
  color: #94a3b8;
  padding: 28px 12px;
}
.teacher-report-status,
.teacher-report-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.teacher-report-status {
  background: #fff7ed;
  color: #c2410c;
}
.teacher-report-chip {
  background: #eff6ff;
  color: #1d4ed8;
}

/* --- REPORTES ADMIN --- */
.admin-reports-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  margin-bottom: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(31, 191, 143, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 252, 249, 0.94) 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.admin-reports-kicker {
  margin: 0 0 10px;
  color: #10906d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-reports-hero h1 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.admin-reports-subtitle {
  max-width: 700px;
  margin: 0;
  color: #52697a;
  font-size: 0.98rem;
  line-height: 1.7;
}

.admin-reports-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.admin-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.admin-report-stat {
  padding: 22px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.admin-report-stat::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-radius: 999px;
}

.admin-report-stat-blue::after { background: #4361ee; }
.admin-report-stat-violet::after { background: #4f46e5; }
.admin-report-stat-green::after { background: #16a34a; }
.admin-report-stat-cyan::after { background: #06b6d4; }
.admin-report-stat-amber::after { background: #f59e0b; }
.admin-report-stat-rose::after { background: #e11d48; }
.admin-report-stat-slate::after { background: #475569; }
.admin-report-stat-emerald::after { background: #10b981; }

.admin-report-stat-value {
  color: #243444;
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1;
}

.admin-report-stat-label {
  margin-top: 12px;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
}

.admin-report-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.admin-report-panel-wide {
  grid-column: 1 / -1;
}

.admin-report-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-report-panel-kicker {
  margin: 0 0 6px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-report-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-report-table-wrap {
  overflow-x: auto;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  background: #fff;
}

.admin-report-table {
  min-width: 100%;
}

.admin-report-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.admin-report-table td {
  color: #1e293b;
  border-bottom: 1px solid #eef2f7;
}

.admin-report-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}

.admin-report-table tbody tr:hover td {
  background: #fff7f5;
}

.admin-report-primary-cell {
  font-weight: 600;
  color: #0f172a;
}

.admin-report-empty-cell {
  text-align: center;
  color: #94a3b8;
  padding: 28px 12px;
}

.admin-report-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #eff6ff;
  color: #1d4ed8;
}

.panel-selector-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 0 8px;
}

.panel-selector-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.panel-selector-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6366f1;
}

.panel-selector-hero h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  color: #0f172a;
}

.panel-selector-hero p:last-child {
  margin: 0;
  max-width: 700px;
  color: #475569;
  line-height: 1.6;
}

.panel-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.panel-selector-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.panel-selector-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.12);
}

.panel-selector-card-admin:hover {
  border-color: #2563eb;
}

.panel-selector-card-teacher:hover {
  border-color: #16a34a;
}

.panel-selector-card-student:hover {
  border-color: #7c3aed;
}

.panel-selector-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: #eff6ff;
  color: #2563eb;
}

.panel-selector-card-teacher .panel-selector-icon {
  background: #ecfdf3;
  color: #16a34a;
}

.panel-selector-card-student .panel-selector-icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.panel-selector-copy h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #0f172a;
}

.panel-selector-copy p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.panel-selector-cta {
  margin-top: auto;
  font-weight: 700;
  color: #0f172a;
}

/* --- COURSE EXPERIENCE REFINEMENT --- */
.courses-shell {
  padding: 30px 32px 34px;
}

.courses-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.courses-shell-head h3 {
  margin-bottom: 10px;
}

.courses-shell-subtitle {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

.courses-shell-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.courses-shell-count {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
}

.courses-toolbar {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.72);
}

#courses-grid {
  gap: 28px;
}

.course-card {
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.course-card-media {
  display: block;
  position: relative;
}

.course-card-media:hover {
  text-decoration: none;
}

.course-card .course-thumb {
  height: 184px;
  display: block;
}

.course-card .course-info {
  padding: 18px 22px 22px;
}

.course-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 7px 11px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(31, 191, 143, 0.12);
  color: #0d8a68;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-card .course-name {
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.course-card .course-period {
  font-size: 0.88rem;
  color: #6b7f90;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-card .course-menu-btn {
  width: 42px;
  height: 42px;
  bottom: 18px;
  right: 18px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.88);
  border-color: rgba(203, 213, 225, 0.78);
  font-size: 1.2rem;
}

.courses-empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 46px 20px 22px;
  color: #64748b;
  text-align: center;
}

.courses-empty-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: rgba(31, 191, 143, 0.12);
  color: #10906d;
  font-size: 1.8rem;
}

#course-layout {
  align-items: flex-start;
}

#course-sidebar {
  width: 300px;
  min-width: 280px;
  margin: 20px 0 0 20px;
  border-radius: 24px;
  overflow: hidden;
  position: sticky;
  top: 144px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
}

#course-sidebar.collapsed {
  width: 0;
  min-width: 0;
  margin-left: 0;
  opacity: 0;
}

.course-sidebar-shell {
  padding: 18px;
}

.course-sidebar-head {
  padding: 18px;
  margin-bottom: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.course-sidebar-head h2 {
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.course-sidebar-head p {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.84rem;
  line-height: 1.6;
}

.course-sidebar-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #72f0cf;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#course-sidebar .sidebar-section {
  margin-bottom: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  overflow: hidden;
}

#course-sidebar .sidebar-topic-title {
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 700;
}

#course-sidebar .sidebar-topic-title.active-section {
  background: linear-gradient(135deg, rgba(31, 191, 143, 0.22) 0%, rgba(31, 191, 143, 0.08) 100%);
}

#course-sidebar .sidebar-topic-title .chevron {
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.76);
}

#course-sidebar .sidebar-section-items {
  padding: 8px;
}

#course-sidebar .sidebar-section-items li {
  list-style: none;
}

#course-sidebar .sidebar-section-items li + li {
  margin-top: 6px;
}

#course-sidebar .sidebar-section-items a,
.sidebar-item-disabled {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
}

#course-sidebar .sidebar-section-items a {
  color: rgba(248, 250, 252, 0.92);
}

#course-sidebar .sidebar-section-items a:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-item-disabled {
  color: rgba(148, 163, 184, 0.88);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-item-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-item-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sidebar-item-label {
  color: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sidebar-item-meta,
.sidebar-empty-state,
.sidebar-empty-panel p {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.76rem;
}

.sidebar-empty-state {
  padding: 12px 16px 16px;
}

.sidebar-empty-state--student {
  color: rgba(203, 213, 225, 0.72);
}

.sidebar-empty-state--preview {
  color: #dbeafe;
}

.sidebar-item-check {
  color: #22c55e;
  font-weight: 800;
}

.sidebar-empty-panel {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;
}

.sidebar-empty-panel strong {
  display: block;
  margin-bottom: 8px;
}

.sidebar-toggle-btn {
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #243444;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

#course-main {
  padding: 28px 32px 40px;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: stretch;
  padding: 30px;
  margin-bottom: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.course-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.course-hero-eyebrow {
  margin-bottom: 12px;
  color: #0d8a68;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.course-hero-subtitle {
  max-width: 600px;
  margin-top: 14px;
  color: #5d7384;
  font-size: 0.98rem;
  line-height: 1.7;
}

.course-hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-welcome-banner {
  width: 100%;
  max-width: 560px;
  height: 280px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
}

.course-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.course-meta-links {
  margin-bottom: 0;
  flex: 1;
}

.course-section {
  border-radius: 22px;
}

.course-section-header {
  padding: 18px 22px;
}

.course-section-body {
  padding: 10px 22px 18px;
}

.course-activity {
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
}

.course-activity-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.course-activity-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.course-activity-copy a,
.course-activity-disabled {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
}

.course-activity-disabled {
  color: #6b7280;
}

.course-activity-meta {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.55;
}

.course-empty-note {
  color: #7c8d9d;
  font-size: 0.88rem;
  padding: 10px 0 6px;
}

.course-empty-note--student,
.course-empty-note--preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
}

.course-empty-note--student {
  color: #94a3b8;
  background: rgba(248, 250, 252, 0.9);
}

.course-empty-note__icon {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.course-empty-note--preview {
  display: grid;
  gap: 4px;
  background: rgba(219, 234, 254, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #475569;
}

.course-empty-note--preview strong {
  color: #334155;
}

.course-activity-evaluation {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.course-evaluation-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.course-evaluation-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.course-evaluation-status.is-submitted {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.course-evaluation-status.is-draft {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.course-evaluation-status.is-pending {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.course-evaluation-status.is-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.course-evaluation-status.is-graded {
  background: rgba(21, 128, 61, 0.16);
  color: #166534;
}

.course-evaluation-warning {
  color: #ea580c;
  font-size: 0.82rem;
  font-weight: 700;
}

.course-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.teacher-course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.teacher-course-action-btn {
  min-width: 220px;
  justify-content: center;
  text-align: center;
  padding: 12px 18px;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.student-calendar-controls {
  gap: 16px;
  flex-wrap: wrap;
}

.student-calendar-controls select {
  flex: 1 1 220px;
  min-width: 200px;
}

.student-calendar-btn {
  margin-left: 8px;
}

.student-calendar-link {
  margin-top: 14px;
}

/* --- FINAL RESPONSIVE HARDENING --- */
@media (max-width: 768px) {
  .teacher-course-actions {
    gap: 14px;
  }

  .teacher-course-action-btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .student-calendar-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .student-calendar-btn {
    margin-left: 0;
  }

  .course-hero {
    grid-template-columns: 1fr !important;
    gap: 18px;
    padding: 22px;
  }

  .course-hero-copy,
  .course-hero-media {
    min-width: 0;
  }

  .course-welcome-banner {
    max-width: 100%;
    height: 220px;
  }

  .admin-reports-hero {
    flex-direction: column;
    padding: 24px 22px;
  }

  .admin-reports-hero h1 {
    font-size: 1.8rem;
  }

  .admin-reports-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-report-grid {
    grid-template-columns: 1fr;
  }

  #admin-wrapper {
    display: block;
  }

  #admin-sidebar {
    width: 100%;
    min-height: auto;
    box-shadow: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  #admin-sidebar .sidebar-header {
    padding: 18px 18px 14px;
    text-align: left;
  }

  #admin-sidebar .sidebar-header h2 {
    font-size: 1.05rem;
  }

  #admin-sidebar .sidebar-nav {
    width: 100%;
    overflow: hidden;
  }

  #admin-sidebar .nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px 12px 14px;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  #admin-sidebar .nav-list::-webkit-scrollbar {
    display: none;
  }

  #admin-sidebar .nav-item {
    flex: 0 0 auto;
  }

  #admin-sidebar .nav-item .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
  }

  #admin-sidebar .nav-item .nav-link:hover,
  #admin-sidebar .nav-item .nav-link.active {
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  #admin-main {
    width: 100%;
    padding: 22px 14px 30px;
    overflow-x: hidden;
  }

  .admin-card {
      padding: 20px 16px;
      border-radius: 18px;
    }

    .admin-dashboard-grid {
      grid-template-columns: 1fr;
    }

    .admin-inline-fields {
      grid-template-columns: 1fr;
    }

    .admin-header-actions {
      flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .admin-header-actions h1 {
    font-size: 1.9rem;
  }

  .admin-header-actions .btn {
    width: fit-content;
    max-width: 100%;
  }

  .admin-card form[method="GET"],
  .admin-card form[method="POST"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .admin-card form[method="GET"] > div,
  .admin-card form[method="POST"] > div {
    width: 100%;
    min-width: 0;
  }

  .admin-inline-fields {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .admin-card label,
  .admin-form label {
    display: block;
    width: 100%;
  }

  .admin-card input[type="text"],
  .admin-card input[type="date"],
  .admin-card input[type="datetime-local"],
  .admin-card input[type="number"],
  .admin-card input[type="url"],
  .admin-card select,
  .admin-card textarea,
  .admin-form input[type="text"],
  .admin-form input[type="date"],
  .admin-form input[type="datetime-local"],
  .admin-form input[type="number"],
  .admin-form input[type="url"],
  .admin-form select,
  .admin-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
  }

  .table-admin {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  #course-layout {
    display: block;
  }

  #course-sidebar {
    width: auto;
    min-width: 0;
    margin: 12px 12px 0;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
  }

  #course-sidebar.collapsed {
    width: auto;
    margin: 12px 12px 0;
    opacity: 1;
    overflow: visible;
  }

  #course-sidebar.collapsed .course-sidebar-shell {
    display: none;
  }

  .sidebar-toggle-btn {
    right: 14px;
    bottom: -16px;
  }
}

@media (max-width: 480px) {
  .teacher-course-actions {
    gap: 12px;
  }

  .teacher-course-action-btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.92rem;
    border-radius: 20px;
  }

  .student-calendar-controls {
    gap: 12px;
  }

  .student-calendar-controls select,
  .student-calendar-btn {
    width: 100%;
  }

  .course-hero {
    padding: 18px;
  }

  .course-hero h1 {
    font-size: 1.75rem;
    line-height: 1.05;
  }

  .course-hero-subtitle {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .course-welcome-banner {
    height: 180px;
    border-radius: 18px;
  }

  .admin-report-stat {
    padding: 18px 16px;
  }

  .admin-report-stat-value {
    font-size: 1.75rem;
  }

  .admin-report-panel {
    padding: 18px 16px 14px;
  }

  #admin-main {
    padding: 18px 12px 28px;
  }

  .admin-header-actions h1 {
    font-size: 1.65rem;
  }

  .event-quick-modal__dialog {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .event-quick-form__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .student-mini-calendar__weekdays span {
    font-size: 0.7rem;
    padding: 6px 0;
  }

  .student-mini-calendar__cell {
    min-height: 40px;
    font-size: 0.78rem;
  }

  .student-calendar-activity-item {
    padding: 10px 12px;
  }

  .student-calendar-activity-date {
    min-width: 54px;
    padding: 7px 8px;
  }

  #admin-sidebar .nav-item .nav-link {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .admin-card {
      padding: 18px 14px;
    }

    .admin-kpi-grid,
    .admin-dashboard-grid {
      gap: 16px;
    }

    .admin-activity-item {
      grid-template-columns: 1fr;
    }

    .admin-quick-actions,
    .admin-modal__actions,
    .period-row-actions {
      flex-direction: column;
      align-items: stretch;
    }

    .admin-inline-fields {
      gap: 12px;
  }

  .admin-card form[method="GET"] .btn,
  .admin-card form[method="POST"] .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* --- LAST-MILE MOBILE FIXES --- */
@media (max-width: 900px) {
  .student-calendar-controls {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  .student-calendar-controls select,
  .student-calendar-controls .student-calendar-btn {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 820px) {
  .course-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
    overflow: hidden;
  }

  .course-hero-copy,
  .course-hero-media {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .course-hero-media {
    order: 2;
  }

  .course-hero-copy {
    order: 1;
  }

  .course-welcome-banner {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}

/* --- TEACHER LMS COURSE HUB --- */
.teacher-lms-shell {
  display: grid;
  gap: 24px;
}

.teacher-lms-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239,255,251,0.86));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.08);
}

.teacher-lms-hero__copy {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.teacher-lms-hero__eyebrow,
.teacher-lms-block__eyebrow {
  margin: 0;
  color: #10b981;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.teacher-lms-hero h1,
.teacher-lms-block h2 {
  margin: 0;
  color: #0f172a;
  line-height: 1.05;
}

.teacher-lms-hero__meta,
.teacher-lms-hero__description {
  margin: 0;
  color: #64748b;
  line-height: 1.75;
}

.teacher-lms-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 600;
}

.teacher-lms-hero__tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.teacher-lms-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.teacher-edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
}

.teacher-edit-toggle.is-active {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.teacher-edit-toggle__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.teacher-edit-toggle.is-active .teacher-edit-toggle__dot {
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.teacher-lms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.teacher-lms-tab {
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #475569;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.teacher-lms-tab.is-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(52, 211, 153, 0.12));
  color: #047857;
  border-color: rgba(16, 185, 129, 0.24);
}

.teacher-lms-panel,
.teacher-lms-block {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.08);
}

.teacher-lms-panel {
  padding: 26px;
}

.teacher-lms-overview,
.teacher-course-sections,
.teacher-progress-grid,
.teacher-stack-cards {
  display: grid;
  gap: 20px;
}

.teacher-lms-summary-grid,
.teacher-lms-dual-grid {
  display: grid;
  gap: 18px;
}

.teacher-lms-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.teacher-lms-dual-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.teacher-lms-summary-card {
  padding: 22px 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 12px;
}

.teacher-lms-summary-card--link {
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.teacher-lms-summary-card--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.09);
  border-color: rgba(16, 185, 129, 0.22);
}

.teacher-lms-summary-card__label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.teacher-lms-summary-card strong {
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
}

.teacher-lms-summary-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.teacher-lms-summary-card--warning {
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.98), rgba(254, 215, 170, 0.92));
  border-color: rgba(249, 115, 22, 0.18);
}

.teacher-lms-summary-card--warning strong,
.teacher-lms-summary-card--warning p,
.teacher-lms-summary-card--warning .teacher-lms-summary-card__label {
  color: #c2410c;
}

.teacher-lms-summary-card--success {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(209, 250, 229, 0.92));
  border-color: rgba(16, 185, 129, 0.16);
}

.teacher-lms-summary-card--success strong,
.teacher-lms-summary-card--success p,
.teacher-lms-summary-card--success .teacher-lms-summary-card__label {
  color: #047857;
}

.teacher-course-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(254, 240, 138, 0.22), rgba(253, 230, 138, 0.32));
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.teacher-course-alert-banner__copy {
  display: grid;
  gap: 6px;
}

.teacher-course-alert-banner__copy strong {
  color: #92400e;
}

.teacher-course-alert-banner__copy p {
  margin: 0;
  color: #a16207;
}

.teacher-lms-block {
  padding: 24px 26px;
}

.teacher-lms-block__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.teacher-empty-state,
.teacher-empty-inline {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.teacher-inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.teacher-inline-form--participant {
  grid-template-columns: minmax(0, 1fr) auto;
}

.teacher-inline-form__submit {
  width: auto;
  justify-self: end;
  align-self: end;
}

.teacher-inline-form__field {
  display: grid;
  gap: 6px;
}

.teacher-inline-form__field--wide {
  grid-column: span 2;
}

.teacher-inline-form__field label,
.teacher-inline-form__checkbox span {
  color: #334155;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.teacher-inline-form input,
.teacher-inline-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
}

.teacher-inline-form__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}

.teacher-inline-editor {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.teacher-inline-editor summary {
  cursor: pointer;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 12px;
}

.teacher-course-section-card,
.teacher-stack-card {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.teacher-course-section-card__head,
.teacher-stack-card__head,
.teacher-resource-item,
.teacher-stack-list__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.teacher-course-section-card h3,
.teacher-stack-card h3 {
  margin: 0 0 6px;
  color: #0f172a;
}

.teacher-course-section-card p,
.teacher-stack-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.72;
}

.teacher-course-section-card__meta,
.teacher-resource-item__actions,
.teacher-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.teacher-resource-list,
.teacher-stack-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.teacher-resource-item {
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.teacher-resource-item__copy {
  display: grid;
  gap: 8px;
}

.teacher-resource-item__copy a,
.teacher-resource-item__title {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.teacher-resource-item__copy p,
.teacher-table-note,
.teacher-progress-card small {
  color: #64748b;
  font-size: 0.9rem;
}

.teacher-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
}

.teacher-chip--muted {
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
}

.teacher-chip--soft {
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
}

.teacher-btn-outline {
  background: #ffffff;
  color: #047857;
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: none;
}

.teacher-btn-outline:hover {
  background: rgba(236, 253, 245, 0.72);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.56);
}

.teacher-icon-action {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.teacher-icon-action:hover {
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.teacher-icon-action--success {
  background: #22c55e;
  color: #ffffff;
}

.teacher-icon-action--success:hover {
  background: #16a34a;
  color: #ffffff;
}

.teacher-icon-action--danger {
  background: rgba(254, 226, 226, 0.9);
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.24);
}

.teacher-icon-action--danger:hover {
  background: rgba(254, 202, 202, 0.96);
  color: #991b1b;
}

.teacher-btn-dark-outline {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  font-weight: 600;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.teacher-btn-dark-outline:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.teacher-btn-neutral {
  background: #ffffff;
  color: #475569;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: none;
}

.teacher-btn-neutral:hover {
  background: rgba(248, 250, 252, 0.92);
  color: #334155;
}

.teacher-btn-danger-outline {
  background: #ffffff;
  color: #b91c1c;
  border: 1px solid rgba(248, 113, 113, 0.34);
  box-shadow: none;
}

.teacher-btn-danger-outline:hover {
  background: rgba(254, 242, 242, 0.92);
  color: #991b1b;
}

.teacher-collapsible-panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.28s ease, opacity 0.24s ease, margin-top 0.24s ease;
  opacity: 0;
  margin-top: 0;
  visibility: hidden;
  pointer-events: none;
}

.teacher-collapsible-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 18px;
  visibility: visible;
  pointer-events: auto;
}

.teacher-collapsible-panel > * {
  min-height: 0;
}

.teacher-section-create-toggle {
  white-space: nowrap;
}

.teacher-table-wrap {
  overflow-x: auto;
}

.teacher-grade-table td,
.teacher-grade-table th {
  white-space: nowrap;
  vertical-align: top;
}

.teacher-participants-table td,
.teacher-participants-table th {
  padding-top: 16px;
  padding-bottom: 16px;
}

.teacher-grade-table td:first-child,
.teacher-grade-table th:first-child,
.teacher-grade-table td:nth-child(2),
.teacher-grade-table th:nth-child(2) {
  white-space: normal;
}

.teacher-participants-table td:first-child,
.teacher-participants-table th:first-child {
  min-width: 240px;
}

.teacher-student-name {
  display: block;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-progress-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.teacher-progress-card strong {
  color: #0f172a;
}

.teacher-progress-card span {
  color: #334155;
  font-weight: 600;
}

.teacher-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.teacher-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.teacher-empty-illustrated {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
  border: 1px dashed rgba(148, 163, 184, 0.28);
  text-align: center;
}

.teacher-empty-illustrated__art {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.12));
  color: #0f172a;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.teacher-empty-illustrated__copy {
  display: grid;
  gap: 8px;
}

.teacher-empty-illustrated__copy h2,
.teacher-empty-illustrated__copy p {
  margin: 0;
}

.teacher-empty-illustrated__copy p {
  color: #64748b;
  line-height: 1.7;
}

.teacher-grade-matrix th,
.teacher-grade-matrix td {
  text-align: center;
  min-width: 118px;
}

.teacher-grade-matrix td:first-child,
.teacher-grade-matrix th:first-child {
  min-width: 220px;
  text-align: left;
}

.teacher-grade-matrix__cell {
  font-weight: 700;
  color: #0f172a;
}

.teacher-grade-matrix__link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  width: 100%;
  justify-content: center;
}

.teacher-grade-matrix__cell.is-empty {
  background: rgba(241, 245, 249, 0.9);
  color: #94a3b8;
}

.teacher-grade-matrix__cell.is-low {
  background: rgba(254, 226, 226, 0.92);
  color: #b91c1c;
}

.teacher-evaluation-form-card {
  margin-bottom: 18px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.teacher-inline-form textarea,
.teacher-grade-inline-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
}

.teacher-inline-form--evaluation {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-evaluation-builder {
  display: grid;
  gap: 20px;
}

.teacher-evaluation-builder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 1fr);
  gap: 20px;
}

.teacher-evaluation-builder__column {
  display: grid;
  gap: 20px;
  align-content: start;
}

/* ── Eval filters bar ── */
.eval-filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  backdrop-filter: blur(4px);
}

.eval-filters-bar__selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.eval-filter-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.eval-filter-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 32px 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.eval-filter-select-wrap select:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.eval-filter-select-wrap select:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.eval-filter-select-wrap select:not([value=""]):not(:has(option[value=""]:checked)) {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(238, 242, 255, 0.6);
  color: #4338ca;
}

.eval-filter-select-wrap__icon {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: #94a3b8;
  display: flex;
  align-items: center;
}

.eval-filters-bar__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  padding: 4px 10px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 20px;
  letter-spacing: 0.01em;
}

/* ── Eval card: date pills ── */
.teacher-evaluation-card__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.teacher-eval-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 10px 5px 8px;
  white-space: nowrap;
  line-height: 1;
}

.teacher-eval-date-pill svg {
  flex-shrink: 0;
  opacity: 0.55;
}

.teacher-eval-date-pill strong {
  font-weight: 600;
  color: #334155;
  margin-right: 2px;
}

.teacher-eval-date-pill.is-past {
  color: #dc2626;
  background: rgba(254, 226, 226, 0.5);
  border-color: rgba(252, 165, 165, 0.4);
}

.teacher-eval-date-pill.is-past svg {
  opacity: 0.7;
}

/* ── Eval card: progress bar ── */
.teacher-eval-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.teacher-eval-progress__bar-wrap {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.teacher-eval-progress__bar {
  height: 100%;
  border-radius: 99px;
  background: #cbd5e1;
  transition: width 0.4s ease;
  min-width: 2px;
}

.teacher-eval-progress__bar.is-half {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.teacher-eval-progress__bar.is-complete {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.teacher-eval-progress__label {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.teacher-eval-progress__pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 99px;
}

/* ── Eval card: status chip warn ── */
.teacher-chip--warn {
  background: rgba(251, 191, 36, 0.15);
  color: #92400e;
  border-color: rgba(251, 191, 36, 0.3);
}

/* ── Eval files collapsible ── */
.teacher-eval-files-collapsible {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  overflow: hidden;
}

.teacher-eval-files-collapsible summary {
  list-style: none;
}

.teacher-eval-files-collapsible summary::-webkit-details-marker {
  display: none;
}

.teacher-eval-files-collapsible__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  background: rgba(248, 250, 252, 0.8);
  user-select: none;
  transition: background 0.15s;
}

.teacher-eval-files-collapsible__trigger > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.teacher-eval-files-collapsible__trigger:hover {
  background: rgba(241, 245, 249, 1);
}

.teacher-eval-files-collapsible__hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: #94a3b8;
}

.teacher-eval-files-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #10b981;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.teacher-eval-files-collapsible__body {
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 12px;
}

details[open] .teacher-eval-files-collapsible__trigger {
  background: rgba(241, 245, 249, 1);
}

.teacher-evaluation-grid {
  display: grid;
  gap: 18px;
}

.teacher-evaluation-card {
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 20px;
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teacher-evaluation-card:hover {
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.08), 0 8px 16px -4px rgba(15, 23, 42, 0.05);
}

.teacher-evaluation-card__head,
.teacher-evaluation-card__title,
.teacher-evaluation-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.teacher-evaluation-card__title h3,
.teacher-evaluation-submissions h4 {
  margin: 0;
  color: #0f172a;
}

.teacher-evaluation-card__title p,
.teacher-evaluation-card__description {
  margin: 0;
  color: #64748b;
}

.teacher-evaluation-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.teacher-evaluation-card__icon.is-task {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.teacher-evaluation-card__icon.is-quiz {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.teacher-evaluation-card__icon.is-exam {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
}

.teacher-evaluation-card__icon.is-project {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: #6b21a8;
}

.teacher-evaluation-card__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.teacher-evaluation-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  color: #526579;
  font-size: 0.88rem;
}

.teacher-evaluation-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.teacher-evaluation-submissions {
  padding-top: 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: grid;
  gap: 14px;
}

.teacher-quiz-overview,
.teacher-quiz-editor-panel,
.teacher-quiz-results-panel,
.teacher-quiz-attempt-detail {
  display: grid;
  gap: 14px;
}

.teacher-quiz-overview__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.72);
  border: 1px solid rgba(59, 130, 246, 0.14);
  color: #1e3a8a;
}

.teacher-quiz-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.teacher-quiz-stat-card,
.teacher-quiz-detail-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.04);
}

.teacher-quiz-stat-card span,
.teacher-quiz-detail-card__answers span,
.teacher-quiz-question-card__options span {
  display: block;
  color: #64748b;
  font-size: 0.88rem;
}

.teacher-quiz-stat-card strong,
.teacher-quiz-question-card__title strong,
.teacher-quiz-detail-card__head strong {
  color: #0f172a;
}

.teacher-quiz-question-form {
  display: none;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.teacher-quiz-question-form.is-open {
  display: grid;
}

.teacher-quiz-question-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.teacher-quiz-options-list,
.teacher-quiz-question-list,
.teacher-quiz-detail-list {
  display: grid;
  gap: 12px;
}

.teacher-quiz-option-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.teacher-quiz-option-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 0.88rem;
}

.teacher-quiz-binary-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.teacher-quiz-manual-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(219, 234, 254, 0.9));
  color: #1d4ed8;
}

.teacher-quiz-manual-note strong {
  color: #1e3a8a;
}

.teacher-quiz-file-picker,
.teacher-quiz-file-current {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe7f3;
  background: #f8fbff;
}

.teacher-quiz-file-picker input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px dashed #9db6d5;
  border-radius: 12px;
  background: #fff;
}

.teacher-quiz-file-picker small,
.teacher-quiz-file-current {
  color: #64748b;
}

.teacher-quiz-file-current a {
  font-weight: 600;
  color: #0f766e;
  text-decoration: none;
  word-break: break-word;
}

.teacher-quiz-file-current a:hover {
  text-decoration: underline;
}

.teacher-quiz-question-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.04);
}

.teacher-quiz-question-card.is-dragging {
  opacity: 0.6;
}

.teacher-quiz-question-card__head,
.teacher-quiz-question-card__title,
.teacher-quiz-detail-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.teacher-quiz-question-card__title {
  flex: 1;
}

.teacher-quiz-question-card__title p,
.teacher-quiz-detail-card p {
  margin: 4px 0 0;
  color: #334155;
}

.teacher-quiz-question-card__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.teacher-quiz-question-card__options span,
.teacher-quiz-detail-card__answers span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
}

.teacher-quiz-detail-card__resource {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.82);
  border: 1px solid rgba(191, 219, 254, 0.92);
}

.teacher-quiz-detail-card__resource span {
  display: block;
  color: #475569;
  font-size: 0.84rem;
}

.teacher-quiz-detail-card__resource a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.teacher-quiz-detail-card__resource a:hover {
  text-decoration: underline;
}

.teacher-quiz-correction-form {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.88);
}

.teacher-quiz-correction-form__grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.teacher-quiz-question-card__options span.is-correct {
  background: rgba(220, 252, 231, 0.92);
  color: #166534;
}

.teacher-quiz-drag-handle {
  border: 0;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: grab;
}

.teacher-evaluation-files-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.teacher-evaluation-files-card--pending {
  background: rgba(241, 245, 249, 0.72);
  border-style: dashed;
}

.teacher-evaluation-files-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.teacher-evaluation-files-card__head h3,
.teacher-evaluation-files-card__head h4,
.teacher-evaluation-files-card__head p {
  margin: 0;
}

.teacher-evaluation-files-card__head p {
  color: #64748b;
  line-height: 1.65;
}

.teacher-evaluation-files-form__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.teacher-evaluation-files-form__row input[type="file"] {
  flex: 1 1 280px;
  max-width: 100%;
}

.teacher-evaluation-files-list {
  display: grid;
  gap: 10px;
}

.teacher-evaluation-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.2s ease;
}

.teacher-evaluation-file-item:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  transform: translateY(-1px);
}

.teacher-evaluation-file-item strong,
.teacher-evaluation-file-item span {
  display: block;
}

.teacher-evaluation-file-item strong a {
  color: #0f172a;
  text-decoration: none;
}

.teacher-evaluation-file-item span {
  color: #64748b;
  margin-top: 4px;
  font-size: 0.84rem;
}

.teacher-evaluation-builder__title-input {
  min-height: 58px;
  font-size: 1.05rem;
}

.teacher-evaluation-builder__config-card,
.teacher-announcement-builder__side {
  padding: 24px;
  border-radius: 22px;
  background: rgba(241, 245, 249, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.teacher-evaluation-builder__config-head,
.teacher-announcement-builder__side-head {
  display: grid;
  gap: 6px;
}

.teacher-evaluation-builder__config-head h3,
.teacher-announcement-builder__side-head h3 {
  margin: 0;
  color: #0f172a;
}

.teacher-evaluation-builder__config-head p,
.teacher-announcement-builder__side-head p,
.teacher-evaluation-files-help {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.teacher-type-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.teacher-type-selector__option {
  position: relative;
}

.teacher-type-selector__option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.teacher-type-selector__card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.teacher-type-selector__copy {
  display: grid;
  gap: 3px;
}

.teacher-type-selector__copy strong {
  color: #0f172a;
  font-size: 0.96rem;
}

.teacher-type-selector__copy small {
  color: #64748b;
  font-size: 0.8rem;
}

.teacher-type-selector__option input:checked + .teacher-type-selector__card {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(236, 253, 245, 0.92);
  box-shadow: 0 22px 34px rgba(16, 185, 129, 0.12);
  transform: translateY(-1px);
}

.teacher-toggle-field {
  display: grid;
  gap: 10px;
}

.teacher-toggle-field__label {
  color: #334155;
  font-size: 0.85rem;
  font-weight: 500;
}

.teacher-toggle-field__control,
.teacher-inline-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 0.9rem;
}

.teacher-toggle-field__control input,
.teacher-inline-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.teacher-switch {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  transition: background 0.18s ease;
}

.teacher-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  transition: transform 0.18s ease;
}

.teacher-switch--sm {
  width: 42px;
  height: 24px;
}

.teacher-switch--sm::after {
  width: 18px;
  height: 18px;
}

.teacher-toggle-field__control input:checked + .teacher-switch,
.teacher-inline-switch input:checked + .teacher-switch {
  background: #10b981;
}

.teacher-toggle-field__control input:checked + .teacher-switch::after {
  transform: translateX(22px);
}

.teacher-inline-switch input:checked + .teacher-switch--sm::after {
  transform: translateX(18px);
}

.teacher-evaluation-files-card--builder {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
}

.teacher-evaluation-files-form__row--builder {
  align-items: flex-end;
}

.teacher-evaluation-files-picker {
  flex: 1 1 300px;
  display: grid;
  gap: 8px;
}

.teacher-evaluation-files-picker label {
  color: #334155;
  font-size: 0.85rem;
  font-weight: 500;
}

.teacher-evaluation-files-picker input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-sizing: border-box;
}

.teacher-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.teacher-file-row > div {
  min-width: 0;
}

.teacher-file-row strong a {
  color: #0f172a;
  text-decoration: none;
}

.teacher-evaluation-submissions__table td,
.teacher-evaluation-submissions__table th {
  vertical-align: top;
}

.teacher-student-name {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.teacher-attachment-list {
  display: grid;
  gap: 8px;
}

.teacher-attachment-link {
  color: #0f172a;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.teacher-attachment-link--file {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.teacher-attachment-link__icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.teacher-attachment-link__icon::before {
  content: '\1F4C4';
  font-size: 1rem;
}

.teacher-attachment-link__icon.is-pdf {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.teacher-attachment-link__icon.is-doc {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.teacher-attachment-link__icon.is-image {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.teacher-attachment-link__icon.is-generic {
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
}

.teacher-attachment-link__copy {
  display: grid;
  gap: 3px;
}

.teacher-attachment-link__copy strong {
  color: #0f172a;
  font-size: 0.88rem;
}

.teacher-attachment-link__copy span {
  color: #94a3b8;
  font-size: 0.76rem;
}

.teacher-grade-inline-form {
  display: grid;
  grid-template-columns: minmax(110px, 130px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.teacher-grade-inline-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
}

.teacher-grade-inline-form textarea {
  min-height: 48px;
  transition: min-height 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.teacher-grade-inline-form textarea.is-expanded,
.teacher-grade-inline-form textarea:focus {
  min-height: 120px;
}

.teacher-grade-inline-form__save {
  background: #16a34a;
  border-color: #16a34a;
}

.teacher-grade-inline-form__save:hover {
  background: #15803d;
  border-color: #15803d;
}

.teacher-grade-inline-form__save.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.teacher-inline-form--announcement {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-announcement-builder,
.teacher-announcement-builder__main,
.teacher-announcement-builder__side {
  display: grid;
  gap: 20px;
}

.teacher-event-builder,
.teacher-event-builder__main,
.teacher-event-builder__side {
  display: grid;
  gap: 20px;
}

.teacher-announcement-builder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 20px;
}

.teacher-event-builder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 1fr);
  gap: 20px;
}

.teacher-announcement-builder__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
}

.teacher-event-builder__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.teacher-stack-cards--announcements {
  gap: 20px;
}

.teacher-stack-cards--events {
  gap: 18px;
}

.teacher-announcement-card {
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.teacher-announcement-card__head,
.teacher-announcement-card__controls,
.teacher-announcement-card__title,
.teacher-announcement-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.teacher-announcement-card__title {
  flex-wrap: wrap;
}

.teacher-announcement-card__controls {
  align-items: center;
  flex-wrap: wrap;
}

.teacher-announcement-card__content {
  color: #334155;
  line-height: 1.6;
}

.teacher-announcement-card__date {
  color: #64748b;
  font-size: 0.88rem;
}

.teacher-inline-switch-form {
  margin: 0;
}

.teacher-event-builder__side,
.teacher-editor-card--event {
  padding: 32px;
}

.teacher-editor-card {
  border-radius: 28px;
}

.teacher-event-builder__side-head {
  display: grid;
  gap: 6px;
}

.teacher-event-builder__side-head h3 {
  margin: 0;
  color: #0f172a;
}

.teacher-event-builder__side-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.teacher-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.teacher-back-link:hover {
  color: #334155;
}

.teacher-event-card {
  padding: 20px;
}

.teacher-event-card--finished {
  opacity: 0.6;
}

.teacher-event-card__head,
.teacher-event-card__actions,
.teacher-event-card__title,
.teacher-event-card__badges,
.teacher-event-card__meta {
  display: flex;
  gap: 12px;
}

.teacher-event-card__head,
.teacher-event-card__meta {
  align-items: flex-start;
  justify-content: space-between;
}

.teacher-event-card__title {
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}

.teacher-event-card__title h3 {
  margin: 0;
  color: #0f172a;
}

.teacher-event-card__actions,
.teacher-event-card__badges {
  align-items: center;
  flex-wrap: wrap;
}

.teacher-event-card__content {
  color: #334155;
  line-height: 1.6;
}

.teacher-event-card__meta {
  flex-wrap: wrap;
  color: #64748b;
  font-size: 0.88rem;
}

.teacher-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.teacher-status-pill.is-published,
.teacher-status-pill.is-course {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.teacher-status-pill.is-hidden {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.teacher-status-pill.is-reminder {
  background: rgba(234, 179, 8, 0.2);
  color: #3f3f08;
}

.teacher-status-pill.is-general {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

.teacher-status-pill.is-finished {
  background: rgba(148, 163, 184, 0.2);
  color: #64748b;
}

.teacher-chip--danger {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.teacher-chip--warning {
  background: rgba(255, 237, 213, 0.92);
  color: #c2410c;
}

.teacher-stack-card--finished {
  opacity: 0.5;
}

.teacher-stack-card--finished h3,
.teacher-stack-card--finished p,
.teacher-stack-card--finished .teacher-evaluation-card__meta {
  color: #64748b;
}

.preview-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 22px;
  padding: 16px 22px;
  width: min(1200px, calc(100% - 32px));
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(253, 224, 71, 0.24));
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 22px;
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.12);
}

.preview-mode-banner__copy {
  display: grid;
  gap: 6px;
}

.preview-mode-banner__copy strong {
  color: #92400e;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.preview-mode-banner__copy span {
  color: #9a3412;
  line-height: 1.65;
}

.preview-mode-banner__exit {
  white-space: nowrap;
}

.preview-action-link {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: not-allowed;
}

.preview-disabled-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(245, 158, 11, 0.36);
  background: rgba(255, 251, 235, 0.72);
}

.preview-disabled-card strong {
  color: #92400e;
}

.preview-disabled-card p {
  margin: 0;
  color: #9a3412;
  line-height: 1.6;
}

/* --- STUDENT SUBMISSION EXPERIENCE --- */
.student-submission-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.student-submission-card {
  display: grid;
  gap: 22px;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.student-submission-card__crumb {
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.student-submission-card__crumb a {
  color: #5f7181;
  text-decoration: none;
  font-weight: 600;
}

.student-submission-card__eyebrow,
.student-submission-panel__eyebrow {
  margin: 0 0 6px;
  color: #0d8a68;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.student-submission-card__title-row,
.student-submission-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.student-submission-card h1,
.student-submission-panel h2,
.student-submission-feedback h2 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.student-submission-card h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.student-submission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.student-submission-instructions {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(239, 246, 255, 0.82);
  border: 1px solid rgba(147, 197, 253, 0.34);
}

.student-submission-instructions__list {
  display: grid;
  gap: 10px;
}

.student-submission-instructions__item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(191, 219, 254, 0.8);
  text-decoration: none;
}

.student-submission-instructions__item strong {
  color: #0f172a;
}

.student-submission-instructions__item span {
  color: #64748b;
  font-size: 0.84rem;
}

.student-submission-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.student-submission-pill--type {
  background: rgba(224, 242, 254, 0.96);
  color: #0f5cab;
}

.student-submission-pill--due {
  background: rgba(255, 237, 213, 0.96);
  color: #c2410c;
}

.student-submission-description {
  margin: 0;
  color: #526579;
  line-height: 1.75;
}

.student-submission-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 700;
}

.student-submission-banner.is-hidden {
  display: none;
}

.student-submission-banner.is-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #047857;
}

.student-submission-banner.is-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.student-submission-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
}

.student-submission-final-state,
.student-submission-draft-note {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 20px;
}

.student-submission-final-state {
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.student-submission-final-state strong {
  color: #0f172a;
}

.student-submission-final-state span,
.student-submission-draft-note span {
  color: #5f7181;
}

.student-submission-draft-note {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.14);
}

.student-submission-draft-note strong {
  color: #1d4ed8;
}

.student-submission-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
}

.student-submission-panel,
.student-submission-feedback {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.student-submission-feedback--previous-attempt {
  margin-top: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.76), var(--shadow-card);
}

.student-submission-label {
  display: block;
  margin-bottom: 8px;
  color: #304454;
  font-size: 0.92rem;
  font-weight: 700;
}

.student-submission-textarea,
.student-upload-picker input[type="file"] {
  width: 100%;
  box-sizing: border-box;
}

.student-submission-textarea {
  min-height: 220px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  resize: vertical;
  line-height: 1.7;
}

.student-submission-helper-row,
.student-submission-actions,
.student-upload-form-row,
.student-file-item,
.student-file-item__meta,
.student-file-item__actions,
.student-upload-queue-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.student-submission-helper-row,
.student-submission-actions,
.student-upload-form-row,
.student-file-item {
  flex-wrap: wrap;
}

.student-draft-indicator,
.student-grade-pill,
.student-submission-files-help,
.student-empty-files {
  color: #64748b;
  font-size: 0.88rem;
}

.student-draft-indicator.is-active {
  color: #0d8a68;
}

.student-upload-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(240, 249, 255, 0.94));
  border: 1px solid rgba(13, 138, 104, 0.14);
}

.student-upload-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-size: 0.86rem;
  font-weight: 700;
}

.student-upload-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #0d8a68;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(13, 138, 104, 0.18);
}

.student-upload-step__arrow {
  color: #0d8a68;
  font-weight: 800;
}

.student-grade-pill {
  font-weight: 700;
}

.student-inline-error {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.16);
  color: #b91c1c;
  font-size: 0.84rem;
}

.student-inline-error.is-hidden {
  display: none;
}

.student-upload-queue,
.student-upload-list {
  display: grid;
  gap: 12px;
}

.student-upload-button {
  min-width: 180px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.student-upload-button.student-upload-button--idle,
.student-upload-button.student-upload-button--idle:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #475569;
  box-shadow: none;
}

.student-upload-button.student-upload-button--ready {
  background: linear-gradient(135deg, #16a34a, #10b981);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 18px 30px rgba(22, 163, 74, 0.22);
  animation: student-upload-pulse 1.8s ease-in-out infinite;
}

.student-upload-button.student-upload-button--ready:hover {
  transform: translateY(-1px);
}

@keyframes student-upload-pulse {
  0%, 100% {
    box-shadow: 0 18px 30px rgba(22, 163, 74, 0.18);
  }
  50% {
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.32);
  }
}

.student-upload-queue-item,
.student-file-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.student-upload-queue-item__bar {
  height: 8px;
  margin: 10px 0 8px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.student-upload-queue-item__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #10b981);
  transition: width 0.18s ease;
}

.student-upload-queue-item__message {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
}

.student-upload-queue-item.is-error .student-upload-queue-item__bar span {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.student-upload-queue-item.is-success .student-upload-queue-item__message {
  color: #047857;
}

.student-upload-queue-item.is-error .student-upload-queue-item__message {
  color: #b91c1c;
}

.student-file-item__meta {
  justify-content: flex-start;
  min-width: 0;
}

.student-file-item__meta > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.student-file-item__meta strong {
  color: #0f172a;
  word-break: break-word;
}

.student-file-item__meta span:last-child {
  color: #64748b;
  font-size: 0.82rem;
}

.student-file-item__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 800;
  flex: 0 0 auto;
}

.student-file-item__status--success {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.student-file-item__status--error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.student-submission-feedback__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.student-quiz-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.student-quiz-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 48px rgba(15, 23, 42, 0.08);
}

.student-quiz-intro,
.student-quiz-topbar,
.student-quiz-progress__copy,
.student-quiz-question__head,
.student-quiz-nav,
.student-quiz-result-hero,
.student-quiz-result-item__head,
.student-quiz-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.student-quiz-intro__meta,
.student-quiz-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.student-quiz-intro__meta span,
.student-quiz-result-meta span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.96);
  color: #334155;
}

.student-quiz-warning {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 247, 237, 0.96);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #9a3412;
}

.student-quiz-timer {
  min-width: 150px;
  padding: 14px 18px;
  border-radius: 22px;
  text-align: right;
  color: #fff;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.student-quiz-timer span {
  display: block;
  opacity: 0.85;
  font-size: 0.84rem;
}

.student-quiz-timer strong {
  font-size: 1.65rem;
}

.student-quiz-timer.is-safe {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.student-quiz-timer.is-warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #422006;
}

.student-quiz-timer.is-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  animation: studentQuizPulse 1.1s infinite;
}

.student-quiz-progress {
  display: grid;
  gap: 10px;
}

.student-quiz-progress__bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.96);
  overflow: hidden;
}

.student-quiz-progress__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.student-quiz-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}

.student-quiz-map,
.student-quiz-stage {
  padding: 22px;
  border-radius: 24px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.94);
}

.student-quiz-map h2 {
  margin: 0 0 16px;
  color: #0f172a;
}

.student-quiz-map__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 10px;
}

.student-quiz-map__item {
  height: 48px;
  border-radius: 16px;
  border: 0;
  background: rgba(226, 232, 240, 0.9);
  color: #475569;
  font-weight: 700;
  cursor: pointer;
}

.student-quiz-map__item.is-current {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.student-quiz-map__item.is-answered {
  background: rgba(34, 197, 94, 0.18);
  color: #166534;
}

.student-quiz-map__item.is-review {
  background: rgba(251, 191, 36, 0.28);
  color: #92400e;
}

.student-quiz-question {
  display: none;
  gap: 16px;
}

.student-quiz-question.is-active {
  display: grid;
}

.student-quiz-question h2 {
  margin: 0;
  color: #0f172a;
}

.student-quiz-question__points,
.student-quiz-result-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-weight: 700;
}

.student-quiz-answer-list,
.student-quiz-result-list,
.student-quiz-result-answer {
  display: grid;
  gap: 12px;
}

.student-quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.96);
  cursor: pointer;
}

.student-quiz-answer textarea {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.96);
  resize: vertical;
  font: inherit;
}

.student-quiz-problem-file {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(224, 242, 254, 0.9));
}

.student-quiz-problem-file__label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
}

.student-quiz-problem-file a {
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
  word-break: break-word;
}

.student-quiz-problem-file a:hover {
  text-decoration: underline;
}

.student-quiz-problem-file small {
  color: #475569;
}

.student-quiz-summary-box {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.92);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #1e3a8a;
}

.student-quiz-nav {
  margin-top: 18px;
}

.student-quiz-nav__spacer {
  flex: 1;
}

.student-quiz-result-hero {
  padding: 24px;
  border-radius: 24px;
  color: #fff;
}

.student-quiz-result-hero.is-success {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.student-quiz-result-hero.is-info {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.student-quiz-result-hero.is-warning {
  background: linear-gradient(135deg, #d97706, #fbbf24);
  color: #422006;
}

.student-quiz-result-hero.is-danger {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.student-quiz-result-score {
  min-width: 180px;
  text-align: right;
}

.student-quiz-result-score strong,
.student-quiz-result-score span {
  display: block;
}

.student-quiz-result-score strong {
  font-size: 1.8rem;
}

.student-quiz-result-item {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.96);
}

.student-quiz-result-badge.is-correct,
.student-quiz-result-answer .is-correct {
  background: rgba(220, 252, 231, 0.92);
  color: #166534;
}

.student-quiz-result-badge.is-wrong,
.student-quiz-result-answer .is-wrong {
  background: rgba(254, 226, 226, 0.96);
  color: #b91c1c;
}

.student-quiz-result-badge.is-pending,
.student-quiz-result-answer .is-pending {
  background: rgba(254, 249, 195, 0.96);
  color: #854d0e;
}

.student-quiz-result-answer span {
  padding: 10px 12px;
  border-radius: 14px;
}

.student-quiz-question [data-quiz-review-toggle].is-active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #422006;
}

@keyframes studentQuizPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.student-feedback-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-size: 0.84rem;
  font-weight: 800;
}

.student-feedback-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.student-feedback-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d8a68, #22c55e);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}

.student-feedback-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-feedback-card__content {
  display: grid;
  gap: 6px;
}

.student-feedback-card__name {
  color: #0f172a;
  font-weight: 700;
}

.student-feedback-card__date {
  color: #94a3b8;
  font-size: 0.8rem;
}

.student-feedback-card__content p {
  margin: 4px 0 0;
  color: #334155;
  line-height: 1.7;
}

.student-upload-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.student-upload-confirm-modal.is-hidden {
  display: none;
}

.student-upload-confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
}

.student-upload-confirm-modal__dialog {
  position: relative;
  width: min(100%, 460px);
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.student-upload-confirm-modal__dialog h3 {
  margin: 0 0 12px;
  color: #0f172a;
}

.student-upload-confirm-modal__dialog p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.student-upload-confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (max-width: 920px) {
  .student-submission-grid {
    grid-template-columns: 1fr;
  }

  .student-submission-card__title-row,
  .student-submission-panel__head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .student-submission-card,
  .student-submission-panel,
  .student-submission-feedback {
    padding: 20px;
    border-radius: 22px;
  }

  .student-submission-card h1 {
    font-size: 1.8rem;
  }

  .student-submission-helper-row,
  .student-submission-actions,
  .student-upload-form-row,
  .student-file-item,
  .student-file-item__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .student-upload-step__arrow {
    display: none;
  }

  .student-file-item__meta {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .teacher-lms-hero,
  .teacher-lms-block__header,
  .teacher-course-section-card__head,
  .teacher-stack-card__head,
  .teacher-resource-item,
  .teacher-stack-list__item {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-lms-panel,
  .teacher-lms-block {
    padding: 20px;
    border-radius: 24px;
  }

  .teacher-inline-form,
  .teacher-inline-form--participant {
    grid-template-columns: 1fr;
  }

  .teacher-inline-form--evaluation,
  .teacher-inline-form--announcement,
  .teacher-grade-inline-form {
    grid-template-columns: 1fr;
  }

  .teacher-inline-form__field--wide {
    grid-column: span 1;
  }

  .teacher-lms-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-mode-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-course-alert-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-evaluation-card__head,
  .teacher-evaluation-card__title,
  .teacher-evaluation-card__foot {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .teacher-lms-tabs {
    grid-template-columns: 1fr;
  }

  .teacher-lms-tab {
    text-align: center;
  }

  .teacher-lms-hero {
    padding: 22px 20px;
  }

  .teacher-lms-hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .teacher-lms-hero__actions .btn,
  .teacher-lms-hero__actions .teacher-edit-toggle,
  .preview-mode-banner__exit {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* --- ADMIN LMS ENHANCEMENTS --- */
.admin-course-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.admin-course-filters__field {
  display: grid;
  gap: 6px;
}

.admin-course-filters__field--search {
  grid-column: span 1;
}

.admin-course-filters__field label {
  color: #334155;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-course-filters__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.admin-count-pill {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-weight: 800;
}

.admin-actions-cell {
  position: relative;
  overflow: visible !important;
}

.admin-dropdown {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.admin-dropdown__trigger {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-dropdown__trigger:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.admin-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 9999;
}

.admin-dropdown.is-open .admin-dropdown__menu {
  display: grid;
  gap: 4px;
}

.admin-dropdown__item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #1e293b;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.admin-dropdown__item:hover {
  background: rgba(15, 23, 42, 0.05);
  text-decoration: none;
}

.admin-dropdown__item--button {
  appearance: none;
}

.admin-dropdown__item--danger {
  color: #b91c1c;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.admin-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-weight: 700;
  text-decoration: none;
}

.admin-pagination__link:hover {
  background: #fff;
  text-decoration: none;
}

.admin-pagination__link.is-active {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.admin-pagination__link.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.admin-collapsible-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.admin-collapsible-card__copy {
  margin: 6px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.admin-collapsible-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 0.28s ease, opacity 0.24s ease, margin-top 0.24s ease;
}

.admin-collapsible-panel > form {
  overflow: hidden;
}

.admin-collapsible-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 18px;
}

.admin-visibility-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-visibility-inline__label {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
}

.admin-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
  transition: background 0.2s ease;
  cursor: pointer;
}

.admin-switch__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease;
}

.admin-switch input:checked + .admin-switch__slider {
  background: #10b981;
}

.admin-switch input:checked + .admin-switch__slider::before {
  transform: translateX(20px);
}

.admin-resource-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-weight: 700;
}

.admin-resource-type__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  font-size: 1rem;
}

@media (max-width: 980px) {
  .admin-course-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-course-filters__actions {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .admin-course-filters {
    grid-template-columns: 1fr;
  }

  .admin-course-filters__actions {
    grid-column: span 1;
  }

  .admin-collapsible-card__header,
  .admin-visibility-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-pagination {
    justify-content: flex-start;
  }
}

.badge-warning,
.badge-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.badge-muted {
  background: rgba(148, 163, 184, 0.16);
  color: #64748b;
}

.admin-preview-card {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: grid;
  gap: 16px;
}

.admin-preview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-preview-card__head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
}

.admin-announcement-preview {
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.admin-announcement-preview h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.2rem;
}

.admin-announcement-preview__content {
  color: #526579;
  line-height: 1.75;
}

.admin-announcement-preview__content p {
  margin: 0;
}

.admin-payment-progress {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.admin-payment-progress strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.admin-payment-progress__bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.9);
}

.admin-payment-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.admin-payment-progress__fill.is-pending {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.admin-payment-progress__fill.is-partial {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.admin-payment-progress__fill.is-paid {
  background: linear-gradient(90deg, #16a34a, #10b981);
}

.admin-table-row--alert td {
  background: rgba(254, 242, 242, 0.92) !important;
}

.admin-modal-open {
  overflow: hidden;
}

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

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.admin-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 14px;
}

.admin-modal__dialog h2 {
  margin: 0;
  color: #0f172a;
}

.admin-modal__dialog p {
  margin: 0;
  color: #526579;
  line-height: 1.7;
}

.admin-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.app-toast-stack,
.admin-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 220;
  display: grid;
  gap: 10px;
}

.app-toast,
.admin-toast {
  min-width: 280px;
  max-width: 360px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.app-toast.is-visible,
.admin-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.app-toast.is-success,
.admin-toast.is-success {
  background: #e8f5e9;
  color: #166534;
  border-left: 4px solid #16a34a;
}

.app-toast.is-error,
.admin-toast.is-error {
  background: #ffebee;
  color: #b91c1c;
  border-left: 4px solid #dc2626;
}

.app-toast.is-info {
  background: #e8f1ff;
  color: #1d4ed8;
  border-left: 4px solid #2563eb;
}

.app-toast__icon,
.admin-toast__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.app-toast__content,
.admin-toast__content .flash-msg {
  margin: 0;
}

.admin-view-toggle {
  display: inline-flex;
  padding: 4px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  gap: 6px;
}

.admin-view-toggle__link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  text-decoration: none;
}

.admin-view-toggle__link.is-active {
  background: #10b981;
  color: #fff;
}

.admin-calendar {
  display: grid;
  gap: 18px;
  overflow-x: auto;
}

.admin-calendar__header h2,
.admin-calendar__header p {
  margin: 0;
}

.admin-calendar__header p {
  color: #64748b;
  margin-top: 6px;
}

.admin-calendar__weekdays,
.admin-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  min-width: 980px;
}

.admin-calendar__weekdays div {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.admin-calendar__cell {
  min-height: 110px;
  max-height: 180px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: hidden;
}

.admin-calendar__cell.is-muted {
  opacity: 0.55;
}

.admin-calendar__date {
  color: #0f172a;
  font-weight: 800;
}

.admin-calendar__events {
  display: grid;
  gap: 4px;
}

.admin-calendar__more {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  padding: 2px 6px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  text-align: center;
  cursor: default;
}

.admin-calendar__event {
  border: 0;
  border-radius: 8px;
  padding: 4px 8px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-calendar__event.is-general {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.admin-calendar__event.is-course {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.admin-calendar__event.is-reminder {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.admin-event-popover {
  position: absolute;
  z-index: 150;
  width: min(320px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 8px;
}

.admin-event-popover[hidden] {
  display: none;
}

.admin-event-popover h3,
.admin-event-popover p {
  margin: 0;
}

.event-row--course td {
  background: rgba(16, 185, 129, 0.06);
}

.event-row--reminder td {
  background: rgba(245, 158, 11, 0.08);
}

.event-row--general td {
  background: rgba(59, 130, 246, 0.06);
}

@media (max-width: 900px) {
  .app-toast-stack,
  .admin-toast-stack {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .app-toast,
  .admin-toast {
    min-width: 0;
    max-width: none;
  }
}

.teacher-summary-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.teacher-summary-kpi {
  padding: 20px;
  border-radius: 22px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
}

.teacher-summary-kpi__value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
}

.teacher-summary-kpi__label {
  margin-top: 10px;
  color: #526579;
  font-size: 0.92rem;
  font-weight: 700;
}

.teacher-summary-kpi.is-alert {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.98), rgba(254, 215, 170, 0.92));
  border: 1px solid rgba(249, 115, 22, 0.18);
}

.teacher-summary-kpi.is-alert .teacher-summary-kpi__value,
.teacher-summary-kpi.is-alert .teacher-summary-kpi__label {
  color: #c2410c;
}

.teacher-dashboard-courses {
  display: grid;
  gap: 18px;
}

.teacher-dashboard-courses__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teacher-dashboard-courses__header h3,
.teacher-dashboard-courses__header span {
  margin: 0;
}

.teacher-dashboard-courses__header span {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
}

.teacher-dashboard-course-grid,
.teacher-course-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.teacher-dashboard-course-card,
.teacher-course-catalog__card {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.teacher-dashboard-course-card {
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.teacher-dashboard-course-card:hover,
.teacher-course-catalog__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.12);
  border-color: rgba(16, 185, 129, 0.24);
}

.teacher-dashboard-course-card__top,
.teacher-course-catalog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.teacher-dashboard-course-card__top h4,
.teacher-course-catalog__head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
}

.teacher-dashboard-course-card__top p,
.teacher-course-catalog__head p,
.teacher-course-catalog__period,
.teacher-course-catalog__description {
  margin: 0;
  color: #64748b;
}

.teacher-course-catalog__card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.teacher-course-catalog__period {
  font-size: 0.88rem;
  font-weight: 700;
}

.teacher-dashboard-course-card__metrics,
.teacher-course-catalog__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.teacher-course-catalog__metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-dashboard-course-card__metrics div,
.teacher-course-catalog__metrics div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(241, 245, 249, 0.86);
  display: grid;
  gap: 4px;
}

.teacher-dashboard-course-card__metrics strong,
.teacher-course-catalog__metrics strong {
  color: #0f172a;
  font-size: 1.2rem;
}

.teacher-dashboard-course-card__metrics span,
.teacher-course-catalog__metrics span {
  color: #526579;
  font-size: 0.82rem;
}

.teacher-course-catalog__description {
  font-size: 0.9rem;
  line-height: 1.65;
}

.teacher-course-catalog__footer {
  margin-top: auto;
}

.teacher-course-list td {
  vertical-align: top;
}

.teacher-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.teacher-status-badge.is-active {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.teacher-status-badge.is-hidden {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.teacher-status-badge.is-closed {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.teacher-mini-calendar__table-cell[data-tooltip] {
  position: relative;
}

.teacher-mini-calendar__table-cell[data-tooltip]::before,
.teacher-mini-calendar__table-cell[data-tooltip]::after {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.teacher-mini-calendar__table-cell[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translate(-50%, 8px);
  min-width: 180px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.2);
  z-index: 8;
}

.teacher-mini-calendar__table-cell[data-tooltip]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translate(-50%, 8px);
  border-width: 8px 7px 0;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.94) transparent transparent;
  z-index: 7;
}

.teacher-mini-calendar__table-cell[data-tooltip]:hover::before,
.teacher-mini-calendar__table-cell[data-tooltip]:hover::after,
.teacher-mini-calendar__table-cell[data-tooltip]:focus-visible::before,
.teacher-mini-calendar__table-cell[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .teacher-evaluation-builder__grid,
  .teacher-announcement-builder__grid,
  .teacher-event-builder__grid {
    grid-template-columns: 1fr;
  }

  .teacher-evaluation-file-item,
  .teacher-evaluation-files-form__row {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-dashboard-course-card__metrics,
  .teacher-course-catalog__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-quiz-correction-form__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .teacher-type-selector {
    grid-template-columns: 1fr;
  }

  .teacher-announcement-card__head,
  .teacher-announcement-card__meta,
  .teacher-announcement-card__controls,
  .teacher-event-card__head,
  .teacher-event-card__meta,
  .teacher-event-card__actions,
  .teacher-dashboard-course-card__top,
  .teacher-course-catalog__head,
  .teacher-dashboard-courses__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .teacher-dashboard-course-card__metrics,
  .teacher-course-catalog__metrics {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE GLOBAL — Dashboards (Admin, Docente, Estudiante)
   ═══════════════════════════════════════════════════════════ */

/* Hamburger — oculto en escritorio, visible en móvil dentro del topbar */
.sidebar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-strong, #1e293b);
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px 8px;
  flex-shrink: 0;
}

/* Overlay backdrop */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1040;
  cursor: pointer;
}
.sidebar-overlay.is-active { display: block; }

/* Global table overflow */
.table-admin,
.table-admin-responsive {
  min-width: 600px;
}

@media (max-width: 900px) {
  /* ── Admin sidebar → drawer ── */
  #admin-wrapper {
    display: block;
  }

  #admin-sidebar {
    position: fixed !important;
    top: 0;
    left: -270px;
    width: 260px !important;
    height: 100vh;
    z-index: 1050;
    transition: left 0.28s ease;
    overflow-y: auto;
    min-height: 100vh !important;
  }
  #admin-sidebar.is-open { left: 0 !important; }

  #admin-main {
    width: 100%;
    padding: 16px;
    margin-left: 0 !important;
  }

  /* Hamburger visible — se inyecta en el topbar via CSS order */
  .sidebar-hamburger { display: inline-flex; }

  /* Teacher sidebar same treatment */
  #teacher-sidebar,
  .teacher-sidebar {
    position: fixed !important;
    top: 0;
    left: -270px;
    width: 240px !important;
    height: 100vh;
    z-index: 1050;
    transition: left 0.28s ease;
    overflow-y: auto;
  }
  #teacher-sidebar.is-open,
  .teacher-sidebar.is-open { left: 0 !important; }

  #teacher-main,
  .teacher-main { margin-left: 0 !important; }

  /* KPI grids → 2 cols on tablet */
  .admin-kpi-grid,
  .admin-dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Teacher sidebar */
  #teacher-sidebar,
  .teacher-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 240px !important;
    height: 100vh;
    z-index: 1060;
    transition: left 0.28s ease;
    overflow-y: auto;
  }
  #teacher-sidebar.is-open,
  .teacher-sidebar.is-open { left: 0; }

  /* Teacher main content */
  #teacher-main,
  .teacher-main {
    padding-top: 60px;
  }

  /* Participant table */
  .admin-card[style*="overflow:hidden"] {
    overflow: visible !important;
  }

  /* Grade table horizontal scroll */
  .teacher-grade-table-wrap,
  .teacher-grade-table {
    overflow-x: auto;
    display: block;
  }
}

@media (max-width: 600px) {
  /* KPI grids → 1 col on phone */
  .admin-kpi-grid,
  .admin-dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  #admin-main { padding: 12px; padding-top: 56px; }

  /* Admin filters stack */
  .admin-course-filters,
  .admin-filters-card form {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .admin-course-filters__field,
  .admin-course-filters__actions {
    width: 100%;
  }

  /* Admin header actions */
  .admin-header-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Perfil grid */
  .perfil-grid { grid-template-columns: 1fr !important; }
  .perfil-hero { padding: 28px 20px 40px; }
  .perfil-body { padding: 24px 20px; }
  #perfil-pwd-fields.is-open { grid-template-columns: 1fr !important; }

  /* Teacher evaluation filters */
  .eval-filters-bar {
    padding: 10px 12px;
    gap: 6px;
  }

  .eval-filters-bar__selects {
    flex-direction: column;
    width: 100%;
  }

  .eval-filter-select-wrap {
    width: 100%;
  }

  .eval-filter-select-wrap select {
    width: 100%;
  }

  .eval-filters-bar__count {
    width: 100%;
    text-align: center;
  }

  /* Eval card dates & progress */
  .teacher-eval-date-pill {
    font-size: 0.72rem;
  }

  .teacher-eval-files-collapsible__trigger {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* Teacher course tabs */
  .teacher-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .teacher-tabs::-webkit-scrollbar { display: none; }
}

/* ── Inject hamburger button via JS ── */

/* ── Topbar responsive ── */
@media (max-width: 768px) {
  #site-topbar {
    padding: 0 12px;
    min-height: 52px;
    gap: 6px;
  }
  .topbar-logo .logo-text { font-size: 0.9rem; }
  .topbar-right { gap: 8px; }
  .topbar-user-info { max-width: 160px; overflow: visible; position: relative; }
  #user-dropdown-menu {
    right: 0;
    left: auto;
    min-width: 180px;
  }
}

/* Hamburger sits as first child of topbar on mobile */
@media (max-width: 900px) {
  #site-topbar {
    padding-left: 12px !important;
  }
  /* The hamburger button is injected before the sidebar,
     but visually we want it in the topbar — use the topbar's own padding */
}

/* ── Student dashboard responsive ── */
@media (max-width: 768px) {
  #page-wrapper { flex-direction: column; }

  /* Dashboard KPI cards */
  .dashboard-kpi-grid,
  .student-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Navbar tabs scroll */
  #site-navbar .navbar-links {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  #site-navbar .navbar-links::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
  .dashboard-kpi-grid,
  .student-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  /* Course view layout */
  #course-layout {
    flex-direction: column;
  }

  /* Announcement cards */
  .announcement-grid,
  .student-announcements-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── periodo.php / materia.php responsive ── */
@media (max-width: 768px) {
  .periodo-hero__inner,
  .materia-hero {
    grid-template-columns: 1fr !important;
  }
  .price-card { min-width: unset; width: 100%; }
  .periodo-body,
  .materia-body { padding: 32px 16px; }
  .fechas-card { flex-direction: column; gap: 16px; }
  .info-grid { grid-template-columns: 1fr !important; }
}

/* ── perfil.php responsive ── */
@media (max-width: 600px) {
  .perfil-wrap { padding: 0 12px 40px; }
  .perfil-hero { padding: 24px 16px 36px; }
  .perfil-body { padding: 20px 16px; }
  .perfil-grid { grid-template-columns: 1fr !important; }
  .perfil-actions { flex-direction: column; }
  .btn-perfil-save, .btn-perfil-cancel { width: 100%; justify-content: center; }
}

/* ── select-panel.php responsive ── */
@media (max-width: 600px) {
  .panel-selector-grid { grid-template-columns: 1fr !important; }
  .panel-selector-wrap { padding: 20px 16px; }
}

/* ── Global overflow fix for all tables ── */
@media (max-width: 900px) {
  .table-admin { min-width: 560px; }
  .admin-card { overflow-x: auto; }
}

/* ── Teacher course header buttons — mobile fix ── */
@media (max-width: 768px) {
  .teacher-lms-hero {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 20px 16px !important;
  }
  .teacher-lms-hero__tools {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .teacher-lms-hero__tools .btn,
  .teacher-lms-hero__tools a.btn,
  .teacher-lms-hero__actions .btn,
  .teacher-lms-hero__actions a.btn {
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .teacher-lms-hero__actions {
    width: 100% !important;
  }

  /* Teacher tabs — horizontal scroll */
  .teacher-lms-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .teacher-lms-tabs::-webkit-scrollbar { display: none; }
  .teacher-lms-tab { white-space: nowrap !important; flex-shrink: 0 !important; }

  /* Teacher event form — full width */
  .teacher-event-builder__grid,
  .teacher-form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Student dashboard — mobile fix ── */
@media (max-width: 768px) {
  .dashboard-shell {
    flex-direction: column !important;
    gap: 20px !important;
  }
  .dashboard-main-column,
  .dashboard-side-column {
    width: 100% !important;
    min-width: 0 !important;
  }
  /* KPI cards — stack to 1 col */
  .dashboard-main-column > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  /* Events + announcements grid */
  .dashboard-main-column > div + div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Admin header actions + filter buttons — full width on mobile ── */
@media (max-width: 768px) {
  .admin-header-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .admin-header-actions h1 {
    margin-bottom: 4px;
  }
  .admin-header-actions .btn,
  .admin-header-actions a.btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Filtros — Filtrar y Limpiar mismo ancho */
  .admin-course-filters__actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .admin-course-filters__actions .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* ── Student dashboard layout ── */
.dashboard-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.dashboard-events-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .dashboard-shell {
    flex-direction: column !important;
    gap: 20px !important;
  }
  .dashboard-main-column,
  .dashboard-side-column {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  /* Side column (Agenda) moves below main content */
  .dashboard-side-column {
    order: 3;
  }
  /* KPI cards — 1 column on mobile */
  .dashboard-kpi-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
  }
  /* KPI card horizontal layout */
  .dashboard-kpi-card {
    padding: 16px !important;
  }
  /* Events + announcements — 1 column */
  .dashboard-events-row {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ── Student dashboard — FINAL fix ── */
@media (max-width: 768px) {
  .dashboard-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  .dashboard-main-column {
    width: 100% !important;
    min-width: 0 !important;
    order: 1;
  }
  .dashboard-side-column {
    width: 100% !important;
    min-width: 0 !important;
    order: 2;
  }
  /* KPI row — 1 column */
  .dashboard-kpi-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }
  /* Events + announcements — 1 column */
  .dashboard-events-row {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   ADMIN MODERN DESIGN REFRESH
   ═══════════════════════════════════════════════════════════ */

/* ── Buttons modernos ── */
.btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  transition: all 0.18s cubic-bezier(0.4,0,0.2,1) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3) !important;
  color: #fff !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 6px 18px rgba(16,185,129,0.4) !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  background: #fff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #475569 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
.btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.btn-danger,
.btn.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(239,68,68,0.25) !important;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  box-shadow: 0 6px 16px rgba(239,68,68,0.35) !important;
  transform: translateY(-1px) !important;
}

.btn-sm {
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
  border-radius: 8px !important;
}

/* ── Filter card moderno ── */
.admin-filters-card {
  background: #fff !important;
  border-radius: 16px !important;
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important;
  padding: 20px 24px !important;
}

.admin-course-filters {
  gap: 16px !important;
  align-items: end !important;
}

.admin-course-filters__field label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  margin-bottom: 6px !important;
}

/* ── Inputs y selects modernos ── */
.admin-course-filters input[type="text"],
.admin-course-filters input[type="search"],
.admin-course-filters select,
.admin-card input[type="text"],
.admin-card input[type="email"],
.admin-card input[type="number"],
.admin-card input[type="date"],
.admin-card input[type="search"],
.admin-card select,
.admin-card textarea {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 9px 14px !important;
  font-size: 0.88rem !important;
  background: #fafafa !important;
  color: #1e293b !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.admin-course-filters input:focus,
.admin-course-filters select:focus,
.admin-card input:focus,
.admin-card select:focus,
.admin-card textarea:focus {
  border-color: #10b981 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1) !important;
}

/* ── Admin card moderno ── */
.admin-card {
  border-radius: 16px !important;
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important;
}

/* ── Table moderna ── */
.table-admin thead tr {
  background: #f8fafc !important;
}
.table-admin th {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  padding: 14px 16px !important;
  border-bottom: 2px solid #f1f5f9 !important;
}
.table-admin td {
  padding: 14px 16px !important;
  border-bottom: 1px solid #f8fafc !important;
  vertical-align: middle !important;
}
.table-admin tbody tr:hover td {
  background: #f8fafc !important;
}
.table-admin tbody tr:last-child td {
  border-bottom: none !important;
}

/* ── Admin header actions ── */
.admin-header-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}
.admin-header-actions h1 {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

/* ── Badge status modernos ── */
.badge-status {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 12px !important;
  border-radius: 99px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}
.badge-status.activo  { background: #dcfce7 !important; color: #166534 !important; }
.badge-status.oculto  { background: #fef9c3 !important; color: #854d0e !important; }
.badge-status.cerrado { background: #fee2e2 !important; color: #991b1b !important; }
.badge-status.publico { background: #dbeafe !important; color: #1e40af !important; }

/* ── Flash messages modernos ── */
.flash-msg {
  border-radius: 12px !important;
  padding: 14px 18px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  margin-bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.flash-msg.success {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
}
.flash-msg.error {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
}

/* ── Responsive — no romper ── */
@media (max-width: 768px) {
  .admin-header-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .admin-filters-card { padding: 16px !important; }
}

/* ── participantes-editar.php responsive ── */
@media (max-width: 768px) {
  /* Grid de 2 cols → 1 col */
  #admin-main div[style*="grid-template-columns: repeat(auto-fit, minmax(300px"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  /* Card padding reducido */
  .admin-card[style*="max-width:900px"] {
    padding: 20px 16px !important;
  }
  /* Botones de acciones al final — full width en columna */
  .admin-form-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .admin-form-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    height: 44px !important;
  }
}

/* ── cobros.php — KPI numbers responsive ── */
@media (max-width: 768px) {
  .admin-kpi-card__value {
    font-size: 1.4rem !important;
  }
  .admin-kpi-card {
    padding: 16px !important;
  }
  /* Tabs de cobros — scroll horizontal */
  #admin-main > div[style*="justify-content: space-between"] > div[style*="display:flex"] {
    overflow-x: auto !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
  }
  #admin-main > div[style*="justify-content: space-between"] > div[style*="display:flex"]::-webkit-scrollbar {
    display: none !important;
  }
  #admin-main > div[style*="justify-content: space-between"] > div[style*="display:flex"] a {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    font-size: 0.78rem !important;
  }
}

/* ── Admin dashboard tables — horizontal scroll ── */
@media (max-width: 900px) {
  /* All admin-card tables get horizontal scroll */
  .admin-card > div[style*="overflow-x"],
  .admin-card > div > table,
  #admin-main .admin-card table {
    min-width: 500px;
  }
  .admin-card {
    overflow-x: auto !important;
  }
  /* Dashboard report tables */
  #admin-main table {
    min-width: 480px;
  }
  #admin-main .admin-card > div {
    overflow-x: auto !important;
  }
}

/* ── participantes-editar — override inline styles on mobile ── */
@media (max-width: 600px) {
  /* Force form action buttons to stack */
  div.admin-form-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding-top: 20px !important;
  }
  div.admin-form-actions a.btn,
  div.admin-form-actions button.btn {
    width: 100% !important;
    height: 44px !important;
    padding: 0 16px !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
  }
  /* KPI value font size — override 3rem */
  .admin-kpi-card__value {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  .admin-kpi-card {
    padding: 14px 16px !important;
    gap: 12px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   TEACHER PANEL — RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Calendario — celdas comprimidas ── */
@media (max-width: 768px) {
  .teacher-calendar-grid,
  .teacher-mini-calendar__grid {
    font-size: 0.72rem !important;
  }
  .teacher-calendar-cell,
  .teacher-mini-calendar__cell {
    min-height: 48px !important;
    padding: 4px 2px !important;
  }
  /* Ocultar "+ Crear" en móvil para no comprimir */
  .teacher-calendar-cell__create,
  .teacher-calendar__create-link {
    display: none !important;
  }
  /* Cabecera del calendario */
  .teacher-mini-calendar__head {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-start !important;
  }
  .teacher-calendar-toolbar__nav {
    width: 100% !important;
    justify-content: space-between !important;
  }
}

/* ── 2. Tabs del docente — visibles en móvil ── */
@media (max-width: 768px) {
  .teacher-lms-tabs {
    position: relative !important;
    z-index: 10 !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    background: #fff !important;
  }
  .teacher-lms-tabs::-webkit-scrollbar { display: none !important; }
  .teacher-lms-tab {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 12px 16px !important;
    font-size: 0.82rem !important;
  }
  /* Shell del docente — asegurar que no haya overflow hidden que corte los tabs */
  .teacher-lms-shell {
    overflow: visible !important;
  }
  /* Contenido de la tab — asegurar visibilidad */
  .teacher-lms-block,
  .teacher-lms-overview {
    overflow: visible !important;
  }
}

/* ── 3. Notificaciones — panel fuera de pantalla ── */
@media (max-width: 768px) {
  .topbar-notifications__menu,
  #topbar-notifications-menu {
    position: fixed !important;
    top: 52px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
  }
}
