/* =========================================================================
   Portal de Financiación — "Comprobante de Pago" rediseñado. Mismos campos,
   mismos ids/name, mismo comportamiento (formularios, JS de generar
   comprobante) — solo cambia la presentación. Colores de marca vía
   variables --cmp-brand / --cmp-brand-ink, fijadas por t-attf-style en el
   template (mismo mapa UNIAJS/UNITECNAR/TWEETALIG que el resto del portal).
   ========================================================================= */

.cmp-card {
    background: var(--cmp-surface, #ffffff);
    border: 1px solid var(--cmp-line, #dde3ea);
    border-radius: 20px;
    box-shadow: 0 16px 34px -14px rgba(10, 30, 55, .3);
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
}

.cmp-card-body {
    padding: 26px;
}

.cmp-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    margin-bottom: 22px;
}

.cmp-notice.warn {
    background: #fbe4e4;
    border: 1px solid #c0392b;
}

.cmp-notice.info {
    background: #e7f1f8;
    border: 1px solid #2e86ab;
}

.cmp-sec-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #2e86ab;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.cmp-sec-title:not(:first-child) {
    margin-top: 26px;
}

.cmp-sec-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--cmp-line, #dde3ea);
}

.cmp-search-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.cmp-search-row .cmp-field {
    flex: 1;
    min-width: 200px;
}

.cmp-search-row .cmp-field.small {
    flex: 0 0 220px;
}

.cmp-field label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #566274;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.cmp-field .wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--cmp-line, #dde3ea);
    border-radius: 11px;
    background: #eef2f6;
    height: 46px;
    padding: 0 14px;
}

.cmp-field .wrap:focus-within {
    border-color: #2e86ab;
    box-shadow: 0 0 0 3px #e7f1f8;
}

.cmp-field .wrap.disabled {
    opacity: .6;
}

.cmp-field input,
.cmp-field select {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: #1c2530;
    font-family: inherit;
    height: 100%;
}

.cmp-btn-search {
    height: 46px;
    padding: 0 22px;
    border-radius: 11px;
    border: none;
    background: var(--cmp-brand, #03386b);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.cmp-btn-search:hover {
    filter: brightness(1.08);
    color: #fff;
}

.cmp-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.cmp-grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 6px;
}

@media (max-width: 640px) {
    .cmp-grid2, .cmp-grid3 {
        grid-template-columns: 1fr;
    }
}

.cmp-code-table {
    border: 1px solid var(--cmp-line, #dde3ea);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 10px;
}

.cmp-code-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
}

.cmp-code-row + .cmp-code-row {
    border-top: 1px solid var(--cmp-line, #dde3ea);
}

.cmp-code-row .lbl {
    font-size: 10px;
    color: #8894a3;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

.cmp-code-row .val {
    font-size: 13px;
    font-weight: 700;
    color: #1c2530;
}

@media (max-width: 640px) {
    .cmp-code-row {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

.cmp-btn-gen {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cmp-brand, #03386b);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 12.5px;
    padding: 10px 18px;
    border-radius: 99px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.cmp-btn-gen:hover {
    filter: brightness(1.08);
    color: #fff;
}

.cmp-btn-gen.loading {
    opacity: .75;
    cursor: default;
    pointer-events: none;
}

.cmp-btn-gen-spin {
    display: none;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cmpSpin .7s linear infinite;
}

.cmp-btn-gen.loading .cmp-btn-gen-spin {
    display: inline-block;
}

.cmp-btn-gen.loading .fa-file-invoice {
    display: none;
}

@keyframes cmpSpin {
    to { transform: rotate(360deg); }
}

.cmp-toast {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #e3f5ec;
    border: 1px solid #1e8a55;
    font-size: 12.5px;
    color: #1c2530;
}

.cmp-toast b {
    color: #1e8a55;
}

.cmp-toast.show {
    display: flex;
}
