/* =============================================
   VARIABLES - MISMAS QUE EN LA PLANTILLA ORIGINAL
   ============================================= */
/* :root {
  --crim: #b91c3a;
  --crim-dk: #8b1429;
  --crim-lt: #fdf2f4;
  --gold: #c9963a;
  --gold-lt: #fdf6ec;
  --navy: #0f172a;
  --navy-md: #1e293b;
  --slate: #475569;
  --muted: #94a3b8;
  --bdr: #e2e8f0;
  --surf: #f8fafc;
  --white: #fff;
  --blue: #1d4ed8;
  --green: #16a34a;
  --r: 8px;
  --rs: 5px;
} */

/* =============================================
   ESTILOS GENERALES
   ============================================= */
.f7-wrap {
  font-family: "Inter", system-ui, sans-serif;
  background: #f1f3f7;
  color: var(--navy);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   TOP BAR - Cambiar formato y botones
   ============================================= */
.f7-top {
  background: linear-gradient(90deg, #0d1b35 0%, var(--navy-md) 100%);
  padding: 12px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--crim);
  margin-bottom: 20px;
}

.f7-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.f7-back:hover {
  border-color: var(--crim) !important;
  color: #fff !important;
  background: rgba(185, 28, 58, 0.15) !important;
}

.f7-top-actions .btn {
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.18s;
}

.f7-btn-download {
  background: #16a34a !important;
  color: #fff !important;
  border: none !important;
}

.f7-btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  filter: brightness(1.06);
}

.f7-btn-reset {
  background: #ef4444 !important;
  color: #fff !important;
  border: none !important;
}

.f7-btn-reset:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  filter: brightness(1.06);
}

/* =============================================
   TÍTULO PRINCIPAL
   ============================================= */
.f7-head {
  margin-bottom: 2rem;
}

.f7-eyebrow {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--crim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.f7-eyebrow::before,
.f7-eyebrow::after {
  content: "";
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 28, 58, 0.3));
}

.f7-eyebrow::after {
  background: linear-gradient(90deg, rgba(185, 28, 58, 0.3), transparent);
}

.f7-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
}

.f7-sub {
  font-size: 14px;
  color: var(--slate);
  font-weight: 300;
  letter-spacing: 1px;
}

/* =============================================
   ACCORDION - Cards estilo plantilla
   ============================================= */
.f7-acc .accordion-item {
  background: #fff;
  border-radius: var(--r);
  border: 1px solid #d0d5dd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
  overflow: hidden;
}

.f7-acc .accordion-button {
  padding: 11px 18px;
  background: #f8f9fb;
  border-bottom: 1px solid #e8ecf0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1a2035;
  letter-spacing: 0.15px;
  text-transform: uppercase;
  box-shadow: none !important;
}

.f7-acc .accordion-button:not(.collapsed) {
  background: #f8f9fb;
  color: #1a2035;
}

.f7-acc .accordion-button::before {
  content: "";
  width: 3px;
  height: 18px;
  background: var(--crim);
  border-radius: 2px;
  margin-right: 10px;
}

.f7-acc .accordion-button::after {
  background-size: 12px;
  margin-left: auto;
}

.f7-acc .accordion-body {
  padding: 16px 18px;
  background: #fff;
}

/* =============================================
   CAJAS DE AYUDA (INFO / WARNING)
   ============================================= */
.f7-help {
  background: #f0f4ff;
  border-left: 3px solid #3b82f6;
  border-radius: 0 4px 4px 0;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #1e3a5f;
  line-height: 1.55;
}

.f7-help strong {
  color: #1e40af;
  font-weight: 700;
}

.alert-warning {
  background: #fffbeb;
  border-left: 3px solid #d97706;
  border-radius: 0 4px 4px 0;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.55;
}

/* =============================================
   FORMULARIOS - Estilo de campos
   ============================================= */
.f7-label {
  font-weight: 500;
  font-size: 10.5px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.f7-form .form-control,
.f7-form .form-select {
  padding: 8px 11px;
  border: 1px solid #ced4da;
  border-radius: var(--rs);
  font-size: 13px;
  color: #1a2035;
  background: #fff;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.f7-form .form-control:focus,
.f7-form .form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.f7-field-hint {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.4;
  margin-top: 2px;
}

.f7-field-hint em {
  color: var(--blue);
  font-style: normal;
  font-weight: 600;
}

/* =============================================
   TABLA PRINCIPAL - Estilo exacto de la plantilla
   ============================================= */
.f7-table-wrap {
  overflow-x: auto;
  border-radius: var(--rs);
  border: 1px solid var(--bdr);
  margin: 14px 0;
  max-height: 500px;
  overflow-y: auto;
}

.f7-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 1800px;
}

.f7-table thead th {
  background: #1e293b;
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.f7-table thead th:last-child {
  border-right: none;
}

.f7-table thead th small {
  display: block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 2px;
  white-space: normal;
  line-height: 1.3;
}

.f7-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid #eef0f3;
  font-size: 12px;
  vertical-align: middle;
}

.f7-table tbody tr:hover td {
  background: #f5f7ff;
}

.f7-table tbody td input,
.f7-table tbody td select {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #dde1e7;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: inherit;
  background: #fff;
  color: #1a2035;
}

.f7-table tbody td input:focus,
.f7-table tbody td select:focus {
  outline: none;
  border-color: var(--crim);
  background: #fff9fa;
}

.f7-table tfoot td {
  background: var(--crim-lt);
  padding: 10px;
  font-weight: 700;
  font-size: 12px;
  color: var(--crim);
  border-top: 2px solid rgba(185, 28, 58, 0.2);
  white-space: nowrap;
  position: sticky;
  bottom: 0;
}

/* =============================================
   BOTONES DE ACCIÓN
   ============================================= */
.f7-reg-actions,
.a1-actions,
.a3-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bdr);
}

.btn-outline-primary {
  background: #2563eb !important;
  color: #fff !important;
  border: none !important;
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  filter: brightness(1.06);
}

.btn-outline-dark {
  background: #16a34a !important;
  color: #fff !important;
  border: none !important;
}

.btn-outline-dark:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  filter: brightness(1.06);
}

.btn-outline-secondary {
  background: #7c3aed !important;
  color: #fff !important;
  border: none !important;
}

.btn-outline-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  filter: brightness(1.06);
}

.btn-danger {
  background: #ef4444 !important;
  color: #fff !important;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
  border: none;
}

/* =============================================
   ANEXOS HEADERS - Estilo original
   ============================================= */
.f7-acc .accordion-item .bg-secondary {
  background: #1e293b !important;
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r) var(--r) 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid var(--crim);
}

.f7-acc .badge.bg-danger {
  background: rgba(185, 28, 58, 0.2) !important;
  border: 1px solid rgba(185, 28, 58, 0.5);
  color: #fca5a5;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

/* =============================================
   TABLAS DE ANEXOS
   ============================================= */
.a1-table thead th,
.a3-table thead th {
  background: #1e293b;
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.a1-table tfoot td,
.a3-table tfoot td {
  background: var(--crim-lt);
  padding: 10px;
  font-weight: 700;
  font-size: 12px;
  color: var(--crim);
  border-top: 2px solid rgba(185, 28, 58, 0.2);
  position: sticky;
  bottom: 0;
}

/* =============================================
   SISTEMA DE AYUDA (POPUPS)
   ============================================= */
.f7-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  font-family: inherit;
  transition: all 0.15s;
  margin-left: 4px;
  padding: 0;
}

.f7-help-btn:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.f7-help-popup {
  display: none;
  position: fixed;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.6;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 260px;
}

.f7-help-popup.show {
  display: block;
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.f7-help-popup .ejemplo {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-left: 2px solid var(--gold);
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
  font-family: monospace;
  font-size: 11px;
  color: var(--gold);
}

.f7-help-popup .ejemplo strong {
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

/* =============================================
   ANEXOS - HEADERS ESTILO ORIGINAL (fondo negro)
   ============================================= */

/* HEADER DE ANEXOS - Estilo original de .axhdr con fondo negro */
.f7-annex-header {
  background: #1e293b !important; /* Fondo negro/azul oscuro como el original */
  color: #fff;
  padding: 11px 18px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  border-left: 3px solid var(--crim);
  cursor: pointer;
  transition: filter 0.2s;
  width: 100%;
}

.f7-annex-header:hover {
  filter: brightness(1.12);
}

.f7-annex-number {
  background: rgba(185, 28, 58, 0.2);
  border: 1px solid rgba(185, 28, 58, 0.5);
  color: #fca5a5;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.f7-annex-title {
  flex-grow: 1;
}

.f7-annex-title strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: #fff;
  margin-bottom: 2px;
}

.f7-annex-title span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  display: block;
}

.f7-annex-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
  transition: color 0.2s;
  white-space: nowrap;
}

.f7-annex-header:hover .f7-annex-hint {
  color: rgba(201, 150, 58, 0.85);
}

.f7-annex-hint svg {
  flex-shrink: 0;
  transition: transform 0.3s;
}

.f7-annex-header.open .f7-annex-hint svg {
  transform: rotate(90deg);
}

/* Para cuando está dentro del accordion de Bootstrap */
.accordion-item .f7-annex-header {
  margin-top: 0;
  border-radius: 0;
}

.accordion-item:first-child .f7-annex-header {
  border-radius: 8px 8px 0 0;
}

/* =============================================
   TOOLTIPS DE BOOTSTRAP - Solo estilos para iconos
   ============================================= */

/* Icono de ayuda (?) */
.f7-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  margin-left: 6px;
  transition: all 0.15s;
  line-height: 1;
  font-style: normal;
}

.f7-help-icon:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* Para labels con iconos */
.f7-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

/* Ajustes para tooltips de Bootstrap */
.tooltip-inner {
  background-color: var(--navy, #0f172a);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  padding: 8px 12px;
  max-width: 280px;
  text-align: left;
  line-height: 1.6;
}

.tooltip .tooltip-arrow::before {
  border-right-color: var(--navy, #0f172a);
}

/* Botón de Excel */
.btn-excel {
  background: linear-gradient(135deg, #1e7e34, #2a9d4c);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-excel:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(42, 157, 76, 0.3);
  filter: brightness(1.06);
}

.btn-excel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Formulario de Pago */

.ec-payment-modal-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.ec-payment-modal-wrap .ecp-izipay-wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.ec-payment-modal-wrap #micuentawebstd_rest_wrapper {
  width: 100%;
}

.ec-payment-modal-wrap .kr-embedded {
  margin: 0 auto;
}

/* =============================================
   RESPONSIVE PARA ANEXOS
   ============================================= */
@media (max-width: 768px) {
  .f7-annex-header {
    flex-wrap: wrap;
    padding: 15px;
  }

  .f7-annex-hint {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .a1-table-wrap,
  .a3-table-wrap {
    max-height: 400px;
  }

  .a1-table,
  .a3-table {
    min-width: 1200px;
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .f7-top {
    padding: 10px 16px;
  }

  .f7-eyebrow::before,
  .f7-eyebrow::after {
    max-width: 30px;
  }

  .f7-table-wrap {
    max-height: 400px;
  }
}
