:root {

    --red: #d71920;
    --red-dark: #b51218;
    --red-light: #fff1f2;

    --black: #111;
    --black-2: #1b1b1b;

    --white: #fff;
    --bg: #f5f6f8;

    --text: #202124;
    --muted: #73777d;

    --border: #e4e6e8;

    --green: #138a4b;
    --green-soft: #eaf8ef;
    --success: #16894b;
    --success-light: #eaf8ef;
    --shadow: 0 12px 35px rgba(0, 0, 0, .07);
    --shadow-modal: 0 25px 80px rgba(0, 0, 0, .22);
    --radius: 16px;
}

/* MAIN APP */
.app {
    min-height: 100vh;
}

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    padding-bottom: 50px; 
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

}

body.modal-open {
    overflow: hidden;
}


button,
input,
select,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


.text-lowercase {
    text-transform: lowercase;
}

.text-uppercase {
    text-transform: uppercase;
}


/* HEADER */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    width: 100%;
    min-height: 75px;
    padding: 10px 25px;
    box-sizing: border-box;
    background: var(--black);
    border-bottom: 2px solid var(--red);
}

/* .header {
    height: 74px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;    
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
} */

/* =========================
   IZQUIERDA
   ========================= */

.header-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-logo {
    width: auto;
    height: 45px;
    max-width: 180px;
}

.header-divider {
    width: 1px;
    height: 38px;
    margin: 0 18px;
    background-color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.header-title {
    color: #fff;
    min-width: 0;
}

.portal-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.header-reminder {
    margin-top: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0.9;
}

/* =========================
   DERECHA
   ========================= */

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
    flex-shrink: 0;
}

/* =========================
   ATENCIÓN A CLIENTES
   ========================= */

.customer-service {
    color: #fff;
    text-align: right;
    font-size: 12px;
    line-height: 1.45;
}

.customer-service-title {
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 700;
}

.customer-service-phones {
    white-space: nowrap;
    font-weight: 500;
}

.customer-service-email {
    font-size: 12px;
}

.customer-service a {
    color: #fff;
    text-decoration: none;
}

.customer-service a:hover {
    text-decoration: underline;
}

/* =========================
   USUARIO
   ========================= */

.user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.validation {
    color: #fff;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

/* =========================
   TABLET
   ========================= */

@media (max-width: 1100px) {

    .header {
        gap: 15px;
        padding: 10px 18px;
    }

    .header-divider {
        margin: 0 12px;
    }

    .portal-title {
        font-size: 18px;
    }

    .header-reminder {
        font-size: 11px;
    }

    .header-right {
        gap: 15px;
    }

    .customer-service {
        font-size: 11px;
    }

    .customer-service-title {
        font-size: 12px;
    }
}

/* =========================
   CELULAR
   ========================= */

@media (max-width: 768px) {

    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 15px;
    }

    .header-left {
        width: 100%;
    }

    .header-logo {
        height: 40px;
        max-width: 150px;
    }

    .header-divider {
        height: 32px;
        margin: 0 10px;
    }

    .portal-title {
        font-size: 17px;
    }

    .header-reminder {
        font-size: 10px;
        line-height: 1.3;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .customer-service {
        text-align: left;
    }

    .customer-service-title {
        font-size: 12px;
    }

    .customer-service-phones {
        white-space: normal;
    }

    .user {
        margin-left: auto;
    }
}

/* =========================
   CELULAR PEQUEÑO
   ========================= */

@media (max-width: 480px) {

    .header {
        padding: 10px 12px;
    }

    .header-logo {
        height: 35px;
        max-width: 125px;
    }

    .header-divider {
        margin: 0 8px;
    }

    .portal-title {
        font-size: 15px;
    }

    .header-reminder {
        font-size: 9px;
    }

    .customer-service {
        font-size: 10px;
    }

    .customer-service-title {
        font-size: 11px;
    }

    .customer-service-email {
        font-size: 10px;
    }

    .validation {
        display: none;
    }

    .avatar {
        width: 34px;
        height: 34px;
    }
}
/* 
.header {
    height: 74px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--black);
    border-bottom: 2px solid var(--red);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.header-left {
    display: flex;
    align-items: center;
}


.header-logo {
    height: 38px;
    width: auto;
    display: block;
}


.header-divider {
    width: 1px;
    height: 35px;
    margin: 0 18px;
    background-color: rgba(255, 255, 255, 0.4);
}


.header-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.header-reminder {
    margin-top: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.customer-service {
    color: #fff;
    text-align: right;
    font-size: 12px;
    line-height: 1.4;
}

.customer-service-title {
    font-size: 13px;
    font-weight: 700;
}

.customer-service-phones {
    font-weight: 500;
}

.customer-service-email {
    font-size: 12px;
}

.user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}


.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--red-light);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}


.header-logo img {
    width: 185px;
    max-height: 50px;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    color: white;
    font-size: 13px;
}


.header-help {
    border: 0;
    background: transparent;
    color: white;
}


.header-help:hover {
    color: var(--red);
} */


/* MAIN */

.main {
    width: 100%;
}

.content {
    width: 100%;
    max-width: 1280px;
    margin: auto;
    padding: 6px 10px 0px;
}

.hero {
    margin-bottom: 15px;
}


.hero h1 {
    margin: 0 0 6px;
    font-size: 32px;
}


.hero p {
    margin: 0;
    color: var(--muted);
}

/* MAIN LAYOUT*/
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

/* CARD */
.card {
    background: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 16px;
    /* margin-bottom: 20px; */
}

.card+.card {
    margin-top: 18px;
}

.section-title {

    display: flex;

    gap: 14px;

    align-items: center;

    margin-bottom: 10px;

}


.section-title h2 {
    margin: 0 0 0px;
    font-size: 17px;
}

.section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}


.step-number {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--red-light);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}


/* FORM */

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}


.field {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


.field.full {
    grid-column: 1 / -1;
}


label {

    font-size: 13px;

    font-weight: 700;

}


label span {
    color: var(--red);
}


input,
select,
textarea {

    width: 100%;
    height: 35px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    padding: 0 12px;
    outline: none;
}


textarea {

    height: 100px;

    padding: 12px;

    resize: vertical;

}


input:focus,
select:focus,
textarea:focus {

    border-color: var(--red);

    box-shadow:
        0 0 0 3px rgba(215, 25, 32, .1);

}


input:disabled,
select:disabled {

    background: #f2f3f4;

    color: #777;

    cursor: not-allowed;

}


.inline {

    display: grid;

    grid-template-columns: 1fr auto;

    gap: 10px;

}

/* BUTTONS */
.btn {
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
}

.btn-primary {
    background: var(--red);
    color: white;
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-black {
    background: var(--black);
    color: white;
}

.btn-black:hover {
    background: #000;
}

.btn-secondary {
    background: #eeeeee;
    color: #222;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success);
}

.btn-large {
    min-width: 220px;
    height: 50px;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

.edit-actions {
    display: flex;
    justify-content: space-between;
    /*flex-end; */
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-top: 20px;
}

.main-actions {
    display: flex;
    justify-content: center;
    margin: 25px 0 50px;
}


/* MESSAGE */

.message {

    display: none;

    padding: 12px;

    margin-top: 12px;

    border-radius: 8px;

    font-size: 13px;

}


.message.show {
    display: block;
}


.message.success {

    background: var(--green-soft);

    color: var(--green);

}


.message.error {

    background: #fff0f0;

    color: var(--red);

}

/* =========================================================
   SUMMARY
========================================================= */

.summary {

    position: sticky;

    top: 98px;

}


.summary h3 {

    margin:
        0 0 20px;

    font-size: 18px;

}


.summary-row {

    padding:
        15px 0;

    border-bottom:
        1px solid var(--border);

}


.summary-label {

    color: var(--muted);

    font-size: 10px;

    letter-spacing: .6px;

    margin-bottom: 5px;

}


.summary-value {

    font-size: 14px;

    font-weight: 700;

}


.total {

    display: flex;

    align-items: end;

    justify-content: space-between;

    padding:
        22px 0;

}


.total span {

    color: var(--muted);

    font-size: 11px;

}


.total strong {

    color: var(--red);

    font-size: 28px;

}


.status {

    background:
        var(--success-light);

    color:
        var(--success);

    padding: 12px;

    border-radius: 10px;

    font-size: 12px;

}

/* FOOTER */

.summary-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: var(--black);
    color: white;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    gap: 55px;
    box-shadow:
        0 -5px 20px rgba(0, 0, 0, .2);

}


.footer-item {

    display: flex;

    flex-direction: column;

    gap: 2px;

}


.footer-item span {

    color: #aaa;

    font-size: 10px;

    font-weight: 700;

}


.footer-item strong {

    font-size: 20px;

}


.footer-validations {

    display: flex;

    gap: 20px;

}


.validation {

    font-size: 12px;

    color: #999;

}


.validation.ok {

    color: #62d99c;

}


/* MODAL */
/* =====================================================
   MODALES
===================================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, .65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex !important;
    animation: modalFadeIn .2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    box-shadow: var(--shadow-modal);
    animation: modalIn .25s ease;
    border-radius: 12px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform:
            translateY(15px) scale(.98);
    }

    to {
        opacity: 1;
        transform:
            translateY(0) scale(1);
    }
}

/* .modal-success {
    text-align: center;
    padding: 40px 30px;
}

.modal-success h2 {
    margin: 0 0 10px;
}

.modal-success p {
    color: var(--muted);
} */

.modal-body {
    padding: 14px;
}

.modal-header {
    padding: 10px 20px 5px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.modal-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: #f3f3f3;
    font-size: 20px;
    cursor: pointer;
    color: #555;
}

.modal-footer {
    padding: 7px 20px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--success-light);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
}

.success-content {
    text-align: center;
}

.success-content h2 {
    margin: 0 0 8px;
}

.success-content p {
    margin: 0;
    color: var(--muted);
}

.invoice-result {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    text-align: left;
}

.result-label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .6px;
    margin-bottom: 5px;
}

.result-value {
    font-size: 15px;
    font-weight: 800;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.confirmation-list {
    /* margin-top:22px; */
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.confirmation-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 5px 16px;
    border-bottom: 1px solid var(--border);
}

.confirmation-row:last-child {
    border-bottom: 0;
}

.confirmation-row span {
    color: var(--muted);
    font-size: 12px;
}

.confirmation-row strong {
    font-size: 13px;
    text-align: right;
}

/* GENERATION STATE */
.generation {
    text-align: center;
    padding: 38px 28px;
}

.loader {
    width: 58px;
    height: 58px;
    margin: 0 auto 22px;
    border: 4px solid #f0d7d8;
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.generation h2 {
    margin: 0 0 8px;
}

.generation p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;

}


.review-grid>div {

    padding: 12px;

    background: #f7f7f7;

    border-radius: 8px;

}


.review-grid small {

    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-bottom: 5px;

}


.review-grid strong {

    font-size: 13px;

    word-break: break-word;

}


.review-total {

    grid-column: 1 / -1;

    border-top:
        2px solid var(--red);

    display: flex;

    justify-content: space-between;

    align-items: center;

}


.review-total strong {

    font-size: 25px;

}


/* CAPTCHA */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-image {
    width: 120px;
    height: 47px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    display: block;
}

.captcha-refresh {
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.captcha-refresh:hover {
    background: #d71920;
}

.captcha-error{

    display:none;
    color:var(--red);
    font-size:12px;
    font-weight:700;
    margin-top:7px;
}
/* MODAL ACTIONS */

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}


/* SUCCESS */

.success-modal {

    text-align: center;

}


/* .success-icon {

    width: 75px;

    height: 75px;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: var(--green-soft);

    color: var(--green);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 38px;

    font-weight: 800;

} */


.success-data {

    max-width: 450px;

    margin: 25px auto;

}


.success-data>div {

    display: flex;

    justify-content: space-between;

    padding: 12px 0;

    border-bottom:
        1px solid var(--border);

}


.success-data span {

    color: var(--muted);

    font-size: 11px;

    font-weight: 700;

}


.downloads {

    display: flex;

    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;

}


.new-invoice {

    margin-top: 25px;

}


/* MODAL DE AYUDA */
.help-modal {
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
}
/* HEADER*/
.help-modal .modal-header {
    padding: 5px 12px 5px;
    border-bottom: 1px solid #eef0f3;
    background: #ffffff;
}

.help-modal .modal-header h2 {
    margin: 0;
    color: #252b33;
    font-size: 21px;
    font-weight: 700;
}

.modal-subtitle {
    margin: 5px 0 0;
    color: #7a828c;
    font-size: 13px;
}
/* BODY*/
.help-modal .modal-body {
    padding: 8px 13px 14px;
}
/* AVISO DE FACTURACIÓN */
.facturacion-aviso {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 10px 10px;
    margin-bottom: 10px;
    background: #fff9e8;
    border: 1px solid #f3df9a;
    border-left: 4px solid #e7b62c;
    border-radius: 10px;
}

.facturacion-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e7b62c;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
}

.facturacion-contenido {
    flex: 1;
}

.facturacion-titulo {
    margin-bottom: 5px;
    color: #6d5600;
    font-size: 14px;
    font-weight: 700;
}

.facturacion-texto {
    color: #5f5638;
    font-size: 13px;
    line-height: 1.55;
}

.facturacion-recomendacion {
    margin-top: 7px;
    color: #81764e;
    font-size: 12px;
    line-height: 1.45;
}
/*  CAJA DE AYUDA= */
.help-box {
    padding: 11px;
    background: #f8fafc;
    border: 1px solid #e7ebf0;
    border-radius: 11px;
}

.help-title {
    margin-bottom: 6px;
    color: #303740;
    font-size: 15px;
    font-weight: 700;
}

.help-description {
    margin-bottom: 17px;
    color: #7a828c;
    font-size: 12.5px;
    line-height: 1.5;
}
/* CONTACTOS */
.help-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid #e9edf1;
}

.contact-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e3e7eb;
    font-size: 17px;
}

.contact-label {
    display: block;
    margin-bottom: 2px;
    color: #89919b;
    font-size: 11px;
}

.contact-value {
    display: block;
    color: #343b44;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.contact-link {
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #168a4b;
}


/* PRIVACIDAD */
.help-privacy {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e7ec;
    text-align: center;
}

.help-privacy > a {
    color: #5f6b78;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: underline;
}


.privacy-text {
    margin-top: 9px;
    color: #9299a2;
    font-size: 10.5px;
    line-height: 1.5;
}

/* BOTÓN CERRAR */
.help-modal .modal-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8b939d;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.help-modal .modal-close:hover {
    background: #f1f3f5;
    color: #343a40;
}

.phone {
    font-size: 19px;
    font-weight: 800;
    margin: 7px;
}


.email {

    color: var(--red);

    font-weight: 700;

    margin-top: 15px;

}


.privacy {

    margin-top: 20px;

    padding: 15px;

    text-align: left;

    border-top:
        1px solid var(--border);

    font-size: 13px;

    color: var(--muted);

}

/* =====================================================
   VALIDACIONES DE CAMPOS
===================================================== */

.field-error {
    display: none;
    color: var(--red);
    font-size: 11px;
    font-weight: 600;
}

.field.error input,
.field.error select,
.field.error textarea {
    border-color: var(--red);
    background: #fff8f8;
}

.field.error .field-error {
    display: block;
}

.field-success {
    display: none;
    color: var(--green);
    font-size: 11px;
    font-weight: 600;
}

.field.success input,
.field.success select,
.field.success textarea {
    border-color: var(--green);
    background: #fff8f8;
}

.field.success .field-success {
    display: block;
}

/* RESPONSIVE */

@media(max-width:950px) {
    .ticket-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    /* .ticket-data {
        grid-template-columns:repeat(2,1fr);
    } */
    .summary {
        display: none;
    }

    .summary-footer {
        display: flex;
    }
}


@media(max-width:650px) {

    body {
        padding-bottom: 150px;
    }

    .header {
        /* height: 68px; */
        padding: 0 15px;
    }

    .header-logo img {
        width: 145px;
    }

    .header-actions>span {
        display: none;
    }

    .content {
        padding: 6px 10px 0px;;
    }

    .hero h1 {
        font-size: 25px;
    }

    .card {
        padding: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .ticket-grid {
        grid-template-columns: 1fr;
    }

    .ticket-data {
        flex-direction: column;
        gap: 9px;
    }

    .ticket {
        align-items: flex-start;
        gap: 12px;
    }

    .inline {
        grid-template-columns: 1fr;
    }

    .summary-footer {
        height: auto;
        min-height: 120px;
        padding: 12px;
        gap: 20px;
        flex-wrap: wrap;
    }

    .footer-validations {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .captcha {
        grid-template-columns: 1fr;
    }

    .captcha-image,
    .captcha-refresh {
        width: 220px;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .review-total {
        grid-column: auto;
    }

    .downloads {
        flex-direction: column;
    }

    .downloads .btn {
        width: 100%;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   TOASTS
========================================================= */
.toast-container {

    position: fixed;

    top: 90px;

    right: 25px;

    z-index: 2000;

    display: flex;

    flex-direction: column;

    gap: 12px;

    width:
        min(390px,
            calc(100vw - 30px));

}


.toast {

    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 17px;
    color: #fff;
    /*
       Transparencia
    */
    background: rgba(17, 17, 17, .55);

    /*
       Efecto vidrio
    */
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    /*
       Borde sutil
    */
    border: 1px solid rgba(255, 255, 255, .25);
    border-left: 3px solid var(--red);
    border-radius: 14px;
    /*
       Shadow principal
    */
    box-shadow:
        0 20px 50px rgba(0, 0, 0, .25),

        0 5px 15px rgba(0, 0, 0, .12),

        inset 0 1px 0 rgba(255, 255, 255, .20);

    overflow: hidden;

    animation:
        toastIn .3s cubic-bezier(.21, 1.02, .73, 1);

}


/*
   Brillo superior
*/

.toast::before {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 1px;

    background:
        linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, .25),
            transparent);

}


/* =========================================================
   ICON
========================================================= */

.toast-icon {

    width: 30px;

    height: 30px;

    flex: none;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 13px;

    font-weight: 800;

    background:
        rgba(255, 255, 255, .10);

    border:
        1px solid rgba(255, 255, 255, .12);

    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, .08);

}


/* =========================================================
   CONTENT
========================================================= */

.toast-content {

    flex: 1;

    min-width: 0;

}


.toast-title {

    color: #fff;

    font-size: 13px;

    font-weight: 800;

    margin-bottom: 4px;

}


.toast-message {

    color:
        rgba(255, 255, 255, .70);

    font-size: 12px;

    line-height: 1.5;

}


/* CLOSE */

.toast-close {
    width: 25px;
    height: 25px;
    flex: none;
    border: 0;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .55);
    font-size: 18px;
    line-height: 1;
    padding: 0;
    border-radius: 7px;
    transition: .2s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

/* TICKETS */
.tickets {
    margin-top: 12px;
}

.ticket {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
}

.ticket-table th,
.ticket-table td {
    padding: 3px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.ticket-table th {
    background: #f5f6f8;
    font-size: 12px;
    text-transform: uppercase;
}

.actions-column {
    width: 169px;
}

.ticket-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-detail {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding: 6px 8px;
}

.btn-detail:hover {
    color: #000;
}

.detail-icon {
    font-size: 10px;
    margin-right: 5px;
}

.remove {
    border: 0;
    background: #fff0f0;
    cursor: pointer;
    color: var(--red);
    font-size: 22px;
    line-height: 1;
    width: 35px;
    height: 35px;
    border-radius: 7px;
}

.ticket-detail {
    display: none;
    width: 100%;
    padding: 2px 10px 5px;
    /* background: #fafafa; 
    border: 1px solid #e5e7eb;*/
    border-top: none;
    box-sizing: border-box;
}

.ticket-detail.show {
    display: block;
}

.ticket-detail-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.ticket-detail-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.ticket-detail-table th,
.ticket-detail-table td {
    padding: 2px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.ticket-detail-table th {
    background: #f1f2f4;
    font-size: 12px;
    text-align: left;
}

.text-right {
    text-align: right !important;
}

.no-detail {
    text-align: center;
    color: #777;
    padding: 20px !important;
}

.ticket-box {
    background: #fafafa;
    border: 1px dashed #ccc;
    padding: 15px;
}

.ticket-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.error-content {
    text-align: center;
    padding: 30px;
}

.error-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fee2e2;
    color: #dc2626;

    font-size: 30px;
    font-weight: bold;
}

.error-content h2 {
    color: #991b1b;
    margin-bottom: 8px;
}

.invoice-error {
    margin: 20px 0;
    padding: 16px;

    text-align: left;

    background: #fff7f7;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;

    border-radius: 8px;
}

.error-title {
    margin-bottom: 10px;

    font-weight: 600;
    color: #991b1b;
}

.error-message {
    white-space: pre-wrap;
    word-break: break-word;

    color: #444;
    font-size: 14px;
    line-height: 1.5;

    max-height: 250px;
    overflow-y: auto;
}

.facturas-container {
    width: 100%;
    margin-top: 20px;
}

.facturas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.facturas-table th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
}

.facturas-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.facturas-table tbody tr:hover {
    background: #fafafa;
}

.status-success {
    color: #198754;
    font-weight: 500;
}

.factura-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
}

.btn-action {
    border: 0;
    border-radius: 5px;
    padding: 5px 9px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-pdf {
    background: #e9ecef;
    color: #333;
}

.btn-xml {
    background: #212529;
    color: white;
}

.btn-ticket {
    background: #0d6efd;
    color: white;
}

.btn-action:hover {
    opacity: 0.8;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* .ticket-data {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.ticket-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.ticket-detail {
    display: none;
    width: 100%;
    box-sizing: border-box;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.ticket-detail.show {
    display: block;
}

.ticket-detail-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.ticket-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.ticket-detail-table th,
.ticket-detail-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eee;
}

.ticket-detail-table th {
    background: #f5f6f8;
    font-weight: 600;
}

.btn-detail {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}



.remove {
    border: 0;
    background: #fff0f0;
    color: var(--red);
    width: 35px;
    height: 35px;
    border-radius: 7px;
} */
/* =========================================================
   SUCCESS
========================================================= */

.toast.success {

    border-left-color: #25c477;
    box-shadow:
        0 18px 45px rgba(0, 0, 0, .25),
        0 0 25px rgba(37, 196, 119, .08),
        inset 0 1px 0 rgba(255, 255, 255, .08);

}


.toast.success .toast-icon {

    background:
        rgba(37, 196, 119, .15);

    color:
        #42df91;

    border-color:
        rgba(37, 196, 119, .25);

}


/* =========================================================
   ERROR
========================================================= */

.toast.error {

    border-left-color: var(--red);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, .25),
        0 0 25px rgba(215, 25, 32, .10),
        inset 0 1px 0 rgba(255, 255, 255, .08);

}


.toast.error .toast-icon {

    background:
        rgba(215, 25, 32, .16);

    color:
        #ff5b61;

    border-color:
        rgba(215, 25, 32, .28);

}


/* =========================================================
   WARNING
========================================================= */

.toast.warning {

    border-left-color:
        #f59e0b;
    box-shadow:
        0 18px 45px rgba(0, 0, 0, .25),
        0 0 25px rgba(37, 196, 119, .08),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}


.toast.warning .toast-icon {

    background:
        rgba(245, 158, 11, .15);

    color:
        #ffc45b;

    border-color:
        rgba(245, 158, 11, .25);

}


/* =========================================================
   INFO
========================================================= */

.toast.info {

    border-left-color:
        #3b82f6;

}


.toast.info .toast-icon {

    background:
        rgba(59, 130, 246, .15);

    color:
        #60a5fa;

    border-color:
        rgba(59, 130, 246, .25);

}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes toastIn {

    from {

        opacity: 0;

        transform:
            translateX(35px) scale(.96);

    }

    to {

        opacity: 1;

        transform:
            translateX(0) scale(1);

    }

}


@keyframes toastOut {

    from {

        opacity: 1;

        transform:
            translateX(0) scale(1);

    }

    to {

        opacity: 0;

        transform:
            translateX(35px) scale(.96);

    }

}


.toast.removing {

    animation:
        toastOut .25s ease forwards;

}


/* =========================================================
   MOBILE
========================================================= */

@media(max-width:650px) {
    .ticket-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        top: 75px;
        right: 15px;
        left: 15px;
        width: auto;
    }
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* INE */
.ine-modal-content {
    width: 900px;
    max-width: 95vw;
}

.ine-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ine-section-header h3 {
    margin: 0;
}

.ine-section-header p {
    margin: 3px 0 0;
    color: #777;
}

.ine-table {
    width: 100%;
    border-collapse: collapse;
}

.ine-table th,
.ine-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
}

.ine-table th {
    background: #f6f6f6;
    font-size: 12px;
    text-align: left;
}

.ine-table input,
.ine-table select {
    width: 100%;
    min-height: 36px;
}

.ine-actions {
    width: 45px;
    text-align: center;
}

.contabilidades {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}

.contabilidad-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

.contabilidad-item button {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #b00020;
    font-weight: bold;
    padding: 0;
}

.contabilidad-nueva {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
}

.ine-contabilidad-input {
    width: 120px;
    padding: 5px 7px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.btn-confirmar-contabilidad {
    border: none;
    border-radius: 5px;
    background: #198754;
    color: white;
    cursor: pointer;
    padding: 5px 9px;
}

.btn-add-contabilidad {
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #111;
    cursor: pointer;
    padding: 2px 0;
}

.btn-add-contabilidad:hover {
    text-decoration: underline;
}

.empty-ine {
    padding: 15px;
    text-align: center;
    color: #777;
    border: 1px dashed #ccc;
    margin-top: 10px;
}

.ine-entidades-section {
    margin-top: 20px;
}

/* AYUDA */
/* .help-box{

    text-align:center;

    line-height:1.7;
}

.help-title{

    color:var(--red);

    font-size:18px;

    font-weight:800;

    margin-bottom:12px;
}

.help-phone{

    font-size:19px;

    font-weight:800;

    margin:8px 0;
}

.help-email{

    color:var(--red);

    font-weight:700;

    margin-bottom:20px;
}

.help-privacy{

    padding:14px;

    background:#f7f7f7;

    border-radius:8px;

    font-size:12px;

    color:#666;

    text-align:left;

    line-height:1.6;
} */
