:root {
  --cf-primary: #04c4d9;
  --cf-primary-dark: #0398a8;
  --cf-primary-light: rgba(4, 196, 217, 0.1);
  --cf-text: #2c3e50;
  --cf-text-light: #7f8c8d;
  --cf-border: #e0e0e0;
  --cf-bg: #f8f9fa;
}

.cf-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
}

.cf-header {
  text-align: center;
  margin-bottom: 40px;
}

.cf-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--cf-text);
  margin: 0 0 12px 0;
}

.cf-subtitle {
  font-size: 16px;
  color: var(--cf-text-light);
  margin: 0;
}

.cf-main-wrapper {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(4, 196, 217, 0.15);
  overflow: hidden;
  border: 1px solid var(--cf-primary-light);
}

.cf-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  background: #fafafa;
}

.cf-tab {
  flex: 1;
  padding: 20px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
  position: relative;
  top: 0;
}

.cf-tab:hover {
  background: #f5f5f5;
}

.cf-tab.active {
  background: white;
  border-bottom: 3px solid var(--cf-primary);
  top: 2px;
}

.cf-tab-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  transition: all 0.3s;
}

.cf-tab.active .cf-tab-icon {
  background: var(--cf-primary);
}

.cf-tab-icon svg {
  stroke: #7f8c8d;
}

.cf-tab.active .cf-tab-icon svg {
  stroke: white;
}

.cf-tab-content {
  text-align: center;
}

.cf-tab-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cf-text-light);
  margin-bottom: 4px;
  transition: color 0.3s;
}

.cf-tab.active .cf-tab-title {
  color: var(--cf-primary);
}

.cf-tab-desc {
  font-size: 12px;
  color: #95a5a6;
  display: none;
}

.cf-tab.active .cf-tab-desc {
  display: block;
}

.cf-content {
  padding: 40px;
}

.cf-form-group {
  margin-bottom: 30px;
}

.cf-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cf-text);
  margin-bottom: 10px;
}

.cf-input-wrapper {
  position: relative;
}

.cf-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #95a5a6;
  pointer-events: none;
}

.cf-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  font-size: 16px;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s;
  box-sizing: border-box;
  font-family: inherit;
  display: block;
}

.cf-input:focus {
  border-color: var(--cf-primary);
  box-shadow: 0 0 0 3px var(--cf-primary-light);
}

.cf-info-box {
  padding: 20px;
  background: var(--cf-primary-light);
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(4, 196, 217, 0.2);
}

.cf-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--cf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cf-info-icon svg {
  stroke: white;
}

.cf-info-text {
  flex: 1;
}

.cf-info-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--cf-text);
  margin: 0 0 6px 0;
}

.cf-info-desc {
  font-size: 14px;
  color: var(--cf-text-light);
  line-height: 1.5;
  margin: 0;
}

.cf-btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(
    135deg,
    var(--cf-primary) 0%,
    var(--cf-primary-dark) 100%
  );
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 24px;
  font-family: inherit;
}

.cf-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(4, 196, 217, 0.3);
}

.cf-btn-primary:active {
  transform: translateY(0);
}

.cf-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cf-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--cf-primary);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
}

.cf-btn-secondary:hover {
  background: var(--cf-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(4, 196, 217, 0.3);
  color: white;
}

.cf-btn-loader {
  display: none;
  align-items: center;
  gap: 8px;
}

.cf-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: cf-spin 0.8s linear infinite;
}

@keyframes cf-spin {
  to {
    transform: rotate(360deg);
  }
}

.cf-resultado {
  min-height: 20px;
}

.cf-resultado-box {
  padding: 24px;
  background: var(--cf-bg);
  border-radius: 12px;
  border: 2px solid rgba(4, 196, 217, 0.3);
  animation: cf-fadeIn 0.5s ease;
}

@keyframes cf-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cf-resultado-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cf-resultado-header h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--cf-text);
  margin: 0;
}

.cf-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--cf-text);
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.cf-table-responsive {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  margin-bottom: 20px;
}

.cf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cf-table thead {
  background: #f1f3f5;
}

.cf-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--cf-text);
  border: 1px solid #dee2e6;
}

.cf-table td {
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  color: #495057;
}

.cf-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

.cf-table tbody tr:hover {
  background: #e9ecef;
}

.cf-link {
  color: var(--cf-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.cf-link:hover {
  color: var(--cf-primary-dark);
  text-decoration: underline;
}

.cf-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.cf-badge-success {
  background: #d4edda;
  color: #155724;
}

.cf-badge-warning {
  background: #fff3cd;
  color: #856404;
}

.cf-badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.cf-badge-default {
  background: #e2e3e5;
  color: #383d41;
}

.cf-alert {
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  animation: cf-fadeIn 0.3s ease;
}

.cf-alert-error {
  background: #fee;
  border-left: 4px solid #e74c3c;
}

.cf-alert-error span {
  color: #c0392b;
  font-size: 14px;
  font-weight: 500;
}

.cf-pdf-container {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cf-bg);
  min-height: 600px;
  margin-bottom: 20px;
}

.cf-pdf-container embed {
  display: block;
  border: none;
}

.cf-pdf-actions {
  text-align: center;
}

.cf-footer {
  margin-top: 30px;
  padding: 20px;
  background: var(--cf-primary-light);
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(4, 196, 217, 0.1);
}

.cf-footer p {
  font-size: 14px;
  color: var(--cf-text-light);
  margin: 0;
}

.cf-footer a {
  color: var(--cf-primary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 8px;
}

.cf-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cf-container {
    padding: 20px 15px;
  }

  .cf-title {
    font-size: 24px;
  }

  .cf-subtitle {
    font-size: 14px;
  }

  .cf-tabs {
    flex-direction: column;
  }

  .cf-tab {
    border-bottom: 1px solid #f0f0f0;
    border-left: 3px solid transparent;
  }

  .cf-tab.active {
    border-bottom: 1px solid #f0f0f0;
    border-left: 3px solid var(--cf-primary);
    top: 0;
  }

  .cf-tab-content {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }

  .cf-tab-icon {
    margin: 0;
    width: 36px;
    height: 36px;
  }

  .cf-tab-desc {
    display: block;
  }

  .cf-content {
    padding: 20px;
  }

  .cf-table {
    font-size: 12px;
  }

  .cf-table th,
  .cf-table td {
    padding: 8px;
  }

  .cf-pdf-container {
    min-height: 400px;
  }

  .cf-pdf-container embed {
    height: 400px !important;
  }

  .cf-extra-fields {
    margin-top: 1rem;
  }

  .cf-alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
  }

  .cf-alert-success a {
    color: #155724;
    text-decoration: underline;
    font-weight: 600;
  }

  .cf-alert-success a:hover {
    color: #0c3d1a;
  }

  .cf-input-invalid {
    border-color: #e74c3c !important;
    background-color: #fef5f5;
  }

  .cf-input-invalid:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
  }

  .cf-input-error {
    display: block;
    margin-top: 6px;
    color: #e74c3c !important;
    font-size: 13px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #cf-error-general {
    margin-top: 16px;
    margin-bottom: 16px;
  }

  .cf-pagination-info {
    padding: 12px 0;
    text-align: center;
    color: var(--cf-text-light);
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 16px;
  }

  .cf-pagination-info p {
    margin: 0;
  }

  .cf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
    margin-top: 16px;
    border-top: 1px solid #e9ecef;
  }

  .cf-pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    border: 2px solid var(--cf-border);
    border-radius: 8px;
    color: var(--cf-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
  }

  .cf-pagination-btn:hover:not([disabled]) {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: white;
    transform: translateY(-2px);
  }

  .cf-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .cf-pagination-numbers {
    display: flex;
    gap: 4px;
  }

  .cf-pagination-number {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    border: 2px solid var(--cf-border);
    border-radius: 8px;
    color: var(--cf-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cf-pagination-number:hover {
    background: var(--cf-primary-light);
    border-color: var(--cf-primary);
    color: var(--cf-primary);
  }

  .cf-pagination-number.active {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: white;
  }

  .cf-pagination-ellipsis {
    padding: 0 8px;
    color: var(--cf-text-light);
    display: flex;
    align-items: center;
  }

  @media (max-width: 768px) {
    .cf-pagination {
      flex-wrap: wrap;
    }

    .cf-pagination-btn {
      padding: 8px 12px;
      font-size: 13px;
    }

    .cf-pagination-number {
      min-width: 36px;
      height: 36px;
      font-size: 13px;
    }
  }
}

.alert-warning {
  max-width: 820px;
  margin: 2.5rem auto;
  padding: 2.25rem 2.5rem;
  border-radius: 1.25rem;

  background: #FFFBEB;        /* fondo ámbar */
  border: 2px solid #F59E0B;  /* borde naranja */

  color: #92400E;             /* texto naranja oscuro */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.alert-warning strong {
  display: block;
  font-size: 2rem;   /* título muy visible */
  font-weight: 800;
  margin-bottom: 1rem;
}

.alert-warning p {
  font-size: 1.75rem;   /* texto claramente legible */
  line-height: 1.8;
  margin: 0.75rem 0;
}
