/* Estilos para el Canal Ético y Comité de Convivencia MIP */
#canal-etico-modal-overlay,
#comite-convivencia-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#canal-etico-modal-overlay.active,
#comite-convivencia-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#canal-etico-modal-overlay.active #canal-etico-modal-container,
#comite-convivencia-modal-overlay.active #comite-convivencia-modal-container {
  transform: scale(1) translateY(0);
}

#canal-etico-modal-container,
#comite-convivencia-modal-container {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ce-header {
  padding: 1.25rem 1.75rem;
  background: #09090b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ce-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 9999px;
  color: #34d399;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ce-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  color: #18181b;
  flex: 1;
}

/* Scrollbar styling */
.ce-body::-webkit-scrollbar {
  width: 6px;
}
.ce-body::-webkit-scrollbar-track {
  background: #f4f4f5;
}
.ce-body::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 9999px;
}
.ce-body::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

/* Nota Aclaratoria Box */
.ce-alert-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #78350f;
}

.ce-alert-box strong {
  color: #92400e;
  display: block;
  margin-bottom: 0.25rem;
}

.ce-alert-box a {
  color: #b45309;
  font-weight: 700;
  text-decoration: underline;
}

/* Form sections */
.ce-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: #059669;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ce-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e4e7;
}

.ce-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .ce-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ce-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ce-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3f3f46;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.ce-input, .ce-select, .ce-textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #18181b;
  background: #ffffff;
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.ce-input:focus, .ce-select:focus, .ce-textarea:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.ce-input:disabled, .ce-select:disabled {
  background: #f4f4f5;
  color: #a1a1aa;
  cursor: not-allowed;
  border-color: #e4e4e7;
}

/* Radio buttons & segmented pill for Anonymous vs Confidential */
.ce-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #f4f4f5;
  padding: 0.3rem;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
}

.ce-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.875rem;
  border-radius: 9px;
  font-size: 0.8125rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #52525b;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ce-type-btn.active {
  background: #ffffff;
  color: #047857;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* File Upload Zone */
.ce-dropzone {
  border: 2px dashed #d4d4d8;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ce-dropzone:hover {
  border-color: #059669;
  background: #f0fdf4;
}

.ce-dropzone.has-file {
  border-color: #059669;
  background: #ecfdf5;
}

/* Footer / Actions */
.ce-footer {
  padding: 1rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ce-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
  min-height: 44px;
}

.ce-btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

.ce-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.ce-btn-cancel {
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: transparent;
  color: #52525b;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #d4d4d8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ce-btn-cancel:hover {
  background: #f4f4f5;
  color: #18181b;
}

/* Spinner */
.ce-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: ce-spin 0.8s linear infinite;
}

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

/* Success Card */
.ce-success-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.ce-success-icon {
  width: 4rem;
  height: 4rem;
  background: #ecfdf5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  border: 2px solid #a7f3d0;
}

.ce-radicado-badge {
  display: inline-block;
  font-family: monospace;
  font-size: 1.125rem;
  font-weight: 800;
  padding: 0.5rem 1.25rem;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  margin: 1rem 0;
  letter-spacing: 0.05em;
}
