html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

h1,
h2,
h3 {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 14px;
}

.btn {
  border-radius: 10px;
}

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

.flash {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.form-control {
  border-radius: 10px;
}

.toast {
  border-radius: 12px;
}

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

small {
  color: #6b7280;
}

.backend-body {
  background: #eef2ff;
}

.app-main {
  background: #f4f6f9;
}

.backend-content {
  display: grid;
  gap: 16px;
  padding-bottom: 16px;
}

.backend-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.backend-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: all 0.3s ease-out;
}

.backend-card[style*="display: none"] {
  opacity: 0;
  pointer-events: none;
}

.backend-card:not([style*="display: none"]) {
  animation: slideInUp 0.3s ease-out;
}

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

.backend-card h3 {
  margin-bottom: 8px;
}

.backend-card p {
  margin: 0 0 12px;
  color: #475569;
}

/* Table improvements */
#examTable tbody tr {
  transition: background-color 0.2s ease;
}

#examTable tbody tr:hover {
  background-color: #f8f9fa;
}

/* Button group improvements */
.btn-group-sm .btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.btn-group-sm .btn i {
  margin-right: 0;
}

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

.stat-card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 14px;
}

.stat-card strong {
  font-size: 24px;
  display: block;
  color: #1e3a8a;
}

.app-sidebar .nav-link.active {
  background-color: #0d6efd;
  color: #ffffff;
}

.app-sidebar .nav-link.active .nav-icon {
  color: #ffffff;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .app-content-header h3 {
    font-size: 20px;
  }
}

.student-dashboard {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 100%);
}

.student-container {
  max-width: 1120px;
}

.student-hero {
  background: linear-gradient(135deg, #0d6efd 0%, #4f46e5 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 20px 35px rgba(37, 99, 235, 0.28);
}

.student-hero h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.student-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
}

.student-logout {
  color: #0d47a1;
  border-radius: 10px;
  border: none;
}

.student-profile-card,
.student-page-card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.student-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.student-profile-grid small {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.student-profile-grid p {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}

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

.student-module-card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.student-module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(13, 110, 253, 0.15);
  border-color: #93c5fd;
}

.student-module-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  font-size: 20px;
  margin-bottom: 10px;
}

.student-module-card h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.student-module-card p {
  color: #475569;
  margin-bottom: 14px;
}

.student-module-card span {
  color: #1d4ed8;
  font-weight: 600;
}

.exam-thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dbeafe;
  background: #f8fafc;
}

.exam-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.student-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.student-page-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.student-page-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
}

.student-page-item h4 {
  margin: 0 0 4px;
  font-size: 17px;
}

.student-page-item p {
  margin: 0;
  color: #475569;
}

@media (max-width: 768px) {
  .student-hero {
    padding: 20px;
  }

  .student-logout {
    width: 100%;
  }
}

.exam-timer {
  min-width: 88px;
  text-align: center;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  background: #ffffff;
}

.exam-timer-alert {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

.exam-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.exam-option-btn {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exam-option-kahoot {
  min-height: 84px;
  border-width: 2px;
}

.exam-option-text {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.exam-option-btn.is-selected {
  border-color: #ef4444;
  background: #fee2e2;
}

.exam-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fbbf24;
  color: #111827;
  font-weight: 700;
}

.exam-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.exam-header-left {
  flex: 1;
  min-width: 200px;
}

.exam-header-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

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

.exam-pdf-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #1e293b;
  flex: 1;
}

.exam-container {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#examTextRoot {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#examPdfRoot {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.exam-text-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  width: 100%;
}

/* Footer for text-mode submit button */
.exam-text-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  padding: 14px 12px;
  border-top: 1px solid #e6eef8;
  box-shadow: 0 -6px 18px rgba(15,23,42,0.06);
  z-index: 1200;
}

/* Prevent content from being hidden behind the fixed footer */
.exam-text-shell { padding-bottom: 120px; }

body.exam-text-mode .exam-container {
  overflow-y: auto;
}

.exam-pdf-layout {
  display: grid;
  grid-template-columns: 70% 30%;
  width: 100%;
  height: 100%;
  gap: 0;
  position: relative;
}

.exam-pdf-viewer {
  background: #f8fafc;
  overflow: hidden;
  height: 100%;
  width: 100%;
  display: flex;
}

.exam-pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.exam-pdf-panel {
  border-left: 1px solid #e2e8f0;
  padding: 1.5rem;
  background: #fff;
  overflow-y: auto;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.pdf-question-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
}

.pdf-question-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.pdf-question-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 8px;
  font-weight: 700;
  color: #334155;
  min-height: 34px;
}

.pdf-question-chip.is-active {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.pdf-question-chip.is-answered {
  border-color: #16a34a;
}

.pdf-question-item h4 {
  font-size: 13px;
  margin: 0 0 8px;
}

.pdf-option-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pdf-option-circle {
  border: 1px solid #f59e0b;
  background: #fbbf24;
  color: #111827;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-weight: 700;
  margin: 0 auto;
}

.pdf-option-circle.is-selected {
  background: #ef4444;
  border-color: #dc2626;
  color: #fff;
}

.exam-text-progress {
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
}

.exam-text-progress .progress-bar {
  font-weight: 700;
}

.exam-text-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  font-weight: 700;
  color: #334155;
}

.exam-text-counter {
  font-size: 0.95rem;
  color: #2563eb;
}

.exam-text-question-card {
  border-width: 2px;
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.exam-text-question-card p {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  line-height: 1.5;
  color: #0f172a;
  font-weight: 600;
}

.exam-text-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.exam-text-mode .student-container {
  max-width: 1280px;
}

body.exam-text-mode .student-page-card {
  border: 1px solid #bfdbfe;
  box-shadow: 0 22px 44px rgba(30, 64, 175, 0.12);
}

/* Modo PDF: ocultar mensaje cuando está activo */
body.exam-pdf-mode #examMessage {
  display: none !important;
}

/* Modo PDF: header compacto */
body.exam-pdf-mode .exam-header {
  padding: 0.5rem 1rem;
}

body.exam-pdf-mode .exam-container {
  height: calc(100vh - 55px);
}

/* Fullscreen: ocultar header completamente */
body.exam-pdf-mode:fullscreen .exam-header,
body.exam-pdf-mode:-webkit-full-screen .exam-header,
body.exam-pdf-mode:-moz-full-screen .exam-header {
  display: none;
}

body.exam-pdf-mode:fullscreen .exam-container,
body.exam-pdf-mode:-webkit-full-screen .exam-container,
body.exam-pdf-mode:-moz-full-screen .exam-container {
  height: 100vh;
}

@media (max-width: 992px) {
  .exam-pdf-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 50vh 1fr;
  }

  .exam-text-options {
    grid-template-columns: 1fr;
  }

  .exam-text-meta {
    flex-direction: column;
    gap: 4px;
  }

  .exam-pdf-viewer,
  .exam-pdf-viewer iframe {
    height: 50vh;
  }
  
  .exam-pdf-panel {
    height: auto;
    max-height: 50vh;
  }
}

@media (min-width: 1400px) {
  .exam-pdf-layout {
    grid-template-columns: 75% 25%;
  }
}

/* Modern Dashboard Enhancements */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Smooth transitions for interactive elements */
a[style*="background: linear-gradient"],
div[style*="background: linear-gradient"] {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive improvements for dashboard cards */
@media (max-width: 768px) {
  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
  
  .student-hero {
    flex-direction: column !important;
  }
}
/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.login-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  max-width: 100%;
}

/* Decorative background shapes */
.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.login-bg-shape {
  width: 300px;
  height: 300px;
  top: -50px;
  right: -50px;
  background: rgba(255, 255, 255, 0.5);
}

.login-bg-shape-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
  background: rgba(255, 255, 255, 0.3);
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(30px) translateX(20px);
  }
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 50px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.6s ease-out;
}

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

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

.login-logo {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* Form styling */
.form-group {
  margin-bottom: 20px;
}

.form-group .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group .form-label i {
  font-size: 14px;
  color: #667eea;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: #f9fafb;
  color: #1f2937;
}

.login-input::placeholder {
  color: #9ca3af;
}

.login-input:focus {
  outline: none;
  border-color: #667eea;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.login-input:hover:not(:focus) {
  border-color: #d1d5db;
  background-color: #f3f4f6;
}

/* Button styling */
.btn-login {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 48px;
}

.btn-login::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 ease;
}

.btn-login:hover:not(:disabled)::before {
  left: 100%;
}

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

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

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  position: relative;
  z-index: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer styling */
.login-footer {
  margin-top: 30px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}

/* Info Box Styles for Admin Module */
.info-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.info-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  min-width: 80px;
  height: 80px;
  font-size: 2rem;
  color: white;
}

.info-box-icon.bg-info {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.info-box-icon.bg-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.info-box-icon.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.info-box-icon.bg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.info-box-content {
  flex: 1;
  padding: 20px;
}

.info-box-text {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.info-box-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1f2937;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 30px 20px;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .login-logo {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
  
  .login-bg-shape {
    width: 200px;
    height: 200px;
  }
  
  .login-bg-shape-2 {
    width: 250px;
    height: 250px;
  }
}

/* ===== Estilos mejorados para el Generador de Prompts ===== */

/* Campos de formulario mejorados */
.form-control-lg,
.form-select-lg {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.form-control-lg:focus,
.form-select-lg:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Contenedores de competencias, capacidades y transversales */
.competencias-container,
.capacidades-container,
.transversales-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

/* Checkboxes de competencias mejorados */
.form-check-competencia {
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.form-check-competencia:hover {
  background: #f8f9fa;
  border-color: #0d6efd;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.form-check-competencia .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.form-check-competencia .form-check-input:checked + .form-check-label {
  font-weight: 600;
  color: #0c5de4;
}

/* Grupos de competencias en capacidades */
.competencia-group {
  margin-top: 1.5rem;
  padding: 0;
  border: none;
}

.competencia-group:first-child {
  margin-top: 0;
}

.competencia-group strong {
  display: block;
  margin-bottom: 0.75rem;
  color: #0d6efd;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contenedor de capacidades sub (checkboxes de una competencia) */
.capacidades-sub-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 3px solid #0d6efd;
  padding-bottom: 0.5rem;
}

/* Checkboxes de capacidades mejorados */
.form-check-capacidad {
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
  margin-bottom: 0;
  transition: all 0.2s ease;
}

.form-check-capacidad:hover {
  background: #f8f9fa;
  border-color: #0d6efd;
  box-shadow: 0 1px 4px rgba(13, 110, 253, 0.1);
}

/* Grupos de enfoques transversales */
.enfoque-group {
  margin-top: 1.5rem;
  padding: 0;
  border: none;
}

.enfoque-group:first-child {
  margin-top: 0;
}

.enfoque-group strong {
  display: block;
  margin-bottom: 0.75rem;
  color: #198754;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contenedor de enfoques transversales sub */
.enfoques-sub-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 3px solid #198754;
  padding-bottom: 0.5rem;
}

/* Checkboxes de enfoques mejorados */
.form-check-enfoque {
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
  margin-bottom: 0;
  transition: all 0.2s ease;
}

.form-check-enfoque:hover {
  background: #f8f9fa;
  border-color: #198754;
  box-shadow: 0 1px 4px rgba(25, 135, 84, 0.1);
}

/* Checkboxes regulares mejorados */
.form-check {
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

.form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.125em;
  cursor: pointer;
  border: 1px solid #dee2e6;
  border-radius: 0.25em;
  transition: all 0.2s ease;
}

.form-check-input:hover:not(:disabled) {
  border-color: #0d6efd;
}

.form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1);
}

.form-check-label {
  margin-bottom: 0;
  margin-left: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  color: #374151;
  transition: color 0.2s ease;
}

.form-check-label:hover {
  color: #1f2937;
}

/* Secciones del formulario */
#genForm > .col-12:not(:first-child) {
  border-top: 0;
}

#genForm h5 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#genForm h5 i {
  font-size: 1.1rem;
  color: #6366f1;
}

.form-label.fw-500 {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

/* Textarea mejorado */
textarea.form-control {
  resize: vertical;
  font-family: "Inter", "Segoe UI", monospace;
  font-size: 0.95rem;
}

textarea.form-control::placeholder {
  color: #9ca3af;
}

/* Botones mejorados */
.btn {
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1.0rem;
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0b5ed7;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-success {
  background-color: #198754;
  border-color: #198754;
}

.btn-success:hover {
  background-color: #157347;
  border-color: #157347;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

/* resultado de prompt */
#promptResult {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
}

/* hr mejorado */
hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

/* Responsive: asegurar que los contenedores se adapten bien en móvil */
@media (max-width: 768px) {
  .competencias-container,
  .capacidades-container,
  .transversales-container {
    grid-template-columns: 1fr;
  }
  
  .form-control-lg,
  .form-select-lg {
    font-size: 1rem;
  }
  
  .btn-lg {
    width: 100%;
  }
  
  #genForm > .col-12 {
    margin-bottom: 1rem;
  }
}