/* Convenio CCO — landing registro + reporte aliado */

.cco-form-landing,
.cco-form-reporte {
  --cco-primary: #0088b8;
  --cco-primary-dark: #006994;
  --cco-accent: #00a6dd;
  --cco-panel-border: #e8edf2;
}

/* Paneles */
.cco-form-landing .x_panel.cco-panel,
.cco-form-reporte .x_panel.cco-panel {
  border: 1px solid var(--cco-panel-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 105, 148, 0.08);
  margin-bottom: 1rem;
}

.cco-form-landing .x_panel.cco-panel > .x_title,
.cco-form-reporte .x_panel.cco-panel > .x_title {
  background: linear-gradient(90deg, #006994 0%, #0088b8 55%, #00a6dd 100%);
  border-bottom: none;
  color: #fff;
  padding: 10px 14px;
}

.cco-form-landing .x_panel.cco-panel > .x_title h2,
.cco-form-reporte .x_panel.cco-panel > .x_title h2 {
  color: #fff;
  font-size: 14px;
  margin: 0;
}

.cco-form-reporte .x_panel.cco-panel > .x_content {
  padding: 8px 12px 10px;
}

.cco-form-reporte .cco-resultados-content {
  padding-top: 6px;
}

.cco-form-reporte .cco-resultados-content .cco-kpi-one-row {
  margin-bottom: 0.45rem;
}

.cco-form-reporte .cco-resultados-content .cco-table-wrap {
  margin-top: 0;
}

.cco-form-reporte .cco-sin-resultados {
  font-size: 12px;
  margin: 0.35rem 0 0;
}

.cco-form-landing .x_panel.cco-panel > .x_title h2 small,
.cco-form-reporte .x_panel.cco-panel > .x_title h2 small {
  color: #fde047 !important;
  font-weight: 600;
}

.cco-form-landing .x_panel.cco-panel > .x_title .collapse-link,
.cco-form-reporte .x_panel.cco-panel > .x_title .collapse-link {
  color: rgba(255, 255, 255, 0.92);
}

.cco-form-landing .page-title h3,
.cco-form-reporte .page-title h3 {
  color: #006994;
  font-weight: 700;
}

.cco-form-landing .page-title h3 small,
.cco-form-reporte .page-title h3 small {
  color: #64748b;
}

.cco-form-landing .form-control,
.cco-form-reporte .form-control {
  border-radius: 8px;
  border-color: #d1d5db;
}

.cco-form-landing .form-control:focus,
.cco-form-reporte .form-control:focus {
  border-color: var(--cco-accent);
  box-shadow: 0 0 0 2px rgba(0, 166, 221, 0.2);
}

/* Botón principal landing */
.cco-form-landing .button.cco-btn-submit {
  background: linear-gradient(180deg, #00a6dd 0%, #006994 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 10px rgba(0, 105, 148, 0.35) !important;
  width: 280px !important;
  max-width: 100%;
  padding: 10px 16px !important;
  font-weight: 600;
}

.cco-form-landing .button.cco-btn-submit:hover {
  filter: brightness(1.06);
}

/* Switch afiliado CCO */
.cco-switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.cco-switch-text {
  font-weight: 600;
  color: #64748b;
  min-width: 28px;
  transition: color 0.2s ease;
}

.cco-switch-text.is-active {
  color: #006994;
}

.cco-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
}

.cco-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cco-switch-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 30px;
  transition: background 0.25s ease;
}

.cco-switch-slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
}

.cco-switch input:checked + .cco-switch-slider {
  background: linear-gradient(180deg, #00a6dd 0%, #006994 100%);
}

.cco-switch input:checked + .cco-switch-slider::before {
  transform: translateX(26px);
}

.cco-switch input:focus + .cco-switch-slider {
  box-shadow: 0 0 0 3px rgba(0, 166, 221, 0.25);
}

/* Reporte */
.cco-form-reporte .btn.cco-btn-primary {
  background: linear-gradient(180deg, #00a6dd 0%, #006994 100%);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 105, 148, 0.25);
}

.cco-form-reporte .btn.cco-btn-primary:hover {
  filter: brightness(1.06);
  background: linear-gradient(180deg, #00a6dd 0%, #006994 100%);
}

.cco-form-reporte .table.cco-report-table {
  font-size: 10px;
  margin-bottom: 0;
}

.cco-form-reporte .cco-table-wrap {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 105, 148, 0.06);
}

.cco-form-reporte .cco-table-wrap .table-responsive {
  margin-bottom: 0;
  overflow-x: auto;
}

.cco-form-reporte .table.cco-report-table thead {
  background: #006994;
  box-shadow: none;
}

.cco-form-reporte .table.cco-report-table thead th {
  background: transparent !important;
  color: #fff !important;
  border: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  white-space: nowrap;
  vertical-align: middle;
  font-weight: 600;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 5px 4px !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.cco-form-reporte .table.cco-report-table thead th:last-child {
  border-right: none !important;
}

.cco-form-reporte .table.cco-report-table tbody td {
  font-size: 10px;
  padding: 4px 5px !important;
  vertical-align: top;
  line-height: 1.25;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 220px;
}

/* KPIs reporte aliado — una fila bajo título Resultados */
.cco-form-reporte .cco-kpi-one-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  gap: 0.38rem;
  margin: 0;
  clear: both;
}

.cco-form-reporte .cco-resultados-content .cco-kpi-one-row {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.cco-form-reporte .cco-kpi-pill {
  flex: 1 1 0;
  min-width: 76px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  color: #fff;
  border-radius: 8px;
  padding: 0.38rem 0.45rem;
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cco-form-reporte .cco-kpi-pill span {
  display: block;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.85;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cco-form-reporte .cco-kpi-pill strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0.12rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cco-form-reporte .cco-kpi-pill.accent-orange strong { color: #ffb347; }
.cco-form-reporte .cco-kpi-pill.accent-green strong { color: #6ee7a0; }
.cco-form-reporte .cco-kpi-pill.accent-yellow strong { color: #f5e06a; }
.cco-form-reporte .cco-kpi-pill.accent-red strong { color: #ff8a8a; }
.cco-form-reporte .cco-kpi-pill.accent-blue strong { color: #7dd3fc; }

/* Bloque ventas — fondo verde, cifras con semáforo */
.cco-form-reporte .cco-kpi-pill.kpi-ventas {
  background: linear-gradient(135deg, #14532d 0%, #166534 55%, #15803d 100%);
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.18);
}

.cco-form-reporte .cco-kpi-pill.kpi-ventas span {
  opacity: 0.92;
}

@media (min-width: 768px) {
  .cco-form-reporte .cco-kpi-one-row {
    flex-wrap: nowrap;
  }

  .cco-form-reporte .cco-kpi-pill {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .cco-form-reporte .cco-kpi-pill {
    flex: 1 1 calc(33.333% - 0.38rem);
    min-width: 88px;
  }

  .cco-form-reporte .cco-kpi-pill span {
    font-size: 7px;
  }

  .cco-form-reporte .cco-kpi-pill strong {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .cco-form-reporte .cco-kpi-pill {
    flex: 1 1 calc(50% - 0.38rem);
    min-width: 72px;
    padding: 0.32rem 0.38rem;
  }
}

.cco-form-reporte .table.cco-report-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.cco-form-reporte .table.cco-report-table tbody tr:hover {
  background: #e0f2fe;
}

.cco-form-reporte .cco-badge-convenio {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.cco-form-reporte .alert-danger {
  border-radius: 8px;
}

/* Imagen promocional convenio — centrada y responsive */
.cco-form-landing .cco-panel .cco-hero-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 12px 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.cco-form-landing .cco-hero-image {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 105, 148, 0.12);
}

@media (max-width: 768px) {
  .cco-form-landing .button.cco-btn-submit {
    width: 100% !important;
  }

  .cco-form-landing .cco-panel .cco-hero-image-wrap {
    padding: 12px 8px 16px;
  }

  .cco-form-landing .cco-hero-image {
    max-width: 100%;
    border-radius: 8px;
  }
}

@media (min-width: 1400px) {
  .cco-form-landing .cco-hero-image {
    max-width: 1100px;
  }
}
