@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════════
   Colegio de Investigación Educativa — Liquid Glass Design System (Apple-inspired)
   Institutional Colors: #15a656 (Emerald) + Gold & Dark Glass
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', serif;
  --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;

  /* Brand Palette */
  --cien-primary: #15a656;
  --cien-dark: #07301b;
  --cien-light: #1ebf67;
  --cien-accent: #34d399;
  --cien-gold: #d2ac7f;
  --cien-gold-hover: #e0bf96;

  /* Classic variable fallbacks */
  --primaryColor: #15a656;
  --primaryFgColor: #ffffff;
  --secondaryColor: #15a656;
  --secondaryFgColor: #ffffff;
  --titleColor: #1d1d1b;

  --primary: #15a656;
  --primary-hover: #0e8a46;
  --primary-light: #e8f5ee;
  --secondary: #15a656;

  --dark-bg: #0b1a12;
  --dark-card: #12241a;
  --light-bg: #f4f8f5;
  --light-card: #ffffff;

  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.40);
  --text-dark: #1d1d1b;
  --text-muted: #7a7a78;

  --success: #15a656;
  --warning: #e8a23a;
  --danger: #ef4444;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;

  /* Status Colors */
  --status-active: #22c55e;
  --status-pending: #f59e0b;
  --status-alert: #ef4444;
  --status-info: #3b82f6;
  --status-admin: #a855f7;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(21, 166, 86, 0.10);

  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --bottom-nav-height: 72px;

  /* Liquid Glass Tokens */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.14);
  --glass-bg-dark: rgba(11, 26, 18, 0.65);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-border-hover: rgba(255, 255, 255, 0.28);
  --glass-blur: 20px;
  --glass-blur-heavy: 40px;
  --glass-saturate: 180%;
  --glass-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 0 80px rgba(21, 166, 86, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --surface-bg: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.10);
}

body {
  font-family: var(--font-primary);
  background-color: var(--dark-bg);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  transition: var(--transition);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATED LIQUID GLASS BACKGROUND (Canvas / Orbs / Mesh)
   ═══════════════════════════════════════════════════════════════ */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #091710 0%, #10291c 35%, #0d2116 70%, #06120c 100%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

.bg-orb-1 { width: 700px; height: 700px; background: rgba(21, 166, 86, 0.28); top: -250px; left: -200px; }
.bg-orb-2 { width: 550px; height: 550px; background: rgba(210, 172, 127, 0.15); bottom: -200px; right: -150px; animation-delay: -8s; }
.bg-orb-3 { width: 450px; height: 450px; background: rgba(14, 138, 70, 0.20); top: 40%; left: 60%; animation-delay: -4s; }
.bg-orb-4 { width: 350px; height: 350px; background: rgba(52, 211, 153, 0.10); top: 20%; left: 10%; animation-delay: -12s; }
.bg-orb-5 { width: 300px; height: 300px; background: rgba(210, 172, 127, 0.10); top: 60%; right: 20%; animation-delay: -6s; }

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(35px, -25px) scale(1.06); }
  100% { transform: translate(45px, 35px) scale(1.12); }
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(21, 166, 86, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(210, 172, 127, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(14, 138, 70, 0.14) 0%, transparent 50%);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(210, 172, 127, 0.4);
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   LIQUID GLASS LOGIN (Side-by-Side Apple Style)
   ═══════════════════════════════════════════════════════════════ */
.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 940px;
  display: flex;
  background: rgba(14, 32, 22, 0.55);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  animation: cardEntry 0.8s var(--ease-out) both;
  box-shadow: var(--glass-shadow);
  min-height: 580px;
}

@keyframes cardEntry {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* Glass Specular Highlight & Rotation */
.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(210, 172, 127, 0.04) 45deg,
    transparent 90deg,
    rgba(21, 166, 86, 0.04) 135deg,
    transparent 180deg,
    rgba(210, 172, 127, 0.03) 225deg,
    transparent 270deg,
    rgba(21, 166, 86, 0.03) 315deg,
    transparent 360deg
  );
  animation: glassRotate 18s linear infinite;
  pointer-events: none;
}

@keyframes glassRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.login-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 50%, rgba(210, 172, 127, 0.08)) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

/* ── LEFT PANEL (Branding) ── */
.panel-left {
  flex: 1.15;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  background: linear-gradient(160deg, rgba(21, 166, 86, 0.18) 0%, rgba(7, 48, 27, 0.35) 40%, rgba(11, 26, 18, 0.25) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.panel-left-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: logoEntry 1s var(--ease-spring) 0.2s both;
}

@keyframes logoEntry {
  from { opacity: 0; transform: scale(0.85) translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.logo-ring {
  display: inline-block;
  position: relative;
  margin-bottom: 24px;
}

.logo-ring::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--cien-gold);
  border-right-color: rgba(21, 166, 86, 0.6);
  animation: ringSpin 3.5s linear infinite;
}

.logo-ring::after {
  content: '';
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(210, 172, 127, 0.35);
  border-left-color: rgba(21, 166, 86, 0.3);
  animation: ringSpin 6s linear infinite reverse;
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.login-logo-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: contain;
  padding: 16px;
  border: 2px solid rgba(210, 172, 127, 0.35);
  box-shadow: 0 0 50px rgba(21, 166, 86, 0.40), 0 0 100px rgba(21, 166, 86, 0.15), 0 10px 40px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.4s var(--ease-out);
}

.login-logo-img:hover {
  border-color: rgba(210, 172, 127, 0.6);
  box-shadow: 0 0 60px rgba(21, 166, 86, 0.55), 0 10px 48px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}

.login-title-wrap {
  position: relative;
  margin-bottom: 6px;
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, var(--cien-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  line-height: 1.5;
  max-width: 290px;
}

.login-department {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 16px;
  background: rgba(21, 166, 86, 0.20);
  border: 1px solid rgba(21, 166, 86, 0.35);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: var(--cien-gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.feature-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 270px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.feature-item i, .feature-item svg {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(210, 172, 127, 0.12);
  color: var(--cien-gold);
  flex-shrink: 0;
}

/* ── RIGHT PANEL (Form & Widgets) ── */
.panel-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 44px;
  position: relative;
  z-index: 1;
}

.panel-right-header {
  margin-bottom: 24px;
  animation: fieldEntry 0.6s var(--ease-out) 0.3s both;
}

.panel-right-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.panel-right-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.form-group {
  position: relative;
  animation: fieldEntry 0.6s var(--ease-out) both;
}

.form-group:nth-child(1) { animation-delay: 0.4s; }
.form-group:nth-child(2) { animation-delay: 0.5s; }

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

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i.field-icon,
.input-wrapper svg.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-tertiary);
  transition: color 0.3s var(--ease-out);
  pointer-events: none;
  z-index: 2;
  width: 18px;
  height: 18px;
}

.login-input {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0 44px 0 46px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-system);
  outline: none;
  transition: all 0.3s var(--ease-out);
}

.login-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.login-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(21, 166, 86, 0.5);
  box-shadow: 0 0 0 3px rgba(21, 166, 86, 0.15), 0 4px 16px rgba(0, 0, 0, 0.18);
}

.login-input:focus ~ .field-icon {
  color: var(--cien-gold);
}

.login-input.invalid {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  background: rgba(239, 68, 68, 0.06);
  animation: inputShake 0.4s ease;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.input-icon-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  padding: 4px;
  z-index: 2;
}

.input-icon-right:hover { color: var(--text-secondary); }
.input-icon-right.active { color: var(--cien-gold); }

/* Login Button */
.login-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cien-primary) 0%, var(--cien-light) 50%, var(--cien-primary) 100%);
  background-size: 200% 200%;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-system);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  animation: fieldEntry 0.6s var(--ease-out) 0.6s both;
  box-shadow: 0 4px 20px rgba(21, 166, 86, 0.3);
}

.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
  background-size: 200% 200%;
  transition: all 0.3s;
}

.login-btn:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(21, 166, 86, 0.45), 0 0 40px rgba(21, 166, 86, 0.2);
}

.login-btn:active {
  transform: translateY(0) scale(0.98);
}

.login-btn .btn-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   AMBIENT WIDGETS (Weather & Date/Time)
   ═══════════════════════════════════════════════════════════════ */
.weather-widget {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fieldEntry 0.6s var(--ease-out) 0.7s both;
  transition: all 0.3s var(--ease-out);
}

.weather-widget:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.weather-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  animation: weatherIconBounce 3s ease-in-out infinite;
}

@keyframes weatherIconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.weather-info { flex: 1; min-width: 0; }

.weather-temp {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

.weather-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
  text-transform: capitalize;
}

.weather-location {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.weather-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.weather-detail {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-tertiary);
}

.datetime-widget {
  margin-top: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fieldEntry 0.6s var(--ease-out) 0.8s both;
  transition: all 0.3s var(--ease-out);
}

.datetime-widget:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.datetime-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(210, 172, 127, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.datetime-icon i, .datetime-icon svg {
  font-size: 18px;
  color: var(--cien-gold);
  width: 20px;
  height: 20px;
}

.datetime-info { flex: 1; min-width: 0; }

.datetime-time {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.datetime-date {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 3px;
  text-transform: capitalize;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE PANELS & DASHBOARD LIQUID GLASS UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.08) 60%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.glass-panel:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.glass-panel-dark {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur-heavy)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

.glass-dark {
  background: rgba(7, 35, 20, 0.88);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border-right: 1px solid var(--glass-border);
  position: relative;
}

.glass-dark::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.18) 0%, transparent 100%);
  pointer-events: none;
}

.glass-light {
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 40px rgba(16, 110, 55, 0.07);
  border-radius: var(--border-radius-md);
  position: relative;
}

.glass-hero {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.liquid-nav {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.60);
  box-shadow: 0 4px 24px rgba(16, 110, 55, 0.06);
  position: relative;
}

.liquid-nav-dark {
  background: rgba(11, 26, 18, 0.78);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  position: relative;
}

.hero-kpi {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.hero-kpi:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hero-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.05) 70%, transparent 100%);
  pointer-events: none;
}

.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  font-weight: 600;
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
  text-decoration: none;
}

.cat-tile:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.cat-tile .cat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  position: relative;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cat-tile .cat-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}

.cat-tile:hover .cat-icon {
  transform: scale(1.06);
  box-shadow: var(--shadow-md);
}

.cat-tile.cat-active {
  background: rgba(21, 166, 86, 0.15);
  border-color: rgba(21, 166, 86, 0.3);
}

.cat-tile.cat-active .cat-icon {
  box-shadow: 0 4px 20px rgba(21, 166, 86, 0.4);
}

/* Catálogo icon gradients */
.bg-niveles { background: linear-gradient(145deg, #26a69a, #00796b); }
.bg-carreras { background: linear-gradient(145deg, #1976d2, #0d47a1); }
.bg-periodos { background: linear-gradient(145deg, #f9a825, #f57f17); }
.bg-grupos { background: linear-gradient(145deg, #7e57c2, #512da8); }
.bg-conceptos { background: linear-gradient(145deg, #43a047, #2e7d32); }
.bg-estatus { background: linear-gradient(145deg, #e65100, #bf360c); }
.bg-roles { background: linear-gradient(145deg, #303f9f, #1a237e); }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .72rem .98rem;
  border-radius: 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  transition: all .2s ease;
  border: none;
  cursor: pointer;
  background: transparent;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  transform: translateX(3px);
}

.sidebar-item.sidebar-active {
  background: linear-gradient(135deg, var(--cien-primary), #0e8a46);
  color: #fff;
  box-shadow: 0 8px 22px rgba(21, 166, 86, 0.4);
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: rgba(7, 35, 20, 0.65);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--surface-border);
}

.topbar-hamburger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.topbar-hamburger:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-bar input {
  width: 100%;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0 16px 0 40px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.25s var(--ease-out);
  font-family: var(--font-system);
}

.search-bar input::placeholder { color: var(--text-tertiary); }

.search-bar input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cien-primary);
  box-shadow: 0 0 0 3px rgba(21, 166, 86, 0.15);
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 14px;
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  position: relative;
}

.topbar-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

.topbar-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--status-alert);
  border-radius: 50%;
  border: 2px solid rgba(7, 35, 20, 0.8);
}

.topbar-date {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.2s;
}

.topbar-user:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cien-primary), var(--cien-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-user-role {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   HERO PANEL (Full-width banner with KPIs)
   ═══════════════════════════════════════════════════════════════ */
.hero-panel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-panel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-panel-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-panel-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(7, 48, 27, 0.85) 0%,
    rgba(7, 48, 27, 0.60) 40%,
    rgba(7, 48, 27, 0.30) 70%,
    rgba(7, 48, 27, 0.12) 100%);
}

.hero-panel-content {
  position: relative;
  z-index: 1;
  padding: 28px 32px 0;
}

.hero-panel-greeting {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-panel-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-panel-kpis {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 24px 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-kpi-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
}

.hero-kpi-card:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hero-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.hero-kpi-icon.green { background: rgba(34, 197, 94, 0.25); color: #22c55e; }
.hero-kpi-icon.red { background: rgba(239, 68, 68, 0.25); color: #ef4444; }
.hero-kpi-icon.blue { background: rgba(59, 130, 246, 0.25); color: #3b82f6; }
.hero-kpi-icon.yellow { background: rgba(245, 158, 11, 0.25); color: #f59e0b; }

.hero-kpi-info {
  flex: 1;
  min-width: 0;
}

.hero-kpi-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin-bottom: 1px;
}

.hero-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   STATUS PILLS & BADGES
   ═══════════════════════════════════════════════════════════════ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill.active {
  background: rgba(34, 197, 94, 0.12);
  color: var(--status-active);
}
.status-pill.active::before { background: var(--status-active); }

.status-pill.inactive {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171; /* rojo aclarado: #ef4444 no alcanza contraste mínimo sobre fondo oscuro */
}
.status-pill.inactive::before { background: var(--status-alert); }

.status-pill.leave {
  background: rgba(245, 158, 11, 0.12);
  color: var(--status-pending);
}
.status-pill.leave::before { background: var(--status-pending); }

.nav-badge {
  margin-left: auto;
  background: var(--status-alert);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
}

.notif-filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-system);
}

.notif-filter-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.notif-filter-btn.active {
  background: rgba(21, 166, 86, 0.25);
  color: var(--cien-primary);
  border-color: rgba(21, 166, 86, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: all 0.2s var(--ease-out);
  font-family: var(--font-system);
  text-decoration: none;
}

.btn-glass {
  background: var(--glass-bg);
  color: var(--text-primary);
}
.btn-glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cien-primary), var(--cien-light));
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(21, 166, 86, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
}

.custom-table thead {
  background: rgba(255, 255, 255, 0.04);
}

.custom-table th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--surface-border);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.custom-table th:hover {
  color: var(--text-secondary);
}

.custom-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--surface-border);
  white-space: nowrap;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr {
  transition: background 0.15s;
  cursor: pointer;
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.custom-table tbody tr:hover td {
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   BOTTOM NAV (Mobile)
   ═══════════════════════════════════════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(7, 35, 20, 0.92);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border-top: 1px solid var(--glass-border);
  z-index: 30;
  padding: 0 8px;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.bottom-nav-item i {
  font-size: 20px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--cien-primary);
  background: rgba(21, 166, 86, 0.12);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR OVERLAY (Mobile)
   ═══════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.sidebar-overlay.open {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.page-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: var(--font-system);
}

.page-btn:hover:not([disabled]):not(.active) {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.page-btn.active {
  background: rgba(21, 166, 86, 0.3);
  color: var(--cien-primary);
  border-color: rgba(21, 166, 86, 0.4);
}

.page-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.animate-screen-in {
  animation: screenIn 0.4s var(--ease-out) both;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */

/* Tablet Landscape / Small Desktop (1024px) */
@media(max-width: 1024px) {
  .hero-panel-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-panel-content {
    padding: 20px 24px 0;
  }
  .hero-panel-greeting {
    font-size: 22px;
  }
}

/* Tablet Portrait / Mobile Landscape (768px) */
@media(max-width: 768px) {
  /* Sidebar becomes off-canvas drawer */
  .glass-dark {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease-out);
  }
  .glass-dark.open {
    transform: translateX(0);
  }

  .topbar-hamburger {
    display: flex;
  }

  /* Bottom nav appears */
  .bottom-nav {
    display: flex;
  }

  /* Content padding */
  .main-content {
    padding-bottom: var(--bottom-nav-height);
  }

  /* Hero KPIs go 2-col */
  .hero-panel-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px 14px 14px;
  }

  /* Search bar */
  .search-bar {
    max-width: none;
  }
  .topbar-date {
    display: none;
  }

  /* Topbar */
  .topbar {
    padding: 0 16px;
  }

  /* Hero */
  .hero-panel-content {
    padding: 14px 16px 0;
  }
  .hero-panel-greeting {
    font-size: 18px;
  }
  .hero-panel-subtitle {
    font-size: 11px;
  }

  /* Tables */
  .custom-table th,
  .custom-table td {
    padding: 10px 10px;
    font-size: 12px;
  }

  /* Sidebar nav items */
  .sidebar-item {
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
  }
}

/* Small Phone (480px) */
@media(max-width: 480px) {
  /* Hero KPIs compact */
  .hero-panel-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px 12px;
  }
  .hero-kpi-card {
    padding: 10px 10px;
    gap: 8px;
  }
  .hero-kpi-icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .hero-kpi-value {
    font-size: 20px;
  }

  /* Topbar: hide user name */
  .topbar-user-info {
    display: none;
  }

  /* Filter inputs */
  .search-bar input {
    font-size: 14px;
  }

  /* Hide secondary table columns */
  .hide-mobile {
    display: none;
  }

  /* Login card */
  .login-card {
    max-width: 440px;
    min-height: auto;
    border-radius: 28px;
  }
  .panel-left {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 24px 24px;
  }
  .login-logo-img {
    width: 90px;
    height: 90px;
  }
  .login-title {
    font-size: 22px;
  }
  .feature-list {
    display: none;
  }
  .panel-right {
    padding: 36px 32px 24px;
  }
}



/* ===============================================================
   MODALES OSCUROS (dark-modals) - UNICA FUENTE DE VERDAD
   Repinta modales y menus contextuales a "glass oscuro" para que
   las utilidades claras de Tailwind usadas dentro (bg-white,
   bg-slate-50, text-slate-*, etc.) no rompan el tema oscuro.

   Scope: SOLO paginas con <body class="... modals-dark ...">
   (dashboard-admin). El portal del alumno mantiene sus modales
   en tema claro y login no tiene modales propios.
   =============================================================== */

/* Contenedor de modal y menus contextuales */
body.modals-dark [id^="modal"] > div,
body.modals-dark [id^="menu"] {
  background: rgba(14, 32, 22, 0.88) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  color: var(--text-primary) !important;
}

/* Cajas claras internas (headers, paneles) */
body.modals-dark [id^="modal"] .bg-slate-50 {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
body.modals-dark #modalChat .bg-slate-50 {
  background: rgba(255, 255, 255, 0.03) !important;
}
body.modals-dark #modalMensaje .bg-slate-50 {
  background: rgba(255, 255, 255, 0.06) !important;
}
body.modals-dark [id^="modal"] .bg-white {
  background: rgba(14, 32, 22, 0.88) !important;
}

/* Textos */
body.modals-dark [id^="modal"] h3,
body.modals-dark [id^="modal"] .text-slate-800 {
  color: var(--text-primary) !important;
}
body.modals-dark [id^="modal"] .text-gray-500,
body.modals-dark [id^="modal"] .text-slate-600,
body.modals-dark [id^="modal"] .text-slate-400 {
  color: var(--text-secondary) !important;
}
body.modals-dark [id^="modal"] .text-slate-400:hover {
  color: var(--text-primary) !important;
}
body.modals-dark [id^="modal"] label {
  color: var(--text-secondary) !important;
}

/* Inputs, selects y textareas */
body.modals-dark [id^="modal"] input[type="text"],
body.modals-dark [id^="modal"] input[type="email"],
body.modals-dark [id^="modal"] input[type="password"],
body.modals-dark [id^="modal"] input[type="date"],
body.modals-dark [id^="modal"] input[type="number"],
body.modals-dark [id^="modal"] select,
body.modals-dark [id^="modal"] textarea {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-primary) !important;
}
body.modals-dark [id^="modal"] input::placeholder,
body.modals-dark [id^="modal"] textarea::placeholder {
  color: var(--text-tertiary) !important;
}
body.modals-dark [id^="modal"] input:focus,
body.modals-dark [id^="modal"] select:focus,
body.modals-dark [id^="modal"] textarea:focus {
  border-color: var(--cien-primary) !important;
  box-shadow: 0 0 0 2px rgba(21, 166, 86, 0.25) !important;
  outline: none !important;
}

/* Opciones de los <select> (dropdown nativo) */
body.modals-dark [id^="modal"] select option {
  background: #0e2016;
  color: var(--text-primary);
}

/* Bordes y divisores */
body.modals-dark [id^="modal"] .border-t,
body.modals-dark [id^="modal"] .border-b {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
body.modals-dark [id^="modal"] .border-slate-200 {
  border-color: var(--glass-border) !important;
  color: var(--text-secondary) !important;
}
body.modals-dark [id^="modal"] .border-slate-200:hover {
  background: var(--glass-bg-hover) !important;
  color: var(--text-primary) !important;
}

/* Alertas rojas dentro de modales */
body.modals-dark [id^="modal"] .bg-red-50\/50,
body.modals-dark [id^="modal"] [class*="bg-red-50"] {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

/* Menus contextuales (acciones de tablas) */
body.modals-dark #menuAcciones,
body.modals-dark #menuMensaje,
body.modals-dark #menuDesactivar,
body.modals-dark #menuModificar,
body.modals-dark #menuRegenerarPass {
  background: rgba(14, 32, 22, 0.95) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4) !important;
}
body.modals-dark [id^="menu"] button {
  color: rgba(255, 255, 255, 0.7) !important;
}
body.modals-dark [id^="menu"] button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
}


/* ===============================================================
   PORTAL DEL ALUMNO — RESPONSIVE
   Scope: SOLO paginas con <body class="... portal-responsive ...">
   (portal-alumno). El dashboard no se ve afectado.
   =============================================================== */

/* Base: el portal tiene 2 KPIs (el dashboard 3) */
body.portal-responsive .hero-panel-kpis {
  grid-template-columns: repeat(2, 1fr);
}

/* Teléfonos y tablets estrechas */
@media (max-width: 640px) {
  body.portal-responsive .topbar {
    padding: 0 12px;
    gap: 10px;
  }
  body.portal-responsive .hero-panel-content {
    padding: 16px 16px 0;
  }
  body.portal-responsive .hero-panel-greeting {
    font-size: 20px;
  }
}

/* Teléfonos estrechos: KPIs a una columna */
@media (max-width: 480px) {
  body.portal-responsive .topbar {
    padding: 0 10px;
    gap: 8px;
  }
  body.portal-responsive .hero-panel-kpis {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px 12px;
  }
  body.portal-responsive .hero-panel-greeting {
    font-size: 18px;
  }
  body.portal-responsive .hero-panel-subtitle {
    font-size: 11px;
  }
}

/* Login page responsive */
@media(max-width: 900px) {
  .login-card {
    max-width: 720px;
    min-height: auto;
  }
  .panel-left {
    padding: 36px 28px;
  }
  .login-logo-img {
    width: 100px;
    height: 100px;
  }
  .login-title {
    font-size: 24px;
  }
  .panel-right {
    padding: 36px 32px;
  }
}
