

:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;
  min-height: 100vh;
  width: 100%;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
/* ===== VARIABLES GLOBALES ===== */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --text-color: #333;
  --bg-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.1);
  --border-radius: 15px;
  --shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== HEADER STYLES ===== */
.home-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  padding: 1rem 0;
  transition: var(--transition);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo h2 {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* General styles */
html {
  scroll-behavior: smooth;
}

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes cursorBlink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

@keyframes staggeredFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll offset for fixed header */
#contact {
  scroll-margin-top: 100px;
}

#info {
  scroll-margin-top: 100px;
}

/* Home Container */
.home-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
  padding-top: 80px; /* Espacio para el header fijo */
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Partículas de fondo */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  background: linear-gradient(45deg, #4A90E2, #7BB3F0);
  border-radius: 50%;
  animation: particleFloat linear infinite;
  opacity: 0.3;
}

.particle:nth-child(odd) {
  background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
}

.particle:nth-child(3n) {
  background: linear-gradient(45deg, #4ECDC4, #6EDDD6);
  border-radius: 20%;
}

.particle:nth-child(4n) {
  background: linear-gradient(45deg, #FFE66D, #FFF176);
  border-radius: 0;
  transform: rotate(45deg);
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 100px; /* Space for fixed header */
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 3rem;
  animation: fadeInUp 1s ease-out;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 3rem;
}

.hero-content {
  flex: 1;
  max-width: 550px;
  animation: fadeInLeft 1s ease-out 0.3s both;
  z-index: 10;
}


/* Typewriter Effect */
.typewriter {
  display: block;
  overflow: hidden;
}

.cursor {
  animation: cursorBlink 1s infinite;
  font-weight: normal;
  color: #4A90E2;
}

/* Staggered Animation */
.staggered-animation {
  opacity: 0;
  animation: staggeredFadeIn 0.8s ease-out forwards;
}

/* Staggered Animation específica para imágenes */
.student-img.staggered-animation,
.puzzle-img.staggered-animation,
.success-img.staggered-animation {
  opacity: 0;
  animation: staggeredFadeIn 0.8s ease-out forwards, float3d 4s ease-in-out infinite;
  animation-delay: inherit, 2s;
}

.hero-title {
  margin-bottom: 2rem;
}

.title-3d {
  display: block;
  font-size: 3.5rem;
  font-weight: bold;
  color: #4A90E2;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.title-trend {
  display: block;
  font-size: 3.5rem;
  font-weight: bold;
  color: #333;
  line-height: 1.1;
  text-transform: uppercase;
}

.workshop-info {
  margin-bottom: 1.5rem;
}

.workshop-info h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin: 0.2rem 0;
}

.free-text {
  color: #4A90E2;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.5rem 0 0 0;
}

.description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-links.form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: #666;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #4A90E2;
  transform: translateY(-2px);
}

.website {
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Hero Image */
.hero-image {
  flex: 1;
  text-align: center;
  animation: fadeInRight 1s ease-out 0.6s both;
  position: relative;
}

.character-img {
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  transform: scale(1.0);
  transition: transform 0.3s ease;
  /* Sin animación para que permanezca quieta */
}

.character-img:hover {
  transform: scale(1.05);
}

/* Logo de La Lengua en Hero - Efecto Espejo */
.hero-lengua-logo {
  max-width: 550px;
  max-height: 550px;
  transform: scaleX(-1);
  filter: drop-shadow(0 20px 40px rgba(102, 126, 234, 0.3));
  animation: floatLengua 4s ease-in-out infinite;
}

.hero-lengua-logo:hover {
  transform: scaleX(-1) scale(1.1);
}

@keyframes floatLengua {
  0%, 100% {
    transform: scaleX(-1) translateY(0px);
  }
  50% {
    transform: scaleX(-1) translateY(-20px);
  }
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
  color: white;
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8), 0 0 0 10px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-logo {
    width: 120px;
  }
  
  .logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
  }
  
  .title-3d,
  .title-trend {
    font-size: 2.8rem;
  }
  
  .hero-content {
    max-width: 100%;
    margin-bottom: 2rem;
  }
  
  .character-img {
    max-height: 50vh;
    transform: scale(1.0);
  }
  
  .hero-lengua-logo {
    max-width: 350px;
    max-height: 350px;
  }
  
  .workshop-info h2 {
    font-size: 1.3rem;
  }
  
  .description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 0.5rem;
  }
}

/* Programs Section */
.programs-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, rgba(245, 247, 250, 0.8) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 1) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.programs-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(180deg, rgba(245, 247, 250, 1) 0%, rgba(245, 247, 250, 0) 100%);
  pointer-events: none;
}

.programs-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 1rem;
  font-weight: 400;
}

.programs-title {
  font-size: 3.5rem;
  font-weight: bold;
  color: #333;
  line-height: 1.1;
}

.programs-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 4rem;
}

.programs-text {
  flex: 1;
  max-width: 600px;
}

.programs-highlight {
  color: #4A90E2;
}

.program-info {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.program-name {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.program-highlight {
  color: #4A90E2;
}

.program-number {
  font-size: 8rem;
  font-weight: bold;
  color: #4A90E2;
  opacity: 0.3;
  line-height: 1;
}

.program-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: #4A90E2;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  background: #3a7bc8;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(74, 144, 226, 0.4);
}

.submit-btn:active {
  transform: translateY(-1px);
}

.info-button {
  background: #333;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.info-button:hover {
  background: #555;
  transform: translateY(-2px);
}

.submit-button.shimmer-button {
  background: #333;
}

.programs-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.student-img {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

.student-img:hover {
  transform: perspective(1000px) rotateY(15deg) rotateX(5deg) translateZ(20px);
  filter: brightness(1.1) contrast(1.05);
}

/* Programs Section Responsive */
@media (max-width: 768px) {
  .programs-section {
    padding: 4rem 2rem;
  }
  
  .programs-content {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
  
  .programs-title {
    font-size: 2.5rem;
  }
  
  .program-info {
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
  }
  
  .program-name {
    font-size: 1.5rem;
  }
  
  .program-number {
    font-size: 6rem;
  }
}

@media (max-width: 480px) {
  .programs-section {
    padding: 3rem 1rem;
  }
  
  .programs-title {
    font-size: 2rem;
  }
  
  .program-name {
    font-size: 1.3rem;
  }
  
  .program-number {
    font-size: 4rem;
  }
}

/* Program Level 2 Section */
.program-level2-section {
  padding: 6rem 3rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(248, 245, 255, 0.8) 50%, rgba(240, 235, 255, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.program-level2-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.program-level2-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 4rem;
}

.program-level2-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.puzzle-img {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

.puzzle-img:hover {
  transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateZ(20px);
  filter: brightness(1.1) contrast(1.05);
}

.program-level2-text {
  flex: 1;
  max-width: 600px;
}

.program-level2-info {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.program-level2-name {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.program-level2-number {
  font-size: 8rem;
  font-weight: bold;
  color: #4A90E2;
  opacity: 0.3;
  line-height: 1;
}

.program-level2-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* Program Level 2 Section Responsive */
@media (max-width: 768px) {
  .program-level2-section {
    padding: 4rem 2rem;
  }
  
  .program-level2-content {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
  
  .program-level2-info {
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
  }
  
  .program-level2-name {
    font-size: 1.5rem;
  }
  
  .program-level2-number {
    font-size: 6rem;
  }
}

@media (max-width: 480px) {
  .program-level2-section {
    padding: 3rem 1rem;
  }
  
  .program-level2-name {
    font-size: 1.3rem;
  }
  
  .program-level2-number {
    font-size: 4rem;
  }
}

/* Program Level 3 Section */
.program-level3-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, rgba(240, 235, 255, 0.9) 0%, rgba(250, 248, 255, 0.8) 50%, rgba(255, 255, 255, 1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.program-level3-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(240, 235, 255, 0.9) 0%, rgba(240, 235, 255, 0) 100%);
  pointer-events: none;
}

.program-level3-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 4rem;
}

.program-level3-text {
  flex: 1;
  max-width: 600px;
}

.program-level3-info {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.program-level3-name {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.program-level3-number {
  font-size: 8rem;
  font-weight: bold;
  color: #4A90E2;
  opacity: 0.3;
  line-height: 1;
}

.program-level3-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.program-level3-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.success-img {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

.success-img:hover {
  transform: perspective(1000px) rotateY(15deg) rotateX(5deg) translateZ(20px);
  filter: brightness(1.1) contrast(1.05);
}

/* Animación de flotación 3D */
@keyframes float3d {
  0%, 100% {
    transform: translateY(0px) rotateX(0deg);
  }
  50% {
    transform: translateY(-10px) rotateX(2deg);
  }
}

/* Program Level 3 Section Responsive */
@media (max-width: 768px) {
  .program-level3-section {
    padding: 4rem 2rem;
  }
  
  .program-level3-content {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
  
  .program-level3-info {
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
  }
  
  .program-level3-name {
    font-size: 1.5rem;
  }
  
  .program-level3-number {
    font-size: 6rem;
  }
}

@media (max-width: 480px) {
  .program-level3-section {
    padding: 3rem 1rem;
  }
  
  .program-level3-name {
    font-size: 1.3rem;
  }
  
  .program-level3-number {
    font-size: 4rem;
  }
}

/* Contact Form Section */
.contact-form-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(245, 247, 250, 0.9) 30%, rgba(230, 235, 245, 1) 100%);
  color: #333;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

.contact-form-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.contact-form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  width: 100%;
  gap: 3rem;
}

.contact-title {
  font-size: 4rem;
  font-weight: bold;
  color: #333;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.contact-highlight {
  color: #4A90E2;
}

.program-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto 3rem auto;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out 1s both;
}

.program-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.form-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1s ease-out 1.2s both;
  transition: all 0.3s ease;
}

.form-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-title {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  font-size: 1.2rem;
  color: #666;
  text-align: center;
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.form-row.names-row {
  gap: 3rem;
}

.form-row.country-city-row {
  gap: 3rem;
  justify-content: space-between;
  margin: 1.5rem 0;
}

.form-row.country-city-row .form-group {
  flex: 1;
}

/* Content sections - siempre visibles */
.content-sections {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  height: auto;
}

/* Scroll Indicator animations */
.scroll-indicator-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 2rem 0;
  z-index: 10;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.scroll-indicator-wrapper.fade-in {
  opacity: 1;
  transform: scale(1) translateY(0);
  visibility: visible;
  animation: bounceIn 1.2s ease-out;
}

.scroll-indicator-wrapper.fade-out {
  opacity: 0;
  transform: scale(0.8) translateY(-20px);
  visibility: hidden;
  pointer-events: none;
  animation: fadeOutUp 0.6s ease-in forwards;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(30px);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05) translateY(-5px);
  }
  70% {
    transform: scale(0.95) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeOutUp {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.9) translateY(-10px) rotate(5deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.7) translateY(-30px) rotate(10deg);
    visibility: hidden;
  }
}

.form-group {
  flex: 1;
  min-width: 200px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
  transform: translateY(-2px);
}

.phone-input {
  display: flex;
  gap: 0.5rem;
}

.country-code {
  width: 120px;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
}

.phone-number {
  flex: 1;
}

.submit-button {
  background: #333;
  color: white;
  padding: 1.2rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.submit-button:hover {
  background: #555;
  transform: translateY(-2px);
}

.submit-button.shimmer-button:hover {
  background: #555 !important;
  transform: translateY(-2px) !important;
  animation: none !important;
}

/* Mensajes de estado del formulario */
.submit-message {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-weight: 500;
  text-align: center;
  animation: fadeInUp 0.5s ease-out;
}

.submit-message.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.submit-message.error {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.submit-button:disabled {
  background: #ccc !important;
  cursor: not-allowed;
  animation: none !important;
  transform: none !important;
  opacity: 0.7;
}

.submit-button:disabled:hover {
  background: #ccc !important;
  transform: none !important;
  animation: none !important;
}


/* === ✈️ Avión y rastro === */
.avioncito {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
  transform-origin: center;
}

.rastro-svg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none;
}

/* Contact Form Responsive */
@media (max-width: 768px) {
  .contact-form-section {
    padding: 4rem 2rem 0;
  }
  
  .contact-title {
    font-size: 2.5rem;
  }
  
  .form-card {
    padding: 2rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-group {
    min-width: 100%;
  }
  
  .phone-input {
    flex-direction: column;
  }
  
  .country-code {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .contact-form-section {
    padding: 3rem 1rem 0;
  }
  
  .contact-title {
    font-size: 2rem;
  }
  
  .form-card {
    padding: 1.5rem;
  }
}

/* From Uiverse.io by mrhyddenn */ 
.scrolldown {
  --color: #4A90E2;
  --sizeX: 30px;
  --sizeY: 50px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--sizeX);
  height: var(--sizeY);
  border: calc(var(--sizeX) / 10) solid var(--color);
  border-radius: 50px;
  box-sizing: border-box;
  cursor: pointer;
  z-index: 1000;
}

.scrolldown::before {
  content: "";
  position: absolute;
  bottom: 30px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background-color: var(--color);
  border-radius: 100%;
  animation: scrolldown-anim 2s infinite;
  box-sizing: border-box;
  box-shadow: 0px -5px 3px 1px #2a547066;
}

@keyframes scrolldown-anim {
  0% {
    opacity: 0;
    height: 6px;
  }

  40% {
    opacity: 1;
    height: 10px;
  }

  80% {
    transform: translate(0, 20px);
    height: 10px;
    opacity: 0;
  }

  100% {
    height: 3px;
    opacity: 0;
  }
}

.chevrons {
  padding: 6px 0 0 0;
  margin-left: -3px;
  margin-top: 48px;
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chevrondown {
  margin-top: -6px;
  position: relative;
  border: solid var(--color);
  border-width: 0 3px 3px 0;
  display: inline-block;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
}

.chevrondown:nth-child(odd) {
  animation: pulse54012 500ms ease infinite alternate;
}

.chevrondown:nth-child(even) {
  animation: pulse54012 500ms ease infinite alternate 250ms;
}

@keyframes pulse54012 {
  from {
    opacity: 0;
  }

  to {
    opacity: 0.5;
  }
}

.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 9999;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
  transform-origin: left;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}
/* Gallery Container */
.blog-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.blog-main {
  padding-top: 80px; /* Space for fixed header */
  min-height: calc(100vh - 80px);
}

/* Hero Section */
.blog-hero {
  position: relative;
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.upload-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  bottom: 30%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Categories Section */
.categories-section {
  padding: 3rem 2rem;
  background: white;
}

.categories-container {
  max-width: 1200px;
  margin: 0 auto;
}

.categories-title {
  font-size: 2rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 2rem;
  text-align: center;
}

.categories-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.category-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #e2e8f0;
  background: white;
  color: #4a5568;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.category-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Upload Modal */
.upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.upload-modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.upload-header h2 {
  margin: 0;
  color: #2d3748;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #718096;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #f7fafc;
  color: #2d3748;
}

.upload-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2d3748;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-file {
  width: 100%;
  padding: 0.5rem;
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-file:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.form-divider {
  display: block;
  text-align: center;
  margin: 1rem 0;
  color: #718096;
  font-weight: 500;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.cancel-btn {
  background: #f7fafc;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Media Gallery Section */
.media-section {
  padding: 3rem 2rem;
  background: #f8fafc;
}

.media-container {
  max-width: 1200px;
  margin: 0 auto;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.media-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  display: flex;              /* Flex para alinear contenido */
  flex-direction: column;     /* Columna */
}

.media-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.media-thumbnail {
  position: relative;
  height: 220px;              /* Altura aumentada */
  overflow: hidden;
}

.media-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* Cambiado a cover para llenar el espacio */
  object-position: center;    /* Centrar la imagen */
  transition: transform 0.3s ease;
}

.media-card:hover .media-thumbnail img {
  transform: scale(1.05);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-card:hover .play-overlay {
  opacity: 1;
}

.play-button {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #667eea;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.media-card:hover .play-button {
  transform: scale(1);
}

.media-type-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.media-card-content {
  padding: 1rem;              /* Padding uniforme más compacto */
  display: flex;              /* Flex en el contenido */
  flex-direction: column;     /* Columna */
  height: 100%;               /* Ocupar altura disponible */
}

.media-card-title {
  font-size: 1.2rem;          
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;        /* Más separación del título */
  line-height: 1.4;           
}

.media-description {
  color: #718096;
  line-height: 1.6;           
  margin-bottom: 1.5rem;      /* Más espacio antes del autor */
  font-size: 0.95rem;         
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;               /* Ocupa espacio disponible */
}

.media-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;               
  font-size: 0.8rem;          
  color: #a0aec0;
  margin-bottom: 1.2rem;      /* Más espacio antes del botón */
  margin-top: auto;           /* Empuja hacia abajo */
}

.media-author {
  font-weight: 500;
  color: #667eea;
}

.view-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: auto;           /* Empuja el botón al fondo */
}

.view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Stats Section removida */

/* Media Detail */
.media-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.back-button {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.back-button:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.media-article {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.media-header {
  padding: 2rem 2rem 1rem;
}

.media-category {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

.media-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.media-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 0;
}

.media-type {
  font-weight: 600;
  color: #667eea;
}

.media-content {
  margin: 2rem;
}

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 12px;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.image-container {
  border-radius: 12px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.media-description {
  padding: 0 2rem 2rem;
}

.media-description h3 {
  color: #2d3748;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.media-description p {
  line-height: 1.8;
  font-size: 1.1rem;
  color: #4a5568;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .media-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .categories-filter {
    gap: 0.5rem;
  }
  
  .category-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Reglas de .stats-* removidas */
  
  .media-title {
    font-size: 2rem;
  }
  
  .media-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .media-detail {
    padding: 1rem;
  }
  
  .media-content {
    margin: 1rem;
  }
  
  .media-description {
    padding: 0 1rem 1.5rem;
  }
  
  .media-header {
    padding: 1.5rem 1rem 1rem;
  }
  
  .upload-modal {
    padding: 1rem;
  }
  
  .upload-modal-content {
    max-height: 95vh;
  }
  
  .upload-header,
  .upload-form {
    padding: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  color: white;
  width: 28px;
  height: 28px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 2rem 1rem;
  }
  
  .categories-section,
  .posts-section {
    padding: 2rem 1rem;
  }
  
  .newsletter-section {
    padding: 3rem 1rem;
  }
  
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}
/* Header para página Home */
.header-home {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    opacity: 1 !important;
}

.logo-brand:hover {
    transform: scale(1.05);
}

.logo-image {
    width: 45px;
    height: auto;
    display: block;
    opacity: 1 !important;
}

.header-home .logo .logo-brand .logo-text {
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    color: #5a67d8 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #5a67d8 !important;
    background-clip: unset !important;
}

/* Navegación */
.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-shrink: 0;
}

.nav a,
.nav a:link,
.nav a:visited {
    color: #333 !important;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    background: transparent;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.nav a:hover::before {
    left: 100%;
}

.nav a:hover,
.nav a:link:hover,
.nav a:visited:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px) scale(1.02) rotateX(5deg);
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6), 0 4px 8px rgba(0, 0, 0, 0.15); }
    100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1); }
}

.nav a.active,
.nav a.active:link,
.nav a.active:visited {
    color: #333 !important;
    background: transparent;
    font-weight: 600;
}

.nav a.active:hover,
.nav a.active:link:hover,
.nav a.active:visited:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px) scale(1.02);
}

/* Login Button */
.login-btn, .profesor-login-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #ffffff;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.profesor-login-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-btn .btn-text,
.login-btn .btn-hover,
.profesor-login-btn .btn-text,
.profesor-login-btn .btn-hover {
    display: inline-block;
    transition: all 0.3s ease;
}

.login-btn .btn-hover,
.profesor-login-btn .btn-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(100%);
    opacity: 0;
}

.login-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.05);
}

.profesor-login-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.05);
}

.login-btn:hover .btn-text,
.profesor-login-btn:hover .btn-text {
    transform: translateY(-100%);
    opacity: 0;
}

.login-btn:hover .btn-hover,
.profesor-login-btn:hover .btn-hover {
    transform: translate(-50%, -50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header-home {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }
    
    .logo-image {
        width: 40px;
    }
    
    .logo-text {
        font-size: 0.85rem;
    }
    
    .nav {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .header-home {
        padding: 0.8rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        row-gap: 0.5rem;
    }
    
    .logo-image {
        width: 35px;
    }
    
    .logo-text {
        font-size: 0.75rem;
    }
    
    .nav {
        width: 100%;
        justify-content: flex-end;
    }
    
    .nav a {
        display: none;
    }
}
/* Header */
.header {
  background: #2563eb;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  font-weight: bold;
  font-size: 1.2rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links li {
  cursor: pointer;
  transition: opacity 0.2s;
}
.nav-links li:hover {
  opacity: 0.8;
}

.points {
  font-weight: bold;
}
/* Footer */
.footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0 0;
  margin-top: 0;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 25px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  position: relative;
  z-index: 1;
}

/* Footer Brand */
.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-emoji {
  font-size: 1.8rem;
  animation: float 3s ease-in-out infinite;
}

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

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Footer Links */
.footer-links h3,
.footer-social h3,
.footer-contact h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #ffffff;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
  transform: translateX(5px);
}

/* Social Links Simple */
.social-links-simple {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-left: -8px;
}

.social-icon-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.social-icon-simple:hover {
  color: #ffffff;
  transform: translateY(-3px) scale(1.1);
}

.social-icon-simple:first-child:hover {
  color: #1877F2;
  filter: drop-shadow(0 4px 12px rgba(24, 119, 242, 0.3));
}

.social-icon-simple:nth-child(2):hover {
  color: #E4405F;
  filter: drop-shadow(0 4px 12px rgba(228, 64, 95, 0.3));
}

.social-icon-simple:last-child:hover {
  color: #ff0050;
  filter: drop-shadow(0 4px 12px rgba(255, 0, 80, 0.3));
}

/* Contact Info */
.contact-info p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px 0;
  margin-top: 40px;
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 25px;
  justify-content: center;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 20px 25px;
  }
  
  .footer-brand {
    max-width: 100%;
    text-align: center;
  }
  
  .footer-links,
  .footer-social,
  .footer-contact {
    text-align: center;
  }
  
  .social-links {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}
.planes-publicos-container {
  min-height: 100vh;
  background: #f9fafb;
}

.planes-main {
  padding-top: 90px; /* espacio por el header fijo */
}

.planes-hero {
  position: relative;
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.planes-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
}

.planes-hero p {
  max-width: 700px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
}

.planes-loading,
.planes-error {
  max-width: 960px;
  margin: 2rem auto 3rem auto;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  text-align: center;
  color: #4b5563;
}

.planes-grid-section {
  max-width: 1100px;
  margin: 0 auto 3rem auto;
  padding: 0 1.5rem 2rem;
}

.planes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.plan-card-public {
  background: white;
  border-radius: 1.5rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plan-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.plan-card-info h2 {
  font-size: 1.1rem;
  margin: 0 0 0.25rem 0;
  color: #111827;
}

.plan-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #e5e7eb;
  color: #374151;
}

.plan-card-badge.basico {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.plan-card-badge.especializado {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.plan-card-badge.premium {
  background: rgba(249, 115, 22, 0.1);
  color: #c2410c;
}

.plan-card-price {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}

.plan-card-price .currency {
  font-size: 0.9rem;
  color: #6b7280;
}

.plan-card-price .amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
}

.plan-card-price .period {
  font-size: 0.9rem;
  color: #6b7280;
}

.plan-card-description {
  font-size: 0.95rem;
  color: #4b5563;
}

.plan-card-features {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.plan-card-features li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.check-icon {
  color: #10b981;
  font-size: 0.9rem;
}

.plan-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.plan-duration {
  font-size: 0.9rem;
  color: #6b7280;
}

.plan-contact-button {
  border: none;
  outline: none;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(129, 140, 248, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.plan-contact-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(129, 140, 248, 0.5);
}

@media (max-width: 640px) {
  .planes-hero {
    padding-top: 1.5rem;
  }

  .planes-hero h1 {
    font-size: 1.6rem;
  }

  .plan-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .plan-contact-button {
    width: 100%;
    text-align: center;
  }
}
/* RESET GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f3f6fb; /* gris clarito */
    color: #374151;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Container principal */
.container {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f3f6fb;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

/* Content wrapper */
.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}



/* Prize Modal */
.prize-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.prize-modal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 25px;
  width: 90%;
  max-width: 450px;
  color: white;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  animation: prizeSlideIn 0.4s ease-out;
  position: relative;
}

.prize-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
  pointer-events: none;
}

.prize-modal-header {
  text-align: center;
  padding: 30px 30px 20px;
  position: relative;
  z-index: 1;
}

.prize-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation: bounce 0.6s ease infinite alternate;
}

.prize-modal-header h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.prize-modal-body {
  padding: 0 30px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.prize-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.prize-description {
  font-size: 1.1rem;
  margin: 0 0 20px;
  opacity: 0.95;
  line-height: 1.4;
}

.prize-candy-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 15px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.prize-modal-footer {
  padding: 20px 30px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.prize-close-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  border: none;
  padding: 15px 30px;
  border-radius: 15px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.prize-close-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes prizeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); font-weight: 600; }
}



.dashboard-header h1 {
  color: #2d3748;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.logout-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 1px solid rgba(102, 126, 234, 0.3);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.action-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.edit-btn:hover {
  background-color: #e3f2fd;
}

.delete-btn:hover {
  background-color: #ffebee;
}

.access-btn {
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.access-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: #ff69b4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.dashboard-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.dashboard-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.dashboard-nav a:hover, .dashboard-nav a.active {
    color: white;
    font-weight: 500;
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.points {
    background: rgba(0, 0, 0, 0.2);  /* ✅ fondo oscuro translúcido */
    padding: 0.3rem 0.7rem;          /* ✅ espacio interno */
    border-radius: 9999px;           /* ✅ píldora */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.streak-icon {
    width: 28px;
    height: 28px;
    background: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ec4899 100%);
    border-radius: 24px;
    padding: 3rem;
    color: white;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 300px;
    animation: heroSlideIn 1s ease-out;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

@keyframes heroSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50% 0 0 50%;
    transform: translateX(20%);
}

.hero-content {
    flex: 1;
    max-width: 60%;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.btn-adventure {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #fff;
  font-weight: bold;
  padding: 0.8rem 1.5rem;
  border-radius: 9999px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
  animation: pulse-gold 3s infinite;
  transition: transform 0.3s ease;
}

.btn-adventure::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 100%
  );
  animation: shimmer 3s infinite;
}

.btn-adventure:hover {
  transform: scale(1.05) translateY(-3px);
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.6); }
  50% { box-shadow: 0 0 25px rgba(251, 191, 36, 0.9); }
}

.hero-image {
  width: 300px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin-left: 2rem;
}

.flamingo {
  width: 220px;  
  height: 220px;
  background: #ff69b4; /* 🔥 fondo rosa */
  border-radius: 50% 20px 50% 20px; 
  overflow: hidden; /* recorta la imagen a la forma */
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flamingo-img {
  width: 95%; /* un poco más grande para destacar el personaje */
  height: 95%;
  object-fit: contain; /* mantiene la proporción */
  border-radius: inherit;
}



/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
    align-items: stretch;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
}

.card-description {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* AVATAR CARD */
.avatar-card .card-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.avatar-preview {
    width: 110px;
    height: 110px;
    margin: 1rem auto;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 2.5rem;
    overflow: hidden;
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.color-option {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    border: 3px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #374151;
}

.color-red { background: #ff69b4; }
.color-green { background: #10b981; }
.color-purple { background: #8b5cf6; }
.color-yellow { background: #fbbf24; }

/* 👤 Personalizar Avatar */
.icon-img {
  width: 32px;   /* mismo tamaño que tu ícono */
  height: 32px;
  object-fit: cover;
  border-radius: 50%; /* lo hace redondo */
}
.btn-primary.personalizar {
  background: linear-gradient(135deg, #6d28d9 0%, #a855f7 50%, #ec4899 100%);
  color: white;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(109, 40, 217, 0.3);
}

.btn-primary.personalizar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-primary.personalizar:hover::before {
  left: 100%;
}

.btn-primary.personalizar:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(109, 40, 217, 0.4), 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* Ripple Effect */
.btn-primary.personalizar:active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(236, 72, 153, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 0.6s linear;
}

@keyframes ripple {
  to {
    width: 300%;
    height: 300%;
    opacity: 0;
  }
}

/* PROGRESS CARD */
.progress-card .card-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.level-info {
    margin-bottom: 1.5rem;
}

.level-text {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    flex: 1;
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    background: #3b82f6;
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease;
}

.progress-percentage {
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.9rem;
}

.skills-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.skills-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.stars {
    color: #fbbf24;
    font-size: 1rem;
}

/* 📊 Ver Detalles */
.btn-primary.detalles {
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 50%, #10b981 100%);
  color: white;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary.detalles:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4), 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Shine effect */
.btn-primary.detalles::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: left 0.6s ease;
}

.btn-primary.detalles:hover::after {
  left: 100%;
}


/* DAILY CHALLENGE CARD */
.challenge-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
}

.challenge-card .card-icon {
    background: #fbbf24;
    color: white;
}

.challenge-badge {
    background: #fbbf24;
    color: #1f2937;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.challenge-day {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.challenge-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.challenge-progress-container {
    display: flex;
    justify-content: center;
    gap: 0.6rem; /* separación entre líneas */
    margin: 1.5rem 0;
}

.evaluations-section {
  margin: 32px 0;
  padding: 0 24px;
}

.evaluations-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.evaluations-section .section-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.evaluations-section .view-all {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s ease;
}

.evaluations-section .view-all:hover {
  color: #764ba2;
}

.evaluations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.evaluation-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.evaluation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.evaluation-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.evaluation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.evaluation-icon {
  font-size: 32px;
  margin-right: 16px;
}

.evaluation-info {
  flex: 1;
}

.evaluation-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.evaluation-type {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.evaluation-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.evaluation-status.available {
  background: #dcfce7;
  color: #166534;
}

.evaluation-status.completed {
  background: #dbeafe;
  color: #1e40af;
}

.evaluation-content {
  margin-bottom: 20px;
}

.evaluation-content p {
  color: #4b5563;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.evaluation-stats {
  display: flex;
  gap: 16px;
}

.evaluation-stats .stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.evaluation-stats .stat-icon {
  font-size: 16px;
}

.evaluation-button {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.evaluation-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.evaluation-button.completed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.evaluation-button.completed:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .evaluations-section {
    padding: 0 16px;
  }
  
  .evaluations-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .evaluation-card {
    padding: 20px;
  }
  
  .evaluation-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .evaluation-status {
    align-self: flex-start;
  }
}

.challenge-segment {
    width: 28px;        /* largo de cada línea */
    height: 8px;        /* alto de cada línea */
    border-radius: 4px; /* esquinas redondeadas */
    background: #e5e7eb; /* gris claro por defecto */
    transition: transform 0.3s ease, background 0.3s ease;
}

/* Segmentos completados */
.challenge-segment.completed {
    background: #fbbf24; /* dorado */
    transform: scale(1.05);
}

/* Segmento actual con animación */
.challenge-segment.current {
    background: #f59e0b;
    animation: pulse 1.5s infinite;
}

/* Estrellas decorativas */
.challenge-card {
  position: relative;
  overflow: hidden; /* para que no se desborde raro */
}

.star {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(251, 191, 36, 0.25); /* amarillo dorado semi-transparente */
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  z-index: 0; /* siempre detrás */
  animation: float-star 6s ease-in-out infinite;
}

/* Variaciones de tamaño y color */
.star.large {
  width: 120px;
  height: 120px;
  background: rgba(251, 191, 36, 0.3); /* amarillo */
  top: -40px;
  right: -40px;
}

.star.medium {
  width: 90px;
  height: 90px;
  background: rgba(249, 115, 22, 0.25); /* naranja */
  bottom: -40px;
  left: -40px;
}

.star.small-left {
  width: 60px;
  height: 60px;
  background: rgba(253, 224, 71, 0.25); /* amarillo suave */
  top: 50%;
  left: -30px;
  animation: twinkle-star 4s ease-in-out infinite;
}

.star.small-right {
  width: 60px;
  height: 60px;
  background: rgba(251, 146, 60, 0.25); /* naranja suave */
  top: 30%;
  right: -30px;
  animation: twinkle-star 5s ease-in-out infinite;
}

/* Animación de flotación */
@keyframes float-star {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(10deg); }
}

/* Animación de parpadeo */
@keyframes twinkle-star {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

/* Animación pulsante */
@keyframes pulse {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.challenge-reward {
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
    margin: 1.5rem 0;
}


/* 🔥 Completar reto de hoy */
.btn-challenge {
  background: linear-gradient(90deg, #ef4444, #f97316, #fbbf24);
  color: white;
  font-weight: bold;
  padding: 0.9rem 1.4rem;
  border-radius: 14px;
  position: relative;
  overflow: visible;
  transition: transform 0.3s ease;
  animation: flame-glow 2s infinite;
}

.btn-challenge:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.9),
              0 0 40px rgba(249, 115, 22, 0.9),
              0 0 60px rgba(251, 191, 36, 0.9);
}

/* Emoji 🔥 flotante */
.btn-challenge::before {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  animation: bounce-fire 1s infinite;
}

@keyframes flame-glow {
  0%, 100% { box-shadow: 0 0 15px #f87171; }
  50% { box-shadow: 0 0 30px #facc15; }
}
@keyframes bounce-fire {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -5px); }
}

/* Alineación de botones en tarjetas */
.card .btn-primary,
.card .btn-challenge,
.card .detalles,
.card .personalizar {
  margin-top: auto;
  align-self: stretch;
}

/* Contenido de tarjetas con flexbox */
.card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Botón deshabilitado para reto diario */
.btn-challenge.disabled {
  background: #9ca3af !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.btn-challenge.disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Evolución de la tarjeta de reto diario */
.challenge-card {
  position: relative;
  overflow: visible;
  transition: all 0.5s ease;
}

/* Nivel 1: Estrellitas flotantes */
.floating-stars {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  pointer-events: none;
  z-index: 1;
}

.floating-star {
  position: absolute;
  font-size: 16px;
  animation: floatStar 3s ease-in-out infinite;
}

.floating-star.star-1 {
  top: 10%;
  left: 15%;
  animation-delay: 0s;
}

.floating-star.star-2 {
  top: 20%;
  right: 20%;
  animation-delay: 1s;
}

.floating-star.star-3 {
  bottom: 15%;
  left: 25%;
  animation-delay: 2s;
}

@keyframes floatStar {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% { 
    transform: translateY(-15px) rotate(180deg);
    opacity: 1;
  }
}

/* Nivel 2: Brillo mágico */
.streak-level-2 .magic-glow {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
  border-radius: 20px;
  z-index: -1;
  animation: magicGlow 2s ease-in-out infinite alternate;
}

@keyframes magicGlow {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

/* Nivel 3: Borde arcoíris */
.streak-level-3 .rainbow-border {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 400% 400%;
  border-radius: 25px;
  z-index: -2;
  animation: rainbowShift 3s ease infinite;
}

@keyframes rainbowShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Mejoras progresivas de la tarjeta */
.streak-level-1 {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.streak-level-2 {
  transform: scale(1.04);
  box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
}

.streak-level-3 {
  transform: scale(1.06);
  box-shadow: 0 16px 45px rgba(255, 215, 0, 0.5);
  animation: cardPulse 4s ease-in-out infinite;
}

@keyframes cardPulse {
  0%, 100% {
    transform: scale(1.06);
  }
  50% {
    transform: scale(1.08);
  }
}

/* Botón de aventura en hero */
.btn-adventure {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  margin-top: 20px;
}

.btn-adventure:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-adventure:active {
  transform: translateY(0);
}

/* Overlay para perfil incompleto */
.profile-incomplete-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.profile-incomplete-message {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.profile-incomplete-message h3 {
  color: #667eea;
  margin-bottom: 1rem;
}

.profile-incomplete-message p {
  color: #666;
  margin-bottom: 0;
}

.dashboard-grid.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Estilos para estados de clase */
.estado-clase {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.estado-clase.programada {
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

.estado-clase.completada {
  background-color: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.estado-clase.pendiente {
  background-color: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffcc02;
}

/* Botón flotante de ayuda */
.help-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.help-floating-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(79, 70, 229, 0.5);
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

.help-floating-btn:active {
  transform: translateY(-1px) scale(1.02);
}

.help-floating-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  opacity: 0.3;
  animation: pulse-help 2s infinite;
  z-index: -1;
}

@keyframes pulse-help {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.1;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-image {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .dashboard-nav {
        display: none;
    }
    
    .hero {
        padding: 2rem;
    }
    
    .hero-image {
        width: 200px;
        height: 180px;
    }
    
    .flamingo {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
    
    .card {
        padding: 1.5rem;
        min-height: auto;
    }
}



        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .Seccion_2 {
            margin-top: 70px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 32px;
        }

        .title {
            font-size: 32px;
            font-weight: 700;
            color: #1e293b;
        }

        .view-all {
            color: #3b82f6;
            text-decoration: none;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .view-all:hover {
            color: #2563eb;
        }

        .missions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
            gap: 24px;
            margin-bottom: 48px;
        }

        .mission-card {
            border-radius: 24px;
            padding: 32px;
            color: white;
            position: relative;
            overflow: hidden;
            min-height: 280px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: transform 0.3s ease;
            cursor: pointer;
        }

        .mission-card.vocabulary {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            box-shadow: 0 8px 32px rgba(79, 70, 229, 0.4);
        }

        .mission-card.grammar {
            background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
            box-shadow: 0 8px 32px rgba(5, 150, 105, 0.4);
        }

        .mission-card.conversation {
            background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
            box-shadow: 0 8px 32px rgba(220, 38, 38, 0.4);
        }

        .mission-card:hover {
            transform: translateY(-2px);
        }

        .vocabulary-card {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            box-shadow: 0 8px 32px rgba(79, 70, 229, 0.4);
        }

        .grammar-card {
            background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
            box-shadow: 0 8px 32px rgba(5, 150, 105, 0.4);
        }

        .conversation-card {
            background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
            box-shadow: 0 8px 32px rgba(220, 38, 38, 0.4);
        }

        .mission-icon {
            width: 50px;
            height: 50px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            backdrop-filter: blur(10px);
            flex-shrink: 0;
        }

        .mission-content {
            flex: 1;
            position: relative;
            z-index: 2;
        }

        .mission-title {
            font-size: 28px;
            font-weight: 800;
            margin-bottom: 16px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .progress-info {
            margin-bottom: 20px;
        }

        .progress-text {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .status-badge {
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            backdrop-filter: blur(5px);
        }

        .status-progress {
            background: linear-gradient(135deg, #10b981, #059669);
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
        }

        .status-new {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
        }

        .status-blocked {
            background: linear-gradient(135deg, #6b7280, #4b5563);
            box-shadow: 0 2px 8px rgba(107, 114, 128, 0.4);
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 20px;
            backdrop-filter: blur(5px);
        }

        .progress-fill {
            height: 100%;
            border-radius: 8px;
            transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

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

        @keyframes shimmer {
            0% { left: -100%; }
            100% { left: 100%; }
        }

        .vocabulary-progress {
            background: linear-gradient(135deg, #60a5fa, #3b82f6);
            width: 40%;
        }

        .grammar-progress {
            background: linear-gradient(135deg, #34d399, #10b981);
            width: 20%;
        }

        .conversation-progress {
            background: linear-gradient(135deg, #a78bfa, #8b5cf6);
            width: 0%;
        }

        .mission-description {
            font-size: 15px;
            opacity: 0.9;
            margin-bottom: 24px;
            line-height: 1.6;
        }

        .mission-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
        }

        .mission-info h3 {
            margin: 0 0 4px 0;
            font-size: 18px;
            font-weight: 600;
            color: white;
        }

        .mission-type {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
            background: rgba(255, 255, 255, 0.1);
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 500;
        }

        .mission-stats {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat {
            display: flex;
            align-items: center;
            gap: 5px;
            background: rgba(255, 255, 255, 0.1);
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 13px;
            font-weight: 500;
            color: white;
        }

        .stat-icon {
            font-size: 14px;
        }

        .mission-button {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            padding: 16px 32px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(10px);
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .mission-button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
        }

        .mission-button:disabled {
            background: rgba(255, 255, 255, 0.1);
            cursor: not-allowed;
            opacity: 0.6;
        }

        .classes-section {
            margin-top: 48px;
            animation: fadeInUp 1s ease-out 0.4s both;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding: 0 8px;
        }

        .section-title {
            font-size: 32px;
            font-weight: 800;
            color: white;
            text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

        .new-class-btn {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: white;
            border: none;
            padding: 16px 24px;
            border-radius: 12px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
            backdrop-filter: blur(10px);
        }

        .new-class-btn:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 12px 32px rgba(59, 130, 246, 0.6);
        }

        .classes-section {
            margin-top: 48px;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .section-title {
            font-size: 28px;
            font-weight: 700;
            color: #1e293b;
        }

        .new-class-btn {
            background: #3b82f6;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s ease;
        }

        .new-class-btn:hover {
            background: #2563eb;
            transform: translateY(-1px);
        }

        .classes-table {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            border: 1px solid #e2e8f0;
        }

        .table-header {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            padding: 20px 28px;
            display: grid;
            grid-template-columns: 140px 140px 220px 1fr 120px;
            gap: 28px;
            font-weight: 700;
            color: #475569;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 2px solid #e2e8f0;
        }

        .table-row {
            padding: 24px 28px;
            display: grid;
            grid-template-columns: 140px 140px 220px 1fr 120px;
            gap: 28px;
            align-items: center;
            border-bottom: 1px solid #f1f5f9;
            transition: all 0.3s ease;
            position: relative;
        }

        .table-row:hover {
            background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .table-row:last-child {
            border-bottom: none;
        }

        /* Controles de paginación */
        .pagination-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 28px;
            background: white;
            border-top: 1px solid #e2e8f0;
            border-radius: 0 0 16px 16px;
            margin-top: -1px;
        }

        .pagination-btn {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .pagination-btn:hover:not(:disabled) {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }

        .pagination-btn:disabled {
            background: #e5e7eb;
            color: #9ca3af;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .pagination-info {
            font-size: 14px;
            color: #64748b;
            font-weight: 500;
        }

        .date-cell {
            font-weight: 600;
            color: #1e293b;
            font-size: 14px;
        }

        .date-day {
            font-size: 12px;
            color: #64748b;
            font-weight: 500;
        }

        .time-cell {
            font-weight: 600;
            color: #059669;
            background: #f0fdf4;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 13px;
            text-align: center;
        }

        .topic-cell {
            font-weight: 500;
            color: #374151;
            position: relative;
        }

        .topic-badge {
            display: inline-block;
            padding: 6px 12px;
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            color: #374151;
        }

        .teacher-info {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .teacher-avatar {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 15px;
            position: relative;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        .teacher-avatar::after {
            content: '';
            position: absolute;
            top: -2px;
            right: -2px;
            width: 12px;
            height: 12px;
            background: #10b981;
            border: 2px solid white;
            border-radius: 50%;
        }

        .avatar-blue {
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        }

        .avatar-green {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }

        .teacher-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .teacher-name {
            font-weight: 600;
            color: #1e293b;
            font-size: 15px;
        }

        .teacher-role {
            font-size: 12px;
            color: #64748b;
            font-weight: 500;
        }

        .actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .action-btn {
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            font-size: 16px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .edit-btn {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #1d4ed8;
        }

        .edit-btn:hover {
            background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(29, 78, 216, 0.3);
        }

        .delete-btn {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            color: #dc2626;
        }

        .delete-btn:hover {
            background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
        }

        @media (max-width: 768px) {
            .missions-grid {
                grid-template-columns: 1fr;
            }
            
            .table-header, .table-row {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .table-header {
                display: none;
            }
            
            .table-row {
                padding: 16px;
                display: block;
            }
        }

/* ===== MATERIAL DEL CLUB - ESTILO LIMPIO ===== */
.club-materials-section {
  margin: 2rem 0;
}

.section-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.club-selector {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: white;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.club-selector:hover {
  border-color: #667eea;
}

.club-selector:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.club-materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.club-material-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.club-material-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.club-material-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.material-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.material-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.material-info {
  flex: 1;
}

.material-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.material-week {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  white-space: nowrap; /* evitar que se parta en dos líneas */
  line-height: 1.2;
}

.material-date {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}

.material-content {
  margin-bottom: 1.5rem;
}

.material-content p {
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.5;
}

.material-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.material-button:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive para Material del Club */
@media (max-width: 768px) {
  .club-materials-section {
    margin: 1rem 0;
  }
  
  .section-header-clean {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .club-materials-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .club-material-card {
    padding: 1rem;
  }
}.evaluation-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.evaluation-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.evaluation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.evaluation-info h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
}

.evaluation-meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  opacity: 0.9;
}

.timer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.close-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.progress-bar {
  height: 4px;
  background: #e5e7eb;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.question-container {
  padding: 32px;
}

.question-text {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 24px 0;
  line-height: 1.4;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 16px;
}

.option-button:hover {
  border-color: #667eea;
  background: #f8faff;
  transform: translateY(-1px);
}

.option-button.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.option-button.selected .option-letter {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.option-text {
  flex: 1;
  line-height: 1.4;
}

.evaluation-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.control-button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.control-button.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.control-button.secondary {
  background: white;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.control-button.secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.control-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.question-indicators {
  display: flex;
  gap: 8px;
}

.question-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  background: white;
  color: #6b7280;
  transition: all 0.2s ease;
}

.question-indicator.current {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.question-indicator.answered {
  border-color: #10b981;
  background: #10b981;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .evaluation-modal {
    width: 95%;
    margin: 20px;
  }
  
  .evaluation-header {
    padding: 20px 24px;
  }
  
  .evaluation-info h2 {
    font-size: 20px;
  }
  
  .evaluation-meta {
    gap: 16px;
    font-size: 13px;
  }
  
  .question-container {
    padding: 24px;
  }
  
  .question-text {
    font-size: 18px;
  }
  
  .option-button {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .evaluation-controls {
    padding: 20px 24px;
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .question-indicators {
    order: -1;
    width: 100%;
    justify-content: center;
  }
  
  .control-button {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
}
.results-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.results-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.results-info h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
}

.completion-message {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

.close-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.score-summary {
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.score-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border: 6px solid;
  border-radius: 50%;
  background: white;
  flex-shrink: 0;
}

.score-percentage {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  flex: 1;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.questions-review {
  padding: 32px;
}

.questions-review h3 {
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-review {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.question-review.correct {
  border-color: #10b981;
}

.question-review.incorrect {
  border-color: #ef4444;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.question-number {
  font-weight: 700;
  color: #374151;
}

.result-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.result-icon.correct {
  background: #10b981;
}

.result-icon.incorrect {
  background: #ef4444;
}

.question-content {
  padding: 20px;
}

.question-text {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.answers-comparison {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.answer-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.answer-label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.answer-text {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.answer-text.correct {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.answer-text.incorrect {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.explanation {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 16px;
}

.explanation-label {
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
  display: block;
  margin-bottom: 8px;
}

.explanation-text {
  font-size: 14px;
  color: #374151;
  margin: 0;
  line-height: 1.5;
}

.results-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.action-button {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.action-button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-button.secondary {
  background: white;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.action-button.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .results-modal {
    width: 95%;
    margin: 20px;
  }
  
  .results-header {
    padding: 20px 24px;
  }
  
  .results-info h2 {
    font-size: 20px;
  }
  
  .score-summary {
    padding: 24px;
    flex-direction: column;
    gap: 24px;
  }
  
  .score-circle {
    width: 100px;
    height: 100px;
  }
  
  .score-percentage {
    font-size: 24px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
  }
  
  .stat-number {
    font-size: 20px;
  }
  
  .questions-review {
    padding: 24px;
  }
  
  .question-content {
    padding: 16px;
  }
  
  .results-actions {
    padding: 20px 24px;
    flex-direction: column;
  }
  
  .action-button {
    width: 100%;
  }
}
.notes-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.notes-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.notes-info h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
}

.notes-info p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

.close-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.notes-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 32px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.summary-content {
  display: flex;
  flex-direction: column;
}

.summary-number {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.summary-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 4px;
}

.notes-content {
  padding: 32px;
}

.notes-content h3 {
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}

.note-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.note-title-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.note-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.note-title-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.note-date {
  font-size: 14px;
  color: #6b7280;
}

.note-score {
  font-size: 20px;
  font-weight: 700;
  padding: 8px 16px;
  background: #f3f4f6;
  border-radius: 20px;
}

.note-details {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.note-stat {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.stat-value {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
}

.stat-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-badge.completed {
  background: #dcfce7;
  color: #166534;
}

.stat-badge.in_progress {
  background: #fef3c7;
  color: #92400e;
}

.notes-actions {
  display: flex;
  justify-content: center;
  padding: 24px 32px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.action-button {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.action-button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* View Notes Button Styles */
.view-notes-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-notes-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .notes-modal {
    width: 95%;
    margin: 20px;
  }
  
  .notes-header {
    padding: 20px 24px;
  }
  
  .notes-info h2 {
    font-size: 20px;
  }
  
  .notes-summary {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 16px;
  }
  
  .summary-card {
    padding: 16px;
  }
  
  .summary-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
  }
  
  .summary-number {
    font-size: 20px;
  }
  
  .notes-content {
    padding: 24px;
  }
  
  .note-item {
    padding: 16px;
  }
  
  .note-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .note-details {
    flex-direction: column;
    gap: 12px;
  }
  
  .notes-actions {
    padding: 20px 24px;
  }
  
  .view-notes-btn {
    font-size: 13px;
    padding: 6px 12px;
  }
}
.achievements-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.achievements-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

.achievements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.achievements-info h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
}

.achievements-info p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

.achievements-content {
  padding: 24px 32px 32px;
}

.achievements-empty {
  margin: 0;
  font-size: 15px;
  color: #4b5563;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.achievement-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.achievement-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  transform: translateY(-1px);
}

.achievement-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  flex-shrink: 0;
}

.achievement-main h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.achievement-description {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

@media (max-width: 768px) {
  .achievements-modal {
    width: 95%;
    margin: 20px;
  }

  .achievements-header {
    padding: 20px 24px;
  }

  .achievements-content {
    padding: 20px 24px 24px;
  }
}
.avatar-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.avatar-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 95%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.avatar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ec4899 100%);
  color: #ffffff;
}

.avatar-modal-header h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
}

.avatar-modal-header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.avatar-close-button {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.avatar-close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.avatar-grid {
  padding: 20px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  overflow-y: auto;
}

.avatar-option {
  border: none;
  background: #f9fafb;
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.avatar-option:hover {
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(129, 140, 248, 0.4);
}

.avatar-image-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-name {
  font-size: 13px;
  color: #374151;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 640px) {
  .avatar-modal-header {
    padding: 16px 18px;
  }

  .avatar-grid {
    padding: 16px 18px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.adventure-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1800;
  backdrop-filter: blur(6px);
}

.adventure-modal {
  position: relative;
  width: 90%;
  max-width: 960px;
  background: radial-gradient(circle at top left, #4f46e5 0%, #1f2937 40%, #020617 100%);
  border-radius: 24px;
  padding: 20px 20px 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  overflow: hidden;
}

.adventure-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.adventure-close-btn:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}

.adventure-image-wrapper {
  background: radial-gradient(circle at center, rgba(148, 163, 184, 0.35), transparent 60%);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 8px;
}

.adventure-image {
  display: block;
  width: 100%;
  max-height: min(70vh, 520px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 14px;
  background: #020617;
}

.adventure-controls {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adventure-secondary-btn,
.adventure-primary-btn {
  border-radius: 9999px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.adventure-secondary-btn {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.8);
}

.adventure-secondary-btn:hover {
  background: rgba(15, 23, 42, 0.7);
}

.adventure-primary-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 40%, #ef4444 100%);
  color: #111827;
  box-shadow: 0 6px 20px rgba(248, 250, 252, 0.25);
}

.adventure-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(248, 250, 252, 0.35);
}

.adventure-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.adventure-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  border: none;
  background: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.adventure-dot.active {
  width: 22px;
  background: #fbbf24;
}

@media (max-width: 768px) {
  .adventure-modal {
    padding: 16px 12px 20px;
  }

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

  .adventure-secondary-btn,
  .adventure-primary-btn {
    width: 100%;
  }
}
/* Onboarding Tour Styles */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.onboarding-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(79, 70, 229, 0.2);
  z-index: 9999;
  padding: 24px;
  border: 1px solid rgba(79, 70, 229, 0.1);
  backdrop-filter: blur(20px);
  animation: slideInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.onboarding-card[data-step="3"] {
  top: 40%;
  transform: translate(-50%, -40%);
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.onboarding-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.onboarding-step-counter {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.onboarding-content {
  margin-bottom: 20px;
}

.onboarding-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.onboarding-description {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

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

.onboarding-navigation {
  display: flex;
  gap: 8px;
}

.onboarding-btn {
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.onboarding-btn-skip {
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.onboarding-btn-skip:hover {
  background: #f1f5f9;
  color: #475569;
}

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

.onboarding-btn-prev:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.onboarding-btn-next {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.onboarding-btn-next:hover {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: all 0.3s ease;
}

.onboarding-dot.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.onboarding-dot.completed {
  background: #10b981;
}

/* Highlight para elementos target */
.onboarding-highlight {
  position: relative;
  z-index: 9997;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.3), 0 0 0 8px rgba(79, 70, 229, 0.1) !important;
  border-radius: 16px !important;
  animation: pulse-highlight 2s infinite;
}

@keyframes pulse-highlight {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.3), 0 0 0 8px rgba(79, 70, 229, 0.1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.4), 0 0 0 12px rgba(79, 70, 229, 0.15);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .onboarding-card {
    width: 320px;
    padding: 20px;
  }
  
  .onboarding-title {
    font-size: 18px;
  }
  
  .onboarding-description {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .onboarding-card {
    width: 280px;
    padding: 16px;
  }
  
  .onboarding-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .onboarding-navigation {
    width: 100%;
    justify-content: space-between;
  }
}
.profile-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.profile-modal {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.profile-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.close-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.profile-modal-body {
  padding: 28px;
  max-height: 70vh;
  overflow-y: auto;
}

.field-group textarea {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1f2937;
  transition: all 0.2s ease;
  background: white;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.field-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.loading {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 1rem;
}

.error-message {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #fecaca;
  font-size: 0.9rem;
}

.success-message {
  background: #f0fdf4;
  color: #16a34a;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #bbf7d0;
  font-size: 0.9rem;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.field-value {
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #1f2937;
  font-size: 0.95rem;
}

.field-group input,
.field-group select {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1f2937;
  transition: all 0.2s ease;
  background: white;
}

.field-group input:focus,
.field-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.field-group input:disabled {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.profile-modal-footer {
  padding: 20px 28px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-edit,
.btn-save,
.btn-cancel {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-edit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-edit:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-save:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.btn-cancel:hover:not(:disabled) {
  background: #e5e7eb;
  color: #374151;
}

.btn-save:disabled,
.btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Responsive */
@media (max-width: 640px) {
  .profile-modal {
    width: 95%;
    margin: 20px;
  }
  
  .profile-modal-header,
  .profile-modal-body,
  .profile-modal-footer {
    padding: 20px;
  }
  
  .profile-modal-footer {
    flex-direction: column;
  }
  
  .btn-edit,
  .btn-save,
  .btn-cancel {
    width: 100%;
  }
}
/* Challenge Modal Styles */
.challenge-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  animation: fadeIn 0.3s ease-out;
}

.challenge-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: slideInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

.challenge-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.challenge-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.challenge-close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.challenge-content {
  padding: 0 24px 24px 24px;
}

.challenge-question {
  margin-bottom: 24px;
}

.challenge-question p {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
  margin: 0;
}

.challenge-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.challenge-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 16px;
}

.challenge-option:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.challenge-option.selected {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #3b82f6;
  color: #1e40af;
}

.option-letter {
  width: 32px;
  height: 32px;
  background: #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #475569;
  flex-shrink: 0;
}

.challenge-option.selected .option-letter {
  background: #3b82f6;
  color: white;
}

.option-text {
  flex: 1;
  font-weight: 500;
}

.challenge-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.challenge-submit-btn,
.challenge-retry-btn,
.challenge-skip-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.challenge-submit-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.challenge-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.challenge-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.challenge-retry-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.challenge-retry-btn:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
}

.challenge-skip-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.challenge-skip-btn:hover {
  background: #e2e8f0;
  color: #475569;
}

.challenge-result {
  text-align: center;
}

.result-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.result-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.result-title.correct {
  color: #10b981;
}

.result-title.incorrect {
  color: #ef4444;
}

.result-explanation {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.result-explanation p {
  margin: 0 0 8px 0;
  color: #475569;
  line-height: 1.5;
}

.result-explanation p:last-child {
  margin-bottom: 0;
}

.success-message {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  padding: 20px;
  border-radius: 12px;
  color: #065f46;
  font-weight: 500;
}

.success-message p {
  margin: 0 0 8px 0;
}

.success-message p:last-child {
  margin-bottom: 0;
  font-size: 14px;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .challenge-modal {
    width: 95%;
    margin: 20px;
  }
  
  .challenge-header h2 {
    font-size: 20px;
  }
  
  .challenge-question p {
    font-size: 16px;
  }
  
  .challenge-option {
    padding: 12px;
    font-size: 14px;
  }
  
  .option-letter {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}
/* Toast Overlay */
.toast-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.toast-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Toast Container */
.toast {
  background: white;
  border-radius: 20px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: scale(0.8) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.toast-overlay.visible .toast {
  transform: scale(1) translateY(0);
}

/* Toast Types */
.toast-success {
  border-left: 5px solid #10b981;
}

.toast-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.toast-error {
  border-left: 5px solid #ef4444;
}

.toast-error::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.toast-info {
  border-left: 5px solid #3b82f6;
}

.toast-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* Toast Header */
.toast-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.toast-icon {
  font-size: 24px;
  line-height: 1;
}

.toast-title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: #f3f4f6;
  color: #6b7280;
}

/* Toast Content */
.toast-content {
  margin-bottom: 20px;
}

.toast-message {
  margin: 0 0 16px 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

/* Rewards Section */
.toast-rewards {
  display: flex;
  gap: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.reward-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex: 1;
}

.reward-icon {
  font-size: 18px;
}

.reward-text {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
}

/* Toast Button */
.toast-button {
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toast-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.toast-button:active {
  transform: translateY(0);
}

/* Success Button */
.toast-success .toast-button {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.toast-success .toast-button:hover {
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Error Button */
.toast-error .toast-button {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.toast-error .toast-button:hover {
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100px);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 480px) {
  .toast {
    margin: 20px;
    padding: 20px;
  }
  
  .toast-rewards {
    flex-direction: column;
    gap: 8px;
  }
  
  .reward-item {
    justify-content: center;
  }
}
/* Navigation Header */
.nav-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(79, 70, 229, 0.1);
  box-shadow: 0 4px 32px rgba(79, 70, 229, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 18px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-header-inner {
  width: 100%;
  padding: 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInLeft 0.8s ease-out 0.2s both;
}

.nav-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.3));
}

.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  animation: bounce 2s ease-in-out infinite;
  margin-bottom: -10px;
}

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

.logo-text {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
  animation: fadeInRight 0.8s ease-out 0.4s both;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Sistema de Recompensas */
.rewards-section {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ec4899 100%);
  padding: 10px 18px;
  border-radius: 25px;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.rewards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.8s ease;
}

.candy-counter,
.xp-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.candy-counter:hover,
.xp-counter:hover {
  transform: scale(1.1);
}

.candy-count,
.xp-count {
  transition: all 0.3s ease;
}

.candy-count:hover,
.xp-count:hover {
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  80% {
    transform: translateY(-4px);
  }
}

.candy-icon,
.xp-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.candy-count,
.xp-count {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.candy-counter {
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  padding-right: 12px;
}

.achievements-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: all 0.25s ease;
}

.achievements-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.achievements-icon {
  font-size: 1rem;
}

.achievements-label {
  white-space: nowrap;
}

.rewards-section:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  transition: all 0.3s ease;
}

.rewards-section:hover::before {
  left: 100%;
}

/* Profile Icon */
.profile-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.profile-icon:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

/* Profile Dropdown */
.profile-dropdown-container {
  position: relative;
  z-index: 10000;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 10001;
  animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #374151;
  font-weight: 500;
  font-size: 0.9rem;
}

.dropdown-item:first-child {
  border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 12px 12px;
}

.dropdown-item:only-child {
  border-radius: 12px;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.dropdown-item svg {
  flex-shrink: 0;
}

/* Dropdown Divider */
.dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
  margin: 8px 0;
}

/* Logout Item Special Styling */
.dropdown-item.logout-item {
  color: #dc2626;
  font-weight: 600;
}

.dropdown-item.logout-item:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-header-inner {
    padding: 0 15px;
  }
  
  .nav-header h1 {
    font-size: 1.3rem;
  }
  
  .rewards-section {
    padding: 6px 12px;
  }
  
  .candy-counter,
  .xp-counter {
    font-size: 0.8rem;
  }
  
  .profile-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .nav-actions {
    gap: 10px;
  }
  
  .rewards-section {
    flex-direction: column;
    gap: 4px;
    padding: 8px;
  }
  
  .candy-counter {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 4px;
  }
}

/* ===== NOTIFICACIONES ===== */

.notifications-container {
  position: relative;
  margin-right: 16px;
}

.notification-bell {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  position: relative;
}

.notification-bell:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 360px;
  max-height: 500px;
  overflow: hidden;
  z-index: 10001;
  animation: dropdownSlideIn 0.2s ease-out;
}

.notifications-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.notifications-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.mark-all-read {
  background: none;
  border: none;
  color: #667eea;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mark-all-read:hover {
  background: rgba(102, 126, 234, 0.1);
}

.notifications-list {
  max-height: 420px;
  overflow-y: auto;
}

.notification-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.notification-item:hover {
  background: #f8f9fa;
}

.notification-item.unread {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.notification-item.unread:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(248, 249, 250, 1) 100%);
}

.notification-content {
  flex: 1;
}

.notification-message {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}

.notification-time {
  font-size: 12px;
  color: #94a3b8;
}

.unread-dot {
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.no-notifications {
  padding: 40px 20px;
  text-align: center;
}

.no-notifications p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}
/* Settings Modal Styles */
.settings-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.settings-modal {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.settings-modal-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.settings-modal-content {
  padding: 30px;
}

.settings-section h3 {
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.settings-section p {
  color: #6b7280;
  margin: 0 0 25px 0;
  font-size: 0.95rem;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #374151;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #fafafa;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled {
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

.form-group input::placeholder {
  color: #9ca3af;
}

.message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.cancel-btn {
  background: #f9fafb;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.cancel-btn:hover:not(:disabled) {
  background: #f3f4f6;
  color: #374151;
}

.save-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.save-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.save-btn:disabled,
.cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Responsive */
@media (max-width: 640px) {
  .settings-modal {
    width: 95%;
    margin: 10px;
  }
  
  .settings-modal-header,
  .settings-modal-content {
    padding: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions button {
    width: 100%;
  }
}
.quiz-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.quiz-container {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.quiz-container.active {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.quiz-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.2rem;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.quiz-timer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1rem;
}

.timer.warning {
  background: #ff4757;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.quiz-instructions {
  padding: 20px;
}

.quiz-instructions h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.quiz-instructions ul {
  list-style: none;
  padding: 0;
  margin-bottom: 25px;
}

.quiz-instructions li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  position: relative;
  padding-left: 25px;
}

.quiz-instructions li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #27ae60;
  font-weight: bold;
}

.quiz-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.quiz-info p {
  margin: 8px 0;
  color: #555;
}

.quiz-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.btn-cancel {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.btn-cancel:hover {
  background: #7f8c8d;
}

.btn-start {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: transform 0.2s;
}

.btn-start:hover {
  transform: translateY(-2px);
}

.quiz-progress {
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.progress-text {
  color: #666;
  font-size: 0.9rem;
}

.quiz-content {
  padding: 30px;
}

.question-container {
  margin-bottom: 30px;
}

.question-text {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 25px;
  line-height: 1.5;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.option-label {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.option-label:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.option-label input[type="radio"] {
  margin-right: 15px;
  transform: scale(1.2);
}

.option-label input[type="radio"]:checked + .option-text {
  color: #667eea;
  font-weight: bold;
}

.option-label:has(input:checked) {
  border-color: #667eea;
  background: #f8f9ff;
}

.option-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.4;
}

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-top: 1px solid #eee;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.btn-nav {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-nav:hover:not(:disabled) {
  background: #5a67d8;
}

.btn-nav:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
}

.btn-submit {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: transform 0.2s;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn-submit:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
  transform: none;
}

.question-indicators {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.indicator {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  color: #666;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  transition: all 0.2s;
}

.indicator.active {
  background: #667eea;
  color: white;
}

.indicator.answered {
  background: #27ae60;
  color: white;
}

.indicator.answered.active {
  background: #2ecc71;
}

.quiz-warning {
  background: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.quiz-warning h2 {
  color: #e74c3c;
  margin-bottom: 20px;
}

.quiz-warning p {
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .quiz-container {
    width: 95%;
    margin: 10px;
  }
  
  .quiz-header {
    padding: 15px 20px;
  }
  
  .quiz-header h2 {
    font-size: 1.2rem;
  }
  
  .quiz-content {
    padding: 20px;
  }
  
  .quiz-navigation {
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .question-indicators {
    order: -1;
    width: 100%;
    justify-content: center;
  }
  
  .option-label {
    padding: 12px;
  }
  
  .quiz-instructions {
    padding: 20px;
  }
}
.evaluaciones-section {
  margin: 2rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1.5rem;
  text-align: left;
}

/* Badge de nivel con colores dinámicos */
.nivel-badge {
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #cbd5e0;
}

/* Colores por nivel */
.nivel-badge.A1 {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.nivel-badge.A2 {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.nivel-badge.B1 {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.nivel-badge.B2 {
  background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
}

.nivel-badge.C1 {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.nivel-badge.C2 {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

/* Botón de acceder a evaluación */
.btn-acceder-evaluacion {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  min-width: 160px;
}

.btn-acceder-evaluacion:hover:not(:disabled) {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-acceder-evaluacion:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Estilos para la vista simplificada del estudiante */
.evaluacion-info-simple {
  margin: 1rem 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.unidad-clase {
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
}

.profesor-info, .fecha-info {
  font-size: 0.9rem;
  color: #4a5568;
}

.fecha-limite {
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
}

.fecha-limite.overdue {
  color: #e53e3e;
  font-weight: 600;
}

.evaluacion-actions-simple {
  margin-top: 1.5rem;
}

.btn-acceder-principal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-acceder-principal:hover:not(:disabled) {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-acceder-principal:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.evaluacion-inactiva {
  text-align: center;
  color: #e53e3e;
  font-weight: 600;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fed7d7;
  border-radius: 8px;
  border: 1px solid #feb2b2;
}

.evaluaciones-header {
  margin-bottom: 30px;
  text-align: center;
}

.evaluaciones-header h2 {
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 2rem;
}

.evaluaciones-header p {
  color: #7f8c8d;
  font-size: 1.1rem;
}

/* Loading and Error States */
.loading-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-retry {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 15px;
  transition: background-color 0.3s;
}

.btn-retry:hover {
  background: #2980b9;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #7f8c8d;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  color: #2c3e50;
  margin-bottom: 10px;
}

/* Evaluaciones Grid */
.evaluaciones-tabla {
  margin-top: 20px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tabla-evaluaciones {
  width: 100%;
  border-collapse: collapse;
}

.tabla-evaluaciones thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.tabla-evaluaciones th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.tabla-evaluaciones tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.tabla-evaluaciones tbody tr:hover {
  background-color: #f8f9fa;
}

.tabla-evaluaciones tbody tr.fila-vencida {
  background-color: #fff5f5;
}

.tabla-evaluaciones tbody tr.fila-vencida:hover {
  background-color: #fed7d7;
}

.tabla-evaluaciones td {
  padding: 15px 12px;
  vertical-align: middle;
}

.evaluacion-info h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-size: 1rem;
}

.descripcion-corta {
  margin: 0;
  color: #666;
  font-size: 0.85rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fecha-vencida {
  color: #e74c3c;
  font-weight: bold;
}

.estado-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.estado-badge.disponible {
  background: #d4edda;
  color: #155724;
}

.estado-badge.vencida {
  background: #f8d7da;
  color: #721c24;
}

.btn-accion {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-quiz {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-quiz:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a67d8, #6b46c1);
  transform: translateY(-1px);
}

.btn-quiz:disabled {
  background: #cbd5e0;
  color: #a0aec0;
  cursor: not-allowed;
}

.btn-descargar {
  background: #2ecc71;
  color: white;
}

.btn-descargar:hover {
  background: #27ae60;
  transform: translateY(-1px);
}

.evaluaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.evaluacion-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.evaluacion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.evaluacion-card.overdue {
  border-color: #e74c3c;
  background: linear-gradient(135deg, #fff 0%, #fdf2f2 100%);
}

/* Acciones de tarea (descargar / subir) */
.acciones-tarea {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.btn-subir-tarea {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: #eef2ff;
  color: #3730a3;
  transition: all 0.2s ease;
}

.btn-subir-tarea:hover:not(:disabled) {
  background: #e0e7ff;
  transform: translateY(-1px);
}

.btn-subir-tarea:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Estado cuando la tarea ya fue enviada */
.btn-tarea-enviada {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #16a34a;
}

.btn-tarea-enviada:hover:not(:disabled) {
  background: #bbf7d0;
}

/* Card Header */
.card-header {
  padding: 20px 20px 15px;
  border-bottom: 1px solid #ecf0f1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.titulo-section {
  flex: 1;
}

.titulo-section h3 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.tipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-quiz {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
}

.badge-exam {
  background: linear-gradient(135deg, #fff3e0 0%, #ffcc80 100%);
  color: #ef6c00;
}

.badge-task {
  background: linear-gradient(135deg, #f3e5f5 0%, #ce93d8 100%);
  color: #7b1fa2;
}

.overdue-badge {
  background: #e74c3c;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Body */
.card-body {
  padding: 20px;
}

.descripcion {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.descripcion p {
  margin: 0;
  color: #2c3e50;
  line-height: 1.5;
}

.info-grid {
  display: grid;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.info-item .label {
  font-weight: 600;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.info-item .value {
  color: #2c3e50;
  font-weight: 500;
  text-align: right;
}

.overdue-text {
  color: #e74c3c !important;
  font-weight: 600;
}

/* Card Actions */
.card-actions {
  padding: 15px 20px 20px;
  display: flex;
  gap: 12px;
}

.btn-download, .btn-view {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-download {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
}

.btn-download:hover {
  background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
  transform: translateY(-1px);
}

.btn-view {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #2c3e50;
  border: 1px solid #dee2e6;
}

.btn-view:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .evaluaciones-section {
    margin: 1rem 0;
  }
  
  .evaluaciones-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .evaluacion-card {
    margin: 0;
  }
  
  .card-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .titulo-section h3 {
    font-size: 1.2rem;
  }
  
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .info-item .value {
    text-align: left;
  }
  
  .card-actions {
    flex-direction: column;
  }
}
/* Layout del Profesor - Sidebar fijo */
.profesor-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.profesor-content {
  flex-grow: 1;
  background: #f8fafc;
  overflow-y: auto;
  padding: 2rem;
  margin-left: 250px;
}

.dashboard-home {
  margin-bottom: 2rem;
}

.dashboard-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header del profesor */
.profesor-header {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.welcome-section h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.welcome-section p {
  margin: 0 0 24px 0;
  font-size: 16px;
  color: #6b7280;
}

/* Tarjetas de estadísticas */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 32px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 4px;
}

/* Contenido principal */
.main-content {
  background: white;
  border-radius: 16px;
  min-height: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* MisClubs grid layout */
.clubs-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

/* User picker */
.user-picker {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.user-picker-filters {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.user-picker-filters select,
.user-picker-filters input {
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
}

.user-picker-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.user-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.user-option .user-name {
  font-weight: 600;
  color: #111827;
}

.user-option .user-meta {
  grid-column: 2 / span 1;
  font-size: 12px;
  color: #6b7280;
}

.user-option.selected {
  border-color: #7c3aed;
  background: #f5f3ff;
}

/* Responsive */
@media (max-width: 768px) {
  .profesor-layout {
    flex-direction: column;
    height: auto;
  }
  
  .profesor-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  .dashboard-content {
    padding: 16px;
  }
  
  .profesor-header {
    padding: 24px;
  }
  
  .welcome-section h1 {
    font-size: 24px;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
  }
  
  .stat-number {
    font-size: 20px;
  }

  .clubs-grid {
    grid-template-columns: 1fr;
  }

  .user-picker-filters {
    grid-template-columns: 1fr;
  }

  .user-picker-list {
    grid-template-columns: 1fr;
    max-height: 300px;
  }
}

/* Modal Overlay - Fix z-index */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999 !important;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 10000 !important;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px 32px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Botón Agregar Club */
.btn-add-class {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  margin-bottom: 24px;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.btn-add-class:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Clubs List Container */
.clubs-list-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.clubs-list-section {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 24px 0;
  padding-bottom: 16px;
  border-bottom: 3px solid #667eea;
}

/* Clubs Cards Grid */
.clubs-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.club-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.club-card:hover {
  border-color: #667eea;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.club-card.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.club-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.club-card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}

.club-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.club-description {
  color: #6b7280;
  font-size: 0.9375rem;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.club-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.club-profesor {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Club Details Section */
.club-details-section {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.club-details-section .users-table-container {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.users-table-container h3 {
  margin: 0 0 24px 0;
  color: #1f2937;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.users-table-container h3::before {
  content: "👥";
  font-size: 1.5rem;
}

/* User Picker - Filtros mejorados */
.user-picker {
  margin-bottom: 32px;
}

.user-picker-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
}

.user-picker-filters {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  flex: 1;
}

.user-picker-filters select,
.user-picker-filters input {
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  background: white;
}

.user-picker-filters select:focus,
.user-picker-filters input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Botón Agregar Estudiantes */
.btn-add-students {
  padding: 10px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-add-students:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.user-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 16px;
}

.user-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-option:hover {
  border-color: #667eea;
  background: #f0f4ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-option.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.user-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Tabla responsive */
.users-table {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.users-table th,
.users-table td {
  padding: 16px;
  text-align: left;
}

.users-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.users-table th:first-child {
  border-radius: 12px 0 0 0;
}

.users-table th:last-child {
  border-radius: 0 12px 0 0;
}

.users-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.users-table tbody tr:hover {
  background: #f9fafb;
  transform: scale(1.01);
}

.users-table tbody tr:last-child {
  border-bottom: none;
}

.users-table td {
  color: #374151;
  font-size: 0.9375rem;
}

/* Badges de Club */
.club-badge-assigned {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.club-badge-unassigned {
  display: inline-block;
  padding: 6px 12px;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Botones de Acción */
.action-button {
  padding: 8px 16px;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.deactivate-button {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.deactivate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.activate-button {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.activate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Paginación */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.pagination-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pagination-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: transparent;
  color: #374151;
  font-weight: 700;
  border: 2px solid #e5e7eb;
}

.pagination-info {
  font-size: 0.9375rem;
  color: #374151;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .clubs-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .users-table table {
    min-width: 500px;
  }
}

@media (max-width: 768px) {
  .profesor-content {
    padding: 1rem;
    margin-left: 0;
  }
  
  .clubs-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .clubs-list-section,
  .club-details-section {
    padding: 20px;
  }
  
  .users-table-container {
    padding: 16px;
    overflow-x: auto;
  }
  
  .users-table table {
    min-width: 400px;
    font-size: 0.875rem;
  }
  
  .users-table th,
  .users-table td {
    padding: 8px;
  }
  
  .user-picker-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .user-picker-filters {
    flex-direction: column;
    gap: 12px;
  }
  
  .user-picker-filters select,
  .user-picker-filters input {
    width: 100%;
  }
  
  .btn-add-students {
    width: 100%;
  }
  
  .pagination {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .users-table-container h3 {
    font-size: 1.25rem;
  }
  
  .users-table table {
    font-size: 0.75rem;
  }
  
  .users-table th,
  .users-table td {
    padding: 6px;
  }
}
/* Sidebar del Profesor - Fijo */
.sidebar-profesor {
  flex-shrink: 0;
  width: 250px;
  background-color: var(--bg-card, #ffffff);
  color: var(--text-primary, #1e293b);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100vh;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.sidebar-header h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.profesor-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-secondary, #f1f5f9);
  border-radius: 12px;
  width: 100%;
}

.profesor-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.profesor-details {
  text-align: center;
}

.profesor-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin-bottom: 0.25rem;
}

.profesor-role {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  flex-grow: 1;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.sidebar-nav li button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--text-secondary, #64748b);
  text-decoration: none;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  font-size: 0.9rem;
  text-align: left;
}

.sidebar-nav li button:hover {
  background-color: var(--bg-secondary, #f1f5f9);
  color: var(--text-primary, #1e293b);
}

.sidebar-nav li button.active {
  background-color: var(--primary-blue, #2563eb);
  color: var(--white, #ffffff);
  font-weight: 600;
}

.nav-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-label {
  flex-grow: 1;
}

.logout-button {
  background-color: var(--danger, #ef4444);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.logout-button:hover {
  background-color: var(--danger-light, #f87171);
}

/* Variables CSS para compatibilidad */
:root {
  --bg-card: #ffffff;
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --primary-blue: #2563eb;
  --white: #ffffff;
  --danger: #ef4444;
  --danger-light: #f87171;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar-profesor {
    width: 100%;
    min-height: auto;
    position: fixed;
    top: 0;
    left: -100%;
    z-index: 1000;
    transition: left 0.3s ease;
  }
  
  .sidebar-profesor.mobile-open {
    left: 0;
  }
}

/* Badge para notificaciones */
.nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.sidebar-nav li {
  position: relative;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.asistencia-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.asistencia-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.asistencia-header h2 {
  margin: 0 0 0.5rem 0;
  color: #2d3748;
  font-size: 1.5rem;
}

.asistencia-info {
  margin: 0;
  color: #718096;
  font-size: 0.95rem;
}

.btn-cerrar {
  background: #f7fafc;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  color: #718096;
  transition: all 0.2s;
}

.btn-cerrar:hover {
  background: #e2e8f0;
  color: #2d3748;
}

.asistencia-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: #f7fafc;
}

.stat-card {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card.presente {
  border-left: 4px solid #48bb78;
}

.stat-card.ausente {
  border-left: 4px solid #f56565;
}

.stat-card.pendiente {
  border-left: 4px solid #ed8936;
}

.stat-icon {
  font-size: 2rem;
}

.stat-numero {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
}

.stat-label {
  font-size: 0.85rem;
  color: #718096;
}

.acciones-rapidas {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 1rem 1.5rem;
}

.btn-accion {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.btn-todos-presentes {
  background: #c6f6d5;
  color: #22543d;
}

.btn-todos-presentes:hover {
  background: #9ae6b4;
}

.btn-todos-ausentes {
  background: #fed7d7;
  color: #742a2a;
}

.btn-todos-ausentes:hover {
  background: #fc8181;
}

.lista-estudiantes {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem;
  max-height: 400px;
}

.cargando,
.sin-estudiantes {
  text-align: center;
  padding: 3rem 1rem;
  color: #718096;
}

.estudiante-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
}

.estudiante-item.presente {
  background: #f0fff4;
  border-color: #48bb78;
}

.estudiante-item.ausente {
  background: #fff5f5;
  border-color: #f56565;
}

.estudiante-info {
  flex: 1;
}

.estudiante-nombre {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.estudiante-email {
  font-size: 0.85rem;
  color: #718096;
}

.estudiante-acciones {
  display: flex;
  gap: 0.5rem;
}

.btn-asistencia {
  padding: 0.5rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-asistencia:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-asistencia.activo {
  transform: scale(1.05);
}

.btn-asistencia:first-child.activo {
  background: #48bb78;
  color: white;
  border-color: #48bb78;
}

.btn-asistencia:last-child.activo {
  background: #f56565;
  color: white;
  border-color: #f56565;
}

.asistencia-footer {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 2px solid #f0f0f0;
  background: #f7fafc;
}

.btn-cancelar,
.btn-guardar {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-cancelar {
  background: #e2e8f0;
  color: #2d3748;
}

.btn-cancelar:hover {
  background: #cbd5e0;
}

.btn-guardar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-guardar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-guardar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .asistencia-stats {
    grid-template-columns: 1fr;
  }
  
  .acciones-rapidas {
    flex-direction: column;
  }
  
  .estudiante-item {
    flex-direction: column;
    gap: 1rem;
  }
  
  .estudiante-acciones {
    width: 100%;
  }
  
  .btn-asistencia {
    flex: 1;
  }
}
.mis-clases-container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

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

.mis-clases-header h2 {
  color: #2d3748;
  font-size: 2rem;
  margin-bottom: 8px;
}

.mis-clases-header p {
  color: #718096;
  font-size: 1.1rem;
  margin: 0;
}

.clases-section {
  margin-bottom: 40px;
}

.section-title {
  color: #2d3748;
  font-size: 1.5rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Clases de Hoy - Grid Layout */
.clases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.clase-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.clase-card.hoy {
  border-color: #667eea;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.clase-card.activa {
  border-color: #f56565;
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.clase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.clase-info h4 {
  color: #2d3748;
  font-size: 1.25rem;
  margin: 0 0 4px 0;
}

.clase-tipo {
  background: #e2e8f0;
  color: #4a5568;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.estado-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.estado-badge.programada {
  background: #fef3c7;
  color: #92400e;
}

.estado-badge.activa {
  background: #fee2e2;
  color: #dc2626;
  animation: blink 1s infinite;
}

.estado-badge.completada {
  background: #d1fae5;
  color: #065f46;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.5; }
}

.clase-detalles {
  margin-bottom: 16px;
}

.detalle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #4a5568;
  font-size: 0.9rem;
}

.detalle-icon {
  font-size: 1rem;
}

.estudiantes-lista {
  margin-bottom: 20px;
}

.estudiantes-lista strong {
  color: #2d3748;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 8px;
}

.estudiantes-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.estudiante-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.clase-acciones {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-asistencia {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  min-width: 140px;
}

.btn-asistencia:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-iniciar-clase {
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  min-width: 140px;
}

.btn-iniciar-clase:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.btn-unirse-clase {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-unirse-clase:hover {
  background: #5a67d8;
  transform: translateY(-1px);
}

.btn-finalizar-clase {
  background: #f56565;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-finalizar-clase:hover {
  background: #e53e3e;
  transform: translateY(-1px);
}

/* Próximas Clases - Lista Layout */
.clases-lista {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.clase-row {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.2s ease;
}

.clase-row:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.clase-fecha {
  min-width: 180px;
  text-align: center;
}

.fecha-principal {
  color: #2d3748;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.hora-clase {
  color: #667eea;
  font-weight: 700;
  font-size: 1.1rem;
}

.clase-contenido {
  flex: 1;
}

.clase-contenido h4 {
  color: #2d3748;
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.clase-contenido p {
  color: #6b7280;
  margin: 0 0 8px 0;
  font-size: 0.9rem;
}

.clase-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.meta-item {
  color: #4a5568;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.clase-acciones-row {
  display: flex;
  gap: 8px;
}

.btn-ver-detalles,
.btn-editar {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.btn-ver-detalles {
  background: #3b82f6;
  color: white;
}

.btn-ver-detalles:hover {
  background: #2563eb;
}

.btn-editar {
  background: #f59e0b;
  color: white;
}

.btn-editar:hover {
  background: #d97706;
}

.btn-cerrar-modal:hover {
  background: #4b5563;
}

.btn-editar-modal {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-editar-modal:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Estilos adicionales para mejor presentación */
.clases-historial {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ... */
.clase-historial-item {
  background: #f8fafc;
  border-radius: 6px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e2e8f0;
}

.historial-mas {
  text-align: center;
  padding: 16px;
  margin-top: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.historial-mas p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-style: italic;
}

.historial-filtros {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.historial-acciones {
  display: flex;
  gap: 8px;
}

.btn-ver-historial {
  background: #f8fafc;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ver-historial:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.btn-paginacion {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.btn-paginacion:hover:not(:disabled) {
  background: #2563eb;
}

.btn-paginacion:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.paginacion-info {
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.historial-fecha {
  color: #6b7280;
  font-size: 0.85rem;
  min-width: 120px;
}

.historial-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.historial-tema {
  color: #2d3748;
  font-weight: 600;
  font-size: 0.9rem;
}

.historial-estudiantes {
  color: #6b7280;
  font-size: 0.8rem;
}

.historial-estado {
  color: #065f46;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Estado Vacío */
.estado-vacio {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.vacio-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.estado-vacio h3 {
  color: #4a5568;
  margin-bottom: 8px;
}

.estado-vacio p {
  margin-bottom: 24px;
}

.btn-programar-primera {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-programar-primera:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Pestañas */
.tabs-container {
  display: flex;
  background: #f7fafc;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.tab-button {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-button:hover {
  background: #e2e8f0;
  color: #4a5568;
}

.tab-button.active {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-content {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Mejoras al historial */
.historial-duracion {
  color: #6b7280;
  font-size: 0.8rem;
}

.clases-historial .clase-historial-item:hover {
  background: #f1f5f9;
  transform: translateX(4px);
  transition: all 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .mis-clases-container {
    padding: 16px;
  }
  
  .clases-grid {
    grid-template-columns: 1fr;
  }
  
  .clase-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .clase-fecha {
    min-width: auto;
    text-align: left;
  }
  
  .clase-acciones {
    width: 100%;
  }
  
  .clase-acciones-row {
    width: 100%;
    justify-content: flex-end;
  }
  
  .clase-meta {
    gap: 8px;
  }
}

/* Estilos para filtros de clases del bloque */
.filtros-bloque {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid #e9ecef;
}

.filtros-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.search-input-bloque {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-input-bloque:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filtro-select {
  padding: 10px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
}

.filtro-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-limpiar-filtros {
  padding: 10px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-limpiar-filtros:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.filtros-info {
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

/* Responsive para filtros */
@media (max-width: 768px) {
  .filtros-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input-bloque,
  .filtro-select {
    min-width: 100%;
  }
  
  .filtros-info {
    text-align: center;
  }
}

/* Estilos mejorados para las cards de clases del bloque */
.clase-card.bloque {
  border-left: 4px solid #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.clase-origen {
  background: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Estado vacío para filtros */
.estado-vacio-filtros {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.estado-vacio-filtros .vacio-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.estado-vacio-filtros h3 {
  margin-bottom: 8px;
  color: #495057;
}

.estado-vacio-filtros p {
  margin-bottom: 20px;
}

.btn-limpiar-filtros-vacio {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-limpiar-filtros-vacio:hover {
  background: #0056b3;
  transform: translateY(-2px);
}
.programar-clase {
  padding: 32px;
}

.programar-header {
  margin-bottom: 32px;
}

.programar-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.programar-header p {
  margin: 0;
  color: #6b7280;
  font-size: 16px;
}

.clase-form {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.form-section {
  padding: 32px;
  border-right: 1px solid #e5e7eb;
}

.form-section:last-child {
  border-right: none;
}

.form-section h3 {
  margin: 0 0 24px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Selector de estudiantes */
.estudiantes-selector {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.selector-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.toggle-estudiantes {
  width: 100%;
  padding: 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-estudiantes:hover {
  background: #f3f4f6;
}

.selected-count {
  color: #667eea;
  font-weight: 500;
}

.estudiantes-panel {
  background: white;
}

.panel-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-seleccionar-todos {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-seleccionar-todos:hover:not(:disabled) {
  background: #0056b3;
}

.btn-seleccionar-todos:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.loading-estudiantes, .no-estudiantes {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

.estudiante-email {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
}

.nivel-filter {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.estudiantes-list {
  max-height: 300px;
  overflow-y: auto;
}

.estudiante-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.2s ease;
}

.estudiante-item:hover {
  background: #f9fafb;
}

.estudiante-item.selected {
  background: #eff6ff;
  border-color: #dbeafe;
}

.estudiante-info {
  display: flex;
  flex-direction: column;
}

.estudiante-nombre {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.estudiante-nivel {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #10b981;
  font-weight: 700;
}

.estudiante-item.selected .checkbox {
  border-color: #10b981;
  background: #10b981;
  color: white;
}

.selected-students {
  margin-top: 20px;
  padding: 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

.selected-students h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #bae6fd;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #0369a1;
}

.remove-student {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-student:hover {
  color: #ef4444;
}

/* Acciones del formulario */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px 32px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Responsive */
@media (max-width: 1024px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-section {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .form-section:last-child {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .programar-clase {
    padding: 20px;
  }
  
  .form-section {
    padding: 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .form-actions {
    padding: 20px 24px;
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* Google Meet Styles */
.meet-section {
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  background: #f8fafc;
}

.meet-container {
  margin-bottom: 8px;
}

.btn-generar-meet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.btn-generar-meet:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-generar-meet:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.meet-link-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meet-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 2px solid #4285f4;
  border-radius: 8px;
}

.meet-icon {
  font-size: 18px;
}

.meet-link a {
  color: #4285f4;
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  word-break: break-all;
}

.meet-link a:hover {
  text-decoration: underline;
}

.btn-regenerar-meet {
  padding: 8px 16px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.btn-regenerar-meet:hover:not(:disabled) {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.meet-help {
  color: #6b7280;
  font-size: 12px;
  font-style: italic;
}
/* Contenedor principal */
.drive-evaluaciones-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  background: #f8fafc;
  min-height: 100vh;
}

/* Header de evaluaciones */
.evaluaciones-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.evaluaciones-header h1 {
  color: #2d3748;
  font-size: 2.2rem;
  margin: 0;
}

.evaluaciones-header p {
  color: #718096;
  font-size: 1.1rem;
  margin: 0.5rem 0 0 0;
}

.btn-nueva-evaluacion {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-nueva-evaluacion:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

/* Grid de evaluaciones */
.evaluaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

/* Tarjeta de evaluación */
.evaluacion-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Borde colorido basado en el tipo de evaluación */
.evaluacion-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.evaluacion-card.quiz::before {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.evaluacion-card.examen::before {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.evaluacion-card.tarea::before {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.evaluacion-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.evaluacion-card.inactiva {
  opacity: 0.7;
  background: #f7fafc;
}

/* Header de la card */
.evaluacion-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.evaluacion-header h3 {
  color: #2d3748;
  font-size: 1.3rem;
  margin: 0;
  line-height: 1.4;
  flex: 1;
  margin-right: 1rem;
}

.evaluacion-status {
  flex-shrink: 0;
}

.status-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.activa {
  background: #d4edda;
  color: #155724;
}

.status-badge.inactiva {
  background: #f8d7da;
  color: #721c24;
}

/* Información de la evaluación */
.evaluacion-info {
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item .label {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.9rem;
}

.info-item .value {
  color: #2d3748;
  font-size: 0.9rem;
}

/* Estilos para el badge de nivel con colores dinámicos */
.nivel-badge {
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Colores por nivel */
.nivel-badge.A1 {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.nivel-badge.A2 {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.nivel-badge.B1 {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.nivel-badge.B2 {
  background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
}

.nivel-badge.C1 {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.nivel-badge.C2 {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

/* Estilos para el contador de estudiantes */
.estudiantes-count {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Enlace de evaluación */
.evaluacion-enlace {
  margin-bottom: 1.5rem;
}

.enlace-evaluacion {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  background: #e6fffa;
  color: #234e52;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #b2f5ea;
}

.enlace-evaluacion:hover {
  background: #b2f5ea;
  transform: translateX(3px);
}

/* Acciones de la evaluación */
.evaluacion-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evaluacion-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 80px;
}

.btn-toggle {
  background: #fff3cd;
  color: #856404;
}

.btn-toggle:hover {
  background: #ffeaa7;
}

.btn-edit {
  background: #cce5ff;
  color: #0056b3;
}

.btn-edit:hover {
  background: #99d1ff;
}

.btn-delete {
  background: #f8d7da;
  color: #721c24;
}

.btn-delete:hover {
  background: #f1aeb5;
}

.btn-assign {
  background: #e6fffa;
  color: #234e52;
  border: 1px solid #b2f5ea;
}

.btn-assign:hover {
  background: #b2f5ea;
}

/* Estado vacío */
.no-evaluaciones {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-evaluaciones p {
  color: #718096;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.flujo-info {
  background: linear-gradient(135deg, #e0f2fe 0%, #f3e5f5 100%);
  border: 1px solid #b3e5fc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.flujo-info p {
  margin: 0;
  color: #1565c0;
  font-size: 0.95rem;
}

.btn-crear-primera {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-crear-primera:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  color: #2d3748;
  margin: 0;
  font-size: 1.5rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #718096;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.btn-close:hover {
  background: #f7fafc;
  color: #2d3748;
}

/* Formulario */
.evaluacion-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2d3748;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
  cursor: pointer;
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: #718096;
  font-size: 0.85rem;
}

/* Acciones del formulario */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.btn-cancel {
  padding: 0.8rem 1.5rem;
  background: #f7fafc;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: #edf2f7;
}

.btn-save {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .drive-evaluaciones-container {
    padding: 1rem;
  }

  .evaluaciones-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .evaluaciones-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
}

/* Estilos para la vista de asignación */
.assign-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.btn-back {
  background: #f7fafc;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-back:hover {
  background: #edf2f7;
  transform: translateX(-2px);
}

.assign-header h1 {
  color: #2d3748;
  margin: 0;
  font-size: 1.8rem;
}

.assign-content-page {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.assign-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.evaluacion-info-summary {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.info-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.info-row span {
  color: #4a5568;
  font-size: 0.9rem;
}

.students-section h3 {
  color: #2d3748;
  margin-bottom: 1.5rem;
}

.students-group {
  margin-bottom: 2rem;
}

.students-group h4 {
  color: #4a5568;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.students-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.student-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.student-item:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.student-item.recommended {
  background: #f0fff4;
  border-color: #9ae6b4;
}

.student-item.recommended:hover {
  background: #e6fffa;
}

.student-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.student-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.student-name {
  font-weight: 600;
  color: #2d3748;
}

.student-email {
  font-size: 0.85rem;
  color: #718096;
}

.student-level {
  font-size: 0.8rem;
  background: #e2e8f0;
  color: #4a5568;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  align-self: flex-start;
  font-weight: 600;
}

.selected-count {
  margin-top: 1rem;
  padding: 1rem;
  background: #e6fffa;
  border-radius: 8px;
  text-align: center;
}

.selected-count p {
  margin: 0;
  color: #234e52;
  font-weight: 600;
}

/* Estados de carga y vacío para estudiantes */
.loading-students,
.no-students {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.loading-students .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-students p,
.no-students p {
  margin: 0;
  color: #4a5568;
  font-size: 1rem;
}

/* Responsive para modal de asignación */
@media (max-width: 768px) {
  .info-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .student-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
.reportes-progreso {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  height: calc(100vh - 4rem);
  overflow-y: auto;
}

.reportes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.reportes-header h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 600;
}

.reportes-controles {
  display: flex;
  gap: 1rem;
}

.filtro-select,
.orden-select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filtro-select:hover,
.orden-select:hover {
  border-color: var(--primary-blue);
}

/* Resumen general */
.resumen-general {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Tabla de Reportes */
.reportes-table-container {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nivel-badge-table {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827; /* texto oscuro para mejor lectura */
  background: #e5e7eb; /* fondo gris claro para que destaque el nivel */
}

.nivel-badge-table.básico {
  background: #3b82f6;
}

.nivel-badge-table.intermedio {
  background: #f59e0b;
}

.nivel-badge-table.avanzado {
  background: #10b981;
}

/* Barra de progreso en tabla */
.progreso-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progreso-barra-table {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progreso-relleno-table {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.progreso-porcentaje {
  font-weight: 600;
  color: #667eea;
  min-width: 45px;
  text-align: right;
}

.calificacion-badge {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
}

/* Acciones en tabla */
.acciones-table {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-accion-table {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  background: #f3f4f6;
}

.btn-accion-table:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-accion-table.btn-ver:hover {
  background: #dbeafe;
}

.btn-accion-table.btn-generar:hover {
  background: #d1fae5;
}

.resumen-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resumen-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.resumen-icon {
  font-size: 2.5rem;
  opacity: 0.8;
}

.resumen-info h3 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.resumen-valor {
  display: block;
  color: var(--primary-blue);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

/* Lista de estudiantes */
.estudiantes-lista-container {
  overflow-x: auto;
  padding-bottom: 1rem;
}

.estudiantes-lista {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 100%;
}

.estudiante-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 0.5rem;
}

.estudiante-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.estudiante-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.estudiante-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.estudiante-info h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.nivel-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.nivel-badge.básico {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.nivel-badge.intermedio {
  background: rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.nivel-badge.avanzado {
  background: rgba(168, 85, 247, 0.2);
  color: #7c3aed;
}

.estudiante-info-simple {
  display: flex;
  align-items: center;
}

.ultima-clase-header {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Barra de progreso */
.progreso-barra {
  margin-bottom: 1.5rem;
}

.progreso-fondo {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progreso-relleno {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), #60a5fa);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progreso-texto {
  color: var(--text-secondary);
  font-size: 0.9rem;
}


/* Footer del estudiante */
.estudiante-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.acciones {
  display: flex;
  gap: 0.75rem;
}

.btn-accion {
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-blue);
  background: transparent;
  color: var(--primary-blue);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-accion:hover {
  background: var(--primary-blue);
  color: white;
}

.btn-ver-detalles {
  background: var(--primary-blue) !important;
  color: white !important;
  border-color: var(--primary-blue) !important;
}

.btn-ver-detalles:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  transform: translateY(-1px);
}

.btn-generar {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: white !important;
}

.btn-generar:hover {
  background: #059669 !important;
  border-color: #059669 !important;
}

/* Detalles expandidos */
.detalles-expandidos {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
}

.detalles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.detalle-seccion h5 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Timeline de progreso */
.progreso-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 60px 1fr 50px;
  align-items: center;
  gap: 0.75rem;
}

.timeline-fecha {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.timeline-barra {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.timeline-progreso {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), #60a5fa);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.timeline-porcentaje {
  font-size: 0.8rem;
  color: var(--primary-blue);
  font-weight: 600;
  text-align: right;
}

/* Objetivos lista */
.objetivos-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.objetivos-lista li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  padding-left: 1.5rem;
}

.objetivos-lista li:before {
  content: "•";
  color: var(--primary-blue);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.objetivos-lista li:last-child {
  border-bottom: none;
}

/* Notas del profesor */
.notas-profesor {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 6px;
  border-left: 3px solid #10b981;
}

/* Responsive */
@media (max-width: 768px) {
  .reportes-progreso {
    padding: 1rem;
  }
  
  .reportes-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .reportes-controles {
    flex-direction: column;
  }
  
  .resumen-general {
    grid-template-columns: 1fr;
  }
  
  .estudiante-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  
  
  .estudiante-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .acciones {
    width: 100%;
    justify-content: space-between;
  }
}
/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.detalle-modal {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header del modal */
.modal-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.estudiante-info-header {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex: 1;
}

.avatar-section {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.info-basica h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.nivel-badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.nivel-badge.básico {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.nivel-badge.intermedio {
  background: rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.nivel-badge.avanzado {
  background: rgba(168, 85, 247, 0.2);
  color: #7c3aed;
}

.email {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.stats-rapidas {
  display: flex;
  gap: 2rem;
}

.stats-rapidas .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stats-rapidas .stat-numero {
  color: var(--primary-blue);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.stats-rapidas .stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

/* Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.tab-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary-blue);
  background: var(--bg-card);
  border-bottom-color: var(--primary-blue);
}

/* Contenido del modal */
.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.tab-content {
  animation: fadeIn 0.3s ease;
}

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

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-section {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.info-section h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
}

/* Progreso detallado */
.progreso-detallado {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.progreso-barra-modal {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.progreso-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.barra-fondo {
  height: 12px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.barra-relleno {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), #60a5fa);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.clases-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.clases-completadas,
.clases-restantes {
  text-align: center;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.clases-completadas .numero,
.clases-restantes .numero {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.clases-completadas .label,
.clases-restantes .label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Rendimiento circular */
.rendimiento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.rendimiento-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.rendimiento-circular {
  width: 80px;
  height: 80px;
}

.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 80%;
  max-height: 250px;
}

.circle-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  animation: progress 1s ease-out forwards;
  stroke: var(--primary-blue);
}

.percentage {
  fill: var(--text-primary);
  font-family: sans-serif;
  font-size: 0.4em;
  text-anchor: middle;
  font-weight: 600;
}

@keyframes progress {
  0% {
    stroke-dasharray: 0 100;
  }
}

.rendimiento-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
}

/* Tags */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.tag.fortaleza {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.tag.area-mejorar {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
}

/* Tablas */
.examenes-tabla,
.asistencia-tabla {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.tabla-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--primary-blue);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.asistencia-tabla .tabla-header {
  grid-template-columns: 1fr 1fr 1fr;
}

.tabla-fila {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.asistencia-tabla .tabla-fila {
  grid-template-columns: 1fr 1fr 1fr;
}

.tabla-fila:last-child {
  border-bottom: none;
}

.tabla-fila:hover {
  background: rgba(59, 130, 246, 0.05);
}

.nota {
  font-weight: 600;
  color: var(--primary-blue);
}

.estado {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
}

.estado.excelente {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.estado.bueno {
  background: rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.estado.regular {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
}

.estado.presente {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.estado.ausente {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

/* Notas del profesor */
.notas-profesor-section {
  margin-top: 2rem;
}

.nota-item {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
  margin-bottom: 1rem;
}

.nota-fecha {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.nota-contenido {
  color: var(--text-primary);
  line-height: 1.6;
}

/* Asistencia stats */
.asistencia-stats,
.retos-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-card .stat-numero {
  color: var(--primary-blue);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Progreso retos */
.progreso-retos {
  margin-bottom: 2rem;
}

.reto-progreso {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.reto-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Logros */
.logros-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.logro-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.logro-icon {
  font-size: 1.5rem;
}

.logro-info {
  display: flex;
  flex-direction: column;
}

.logro-titulo {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.logro-fecha {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Footer del modal */
.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-generar-reporte {
  background: #10b981;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-generar-reporte:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-cerrar {
  background: var(--border-color);
  color: var(--text-primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cerrar:hover {
  background: var(--text-secondary);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0.5rem;
  }
  
  .detalle-modal {
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 1.5rem;
  }
  
  .estudiante-info-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .avatar-section {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .stats-rapidas {
    gap: 1rem;
  }
  
  .modal-tabs {
    overflow-x: auto;
  }
  
  .tab-btn {
    white-space: nowrap;
    min-width: 120px;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .rendimiento-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .tabla-header,
  .tabla-fila {
    font-size: 0.8rem;
    padding: 0.75rem;
  }
  
  .asistencia-stats,
  .retos-stats {
    grid-template-columns: 1fr;
  }
  
  .modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }
  
  .btn-generar-reporte,
  .btn-cerrar {
    width: 100%;
    justify-content: center;
  }
}
.notificaciones-profesor {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.notificaciones-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.notificaciones-header h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-count {
  background: #ef4444;
  color: white;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

.notificaciones-controles {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filtro-select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filtro-select:hover {
  border-color: var(--primary-blue);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.btn-marcar-todas {
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-blue);
  background: var(--primary-blue);
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-marcar-todas:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-marcar-todas:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Lista de notificaciones */
.notificaciones-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sin-notificaciones {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.sin-notificaciones-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.sin-notificaciones h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Notificación individual */
.notificacion-item {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.notificacion-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.notificacion-item.no-leida {
  border-left-color: var(--primary-blue);
  background: rgba(59, 130, 246, 0.05);
}

.notificacion-item.leida {
  opacity: 0.8;
}

.notificacion-item.prioridad-alta {
  border-left-color: #ef4444;
}

.notificacion-item.prioridad-media {
  border-left-color: #f59e0b;
}

.notificacion-item.prioridad-baja {
  border-left-color: #10b981;
}

.notificacion-icono {
  font-size: 2rem;
  opacity: 0.8;
  flex-shrink: 0;
}

.notificacion-contenido {
  flex: 1;
}

.notificacion-header-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.notificacion-header-item h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.notificacion-tiempo {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
  margin-left: 1rem;
}

.notificacion-mensaje {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
}

.notificacion-estudiante {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-blue);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.notificacion-acciones {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-marcar-leida,
.btn-eliminar {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-marcar-leida {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.btn-marcar-leida:hover {
  background: rgba(34, 197, 94, 0.2);
}

.btn-eliminar {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.btn-eliminar:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .notificaciones-profesor {
    padding: 1rem;
  }
  
  .notificaciones-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .notificaciones-controles {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .notificacion-item {
    padding: 1rem;
  }
  
  .notificacion-header-item {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .notificacion-tiempo {
    margin-left: 0;
  }
  
  .notificacion-acciones {
    flex-direction: row;
  }
}

/* Estados de carga y error */
.loading-notificaciones {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-notificaciones {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  margin: 1rem 0;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.btn-reintentar {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.btn-reintentar:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Nuevos estilos para información adicional */
.notificacion-clase,
.notificacion-evaluacion {
  display: inline-block;
  background: #f0f9ff;
  color: #0369a1;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
}

.notificacion-evaluacion {
  background: #fef3c7;
  color: #d97706;
}

/* Mejoras visuales para prioridades */
.notificacion-item {
  border-left: 4px solid transparent;
}

.prioridad-urgente {
  border-left-color: #ef4444 !important;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.prioridad-alta {
  border-left-color: #f97316 !important;
}

.prioridad-media {
  border-left-color: #f59e0b !important;
}

.prioridad-baja {
  border-left-color: #10b981 !important;
}
.estudiantes-view {
  padding: 32px;
}

.estudiantes-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.header-info h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.header-info p {
  margin: 0;
  color: #6b7280;
  font-size: 16px;
}

.header-filters {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  cursor: pointer;
}

.filter-select.clase-selector {
  min-width: 300px;
  font-weight: 600;
  border: 2px solid #8b5cf6;
  background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
}

.filter-select.clase-selector:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.btn-guardar-asistencia {
  padding: 10px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-guardar-asistencia:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-guardar-asistencia:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Tabla de Estudiantes */
.estudiantes-table-container {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.estudiantes-table-container .users-table table {
  width: 100%;
}

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

.nivel-badge-table {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
}

.promedio-badge {
  font-weight: 700;
  font-size: 1.125rem;
}

.estado-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.estado-badge.activo {
  background: #d1fae5;
  color: #065f46;
}

.estado-badge.inactivo {
  background: #fee2e2;
  color: #991b1b;
}

/* Controles de Asistencia */
.asistencia-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.asistencia-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.asistencia-option:hover {
  background: #f3f4f6;
}

.asistencia-option input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.asistencia-label {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.asistencia-label.presente {
  color: #059669;
}

.asistencia-label.ausente {
  color: #dc2626;
}

.asistencia-option input[type="radio"]:checked + .asistencia-label.presente {
  color: #047857;
  font-weight: 700;
}

.asistencia-option input[type="radio"]:checked + .asistencia-label.ausente {
  color: #b91c1c;
  font-weight: 700;
}

.cargando-estudiantes {
  text-align: center;
  padding: 80px 20px;
}

.cargando-estudiantes .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cargando-estudiantes p {
  color: #6b7280;
  font-size: 16px;
}

.estudiantes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.estudiante-card {
  background: white;
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.estudiante-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.estudiante-card.inactivo {
  opacity: 0.7;
}

.estudiante-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border-bottom: 2px solid #f0f0f0;
  position: relative;
}

.estudiante-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.estudiante-info {
  flex: 1;
}

.nombre {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.email {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #6b7280;
}

.nivel-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.estado-indicator {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
}

.estudiante-stats {
  padding: 20px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  padding: 16px;
  border-radius: 12px;
  border: 2px solid #f0f0f0;
  transition: all 0.2s;
}

.stat-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.promedio-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #93c5fd;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.promedio-label {
  font-size: 13px;
  color: #1e40af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.promedio-valor {
  font-size: 24px;
  font-weight: 800;
  color: #1e40af;
}

.ultima-actividad {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.actividad-label {
  color: #6b7280;
}

.actividad-fecha {
  color: #374151;
  font-weight: 500;
}

.estudiante-actions {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-top: 2px solid #f0f0f0;
}

.action-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn.details {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.action-btn.details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn.message {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.action-btn.message:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #374151;
}

.empty-state p {
  margin: 0;
  font-size: 16px;
}

/* Modal de detalles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.estudiante-modal-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 20px;
}

.modal-header h2 {
  margin: 0 0 4px 0;
  font-size: 24px;
  font-weight: 700;
}

.modal-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 16px;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 32px;
}

.resumen-estudiante {
  margin-bottom: 32px;
}

.resumen-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.resumen-stat {
  text-align: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.resumen-numero {
  display: block;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.resumen-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Asistencias */
.asistencias-detalle {
  margin-bottom: 32px;
}

.asistencias-detalle h3 {
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.sin-asistencias {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 12px;
}

.asistencias-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asistencia-item {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
}

.asistencia-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.asistencia-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.asistencia-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.asistencia-fecha {
  font-size: 14px;
  color: #6b7280;
}

.asistencia-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.asistencia-profesor {
  font-size: 14px;
  color: #6b7280;
}

.asistencia-estado {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.asistencia-estado.presente {
  background: #d1fae5;
  color: #065f46;
}

.asistencia-estado.ausente {
  background: #fee2e2;
  color: #991b1b;
}

.asistencia-estado.sin-marcar {
  background: #fef3c7;
  color: #92400e;
}

.evaluaciones-detalle h3 {
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.evaluaciones-lista {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.evaluacion-resultado {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  background: white;
}

.resultado-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.resultado-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.resultado-fecha {
  font-size: 14px;
  color: #6b7280;
}

.resultado-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.resultado-puntuacion,
.resultado-respuestas,
.resultado-tiempo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.puntuacion-label,
.respuestas-label,
.tiempo-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.puntuacion-valor,
.respuestas-valor,
.tiempo-valor {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
}

.resultado-barra {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.barra-progreso {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .estudiantes-view {
    padding: 20px;
  }
  
  .estudiantes-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .header-filters {
    width: 100%;
  }
  
  .filter-select {
    flex: 1;
  }
  
  .estudiantes-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header {
    padding: 20px 24px;
  }
  
  .modal-body {
    padding: 24px;
  }
  
  .resumen-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .resultado-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.historial-asistencias {
  padding: 32px;
  min-height: 100vh;
}

.historial-header {
  margin-bottom: 32px;
}

.historial-header .header-info h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.historial-header .header-info p {
  margin: 0;
  color: #6b7280;
  font-size: 16px;
}

/* Layout */
.historial-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
  height: calc(100vh - 200px);
}

/* Sidebar de Clases */
.clases-sidebar {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

.clases-sidebar h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.clases-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clase-item {
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clase-item:hover {
  border-color: #8b5cf6;
  background: #f9fafb;
  transform: translateX(4px);
}

.clase-item.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.clase-nombre {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  font-size: 15px;
}

.clase-fecha {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 4px;
}

.clase-hora {
  color: #8b5cf6;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.clase-estado {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.clase-estado.programada {
  background: #dbeafe;
  color: #1e40af;
}

.clase-estado.en_curso {
  background: #fef3c7;
  color: #92400e;
}

.clase-estado.completada {
  background: #d1fae5;
  color: #065f46;
}

.clase-estado.cancelada {
  background: #fee2e2;
  color: #991b1b;
}

.no-clases {
  text-align: center;
  color: #9ca3af;
  padding: 40px 20px;
}

/* Panel de Asistencias */
.asistencias-panel {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Clase Info Card */
.clase-info-card {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.clase-info-card h3 {
  margin: 0 0 12px 0;
  font-size: 22px;
  font-weight: 700;
}

.clase-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.clase-details span {
  font-size: 14px;
  opacity: 0.95;
}

.estado-clase {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  text-transform: capitalize;
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #e5e7eb;
}

.stat-card.presente {
  background: #d1fae5;
  border-color: #10b981;
}

.stat-card.ausente {
  background: #fee2e2;
  border-color: #ef4444;
}

.stat-card.porcentaje {
  background: #dbeafe;
  border-color: #3b82f6;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

/* Tabla de Asistencias */
.asistencias-table {
  overflow-x: auto;
}

.asistencias-table table {
  width: 100%;
  border-collapse: collapse;
}

.asistencias-table thead {
  background: #f9fafb;
}

.asistencias-table th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  border-bottom: 2px solid #e5e7eb;
}

.asistencias-table td {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #374151;
}

.asistencias-table tbody tr:hover {
  background: #f9fafb;
}

.estudiante-nombre {
  font-weight: 500;
  color: #1f2937;
}

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

/* Estado Badges */
.estado-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.estado-badge.presente {
  background: #d1fae5;
  color: #065f46;
}

.estado-badge.ausente {
  background: #fee2e2;
  color: #991b1b;
}

.estado-badge.tardanza {
  background: #fef3c7;
  color: #92400e;
}

.estado-badge.justificado {
  background: #dbeafe;
  color: #1e40af;
}

/* Responsive */
@media (max-width: 1024px) {
  .historial-content {
    grid-template-columns: 1fr;
    height: auto;
  }

  .clases-sidebar {
    max-height: 400px;
  }

  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .historial-asistencias {
    padding: 16px;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }

  .clase-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
.calificar-evaluaciones {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.calificar-header {
  margin-bottom: 2rem;
  text-align: center;
}

.calificar-header h2 {
  color: var(--text-primary, #1e293b);
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.calificar-header p {
  color: var(--text-secondary, #64748b);
  font-size: 1.1rem;
}

/* Filtro de búsqueda */
.filtro-container {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.filtro-container input {
  width: 260px;
  max-width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.9rem;
  color: var(--text-primary, #1e293b);
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

.filtro-container input::placeholder {
  color: #9ca3af;
}

.filtro-container input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Tabs */
.tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
}

.tabs-left {
  display: flex;
  gap: 1rem;
}

.btn-actualizar {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-actualizar:hover:not(:disabled) {
  background-color: var(--primary-hover, #2563eb);
  transform: translateY(-1px);
}

.btn-actualizar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.tab {
  padding: 1rem 2rem;
  border: none;
  background: none;
  color: var(--text-secondary, #64748b);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab:hover {
  color: var(--primary-color, #3b82f6);
  background-color: var(--bg-secondary, #f8fafc);
}

.tab.active {
  color: var(--primary-color, #3b82f6);
  border-bottom-color: var(--primary-color, #3b82f6);
  background-color: var(--bg-secondary, #f8fafc);
}

/* Content */
.content {
  min-height: 400px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-secondary, #64748b);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color, #e2e8f0);
  border-top: 4px solid var(--primary-color, #3b82f6);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error {
  text-align: center;
  padding: 2rem;
  color: var(--error-color, #ef4444);
}

.btn-retry {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-retry:hover {
  background-color: var(--primary-hover, #2563eb);
}

.empty-state {
  text-align: center;
  padding: 4rem;
  color: var(--text-secondary, #64748b);
  font-size: 1.1rem;
}

/* Respuestas List */
.respuestas-list {
  margin-top: 0.75rem;
}

/* Tabla de calificaciones */
.tabla-calificaciones {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--bg-card, #ffffff);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.92rem;
}

.tabla-calificaciones thead {
  background: linear-gradient(90deg, #eff6ff, #e0f2fe);
}

.tabla-calificaciones th,
.tabla-calificaciones td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.tabla-calificaciones th {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
  white-space: nowrap;
}

.tabla-calificaciones tbody tr:last-child td {
  border-bottom: none;
}

.tabla-calificaciones tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.tabla-calificaciones tbody tr:hover {
  background-color: #eef2ff;
}

.tabla-calificaciones td:first-child,
.tabla-calificaciones th:first-child {
  padding-left: 1.25rem;
}

.tabla-calificaciones td:last-child,
.tabla-calificaciones th:last-child {
  padding-right: 1.25rem;
}

/* Celda de nota */
.celda-nota {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.celda-nota input[type="number"] {
  width: 110px;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.9rem;
  color: var(--text-primary, #1e293b);
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.celda-nota input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.comentario-input {
  width: 100%;
  min-width: 220px;
  max-width: 320px;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.85rem;
  resize: vertical;
  color: var(--text-primary, #1e293b);
}

.comentario-input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.respuesta-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.respuesta-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.respuesta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.respuesta-info h4 {
  color: var(--text-primary, #1e293b);
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.tipo-evaluacion {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background-color: #e0f2fe;
  color: #0369a1;
  text-transform: uppercase;
}

.respuesta-info p {
  margin: 0.25rem 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.9rem;
}

.estudiante-nombre {
  font-weight: 600;
  color: var(--text-primary, #1e293b) !important;
}

.calificacion-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  color: white;
  min-width: 100px;
  text-align: center;
}

.calificacion-numero {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.calificacion-etiqueta {
  font-size: 0.8rem;
  opacity: 0.9;
}

.respuesta-content {
  margin-bottom: 1rem;
}

.archivo-respuesta {
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: var(--bg-secondary, #f8fafc);
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-left: 4px solid var(--primary-color, #3b82f6);
}

.archivo-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.archivo-icono {
  font-size: 2rem;
  flex-shrink: 0;
}

.archivo-detalles {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.archivo-nombre {
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  font-size: 0.95rem;
}

.archivo-url {
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  font-family: monospace;
  background-color: var(--bg-card, #ffffff);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.archivo-acciones {
  display: flex;
  gap: 0.5rem;
}

.btn-vista-previa,
.btn-descargar {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-vista-previa {
  background-color: var(--primary-color, #3b82f6);
  color: white;
}

.btn-vista-previa:hover {
  background-color: var(--primary-hover, #2563eb);
  transform: translateY(-1px);
}

.btn-descargar {
  background-color: var(--success-color, #22c55e);
  color: white;
}

.btn-descargar:hover {
  background-color: #16a34a;
  transform: translateY(-1px);
}

.respuestas-json {
  margin-bottom: 1rem;
}

.respuestas-json h5 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary, #1e293b);
  font-size: 1rem;
}

.respuestas-content {
  background-color: var(--bg-secondary, #f8fafc);
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.respuesta-item {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background-color: white;
  border-radius: 4px;
  font-size: 0.9rem;
}

.respuesta-item strong {
  color: var(--text-primary, #1e293b);
}

.comentarios-profesor {
  background-color: #fef3c7;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #f59e0b;
}

.comentarios-profesor h5 {
  margin: 0 0 0.5rem 0;
  color: #92400e;
  font-size: 1rem;
}

.comentarios-profesor p {
  margin: 0 0 0.5rem 0;
  color: #92400e;
}

.comentarios-profesor small {
  color: #a16207;
  font-style: italic;
}

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

.btn-calificar {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-calificar:hover {
  background-color: var(--primary-hover, #2563eb);
  transform: translateY(-1px);
}

.btn-calificar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-card, #ffffff);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary, #1e293b);
  font-size: 1.3rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-close:hover {
  background-color: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
}

.modal-body {
  padding: 1.5rem;
}

.evaluacion-info {
  background-color: var(--bg-secondary, #f8fafc);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.evaluacion-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary, #1e293b);
}

.evaluacion-info p {
  margin: 0.25rem 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary, #1e293b);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.btn-cancel {
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-secondary, #f8fafc);
  color: var(--text-secondary, #64748b);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background-color: var(--border-color, #e2e8f0);
}

.btn-save {
  padding: 0.75rem 1.5rem;
  background-color: var(--success-color, #22c55e);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-save:hover:not(:disabled) {
  background-color: #16a34a;
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .calificar-evaluaciones {
    padding: 1rem;
  }

  .tabs-container {
    flex-direction: column;
    gap: 0;
  }

  .tab {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
  }

  .respuesta-header {
    flex-direction: column;
    gap: 1rem;
  }

  .calificacion-badge {
    align-self: flex-start;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-footer {
    flex-direction: column;
  }

  .btn-cancel,
  .btn-save {
    width: 100%;
  }
}

/* Modal de Vista Previa */
.modal-previa {
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-descargar-modal {
  padding: 0.5rem 1rem;
  background-color: var(--success-color, #22c55e);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-descargar-modal:hover {
  background-color: #16a34a;
}

.modal-previa-body {
  padding: 0;
  max-height: 70vh;
  overflow: auto;
}

.imagen-previa {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background-color: var(--bg-secondary, #f8fafc);
}

.archivo-no-previsualizable {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: 2rem;
}

.archivo-info-grande {
  text-align: center;
  max-width: 400px;
}

.archivo-icono-grande {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

.archivo-info-grande h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary, #1e293b);
  font-size: 1.5rem;
}

.archivo-info-grande p {
  margin: 0.5rem 0;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
}

.acciones-archivo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-abrir-nueva-ventana,
.btn-descargar-grande {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-abrir-nueva-ventana {
  background-color: var(--primary-color, #3b82f6);
  color: white;
}

.btn-abrir-nueva-ventana:hover {
  background-color: var(--primary-hover, #2563eb);
  transform: translateY(-2px);
}

.btn-descargar-grande {
  background-color: var(--success-color, #22c55e);
  color: white;
}

.btn-descargar-grande:hover {
  background-color: #16a34a;
  transform: translateY(-2px);
}

/* Responsive para modal de vista previa */
@media (max-width: 768px) {
  .modal-previa {
    width: 98%;
    height: 95vh;
  }

  .modal-header-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-descargar-modal {
    width: 100%;
  }

  .archivo-info-grande {
    padding: 1rem;
  }

  .acciones-archivo {
    gap: 0.75rem;
  }

  .archivo-acciones {
    flex-direction: column;
  }

  .btn-vista-previa,
  .btn-descargar {
    width: 100%;
    justify-content: center;
  }
}
/* ===== VARIABLES DE COLOR MEJORADAS ===== */

:root {
  /* Colores Primarios */
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --primary-blue-light: #3b82f6;
  --primary-accent: #06b6d4;
  --primary-accent-hover: #0891b2;

  /* Colores de Fondo */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #fefefe;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Colores de Texto */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-accent: #2563eb;
  --text-muted: #94a3b8;
  --white: #ffffff;

  /* Colores de Estado */
  --success: #10b981;
  --success-light: #34d399;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --danger: #ef4444;
  --danger-light: #f87171;
  --info: #06b6d4;
  --info-light: #22d3ee;

  /* Bordes y Sombras */
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --shadow-color: rgba(15, 23, 42, 0.08);
  --shadow-hover: rgba(15, 23, 42, 0.15);
  --shadow-strong: rgba(15, 23, 42, 0.25);

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-accent) 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  --gradient-hover: linear-gradient(135deg, var(--primary-blue-hover) 0%, var(--primary-accent-hover) 100%);
}

/* ========== ESTILOS PARA ESPECIALIZACIONES ================== */

/* Estilos para Especializaciones */
.actions-bar {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-end;
}

.form-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.form-container {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.especializaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.especialization-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.especialization-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.especialization-card.inactive {
  opacity: 0.6;
  background: #f8f9fa;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-status {
  flex-shrink: 0;
}

.card-header h3 {
  margin: 0;
  color: #2d3748;
  font-size: 1.2rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.inactive {
  background: #f8d7da;
  color: #721c24;
}

.card-content .description {
  color: #718096;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
}

.detail-item .label {
  font-weight: 600;
  color: #4a5568;
}

.detail-item .value {
  color: #2d3748;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.misiones-actions-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.misiones-actions-cell > .btn-primary,
.misiones-actions-cell > .btn-danger {
  margin: 4px 8px;
}

.btn-edit {
  background: #3182ce;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.btn-edit:hover {
  background: #2c5aa0;
}

.btn-toggle {
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-toggle.activate {
  background: #48bb78;
  color: white;
}

.btn-toggle.activate:hover {
  background: #38a169;
}

.btn-toggle.deactivate {
  background: #ed8936;
  color: white;
}

.btn-toggle.deactivate:hover {
  background: #dd6b20;
}

.btn-delete {
  background: #e53e3e;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.btn-delete:hover {
  background: #c53030;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #718096;
}

.empty-state h3 {
  color: #4a5568;
  margin-bottom: 0.5rem;
}

/* ========== PALETA DE COLORES PARA EL TEMA OSCURO  ================== */

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --bg-card-hover: #3f4b5f;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-accent: #60a5fa;
  --text-muted: #94a3b8;

  --border-color: #475569;
  --border-hover: #64748b;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.4);
  --shadow-strong: rgba(0, 0, 0, 0.6);

  --gradient-card: linear-gradient(145deg, rgba(51, 65, 85, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== ESTILOS DEL DASHBOARD PRINCIPAL ===== */

.admin-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

/* ===== HERO SECTION ===== */
.admin-hero {
  background: var(--gradient-primary);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 3rem;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out;
  box-shadow: 0 10px 40px var(--shadow-color);
}

.admin-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.admin-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
  color: var(--white);
  letter-spacing: -0.02em;
}

.admin-hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== HEADER DEL DASHBOARD ===== */
.dashboard-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.dashboard-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.dashboard-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.dashboard-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

/* ===== GRID DE ESTADÍSTICAS ===== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: popIn 0.5s ease-out backwards;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px var(--shadow-hover);
  border-color: var(--border-hover);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.stat-info {
  flex-grow: 1;
}

.stat-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-info span {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ===== GRID DE TARJETAS PRINCIPALES ===== */

.admin-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

/* ===== TARJETAS BASE ===== */

.admin-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 6px 25px var(--shadow-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease-out;
}

.admin-card:nth-child(1) { animation-delay: 0.1s; }
.admin-card:nth-child(2) { animation-delay: 0.2s; }
.admin-card:nth-child(3) { animation-delay: 0.3s; }

.admin-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-primary);
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.admin-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 50px var(--shadow-hover);
}

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

.admin-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-card h3::before {
  content: '';
  width: 4px;
  height: 30px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ===== TARJETA DE ESTADÍSTICAS ===== */

.stats-card ul {
  list-style: none;
  position: relative;
  z-index: 2;
  padding: 0;
  margin: 0;
}

.stats-card li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.stats-card li:hover {
  background: var(--bg-secondary);
  margin: 0 -1rem;
  padding: 1.25rem 1rem;
  border-radius: 8px;
}

.stats-card li:last-child { 
  border-bottom: none; 
}

.stats-card strong {
  color: var(--primary-blue);
  font-weight: 800;
  font-size: 1.2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BOTONES DE ACCIÓN ===== */

.add-user-btn, .add-class-btn {
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  overflow: hidden;
}

.add-user-btn::before, .add-class-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.add-user-btn:hover, .add-class-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.add-user-btn:hover::before, .add-class-btn:hover::before {
  width: 300px;
  height: 300px;
}

.add-user-btn:active, .add-class-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* ===== LISTAS ===== */

.users-list, .classes-list {
  flex: 1;
  position: relative;
  z-index: 2;
}

/* ===== FILAS DE USUARIOS ===== */

.user-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.user-row:hover {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  margin: 0 -1rem;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.user-row:last-child { 
  border-bottom: none; 
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.user-role {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-accent));
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  letter-spacing: 0.3px;
}

/* ===== FILAS DE CLASES ===== */

.class-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.class-row:hover {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  margin: 0 -1rem;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.class-row:last-child { 
  border-bottom: none; 
}

.class-row span {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== SECCIÓN DE GRÁFICOS ===== */
.charts-section {
  animation: slideUp 0.6s ease-out backwards;
  animation-delay: 0.5s;
}

.chart-container {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.3s ease;
  margin-bottom: 2rem; 
}

.chart-container:last-child {
  margin-bottom: 0; 
}

.chart-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-hover);
}

.chart-container h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.chart-container h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .admin-container {
    padding: 1rem;
  }
  
  .admin-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .admin-hero {
    padding: 2rem;
  }
  
  .admin-hero h1 {
    font-size: 2rem;
  }
  
  .dashboard-header h2 {
    font-size: 1.8rem;
  }
}

/* ===== ESTILOS PARA GESTIÓN DE USUARIOS Y CLASES ===== */

.gestion-container {
  animation: fadeIn 0.5s ease-out;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.gestion-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2.5rem;
  align-items: flex-start;
}

/* ===== CONTENEDORES PRINCIPALES ===== */

.form-container, .list-container {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 20px var(--shadow-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.form-container::before, .list-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.form-container:hover, .list-container:hover {
  box-shadow: 0 10px 30px var(--shadow-hover);
  border-color: var(--border-hover);
}

.form-container h3, .list-container h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
}

.form-container h3::after, .list-container h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ===== FORMULARIOS ===== */

.form-group {
  margin-bottom: 2rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background-color: var(--white);
  transform: translateY(-2px);
}

.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Input con efecto floating label */

.form-group.floating {
  position: relative;
}

.form-group.floating input {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.form-group.floating label {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  transition: all 0.3s ease;
  pointer-events: none;
  color: var(--text-muted);
  font-size: 1rem;
}

.form-group.floating input:focus + label,
.form-group.floating input:not(:placeholder-shown) + label {
  top: 0.25rem;
  font-size: 0.8rem;
  color: var(--primary-blue);
  font-weight: 600;
}

/* Botones de formulario */

.form-submit-btn, .form-cancel-btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.form-submit-btn {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  margin-right: 1rem;
}

.form-submit-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.form-cancel-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
}

.form-cancel-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ===== TABLA DE GESTIÓN ===== */

.classes-table, .users-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.classes-table thead, .users-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.classes-table th, .classes-table td, 
.users-table th, .users-table td {
  padding: 1.25rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.classes-table th, .users-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: none;
}

.classes-table tbody tr, .users-table tbody tr {
  transition: all 0.3s ease;
}

.classes-table tbody tr:hover, .users-table tbody tr:hover {
  background: var(--bg-secondary);
  transform: translateX(4px);
}

.classes-table tbody tr:nth-child(even), .users-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.classes-table td:last-child, .users-table td:last-child {
  text-align: right;
}

/* Botones de acción en tabla (estilo general para admin: Programar Clase, gestión, etc.) */
.action-btn {
  padding: 0.625rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 42px;
  min-height: 38px;
}

.action-btn svg {
  width: 18px;
  height: 18px;
  fill: white !important;
  color: white !important;
  opacity: 1 !important;
}

.edit-btn {
  background: #2563eb !important;
  color: white !important;
  opacity: 1 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.edit-btn:hover {
  background: #1d4ed8 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
}

.delete-btn {
  background: #dc2626 !important;
  color: white !important;
  opacity: 1 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.delete-btn:hover {
  background: #b91c1c !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
}

.actions-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

/* Estilo específico y más pequeño para los botones del listado de Retos Diarios */
.daily-actions-cell {
  gap: 0.75rem;
}

.daily-action-btn {
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.daily-action-btn.daily-edit-btn {
  color: var(--primary-blue);
}

.daily-action-btn.daily-edit-btn:hover {
  background: rgba(37, 99, 235, 0.08);
}

.daily-action-btn.daily-delete-btn {
  color: var(--danger);
}

.daily-action-btn.daily-delete-btn:hover {
  background: rgba(220, 38, 38, 0.08);
}

.view-btn {
  background: var(--info);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.view-btn:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

/* ===== ESTADO DE CARGA ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-blue);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* ===== MENSAJES DE ESTADO ===== */

.success-message {
  background: linear-gradient(135deg, var(--success), var(--success-light));
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.error-message {
  background: linear-gradient(135deg, var(--danger), var(--danger-light));
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.warning-message {
  background: linear-gradient(135deg, var(--warning), var(--warning-light));
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ===== PAGINACIÓN ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.pagination-btn {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.pagination-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== FILTROS Y BÚSQUEDA ===== */
.search-filter-bar {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* ===== RESPONSIVE PARA GESTIÓN ===== */
@media (max-width: 1024px) {
  .gestion-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .form-container {
    order: 1;
  }
  
  .list-container {
    order: 2;
  }
}

@media (max-width: 768px) {
  .gestion-container {
    padding: 1rem;
  }
  
  .form-container, .list-container {
    padding: 1.5rem;
  }
  
  .classes-table, .users-table {
    font-size: 0.9rem;
  }
  
  .classes-table th, .classes-table td,
  .users-table th, .users-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .search-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input, .filter-select {
    min-width: auto;
  }
  
  .action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
}

/* ===== ESTILOS PARA BLOQUES (BloquesView) ===== */

.bloques-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
  animation: fadeIn 0.5s ease-out;
}

.bloques-container h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  color: var(--primary-blue, #2563eb);
  letter-spacing: 1px;
}

.bloques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.bloque-card {
  background: var(--bg-card, #fff);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.08);
  border: 1.5px solid var(--border-color, #e5e7eb);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.bloque-card:hover {
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.15);
  border-color: var(--primary-blue, #2563eb);
}

.bloque-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-primary, #1e293b);
}

.bloque-mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.mini-card {
  background: var(--bg-secondary, #f3f4f6);
  border-radius: 10px;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary, #334155);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.04);
  border: 1px solid var(--border-color, #e5e7eb);
  transition: background 0.2s, box-shadow 0.2s;
}

.mini-card button {
  background: var(--primary-blue, #2563eb);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.35rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.mini-card button:hover {
  background: #1d4ed8;
  transform: translateY(-2px) scale(1.04);
}

/* Modal styles */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 41, 59, 0.25);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  width: 90vw;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.18);
  position: relative;
  animation: scaleIn 0.2s;
}

.modal-content h3 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-blue, #2563eb);
  margin-bottom: 1.5rem;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.modal-body {
  margin-bottom: 1rem;
}

/* Estilos para los botones de acción en el modal */
.modal-actions {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  justify-content: center;
  align-items: center;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.modal-btn-edit {
  background: #3b82f6;
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.modal-btn-edit:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.modal-btn-delete {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.modal-btn-delete:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Mejoras para la tabla de clases */
.tabla-clases-horarios {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  table-layout: fixed;
  border: 1px solid #e2e8f0;
}

.tabla-clases-horarios th {
  background: linear-gradient(135deg, #4285f4, #1a73e8);
  color: white;
  padding: 16px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tabla-clases-horarios th:first-child {
  width: 35%;
}

.tabla-clases-horarios th:nth-child(2) {
  width: 35%;
}

.tabla-clases-horarios th:last-child {
  width: 30%;
  text-align: center;
}

.tabla-clases-horarios td {
  padding: 14px 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  color: #374151;
  word-wrap: break-word;
}

.tabla-clases-horarios tr:nth-child(even) td {
  background: #f8fafc;
}

.tabla-clases-horarios tr:hover td {
  background: #e0f2fe;
}

.tabla-clases-horarios a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #4285f4;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  justify-content: center;
  white-space: nowrap;
}

.tabla-clases-horarios a:hover {
  background: #1a73e8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.tabla-clases-horarios td:last-child {
  text-align: center;
}

.modal-close-x {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close-x:hover {
  background: #f3f4f6;
  color: #374151;
  transform: scale(1.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Sticky Notes Style for BloquesView */
.nivel-titulo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-blue, #2563eb);
  margin-bottom: 1.2rem;
  margin-left: 0.5rem;
}
.sticky-notes-grid {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.sticky-note {
  position: relative;
  width: 210px;
  min-height: 180px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.10), 0 1.5px 8px rgba(0,0,0,0.04);
  padding: 2.2rem 1.2rem 1.2rem 1.2rem;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.18s;
  margin-bottom: 1.5rem;
  border: 1.5px solid #e5e7eb;
  overflow: visible;
}
.sticky-note:hover {
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.18);
  transform: translateY(-4px) scale(1.03);
  border-color: var(--primary-blue, #2563eb);
}
.sticky-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: #22223b;
}
.sticky-desc {
  font-size: 1.01rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}
.pin {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: radial-gradient(circle at 60% 40%, #ffb347 60%, #ff7f50 100%);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  z-index: 2;
  border: 2.5px solid #fff;
}
.sticky-manaña .pin, .sticky-note.sticky-manaña .pin {
  background: radial-gradient(circle at 60% 40%, #ffe066 60%, #f59e42 100%);
}
.sticky-tarde .pin, .sticky-note.sticky-tarde .pin {
  background: radial-gradient(circle at 60% 40%, #a5b4fc 60%, #6366f1 100%);
}
.sticky-noche .pin, .sticky-note.sticky-noche .pin {
  background: radial-gradient(circle at 60% 40%, #e0bbff 60%, #a259e6 100%);
}
.sticky-manaña {
  background: linear-gradient(135deg, #fffbe6 80%, #ffe066 100%);
}
.sticky-tarde {
  background: linear-gradient(135deg, #f3f8ff 80%, #a5b4fc 100%);
}
.sticky-noche {
  background: linear-gradient(135deg, #f8f3ff 80%, #e0bbff 100%);
}

@media (max-width: 900px) {
  .sticky-notes-grid {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ===== NUEVO ESTILO PARA BOTÓN '+ CREAR BLOQUE' ===== */
.crear-bloque-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.crear-bloque-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* ===== ESTILOS PARA EL FORMULARIO DE CREACIÓN DE BLOQUES EN EL MODAL ===== */
.form-crear-bloque {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.form-crear-bloque label {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-crear-bloque input, .form-crear-bloque select {
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  font-size: 14px;
  background: white;
  transition: all 0.2s ease;
}

.form-crear-bloque input:focus, .form-crear-bloque select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-crear-bloque button[type="submit"] {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-crear-bloque button[type="submit"]:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Estilos para selector de profesores */
.profesores-selector {
  margin-top: 8px;
}

.profesor-selector,
.profesores-selector-editar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.checkbox-profesor {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-profesor:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.checkbox-profesor input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.checkbox-profesor span {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.no-profesores-selected {
  color: #ef4444;
  font-size: 12px;
  margin: 8px 0 0 0;
  font-style: italic;
}
/* Modal Backdrop */
.login-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Container */
.login-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  /* Permitir que el contenido interno administre el scroll */
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
  position: relative;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.login-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-button {
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Modal Body */
.login-modal-body {
  padding: 30px;
  /* Habilitar scroll interno cuando el contenido es alto */
  overflow-y: auto;
  max-height: calc(90vh - 85px);
  background: #ffffff;
}

/* Welcome Section */
.login-welcome {
  text-align: center;
  margin-bottom: 30px;
}

.flamingo-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.login-welcome p {
  color: #666;
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Reservar espacio extra para el botón sticky */
  padding-bottom: 80px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.login-input {
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
}

.login-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Error Message */
.error-message {
  background: #fee;
  color: #c53030;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid #fed7d7;
  text-align: center;
}

/* Login Button */
.login-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  /* Mantener visible el botón en pantallas pequeñas */
  position: sticky;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
}

.login-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-button:hover::before {
  left: 100%;
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.login-footer p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.login-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.login-footer a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
  .login-modal {
    width: 95%;
    margin: 20px;
  }
  
  .login-modal-header {
    padding: 20px 25px 15px;
  }
  
  .login-modal-header h2 {
    font-size: 1.3rem;
  }
  
  .login-modal-body {
    padding: 25px 20px;
  }
  
  .flamingo-icon {
    font-size: 2.5rem;
  }
}
.new-password-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f0f0f8 0%, #d4d4f0 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative geometric pattern */
.new-password-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
  animation: float 15s ease-in-out infinite;
}

/* Subtle animated shapes */
.new-password-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.new-password-card {
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 3rem 2.5rem;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.new-password-header {
  text-align: center;
  margin-bottom: 2rem;
}

.lock-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.new-password-header h2 {
  color: #2d3748;
  font-size: 1.8rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.new-password-header p {
  color: #718096;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.new-password-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2d3748;
  font-weight: 600;
  font-size: 0.95rem;
}

.password-input-wrapper {
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
  color: #a0aec0;
}

.password-strength {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #718096;
}

.strength-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-weak {
  width: 33%;
  background: #f56565;
}

.strength-medium {
  width: 66%;
  background: #ed8936;
}

.strength-strong {
  width: 100%;
  background: #48bb78;
}

.status-message {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.status-success {
  background: #f0fdf4;
  color: #166534;
  border: 2px solid #86efac;
}

.status-error {
  background: #fef2f2;
  color: #991b1b;
  border: 2px solid #fecaca;
}

.status-message-icon {
  font-size: 1.5rem;
}

.submit-button {
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-link {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f0f0f0;
}

.back-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link a:hover {
  color: #764ba2;
  gap: 0.75rem;
}

.security-tips {
  background: #f7fafc;
  padding: 1.25rem;
  border-radius: 12px;
  margin-top: 1.5rem;
  border-left: 4px solid #667eea;
}

.security-tips h4 {
  margin: 0 0 0.75rem 0;
  color: #2d3748;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.security-tips ul {
  margin: 0;
  padding-left: 1.25rem;
  list-style: none;
}

.security-tips li {
  color: #4a5568;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.security-tips li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .new-password-card {
    padding: 2rem 1.5rem;
  }

  .new-password-header h2 {
    font-size: 1.5rem;
  }

  .lock-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
}
/* User Info Modal Styles */
.userinfo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
}

.userinfo-modal {
  background: white;
  border-radius: 20px;
  width: 95%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.userinfo-modal-header {
  text-align: center;
  padding: 30px 30px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px 20px 0 0;
}

.userinfo-modal-header h2 {
  margin: 0 0 10px 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.userinfo-modal-header p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 400;
}

.userinfo-modal-content {
  padding: 30px;
}

.userinfo-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 25px;
  background: #fafbfc;
}

.form-section h3 {
  color: #1f2937;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  cursor: pointer;
}

.message {
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  margin: 20px 0;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.form-actions {
  display: flex;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
}

.save-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  min-width: 200px;
}

.save-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.save-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Required field indicator */
.form-group label:has(+ input[required])::after,
.form-group label:has(+ select[required])::after {
  content: " *";
  color: #ef4444;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .userinfo-modal {
    width: 98%;
    margin: 10px;
    max-height: 95vh;
  }
  
  .userinfo-modal-header,
  .userinfo-modal-content {
    padding: 20px;
  }
  
  .form-section {
    padding: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .userinfo-modal-header h2 {
    font-size: 1.5rem;
  }
  
  .userinfo-modal-header p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .userinfo-modal {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    max-height: none;
  }
  
  .userinfo-modal-header {
    border-radius: 0;
  }
  
  .userinfo-modal-content {
    padding: 15px;
  }
  
  .form-section {
    padding: 15px;
  }
  
  .save-btn {
    width: 100%;
    padding: 18px;
  }
}
.theme-toggle-button {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all var(--transition-fast);

}

.theme-toggle-button:hover {
  background-color: var(--bg-card);
  border-color: var(--text-accent);
}

.admin-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.admin-content {
  flex-grow: 1;
  padding: 0.5rem;
  background-color: var(--bg-primary);
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  margin-left: 250px;
  width: calc(100vw - 250px);
  box-sizing: border-box;
}

.sidebar {
  flex-shrink: 0;
  width: 250px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.sidebar-nav li a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav li a:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.sidebar-nav li a.active {
  background-color: var(--primary-blue);
  color: var(--white);
  font-weight: 600;
}
/* Contenedor principal con mejor espaciado y tipografía */
.student-management-container {
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-primary, #f8fafc);
    min-height: 100vh;
}

/* Header Section */
.header-section {
    margin-bottom: 2rem;
}

.header-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Filters Section */
.filters-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select {
    min-width: 150px;
}

.clear-filters-btn {
    padding: 0.75rem 1.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Loading and No Data Messages */
.loading-message,
.no-data-message {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: #64748b;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Tabla con diseño moderno y responsive */
.students-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card, #ffffff);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e5e7eb);
}

/* Encabezados con mejor contraste y tipografía */
.students-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: white;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.students-table th:first-child {
    border-top-left-radius: 16px;
}

.students-table th:last-child {
    border-top-right-radius: 16px;
}

/* Celdas de datos con mejor espaciado */
.students-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    color: var(--text-primary, #1e293b);
    font-size: 0.9rem;
    line-height: 1.5;
    transition: background-color 0.2s ease;
}

.student-name {
    font-weight: 400;
    color: #1e293b;
}

/* Badges */
.bloque-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.nivel-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.especializacion-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #f3e8ff;
    color: #7c3aed;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Actions Cell */
.actions-cell {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    background: transparent;
}

.action-btn:hover {
    transform: scale(1.1);
}

.view-btn:hover {
    background: #dbeafe;
}

.edit-btn:hover {
    background: #fef3c7;
}

.delete-btn:hover {
    background: #fee2e2;
}

/* Efecto hover en filas */
.students-table tbody tr {
    transition: all 0.2s ease;
}

.students-table tbody tr:hover {
    background-color: #f0f4ff;
    transform: none;
}

.students-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

.students-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

/* Estados con mejor diseño y accesibilidad */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.status:hover::before {
    left: 100%;
}

.status.activo {
    background: linear-gradient(135deg, var(--success, #10b981) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.status.activo::after {
    content: '●';
    color: #dcfce7;
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}

.status.inactivo {
    background: linear-gradient(135deg, var(--danger, #ef4444) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.status.inactivo::after {
    content: '●';
    color: #fecaca;
    font-size: 0.5rem;
    opacity: 0.7;
}

/* Barra de progreso mejorada */
.progress-bar-container {
    width: 100%;
    height: 0.75rem;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary-blue, #3b82f6) 0%, 
        #1d4ed8 100%);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease;
    min-width: fit-content;
    padding: 0 0.5rem;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmer 2s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .student-management-container {
        padding: 1rem;
    }
    
    .students-table {
        font-size: 0.8rem;
        border-radius: 12px;
    }
    
    .students-table th,
    .students-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .status {
        padding: 0.375rem 0.625rem;
        font-size: 0.6875rem;
    }
    
    .progress-bar-container {
        height: 0.625rem;
    }
    
    .progress-bar {
        font-size: 0.625rem;
    }
}

@media (max-width: 480px) {
    .students-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-blue, #3b82f6) var(--bg-secondary, #f1f5f9);
    }
    
    .students-table::-webkit-scrollbar {
        height: 8px;
    }
    
    .students-table::-webkit-scrollbar-track {
        background: var(--bg-secondary, #f1f5f9);
        border-radius: 4px;
    }
    
    .students-table::-webkit-scrollbar-thumb {
        background: var(--primary-blue, #3b82f6);
        border-radius: 4px;
    }
}

/* Animaciones */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Estados de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .students-table,
    .students-table tbody tr,
    .status,
    .progress-bar {
        transition: none;
    }
    
    .status::before,
    .progress-bar::before {
        animation: none;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 1; }
    }
}

/* Modales */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #64748b;
}

.detail-value {
    color: #1e293b;
    text-align: right;
}

/* Form Group */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .student-management-container {
        background: var(--bg-primary, #0f172a);
    }
    
    .students-table {
        background: var(--bg-card, #1e293b);
        border-color: var(--border-color, #334155);
    }
    
    .students-table th {
        background: linear-gradient(135deg, 
            var(--bg-secondary, #334155) 0%, 
            var(--bg-tertiary, #475569) 100%);
        color: var(--text-secondary, #cbd5e1);
    }
    
    .students-table td {
        color: var(--text-primary, #f1f5f9);
        border-bottom-color: var(--border-color, #334155);
    }
    
    .students-table tbody tr:hover {
        background-color: var(--bg-hover, #334155);
    }
}/* FORMULARIO DE USUARIOS - OPTIMIZADO PARA REACT Y TEMAS */

/* Variables CSS personalizadas para mejor mantenimiento */
:root {
  /* Espaciado consistente */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 2.5rem;
  --spacing-3xl: 3rem;

  /* Bordes y radios */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;

  /* Transiciones */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* Reset y base */
.gestion-usuarios-container *,
.gestion-usuarios-container *::before,
.gestion-usuarios-container *::after {
  box-sizing: border-box;
}

/* Contenedor principal de la gestión de usuarios */
.gestion-usuarios-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl);
  color: var(--text-primary);
}

.gestion-usuarios-container h2 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.gestion-usuarios-container h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Botón de Agregar Usuario */
.add-user-button {
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-base);
  min-height: 30px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  min-height: 48px; /* Mejor accesibilidad táctil */
  position: relative;
  overflow: hidden;
}

.add-user-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: var(--transition-base);
}

.add-user-button:hover::before {
  opacity: 1;
}

.add-user-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.add-user-button:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

.add-user-button svg {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Contenedor de la tabla de usuarios */
.users-table-container {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-2xl);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  overflow: hidden; /* Mejor manejo del overflow */
}

.users-table-container h3 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.users-table-container h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Wrapper responsivo para la tabla */
.users-table-wrapper {
  overflow-x: auto;
  margin: var(--spacing-lg) calc(-1 * var(--spacing-2xl));
  padding: 0 var(--spacing-2xl);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.users-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.users-table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.users-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.users-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Estilos de la tabla */
.users-table {
  width: 100%;
  min-width: 700px; /* Aumentado para dar más espacio a las acciones */
  border-collapse: collapse;
  border-spacing: 0;
}

.users-table th,
.users-table td {
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.users-table th {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.users-table tbody tr {
  transition: var(--transition-base);
}

.users-table tbody tr:nth-child(even) {
  background-color: var(--bg-secondary);
}

.users-table tbody tr:hover {
  background-color: var(--bg-secondary);
  transform: translateX(2px);
}

.users-table td {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.users-table td:last-child {
  text-align: right;
  white-space: nowrap;
  width: 280px; /* Ancho aumentado para 3 botones */
  min-width: 280px;
}

/* Estilos para el estado Activo/Inactivo */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Estilos para el badge de bloque */
.bloque-badge {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
  display: inline-block;
  min-width: 80px;
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Estilos para el badge de especialización */
.especializacion-badge {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ce93d8;
  display: inline-block;
  min-width: 80px;
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Celda de acciones */
.actions-cell {
  display: flex;
  gap: var(--spacing-xs);
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  padding: var(--spacing-sm);
}

/* Botones de acción */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  min-height: 32px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  line-height: 1.2;
}

.action-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: var(--transition-fast);
}

.action-button:hover::before {
  opacity: 1;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.action-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.action-button svg {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.edit-button {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: white;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.edit-button:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.deactivate-button {
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: white;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.deactivate-button:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.25);
}

.activate-button {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: white;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.activate-button:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.delete-button {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.delete-button:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

/* Contenedor principal del formulario */
.form-usuarios {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-xl);
  box-shadow: 
    0 8px 32px var(--shadow-color),
    0 4px 16px var(--shadow-color),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: 600px;
  width: 100%;
  margin: var(--spacing-xl) auto;
  padding: var(--spacing-3xl) var(--spacing-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-primary);
}

/* Efecto de borde superior */
.form-usuarios::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  background-size: 200% 100%;
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
  animation: shimmer 3s ease-in-out infinite;
}

/* Título del formulario */
.form-usuarios h2 {
  color: var(--text-accent);
  font-size: clamp(2rem, 5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  text-align: center;
  position: relative;
  animation: fadeInDown 0.8s ease-out 0.3s both;
  text-shadow: 0 2px 4px var(--shadow-color);
}

.form-usuarios h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: expandWidth 1s ease-out 0.8s both;
}

/* Contenedor de cada campo del formulario */
.form-field {
  position: relative;
  margin-bottom: var(--spacing-sm);
  animation: fadeInUp 0.6s ease-out var(--delay, 0.5s) both;
}

.form-field:nth-child(3) { --delay: 0.6s; }
.form-field:nth-child(4) { --delay: 0.7s; }
.form-field:nth-child(5) { --delay: 0.8s; }
.form-field:nth-child(6) { --delay: 0.9s; }

/* Labels mejoradas */
.form-usuarios label {
  display: block;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  transition: var(--transition-smooth);
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

/* Inputs mejorados */
.form-usuarios input[type="text"],
.form-usuarios input[type="email"],
.form-usuarios input[type="password"],
.form-usuarios select {
  width: 100%;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  border: 2px solid var(--border-color);
  font-size: 1rem;
  background: var(--bg-secondary);
  transition: var(--transition-smooth);
  outline: none;
  font-family: inherit;
  color: var(--text-primary);
  box-shadow: 0 2px 4px var(--shadow-color);
  min-height: 48px; /* Mejor accesibilidad táctil */
}

/* Placeholder styling */
.form-usuarios input::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
  transition: var(--transition-base);
  opacity: 0.7;
}

/* Estados de focus mejorados */
.form-usuarios input:focus,
.form-usuarios select:focus {
  border-color: var(--text-accent);
  background: var(--bg-card);
  box-shadow: 
    0 0 0 3px rgba(var(--text-accent-rgb, 59, 130, 246), 0.1),
    0 4px 16px var(--shadow-color);
  transform: translateY(-1px);
}

.form-usuarios input:focus::placeholder {
  color: var(--border-color);
  transform: translateX(4px);
  opacity: 0.5;
}

.form-field:focus-within label {
  color: var(--text-accent);
  transform: translateY(-1px);
}

/* Estados de error */
.form-field.error input,
.form-field.error select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-field.error label {
  color: var(--danger);
}

/* Mensaje de error */
.error-message {
  color: var(--white);
  font-size: 0.8rem;
  margin-top: var(--spacing-xs);
  display: block;
  animation: fadeInUp 0.3s ease;
}

/* Contenedor de botones mejorado */
.button-group {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* Botones de formulario mejorados */
.form-usuarios button[type="submit"],
.form-usuarios button[type="button"] {
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md) var(--spacing-2xl);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  animation: fadeInUp 0.6s ease-out 1s both;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: inherit;
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  border: 2px solid transparent;
}

.form-usuarios button[type="submit"] {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 20px var(--shadow-color);
}

.form-usuarios button[type="button"] {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Efectos hover mejorados */
.form-usuarios button[type="submit"]::before,
.form-usuarios button[type="button"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: var(--transition-base);
}

.form-usuarios button:hover::before {
  opacity: 1;
}

.form-usuarios button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--shadow-color);
}

.form-usuarios button[type="button"]:hover {
  background: var(--bg-card);
  border-color: var(--text-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--shadow-color);
}

.form-usuarios button:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

.form-usuarios button:active {
  transform: translateY(0);
  transition: var(--transition-fast);
}

/* Estados de loading */
.form-usuarios button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Animaciones optimizadas */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandWidth {
  from { width: 0; }
  to { width: 80px; }
}

@keyframes shimmer {
  0%, 100% { background-position: -200% 0; }
  50% { background-position: 200% 0; }
}

/* Media queries mejoradas */
@media (max-width: 768px) {
  .gestion-usuarios-container {
    padding: var(--spacing-md);
  }

  .add-user-button {
    width: 100%;
  }

  .users-table-container {
    padding: var(--spacing-lg);
  }

  .users-table-wrapper {
    margin: var(--spacing-md) calc(-1 * var(--spacing-lg));
    padding: 0 var(--spacing-lg);
  }

  .users-table th,
  .users-table td {
    padding: var(--spacing-sm);
    font-size: 0.8rem;
  }

  .action-button {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
    min-width: 36px;
    min-height: 28px;
  }

  .form-usuarios {
    padding: var(--spacing-2xl) var(--spacing-lg);
    margin: var(--spacing-md) auto;
    gap: var(--spacing-md);
    max-width: calc(100vw - 2rem);
  }

  .button-group {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .users-table-container {
    padding: var(--spacing-md);
  }

  .users-table-wrapper {
    margin: var(--spacing-sm) calc(-1 * var(--spacing-md));
    padding: 0 var(--spacing-md);
  }

  .action-button {
    padding: 4px 6px;
    min-width: 60px;
    min-height: 28px;
    font-size: 0.65rem;
    gap: 2px;
  }

  .action-button span {
    display: none; /* Solo mostrar iconos en móviles pequeños */
  }

  .action-button svg {
    font-size: 0.9rem;
  }

  .form-usuarios {
    padding: var(--spacing-xl) var(--spacing-md);
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-sm) auto;
  }

  .form-usuarios input[type="text"],
  .form-usuarios input[type="email"],
  .form-usuarios input[type="password"],
  .form-usuarios select {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }

  .form-usuarios button[type="submit"],
  .form-usuarios button[type="button"] {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.9rem;
  }
}

/* Preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .form-usuarios,
  .form-usuarios *,
  .form-usuarios *::before,
  .form-usuarios *::after,
  .users-table tbody tr,
  .action-button,
  .add-user-button {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
  }
}

@media (prefers-color-scheme: dark) {
  /* Ajustes específicos para tema oscuro si es necesario */
  .users-table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* Utilidades adicionales */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal overlay para cubrir toda la pantalla */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 41, 59, 0.45); /* fondo oscuro con transparencia */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal centrado y por encima de todo */
.modal-content {
  background: var(--bg-card, #fff);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  padding: 2.5rem 2rem;
  max-width: 600px;
  width: 100%;
  z-index: 10000;
  position: relative;
  animation: fadeInDown 0.5s ease;
}.modal-overlay-eliminar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-eliminar {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header-eliminar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid #fee;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.modal-header-eliminar h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.btn-close-eliminar {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-close-eliminar:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-body-eliminar {
  padding: 1.5rem;
}

.estudiante-info-eliminar {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #667eea;
}

.estudiante-info-eliminar p {
  margin: 0.5rem 0;
  color: #333;
}

.warning-box-eliminar {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  color: #856404;
}

.warning-box-eliminar strong {
  display: block;
  margin-bottom: 0.5rem;
}

.form-eliminar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group-eliminar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-eliminar label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.form-group-eliminar input,
.form-group-eliminar select,
.form-group-eliminar textarea {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group-eliminar input:focus,
.form-group-eliminar select:focus,
.form-group-eliminar textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group-eliminar textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row-eliminar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-actions-eliminar {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f0f0f0;
}

.btn-cancelar-eliminar,
.btn-confirmar-eliminar {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancelar-eliminar {
  background: #f0f0f0;
  color: #666;
}

.btn-cancelar-eliminar:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.btn-confirmar-eliminar {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
}

.btn-confirmar-eliminar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .modal-eliminar {
    max-width: 95%;
  }

  .form-row-eliminar {
    grid-template-columns: 1fr;
  }

  .modal-actions-eliminar {
    flex-direction: column-reverse;
  }
}
/* Estilos para el contenedor del formulario */
.form-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Permitir desplazamiento vertical cuando el contenido es largo */
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  /* Limitar altura para que quepa en la ventana y se pueda hacer scroll */
  max-height: calc(100vh - 160px);
  min-height: auto;
  padding: 1rem;
}

.form-container form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-container .form-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
}

.form-container input,
.form-container select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-container .form-select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-container .form-select:hover {
  border-color: #9ca3af;
}

.form-container .form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-container .button-group {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 2rem;
  justify-content: center;
  /* Mantener visibles los botones aunque el usuario haga scroll */
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #ffffff 40%);
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
}

.form-container .button-group button {
  flex: 1;
  max-width: 200px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-container .form-submit-btn {
  background: #007bff;
  color: white;
  border: none;
}

.form-container .form-submit-btn:hover {
  background: #0056b3;
}

.form-container .form-cancel-btn {
  background: #6c757d;
  color: white;
  border: none;
}

.form-container .form-cancel-btn:hover {
  background: #545b62;
}

/* Estilos para la lista de estudiantes mejorada */
.estudiantes-container {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.loading-message, .empty-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.estudiantes-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.estudiante-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 12px;
}

.estudiante-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

.estudiante-card.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.estudiante-checkbox {
  margin-top: 2px;
}

.estudiante-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.estudiante-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.estudiante-nombre {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.2;
}

.estudiante-bloque {
  font-size: 12px;
  font-weight: 500;
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  width: fit-content;
}

.estudiante-email {
  font-size: 11px;
  color: #6b7280;
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
  .estudiantes-grid {
    grid-template-columns: 1fr;
  }
  
  .estudiante-card {
    padding: 12px;
  }
  
  .estudiante-nombre {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .estudiantes-grid {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar personalizado */
.estudiantes-container::-webkit-scrollbar {
  width: 6px;
}

.estudiantes-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.estudiantes-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.estudiantes-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
/* Gestión de Galería */
.gestion-galeria {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Estilos para subida de archivos */
.content-input-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.input-option {
  display: flex;
  align-items: center;
}

.input-option label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  color: #4a5568;
}

.input-option input[type="radio"] {
  margin: 0;
}

.file-upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  background: #f7fafc;
  transition: all 0.3s ease;
}

.file-upload-area:hover {
  border-color: #667eea;
  background: #edf2f7;
}

.file-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.file-upload-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #718096;
  font-style: italic;
}

.galeria-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #e2e8f0;
}

.galeria-header h1 {
  color: #1a202c;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.header-description {
  color: #718096;
  font-size: 1.1rem;
  margin: 0 0 2rem 0;
}

.btn-agregar {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-agregar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #f7fafc;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  margin: 0;
  color: #2d3748;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #718096;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #f7fafc;
  color: #2d3748;
}

/* Formulario */
.galeria-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* Estadísticas */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid #e2e8f0;
}

.stat-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #667eea;
  margin: 0 0 0.5rem 0;
}

.stat-card p {
  color: #718096;
  margin: 0;
  font-weight: 500;
}

/* Grid de medios */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.media-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.media-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-preview {
  position: relative;
  width: 100%;
  height: 100%;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.media-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.media-info {
  padding: 1.5rem;
}

.media-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.media-description {
  color: #718096;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #a0aec0;
  margin-bottom: 1rem;
}

.media-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-edit {
  background: #48bb78;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s ease;
  flex: 1;
}

.btn-edit:hover {
  background: #38a169;
}

.btn-delete {
  background: #f56565;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s ease;
  flex: 1;
}

.btn-delete:hover {
  background: #e53e3e;
}

/* Estado vacío */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #718096;
}

.empty-state h3 {
  color: #4a5568;
  margin-bottom: 1rem;
}

.empty-state p {
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .gestion-galeria {
    padding: 1rem;
  }
  
  .galeria-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .media-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-overlay {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: 95vh;
  }
  
  .modal-header,
  .galeria-form {
    padding: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .media-actions {
    flex-direction: column;
  }
  
  .btn-edit,
  .btn-delete {
    flex: none;
  }
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.close-button:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.edit-plan-form {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
}

.caracteristicas-input {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.caracteristicas-input input {
  flex: 1;
}

.add-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.add-btn:hover {
  background-color: #059669;
}

.caracteristicas-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.caracteristica-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background-color: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.caracteristica-item span {
  color: #374151;
  font-size: 0.9rem;
}

.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.remove-btn:hover {
  background-color: #fee2e2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.cancel-btn {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background-color: #e5e7eb;
}

.save-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.save-btn:hover {
  background-color: #2563eb;
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .caracteristicas-input {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column;
  }
}
/* ===== PLANES Y PRECIOS STYLES ===== */

.planes-precios-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
}

.planes-header {
  text-align: center;
  margin-bottom: 3rem;
}

.planes-header h2 {
  font-size: 2.5rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.planes-header p {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== SECCIONES ===== */

.planes-section,
.especializaciones-section,
.resumen-section {
  margin-bottom: 4rem;
}

.planes-section h3,
.especializaciones-section h3,
.resumen-section h3 {
  font-size: 1.8rem;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.planes-section h3::before {
  content: '';
  width: 4px;
  height: 30px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  margin-right: 0.75rem;
}

.especializaciones-section h3::before {
  content: '';
  width: 4px;
  height: 30px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 2px;
  margin-right: 0.75rem;
}

.resumen-section h3::before {
  content: '';
  width: 4px;
  height: 30px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 2px;
  margin-right: 0.75rem;
}

/* ===== GRID DE PLANES ===== */

.planes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.plan-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--plan-color, #3b82f6);
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--plan-color, #3b82f6);
}

.plan-card.inactive {
  opacity: 0.6;
  background: #f8f9fa;
}

/* ===== HEADER DEL PLAN ===== */

.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.plan-icon {
  font-size: 3rem;
  margin-right: 1rem;
}

.plan-info {
  flex: 1;
  min-width: 150px;
}

.plan-info h4 {
  font-size: 1.5rem;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.plan-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-badge.basico {
  background: #dcfce7;
  color: #166534;
}

.plan-badge.especializado {
  background: #dbeafe;
  color: #1e40af;
}

.plan-badge.premium {
  background: #f3e8ff;
  color: #7c3aed;
}

.plan-price {
  text-align: right;
  color: var(--plan-color, #3b82f6);
}

.plan-price .currency {
  font-size: 1.2rem;
  font-weight: 600;
  vertical-align: top;
}

.plan-price .amount {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.plan-price .period {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
}

/* ===== CONTENIDO DEL PLAN ===== */

.plan-content {
  margin-bottom: 2rem;
}

.plan-description {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.plan-features h5 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.plan-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-features li {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  color: #374151;
  font-size: 0.95rem;
}

.check-icon {
  color: var(--plan-color, #10b981);
  font-weight: bold;
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.plan-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e5e7eb;
}

.stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value-large {
  font-size: 3rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.stat-unit {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
}

.stat-badge {
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.stat-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.stat-badge.inactive {
  background: #fee2e2;
  color: #991b1b;
}

/* ===== ACCIONES DEL PLAN ===== */

.plan-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-edit-plan,
.btn-toggle-plan {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.btn-edit-plan {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: white;
}

.btn-edit-plan:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-2px);
}

.btn-toggle-plan.activate {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: white;
}

.btn-toggle-plan.deactivate {
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: white;
}

.btn-toggle-plan:hover {
  transform: translateY(-2px);
}

/* ===== ESPECIALIZACIONES ===== */

.especializaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.especializacion-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.especializacion-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.esp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.esp-header h4 {
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

.esp-price {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.esp-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.esp-duration {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.esp-calculation h5 {
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.calculation {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-weight: 600;
}

.calculation .plus,
.calculation .equals {
  color: #64748b;
  font-weight: 400;
}

.calculation .total {
  color: #10b981;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ===== RESUMEN ===== */

.resumen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.resumen-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.resumen-card h4 {
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resumen-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resumen-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.resumen-item:last-child {
  border-bottom: none;
}

.resumen-item span:first-child {
  color: #64748b;
  font-size: 0.95rem;
}

.resumen-item .price {
  color: #10b981;
  font-weight: 700;
  font-size: 1.1rem;
}

.resumen-item .count {
  background: #3b82f6;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .planes-precios-container {
    padding: 1rem;
  }
  
  .planes-grid {
    grid-template-columns: 1fr;
  }
  
  .plan-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .plan-price {
    text-align: left;
  }
  
  .plan-actions {
    flex-direction: column;
  }
  
  .especializaciones-grid {
    grid-template-columns: 1fr;
  }
  
  .resumen-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== REGISTRO DE VENTAS STYLES ===== */

.registro-ventas-container {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
}

.ventas-header {
  text-align: center;
  margin-bottom: 3rem;
}

.ventas-header h2 {
  font-size: 2.5rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.ventas-header p {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== ESTADÍSTICAS RÁPIDAS ===== */

.estadisticas-rapidas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card.ingresos .stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.stat-card.ventas .stat-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-card.pendientes .stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-card.conversion .stat-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-info h3 {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
  line-height: 1;
}

.stat-info p {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
  font-weight: 500;
}

/* ===== FILTROS ===== */

.filtros-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  align-items: end;
}

.filtro-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filtro-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.filtro-group select,
.filtro-group input {
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
}

.filtro-group select:focus,
.filtro-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filtro-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-nueva-venta,
.btn-exportar {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-nueva-venta {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.btn-nueva-venta:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-exportar {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.btn-exportar:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* ===== TABLA DE VENTAS ===== */

.ventas-table-section {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.table-container {
  overflow-x: auto;
}

.ventas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ventas-table thead {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: white;
}

.ventas-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ventas-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.venta-row {
  transition: all 0.3s ease;
}

.venta-row:hover {
  background: #f8fafc;
}

.venta-row.pagado {
  border-left: 4px solid #10b981;
}

.venta-row.pendiente {
  border-left: 4px solid #f59e0b;
}

.venta-row.cancelado {
  border-left: 4px solid #ef4444;
}

.venta-row.reembolsado {
  border-left: 4px solid #8b5cf6;
}

/* ===== CELDAS ESPECÍFICAS ===== */

.venta-id {
  font-weight: 700;
  color: #3b82f6;
  font-size: 0.9rem;
}

.cliente-info {
  min-width: 180px;
}

.cliente-nombre {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.cliente-email {
  color: #64748b;
  font-size: 0.85rem;
}

.plan-info {
  min-width: 150px;
}

.plan-nombre {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.plan-tipo {
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-tipo.basico {
  background: #dcfce7;
  color: #166534;
}

.plan-tipo.especializado {
  background: #dbeafe;
  color: #1e40af;
}

.plan-tipo.premium {
  background: #f3e8ff;
  color: #7c3aed;
}

.especializacion {
  min-width: 140px;
}

.esp-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

.no-esp {
  color: #94a3b8;
  font-style: italic;
}

.precio-total {
  text-align: right;
  min-width: 100px;
}

.precio {
  font-size: 1.1rem;
  font-weight: 700;
  color: #10b981;
}

.dias-restantes {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.metodo-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.metodo-badge.efectivo {
  background: #fef3c7;
  color: #92400e;
}

.metodo-badge.tarjeta {
  background: #dbeafe;
  color: #1e40af;
}

.metodo-badge.transferencia {
  background: #d1fae5;
  color: #065f46;
}

.metodo-badge.paypal {
  background: #e0e7ff;
  color: #3730a3;
}

.estado-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.fecha-venta {
  min-width: 140px;
  font-size: 0.85rem;
}

.fecha-pago {
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.vendedor {
  color: #64748b;
  font-size: 0.85rem;
}

/* ===== ACCIONES ===== */

.acciones {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-ver,
.btn-editar,
.btn-marcar-pagado {
  padding: 0.4rem 0.6rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  background: #f1f5f9;
  color: #64748b;
}

.btn-ver:hover {
  background: #3b82f6;
  color: white;
  transform: scale(1.1);
}

.btn-editar:hover {
  background: #f59e0b;
  color: white;
  transform: scale(1.1);
}

.btn-marcar-pagado:hover {
  background: #10b981;
  color: white;
  transform: scale(1.1);
}

/* ===== ESTADO VACÍO ===== */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

.empty-state p {
  font-size: 1rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
  .ventas-table {
    font-size: 0.8rem;
  }
  
  .ventas-table th,
  .ventas-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .registro-ventas-container {
    padding: 1rem;
  }
  
  .estadisticas-rapidas {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1.5rem;
  }
  
  .filtros-grid {
    grid-template-columns: 1fr;
  }
  
  .filtro-actions {
    justify-content: center;
  }
  
  .table-container {
    overflow-x: scroll;
  }
  
  .ventas-table {
    min-width: 800px;
  }
}

/* ===== PAGE HEADER WITH PDF BUTTON ===== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.page-header h2 {
  font-size: 2rem;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.page-header p {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

.btn-generar-pdf {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-generar-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-generar-pdf:active {
  transform: translateY(0);
}
.gestion-suscripciones-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.page-header p {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

.btn-asignar-principal {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-asignar-principal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.loading-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.retry-button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 16px;
}

.retry-button:hover {
  background-color: #2563eb;
}

/* Estadísticas */
.stats-section {
  margin-bottom: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card.warning {
  border-left-color: #f59e0b;
}

.stat-card.danger {
  border-left-color: #ef4444;
}

.stat-card.success {
  border-left-color: #10b981;
}

.stat-icon {
  font-size: 2rem;
}

.stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #1f2937;
}

.stat-content p {
  color: #6b7280;
  margin: 0;
  font-size: 0.9rem;
}

/* Secciones */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
}

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.count {
  background-color: #f3f4f6;
  color: #374151;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 2px dashed #d1d5db;
}

/* Usuarios sin plan */
.usuarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.usuario-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usuario-info h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.usuario-info p {
  margin: 0 0 8px 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.fecha-registro {
  font-size: 0.75rem;
  color: #9ca3af;
}

.btn-asignar {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn-asignar:hover {
  background-color: #2563eb;
}

/* Tablas */
.planes-vencer-table, .suscripciones-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.planes-vencer-table table, .suscripciones-table table {
  width: 100%;
  border-collapse: collapse;
}

.planes-vencer-table th, .suscripciones-table th {
  background-color: #f9fafb;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.planes-vencer-table td, .suscripciones-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.planes-vencer-table tr.urgente {
  background-color: #fef2f2;
}

.planes-vencer-table tr.warning {
  background-color: #fffbeb;
}

.usuario-cell strong {
  color: #1f2937;
}

.dias-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.dias-badge.critico {
  background-color: #fee2e2;
  color: #dc2626;
}

.dias-badge.warning {
  background-color: #fef3c7;
  color: #d97706;
}

.acciones-cell {
  display: flex;
  gap: 8px;
}

.btn-recordatorio, .btn-renovar {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
}

.btn-recordatorio {
  background-color: #f59e0b;
  color: white;
}

.btn-recordatorio:hover {
  background-color: #d97706;
}

.btn-renovar {
  background-color: #10b981;
  color: white;
}

.btn-renovar:hover {
  background-color: #059669;
}

.estado-activo {
  background-color: #d1fae5;
  color: #065f46;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 8px;
  border-radius: 6px;
}

.close-button:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 24px;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
}

.btn-cancel {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.btn-cancel:hover {
  background-color: #e5e7eb;
}

.btn-confirm {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.btn-confirm:hover {
  background-color: #2563eb;
}

.btn-confirm:disabled {
  background-color: #d1d5db;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .gestion-suscripciones-container {
    padding: 16px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .usuarios-grid {
    grid-template-columns: 1fr;
  }
  
  .usuario-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .acciones-cell {
    flex-direction: column;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

/* Modal Estudiantes */
.modal-estudiantes {
  max-width: 600px;
  max-height: 80vh;
}

.estudiantes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
}

.estudiante-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.estudiante-item:hover {
  background: #f3f4f6;
  border-color: #3b82f6;
  transform: translateX(4px);
}

.estudiante-item .estudiante-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: #1f2937;
}

.estudiante-item .estudiante-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.btn-select {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-select:hover {
  background: #2563eb;
  transform: scale(1.05);
}

/* Botón Volver */
.btn-volver {
  background: #6b7280;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-volver:hover {
  background: #4b5563;
  transform: translateX(-2px);
}

/* Tabla de Estudiantes */
.tabla-estudiantes-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tabla-estudiantes {
  width: 100%;
  border-collapse: collapse;
}

.tabla-estudiantes thead {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.tabla-estudiantes th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 2px solid #e5e7eb;
}

.tabla-estudiantes tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.3s ease;
}

.tabla-estudiantes tbody tr:hover {
  background: #f9fafb;
  transform: scale(1.01);
}

.tabla-estudiantes td {
  padding: 16px;
  color: #4b5563;
}

.estudiante-nombre {
  font-weight: 600;
  color: #1f2937;
}

.btn-seleccionar-estudiante {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-seleccionar-estudiante:hover {
  background: #2563eb;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Formulario Asignar Plan */
.formulario-asignar-plan {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-select,
.form-input,
.form-textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  resize: vertical;
  font-family: inherit;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 30px;
}

.btn-cancelar,
.btn-confirmar {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancelar {
  background: #e5e7eb;
  color: #4b5563;
}

.btn-cancelar:hover {
  background: #d1d5db;
}

.btn-confirmar {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-confirmar:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-confirmar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== BOTÓN CANCELAR PLAN ===== */

.btn-cancelar-plan {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-cancelar-plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-cancelar-plan:active {
  transform: translateY(0);
}

/* ===== BADGES DE ESTADO ===== */

.estado-badge {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.estado-activo {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.estado-por-vencer {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.estado-cancelado {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.estado-vencido {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}
.registros-eliminacion-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.registros-header {
  margin-bottom: 2rem;
}

.registros-header h1 {
  margin: 0 0 0.5rem 0;
  color: #2d3748;
  font-size: 2rem;
}

.registros-header p {
  margin: 0;
  color: #718096;
  font-size: 1.1rem;
}

/* Estadísticas */
.estadisticas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-content h3 {
  margin: 0;
  font-size: 1.8rem;
  color: #2d3748;
  font-weight: 700;
}

.stat-content p {
  margin: 0.25rem 0 0 0;
  color: #718096;
  font-size: 0.9rem;
}

/* Filtros */
.filtros-registros {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filtro-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filtro-group label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95rem;
}

.filtro-group input,
.filtro-group select {
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.filtro-group input:focus,
.filtro-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tabla de registros */
.registros-table-container {
  margin-top: 1.5rem;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.registros-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.registros-table thead tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.registros-table th {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
}

.registros-table th:first-child {
  border-top-left-radius: 12px;
}

.registros-table th:last-child {
  border-top-right-radius: 12px;
}

.registros-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.registros-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #e2e8f0;
}

.registros-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.registros-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

.btn-detalle-registro {
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-detalle-registro:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

/* Paginación */
.paginacion-registros {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.paginacion-info {
  font-size: 0.85rem;
  color: #718096;
}

.paginacion-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.paginacion-botones button {
  min-width: 34px;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: white;
  font-size: 0.8rem;
  cursor: pointer;
  color: #4a5568;
  transition: all 0.2s ease;
}

.paginacion-botones button:hover:not(:disabled) {
  background: #edf2ff;
  border-color: #667eea;
  color: #3730a3;
}

.paginacion-botones button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.paginacion-botones .pagina-activa {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Lista de registros */
.registros-lista {
  display: grid;
  gap: 1rem;
}

.registro-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.registro-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.registro-header-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.registro-info h3 {
  margin: 0 0 0.25rem 0;
  color: #2d3748;
  font-size: 1.2rem;
}

.registro-email {
  margin: 0;
  color: #718096;
  font-size: 0.9rem;
}

.razon-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.razon-termino_clases {
  background: #d4edda;
  color: #155724;
}

.razon-no_pago {
  background: #f8d7da;
  color: #721c24;
}

.razon-abandono {
  background: #fff3cd;
  color: #856404;
}

.razon-solicitud_propia {
  background: #d1ecf1;
  color: #0c5460;
}

.razon-comportamiento {
  background: #f5c6cb;
  color: #721c24;
}

.razon-cambio_horario {
  background: #e2e3e5;
  color: #383d41;
}

.razon-otro {
  background: #e7e8ea;
  color: #495057;
}

.registro-detalles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.detalle-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detalle-label {
  font-size: 0.85rem;
  color: #718096;
  font-weight: 600;
}

.detalle-value {
  font-size: 0.95rem;
  color: #2d3748;
}

.detalle-value.deuda {
  color: #e53e3e;
  font-weight: 600;
}

/* Modal de detalles */
.modal-overlay-detalle {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-detalle {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header-detalle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.modal-header-detalle h2 {
  margin: 0;
  font-size: 1.5rem;
}

.btn-close-detalle {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-close-detalle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-body-detalle {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.seccion-detalle {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.seccion-detalle h3 {
  margin: 0 0 1rem 0;
  color: #2d3748;
  font-size: 1.1rem;
}

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

.info-grid div {
  color: #4a5568;
}

.info-grid strong {
  color: #2d3748;
  display: block;
  margin-bottom: 0.25rem;
}

.razon-badge-large {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.descripcion-adicional,
.notas-admin {
  margin: 0.5rem 0 0 0;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  color: #4a5568;
  line-height: 1.6;
}

.deuda {
  color: #e53e3e;
  font-weight: 600;
}

/* Loading */
.loading-registros {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  gap: 1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.no-registros {
  text-align: center;
  padding: 4rem;
  color: #718096;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .registros-eliminacion-container {
    padding: 1rem;
  }

  .estadisticas-grid {
    grid-template-columns: 1fr;
  }

  .filtros-registros {
    grid-template-columns: 1fr;
  }

  .registro-header-card {
    flex-direction: column;
    gap: 1rem;
  }

  .registro-detalles {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
