/* assets/css/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary-orange: #F39200;
  --primary-orange-hover: #D88100;
  --primary-orange-light: rgba(243, 146, 0, 0.1);
  --bg-white: #FFFFFF;
  --bg-gray-light: #F4F4F4;
  --bg-gray-border: #E5E5E5;
  --text-dark: #1A1A1B;
  --text-gray: #666666;
  --text-gray-light: #999999;
  
  --font-base: 'Outfit', sans-serif;
  --shadow-subtle: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 10px 20px rgba(0, 0, 0, 0.08);
  --shadow-orange: 0 10px 25px rgba(243, 146, 0, 0.2);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-gray-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Layout General */
header {
  background-color: var(--bg-white);
  border-bottom: 2px solid var(--bg-gray-border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-subtle);
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.campaign-tag {
  background-color: var(--primary-orange-light);
  color: var(--primary-orange);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid rgba(243, 146, 0, 0.2);
  transition: var(--transition-smooth);
}

.campaign-tag[onclick] {
  cursor: pointer;
}

.campaign-tag[onclick]:hover {
  background-color: var(--primary-orange);
  color: var(--bg-white);
  box-shadow: 0 4px 12px rgba(243, 146, 0, 0.25);
  transform: translateY(-1px);
  border-color: var(--primary-orange);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hidden {
  display: none !important;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Pantalla 1: Landing Page */
.hero-section {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease-out;
}

.hero-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-section p {
  font-size: 1.15rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

.estamentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: stretch; /* Estira todas las tarjetas para medir lo mismo en la fila */
}

.estamento-card {
  background-color: var(--bg-white);
  border: 1px solid var(--bg-gray-border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  text-align: left;
  height: 420px; /* Alto estricto y unificado para todas las tarjetas */
}

.estamento-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-orange);
  box-shadow: var(--shadow-medium);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 155px; /* Ajuste milimétrico de la cabecera */
  overflow: hidden;
  background-color: var(--bg-gray-light);
  flex-shrink: 0; /* Evita que la imagen cambie de tamaño */
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.estamento-card:hover .card-image-wrapper img {
  transform: scale(1.06);
}

.card-badge-modality {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background-color: rgba(26, 26, 27, 0.85);
  color: var(--bg-white);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card-badge-modality::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-orange);
}

.card-body-content {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Ocupa el espacio restante */
  justify-content: space-between; /* Distribuye espacio empujando el botón abajo */
}

.card-badge-container {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.badge-custom-gray {
  background-color: #E8F5E9;
  color: #2E7D32;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(46, 125, 50, 0.15);
}

.badge-custom-orange {
  background-color: #FFF3E0;
  color: #E65100;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(230, 81, 0, 0.15);
}

.card-body-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.card-body-content p {
  font-size: 0.85rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin-bottom: 1rem;
  height: 64px; /* Alto fijo exacto para uniformidad de texto */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden; /* Corta texto sobrante si lo hubiere */
  flex-shrink: 0;
}

.btn-card-cta {
  width: 100%;
  background-color: var(--primary-orange);
  color: var(--bg-white);
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(243, 146, 0, 0.1);
  margin-top: auto; /* Empuja el botón al fondo del contenedor flex */
}

.estamento-card:hover .btn-card-cta {
  background-color: var(--primary-orange-hover);
  box-shadow: var(--shadow-orange);
}


/* Pantalla 2: Puerta de Seguridad - Habeas Data */
.card-form-container {
  background-color: var(--bg-white);
  border: 1px solid var(--bg-gray-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-medium);
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-gray);
  font-size: 0.95rem;
}

.input-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.input-label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--bg-gray-border);
  border-radius: 12px;
  font-family: var(--font-base);
  font-size: 1rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
  outline: none;
}

.input-field:focus {
  border-color: var(--primary-orange);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px var(--primary-orange-light);
}

.select-field {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%231A1A1B' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* Checkbox Habeas Data */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.checkbox-input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-orange);
  cursor: pointer;
  margin-top: 2px;
  border: 2px solid var(--bg-gray-border);
  border-radius: 4px;
}

.checkbox-label {
  font-size: 0.85rem;
  color: var(--text-gray);
  cursor: pointer;
  user-select: none;
}

.checkbox-label a {
  color: var(--primary-orange);
  text-decoration: none;
  font-weight: 500;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* Botones */
.btn-primary {
  width: 100%;
  background-color: var(--primary-orange);
  color: var(--bg-white);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-subtle);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-orange-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
}

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

.btn-primary:disabled {
  background-color: var(--text-gray-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-gray);
  border: 1px solid var(--bg-gray-border);
  border-radius: 12px;
  padding: 10px 20px;
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background-color: var(--bg-gray-light);
  color: var(--text-dark);
}

/* Pantalla 3: Interfaz de Encuesta Conversacional */
.survey-wrapper {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.survey-progress-container {
  background-color: var(--bg-white);
  border: 1px solid var(--bg-gray-border);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-subtle);
}

.survey-progress-bar-bg {
  flex-grow: 1;
  height: 8px;
  background-color: var(--bg-gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.survey-progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--primary-orange);
  border-radius: 4px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.survey-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-gray);
  white-space: nowrap;
}

.survey-question-card {
  background-color: var(--bg-white);
  border: 1px solid var(--bg-gray-border);
  border-radius: 24px;
  padding: 3.5rem 3rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-medium);
  position: relative;
}

.question-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--primary-orange);
  margin-bottom: 1.5rem;
}

.question-text {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2.5rem;
  line-height: 1.4;
  letter-spacing: -0.5px;
}

/* Escala Likert 1-5 */
.likert-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.likert-button {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid var(--bg-gray-border);
  background-color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-gray);
  transition: var(--transition-smooth);
  margin-bottom: 8px;
}

.likert-label {
  font-size: 0.75rem;
  color: var(--text-gray);
  text-align: center;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.likert-option:hover .likert-button {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
  background-color: var(--primary-orange-light);
  transform: scale(1.08);
}

.likert-option.selected .likert-button {
  border-color: var(--primary-orange);
  background-color: var(--primary-orange);
  color: var(--bg-white);
  box-shadow: var(--shadow-orange);
}

.likert-option.selected .likert-label {
  color: var(--primary-orange);
  font-weight: 600;
}

/* Control de Navegación */
.survey-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--bg-gray-border);
  padding-top: 1.5rem;
}

.keyboard-shortcut-hint {
  font-size: 0.8rem;
  color: var(--text-gray-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kbd-key {
  background: var(--bg-gray-light);
  border: 1px solid var(--bg-gray-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

/* Comentarios Finales */
.comments-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.comments-textarea {
  width: 100%;
  height: 150px;
  padding: 16px;
  border: 2px solid var(--bg-gray-border);
  border-radius: 12px;
  font-family: var(--font-base);
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  resize: none;
  margin-top: 1rem;
  margin-bottom: 2rem;
  transition: var(--transition-smooth);
}

.comments-textarea:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px var(--primary-orange-light);
}

/* Pantalla 4: Dashboard */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-top: 1rem;
}

.dashboard-card {
  background-color: var(--bg-white);
  border: 1px solid var(--bg-gray-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--bg-gray-border);
  padding-bottom: 8px;
}

.participation-metric-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.participation-bar-bg {
  width: 100px;
  height: 6px;
  background-color: var(--bg-gray-light);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 10px;
  flex-grow: 1;
}

.participation-bar-fill {
  height: 100%;
  background-color: var(--primary-orange);
  border-radius: 3px;
}

.chart-wrapper {
  position: relative;
  height: 350px;
  width: 100%;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background-color: var(--bg-white);
  border: 1px solid var(--bg-gray-border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-subtle);
}

.kpi-card span {
  font-size: 0.8rem;
  color: var(--text-gray);
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.kpi-card strong {
  font-size: 1.75rem;
  color: var(--primary-orange);
  font-weight: 700;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.dashboard-table th {
  padding: 12px;
  border-bottom: 2px solid var(--bg-gray-border);
  color: var(--text-gray);
  font-weight: 600;
}

.dashboard-table td {
  padding: 12px;
  border-bottom: 1px solid var(--bg-gray-border);
  color: var(--text-dark);
}

.badge {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-orange {
  background-color: var(--primary-orange-light);
  color: var(--primary-orange);
}

.badge-gray {
  background-color: #ECECEC;
  color: #555555;
}

/* Modales e Informes */
.modal {
  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;
  padding: 1.5rem;
}

.modal-content {
  background-color: var(--bg-white);
  border-radius: 20px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-medium);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--bg-gray-border);
  padding-bottom: 12px;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
  font-weight: 700;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-gray);
}

.modal-body {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.5;
}

.modal-body p {
  margin-bottom: 1rem;
}

.modal-body h4 {
  color: var(--text-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Responsividad */
@media (max-width: 768px) {
  .hero-section h2 {
    font-size: 1.85rem;
  }
  
  .card-form-container {
    padding: 2rem 1.5rem;
  }
  
  .survey-question-card {
    padding: 2.5rem 1.5rem;
    min-height: auto;
  }
  
  .question-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }
  
  .likert-scale {
    gap: 0.5rem;
  }
  
  .likert-button {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Base de Datos y Grilla de Celdas tipo Excel
   ========================================================================== */
.excel-tabs-container {
  display: flex;
  background-color: #ECECEC;
  border: 1px solid #D0D0D0;
  border-bottom: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.excel-tab-btn {
  background-color: #F4F4F4;
  color: #555555;
  border: none;
  border-right: 1px solid #D0D0D0;
  padding: 12px 20px;
  font-family: var(--font-base);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.excel-tab-btn:hover {
  background-color: #EAEAEA;
}

.excel-tab-btn.active {
  background-color: var(--bg-white);
  color: var(--primary-orange);
  font-weight: 600;
  border-bottom: 3px solid var(--primary-orange);
  margin-bottom: -1px;
}

.excel-table-container {
  border: 1px solid #D0D0D0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: auto;
  background-color: #F9F9F9;
}

.excel-style-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.excel-style-table th {
  background-color: #F0F0F0;
  color: var(--text-dark);
  border-right: 1px solid #D0D0D0;
  border-bottom: 2px solid #C0C0C0;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.excel-style-table td {
  border-right: 1px solid #E5E5E5;
  border-bottom: 1px solid #E5E5E5;
  padding: 8px 12px;
  background-color: #FFFFFF;
  font-size: 0.82rem;
  color: var(--text-dark);
  white-space: nowrap;
}

.excel-style-table tr:hover td {
  background-color: #FFF9F0 !important;
}

.excel-style-table td.cell-num {
  font-family: 'Courier New', Courier, monospace;
  text-align: center;
  font-weight: 600;
  color: var(--primary-orange-hover);
}

.excel-style-table td.cell-id {
  font-family: 'Courier New', Courier, monospace;
  color: var(--text-gray);
  font-weight: 500;
}

/* ==========================================================================
   Pantalla de Seguridad (Passcode Lock)
   ========================================================================== */
.dashboard-gate-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(26, 26, 27, 0.96), rgba(85, 85, 85, 0.99));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
}

.gate-card {
  background-color: var(--bg-white);
  border: 1px solid var(--bg-gray-border);
  border-radius: 24px;
  padding: 3.5rem 3rem;
  max-width: 485px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gate-logo {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.gate-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.gate-card p {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* Animación de vibración para error de contraseña */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake {
  animation: shake 0.35s ease-in-out;
}

/* Botón de eliminación de filas de prueba en grilla Excel */
.btn-delete-row {
  background: none;
  border: none;
  color: var(--text-gray-light);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-delete-row:hover {
  color: #D32F2F;
  background-color: #FFEBEE;
}

/* ==========================================================================
   NAVEGACIÓN INSTITUCIONAL (matching tecnologicadeloriente.edu.co)
   ========================================================================== */

.inst-nav {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.inst-nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 72px;
}

.inst-nav-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.inst-nav-logo-img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.inst-nav-menu-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.inst-nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  margin-left: auto;
  transition: background-color 0.2s;
}

.inst-nav-hamburger:hover {
  background-color: var(--bg-gray-light);
}

.inst-nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.inst-nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.inst-nav-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.inst-nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.inst-nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
  height: 72px;
}

.inst-nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.inst-nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 15px;
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 500;
  color: #222222;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.inst-nav-link:hover,
.inst-nav-item:hover > .inst-nav-link {
  color: var(--primary-orange);
  border-bottom-color: var(--primary-orange);
}

.inst-chevron {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
}

.inst-nav-item:hover .inst-chevron {
  transform: rotate(180deg);
}

.inst-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background-color: #ffffff;
  border-top: 3px solid var(--primary-orange);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 500;
}

.inst-nav-item:hover .inst-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.inst-dropdown li a {
  display: block;
  padding: 10px 20px;
  font-family: var(--font-base);
  font-size: 0.875rem;
  color: #444444;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.inst-dropdown li a:hover {
  color: var(--primary-orange);
  background-color: #FFF8F0;
  border-left-color: var(--primary-orange);
  padding-left: 24px;
}

.inst-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.inst-nav-cta {
  background-color: var(--primary-orange);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: var(--font-base);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.inst-nav-cta:hover {
  background-color: var(--primary-orange-hover);
  box-shadow: 0 4px 12px rgba(243,146,0,0.35);
  color: #ffffff;
}

.inst-nav-accent-line {
  height: 3px;
  background-color: var(--primary-orange);
}

.inst-nav-actions-mobile {
  display: none;
}

@media (max-width: 1060px) {
  .inst-nav-link {
    padding: 0 10px;
    font-size: 0.84rem;
  }
  .inst-nav-cta {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  .inst-nav-container {
    padding: 0 1.25rem;
    gap: 0.5rem;
  }

  .inst-nav-hamburger {
    display: flex;
    order: 3;
  }

  .inst-nav-actions {
    display: none;
  }

  .inst-nav-menu-wrapper {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    padding-bottom: 2rem;
    box-shadow: 4px 0 16px rgba(0,0,0,0.12);
  }

  .inst-nav-menu-wrapper.open {
    transform: translateX(0);
  }

  .inst-nav-menu {
    flex-direction: column;
    height: auto;
    align-items: stretch;
  }

  .inst-nav-item {
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--bg-gray-border);
  }

  .inst-nav-link {
    padding: 15px 20px;
    height: auto;
    border-bottom: none;
    justify-content: space-between;
  }

  .inst-nav-link:hover,
  .inst-nav-item:hover > .inst-nav-link {
    border-bottom-color: transparent;
  }

  .inst-dropdown {
    position: static;
    border-top: none;
    border-left: 3px solid var(--primary-orange);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: hidden;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, visibility 0s 0.3s;
    margin-left: 20px;
    background-color: #fafafa;
    padding: 0;
  }

  .inst-nav-item.mobile-open .inst-dropdown {
    visibility: visible;
    max-height: 500px;
    transition: max-height 0.3s ease, visibility 0s;
  }

  .inst-nav-item.mobile-open .inst-chevron {
    transform: rotate(180deg);
  }

  .inst-dropdown li a {
    padding: 10px 16px;
  }

  .inst-dropdown li a:hover {
    padding-left: 20px;
  }

  .inst-nav-actions-mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 20px 0;
    gap: 12px;
    border-top: 1px solid var(--bg-gray-border);
    margin-top: 0.5rem;
  }

  .inst-nav-actions-mobile .inst-nav-cta {
    justify-content: center;
  }

  .inst-nav-actions-mobile .campaign-tag {
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 6px;
  }
}

/* ===== SUBMENÚS ANIDADOS (3.er y 4.o nivel – flyout lateral en desktop) ===== */

.inst-dropdown li.has-subdropdown {
  position: relative;
}

.inst-dropdown li.has-subdropdown > a {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding-right: 14px;
}

.inst-subdropdown-arrow {
  font-size: 0.6rem;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.inst-subdropdown {
  position: absolute;
  left: 100%;
  top: -8px;
  min-width: 270px;
  background-color: #ffffff;
  border-top: 3px solid var(--primary-orange);
  border-radius: 0 10px 10px 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 700;
}

.inst-dropdown li.has-subdropdown:hover > .inst-subdropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* 4.o nivel: anidado dentro de inst-subdropdown */
.inst-subdropdown li.has-subdropdown {
  position: relative;
}

.inst-subdropdown li.has-subdropdown > a {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding-right: 14px;
}

.inst-subdropdown li.has-subdropdown:hover > .inst-subdropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Acordeón mobile para submenús */
@media (max-width: 768px) {
  .inst-subdropdown {
    position: static !important;
    left: auto;
    top: auto;
    border-top: none;
    border-left: 3px solid rgba(243,146,0,0.4);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: hidden;
    transform: none !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, visibility 0s 0.35s;
    margin-left: 16px;
    background-color: #f7f7f7;
    padding: 0;
  }

  .has-subdropdown.mobile-open > .inst-subdropdown {
    visibility: visible;
    max-height: 1200px;
    padding: 4px 0;
    transition: max-height 0.4s ease, visibility 0s;
  }

  .has-subdropdown.mobile-open > a .inst-subdropdown-arrow {
    transform: rotate(90deg);
  }
}

/* ==========================================================================
   FOOTER INSTITUCIONAL (matching tecnologicadeloriente.edu.co)
   ========================================================================== */

.inst-footer {
  background-color: #111111;
  color: #ffffff;
  font-family: var(--font-base);
  border-top: 4px solid var(--primary-orange);
}

.inst-footer-top {
  padding: 3.5rem 2rem 2.5rem;
}

.inst-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.25fr 0.9fr 1.1fr;
  gap: 2rem;
}

.inst-footer-brand {
  display: flex;
  flex-direction: column;
}

.inst-footer-logo {
  max-width: 165px;
  max-height: 75px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
  align-self: flex-start;
}

.inst-footer-social-label {
  font-size: 0.875rem;
  color: #dddddd;
  margin-bottom: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.inst-footer-social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inst-footer-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.inst-footer-social-icons a:hover {
  background-color: var(--primary-orange);
  border-color: var(--primary-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243,146,0,0.3);
}

.inst-footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--primary-orange);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

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

.inst-footer-col ul li {
  margin-bottom: 0.65rem;
}

.inst-footer-col ul li a {
  color: #cccccc;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.inst-footer-col ul li a:hover {
  color: #ffffff;
}

.inst-footer-vigilada p {
  font-size: 0.875rem;
  color: #cccccc;
  line-height: 1.65;
}

.inst-footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0;
}

.inst-footer-contact {
  padding: 1.5rem 2rem;
}

.inst-footer-contact-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
}

.inst-footer-contact-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.inst-footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inst-footer-contact-item > i {
  color: var(--primary-orange);
  font-size: 1rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.inst-footer-contact-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inst-footer-contact-item strong {
  font-size: 0.82rem;
  color: #ffffff;
  font-weight: 600;
}

.inst-footer-contact-item span {
  font-size: 0.8rem;
  color: #bbbbbb;
  line-height: 1.4;
}

.inst-footer-copyright {
  background-color: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1rem 2rem;
  text-align: center;
}

.inst-footer-copyright p {
  font-size: 0.82rem;
  color: #999999;
  margin: 3px 0;
}

.inst-footer-copyright p strong {
  color: #cccccc;
}

@media (max-width: 1100px) {
  .inst-footer-inner {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .inst-footer-brand {
    grid-column: span 4;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .inst-footer-logo {
    margin-bottom: 0;
  }

  .inst-footer-vigilada {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .inst-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  .inst-footer-brand {
    grid-column: span 2;
    flex-direction: column;
    gap: 0;
  }

  .inst-footer-logo {
    margin-bottom: 1.25rem;
  }

  .inst-footer-vigilada {
    grid-column: span 2;
  }

  .inst-footer-contact-label {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .inst-footer-inner {
    grid-template-columns: 1fr;
  }

  .inst-footer-brand {
    grid-column: span 1;
  }

  .inst-footer-vigilada {
    grid-column: span 1;
  }

  .inst-footer-contact-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

