/* Facturas — estilos del vertical (a tono con la web: marca navy/rojo, tarjetas,
   hero con degradado). Usa el grid de Bootstrap ya cargado en base. */

.fac-hero {
    background: linear-gradient(145deg, var(--brand-navy-soft, #163b7a), var(--brand-navy, #0a2658));
    color: #fff;
    padding: 38px 0 64px;
    position: relative;
}
.fac-hero h1 { font-weight: 800; margin: 8px 0 6px; }
.fac-hero .lead { color: rgba(255, 255, 255, .85); margin: 0; max-width: 640px; }
.fac-breadcrumb a { color: rgba(255, 255, 255, .8); text-decoration: none; font-size: .9rem; }
.fac-breadcrumb a:hover { color: #fff; }
.fac-trust {
    list-style: none; display: flex; flex-wrap: wrap; gap: 18px;
    padding: 0; margin: 16px 0 0; color: rgba(255, 255, 255, .9); font-size: .88rem;
}
.fac-trust li { display: flex; align-items: center; gap: 7px; }

/* Se "monta" sobre el hero (margen negativo) como en trámites. */
.fac-wrap { margin-top: -42px; position: relative; z-index: 2; padding-bottom: 56px; }

.fac-card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.fac-card {
    background: #fff; border: 1px solid #eef1f5; border-radius: 16px; padding: 20px;
    height: 100%; box-shadow: 0 4px 18px rgba(10, 38, 88, .06);
    transition: transform .15s ease, box-shadow .15s ease;
}
.fac-card-link:hover .fac-card { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(10, 38, 88, .12); }
.fac-card__icon {
    width: 52px; height: 52px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center; font-size: 1.3rem; color: #fff;
    background: linear-gradient(135deg, var(--brand-navy-soft, #163b7a), var(--brand-navy, #0a2658));
}
.fac-card__title { font-weight: 700; color: var(--brand-navy, #0a2658); margin: 12px 0 2px; }
.fac-card__meta { color: var(--text-muted, #6b7280); font-size: .85rem; }
.fac-card__due { color: var(--brand-red, #d9311a); font-size: .78rem; font-weight: 600; margin-top: 8px; }

.fac-summary {
    background: #fff; border: 1px solid #eef1f5; border-radius: 16px; padding: 22px 22px 24px;
    box-shadow: 0 4px 18px rgba(10, 38, 88, .06); margin-bottom: 18px;
}
.fac-section-title {
    display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700;
    color: var(--brand-navy, #0a2658); margin: 0 0 12px;
}
.fac-section-title .icon {
    width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center;
    justify-content: center; background: #eef2f8; color: var(--brand-navy, #0a2658); font-size: .9rem;
}

.fac-id-box {
    background: #f8fafc; border: 1px solid #eef1f5; border-radius: 12px; padding: 14px 16px;
}
.fac-id-box__label { font-weight: 700; color: var(--brand-navy, #0a2658); }
.fac-id-box__help { color: var(--text-muted, #6b7280); font-size: .9rem; margin-top: 2px; }

.fac-warn {
    display: flex; gap: 10px; align-items: flex-start;
    background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
    border-radius: 12px; padding: 12px 14px; font-size: .88rem; margin-top: 12px;
}

/* Botones */
.fac-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 12px; font-weight: 700; text-decoration: none;
    border: 0; cursor: pointer; font-size: .98rem; transition: filter .15s ease, transform .1s ease;
}
.fac-btn:active { transform: translateY(1px); }
.fac-btn--primary { background: var(--brand-red, #d9311a); color: #fff; }
.fac-btn--primary:hover { filter: brightness(1.06); color: #fff; }
.fac-btn--navy { background: var(--brand-navy, #0a2658); color: #fff; }
.fac-btn--navy:hover { filter: brightness(1.12); color: #fff; }
.fac-btn--ghost { background: #f3f4f6; color: #1f2937; }
.fac-btn--ghost:hover { background: #e5e7eb; color: #1f2937; }
.fac-btn--block { width: 100%; }

/* Formulario */
.fac-field { margin-bottom: 16px; }
.fac-field label { display: block; font-weight: 600; color: var(--brand-navy, #0a2658); margin-bottom: 6px; }
.fac-field input, .fac-field textarea, .fac-field select {
    width: 100%; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 10px;
    font-size: 1rem; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.fac-field input:focus, .fac-field textarea:focus, .fac-field select:focus {
    outline: none; border-color: var(--brand-navy, #0a2658);
    box-shadow: 0 0 0 3px rgba(10, 38, 88, .12);
}
.fac-field .help { color: var(--text-muted, #6b7280); font-size: .82rem; margin-top: 4px; }
.fac-field .err { color: #dc2626; font-size: .85rem; margin-top: 4px; }

/* Pantalla de revisión */
.fac-review-value {
    font-size: 1.6rem; font-weight: 800; color: var(--brand-navy, #0a2658);
    letter-spacing: .5px; word-break: break-all; margin: 4px 0 2px;
}
.fac-review-label { color: var(--text-muted, #6b7280); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }

/* Filas (mis facturas) */
.fac-rows { display: flex; flex-direction: column; gap: 10px; }
.fac-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    background: #fff; border: 1px solid #eef1f5; border-radius: 12px; padding: 14px 16px;
    text-decoration: none; color: inherit; transition: box-shadow .15s ease;
}
.fac-row:hover { box-shadow: 0 6px 18px rgba(10, 38, 88, .08); color: inherit; }
.fac-row__title { font-weight: 700; color: var(--brand-navy, #0a2658); }
.fac-row__sub { color: var(--text-muted, #6b7280); font-size: .82rem; }
.fac-row__amt { font-weight: 700; text-align: right; }

/* Pills de estado */
.fac-pill {
    display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .76rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.fac-pill--wait { background: #fef3c7; color: #92400e; }
.fac-pill--pay { background: #dbeafe; color: #1e40af; }
.fac-pill--ok { background: #dcfce7; color: #166534; }
.fac-pill--off { background: #f3f4f6; color: #6b7280; }
.fac-pill--bad { background: #fee2e2; color: #991b1b; }

/* Detalle: filas clave-valor */
.fac-kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.fac-kv:last-child { border-bottom: 0; }
.fac-kv span { color: var(--text-muted, #6b7280); }
.fac-kv strong { color: var(--brand-navy, #0a2658); text-align: right; }

/* Línea de tiempo humanizada */
.fac-steps { list-style: none; padding: 0; margin: 0; }
.fac-step { position: relative; display: flex; gap: 14px; padding: 0 0 18px 0; }
/* Línea vertical que conecta los pasos. */
.fac-step::before {
    content: ""; position: absolute; left: 17px; top: 30px; bottom: -4px; width: 2px;
    background: #e5e9f0;
}
.fac-step:last-child { padding-bottom: 0; }
.fac-step:last-child::before { display: none; }
.fac-step__dot {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: .9rem; color: #fff;
    background: var(--brand-navy, #0a2658); z-index: 1;
}
.fac-step--ok  .fac-step__dot { background: #16a34a; }
.fac-step--warn .fac-step__dot { background: #d97706; }
.fac-step--bad .fac-step__dot { background: #dc2626; }
.fac-step__title { font-weight: 700; color: var(--brand-navy, #0a2658); }
.fac-step__detail { color: #374151; font-size: .9rem; margin-top: 1px; }
.fac-step__time { display: block; color: var(--text-muted, #6b7280); font-size: .78rem; margin-top: 3px; }

/* Planes de "seguro de línea" */
.fac-plan {
    position: relative; height: 100%; border: 1px solid #eef1f5; border-radius: 14px;
    padding: 18px; text-align: center; background: #fff;
}
.fac-plan--featured { border-color: var(--brand-red, #d9311a); box-shadow: 0 8px 22px rgba(217,49,26,.12); }
.fac-plan__tag {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
    background: var(--brand-red, #d9311a); color: #fff; font-size: .7rem; font-weight: 700;
    padding: 3px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px;
}
.fac-plan__name { font-weight: 700; color: var(--brand-navy, #0a2658); }
.fac-plan__price { font-size: 1.6rem; font-weight: 800; color: var(--brand-navy, #0a2658); margin-top: 4px; }
.fac-plan__per { color: var(--text-muted, #6b7280); font-size: .82rem; }
.fac-plan__save { margin-top: 6px; color: #16a34a; font-weight: 700; font-size: .85rem; }
.fac-sub__coverage {
    margin-top: 10px; background: #ecfdf5; color: #166534; border-radius: 10px;
    padding: 8px 12px; font-size: .86rem;
}

/* Suscripciones: cómo funciona + tarjetas con cobros */
.fac-how__step {
    display: flex; gap: 10px; align-items: flex-start; color: #374151; font-size: .9rem;
}
.fac-how__step span {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-navy, #0a2658);
    color: #fff; font-weight: 700; font-size: .8rem; display: flex; align-items: center; justify-content: center;
}
.fac-sub { padding: 18px; }
.fac-sub__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.fac-sub__title { font-weight: 700; color: var(--brand-navy, #0a2658); }
.fac-sub__price { font-weight: 800; color: var(--brand-navy, #0a2658); margin-top: 6px; }
.fac-sub__price small { color: var(--text-muted, #6b7280); font-weight: 600; }
.fac-sub__charges { margin-top: 14px; border-top: 1px solid #f1f5f9; padding-top: 12px; }
.fac-sub__charge {
    display: flex; justify-content: space-between; gap: 10px; padding: 7px 0;
    text-decoration: none; color: #374151; font-size: .88rem; border-bottom: 1px solid #f5f7fa;
}
.fac-sub__charge:last-child { border-bottom: 0; }
.fac-sub__charge:hover { color: var(--brand-navy, #0a2658); }

/* Comprobante (imagen) en el detalle del cliente */
.fac-receipt-img {
    width: 100%; max-width: 320px; display: block; border: 1px solid #eef1f5;
    border-radius: 12px; cursor: zoom-in;
}

/* Página de pago PIX */
.fac-pay { max-width: 460px; margin: 0 auto; text-align: center; }
.fac-pay__amount { font-size: 2rem; font-weight: 800; color: var(--brand-navy, #0a2658); margin: 6px 0 18px; }
.fac-pay__qr { width: 260px; max-width: 78%; border: 1px solid #eef1f5; border-radius: 14px; padding: 8px; background: #fff; }
.fac-pay__code { width: 100%; font-size: .76rem; padding: 9px; border: 1px solid #e5e7eb; border-radius: 10px; resize: none; }

@media (max-width: 575px) {
    .fac-hero { padding: 28px 0 54px; }
    .fac-btn { width: 100%; }
}
