/* ===== user-settings.css | scope .page-user-settings ===== */
/* Estilos específicos: user-settings.php */


/* ===== Modernización uniforme del panel ===== */
body.page-user-settings .page-heading {background:#fff;border:1px solid #dfe8f4;border-radius:16px;padding:20px 22px;margin-bottom:18px;box-shadow:0 10px 30px rgba(30,64,175,.06);display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;}
body.page-user-settings .page-heading h1,
body.page-user-settings .page-heading h2 {margin:0;color:#0f172a;letter-spacing:-.03em;}
body.page-user-settings .eyebrow {color:#1468f3!important;font-size:11px!important;font-weight:900!important;letter-spacing:.12em;text-transform:uppercase;}
body.page-user-settings .page-description {color:#6b7a94;line-height:1.55;}
body.page-user-settings .panel,
body.page-user-settings .contracts-panel {background:#fff;border:1px solid #dfe8f4!important;border-radius:16px!important;box-shadow:0 10px 30px rgba(30,64,175,.06)!important;padding:20px 22px!important;margin-bottom:18px;}
body.page-user-settings .btn {border-radius:9px!important;min-height:42px;padding:0 17px!important;display:inline-flex!important;align-items:center;justify-content:center;gap:8px;font-weight:800!important;transition:.18s ease!important;}
body.page-user-settings .btn:not(.btn-outline):not(.btn-secondary):not(.btn-whatsapp) {background:linear-gradient(135deg,#2676ff,#0f63ef)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 8px 18px rgba(20,104,243,.16);}
body.page-user-settings .btn-outline,
body.page-user-settings .btn-secondary {background:#fff!important;color:#465875!important;border:1px solid #cbd8ea!important;}
body.page-user-settings input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
body.page-user-settings select,
body.page-user-settings textarea {border:1px solid #cfdaea!important;border-radius:10px!important;background:#fff;transition:border-color .18s ease,box-shadow .18s ease;}
body.page-user-settings input:not([type=checkbox]):not([type=radio]):not([type=hidden]):focus,
body.page-user-settings select:focus,
body.page-user-settings textarea:focus {outline:none!important;border-color:#87b4ff!important;box-shadow:0 0 0 3px rgba(20,104,243,.09)!important;}
body.page-user-settings .table-wrap {border:1px solid #e5ebf4;border-radius:12px;overflow:auto;background:#fff;}
body.page-user-settings table {border-collapse:collapse;}
body.page-user-settings thead th {background:#f5f8fc!important;color:#51617c!important;text-transform:uppercase;font-size:11px!important;letter-spacing:.035em;}
body.page-user-settings tbody tr {transition:background .16s ease;}
body.page-user-settings tbody tr:hover {background:#fbfdff;}
body.page-user-settings .alert,
body.page-user-settings .contract-alert {border-radius:11px!important;}
@media (max-width:768px) {
body.page-user-settings .page-heading {padding:16px;border-radius:13px;align-items:flex-start}body.page-user-settings .panel,
body.page-user-settings .contracts-panel {padding:15px!important;border-radius:13px!important}body.page-user-settings .hero-actions {width:100%;display:flex;gap:8px;flex-wrap:wrap}body.page-user-settings .hero-actions .btn {flex:1 1 auto}
}

/* ===== Botón principal 50% ===== */
body.page-user-settings .form-actions { display:flex; width:100%; }
body.page-user-settings .form-actions > .btn { width:50% !important; max-width:none !important; justify-content:center; }
@media (max-width:600px) {
 body.page-user-settings .form-actions > .btn { width:100% !important; } 
}



/* =========================================================
   INVOICES - CABECERA Y BUSCADOR COMPLETO 2026-09
   ========================================================= */

body.page-invoices .invoices-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 28px !important;
}

body.page-invoices .invoices-hero-main {
    align-items: center !important;
}

body.page-invoices .invoices-hero-copy > p:last-of-type {
    margin: 8px 0 0 !important;
}

body.page-invoices .invoices-new-button {
    width: auto !important;
    min-width: 0 !important;
    min-height: 36px !important;
    margin-top: 14px !important;
    padding: 0 13px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
}

body.page-invoices .invoices-new-button svg {
    width: 14px !important;
    height: 14px !important;
}

body.page-invoices .invoices-hero-side {
    min-width: 0 !important;
    width: 205px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

body.page-invoices .invoices-count-card {
    width: 100% !important;
    min-height: 108px !important;
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
}

body.page-invoices .invoices-count-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: var(--invoice-blue, #1468f3);
    box-shadow: 0 5px 16px rgba(20, 104, 243, .08);
}

body.page-invoices .invoices-count-icon svg {
    width: 23px;
    height: 23px;
}

body.page-invoices .invoices-count-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.page-invoices .invoices-count-copy span,
body.page-invoices .invoices-count-copy strong,
body.page-invoices .invoices-count-copy small {
    display: block;
}

body.page-invoices .invoice-search-form-complete {
    display: grid !important;
    grid-template-columns: minmax(300px, 2fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(170px, .7fr) !important;
    align-items: end !important;
    gap: 10px !important;
}

body.page-invoices .invoice-filter-field {
    min-width: 0;
}

body.page-invoices .invoice-filter-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--invoice-text, #0f172a);
    font-size: 12px;
    font-weight: 800;
}

body.page-invoices .invoice-filter-field select {
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 0 34px 0 12px;
    border: 1px solid #cfdaea !important;
    border-radius: 9px !important;
    background-color: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

body.page-invoices .invoice-search-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
}

body.page-invoices .invoice-search-actions .invoices-btn {
    min-height: 38px !important;
}

@media (max-width: 1180px) {
    body.page-invoices .invoice-search-form-complete {
        grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(135px, .8fr)) !important;
    }

    body.page-invoices .invoice-search-actions {
        grid-column: 1 / -1;
        max-width: 230px;
        justify-self: end;
        width: 100%;
    }
}

@media (max-width: 767px) {
    body.page-invoices .invoices-hero {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    body.page-invoices .invoices-hero-side {
        width: 100% !important;
        justify-content: flex-end !important;
    }

    body.page-invoices .invoices-count-card {
        width: min(205px, 100%) !important;
        min-height: 84px !important;
        grid-template-columns: 40px minmax(0, 1fr) !important;
        padding: 11px 13px !important;
    }

    body.page-invoices .invoices-count-icon {
        width: 40px;
        height: 40px;
    }

    body.page-invoices .invoice-search-form-complete {
        grid-template-columns: 1fr !important;
    }

    body.page-invoices .invoice-filter-field label {
        display: none;
    }

    body.page-invoices .invoice-search-actions {
        grid-column: auto;
        max-width: none;
        justify-self: stretch;
    }
}

/* =========================================================
   INVOICES - CARDS CON ESTILO DEL DASHBOARD
   ========================================================= */

body.page-invoices .invoices-page .dashboard-card,
body.page-invoices .invoice-summary-card,
body.page-invoices .invoices-count-card {
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

/* Hero: misma tarjeta blanca limpia del dashboard */
body.page-invoices .invoices-hero {
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

/* Tarjeta total facturas: apariencia metric-card */
body.page-invoices .invoices-count-card {
    min-height: 108px !important;
    padding: 16px !important;
    background: #fff !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
}

body.page-invoices .invoices-count-icon {
    width: 48px !important;
    height: 48px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 13px !important;
    background: #edf5ff !important;
    color: #1468f3 !important;
    box-shadow: none !important;
}

body.page-invoices .invoices-count-icon svg {
    width: 23px !important;
    height: 23px !important;
}

body.page-invoices .invoices-count-copy span {
    margin-bottom: 5px !important;
    color: #52627f !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

body.page-invoices .invoices-count-copy strong {
    color: #0f172a !important;
    font-size: 28px !important;
    line-height: 1.15 !important;
    letter-spacing: -.03em !important;
}

body.page-invoices .invoices-count-copy small {
    margin-top: 8px !important;
    color: #7a879d !important;
    font-size: 12px !important;
}

/* Resumen: mismo patrón de las metric-card del dashboard */
body.page-invoices .invoice-summary-grid {
    gap: 14px !important;
}

body.page-invoices .invoice-summary-card {
    min-height: 118px !important;
    padding: 16px !important;
    position: relative !important;
    overflow: hidden !important;
}

body.page-invoices .invoice-summary-card::before {
    width: 4px !important;
    border-radius: 14px 0 0 14px !important;
}

body.page-invoices .invoice-summary-label {
    display: block !important;
    margin-bottom: 5px !important;
    color: #52627f !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

body.page-invoices .invoice-summary-card strong {
    display: block !important;
    color: #0f172a !important;
    font-size: clamp(20px, 1.65vw, 30px) !important;
    line-height: 1.15 !important;
    letter-spacing: -.03em !important;
}

body.page-invoices .invoice-summary-card small {
    display: block !important;
    margin-top: 8px !important;
    color: #7a879d !important;
    font-size: 12px !important;
}

body.page-invoices .invoice-summary-all {
    background: #fff !important;
}

body.page-invoices .invoice-summary-pending {
    background: linear-gradient(180deg, #fff, #fffbf0) !important;
}

body.page-invoices .invoice-summary-paid {
    background: linear-gradient(180deg, #fff, #f6fff8) !important;
}

body.page-invoices .invoice-summary-cancelled {
    background: linear-gradient(180deg, #fff, #fff5f5) !important;
}

/* Buscador y listado: mismas tarjetas del dashboard */
body.page-invoices .invoice-search-card,
body.page-invoices .invoice-list-card {
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-invoices .invoice-search-card {
    padding: 20px !important;
}

body.page-invoices .invoice-list-card {
    overflow: hidden !important;
}

body.page-invoices .invoice-list-header {
    padding: 18px 20px !important;
}

@media (max-width: 767px) {
    body.page-invoices .invoices-page .dashboard-card,
    body.page-invoices .invoice-summary-card,
    body.page-invoices .invoices-count-card,
    body.page-invoices .invoice-search-card,
    body.page-invoices .invoice-list-card {
        border-radius: 13px !important;
    }

    body.page-invoices .invoice-summary-card {
        min-height: 105px !important;
        padding: 13px !important;
    }

    body.page-invoices .invoices-count-card {
        min-height: 84px !important;
        grid-template-columns: 42px minmax(0, 1fr) !important;
        padding: 12px !important;
    }

    body.page-invoices .invoices-count-icon {
        width: 42px !important;
        height: 42px !important;
    }
}

/* =========================================================
   QUOTATION LIST - ACCIONES COMPACTAS
   MISMO ESTILO QUE DASHBOARD
   ========================================================= */

.quotation-actions-cell {
    width: 90px;
}

.quotation-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quotation-delete-form {
    display: inline-flex;
    margin: 0;
}

/* Base de ambos botones */
.quotation-action-button {
    width: 34px;
    height: 34px;

    display: inline-grid;
    place-items: center;

    flex: 0 0 34px;

    padding: 0 !important;

    border: 1px solid #d7e1ee;
    border-radius: 9px;

    background: #fff;

    text-decoration: none;
    cursor: pointer;

    transition:
        background .16s ease,
        border-color .16s ease,
        color .16s ease,
        transform .16s ease,
        box-shadow .16s ease;
}

.quotation-action-button svg {
    width: 17px;
    height: 17px;
    display: block;
}

/* OJO */
.quotation-action-view {
    color: #52627f;
}

.quotation-action-view:hover {
    color: #1468f3;
    border-color: #bcd1f3;
    background: #f3f7ff;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px
        rgba(20, 104, 243, .08);
}

/* ELIMINAR */
.quotation-action-delete {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff7f7;
}

.quotation-action-delete:hover {
    color: #b91c1c;
    border-color: #fca5a5;
    background: #fff1f2;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px
        rgba(220, 38, 38, .08);
}

/* MÓVIL */
@media (max-width: 767px) {

    .quotation-action-button {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        border-radius: 8px;
    }

    .quotation-action-button svg {
        width: 15px;
        height: 15px;
    }

}

/* CLIENTS.PHP - añadir al final de assets/css/app.css */

.page-clients .clients-page,
.clients-page{
    width:min(100%,1220px);
    margin:0 auto;
}

.page-clients .clients-hero,
.clients-page .clients-hero{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    min-height:112px;
    padding:22px 26px;
    margin-bottom:18px;
    background:#fff;
    border:1px solid #dfe8f4;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(30,64,175,.06);
}

.page-clients .clients-hero-main,
.clients-page .clients-hero-main{
    display:flex;
    align-items:center;
    gap:18px;
    min-width:0;
}

.page-clients .clients-hero-icon,
.clients-page .clients-hero-icon{
    width:58px;
    height:58px;
    flex:0 0 58px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:#eef5ff;
    color:#1468f3;
}

.page-clients .clients-eyebrow,
.clients-page .clients-eyebrow{
    margin:0 0 5px;
    color:#1468f3;
    font-size:11px;
    font-weight:900;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.page-clients .clients-hero h1,
.clients-page .clients-hero h1{
    margin:0;
    color:#0f172a;
    font-size:clamp(28px,3vw,36px);
    line-height:1.05;
    letter-spacing:-.04em;
}

.page-clients .clients-hero-copy,
.clients-page .clients-hero-copy{
    margin:7px 0 0;
    color:#64748b;
    font-size:14px;
    line-height:1.5;
}

.page-clients .clients-hero-actions,
.clients-page .clients-hero-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex:0 0 auto;
}

.page-clients .clients-back-button,
.clients-page .clients-back-button{
    width:160px;
    min-height:52px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:0 18px;
    border:1px solid #cfdbeb;
    border-radius:11px;
    background:#fff;
    color:#334155;
    text-decoration:none;
    font-size:13px;
    font-weight:800;
    transition:.18s ease;
}

.page-clients .clients-back-button svg,
.clients-page .clients-back-button svg{
    width:18px;
    height:18px;
}

.page-clients .clients-back-button:hover,
.clients-page .clients-back-button:hover{
    color:#1468f3;
    border-color:#b8cdf0;
    background:#f7faff;
    transform:translateY(-1px);
}

.page-clients .clients-card,
.clients-page .clients-card{
    padding:20px 24px;
    margin-bottom:18px;
    background:#fff;
    border:1px solid #dfe8f4;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(30,64,175,.06);
}

.page-clients .clients-section-heading,
.clients-page .clients-section-heading{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:20px;
}

.page-clients .clients-section-icon,
.clients-page .clients-section-icon{
    width:46px;
    height:46px;
    flex:0 0 46px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:linear-gradient(135deg,#2676ff,#0f63ef);
    color:#fff;
    box-shadow:0 8px 18px rgba(20,104,243,.18);
}

.page-clients .clients-section-heading h2,
.clients-page .clients-section-heading h2{
    margin:0;
    color:#0f172a;
    font-size:21px;
    letter-spacing:-.025em;
}

.page-clients .clients-section-heading p,
.clients-page .clients-section-heading p{
    margin:4px 0 0;
    color:#64748b;
    font-size:13px;
}

.page-clients .clients-form,
.clients-page .clients-form{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px 20px;
}

.page-clients .clients-field,
.clients-page .clients-field{
    display:block;
    min-width:0;
}

.page-clients .clients-field>span,
.clients-page .clients-field>span{
    display:block;
    margin-bottom:7px;
    color:#0f172a;
    font-size:12px;
    font-weight:800;
}

.page-clients .clients-field-full,
.clients-page .clients-field-full{
    grid-column:1/-1;
}

.page-clients .clients-input-wrap input,
.page-clients .clients-input-wrap textarea,
.clients-page .clients-input-wrap input,
.clients-page .clients-input-wrap textarea{
    width:100%;
    border:1px solid #cdd9e9!important;
    border-radius:9px!important;
    background:#fff;
    color:#0f172a;
    font:inherit;
    font-size:13px;
    outline:none;
}

.page-clients .clients-input-wrap input,
.clients-page .clients-input-wrap input{
    min-height:42px;
    padding:0 13px;
}

.page-clients .clients-input-wrap textarea,
.clients-page .clients-input-wrap textarea{
    min-height:84px;
    padding:12px 13px;
    resize:vertical;
}

.page-clients .clients-form-actions,
.clients-page .clients-form-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.page-clients .clients-btn,
.clients-page .clients-btn{
    min-height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border-radius:9px;
    padding:0 14px;
    font-size:12px;
    font-weight:800;
}

.page-clients .clients-btn-primary,
.clients-page .clients-btn-primary{
    border:1px solid transparent;
    background:linear-gradient(135deg,#2676ff,#0f63ef);
    color:#fff;
    box-shadow:0 8px 18px rgba(20,104,243,.14);
}

.page-clients .clients-btn-secondary,
.clients-page .clients-btn-secondary{
    border:1px solid #cbd8ea;
    background:#fff;
    color:#465875;
}

.page-clients .clients-list-card,
.clients-page .clients-list-card{
    padding:18px 20px 16px;
}

.page-clients .clients-list-heading,
.clients-page .clients-list-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:15px;
}

.page-clients .clients-section-heading-compact,
.clients-page .clients-section-heading-compact{
    margin:0;
}

.page-clients .clients-search,
.clients-page .clients-search{
    position:relative;
    width:min(320px,100%);
    margin:0;
}

.page-clients .clients-search input,
.clients-page .clients-search input{
    width:100%;
    min-height:40px;
    padding:0 13px!important;
    border:1px solid #cdd9e9!important;
    border-radius:9px!important;
    font-size:12px;
}

.page-clients .clients-table-wrap,
.clients-page .clients-table-wrap{
    overflow:auto;
    border:1px solid #e3eaf4;
    border-radius:12px;
}

.page-clients .clients-table,
.clients-page .clients-table{
    width:100%;
    border-collapse:collapse;
    font-size:12px;
}

.page-clients .clients-table thead th,
.clients-page .clients-table thead th{
    padding:11px 13px;
    background:#f5f8fc;
    color:#51617c;
    text-align:left;
    text-transform:uppercase;
    font-size:9px;
    font-weight:900;
    letter-spacing:.035em;
    white-space:nowrap;
}

.page-clients .clients-table td,
.clients-page .clients-table td{
    padding:11px 13px;
    border-top:1px solid #edf1f6;
    color:#475569;
    vertical-align:middle;
}

.page-clients .clients-table tbody tr:hover,
.clients-page .clients-table tbody tr:hover{
    background:#fbfdff;
}

.page-clients .client-id,
.clients-page .client-id,
.page-clients .client-name,
.clients-page .client-name{
    color:#172033;
    font-weight:800;
}

.page-clients .clients-actions,
.clients-page .clients-actions{
    display:flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
}

.page-clients .client-delete-form,
.clients-page .client-delete-form{
    display:inline-flex;
    margin:0;
}

.page-clients .client-action,
.clients-page .client-action{
    width:31px;
    height:31px;
    display:inline-grid;
    place-items:center;
    padding:0!important;
    border:1px solid #d7e1ee;
    border-radius:8px;
    background:#f8fbff;
    text-decoration:none;
    cursor:pointer;
}

.page-clients .client-action svg,
.clients-page .client-action svg{
    width:15px;
    height:15px;
}

.page-clients .client-action-view,
.clients-page .client-action-view{
    color:#1468f3;
}

.page-clients .client-action-edit,
.clients-page .client-action-edit{
    color:#3157d5;
    background:#f1f3ff;
}

.page-clients .client-action-delete,
.clients-page .client-action-delete{
    color:#dc2626;
    border-color:#fde0e3;
    background:#fff1f2;
}

@media(max-width:900px){
    .page-clients .clients-form,
    .clients-page .clients-form{
        grid-template-columns:1fr;
    }

    .page-clients .clients-field-full,
    .clients-page .clients-field-full{
        grid-column:auto;
    }
}

@media(max-width:767px){
    .page-clients .clients-hero,
    .clients-page .clients-hero{
        padding:18px;
        align-items:flex-start;
    }

    .page-clients .clients-back-button,
    .clients-page .clients-back-button{
        width:112px;
        min-height:44px;
    }

    .page-clients .clients-card,
    .clients-page .clients-card{
        padding:16px;
        border-radius:14px;
    }

    .page-clients .clients-list-heading,
    .clients-page .clients-list-heading{
        align-items:stretch;
        flex-direction:column;
    }

    .page-clients .clients-search,
    .clients-page .clients-search{
        width:100%;
    }
}

@media(max-width:520px){
    .page-clients .clients-hero,
    .clients-page .clients-hero{
        display:grid;
        grid-template-columns:1fr;
    }

    .page-clients .clients-hero-actions,
    .clients-page .clients-hero-actions{
        justify-content:stretch;
    }

    .page-clients .clients-back-button,
    .clients-page .clients-back-button{
        width:100%;
    }

    .page-clients .clients-form-actions,
    .clients-page .clients-form-actions{
        grid-template-columns:1fr;
    }
}

/* =========================================================
   CLIENTS.PHP — BUSCADOR CON LUPA FUERA DEL INPUT
   ========================================================= */
.clients-page .clients-search-wrap,
.clients-page .client-search-wrap,
.clients-page .clients-search-box {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.clients-page .clients-search-icon,
.clients-page .client-search-icon,
.clients-page .search-icon {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: 0 0 auto !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    pointer-events: none !important;
}

.clients-page .clients-search-icon svg,
.clients-page .client-search-icon svg,
.clients-page .search-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

.clients-page .clients-search-wrap input,
.clients-page .client-search-wrap input,
.clients-page .clients-search-box input,
.clients-page #clientSearch {
    flex: 1 1 auto !important;
    width: 100% !important;
    padding-left: 14px !important;
    background-image: none !important;
}

@media (max-width: 767px) {
    .clients-page .clients-search-wrap,
    .clients-page .client-search-wrap,
    .clients-page .clients-search-box {
        gap: 8px !important;
    }
}

/* =========================================================
   CLIENTS.PHP — LUPA FUERA DEL CAMPO DE BÚSQUEDA
   Corrección definitiva sobre el pseudo-icono existente.
   ========================================================= */

body.page-clients .clients-search,
.page-clients .clients-search,
.clients-page .clients-search {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    width: min(350px, 100%) !important;
    flex: 0 1 350px !important;
    margin: 0 !important;
}

/* Convertimos el ::before en un icono independiente,
   fuera del borde del input */
body.page-clients .clients-search::before,
.page-clients .clients-search::before,
.clients-page .clients-search::before {
    content: "" !important;
    position: static !important;
    inset: auto !important;

    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;

    border: 0 !important;
    border-radius: 0 !important;

    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")
        center / 20px 20px no-repeat !important;

    transform: none !important;
    transform-origin: initial !important;

    pointer-events: none !important;
}

/* El antiguo ::after era el mango de la lupa dibujada con CSS */
body.page-clients .clients-search::after,
.page-clients .clients-search::after,
.clients-page .clients-search::after {
    content: none !important;
    display: none !important;
}

/* El texto ya no necesita espacio para una lupa dentro */
body.page-clients .clients-search input,
.page-clients .clients-search input,
.clients-page .clients-search input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;

    padding: 0 14px !important;

    background-image: none !important;
}

@media (max-width: 767px) {
    body.page-clients .clients-search,
    .page-clients .clients-search,
    .clients-page .clients-search {
        width: 100% !important;
        flex: 1 1 100% !important;
        gap: 8px !important;
    }
}

/* =========================================================
   INVOICES.PHP — PATRÓN VISUAL CLIENTS.PHP
   Ajuste final: hero, volver y buscador con lupa exterior.
   ========================================================= */

/* Hero */
body.page-invoices .invoices-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 24px !important;
    padding: 22px 24px !important;
    margin-bottom: 18px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-invoices .invoices-hero-main {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

body.page-invoices .invoices-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 16px !important;
    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-invoices .invoices-hero-icon svg {
    width: 28px !important;
    height: 28px !important;
}

body.page-invoices .invoices-hero-copy > p:last-of-type {
    margin: 8px 0 0 !important;
}

body.page-invoices .invoices-new-button {
    width: auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    margin-top: 14px !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
}

/* Lado derecho: únicamente Volver */
body.page-invoices .invoices-hero-side {
    min-width: 0 !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

body.page-invoices .invoices-back-button {
    min-width: 160px !important;
    min-height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    padding: 0 18px !important;
    border: 1px solid #cbd8ea !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #465875 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease !important;
}

body.page-invoices .invoices-back-button svg {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
}

body.page-invoices .invoices-back-button:hover {
    background: #f8fafc !important;
    border-color: #aabbd2 !important;
    color: #334155 !important;
    transform: translateY(-1px) !important;
}

/* Si quedara HTML antiguo en caché/otra copia, no mostrar la tarjeta */
body.page-invoices .invoices-hero-side .invoices-count-card {
    display: none !important;
}

/* Buscador: lupa físicamente fuera del borde del input */
body.page-invoices .invoice-search-input-wrap,
body.page-invoices .invoice-search-input-external-icon {
    position: relative !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

body.page-invoices .invoice-search-icon {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    transform: none !important;
    pointer-events: none !important;
}

body.page-invoices .invoice-search-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

body.page-invoices .invoice-search-field input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    background-image: none !important;
    border: 1px solid #cfdaea !important;
    border-radius: 9px !important;
}

body.page-invoices .invoice-filter-field select {
    height: 42px !important;
    min-height: 42px !important;
}

body.page-invoices .invoice-search-actions .invoices-btn {
    min-height: 42px !important;
}

/* Cards y tabla: conservar patrón dashboard/clientes */
body.page-invoices .invoice-search-card,
body.page-invoices .invoice-list-card,
body.page-invoices .invoice-summary-card {
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

@media (max-width: 767px) {
    body.page-invoices .invoices-hero {
        grid-template-columns: 1fr !important;
        align-items: start !important;
        gap: 16px !important;
        padding: 16px !important;
        border-radius: 13px !important;
    }

    body.page-invoices .invoices-hero-main {
        align-items: flex-start !important;
    }

    body.page-invoices .invoices-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;
        border-radius: 14px !important;
    }

    body.page-invoices .invoices-hero-side {
        width: 100% !important;
        justify-content: flex-end !important;
    }

    body.page-invoices .invoices-back-button {
        min-width: 140px !important;
        min-height: 46px !important;
    }

    body.page-invoices .invoice-search-input-wrap,
    body.page-invoices .invoice-search-input-external-icon {
        gap: 8px !important;
    }
}


/* =========================================================
   INVOICES — NUEVA FACTURA DELANTE DE VOLVER
   ========================================================= */
body.page-invoices .invoices-hero-side {
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

body.page-invoices .invoices-hero-side .invoices-new-button {
    margin-top: 0 !important;
    min-height: 52px !important;
    padding: 0 18px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
}

body.page-invoices .invoices-hero-side .invoices-back-button {
    white-space: nowrap !important;
}

@media (max-width: 767px) {
    body.page-invoices .invoices-hero-side {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
    }

    body.page-invoices .invoices-hero-side .invoices-new-button,
    body.page-invoices .invoices-hero-side .invoices-back-button {
        min-height: 46px !important;
    }
}

/* =========================================================
   INVOICES — CARDS DE RESUMEN CON FONDO POR ESTADO
   Sin línea lateral.
   ========================================================= */

/* Eliminar completamente la línea lateral */
body.page-invoices .invoice-summary-card::before {
    content: none !important;
    display: none !important;
}

/* Total */
body.page-invoices .invoice-summary-card.invoice-summary-all {
    background: #eef5ff !important;
    border-color: #d7e7ff !important;
}

/* Pendientes */
body.page-invoices .invoice-summary-card.invoice-summary-pending {
    background: #fff7ed !important;
    border-color: #ffedd5 !important;
}

/* Pagadas */
body.page-invoices .invoice-summary-card.invoice-summary-paid {
    background: #ecfdf3 !important;
    border-color: #d1fae5 !important;
}

/* Canceladas */
body.page-invoices .invoice-summary-card.invoice-summary-cancelled {
    background: #fff1f2 !important;
    border-color: #ffe4e6 !important;
}

/* Mantener texto limpio y legible */
body.page-invoices .invoice-summary-card .invoice-summary-label {
    color: #52627f !important;
}

body.page-invoices .invoice-summary-card strong {
    color: #0f172a !important;
}

body.page-invoices .invoice-summary-card small {
    color: #7a879d !important;
}


/* =========================================================
   INVOICES — BUSCADOR 100% SIN BOTONES NI FILTROS
   ========================================================= */
body.page-invoices .invoice-search-form,
body.page-invoices .invoice-search-form-complete {
    display: block !important;
    width: 100% !important;
}

body.page-invoices .invoice-search-field {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

body.page-invoices .invoice-search-input-wrap,
body.page-invoices .invoice-search-input-external-icon {
    width: 100% !important;
    max-width: none !important;
}

body.page-invoices .invoice-search-field input {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
}


/* =========================================================
   INVOICES — FACTURADO POR MES / FACTURADO POR AÑO
   50% + 50%, mismo estilo del dashboard.
   ========================================================= */
body.page-invoices .invoice-billing-charts {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin: 0 0 18px !important;
}

body.page-invoices .invoice-billing-card {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 350px !important;
    padding: 20px 22px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30,64,175,.06) !important;
    overflow: hidden !important;
}

body.page-invoices .invoice-billing-card-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-bottom: 14px !important;
}

body.page-invoices .invoice-billing-card-header .clients-eyebrow {
    margin: 0 0 5px !important;
    color: #1468f3 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
}

body.page-invoices .invoice-billing-card-header h2 {
    margin: 0 !important;
    color: #172033 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

body.page-invoices .invoice-billing-total {
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

body.page-invoices .invoice-line-chart,
body.page-invoices .invoice-donut-chart {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 255px !important;
}

body.page-invoices .invoice-line-chart {
    overflow: hidden !important;
}

body.page-invoices .invoice-line-chart svg {
    display: block !important;
    width: 100% !important;
    min-height: 250px !important;
}

body.page-invoices .invoice-donut-chart {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.page-invoices .invoice-donut-chart .billing-pie {
    width: 195px !important;
    height: 195px !important;
}

body.page-invoices .invoice-donut-chart .billing-pie-center {
    inset: 12px !important;
}

@media (max-width: 900px) {
    body.page-invoices .invoice-billing-charts {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 767px) {
    body.page-invoices .invoice-billing-card {
        min-height: 0 !important;
        padding: 17px !important;
    }

    body.page-invoices .invoice-line-chart,
    body.page-invoices .invoice-donut-chart {
        min-height: 230px !important;
    }
}

/* =========================================================
   FIX INVOICES — ESTILOS COMPLETOS DE LOS GRÁFICOS
   El JS reutiliza las clases del dashboard, que estaban
   limitadas a body.page-index. Aquí se habilitan en Facturas.
   ========================================================= */

body.page-invoices .invoice-billing-charts {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    margin: 0 0 18px !important;
}

body.page-invoices .invoice-billing-card {
    min-width: 0 !important;
    width: 100% !important;
    padding: 20px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
    overflow: hidden !important;
}

body.page-invoices .invoice-billing-card-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
}

body.page-invoices .invoice-billing-card-header h2 {
    margin: 0 !important;
    color: #172033 !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
    line-height: 1.2 !important;
}

body.page-invoices .invoice-billing-card-header .clients-eyebrow {
    margin: 0 0 5px !important;
    color: #1468f3 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
}

body.page-invoices .invoice-billing-total {
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* Gráfico mensual */
body.page-invoices .line-chart {
    position: relative !important;
    width: 100% !important;
    min-height: 290px !important;
}

body.page-invoices .line-chart svg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 270px !important;
    overflow: visible !important;
}

body.page-invoices .chart-grid-line {
    stroke: #e8eef7 !important;
    stroke-width: 1 !important;
}

body.page-invoices .chart-axis-label {
    fill: #71809a !important;
    font-size: 12px !important;
}

body.page-invoices .chart-line {
    fill: none !important;
    stroke: #1468f3 !important;
    stroke-width: 3 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

body.page-invoices .chart-area {
    fill: url(#billingAreaGradient) !important;
}

body.page-invoices .chart-point {
    fill: #1468f3 !important;
    stroke: #fff !important;
    stroke-width: 3 !important;
    cursor: pointer !important;
}

body.page-invoices .chart-tooltip-bg {
    fill: #fff !important;
    stroke: #dbe5f2 !important;
    stroke-width: 1 !important;
    filter: drop-shadow(0 6px 12px rgba(15, 23, 42, .12)) !important;
}

body.page-invoices .chart-tooltip-label {
    fill: #64748b !important;
    font-size: 11px !important;
}

body.page-invoices .chart-tooltip-value {
    fill: #0f172a !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

/* Gráfico anual */
body.page-invoices .donut-chart-wrap {
    min-height: 300px !important;
    display: grid !important;
    place-items: center !important;
}

body.page-invoices .donut-layout {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    gap: 18px !important;
}

body.page-invoices .billing-pie {
    position: relative !important;
    width: 195px !important;
    height: 195px !important;
    aspect-ratio: 1 !important;
    border-radius: 50% !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .04) !important;
}

body.page-invoices .billing-pie-center {
    position: absolute !important;
    inset: 12px !important;
    display: grid !important;
    place-items: center !important;
    align-content: center !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .06) !important;
    text-align: center !important;
}

body.page-invoices .billing-pie-center span {
    color: #71809a !important;
    font-size: 12px !important;
}

body.page-invoices .billing-pie-center strong {
    margin-top: 4px !important;
    color: #172033 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

body.page-invoices .billing-chart-legend {
    width: 100% !important;
    display: grid !important;
    gap: 8px !important;
}

body.page-invoices .billing-legend-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 7px 9px !important;
    background: #f8fafc !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 9px !important;
}

body.page-invoices .billing-legend-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    color: #52627f !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

body.page-invoices .billing-legend-dot {
    width: 9px !important;
    height: 9px !important;
    flex: 0 0 9px !important;
    display: inline-block !important;
    border-radius: 50% !important;
}

body.page-invoices .billing-legend-value {
    color: #172033 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

body.page-invoices .billing-empty {
    min-height: 230px !important;
    display: grid !important;
    place-items: center !important;
    color: #71809a !important;
    font-size: 13px !important;
    text-align: center !important;
}

/* Tablet: siguen al 50% mientras haya espacio razonable */
@media (max-width: 1050px) and (min-width: 768px) {
    body.page-invoices .invoice-billing-charts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    body.page-invoices .invoice-billing-card {
        padding: 16px !important;
    }

    body.page-invoices .invoice-billing-card-header h2 {
        font-size: 18px !important;
    }
}

/* Móvil: una debajo de otra */
@media (max-width: 767px) {
    body.page-invoices .invoice-billing-charts {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    body.page-invoices .invoice-billing-card {
        padding: 16px !important;
    }

    body.page-invoices .line-chart {
        min-height: 230px !important;
    }

    body.page-invoices .line-chart svg {
        min-height: 225px !important;
    }

    body.page-invoices .donut-chart-wrap {
        min-height: 240px !important;
    }

    body.page-invoices .billing-pie {
        width: 195px !important;
        height: 195px !important;
    }
}


/* =========================================================
   INVOICES — CARDS DE ESTADO IDÉNTICAS AL PATRÓN DASHBOARD
   ========================================================= */
body.page-invoices .invoice-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin-bottom: 18px !important;
}

body.page-invoices .invoice-summary-card {
    min-width: 0 !important;
    min-height: 118px !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    padding: 16px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(30,64,175,.06) !important;
    overflow: hidden !important;
}

body.page-invoices .invoice-summary-card::before,
body.page-invoices .invoice-summary-card::after {
    content: none !important;
    display: none !important;
}

body.page-invoices .invoice-summary-icon {
    width: 48px !important;
    height: 48px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 13px !important;
    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-invoices .invoice-summary-icon svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

body.page-invoices .invoice-summary-content {
    min-width: 0 !important;
}

body.page-invoices .invoice-summary-label {
    display: block !important;
    margin: 0 0 5px !important;
    color: #52627f !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

body.page-invoices .invoice-summary-card strong {
    display: block !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-size: clamp(20px, 1.65vw, 30px) !important;
    line-height: 1.15 !important;
    letter-spacing: -.03em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.page-invoices .invoice-summary-card small {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin-top: 8px !important;
    color: #7a879d !important;
    font-size: 12px !important;
}

/* Total — azul */
body.page-invoices .invoice-summary-all {
    background: #fff !important;
}

body.page-invoices .invoice-summary-all .invoice-summary-icon {
    color: #1468f3 !important;
    background: #eef5ff !important;
}

/* Pendientes — ámbar, igual que metric-amber */
body.page-invoices .invoice-summary-pending {
    background: linear-gradient(180deg, #fff, #fffbf0) !important;
}

body.page-invoices .invoice-summary-pending .invoice-summary-icon {
    color: #d98a00 !important;
    background: #fff2c9 !important;
}

/* Pagadas — verde */
body.page-invoices .invoice-summary-paid {
    background: #fff !important;
}

body.page-invoices .invoice-summary-paid .invoice-summary-icon {
    color: #19a35b !important;
    background: #eafaf0 !important;
}

/* Canceladas — rojo, igual que metric-red */
body.page-invoices .invoice-summary-cancelled {
    background: linear-gradient(180deg, #fff, #fff5f5) !important;
}

body.page-invoices .invoice-summary-cancelled .invoice-summary-icon {
    color: #e52531 !important;
    background: #ffe0e3 !important;
}

body.page-invoices .invoice-summary-cancelled strong {
    color: #e52531 !important;
}

@media (max-width: 1050px) {
    body.page-invoices .invoice-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    body.page-invoices .invoice-summary-grid {
        grid-template-columns: 1fr !important;
    }

    body.page-invoices .invoice-summary-card {
        min-height: 104px !important;
    }
}


/* =========================================================
   INVOICES — GRÁFICOS COMO EL DISEÑO DEL DASHBOARD MOSTRADO
   ========================================================= */

body.page-invoices .invoice-billing-charts {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    margin: 0 0 18px !important;
}

body.page-invoices .invoice-billing-card {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 345px !important;
    padding: 20px !important;
    background: #ffffff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
    overflow: hidden !important;
}

body.page-invoices .invoice-billing-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

body.page-invoices .invoice-billing-title-row h2 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em !important;
}

body.page-invoices .invoice-billing-title-icon {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
}

body.page-invoices .invoice-billing-title-icon svg {
    width: 23px !important;
    height: 23px !important;
    display: block !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

body.page-invoices .invoice-billing-title-icon-month {
    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-invoices .invoice-billing-title-icon-year {
    background: #eafaf0 !important;
    color: #16a34a !important;
}

/* -------- Facturado por mes -------- */

body.page-invoices .invoice-line-chart {
    position: relative !important;
    width: 100% !important;
    min-height: 270px !important;
    overflow: hidden !important;
}

body.page-invoices .invoice-line-chart svg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 260px !important;
    overflow: visible !important;
}

body.page-invoices .invoice-line-chart .chart-grid-line {
    stroke: #dce6f2 !important;
    stroke-width: 1 !important;
    stroke-dasharray: 4 4 !important;
}

body.page-invoices .invoice-line-chart .chart-axis-label {
    fill: #6f7f9b !important;
    font-size: 12px !important;
}

body.page-invoices .invoice-line-chart .chart-line {
    fill: none !important;
    stroke: #1468f3 !important;
    stroke-width: 3 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

body.page-invoices .invoice-line-chart .chart-area {
    fill: url(#billingAreaGradient) !important;
    opacity: .68 !important;
}

body.page-invoices .invoice-line-chart .chart-point {
    fill: #1468f3 !important;
    stroke: #ffffff !important;
    stroke-width: 3 !important;
}

/* -------- Facturado por año -------- */

body.page-invoices .invoice-donut-chart {
    width: 100% !important;
    min-height: 270px !important;
    display: grid !important;
    place-items: center !important;
}

body.page-invoices .invoice-donut-chart .donut-layout {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(190px, .8fr) minmax(180px, 1fr) !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 24px !important;
}

body.page-invoices .invoice-donut-chart .billing-pie {
    position: relative !important;
    width: 195px !important;
    height: 195px !important;
    aspect-ratio: 1 !important;
    border-radius: 50% !important;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,.04) !important;
}

body.page-invoices .invoice-donut-chart .billing-pie-center {
    position: absolute !important;
    inset: 29px !important;
    display: grid !important;
    place-items: center !important;
    align-content: center !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    text-align: center !important;
}

body.page-invoices .invoice-donut-chart .billing-pie-center span {
    color: #71809a !important;
    font-size: 12px !important;
}

body.page-invoices .invoice-donut-chart .billing-pie-center strong {
    margin-top: 3px !important;
    color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 800 !important;
}

body.page-invoices .invoice-donut-chart .billing-chart-legend {
    width: 100% !important;
    display: grid !important;
    gap: 12px !important;
}

body.page-invoices .invoice-donut-chart .billing-legend-item {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    font-size: 13px !important;
}

body.page-invoices .invoice-donut-chart .billing-legend-left {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    color: #425372 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

body.page-invoices .invoice-donut-chart .billing-legend-dot {
    width: 10px !important;
    height: 10px !important;
    flex: 0 0 10px !important;
    border-radius: 50% !important;
}

body.page-invoices .invoice-donut-chart .billing-legend-value {
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

body.page-invoices .billing-empty {
    min-height: 220px !important;
    display: grid !important;
    place-items: center !important;
    color: #94a3b8 !important;
    text-align: center !important;
}

/* Tablet: mantiene las dos cards al 50% */
@media (max-width: 1050px) and (min-width: 768px) {
    body.page-invoices .invoice-billing-charts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    body.page-invoices .invoice-billing-card {
        padding: 16px !important;
    }

    body.page-invoices .invoice-billing-title-row h2 {
        font-size: 18px !important;
    }

    body.page-invoices .invoice-donut-chart .donut-layout {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    body.page-invoices .invoice-donut-chart .billing-chart-legend {
        max-width: 260px !important;
    }
}

/* Móvil */
@media (max-width: 767px) {
    body.page-invoices .invoice-billing-charts {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    body.page-invoices .invoice-billing-card {
        min-height: 0 !important;
        padding: 16px !important;
    }

    body.page-invoices .invoice-billing-title-row h2 {
        font-size: 18px !important;
    }

    body.page-invoices .invoice-donut-chart .donut-layout {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    body.page-invoices .invoice-donut-chart .billing-chart-legend {
        max-width: 290px !important;
    }
}


/* =========================================================
   INVOICES — BOTÓN REPORTE EXCEL
   Mismo estilo visual que Volver.
   ========================================================= */
body.page-invoices .invoices-report-button {
    min-width: 160px !important;
    min-height: 52px !important;
    white-space: nowrap !important;
}

body.page-invoices .invoices-report-button svg {
    width: 18px !important;
    height: 18px !important;
}

@media (max-width: 767px) {
    body.page-invoices .invoices-hero-side {
        gap: 9px !important;
    }

    body.page-invoices .invoices-report-button {
        min-height: 46px !important;
    }
}


/* =========================================================
   INVOICES — BUSCADOR INTEGRADO EN HISTORIAL DE FACTURAS
   ========================================================= */

body.page-invoices .invoice-list-card .invoice-history-search {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 18px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.page-invoices .invoice-list-card .invoice-history-search .invoice-search-form {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
}

body.page-invoices .invoice-list-card .invoice-history-search .invoice-search-field {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body.page-invoices .invoice-list-card .invoice-history-search .invoice-search-field > label {
    display: none !important;
}

body.page-invoices .invoice-list-card .invoice-history-search .invoice-search-input-wrap {
    width: 100% !important;
    max-width: none !important;
}

body.page-invoices .invoice-list-card .invoice-history-search .invoice-search-field input {
    width: 100% !important;
    max-width: none !important;
    height: 46px !important;
    min-height: 46px !important;
    background: #fff !important;
    border: 1px solid #cfdaea !important;
    border-radius: 10px !important;
}

body.page-invoices .invoice-list-card .invoice-history-search .invoice-search-info {
    margin: 9px 0 0 !important;
    padding: 0 !important;
    color: #71809a !important;
    font-size: 12px !important;
}

body.page-invoices .invoice-list-card .invoice-history-divider {
    width: 100% !important;
    height: 1px !important;
    margin: 0 0 18px !important;
    background: #edf2f7 !important;
}

body.page-invoices .invoice-list-card .invoice-list-header {
    margin-top: 0 !important;
}

@media (max-width: 767px) {
    body.page-invoices .invoice-list-card .invoice-history-search {
        padding-bottom: 14px !important;
    }

    body.page-invoices .invoice-list-card .invoice-history-divider {
        margin-bottom: 14px !important;
    }

    body.page-invoices .invoice-list-card .invoice-history-search .invoice-search-field input {
        height: 44px !important;
        min-height: 44px !important;
    }
}


/* =========================================================
   INVOICES — MÁRGENES INTERNOS DEL BUSCADOR EN HISTORIAL
   ========================================================= */
body.page-invoices .invoice-list-card .invoice-history-search {
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 18px 20px !important;
    margin: 0 !important;
}

body.page-invoices .invoice-list-card .invoice-history-divider {
    width: auto !important;
    margin: 0 20px 18px !important;
}

@media (max-width: 767px) {
    body.page-invoices .invoice-list-card .invoice-history-search {
        padding: 15px 16px !important;
    }

    body.page-invoices .invoice-list-card .invoice-history-divider {
        margin: 0 16px 14px !important;
    }
}


/* Buscador historial — 15px más de separación superior */
body.page-invoices .invoice-list-card .invoice-history-search {
    padding-top: 33px !important;
}

@media (max-width: 767px) {
    body.page-invoices .invoice-list-card .invoice-history-search {
        padding-top: 30px !important;
    }
}


/* =========================================================
   CLIENTES — MISMO ANCHO DE CONTENIDO QUE FACTURAS
   =========================================================
   Facturas usa todo el ancho disponible dentro de .dash-main.
   Eliminamos el max-width y padding interno extra de clients-page
   para que hero, formulario y listado ocupen exactamente ese ancho.
   ========================================================= */

body.page-clients .clients-page,
.page-clients .clients-page,
.clients-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* En tablet y móvil mantenemos el espaciado responsive existente */
@media screen and (max-width: 1000px) {
    body.page-clients .clients-page,
    .page-clients .clients-page,
    .clients-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media screen and (max-width: 767px) {
    body.page-clients .clients-page,
    .page-clients .clients-page,
    .clients-page {
        padding: 12px 10px 84px !important;
    }
}


/* =========================================================
   CLIENTES — BUSCADOR AL 50% DEL ÁREA DISPONIBLE
   ========================================================= */

body.page-clients .clients-list-heading .clients-search,
.page-clients .clients-list-heading .clients-search,
.clients-page .clients-list-heading .clients-search {
    width: 50% !important;
    max-width: none !important;
    flex: 0 0 50% !important;
}

/* Tablet pequeña y móvil: vuelve a ocupar todo el ancho */
@media (max-width: 767px) {
    body.page-clients .clients-list-heading .clients-search,
    .page-clients .clients-list-heading .clients-search,
    .clients-page .clients-list-heading .clients-search {
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 100% !important;
    }
}


/* =========================================================
   FACTURAS — LISTADO CON EL MISMO PATRÓN VISUAL DE CLIENTES
   ========================================================= */

body.page-invoices .invoice-list-card {
    padding: 20px 24px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
    overflow: hidden !important;
}

body.page-invoices .invoice-list-heading-clients-style {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
}

body.page-invoices .invoice-list-title-block {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

body.page-invoices .invoice-list-title-block h2 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em !important;
}

body.page-invoices .invoice-list-title-block p {
    margin: 7px 0 0 !important;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

body.page-invoices .invoice-list-search-area {
    width: 50% !important;
    flex: 0 0 50% !important;
    min-width: 0 !important;
    display: block !important;
}

body.page-invoices .invoice-list-search-area .invoice-search-form,
body.page-invoices .invoice-list-search-area .invoice-search-field,
body.page-invoices .invoice-list-search-area .invoice-search-input-wrap {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body.page-invoices .invoice-list-search-area .invoice-search-input-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

body.page-invoices .invoice-list-search-area .invoice-search-icon {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    pointer-events: none !important;
}

body.page-invoices .invoice-list-search-area .invoice-search-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

body.page-invoices .invoice-list-search-area .invoice-search-field input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1px solid #cfdbeb !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 12px !important;
}

body.page-invoices .invoice-list-search-area .invoice-search-field input::placeholder {
    color: #91a0b8 !important;
}

body.page-invoices .invoice-list-search-area .invoice-search-field input:focus {
    border-color: #1468f3 !important;
    box-shadow: 0 0 0 3px rgba(20, 104, 243, .10) !important;
    outline: none !important;
}

/* Conservamos los elementos para que app.js siga actualizándolos,
   pero no se muestran para mantener el aspecto de Clientes. */
body.page-invoices .invoice-list-search-area .invoice-search-info,
body.page-invoices .invoice-list-search-area .invoice-list-count {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

/* Eliminamos visualmente el antiguo bloque de historial/separador
   si alguna regla previa todavía intentara mostrarlo. */
body.page-invoices .invoice-history-divider {
    display: none !important;
}

/* Tabla: mismo acabado que listado de clientes */
body.page-invoices .invoice-table-wrap {
    width: 100% !important;
    margin: 0 !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

body.page-invoices .invoice-table {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    font-size: 12px !important;
}

body.page-invoices .invoice-table thead th {
    padding: 11px 13px !important;
    background: #f5f8fc !important;
    color: #51617c !important;
    border: 0 !important;
    text-align: left !important;
    text-transform: uppercase !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: .035em !important;
    white-space: nowrap !important;
}

body.page-invoices .invoice-table tbody td {
    padding: 11px 13px !important;
    background: #fff !important;
    color: #475569 !important;
    border-top: 1px solid #edf1f6 !important;
    border-bottom: 0 !important;
    vertical-align: middle !important;
}

body.page-invoices .invoice-table tbody tr:hover td {
    background: #fbfdff !important;
}

/* Tablet / móvil */
@media (max-width: 850px) {
    body.page-invoices .invoice-list-heading-clients-style {
        align-items: stretch !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    body.page-invoices .invoice-list-search-area {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
}

@media (max-width: 767px) {
    body.page-invoices .invoice-list-card {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    body.page-invoices .invoice-list-heading-clients-style {
        margin-bottom: 16px !important;
    }

    body.page-invoices .invoice-list-title-block h2 {
        font-size: 18px !important;
    }

    body.page-invoices .invoice-list-search-area .invoice-search-field input {
        height: 42px !important;
        min-height: 42px !important;
    }
}


/* =========================================================
   INVOICE-CREATE.PHP — BOTÓN VOLVER
   Mismo tamaño y estilo que el botón Volver de Facturas
   ========================================================= */

body.page-invoice-create .page-heading .hero-actions .btn.btn-outline {
    width: 160px !important;
    min-width: 160px !important;
    height: 52px !important;
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 18px !important;

    border: 1px solid #cbd8ea !important;
    border-radius: 10px !important;

    background: #fff !important;
    color: #465875 !important;

    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    white-space: nowrap !important;
    text-decoration: none !important;
}

body.page-invoice-create .page-heading .hero-actions .btn.btn-outline:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

@media (max-width: 520px) {
    body.page-invoice-create .page-heading .hero-actions .btn.btn-outline {
        width: 100% !important;
        min-width: 0 !important;
    }
}


/* =========================================================
   INVOICE-CREATE — CABECERA CON ICONO Y DESCRIPCIÓN
   Mismo patrón visual que Facturas
   ========================================================= */

body.page-invoice-create .invoice-create-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
}

body.page-invoice-create .invoice-create-heading-main {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

body.page-invoice-create .invoice-create-heading-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-invoice-create .invoice-create-heading-icon svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
}

body.page-invoice-create .invoice-create-heading-copy {
    min-width: 0 !important;
}

body.page-invoice-create .invoice-create-heading-copy .eyebrow {
    margin: 0 0 5px !important;
}

body.page-invoice-create .invoice-create-heading-copy h1 {
    margin: 0 !important;
}

body.page-invoice-create .invoice-create-description {
    margin: 8px 0 0 !important;

    color: #64748b !important;

    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

@media (max-width: 767px) {

    body.page-invoice-create .invoice-create-heading {
        align-items: flex-start !important;
    }

    body.page-invoice-create .invoice-create-heading-main {
        align-items: flex-start !important;
    }

    body.page-invoice-create .invoice-create-heading-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-invoice-create .invoice-create-heading-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-invoice-create .invoice-create-description {
        font-size: 12px !important;
    }
}

@media (max-width: 520px) {

    body.page-invoice-create .invoice-create-heading {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-invoice-create .invoice-create-heading .hero-actions {
        width: 100% !important;
    }
}


/* =========================================================
   INVOICE-CREATE — CENTRAR BOTÓN VOLVER HORIZONTALMENTE
   ========================================================= */

body.page-invoice-create .invoice-create-heading .hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.page-invoice-create .invoice-create-heading .hero-actions .btn.btn-outline {
    margin-left: auto !important;
    margin-right: auto !important;
}


/* =========================================================
   INVOICE-CREATE — CENTRADO REAL DEL BOTÓN VOLVER
   Centrado respecto a toda la cabecera
   ========================================================= */

body.page-invoice-create .invoice-create-heading {
    position: relative !important;
}

body.page-invoice-create .invoice-create-heading .hero-actions {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.page-invoice-create .invoice-create-heading .hero-actions .btn.btn-outline {
    margin: 0 !important;
}

/* En móvil evitamos solapamientos y vuelve al flujo normal */
@media (max-width: 767px) {
    body.page-invoice-create .invoice-create-heading .hero-actions {
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 14px !important;
    }

    body.page-invoice-create .invoice-create-heading .hero-actions .btn.btn-outline {
        margin: 0 auto !important;
    }
}


/* =========================================================
   INVOICE-CREATE — BOTÓN VOLVER AL FINAL DE LA DERECHA
   ========================================================= */

body.page-invoice-create .invoice-create-heading .hero-actions {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;

    width: auto !important;
    margin: 0 0 0 auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

body.page-invoice-create .invoice-create-heading .hero-actions .btn.btn-outline {
    margin: 0 !important;
}

@media (max-width: 767px) {
    body.page-invoice-create .invoice-create-heading .hero-actions {
        width: 100% !important;
        margin: 14px 0 0 !important;
        justify-content: flex-end !important;
    }

    body.page-invoice-create .invoice-create-heading .hero-actions .btn.btn-outline {
        width: 160px !important;
        min-width: 160px !important;
        margin: 0 !important;
    }
}


/* =========================================================
   QUOTATION-LIST.PHP
   PATRÓN VISUAL CLIENTES / FACTURAS
   ========================================================= */

body.page-quotation-list .quotation-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* HERO */

body.page-quotation-list .quotation-hero {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;

    margin: 0 0 18px !important;
    padding: 22px 24px !important;

    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-quotation-list .quotation-hero-main {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

body.page-quotation-list .quotation-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-quotation-list .quotation-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
    display: block !important;
}

body.page-quotation-list .quotation-hero-copy {
    min-width: 0 !important;
}

body.page-quotation-list .quotation-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
}

body.page-quotation-list .quotation-hero h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 30px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -.035em !important;
}

body.page-quotation-list .quotation-hero-description {
    margin: 8px 0 0 !important;

    color: #64748b !important;

    font-size: 13px !important;
    line-height: 1.5 !important;
}

body.page-quotation-list .quotation-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex: 0 0 auto !important;
}

body.page-quotation-list .quotation-new-button,
body.page-quotation-list .quotation-back-button {
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;

    padding: 0 18px !important;

    border-radius: 10px !important;

    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        color .18s ease,
        box-shadow .18s ease !important;
}

body.page-quotation-list .quotation-new-button {
    min-width: 172px !important;

    border: 1px solid #1468f3 !important;

    background: #1468f3 !important;
    color: #fff !important;

    box-shadow: 0 7px 18px rgba(20, 104, 243, .16) !important;
}

body.page-quotation-list .quotation-back-button {
    width: 160px !important;
    min-width: 160px !important;

    border: 1px solid #cbd8ea !important;

    background: #fff !important;
    color: #465875 !important;
}

body.page-quotation-list .quotation-new-button svg,
body.page-quotation-list .quotation-back-button svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}

body.page-quotation-list .quotation-new-button:hover {
    background: #0f5edc !important;
    border-color: #0f5edc !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}

body.page-quotation-list .quotation-back-button:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
    transform: translateY(-1px) !important;
}


/* LISTADO + BUSCADOR */

body.page-quotation-list .quotation-list-card {
    width: 100% !important;

    padding: 20px 24px !important;

    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;

    overflow: hidden !important;
}

body.page-quotation-list .quotation-list-heading {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;

    margin: 0 0 20px !important;
}

body.page-quotation-list .quotation-list-title {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

body.page-quotation-list .quotation-list-title h2 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em !important;
}

body.page-quotation-list .quotation-list-title p {
    margin: 7px 0 0 !important;

    color: #64748b !important;

    font-size: 12px !important;
    line-height: 1.5 !important;
}

body.page-quotation-list .quotation-list-search-area {
    width: 50% !important;
    flex: 0 0 50% !important;
    min-width: 0 !important;
}

body.page-quotation-list .quotation-search {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 0 !important;
}

body.page-quotation-list .quotation-search-icon {
    position: static !important;

    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: #64748b !important;

    pointer-events: none !important;
}

body.page-quotation-list .quotation-search-icon svg {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
}

body.page-quotation-list .quotation-search input {
    flex: 1 1 auto !important;

    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;

    margin: 0 !important;
    padding: 0 14px !important;

    border: 1px solid #cfdbeb !important;
    border-radius: 10px !important;

    background: #fff !important;
    color: #334155 !important;

    font-size: 12px !important;
    line-height: 1 !important;

    box-sizing: border-box !important;
    outline: none !important;
}

body.page-quotation-list .quotation-search input::placeholder {
    color: #94a3b8 !important;
}

body.page-quotation-list .quotation-search input:focus {
    border-color: #8bb8ff !important;
    box-shadow: 0 0 0 3px rgba(20, 104, 243, .08) !important;
}

/*
 * Se mantienen en DOM para que app.js actualice
 * los resultados sin modificar la lógica existente.
 */
body.page-quotation-list .quotation-filter-result,
body.page-quotation-list .quotation-count {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;

    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;

    white-space: nowrap !important;
}


/* TABLA */

body.page-quotation-list .quotation-table-wrap {
    width: 100% !important;

    margin: 0 !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 12px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;
}

body.page-quotation-list .quotation-table {
    width: 100% !important;

    margin: 0 !important;

    border: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;

    font-size: 12px !important;
}

body.page-quotation-list .quotation-table thead th {
    padding: 11px 13px !important;

    background: #f5f8fc !important;
    color: #51617c !important;

    border: 0 !important;

    text-align: left !important;
    text-transform: uppercase !important;

    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: .035em !important;

    white-space: nowrap !important;
}

body.page-quotation-list .quotation-table tbody td {
    padding: 11px 13px !important;

    background: #fff !important;
    color: #475569 !important;

    border-top: 1px solid #edf1f6 !important;
    border-bottom: 0 !important;

    vertical-align: middle !important;
}

body.page-quotation-list .quotation-table tbody tr:hover td {
    background: #fbfdff !important;
}


/* ACCIONES */

body.page-quotation-list .quotation-actions-cell {
    white-space: nowrap !important;
}

body.page-quotation-list .quotation-row-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
}

body.page-quotation-list .quotation-delete-form {
    display: inline-flex !important;
    margin: 0 !important;
}

body.page-quotation-list .quotation-action-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;

    border-radius: 9px !important;

    background: #fff !important;

    cursor: pointer !important;
}

body.page-quotation-list .quotation-action-button svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}

body.page-quotation-list .quotation-action-view {
    border: 1px solid #cfe0fa !important;
    color: #1468f3 !important;
}

body.page-quotation-list .quotation-action-view:hover {
    background: #edf5ff !important;
    border-color: #9fc4ff !important;
}

body.page-quotation-list .quotation-action-delete {
    border: 1px solid #fecdd3 !important;
    color: #e11d48 !important;
}

body.page-quotation-list .quotation-action-delete:hover {
    background: #fff1f2 !important;
    border-color: #fda4af !important;
}


/* ESTADO VACÍO */

body.page-quotation-list .quotation-empty-state {
    padding: 44px 20px !important;

    text-align: center !important;

    color: #64748b !important;
}

body.page-quotation-list .quotation-empty-state strong {
    display: block !important;

    margin-bottom: 8px !important;

    color: #334155 !important;

    font-size: 18px !important;
    font-weight: 800 !important;
}

body.page-quotation-list .quotation-empty-button {
    min-height: 42px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin-top: 10px !important;
    padding: 0 16px !important;

    border: 1px solid #1468f3 !important;
    border-radius: 10px !important;

    background: #1468f3 !important;
    color: #fff !important;

    font-size: 12px !important;
    font-weight: 800 !important;

    text-decoration: none !important;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    body.page-quotation-list .quotation-hero {
        align-items: flex-start !important;
    }

    body.page-quotation-list .quotation-hero-actions {
        flex-wrap: wrap !important;
    }

    body.page-quotation-list .quotation-list-heading {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    body.page-quotation-list .quotation-list-search-area {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
}

@media (max-width: 767px) {

    body.page-quotation-list .quotation-page {
        padding: 0 0 84px !important;
    }

    body.page-quotation-list .quotation-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;

        padding: 18px 16px !important;

        border-radius: 14px !important;
    }

    body.page-quotation-list .quotation-hero-main {
        align-items: flex-start !important;
    }

    body.page-quotation-list .quotation-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-quotation-list .quotation-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-quotation-list .quotation-hero h1 {
        font-size: 25px !important;
    }

    body.page-quotation-list .quotation-hero-description {
        font-size: 12px !important;
    }

    body.page-quotation-list .quotation-hero-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }

    body.page-quotation-list .quotation-new-button {
        flex: 1 1 auto !important;
    }

    body.page-quotation-list .quotation-back-button {
        width: 160px !important;
        min-width: 160px !important;
    }

    body.page-quotation-list .quotation-list-card {
        padding: 16px !important;

        border-radius: 14px !important;
    }

    body.page-quotation-list .quotation-list-title h2 {
        font-size: 18px !important;
    }
}

@media (max-width: 520px) {

    body.page-quotation-list .quotation-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-quotation-list .quotation-new-button,
    body.page-quotation-list .quotation-back-button {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.page-quotation-list .quotation-search {
        gap: 8px !important;
    }
}


/* =========================================================
   CONTRACT-CREATE.PHP — CABECERA MODERNA
   Mismo patrón visual que Facturas / Cotizaciones / Clientes
   ========================================================= */

body.page-contract-create .contract-create-hero {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;

    margin: 0 0 18px !important;
    padding: 22px 24px !important;

    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-contract-create .contract-create-hero-main {
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

body.page-contract-create .contract-create-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-contract-create .contract-create-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
    display: block !important;
}

body.page-contract-create .contract-create-hero-copy {
    min-width: 0 !important;
}

body.page-contract-create .contract-create-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
}

body.page-contract-create .contract-create-hero h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 30px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -.035em !important;
}

body.page-contract-create .contract-create-description {
    margin: 8px 0 0 !important;

    color: #64748b !important;

    font-size: 13px !important;
    line-height: 1.5 !important;
}

body.page-contract-create .contract-create-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    flex: 0 0 auto !important;
}

body.page-contract-create .contract-create-back-button {
    width: 160px !important;
    min-width: 160px !important;
    height: 52px !important;
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;

    padding: 0 18px !important;

    border: 1px solid #cbd8ea !important;
    border-radius: 10px !important;

    background: #fff !important;
    color: #465875 !important;

    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        color .18s ease !important;
}

body.page-contract-create .contract-create-back-button svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}

body.page-contract-create .contract-create-back-button:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
    transform: translateY(-1px) !important;
}

/* Paneles del formulario con el mismo acabado de tarjetas */
body.page-contract-create .contract-panel {
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

@media (max-width: 767px) {

    body.page-contract-create .contract-create-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;

        padding: 18px 16px !important;

        border-radius: 14px !important;
    }

    body.page-contract-create .contract-create-hero-main {
        align-items: flex-start !important;
    }

    body.page-contract-create .contract-create-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-contract-create .contract-create-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-contract-create .contract-create-hero h1 {
        font-size: 25px !important;
    }

    body.page-contract-create .contract-create-description {
        font-size: 12px !important;
    }

    body.page-contract-create .contract-create-hero-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 520px) {

    body.page-contract-create .contract-create-back-button {
        width: 100% !important;
        min-width: 0 !important;
    }
}


/* =========================================================
   SETTINGS / CONFIGURACIÓN — PATRÓN MODERNO
   ========================================================= */

body.page-settings .settings-hero,
body.page-config .settings-hero,
body.page-configuration .settings-hero {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;

    margin: 0 0 18px !important;
    padding: 22px 24px !important;

    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-settings .settings-hero-main,
body.page-config .settings-hero-main,
body.page-configuration .settings-hero-main {
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

body.page-settings .settings-hero-icon,
body.page-config .settings-hero-icon,
body.page-configuration .settings-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-settings .settings-hero-icon svg,
body.page-config .settings-hero-icon svg,
body.page-configuration .settings-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
    display: block !important;
}

body.page-settings .settings-hero-copy,
body.page-config .settings-hero-copy,
body.page-configuration .settings-hero-copy {
    min-width: 0 !important;
}

body.page-settings .settings-eyebrow,
body.page-config .settings-eyebrow,
body.page-configuration .settings-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
}

body.page-settings .settings-hero h1,
body.page-config .settings-hero h1,
body.page-configuration .settings-hero h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 30px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -.035em !important;
}

body.page-settings .settings-hero-description,
body.page-config .settings-hero-description,
body.page-configuration .settings-hero-description {
    margin: 8px 0 0 !important;

    color: #64748b !important;

    font-size: 13px !important;
    line-height: 1.5 !important;
}

body.page-settings .settings-hero-actions,
body.page-config .settings-hero-actions,
body.page-configuration .settings-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    flex: 0 0 auto !important;
}

body.page-settings .settings-back-button,
body.page-config .settings-back-button,
body.page-configuration .settings-back-button {
    width: 160px !important;
    min-width: 160px !important;
    height: 52px !important;
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;

    padding: 0 18px !important;

    border: 1px solid #cbd8ea !important;
    border-radius: 10px !important;

    background: #fff !important;
    color: #465875 !important;

    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        color .18s ease !important;
}

body.page-settings .settings-back-button svg,
body.page-config .settings-back-button svg,
body.page-configuration .settings-back-button svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}

body.page-settings .settings-back-button:hover,
body.page-config .settings-back-button:hover,
body.page-configuration .settings-back-button:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
    transform: translateY(-1px) !important;
}


/* TARJETA PRINCIPAL */

body.page-settings .settings-main-card,
body.page-config .settings-main-card,
body.page-configuration .settings-main-card {
    padding: 22px 24px !important;

    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-settings .settings-section-heading,
body.page-config .settings-section-heading,
body.page-configuration .settings-section-heading {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;

    margin-bottom: 22px !important;
}

body.page-settings .settings-section-icon,
body.page-config .settings-section-icon,
body.page-configuration .settings-section-icon {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 12px !important;

    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-settings .settings-section-icon svg,
body.page-config .settings-section-icon svg,
body.page-configuration .settings-section-icon svg {
    width: 21px !important;
    height: 21px !important;
}

body.page-settings .settings-section-heading h2,
body.page-config .settings-section-heading h2,
body.page-configuration .settings-section-heading h2 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

body.page-settings .settings-section-heading p,
body.page-config .settings-section-heading p,
body.page-configuration .settings-section-heading p {
    margin: 6px 0 0 !important;

    color: #64748b !important;

    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* Inputs y bloques internos */

body.page-settings .settings-main-card input,
body.page-settings .settings-main-card textarea,
body.page-settings .settings-main-card select,
body.page-config .settings-main-card input,
body.page-config .settings-main-card textarea,
body.page-config .settings-main-card select,
body.page-configuration .settings-main-card input,
body.page-configuration .settings-main-card textarea,
body.page-configuration .settings-main-card select {
    border-radius: 10px !important;
    border-color: #cfdbeb !important;
}

body.page-settings .settings-main-card input:focus,
body.page-settings .settings-main-card textarea:focus,
body.page-config .settings-main-card input:focus,
body.page-config .settings-main-card textarea:focus,
body.page-configuration .settings-main-card input:focus,
body.page-configuration .settings-main-card textarea:focus {
    border-color: #8bb8ff !important;
    box-shadow: 0 0 0 3px rgba(20, 104, 243, .08) !important;
}

body.page-settings .logo-upload-box,
body.page-config .logo-upload-box,
body.page-configuration .logo-upload-box {
    margin-top: 24px !important;
    padding: 20px !important;

    background: #f8fbff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 14px !important;
}

body.page-settings .social-settings,
body.page-config .social-settings,
body.page-configuration .social-settings {
    margin-top: 28px !important;
    padding-top: 26px !important;
    border-top: 1px solid #e7edf6 !important;
}

body.page-settings .form-actions,
body.page-config .form-actions,
body.page-configuration .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 26px !important;
}

body.page-settings .form-actions .btn,
body.page-config .form-actions .btn,
body.page-configuration .form-actions .btn {
    min-width: 190px !important;
    min-height: 46px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
}


/* RESPONSIVE */

@media (max-width: 767px) {

    body.page-settings .settings-hero,
    body.page-config .settings-hero,
    body.page-configuration .settings-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;

        padding: 18px 16px !important;

        border-radius: 14px !important;
    }

    body.page-settings .settings-hero-main,
    body.page-config .settings-hero-main,
    body.page-configuration .settings-hero-main {
        align-items: flex-start !important;
    }

    body.page-settings .settings-hero-icon,
    body.page-config .settings-hero-icon,
    body.page-configuration .settings-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-settings .settings-hero-icon svg,
    body.page-config .settings-hero-icon svg,
    body.page-configuration .settings-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-settings .settings-hero h1,
    body.page-config .settings-hero h1,
    body.page-configuration .settings-hero h1 {
        font-size: 25px !important;
    }

    body.page-settings .settings-hero-actions,
    body.page-config .settings-hero-actions,
    body.page-configuration .settings-hero-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }

    body.page-settings .settings-main-card,
    body.page-config .settings-main-card,
    body.page-configuration .settings-main-card {
        padding: 18px 16px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 520px) {

    body.page-settings .settings-back-button,
    body.page-config .settings-back-button,
    body.page-configuration .settings-back-button {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.page-settings .form-actions .btn,
    body.page-config .form-actions .btn,
    body.page-configuration .form-actions .btn {
        width: 100% !important;
        min-width: 0 !important;
    }
}


/* =========================================================
   MI CUENTA — PATRÓN MODERNO
   ========================================================= */

.account-hero {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    margin: 0 0 18px !important;
    padding: 22px 24px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

.account-hero-main {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

.account-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 16px !important;
    background: #edf5ff !important;
    color: #1468f3 !important;
}

.account-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
    display: block !important;
}

.account-hero-copy {
    min-width: 0 !important;
}

.account-eyebrow {
    margin: 0 0 5px !important;
    color: #1468f3 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
}

.account-hero h1 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 30px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -.035em !important;
}

.account-hero-description {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.account-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
}

.account-back-button {
    width: 160px !important;
    min-width: 160px !important;
    height: 52px !important;
    min-height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    padding: 0 18px !important;
    border: 1px solid #cbd8ea !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #465875 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease !important;
}

.account-back-button svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}

.account-back-button:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
    transform: translateY(-1px) !important;
}

/* TARJETAS */

.account-card,
.account-info-card {
    padding: 22px 24px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

.account-card {
    margin-bottom: 18px !important;
}

.account-section-heading {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 22px !important;
}

.account-section-icon {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
    background: #edf5ff !important;
    color: #1468f3 !important;
}

.account-section-icon svg {
    width: 21px !important;
    height: 21px !important;
}

.account-section-heading h2,
.account-subsection-heading h2 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

.account-section-heading p,
.account-subsection-heading p {
    margin: 6px 0 0 !important;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.account-card input {
    border-radius: 10px !important;
    border-color: #cfdbeb !important;
}

.account-card input:focus {
    border-color: #8bb8ff !important;
    box-shadow: 0 0 0 3px rgba(20, 104, 243, .08) !important;
}

.account-password-section {
    margin-top: 30px !important;
    padding-top: 25px !important;
    border-top: 1px solid #e7edf6 !important;
}

.account-subsection-heading {
    margin-bottom: 18px !important;
}

.account-password-help {
    display: block !important;
    margin-top: 8px !important;
    color: #64748b !important;
    font-size: 12px !important;
}

.account-card .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 26px !important;
}

.account-card .form-actions .btn {
    min-width: 170px !important;
    min-height: 46px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
}

/* INFORMACIÓN DE CUENTA */

.account-info-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

.account-info-grid > div {
    padding: 16px !important;
    background: #f8fbff !important;
    border: 1px solid #e1eaf5 !important;
    border-radius: 12px !important;
}

.account-info-label {
    display: block !important;
    margin-bottom: 5px !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.account-info-grid strong {
    color: #0f172a !important;
    font-size: 14px !important;
}

/* RESPONSIVE */

@media (max-width: 767px) {
    .account-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;
        padding: 18px 16px !important;
        border-radius: 14px !important;
    }

    .account-hero-main {
        align-items: flex-start !important;
    }

    .account-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;
        border-radius: 13px !important;
    }

    .account-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    .account-hero h1 {
        font-size: 25px !important;
    }

    .account-hero-description {
        font-size: 12px !important;
    }

    .account-hero-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }

    .account-card,
    .account-info-card {
        padding: 18px 16px !important;
        border-radius: 14px !important;
    }

    .account-info-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 520px) {
    .account-back-button {
        width: 100% !important;
        min-width: 0 !important;
    }

    .account-card .form-actions .btn {
        width: 100% !important;
        min-width: 0 !important;
    }
}


/* =========================================================
   MI CUENTA — BOTÓN GUARDAR CAMBIOS AL 100%
   ========================================================= */

.account-card .form-actions {
    width: 100% !important;
}

.account-card .form-actions .btn {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    flex: 1 1 100% !important;
}


/* =========================================================
   INVOICE-VIEW.PHP — PATRÓN MODERNO
   ========================================================= */

body.page-invoice-view .invoice-view-hero {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    margin: 0 0 18px !important;
    padding: 22px 24px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30,64,175,.06) !important;
}

body.page-invoice-view .invoice-view-hero-main {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

body.page-invoice-view .invoice-view-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 16px !important;
    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-invoice-view .invoice-view-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
}

body.page-invoice-view .invoice-view-eyebrow {
    margin: 0 0 5px !important;
    color: #1468f3 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .11em !important;
}

body.page-invoice-view .invoice-view-hero h1 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 30px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -.035em !important;
}

body.page-invoice-view .invoice-view-description {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body.page-invoice-view .invoice-view-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex: 0 0 auto !important;
}

body.page-invoice-view .invoice-view-action {
    min-height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

body.page-invoice-view .invoice-view-pdf {
    min-width: 145px !important;
    border: 1px solid #1468f3 !important;
    background: #1468f3 !important;
    color: #fff !important;
}

body.page-invoice-view .invoice-view-whatsapp {
    min-width: 175px !important;
    border: 1px solid #16a34a !important;
    background: #16a34a !important;
    color: #fff !important;
}

body.page-invoice-view .invoice-view-back {
    width: 160px !important;
    min-width: 160px !important;
    border: 1px solid #cbd8ea !important;
    background: #fff !important;
    color: #465875 !important;
}

body.page-invoice-view .invoice-view-pdf:hover {
    background: #0f5edc !important;
}

body.page-invoice-view .invoice-view-whatsapp:hover {
    background: #15803d !important;
}

body.page-invoice-view .invoice-view-back:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
}

/* Documento */
body.page-invoice-view .invoice-paper {
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30,64,175,.06) !important;
}

/* Estado */
body.page-invoice-view .invoice-view-status-card {
    margin-top: 18px !important;
    padding: 20px 24px !important;
    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30,64,175,.06) !important;
}

body.page-invoice-view .invoice-view-status-card form {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: end !important;
    gap: 14px !important;
}

body.page-invoice-view .invoice-view-status-card select {
    min-height: 46px !important;
    border: 1px solid #cfdbeb !important;
    border-radius: 10px !important;
}

body.page-invoice-view .invoice-view-status-card button {
    min-width: 190px !important;
    min-height: 46px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
}

@media (max-width: 1050px) {
    body.page-invoice-view .invoice-view-hero {
        align-items: flex-start !important;
    }

    body.page-invoice-view .invoice-view-hero-actions {
        flex-wrap: wrap !important;
    }
}

@media (max-width: 767px) {
    body.page-invoice-view .invoice-view-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;
        padding: 18px 16px !important;
        border-radius: 14px !important;
    }

    body.page-invoice-view .invoice-view-hero-main {
        align-items: flex-start !important;
    }

    body.page-invoice-view .invoice-view-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;
        border-radius: 13px !important;
    }

    body.page-invoice-view .invoice-view-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-invoice-view .invoice-view-hero h1 {
        font-size: 25px !important;
    }

    body.page-invoice-view .invoice-view-hero-actions {
        width: 100% !important;
    }

    body.page-invoice-view .invoice-view-status-card {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    body.page-invoice-view .invoice-view-status-card form {
        grid-template-columns: 1fr !important;
    }

    body.page-invoice-view .invoice-view-status-card button {
        width: 100% !important;
    }
}

@media (max-width: 620px) {
    body.page-invoice-view .invoice-view-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-invoice-view .invoice-view-action {
        width: 100% !important;
        min-width: 0 !important;
    }
}

@media print {
    body.page-invoice-view .invoice-paper {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
}

/* =========================================================
   INVOICE VIEW - POPUP WHATSAPP
   ========================================================= */

body.page-invoice-view.whatsapp-modal-is-open {
    overflow: hidden !important;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

body.page-invoice-view .whatsapp-modal {
    position: fixed !important;
    inset: 0 !important;

    z-index: 99999 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 24px !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transition:
        opacity .2s ease,
        visibility .2s ease !important;
}


/* =========================================================
   MODAL ABIERTO
   ========================================================= */

body.page-invoice-view .whatsapp-modal.whatsapp-modal-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


/* =========================================================
   FONDO
   ========================================================= */

body.page-invoice-view .whatsapp-modal-overlay {
    position: absolute !important;
    inset: 0 !important;

    background:
        rgba(15, 23, 42, .58) !important;

    backdrop-filter:
        blur(5px) !important;

    -webkit-backdrop-filter:
        blur(5px) !important;
}


/* =========================================================
   VENTANA
   ========================================================= */

body.page-invoice-view .whatsapp-modal-dialog {
    position: relative !important;
    z-index: 2 !important;

    width: 100% !important;
    max-width: 520px !important;

    overflow: hidden !important;

    background: #ffffff !important;

    border:
        1px solid #dfe8f4 !important;

    border-radius:
        18px !important;

    box-shadow:
        0 30px 80px
        rgba(15, 23, 42, .25) !important;

    transform:
        translateY(18px)
        scale(.98) !important;

    transition:
        transform .2s ease !important;
}


body.page-invoice-view
.whatsapp-modal.whatsapp-modal-open
.whatsapp-modal-dialog {

    transform:
        translateY(0)
        scale(1) !important;
}


/* =========================================================
   CABECERA
   ========================================================= */

body.page-invoice-view .whatsapp-modal-header {
    display: flex !important;

    align-items:
        flex-start !important;

    justify-content:
        space-between !important;

    gap: 20px !important;

    padding:
        24px 24px 20px !important;

    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #ffffff 100%
        ) !important;

    border-bottom:
        1px solid #e5edf7 !important;
}


/* =========================================================
   TÍTULO + ICONO
   ========================================================= */

body.page-invoice-view .whatsapp-modal-heading {
    display: flex !important;

    align-items:
        flex-start !important;

    gap: 15px !important;

    min-width: 0 !important;
}


body.page-invoice-view .whatsapp-modal-icon {
    width: 48px !important;
    height: 48px !important;

    flex:
        0 0 48px !important;

    display: flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    background:
        #ecfdf3 !important;

    color:
        #16a34a !important;

    border:
        1px solid #bbf7d0 !important;

    border-radius:
        13px !important;
}


body.page-invoice-view .whatsapp-modal-icon svg {
    width: 24px !important;
    height: 24px !important;
}


/* =========================================================
   EYEBROW
   ========================================================= */

body.page-invoice-view .whatsapp-modal-eyebrow {
    margin:
        0 0 3px !important;

    color:
        #16a34a !important;

    font-size:
        11px !important;

    font-weight:
        900 !important;

    line-height:
        1.2 !important;

    letter-spacing:
        .12em !important;
}


/* =========================================================
   TÍTULO
   ========================================================= */

body.page-invoice-view .whatsapp-modal-heading h2 {
    margin:
        0 0 5px !important;

    color:
        #0f172a !important;

    font-size:
        21px !important;

    font-weight:
        850 !important;

    line-height:
        1.2 !important;

    letter-spacing:
        -.025em !important;
}


/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

body.page-invoice-view
.whatsapp-modal-heading
p:not(.whatsapp-modal-eyebrow) {

    margin: 0 !important;

    color:
        #64748b !important;

    font-size:
        13px !important;

    font-weight:
        500 !important;

    line-height:
        1.45 !important;
}


/* =========================================================
   CERRAR
   ========================================================= */

body.page-invoice-view .whatsapp-modal-close {
    width: 38px !important;
    height: 38px !important;

    flex:
        0 0 38px !important;

    display: flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    padding: 0 !important;

    background:
        #ffffff !important;

    color:
        #64748b !important;

    border:
        1px solid #dbe5f1 !important;

    border-radius:
        10px !important;

    font-family: var(--app-font-family);

    font-size:
        24px !important;

    font-weight:
        400 !important;

    line-height:
        1 !important;

    cursor:
        pointer !important;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease !important;
}


body.page-invoice-view .whatsapp-modal-close:hover {
    background:
        #f8fafc !important;

    color:
        #0f172a !important;

    border-color:
        #cbd5e1 !important;

    transform:
        rotate(3deg) !important;
}


/* =========================================================
   CUERPO
   ========================================================= */

body.page-invoice-view .whatsapp-modal-body {
    display: grid !important;

    gap: 20px !important;

    padding:
        24px !important;

    background:
        #ffffff !important;
}


/* =========================================================
   CAMPOS
   ========================================================= */

body.page-invoice-view .whatsapp-field {
    display: grid !important;

    gap: 8px !important;
}


body.page-invoice-view .whatsapp-field label {
    display: block !important;

    margin: 0 !important;

    color:
        #334155 !important;

    font-size:
        13px !important;

    font-weight:
        800 !important;
}


/* =========================================================
   SELECT PAÍS
   ========================================================= */

body.page-invoice-view .whatsapp-field select {
    width: 100% !important;
    height: 50px !important;

    margin: 0 !important;

    padding:
        0 42px 0 14px !important;

    background-color:
        #ffffff !important;

    color:
        #0f172a !important;

    border:
        1px solid #cfdbeb !important;

    border-radius:
        11px !important;

    font-family: var(--app-font-family);

    font-size:
        14px !important;

    font-weight:
        650 !important;

    outline:
        none !important;

    cursor:
        pointer !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease !important;
}


body.page-invoice-view .whatsapp-field select:focus {
    border-color:
        #2563eb !important;

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, .10) !important;
}


/* =========================================================
   TELÉFONO
   ========================================================= */

body.page-invoice-view .whatsapp-phone-control {
    display: grid !important;

    grid-template-columns:
        auto minmax(0, 1fr) !important;

    align-items:
        stretch !important;

    width:
        100% !important;

    overflow:
        hidden !important;

    background:
        #ffffff !important;

    border:
        1px solid #cfdbeb !important;

    border-radius:
        11px !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease !important;
}


body.page-invoice-view
.whatsapp-phone-control:focus-within {

    border-color:
        #2563eb !important;

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, .10) !important;
}


/* =========================================================
   PREFIJO
   ========================================================= */

body.page-invoice-view .whatsapp-prefix {
    min-width:
        70px !important;

    display:
        flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    padding:
        0 14px !important;

    background:
        #f8fafc !important;

    color:
        #334155 !important;

    border-right:
        1px solid #dbe5f1 !important;

    font-size:
        14px !important;

    font-weight:
        850 !important;

    white-space:
        nowrap !important;
}


/* =========================================================
   INPUT TELÉFONO
   ========================================================= */

body.page-invoice-view
.whatsapp-phone-control
input {

    width:
        100% !important;

    height:
        50px !important;

    margin:
        0 !important;

    padding:
        0 14px !important;

    background:
        #ffffff !important;

    color:
        #0f172a !important;

    border:
        0 !important;

    border-radius:
        0 !important;

    box-shadow:
        none !important;

    outline:
        none !important;

    font-family: var(--app-font-family);

    font-size:
        15px !important;

    font-weight:
        650 !important;
}


body.page-invoice-view
.whatsapp-phone-control
input:focus {

    border:
        0 !important;

    box-shadow:
        none !important;
}


/* =========================================================
   TEXTO DE AYUDA
   ========================================================= */

body.page-invoice-view .whatsapp-field-help {
    margin:
        0 !important;

    color:
        #64748b !important;

    font-size:
        12px !important;

    font-weight:
        500 !important;

    line-height:
        1.45 !important;
}


/* =========================================================
   ERROR
   ========================================================= */

body.page-invoice-view .whatsapp-error {
    padding:
        11px 13px !important;

    background:
        #fef2f2 !important;

    color:
        #b42318 !important;

    border:
        1px solid #fecaca !important;

    border-radius:
        9px !important;

    font-size:
        13px !important;

    font-weight:
        700 !important;

    line-height:
        1.4 !important;
}


body.page-invoice-view
.whatsapp-error[hidden] {

    display:
        none !important;
}


/* =========================================================
   PIE / ACCIONES
   ========================================================= */

body.page-invoice-view .whatsapp-modal-actions {
    display: grid !important;

    grid-template-columns:
        1fr 1.45fr !important;

    gap:
        12px !important;

    padding:
        18px 24px 24px !important;

    background:
        #ffffff !important;

    border-top:
        1px solid #edf2f7 !important;
}


/* =========================================================
   BOTÓN CANCELAR
   ========================================================= */

body.page-invoice-view .whatsapp-modal-cancel {
    min-height:
        48px !important;

    padding:
        10px 18px !important;

    background:
        #ffffff !important;

    color:
        #334155 !important;

    border:
        1px solid #cfdbeb !important;

    border-radius:
        10px !important;

    font-family: var(--app-font-family);

    font-size:
        13px !important;

    font-weight:
        800 !important;

    cursor:
        pointer !important;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease !important;
}


body.page-invoice-view
.whatsapp-modal-cancel:hover {

    background:
        #f8fafc !important;

    border-color:
        #94a3b8 !important;

    transform:
        translateY(-1px) !important;
}


/* =========================================================
   BOTÓN ENVIAR
   ========================================================= */

body.page-invoice-view .whatsapp-modal-send {
    min-height:
        48px !important;

    display:
        inline-flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    gap:
        9px !important;

    padding:
        10px 18px !important;

    background:
        #16a34a !important;

    color:
        #ffffff !important;

    border:
        1px solid #16a34a !important;

    border-radius:
        10px !important;

    font-family: var(--app-font-family);

    font-size:
        13px !important;

    font-weight:
        850 !important;

    cursor:
        pointer !important;

    box-shadow:
        0 8px 20px
        rgba(22, 163, 74, .18) !important;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease !important;
}


body.page-invoice-view
.whatsapp-modal-send:hover {

    background:
        #15803d !important;

    border-color:
        #15803d !important;

    box-shadow:
        0 10px 24px
        rgba(22, 163, 74, .25) !important;

    transform:
        translateY(-1px) !important;
}


body.page-invoice-view
.whatsapp-modal-send
svg {

    width:
        18px !important;

    height:
        18px !important;

    flex:
        0 0 18px !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 767px) {

    body.page-invoice-view .whatsapp-modal {
        padding:
            16px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-dialog {

        max-width:
            500px !important;

        border-radius:
            15px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-header {

        padding:
            20px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-body {

        padding:
            20px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-actions {

        padding:
            16px 20px 20px !important;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 520px) {

    body.page-invoice-view .whatsapp-modal {
        align-items:
            flex-end !important;

        padding:
            10px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-dialog {

        max-width:
            none !important;

        border-radius:
            16px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-header {

        gap:
            12px !important;

        padding:
            18px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-icon {

        width:
            44px !important;

        height:
            44px !important;

        flex-basis:
            44px !important;

        border-radius:
            11px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-icon
    svg {

        width:
            22px !important;

        height:
            22px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-heading
    h2 {

        font-size:
            19px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-body {

        gap:
            17px !important;

        padding:
            18px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-actions {

        grid-template-columns:
            1fr !important;

        padding:
            15px 18px 18px !important;
    }


    body.page-invoice-view
    .whatsapp-modal-send {

        grid-row:
            1 !important;
    }


    body.page-invoice-view
    .whatsapp-modal-cancel {

        grid-row:
            2 !important;
    }

}


/* =========================================================
   NO MOSTRAR EN IMPRESIÓN / PDF
   ========================================================= */

@media print {

    body.page-invoice-view .whatsapp-modal {
        display:
            none !important;
    }

}

/* =========================================================
   CONTRACT VIEW - CABECERA MODERNA
   ========================================================= */

body.page-contract-view .contract-view-hero {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 28px;
    padding: 24px 26px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 16px;

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, .07);

    box-sizing: border-box;
}


/* =========================================================
   LADO IZQUIERDO
   ========================================================= */

body.page-contract-view .contract-view-hero-main {
    display: flex;
    align-items: center;

    gap: 16px;

    min-width: 0;
}


/* =========================================================
   ICONO
   ========================================================= */

body.page-contract-view .contract-view-hero-icon {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eff6ff;
    color: #2563eb;

    border: 1px solid #bfdbfe;
    border-radius: 14px;
}


body.page-contract-view
.contract-view-hero-icon
svg {

    width: 26px;
    height: 26px;
}


/* =========================================================
   TEXTO
   ========================================================= */

body.page-contract-view .contract-view-hero-copy {
    min-width: 0;
}


body.page-contract-view .contract-view-eyebrow {
    margin: 0 0 4px;

    color: #2563eb;

    font-size: 11px;
    font-weight: 900;

    line-height: 1.2;

    letter-spacing: .12em;
}


body.page-contract-view
.contract-view-hero-copy
h1 {

    margin: 0 0 5px;

    color: #0f172a;

    font-size: 28px;
    font-weight: 850;

    line-height: 1.15;

    letter-spacing: -.035em;
}


body.page-contract-view
.contract-view-description {

    margin: 0;

    color: #64748b;

    font-size: 14px;
    font-weight: 500;

    line-height: 1.45;
}


body.page-contract-view
.contract-view-description
strong {

    color: #334155;
    font-weight: 750;
}


/* =========================================================
   ACCIONES
   ========================================================= */

body.page-contract-view
.contract-view-hero-actions {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 10px;

    margin-left: auto;
}


/* =========================================================
   BOTÓN BASE
   ========================================================= */

body.page-contract-view
.contract-view-action {

    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 10px 16px;

    background: #ffffff;
    color: #334155;

    border: 1px solid #cbd5e1;
    border-radius: 10px;

    font-family: var(--app-font-family);
    font-size: 13px;
    font-weight: 800;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


body.page-contract-view
.contract-view-action
svg {

    width: 17px;
    height: 17px;

    flex: 0 0 17px;
}


body.page-contract-view
.contract-view-action:hover {

    text-decoration: none;

    transform: translateY(-1px);
}


/* =========================================================
   ENVIAR
   ========================================================= */

body.page-contract-view
.contract-view-send {

    background: #2563eb;
    color: #ffffff;

    border-color: #2563eb;

    box-shadow:
        0 7px 18px
        rgba(37, 99, 235, .16);
}


body.page-contract-view
.contract-view-send:hover {

    background: #1d4ed8;
    color: #ffffff;

    border-color: #1d4ed8;
}


/* =========================================================
   PDF
   ========================================================= */

body.page-contract-view
.contract-view-pdf {

    background: #0f172a;
    color: #ffffff;

    border-color: #0f172a;
}


body.page-contract-view
.contract-view-pdf:hover {

    background: #1e293b;
    color: #ffffff;

    border-color: #1e293b;
}


/* =========================================================
   DESCARGAR FIRMADO
   ========================================================= */

body.page-contract-view
.contract-view-download {

    background: #eff6ff;
    color: #2563eb;

    border-color: #bfdbfe;
}


body.page-contract-view
.contract-view-download:hover {

    background: #dbeafe;
    color: #1d4ed8;

    border-color: #93c5fd;
}


/* =========================================================
   NUEVO CONTRATO
   ========================================================= */

body.page-contract-view
.contract-view-new {

    background: #ffffff;
    color: #2563eb;

    border-color: #bfdbfe;
}


body.page-contract-view
.contract-view-new:hover {

    background: #eff6ff;
    color: #1d4ed8;

    border-color: #93c5fd;
}


/* =========================================================
   VOLVER
   ========================================================= */

body.page-contract-view
.contract-view-back {

    background: #ffffff;
    color: #475569;

    border-color: #cbd5e1;
}


body.page-contract-view
.contract-view-back:hover {

    background: #f8fafc;
    color: #0f172a;

    border-color: #94a3b8;
}


/* =========================================================
   DESACTIVADO
   ========================================================= */

body.page-contract-view
.contract-view-disabled {

    background: #f8fafc !important;
    color: #94a3b8 !important;

    border-color: #e2e8f0 !important;

    box-shadow: none !important;

    cursor: not-allowed !important;

    opacity: .75;
}


body.page-contract-view
.contract-view-disabled:hover {

    transform: none !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    body.page-contract-view
    .contract-view-hero {

        align-items: flex-start;

        flex-direction: column;
    }


    body.page-contract-view
    .contract-view-hero-actions {

        width: 100%;

        margin-left: 0;

        justify-content: flex-start;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 700px) {

    body.page-contract-view
    .contract-view-hero {

        padding: 20px;

        border-radius: 14px;
    }


    body.page-contract-view
    .contract-view-hero-main {

        align-items: flex-start;
    }


    body.page-contract-view
    .contract-view-hero-icon {

        width: 48px;
        height: 48px;

        flex-basis: 48px;
    }


    body.page-contract-view
    .contract-view-hero-copy
    h1 {

        font-size: 23px;
    }


    body.page-contract-view
    .contract-view-hero-actions {

        display: grid;

        grid-template-columns: 1fr;

        gap: 9px;
    }


    body.page-contract-view
    .contract-view-action {

        width: 100%;
    }

}

/* =========================================================
   CONTRACT-VIEW.PHP — MISMAS PROPORCIONES QUE INVOICE-VIEW.PHP
   ========================================================= */

body.page-contract-view .contract-view-hero {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;

    margin: 0 0 18px !important;
    padding: 22px 24px !important;

    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-contract-view .contract-view-hero-main {
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;

    gap: 18px !important;
}

body.page-contract-view .contract-view-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border: 0 !important;
    border-radius: 16px !important;

    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-contract-view .contract-view-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
}

body.page-contract-view .contract-view-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 10px !important;
    font-weight: 900 !important;

    line-height: 1.2 !important;
    letter-spacing: .11em !important;
}

body.page-contract-view .contract-view-hero-copy h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 30px !important;
    font-weight: 850 !important;

    line-height: 1.15 !important;
    letter-spacing: -.035em !important;
}

body.page-contract-view .contract-view-description {
    margin: 8px 0 0 !important;

    color: #64748b !important;

    font-size: 13px !important;
    font-weight: 500 !important;

    line-height: 1.5 !important;
}

body.page-contract-view .contract-view-description strong {
    color: #334155 !important;
    font-weight: 750 !important;
}


/* =========================================================
   ACCIONES — MISMA ALTURA Y TIPOGRAFÍA QUE INVOICE VIEW
   ========================================================= */

body.page-contract-view .contract-view-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;

    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;

    margin-left: auto !important;
}

body.page-contract-view .contract-view-action {
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 8px !important;

    padding: 0 18px !important;

    border-radius: 10px !important;

    font-family: var(--app-font-family);
    font-size: 13px !important;
    font-weight: 800 !important;

    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    box-sizing: border-box !important;
    cursor: pointer !important;
}

body.page-contract-view .contract-view-action svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}


/* ENVIAR AL CLIENTE */

body.page-contract-view .contract-view-send {
    min-width: 160px !important;

    border: 1px solid #1468f3 !important;
    background: #1468f3 !important;
    color: #fff !important;
}

body.page-contract-view .contract-view-send:hover {
    background: #0f5edc !important;
    border-color: #0f5edc !important;
    color: #fff !important;
}


/* GUARDAR PDF — MISMO ESTILO DEL BOTÓN PDF DE INVOICE VIEW */

body.page-contract-view .contract-view-pdf {
    min-width: 145px !important;

    border: 1px solid #1468f3 !important;
    background: #1468f3 !important;
    color: #fff !important;
}

body.page-contract-view .contract-view-pdf:hover {
    background: #0f5edc !important;
    border-color: #0f5edc !important;
    color: #fff !important;
}


/* DESCARGAR FIRMADO */

body.page-contract-view .contract-view-download {
    min-width: 175px !important;

    border: 1px solid #cbd8ea !important;
    background: #fff !important;
    color: #465875 !important;
}

body.page-contract-view .contract-view-download:hover:not(:disabled) {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
}


/* NUEVO CONTRATO */

body.page-contract-view .contract-view-new {
    min-width: 160px !important;

    border: 1px solid #cbd8ea !important;
    background: #fff !important;
    color: #1468f3 !important;
}

body.page-contract-view .contract-view-new:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
}


/* VOLVER — MISMO TAMAÑO DE INVOICE VIEW */

body.page-contract-view .contract-view-back {
    width: 160px !important;
    min-width: 160px !important;

    border: 1px solid #cbd8ea !important;
    background: #fff !important;
    color: #465875 !important;
}

body.page-contract-view .contract-view-back:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
}


/* BOTÓN DESACTIVADO */

body.page-contract-view .contract-view-disabled,
body.page-contract-view .contract-view-disabled:hover {
    background: #f8fafc !important;
    color: #b7c2d3 !important;

    border-color: #e2e8f0 !important;

    box-shadow: none !important;

    cursor: not-allowed !important;

    opacity: 1 !important;

    transform: none !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1250px) {

    body.page-contract-view .contract-view-hero {
        align-items: flex-start !important;
    }

    body.page-contract-view .contract-view-hero-actions {
        flex-wrap: wrap !important;
    }

}

@media (max-width: 1050px) {

    body.page-contract-view .contract-view-hero {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    body.page-contract-view .contract-view-hero-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        margin-left: 0 !important;
    }

}

@media (max-width: 767px) {

    body.page-contract-view .contract-view-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;

        padding: 18px 16px !important;

        border-radius: 14px !important;
    }

    body.page-contract-view .contract-view-hero-main {
        align-items: flex-start !important;
    }

    body.page-contract-view .contract-view-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-contract-view .contract-view-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-contract-view .contract-view-hero-copy h1 {
        font-size: 25px !important;
    }

    body.page-contract-view .contract-view-hero-actions {
        width: 100% !important;
    }

}

@media (max-width: 620px) {

    body.page-contract-view .contract-view-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-contract-view .contract-view-action,
    body.page-contract-view .contract-view-send,
    body.page-contract-view .contract-view-pdf,
    body.page-contract-view .contract-view-download,
    body.page-contract-view .contract-view-new,
    body.page-contract-view .contract-view-back {
        width: 100% !important;
        min-width: 0 !important;
    }

}

/* =========================================================
   CONTRACTS.PHP — PATRÓN VISUAL DE CLIENTS.PHP
   ========================================================= */

body.page-contracts .contracts-page {
    width: min(100%, 1220px) !important;
    margin: 0 auto !important;
}


/* CABECERA */

body.page-contracts .contracts-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 24px !important;

    min-height: 112px !important;

    padding: 22px 26px !important;
    margin-bottom: 18px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-contracts .contracts-hero-main {
    display: flex !important;
    align-items: center !important;

    gap: 18px !important;

    min-width: 0 !important;
}

body.page-contracts .contracts-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-contracts .contracts-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
}

body.page-contracts .contracts-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

body.page-contracts .contracts-hero h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: clamp(28px, 3vw, 36px) !important;
    line-height: 1.05 !important;

    letter-spacing: -.04em !important;
}

body.page-contracts .contracts-hero-copy {
    margin: 7px 0 0 !important;

    color: #64748b !important;

    font-size: 14px !important;
    line-height: 1.5 !important;
}

body.page-contracts .contracts-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;

    flex: 0 0 auto !important;
}


/* BOTONES CABECERA */

body.page-contracts .contracts-new-button,
body.page-contracts .contracts-back-button {
    width: 160px !important;
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 9px !important;

    padding: 0 18px !important;

    border-radius: 11px !important;

    font-size: 13px !important;
    font-weight: 800 !important;

    text-decoration: none !important;

    transition: .18s ease !important;
}

body.page-contracts .contracts-new-button svg,
body.page-contracts .contracts-back-button svg {
    width: 18px !important;
    height: 18px !important;
}

body.page-contracts .contracts-new-button {
    border: 1px solid #1468f3 !important;

    background: linear-gradient(
        135deg,
        #2676ff,
        #0f63ef
    ) !important;

    color: #fff !important;

    box-shadow: 0 8px 18px rgba(20, 104, 243, .14) !important;
}

body.page-contracts .contracts-new-button:hover {
    color: #fff !important;

    transform: translateY(-1px) !important;

    box-shadow: 0 10px 22px rgba(20, 104, 243, .20) !important;
}

body.page-contracts .contracts-back-button {
    border: 1px solid #cfdbeb !important;

    background: #fff !important;
    color: #334155 !important;
}

body.page-contracts .contracts-back-button:hover {
    color: #1468f3 !important;

    border-color: #b8cdf0 !important;
    background: #f7faff !important;

    transform: translateY(-1px) !important;
}


/* ALERTAS */

body.page-contracts .contract-alert {
    width: 100% !important;

    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;

    gap: 10px !important;

    padding: 13px 16px !important;
    margin: 0 0 18px !important;

    border: 1px solid !important;
    border-radius: 11px !important;

    font-size: 13px !important;
}

body.page-contracts .contract-alert-icon {
    width: 25px !important;
    height: 25px !important;

    display: inline-grid !important;
    place-items: center !important;

    flex: 0 0 25px !important;

    border-radius: 50% !important;

    font-weight: 900 !important;
}

body.page-contracts .contract-alert-success {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #065f46 !important;
}

body.page-contracts .contract-alert-success .contract-alert-icon {
    background: #10b981 !important;
    color: #fff !important;
}

body.page-contracts .contract-alert-error {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
}

body.page-contracts .contract-alert-error .contract-alert-icon {
    background: #ef4444 !important;
    color: #fff !important;
}


/* CARD LISTADO */

body.page-contracts .contracts-card {
    padding: 20px 24px !important;
    margin-bottom: 18px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-contracts .contracts-list-card {
    padding: 18px 20px 16px !important;
}

body.page-contracts .contracts-list-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 20px !important;

    margin-bottom: 15px !important;
}

body.page-contracts .contracts-section-heading {
    display: flex !important;
    align-items: center !important;

    gap: 14px !important;

    min-width: 0 !important;
}

body.page-contracts .contracts-section-heading-compact {
    margin: 0 !important;
}

body.page-contracts .contracts-section-icon {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 50% !important;

    background: linear-gradient(
        135deg,
        #2676ff,
        #0f63ef
    ) !important;

    color: #fff !important;

    box-shadow: 0 8px 18px rgba(20, 104, 243, .18) !important;
}

body.page-contracts .contracts-section-icon svg {
    width: 21px !important;
    height: 21px !important;
}

body.page-contracts .contracts-section-heading h2 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 21px !important;

    letter-spacing: -.025em !important;
}

body.page-contracts .contracts-section-heading p {
    margin: 4px 0 0 !important;

    color: #64748b !important;

    font-size: 12px !important;
}


/* BUSCADOR — 50% Y LUPA FUERA DEL INPUT */

body.page-contracts .contracts-search {
    width: 50% !important;
    max-width: 520px !important;
    min-width: 260px !important;

    display: flex !important;
    align-items: center !important;

    gap: 10px !important;

    margin: 0 !important;
}

body.page-contracts .contracts-search-icon {
    position: static !important;

    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: #64748b !important;

    pointer-events: none !important;
}

body.page-contracts .contracts-search-icon svg {
    width: 20px !important;
    height: 20px !important;

    display: block !important;
}

body.page-contracts .contracts-search input {
    flex: 1 1 auto !important;

    width: 100% !important;
    min-height: 40px !important;

    padding: 0 13px !important;

    border: 1px solid #cdd9e9 !important;
    border-radius: 9px !important;

    background: #fff !important;
    background-image: none !important;

    color: #334155 !important;

    font-size: 12px !important;

    outline: none !important;
}

body.page-contracts .contracts-search input:focus {
    border-color: #87b4ff !important;

    box-shadow: 0 0 0 3px rgba(20, 104, 243, .09) !important;
}


/* TABLA */

body.page-contracts .contracts-table-wrap {
    width: 100% !important;

    overflow: auto !important;

    border: 1px solid #e3eaf4 !important;
    border-radius: 12px !important;

    background: #fff !important;
}

body.page-contracts .contracts-table {
    width: 100% !important;
    min-width: 1040px !important;

    border-collapse: collapse !important;

    font-size: 12px !important;
}

body.page-contracts .contracts-table thead th {
    padding: 11px 13px !important;

    background: #f5f8fc !important;
    color: #51617c !important;

    border: 0 !important;

    text-align: left !important;
    text-transform: uppercase !important;

    font-size: 9px !important;
    font-weight: 900 !important;

    letter-spacing: .035em !important;

    white-space: nowrap !important;
}

body.page-contracts .contracts-table td {
    padding: 11px 13px !important;

    border-top: 1px solid #edf1f6 !important;
    border-bottom: 0 !important;

    color: #475569 !important;

    vertical-align: middle !important;
}

body.page-contracts .contracts-table tbody tr {
    transition: background .16s ease !important;
}

body.page-contracts .contracts-table tbody tr:hover {
    background: #fbfdff !important;
}

body.page-contracts .contracts-table tbody tr[hidden] {
    display: none !important;
}

body.page-contracts .contracts-table .text-right {
    text-align: right !important;
}

body.page-contracts .contract-number,
body.page-contracts .contract-client-name,
body.page-contracts .contract-amount {
    color: #172033 !important;
    font-weight: 800 !important;
}

body.page-contracts .contract-work-preview {
    max-width: 230px !important;

    overflow: hidden !important;

    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}


/* ESTADOS */

body.page-contracts .contract-status {
    min-width: 112px !important;

    display: inline-flex !important;
    align-items: center !important;

    gap: 7px !important;

    padding: 6px 9px !important;

    border: 1px solid !important;
    border-radius: 8px !important;

    box-sizing: border-box !important;

    text-decoration: none !important;

    transition: .16s ease !important;
}

body.page-contracts .contract-status:hover {
    transform: translateY(-1px) !important;
}

body.page-contracts .contract-status-icon {
    width: 20px !important;
    height: 20px !important;

    display: inline-grid !important;
    place-items: center !important;

    flex: 0 0 20px !important;

    border-radius: 50% !important;

    font-size: 11px !important;
    font-weight: 900 !important;
}

body.page-contracts .contract-status strong {
    display: block !important;

    font-size: 11px !important;
    line-height: 1.2 !important;
}

body.page-contracts .contract-status small {
    display: block !important;

    margin-top: 2px !important;

    font-size: 8px !important;
    line-height: 1.2 !important;
}

body.page-contracts .contract-status-signed {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #047857 !important;
}

body.page-contracts .contract-status-signed .contract-status-icon {
    background: #10b981 !important;
    color: #fff !important;
}

body.page-contracts .contract-status-pending {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}

body.page-contracts .contract-status-pending .contract-status-icon {
    background: #f59e0b !important;
    color: #fff !important;
}

body.page-contracts .contract-status-rejected {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
}

body.page-contracts .contract-status-rejected .contract-status-icon {
    background: #ef4444 !important;
    color: #fff !important;
}


/* ACCIONES COMPACTAS COMO CLIENTES */

body.page-contracts .contract-actions {
    display: flex !important;
    align-items: center !important;

    gap: 6px !important;

    white-space: nowrap !important;
}

body.page-contracts .contract-delete-form {
    display: inline-flex !important;

    margin: 0 !important;
}

body.page-contracts .contract-action {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;

    display: inline-grid !important;
    place-items: center !important;

    padding: 0 !important;

    border: 1px solid #d7e1ee !important;
    border-radius: 8px !important;

    background: #f8fbff !important;

    text-decoration: none !important;

    cursor: pointer !important;

    transition: .16s ease !important;
}

body.page-contracts .contract-action svg {
    width: 15px !important;
    height: 15px !important;
}

body.page-contracts .contract-action-view {
    color: #1468f3 !important;
}

body.page-contracts .contract-action-view:hover {
    color: #0f63ef !important;

    border-color: #bcd1f3 !important;
    background: #f3f7ff !important;

    transform: translateY(-1px) !important;
}

body.page-contracts .contract-action-delete {
    color: #dc2626 !important;

    border-color: #fde0e3 !important;
    background: #fff1f2 !important;
}

body.page-contracts .contract-action-delete:hover {
    color: #b91c1c !important;

    border-color: #fca5a5 !important;
    background: #fff1f2 !important;

    transform: translateY(-1px) !important;
}


/* VACÍO / SIN RESULTADOS */

body.page-contracts .contracts-empty {
    padding: 48px 20px !important;

    text-align: center !important;
}

body.page-contracts .contracts-empty-icon {
    width: 58px !important;
    height: 58px !important;

    display: grid !important;
    place-items: center !important;

    margin: 0 auto 14px !important;

    border-radius: 16px !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-contracts .contracts-empty-icon svg {
    width: 28px !important;
    height: 28px !important;
}

body.page-contracts .contracts-empty h2 {
    margin: 0 !important;

    color: #172033 !important;

    font-size: 20px !important;
}

body.page-contracts .contracts-empty p {
    margin: 7px 0 18px !important;

    color: #64748b !important;

    font-size: 13px !important;
}

body.page-contracts .contracts-empty-button {
    min-height: 40px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 16px !important;

    border: 1px solid #1468f3 !important;
    border-radius: 9px !important;

    background: #1468f3 !important;
    color: #fff !important;

    font-size: 12px !important;
    font-weight: 800 !important;

    text-decoration: none !important;
}

body.page-contracts .contracts-no-results {
    padding: 28px 15px !important;

    color: #64748b !important;

    font-size: 13px !important;

    text-align: center !important;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    body.page-contracts .contracts-hero {
        align-items: flex-start !important;
    }

    body.page-contracts .contracts-hero-actions {
        flex-wrap: wrap !important;
    }

    body.page-contracts .contracts-list-heading {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    body.page-contracts .contracts-search {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

}

@media (max-width: 767px) {

    body.page-contracts .contracts-hero {
        padding: 18px !important;
        align-items: flex-start !important;
    }

    body.page-contracts .contracts-card {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    body.page-contracts .contracts-new-button,
    body.page-contracts .contracts-back-button {
        width: 145px !important;
        min-height: 44px !important;
    }

}

@media (max-width: 600px) {

    body.page-contracts .contracts-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-contracts .contracts-hero-actions {
        width: 100% !important;

        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-contracts .contracts-new-button,
    body.page-contracts .contracts-back-button {
        width: 100% !important;
    }

    body.page-contracts .contracts-section-heading {
        align-items: flex-start !important;
    }

}

/* =========================================================
   QUOTATION CREATE — PATRÓN VISUAL DE CLIENTS.PHP
   ========================================================= */
body.page-quotation-create .quotation-create-page{width:min(100%,1220px)!important;margin:0 auto!important}
body.page-quotation-create .quotation-create-hero{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:24px!important;min-height:112px!important;padding:22px 26px!important;margin-bottom:18px!important;background:#fff!important;border:1px solid #dfe8f4!important;border-radius:16px!important;box-shadow:0 10px 30px rgba(30,64,175,.06)!important}
body.page-quotation-create .quotation-create-hero-main{display:flex!important;align-items:center!important;gap:18px!important;min-width:0!important}
body.page-quotation-create .quotation-create-hero-icon{width:58px!important;height:58px!important;flex:0 0 58px!important;display:grid!important;place-items:center!important;border-radius:16px!important;background:#eef5ff!important;color:#1468f3!important}
body.page-quotation-create .quotation-create-hero-icon svg{width:29px!important;height:29px!important}
body.page-quotation-create .quotation-create-eyebrow{margin:0 0 5px!important;color:#1468f3!important;font-size:11px!important;font-weight:900!important;letter-spacing:.12em!important;text-transform:uppercase!important}
body.page-quotation-create .quotation-create-hero h1{margin:0!important;color:#0f172a!important;font-size:clamp(28px,3vw,36px)!important;line-height:1.05!important;letter-spacing:-.04em!important}
body.page-quotation-create .quotation-create-hero-copy{margin:7px 0 0!important;color:#64748b!important;font-size:14px!important;line-height:1.5!important}
body.page-quotation-create .quotation-create-hero-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 0 auto!important}
body.page-quotation-create .quotation-create-back-button{width:160px!important;min-height:52px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;padding:0 18px!important;border:1px solid #cfdbeb!important;border-radius:11px!important;background:#fff!important;color:#334155!important;font-size:13px!important;font-weight:800!important;text-decoration:none!important;transition:.18s ease!important}
body.page-quotation-create .quotation-create-back-button svg{width:18px!important;height:18px!important}
body.page-quotation-create .quotation-create-back-button:hover{color:#1468f3!important;border-color:#b8cdf0!important;background:#f7faff!important;transform:translateY(-1px)!important}
body.page-quotation-create .quotation-create-alert{padding:13px 16px!important;margin-bottom:18px!important;border-radius:11px!important;font-size:13px!important}
body.page-quotation-create .quotation-create-alert-error{background:#fef2f2!important;color:#991b1b!important;border:1px solid #fecaca!important}
body.page-quotation-create .quotation-create-form{width:100%!important}
body.page-quotation-create .quotation-create-card{padding:20px 24px!important;margin-bottom:18px!important;background:#fff!important;border:1px solid #dfe8f4!important;border-radius:16px!important;box-shadow:0 10px 30px rgba(30,64,175,.06)!important}
body.page-quotation-create .quotation-create-section-heading{display:flex!important;align-items:center!important;gap:14px!important;margin-bottom:20px!important}
body.page-quotation-create .quotation-create-section-icon{width:46px!important;height:46px!important;flex:0 0 46px!important;display:grid!important;place-items:center!important;border-radius:50%!important;background:linear-gradient(135deg,#2676ff,#0f63ef)!important;color:#fff!important;box-shadow:0 8px 18px rgba(20,104,243,.18)!important}
body.page-quotation-create .quotation-create-section-icon svg{width:21px!important;height:21px!important}
body.page-quotation-create .quotation-create-section-heading h2{margin:0!important;color:#0f172a!important;font-size:21px!important;letter-spacing:-.025em!important}
body.page-quotation-create .quotation-create-section-heading p{margin:4px 0 0!important;color:#64748b!important;font-size:12px!important}
body.page-quotation-create .quotation-create-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px 20px!important}
body.page-quotation-create .quotation-create-field{display:flex!important;flex-direction:column!important;gap:7px!important;margin:0!important;color:#334155!important;font-size:13px!important;font-weight:700!important}
body.page-quotation-create .quotation-create-field>span{color:#334155!important;font-size:13px!important;font-weight:700!important}
body.page-quotation-create .quotation-create-field input,body.page-quotation-create .quotation-create-field textarea,body.page-quotation-create .quotation-create-line input{width:100%!important;border:1px solid #cfdaea!important;border-radius:10px!important;background:#fff!important;color:#172033!important;transition:border-color .18s ease,box-shadow .18s ease!important}
body.page-quotation-create .quotation-create-field input,body.page-quotation-create .quotation-create-line input{min-height:44px!important}
body.page-quotation-create .quotation-create-field textarea{padding:13px 14px!important;resize:vertical!important}
body.page-quotation-create .quotation-create-field input:focus,body.page-quotation-create .quotation-create-field textarea:focus,body.page-quotation-create .quotation-create-line input:focus{outline:none!important;border-color:#87b4ff!important;box-shadow:0 0 0 3px rgba(20,104,243,.09)!important}
body.page-quotation-create .quotation-fixed-note{display:flex!important;align-items:flex-start!important;gap:8px!important;margin-top:16px!important;padding:13px 15px!important;border:1px solid #dbe7f6!important;border-left:4px solid #1468f3!important;border-radius:10px!important;background:#f8fbff!important;color:#52627f!important;font-size:12px!important;line-height:1.55!important}
body.page-quotation-create .quotation-fixed-note strong{color:#1468f3!important}
body.page-quotation-create .quotation-create-lines{display:grid!important;gap:9px!important;margin-bottom:12px!important}
body.page-quotation-create .quotation-create-line{display:grid!important;grid-template-columns:minmax(220px,1fr) 120px 150px 42px!important;gap:8px!important;align-items:center!important}
body.page-quotation-create .quotation-create-line .remove-line{width:42px!important;height:42px!important;display:inline-grid!important;place-items:center!important;padding:0!important;border:1px solid #fde0e3!important;border-radius:9px!important;background:#fff1f2!important;color:#dc2626!important;font-size:20px!important;line-height:1!important}
body.page-quotation-create .quotation-add-line{min-height:40px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0 14px!important;border:1px solid #cbd8ea!important;border-radius:9px!important;background:#fff!important;color:#1468f3!important;font-family: var(--app-font-family);font-size:12px!important;font-weight:800!important;cursor:pointer!important}
body.page-quotation-create .quotation-create-totals{width:100%!important;max-width:380px!important;margin:26px 0 0 auto!important;padding:16px 18px!important;border:1px solid #e3eaf4!important;border-radius:12px!important;background:#f8fafc!important}
body.page-quotation-create .quotation-create-totals>div{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:20px!important;padding:7px 0!important;color:#64748b!important;font-size:12px!important}
body.page-quotation-create .quotation-create-totals .grand{margin-top:8px!important;padding:13px 14px!important;border:1px solid #bfdbfe!important;border-radius:9px!important;background:#eef5ff!important;color:#1468f3!important}
body.page-quotation-create .quotation-create-totals .grand strong{color:#1468f3!important;font-size:18px!important}
body.page-quotation-create .quotation-create-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;width:100%!important;margin:0 0 18px!important}
body.page-quotation-create .quotation-create-actions .quotation-save-btn,body.page-quotation-create .quotation-create-actions .quotation-cancel-btn{width:100%!important;min-height:46px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0 18px!important;border-radius:10px!important;font-family: var(--app-font-family);font-size:13px!important;font-weight:800!important;text-decoration:none!important;cursor:pointer!important}
body.page-quotation-create .quotation-create-actions .quotation-save-btn{border:1px solid #1468f3!important;background:linear-gradient(135deg,#2676ff,#0f63ef)!important;color:#fff!important}
body.page-quotation-create .quotation-create-actions .quotation-cancel-btn{border:1px solid #cbd8ea!important;background:#fff!important;color:#465875!important}
@media(max-width:900px){body.page-quotation-create .quotation-create-grid{grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-line{grid-template-columns:minmax(180px,1fr) 100px 125px 42px!important}}
@media(max-width:767px){body.page-quotation-create .quotation-create-hero{padding:18px!important;align-items:flex-start!important;border-radius:14px!important}body.page-quotation-create .quotation-create-card{padding:16px!important;border-radius:14px!important}body.page-quotation-create .quotation-create-back-button{width:112px!important;min-height:44px!important}body.page-quotation-create .quotation-create-line{grid-template-columns:1fr 1fr!important}body.page-quotation-create .quotation-create-line>input:first-child{grid-column:1/-1!important}body.page-quotation-create .quotation-create-line .remove-line{width:100%!important}}
@media(max-width:520px){body.page-quotation-create .quotation-create-hero{display:grid!important;grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-hero-actions{width:100%!important;justify-content:stretch!important}body.page-quotation-create .quotation-create-back-button{width:100%!important}body.page-quotation-create .quotation-create-actions{grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-line{grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-line>input:first-child{grid-column:auto!important}}

/* =========================================================
   QUOTATION-VIEW.PHP — PATRÓN MODERNO
   ========================================================= */

body.page-quotation-view .quotation-page {
    width: min(100%, 1220px) !important;
    margin: 0 auto !important;
}


/* =========================================================
   CABECERA
   ========================================================= */

body.page-quotation-view .quotation-view-hero {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 24px !important;

    min-height: 112px !important;

    margin: 0 0 18px !important;
    padding: 22px 26px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow:
        0 10px 30px
        rgba(30,64,175,.06) !important;
}

body.page-quotation-view .quotation-view-hero-main {
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;

    gap: 18px !important;
}

body.page-quotation-view .quotation-view-hero-icon {
    width: 58px !important;
    height: 58px !important;

    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-quotation-view .quotation-view-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
}

body.page-quotation-view .quotation-view-hero-copy {
    min-width: 0 !important;
}

body.page-quotation-view .quotation-view-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

body.page-quotation-view .quotation-view-hero h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: clamp(28px,3vw,36px) !important;
    line-height: 1.05 !important;
    font-weight: 850 !important;

    letter-spacing: -.04em !important;
}

body.page-quotation-view .quotation-view-description {
    margin: 7px 0 0 !important;

    color: #64748b !important;

    font-size: 14px !important;
    line-height: 1.5 !important;
}

body.page-quotation-view .quotation-view-description strong {
    color: #334155 !important;
    font-weight: 800 !important;
}


/* =========================================================
   ACCIONES
   ========================================================= */

body.page-quotation-view .quotation-view-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;

    flex: 0 0 auto !important;
}

body.page-quotation-view .quotation-view-action {
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 9px !important;

    padding: 0 18px !important;

    border-radius: 11px !important;

    font-family: var(--app-font-family);
    font-size: 13px !important;
    font-weight: 800 !important;

    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    cursor: pointer !important;

    box-sizing: border-box !important;

    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease !important;
}

body.page-quotation-view .quotation-view-action svg {
    width: 18px !important;
    height: 18px !important;

    flex: 0 0 18px !important;
}


/* NUEVA COTIZACIÓN */

body.page-quotation-view .quotation-view-new {
    min-width: 170px !important;

    border: 1px solid #1468f3 !important;

    background:
        linear-gradient(
            135deg,
            #2676ff,
            #0f63ef
        ) !important;

    color: #fff !important;

    box-shadow:
        0 8px 18px
        rgba(20,104,243,.14) !important;
}

body.page-quotation-view .quotation-view-new:hover {
    color: #fff !important;

    transform: translateY(-1px) !important;

    box-shadow:
        0 10px 22px
        rgba(20,104,243,.20) !important;
}


/* IMPRIMIR */

body.page-quotation-view .quotation-view-print {
    min-width: 145px !important;

    border: 1px solid #1468f3 !important;

    background: #1468f3 !important;
    color: #fff !important;
}

body.page-quotation-view .quotation-view-print:hover {
    border-color: #0f5edc !important;
    background: #0f5edc !important;
    color: #fff !important;

    transform: translateY(-1px) !important;
}


/* VOLVER */

body.page-quotation-view .quotation-view-back {
    width: 160px !important;
    min-width: 160px !important;

    border: 1px solid #cfdbeb !important;

    background: #fff !important;
    color: #334155 !important;
}

body.page-quotation-view .quotation-view-back:hover {
    color: #1468f3 !important;

    border-color: #b8cdf0 !important;
    background: #f7faff !important;

    transform: translateY(-1px) !important;
}


/* =========================================================
   DOCUMENTO
   ========================================================= */

body.page-quotation-view .quotation-paper {
    width: 100% !important;
    max-width: 950px !important;

    margin: 0 auto 28px !important;
    padding: 46px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow:
        0 10px 30px
        rgba(30,64,175,.06) !important;

    overflow: hidden !important;
}


/* CABECERA INTERIOR DEL DOCUMENTO */

body.page-quotation-view .quotation-company-header {
    gap: 35px !important;
}

body.page-quotation-view .quotation-company-logo {
    border-radius: 12px !important;
}

body.page-quotation-view .quotation-heading-label {
    color: #1468f3 !important;
}

body.page-quotation-view .quotation-divider {
    height: 4px !important;

    margin: 30px 0 !important;

    border: 0 !important;

    background:
        linear-gradient(
            to right,
            #1468f3 0%,
            #1468f3 80%,
            #3f4650 80%,
            #3f4650 100%
        ) !important;
}


/* INFORMACIÓN */

body.page-quotation-view .quotation-info-grid {
    gap: 15px !important;
}

body.page-quotation-view .quotation-info-box {
    padding: 18px !important;

    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;

    background: #f8fafc !important;
}

body.page-quotation-view .quotation-info-label {
    color: #1468f3 !important;

    font-size: 10px !important;
    font-weight: 900 !important;

    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

body.page-quotation-view .quotation-info-value {
    color: #172033 !important;

    font-weight: 800 !important;
}


/* TABLA */

body.page-quotation-view .quotation-table-wrap {
    border: 1px solid #e3eaf4 !important;
    border-radius: 12px !important;

    overflow: auto !important;
}

body.page-quotation-view .quotation-table {
    width: 100% !important;

    border-collapse: collapse !important;
}

body.page-quotation-view .quotation-table th {
    padding: 11px 13px !important;

    background: #f5f8fc !important;
    color: #51617c !important;

    border: 0 !important;

    font-size: 9px !important;
    font-weight: 900 !important;

    letter-spacing: .035em !important;

    text-transform: uppercase !important;
}

body.page-quotation-view .quotation-table td {
    padding: 12px 13px !important;

    border-top: 1px solid #edf1f6 !important;
    border-bottom: 0 !important;

    color: #475569 !important;
}

body.page-quotation-view .quotation-table tbody tr:hover {
    background: #fbfdff !important;
}


/* CONDICIONES */

body.page-quotation-view .quotation-work-conditions {
    margin-top: 24px !important;
    padding: 18px 20px !important;

    border: 1px solid #dbe7f6 !important;
    border-left: 4px solid #1468f3 !important;
    border-radius: 10px !important;

    background: #f8fbff !important;
}

body.page-quotation-view .quotation-work-conditions-title {
    color: #1468f3 !important;
}


/* TOTALES */

body.page-quotation-view .quotation-totals {
    border: 1px solid #e3eaf4 !important;
    border-radius: 12px !important;

    background: #f8fafc !important;

    overflow: hidden !important;
}

body.page-quotation-view .quotation-total-row {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

body.page-quotation-view .quotation-total-row.grand-total {
    border: 1px solid #bfdbfe !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-quotation-view .quotation-total-row.grand-total strong {
    color: #1468f3 !important;
}


/* NOTAS */

body.page-quotation-view .quotation-notes {
    border-radius: 10px !important;

    border-left-color: #1468f3 !important;

    background: #f8fbff !important;
}

body.page-quotation-view .quotation-notes-title {
    color: #1468f3 !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

    body.page-quotation-view .quotation-view-hero {
        align-items: flex-start !important;
    }

    body.page-quotation-view .quotation-view-hero-actions {
        flex-wrap: wrap !important;
    }

}

@media (max-width: 767px) {

    body.page-quotation-view .quotation-view-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;

        padding: 18px !important;

        border-radius: 14px !important;
    }

    body.page-quotation-view .quotation-view-hero-main {
        align-items: flex-start !important;
    }

    body.page-quotation-view .quotation-view-hero-icon {
        width: 50px !important;
        height: 50px !important;

        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-quotation-view .quotation-view-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-quotation-view .quotation-view-hero h1 {
        font-size: 25px !important;
    }

    body.page-quotation-view .quotation-view-hero-actions {
        width: 100% !important;
    }

    body.page-quotation-view .quotation-paper {
        padding: 22px !important;

        border-radius: 14px !important;
    }

}

@media (max-width: 620px) {

    body.page-quotation-view .quotation-view-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-quotation-view .quotation-view-action,
    body.page-quotation-view .quotation-view-new,
    body.page-quotation-view .quotation-view-print,
    body.page-quotation-view .quotation-view-back {
        width: 100% !important;
        min-width: 0 !important;
    }

}

@media print {

    body.page-quotation-view .quotation-view-hero {
        display: none !important;
    }

    body.page-quotation-view .quotation-paper {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

}

/* =========================================================
   CONTRACT SIGN - CONFIRMACIÓN Y BOTÓN DE FIRMA
   ========================================================= */

body.page-contract-sign .confirm-box {
    width: 100% !important;
    margin: 24px 0 18px !important;
    padding: 22px 24px !important;
    background: #f8fafc !important;
    border: 1px solid #dbe4f0 !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.page-contract-sign .confirm-label {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    margin: 0 !important;
    cursor: pointer !important;
}

body.page-contract-sign .confirm-label input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    flex: 0 0 20px !important;
    margin: 0 !important;
    accent-color: #1468f3 !important;
    cursor: pointer !important;
}

body.page-contract-sign .confirm-label span {
    display: block !important;
    margin: 0 !important;
    color: #17233c !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.55 !important;
    text-align: left !important;
}


/* =========================================================
   CONTRACT VIEW - FIRMA DEL PRESTADOR SVG MÁS PEQUEÑA
   ========================================================= */

body.page-contract-view .provider-digital-signature {
    width: 100% !important;
    height: 72px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow: visible !important;
}

body.page-contract-view .provider-signature-svg {
    display: block !important;
    width: min(72%, 300px) !important;
    height: 62px !important;
    max-width: 100% !important;
    overflow: visible !important;
}

body.page-contract-view .provider-signature-svg path {
    fill: #123d9a !important;
    opacity: 1 !important;
}

@media screen and (max-width: 768px) {

    body.page-contract-view .provider-digital-signature {
        height: 64px !important;
    }

    body.page-contract-view .provider-signature-svg {
        width: min(78%, 260px) !important;
        height: 54px !important;
    }
}

/* CSS PARA AÑADIR AL FINAL DE /assets/css/app.css */

body.page-contract-send.whatsapp-modal-is-open {
    overflow: hidden !important;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

body.page-contract-send .whatsapp-modal {
    position: fixed !important;
    inset: 0 !important;

    z-index: 99999 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 24px !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transition:
        opacity .2s ease,
        visibility .2s ease !important;
}


/* =========================================================
   MODAL ABIERTO
   ========================================================= */

body.page-contract-send .whatsapp-modal.whatsapp-modal-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


/* =========================================================
   FONDO
   ========================================================= */

body.page-contract-send .whatsapp-modal-overlay {
    position: absolute !important;
    inset: 0 !important;

    background:
        rgba(15, 23, 42, .58) !important;

    backdrop-filter:
        blur(5px) !important;

    -webkit-backdrop-filter:
        blur(5px) !important;
}


/* =========================================================
   VENTANA
   ========================================================= */

body.page-contract-send .whatsapp-modal-dialog {
    position: relative !important;
    z-index: 2 !important;

    width: 100% !important;
    max-width: 520px !important;

    overflow: hidden !important;

    background: #ffffff !important;

    border:
        1px solid #dfe8f4 !important;

    border-radius:
        18px !important;

    box-shadow:
        0 30px 80px
        rgba(15, 23, 42, .25) !important;

    transform:
        translateY(18px)
        scale(.98) !important;

    transition:
        transform .2s ease !important;
}


body.page-contract-send
.whatsapp-modal.whatsapp-modal-open
.whatsapp-modal-dialog {

    transform:
        translateY(0)
        scale(1) !important;
}


/* =========================================================
   CABECERA
   ========================================================= */

body.page-contract-send .whatsapp-modal-header {
    display: flex !important;

    align-items:
        flex-start !important;

    justify-content:
        space-between !important;

    gap: 20px !important;

    padding:
        24px 24px 20px !important;

    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #ffffff 100%
        ) !important;

    border-bottom:
        1px solid #e5edf7 !important;
}


/* =========================================================
   TÍTULO + ICONO
   ========================================================= */

body.page-contract-send .whatsapp-modal-heading {
    display: flex !important;

    align-items:
        flex-start !important;

    gap: 15px !important;

    min-width: 0 !important;
}


body.page-contract-send .whatsapp-modal-icon {
    width: 48px !important;
    height: 48px !important;

    flex:
        0 0 48px !important;

    display: flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    background:
        #ecfdf3 !important;

    color:
        #16a34a !important;

    border:
        1px solid #bbf7d0 !important;

    border-radius:
        13px !important;
}


body.page-contract-send .whatsapp-modal-icon svg {
    width: 24px !important;
    height: 24px !important;
}


/* =========================================================
   EYEBROW
   ========================================================= */

body.page-contract-send .whatsapp-modal-eyebrow {
    margin:
        0 0 3px !important;

    color:
        #16a34a !important;

    font-size:
        11px !important;

    font-weight:
        900 !important;

    line-height:
        1.2 !important;

    letter-spacing:
        .12em !important;
}


/* =========================================================
   TÍTULO
   ========================================================= */

body.page-contract-send .whatsapp-modal-heading h2 {
    margin:
        0 0 5px !important;

    color:
        #0f172a !important;

    font-size:
        21px !important;

    font-weight:
        850 !important;

    line-height:
        1.2 !important;

    letter-spacing:
        -.025em !important;
}


/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

body.page-contract-send
.whatsapp-modal-heading
p:not(.whatsapp-modal-eyebrow) {

    margin: 0 !important;

    color:
        #64748b !important;

    font-size:
        13px !important;

    font-weight:
        500 !important;

    line-height:
        1.45 !important;
}


/* =========================================================
   CERRAR
   ========================================================= */

body.page-contract-send .whatsapp-modal-close {
    width: 38px !important;
    height: 38px !important;

    flex:
        0 0 38px !important;

    display: flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    padding: 0 !important;

    background:
        #ffffff !important;

    color:
        #64748b !important;

    border:
        1px solid #dbe5f1 !important;

    border-radius:
        10px !important;

    font-family: var(--app-font-family);

    font-size:
        24px !important;

    font-weight:
        400 !important;

    line-height:
        1 !important;

    cursor:
        pointer !important;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease !important;
}


body.page-contract-send .whatsapp-modal-close:hover {
    background:
        #f8fafc !important;

    color:
        #0f172a !important;

    border-color:
        #cbd5e1 !important;

    transform:
        rotate(3deg) !important;
}


/* =========================================================
   CUERPO
   ========================================================= */

body.page-contract-send .whatsapp-modal-body {
    display: grid !important;

    gap: 20px !important;

    padding:
        24px !important;

    background:
        #ffffff !important;
}


/* =========================================================
   CAMPOS
   ========================================================= */

body.page-contract-send .whatsapp-field {
    display: grid !important;

    gap: 8px !important;
}


body.page-contract-send .whatsapp-field label {
    display: block !important;

    margin: 0 !important;

    color:
        #334155 !important;

    font-size:
        13px !important;

    font-weight:
        800 !important;
}


/* =========================================================
   SELECT PAÍS
   ========================================================= */

body.page-contract-send .whatsapp-field select {
    width: 100% !important;
    height: 50px !important;

    margin: 0 !important;

    padding:
        0 42px 0 14px !important;

    background-color:
        #ffffff !important;

    color:
        #0f172a !important;

    border:
        1px solid #cfdbeb !important;

    border-radius:
        11px !important;

    font-family: var(--app-font-family);

    font-size:
        14px !important;

    font-weight:
        650 !important;

    outline:
        none !important;

    cursor:
        pointer !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease !important;
}


body.page-contract-send .whatsapp-field select:focus {
    border-color:
        #2563eb !important;

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, .10) !important;
}


/* =========================================================
   TELÉFONO
   ========================================================= */

body.page-contract-send .whatsapp-phone-control {
    display: grid !important;

    grid-template-columns:
        auto minmax(0, 1fr) !important;

    align-items:
        stretch !important;

    width:
        100% !important;

    overflow:
        hidden !important;

    background:
        #ffffff !important;

    border:
        1px solid #cfdbeb !important;

    border-radius:
        11px !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease !important;
}


body.page-contract-send
.whatsapp-phone-control:focus-within {

    border-color:
        #2563eb !important;

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, .10) !important;
}


/* =========================================================
   PREFIJO
   ========================================================= */

body.page-contract-send .whatsapp-prefix {
    min-width:
        70px !important;

    display:
        flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    padding:
        0 14px !important;

    background:
        #f8fafc !important;

    color:
        #334155 !important;

    border-right:
        1px solid #dbe5f1 !important;

    font-size:
        14px !important;

    font-weight:
        850 !important;

    white-space:
        nowrap !important;
}


/* =========================================================
   INPUT TELÉFONO
   ========================================================= */

body.page-contract-send
.whatsapp-phone-control
input {

    width:
        100% !important;

    height:
        50px !important;

    margin:
        0 !important;

    padding:
        0 14px !important;

    background:
        #ffffff !important;

    color:
        #0f172a !important;

    border:
        0 !important;

    border-radius:
        0 !important;

    box-shadow:
        none !important;

    outline:
        none !important;

    font-family: var(--app-font-family);

    font-size:
        15px !important;

    font-weight:
        650 !important;
}


body.page-contract-send
.whatsapp-phone-control
input:focus {

    border:
        0 !important;

    box-shadow:
        none !important;
}


/* =========================================================
   TEXTO DE AYUDA
   ========================================================= */

body.page-contract-send .whatsapp-field-help {
    margin:
        0 !important;

    color:
        #64748b !important;

    font-size:
        12px !important;

    font-weight:
        500 !important;

    line-height:
        1.45 !important;
}


/* =========================================================
   ERROR
   ========================================================= */

body.page-contract-send .whatsapp-error {
    padding:
        11px 13px !important;

    background:
        #fef2f2 !important;

    color:
        #b42318 !important;

    border:
        1px solid #fecaca !important;

    border-radius:
        9px !important;

    font-size:
        13px !important;

    font-weight:
        700 !important;

    line-height:
        1.4 !important;
}


body.page-contract-send
.whatsapp-error[hidden] {

    display:
        none !important;
}


/* =========================================================
   PIE / ACCIONES
   ========================================================= */

body.page-contract-send .whatsapp-modal-actions {
    display: grid !important;

    grid-template-columns:
        1fr 1.45fr !important;

    gap:
        12px !important;

    padding:
        18px 24px 24px !important;

    background:
        #ffffff !important;

    border-top:
        1px solid #edf2f7 !important;
}


/* =========================================================
   BOTÓN CANCELAR
   ========================================================= */

body.page-contract-send .whatsapp-modal-cancel {
    min-height:
        48px !important;

    padding:
        10px 18px !important;

    background:
        #ffffff !important;

    color:
        #334155 !important;

    border:
        1px solid #cfdbeb !important;

    border-radius:
        10px !important;

    font-family: var(--app-font-family);

    font-size:
        13px !important;

    font-weight:
        800 !important;

    cursor:
        pointer !important;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease !important;
}


body.page-contract-send
.whatsapp-modal-cancel:hover {

    background:
        #f8fafc !important;

    border-color:
        #94a3b8 !important;

    transform:
        translateY(-1px) !important;
}


/* =========================================================
   BOTÓN ENVIAR
   ========================================================= */

body.page-contract-send .whatsapp-modal-send {
    min-height:
        48px !important;

    display:
        inline-flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    gap:
        9px !important;

    padding:
        10px 18px !important;

    background:
        #16a34a !important;

    color:
        #ffffff !important;

    border:
        1px solid #16a34a !important;

    border-radius:
        10px !important;

    font-family: var(--app-font-family);

    font-size:
        13px !important;

    font-weight:
        850 !important;

    cursor:
        pointer !important;

    box-shadow:
        0 8px 20px
        rgba(22, 163, 74, .18) !important;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease !important;
}


body.page-contract-send
.whatsapp-modal-send:hover {

    background:
        #15803d !important;

    border-color:
        #15803d !important;

    box-shadow:
        0 10px 24px
        rgba(22, 163, 74, .25) !important;

    transform:
        translateY(-1px) !important;
}


body.page-contract-send
.whatsapp-modal-send
svg {

    width:
        18px !important;

    height:
        18px !important;

    flex:
        0 0 18px !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 767px) {

    body.page-contract-send .whatsapp-modal {
        padding:
            16px !important;
    }


    body.page-contract-send
    .whatsapp-modal-dialog {

        max-width:
            500px !important;

        border-radius:
            15px !important;
    }


    body.page-contract-send
    .whatsapp-modal-header {

        padding:
            20px !important;
    }


    body.page-contract-send
    .whatsapp-modal-body {

        padding:
            20px !important;
    }


    body.page-contract-send
    .whatsapp-modal-actions {

        padding:
            16px 20px 20px !important;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 520px) {

    body.page-contract-send .whatsapp-modal {
        align-items:
            flex-end !important;

        padding:
            10px !important;
    }


    body.page-contract-send
    .whatsapp-modal-dialog {

        max-width:
            none !important;

        border-radius:
            16px !important;
    }


    body.page-contract-send
    .whatsapp-modal-header {

        gap:
            12px !important;

        padding:
            18px !important;
    }


    body.page-contract-send
    .whatsapp-modal-icon {

        width:
            44px !important;

        height:
            44px !important;

        flex-basis:
            44px !important;

        border-radius:
            11px !important;
    }


    body.page-contract-send
    .whatsapp-modal-icon
    svg {

        width:
            22px !important;

        height:
            22px !important;
    }


    body.page-contract-send
    .whatsapp-modal-heading
    h2 {

        font-size:
            19px !important;
    }


    body.page-contract-send
    .whatsapp-modal-body {

        gap:
            17px !important;

        padding:
            18px !important;
    }


    body.page-contract-send
    .whatsapp-modal-actions {

        grid-template-columns:
            1fr !important;

        padding:
            15px 18px 18px !important;
    }


    body.page-contract-send
    .whatsapp-modal-send {

        grid-row:
            1 !important;
    }


    body.page-contract-send
    .whatsapp-modal-cancel {

        grid-row:
            2 !important;
    }

}


/* =========================================================
   NO MOSTRAR EN IMPRESIÓN / PDF
   ========================================================= */

@media print {

    body.page-contract-send .whatsapp-modal {
        display:
            none !important;
    }

}

/* =========================================================
   CONTRACT VIEW - CABECERA MODERNA
   ========================================================= */

body.page-contract-view .contract-view-hero {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 28px;
    padding: 24px 26px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 16px;

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, .07);

    box-sizing: border-box;
}


/* =========================================================
   LADO IZQUIERDO
   ========================================================= */

body.page-contract-view .contract-view-hero-main {
    display: flex;
    align-items: center;

    gap: 16px;

    min-width: 0;
}


/* =========================================================
   ICONO
   ========================================================= */

body.page-contract-view .contract-view-hero-icon {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eff6ff;
    color: #2563eb;

    border: 1px solid #bfdbfe;
    border-radius: 14px;
}


body.page-contract-view
.contract-view-hero-icon
svg {

    width: 26px;
    height: 26px;
}


/* =========================================================
   TEXTO
   ========================================================= */

body.page-contract-view .contract-view-hero-copy {
    min-width: 0;
}


body.page-contract-view .contract-view-eyebrow {
    margin: 0 0 4px;

    color: #2563eb;

    font-size: 11px;
    font-weight: 900;

    line-height: 1.2;

    letter-spacing: .12em;
}


body.page-contract-view
.contract-view-hero-copy
h1 {

    margin: 0 0 5px;

    color: #0f172a;

    font-size: 28px;
    font-weight: 850;

    line-height: 1.15;

    letter-spacing: -.035em;
}


body.page-contract-view
.contract-view-description {

    margin: 0;

    color: #64748b;

    font-size: 14px;
    font-weight: 500;

    line-height: 1.45;
}


body.page-contract-view
.contract-view-description
strong {

    color: #334155;
    font-weight: 750;
}


/* =========================================================
   ACCIONES
   ========================================================= */

body.page-contract-view
.contract-view-hero-actions {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 10px;

    margin-left: auto;
}


/* =========================================================
   BOTÓN BASE
   ========================================================= */

body.page-contract-view
.contract-view-action {

    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 10px 16px;

    background: #ffffff;
    color: #334155;

    border: 1px solid #cbd5e1;
    border-radius: 10px;

    font-family: var(--app-font-family);
    font-size: 13px;
    font-weight: 800;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


body.page-contract-view
.contract-view-action
svg {

    width: 17px;
    height: 17px;

    flex: 0 0 17px;
}


body.page-contract-view
.contract-view-action:hover {

    text-decoration: none;

    transform: translateY(-1px);
}


/* =========================================================
   ENVIAR
   ========================================================= */

body.page-contract-view
.contract-view-send {

    background: #2563eb;
    color: #ffffff;

    border-color: #2563eb;

    box-shadow:
        0 7px 18px
        rgba(37, 99, 235, .16);
}


body.page-contract-view
.contract-view-send:hover {

    background: #1d4ed8;
    color: #ffffff;

    border-color: #1d4ed8;
}


/* =========================================================
   PDF
   ========================================================= */

body.page-contract-view
.contract-view-pdf {

    background: #0f172a;
    color: #ffffff;

    border-color: #0f172a;
}


body.page-contract-view
.contract-view-pdf:hover {

    background: #1e293b;
    color: #ffffff;

    border-color: #1e293b;
}


/* =========================================================
   DESCARGAR FIRMADO
   ========================================================= */

body.page-contract-view
.contract-view-download {

    background: #eff6ff;
    color: #2563eb;

    border-color: #bfdbfe;
}


body.page-contract-view
.contract-view-download:hover {

    background: #dbeafe;
    color: #1d4ed8;

    border-color: #93c5fd;
}


/* =========================================================
   NUEVO CONTRATO
   ========================================================= */

body.page-contract-view
.contract-view-new {

    background: #ffffff;
    color: #2563eb;

    border-color: #bfdbfe;
}


body.page-contract-view
.contract-view-new:hover {

    background: #eff6ff;
    color: #1d4ed8;

    border-color: #93c5fd;
}


/* =========================================================
   VOLVER
   ========================================================= */

body.page-contract-view
.contract-view-back {

    background: #ffffff;
    color: #475569;

    border-color: #cbd5e1;
}


body.page-contract-view
.contract-view-back:hover {

    background: #f8fafc;
    color: #0f172a;

    border-color: #94a3b8;
}


/* =========================================================
   DESACTIVADO
   ========================================================= */

body.page-contract-view
.contract-view-disabled {

    background: #f8fafc !important;
    color: #94a3b8 !important;

    border-color: #e2e8f0 !important;

    box-shadow: none !important;

    cursor: not-allowed !important;

    opacity: .75;
}


body.page-contract-view
.contract-view-disabled:hover {

    transform: none !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    body.page-contract-view
    .contract-view-hero {

        align-items: flex-start;

        flex-direction: column;
    }


    body.page-contract-view
    .contract-view-hero-actions {

        width: 100%;

        margin-left: 0;

        justify-content: flex-start;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 700px) {

    body.page-contract-view
    .contract-view-hero {

        padding: 20px;

        border-radius: 14px;
    }


    body.page-contract-view
    .contract-view-hero-main {

        align-items: flex-start;
    }


    body.page-contract-view
    .contract-view-hero-icon {

        width: 48px;
        height: 48px;

        flex-basis: 48px;
    }


    body.page-contract-view
    .contract-view-hero-copy
    h1 {

        font-size: 23px;
    }


    body.page-contract-view
    .contract-view-hero-actions {

        display: grid;

        grid-template-columns: 1fr;

        gap: 9px;
    }


    body.page-contract-view
    .contract-view-action {

        width: 100%;
    }

}

/* =========================================================
   CONTRACT-VIEW.PHP — MISMAS PROPORCIONES QUE INVOICE-VIEW.PHP
   ========================================================= */

body.page-contract-view .contract-view-hero {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;

    margin: 0 0 18px !important;
    padding: 22px 24px !important;

    background: #fff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-contract-view .contract-view-hero-main {
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;

    gap: 18px !important;
}

body.page-contract-view .contract-view-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border: 0 !important;
    border-radius: 16px !important;

    background: #edf5ff !important;
    color: #1468f3 !important;
}

body.page-contract-view .contract-view-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
}

body.page-contract-view .contract-view-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 10px !important;
    font-weight: 900 !important;

    line-height: 1.2 !important;
    letter-spacing: .11em !important;
}

body.page-contract-view .contract-view-hero-copy h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 30px !important;
    font-weight: 850 !important;

    line-height: 1.15 !important;
    letter-spacing: -.035em !important;
}

body.page-contract-view .contract-view-description {
    margin: 8px 0 0 !important;

    color: #64748b !important;

    font-size: 13px !important;
    font-weight: 500 !important;

    line-height: 1.5 !important;
}

body.page-contract-view .contract-view-description strong {
    color: #334155 !important;
    font-weight: 750 !important;
}


/* =========================================================
   ACCIONES — MISMA ALTURA Y TIPOGRAFÍA QUE INVOICE VIEW
   ========================================================= */

body.page-contract-view .contract-view-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;

    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;

    margin-left: auto !important;
}

body.page-contract-view .contract-view-action {
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 8px !important;

    padding: 0 18px !important;

    border-radius: 10px !important;

    font-family: var(--app-font-family);
    font-size: 13px !important;
    font-weight: 800 !important;

    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    box-sizing: border-box !important;
    cursor: pointer !important;
}

body.page-contract-view .contract-view-action svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}


/* ENVIAR AL CLIENTE */

body.page-contract-view .contract-view-send {
    min-width: 160px !important;

    border: 1px solid #1468f3 !important;
    background: #1468f3 !important;
    color: #fff !important;
}

body.page-contract-view .contract-view-send:hover {
    background: #0f5edc !important;
    border-color: #0f5edc !important;
    color: #fff !important;
}


/* GUARDAR PDF — MISMO ESTILO DEL BOTÓN PDF DE INVOICE VIEW */

body.page-contract-view .contract-view-pdf {
    min-width: 145px !important;

    border: 1px solid #1468f3 !important;
    background: #1468f3 !important;
    color: #fff !important;
}

body.page-contract-view .contract-view-pdf:hover {
    background: #0f5edc !important;
    border-color: #0f5edc !important;
    color: #fff !important;
}


/* DESCARGAR FIRMADO */

body.page-contract-view .contract-view-download {
    min-width: 175px !important;

    border: 1px solid #cbd8ea !important;
    background: #fff !important;
    color: #465875 !important;
}

body.page-contract-view .contract-view-download:hover:not(:disabled) {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
}


/* NUEVO CONTRATO */

body.page-contract-view .contract-view-new {
    min-width: 160px !important;

    border: 1px solid #cbd8ea !important;
    background: #fff !important;
    color: #1468f3 !important;
}

body.page-contract-view .contract-view-new:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
}


/* VOLVER — MISMO TAMAÑO DE INVOICE VIEW */

body.page-contract-view .contract-view-back {
    width: 160px !important;
    min-width: 160px !important;

    border: 1px solid #cbd8ea !important;
    background: #fff !important;
    color: #465875 !important;
}

body.page-contract-view .contract-view-back:hover {
    background: #f7faff !important;
    border-color: #b8cdf0 !important;
    color: #1468f3 !important;
}


/* BOTÓN DESACTIVADO */

body.page-contract-view .contract-view-disabled,
body.page-contract-view .contract-view-disabled:hover {
    background: #f8fafc !important;
    color: #b7c2d3 !important;

    border-color: #e2e8f0 !important;

    box-shadow: none !important;

    cursor: not-allowed !important;

    opacity: 1 !important;

    transform: none !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1250px) {

    body.page-contract-view .contract-view-hero {
        align-items: flex-start !important;
    }

    body.page-contract-view .contract-view-hero-actions {
        flex-wrap: wrap !important;
    }

}

@media (max-width: 1050px) {

    body.page-contract-view .contract-view-hero {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    body.page-contract-view .contract-view-hero-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        margin-left: 0 !important;
    }

}

@media (max-width: 767px) {

    body.page-contract-view .contract-view-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;

        padding: 18px 16px !important;

        border-radius: 14px !important;
    }

    body.page-contract-view .contract-view-hero-main {
        align-items: flex-start !important;
    }

    body.page-contract-view .contract-view-hero-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-contract-view .contract-view-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-contract-view .contract-view-hero-copy h1 {
        font-size: 25px !important;
    }

    body.page-contract-view .contract-view-hero-actions {
        width: 100% !important;
    }

}

@media (max-width: 620px) {

    body.page-contract-view .contract-view-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-contract-view .contract-view-action,
    body.page-contract-view .contract-view-send,
    body.page-contract-view .contract-view-pdf,
    body.page-contract-view .contract-view-download,
    body.page-contract-view .contract-view-new,
    body.page-contract-view .contract-view-back {
        width: 100% !important;
        min-width: 0 !important;
    }

}

/* =========================================================
   CONTRACTS.PHP — PATRÓN VISUAL DE CLIENTS.PHP
   ========================================================= */

body.page-contracts .contracts-page {
    width: min(100%, 1220px) !important;
    margin: 0 auto !important;
}


/* CABECERA */

body.page-contracts .contracts-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 24px !important;

    min-height: 112px !important;

    padding: 22px 26px !important;
    margin-bottom: 18px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-contracts .contracts-hero-main {
    display: flex !important;
    align-items: center !important;

    gap: 18px !important;

    min-width: 0 !important;
}

body.page-contracts .contracts-hero-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-contracts .contracts-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
}

body.page-contracts .contracts-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

body.page-contracts .contracts-hero h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: clamp(28px, 3vw, 36px) !important;
    line-height: 1.05 !important;

    letter-spacing: -.04em !important;
}

body.page-contracts .contracts-hero-copy {
    margin: 7px 0 0 !important;

    color: #64748b !important;

    font-size: 14px !important;
    line-height: 1.5 !important;
}

body.page-contracts .contracts-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;

    flex: 0 0 auto !important;
}


/* BOTONES CABECERA */

body.page-contracts .contracts-new-button,
body.page-contracts .contracts-back-button {
    width: 160px !important;
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 9px !important;

    padding: 0 18px !important;

    border-radius: 11px !important;

    font-size: 13px !important;
    font-weight: 800 !important;

    text-decoration: none !important;

    transition: .18s ease !important;
}

body.page-contracts .contracts-new-button svg,
body.page-contracts .contracts-back-button svg {
    width: 18px !important;
    height: 18px !important;
}

body.page-contracts .contracts-new-button {
    border: 1px solid #1468f3 !important;

    background: linear-gradient(
        135deg,
        #2676ff,
        #0f63ef
    ) !important;

    color: #fff !important;

    box-shadow: 0 8px 18px rgba(20, 104, 243, .14) !important;
}

body.page-contracts .contracts-new-button:hover {
    color: #fff !important;

    transform: translateY(-1px) !important;

    box-shadow: 0 10px 22px rgba(20, 104, 243, .20) !important;
}

body.page-contracts .contracts-back-button {
    border: 1px solid #cfdbeb !important;

    background: #fff !important;
    color: #334155 !important;
}

body.page-contracts .contracts-back-button:hover {
    color: #1468f3 !important;

    border-color: #b8cdf0 !important;
    background: #f7faff !important;

    transform: translateY(-1px) !important;
}


/* ALERTAS */

body.page-contracts .contract-alert {
    width: 100% !important;

    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;

    gap: 10px !important;

    padding: 13px 16px !important;
    margin: 0 0 18px !important;

    border: 1px solid !important;
    border-radius: 11px !important;

    font-size: 13px !important;
}

body.page-contracts .contract-alert-icon {
    width: 25px !important;
    height: 25px !important;

    display: inline-grid !important;
    place-items: center !important;

    flex: 0 0 25px !important;

    border-radius: 50% !important;

    font-weight: 900 !important;
}

body.page-contracts .contract-alert-success {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #065f46 !important;
}

body.page-contracts .contract-alert-success .contract-alert-icon {
    background: #10b981 !important;
    color: #fff !important;
}

body.page-contracts .contract-alert-error {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
}

body.page-contracts .contract-alert-error .contract-alert-icon {
    background: #ef4444 !important;
    color: #fff !important;
}


/* CARD LISTADO */

body.page-contracts .contracts-card {
    padding: 20px 24px !important;
    margin-bottom: 18px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow: 0 10px 30px rgba(30, 64, 175, .06) !important;
}

body.page-contracts .contracts-list-card {
    padding: 18px 20px 16px !important;
}

body.page-contracts .contracts-list-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 20px !important;

    margin-bottom: 15px !important;
}

body.page-contracts .contracts-section-heading {
    display: flex !important;
    align-items: center !important;

    gap: 14px !important;

    min-width: 0 !important;
}

body.page-contracts .contracts-section-heading-compact {
    margin: 0 !important;
}

body.page-contracts .contracts-section-icon {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 50% !important;

    background: linear-gradient(
        135deg,
        #2676ff,
        #0f63ef
    ) !important;

    color: #fff !important;

    box-shadow: 0 8px 18px rgba(20, 104, 243, .18) !important;
}

body.page-contracts .contracts-section-icon svg {
    width: 21px !important;
    height: 21px !important;
}

body.page-contracts .contracts-section-heading h2 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 21px !important;

    letter-spacing: -.025em !important;
}

body.page-contracts .contracts-section-heading p {
    margin: 4px 0 0 !important;

    color: #64748b !important;

    font-size: 12px !important;
}


/* BUSCADOR — 50% Y LUPA FUERA DEL INPUT */

body.page-contracts .contracts-search {
    width: 50% !important;
    max-width: 520px !important;
    min-width: 260px !important;

    display: flex !important;
    align-items: center !important;

    gap: 10px !important;

    margin: 0 !important;
}

body.page-contracts .contracts-search-icon {
    position: static !important;

    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: #64748b !important;

    pointer-events: none !important;
}

body.page-contracts .contracts-search-icon svg {
    width: 20px !important;
    height: 20px !important;

    display: block !important;
}

body.page-contracts .contracts-search input {
    flex: 1 1 auto !important;

    width: 100% !important;
    min-height: 40px !important;

    padding: 0 13px !important;

    border: 1px solid #cdd9e9 !important;
    border-radius: 9px !important;

    background: #fff !important;
    background-image: none !important;

    color: #334155 !important;

    font-size: 12px !important;

    outline: none !important;
}

body.page-contracts .contracts-search input:focus {
    border-color: #87b4ff !important;

    box-shadow: 0 0 0 3px rgba(20, 104, 243, .09) !important;
}


/* TABLA */

body.page-contracts .contracts-table-wrap {
    width: 100% !important;

    overflow: auto !important;

    border: 1px solid #e3eaf4 !important;
    border-radius: 12px !important;

    background: #fff !important;
}

body.page-contracts .contracts-table {
    width: 100% !important;
    min-width: 1040px !important;

    border-collapse: collapse !important;

    font-size: 12px !important;
}

body.page-contracts .contracts-table thead th {
    padding: 11px 13px !important;

    background: #f5f8fc !important;
    color: #51617c !important;

    border: 0 !important;

    text-align: left !important;
    text-transform: uppercase !important;

    font-size: 9px !important;
    font-weight: 900 !important;

    letter-spacing: .035em !important;

    white-space: nowrap !important;
}

body.page-contracts .contracts-table td {
    padding: 11px 13px !important;

    border-top: 1px solid #edf1f6 !important;
    border-bottom: 0 !important;

    color: #475569 !important;

    vertical-align: middle !important;
}

body.page-contracts .contracts-table tbody tr {
    transition: background .16s ease !important;
}

body.page-contracts .contracts-table tbody tr:hover {
    background: #fbfdff !important;
}

body.page-contracts .contracts-table tbody tr[hidden] {
    display: none !important;
}

body.page-contracts .contracts-table .text-right {
    text-align: right !important;
}

body.page-contracts .contract-number,
body.page-contracts .contract-client-name,
body.page-contracts .contract-amount {
    color: #172033 !important;
    font-weight: 800 !important;
}

body.page-contracts .contract-work-preview {
    max-width: 230px !important;

    overflow: hidden !important;

    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}


/* ESTADOS */

body.page-contracts .contract-status {
    min-width: 112px !important;

    display: inline-flex !important;
    align-items: center !important;

    gap: 7px !important;

    padding: 6px 9px !important;

    border: 1px solid !important;
    border-radius: 8px !important;

    box-sizing: border-box !important;

    text-decoration: none !important;

    transition: .16s ease !important;
}

body.page-contracts .contract-status:hover {
    transform: translateY(-1px) !important;
}

body.page-contracts .contract-status-icon {
    width: 20px !important;
    height: 20px !important;

    display: inline-grid !important;
    place-items: center !important;

    flex: 0 0 20px !important;

    border-radius: 50% !important;

    font-size: 11px !important;
    font-weight: 900 !important;
}

body.page-contracts .contract-status strong {
    display: block !important;

    font-size: 11px !important;
    line-height: 1.2 !important;
}

body.page-contracts .contract-status small {
    display: block !important;

    margin-top: 2px !important;

    font-size: 8px !important;
    line-height: 1.2 !important;
}

body.page-contracts .contract-status-signed {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #047857 !important;
}

body.page-contracts .contract-status-signed .contract-status-icon {
    background: #10b981 !important;
    color: #fff !important;
}

body.page-contracts .contract-status-pending {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}

body.page-contracts .contract-status-pending .contract-status-icon {
    background: #f59e0b !important;
    color: #fff !important;
}

body.page-contracts .contract-status-rejected {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
}

body.page-contracts .contract-status-rejected .contract-status-icon {
    background: #ef4444 !important;
    color: #fff !important;
}


/* ACCIONES COMPACTAS COMO CLIENTES */

body.page-contracts .contract-actions {
    display: flex !important;
    align-items: center !important;

    gap: 6px !important;

    white-space: nowrap !important;
}

body.page-contracts .contract-delete-form {
    display: inline-flex !important;

    margin: 0 !important;
}

body.page-contracts .contract-action {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;

    display: inline-grid !important;
    place-items: center !important;

    padding: 0 !important;

    border: 1px solid #d7e1ee !important;
    border-radius: 8px !important;

    background: #f8fbff !important;

    text-decoration: none !important;

    cursor: pointer !important;

    transition: .16s ease !important;
}

body.page-contracts .contract-action svg {
    width: 15px !important;
    height: 15px !important;
}

body.page-contracts .contract-action-view {
    color: #1468f3 !important;
}

body.page-contracts .contract-action-view:hover {
    color: #0f63ef !important;

    border-color: #bcd1f3 !important;
    background: #f3f7ff !important;

    transform: translateY(-1px) !important;
}

body.page-contracts .contract-action-delete {
    color: #dc2626 !important;

    border-color: #fde0e3 !important;
    background: #fff1f2 !important;
}

body.page-contracts .contract-action-delete:hover {
    color: #b91c1c !important;

    border-color: #fca5a5 !important;
    background: #fff1f2 !important;

    transform: translateY(-1px) !important;
}


/* VACÍO / SIN RESULTADOS */

body.page-contracts .contracts-empty {
    padding: 48px 20px !important;

    text-align: center !important;
}

body.page-contracts .contracts-empty-icon {
    width: 58px !important;
    height: 58px !important;

    display: grid !important;
    place-items: center !important;

    margin: 0 auto 14px !important;

    border-radius: 16px !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-contracts .contracts-empty-icon svg {
    width: 28px !important;
    height: 28px !important;
}

body.page-contracts .contracts-empty h2 {
    margin: 0 !important;

    color: #172033 !important;

    font-size: 20px !important;
}

body.page-contracts .contracts-empty p {
    margin: 7px 0 18px !important;

    color: #64748b !important;

    font-size: 13px !important;
}

body.page-contracts .contracts-empty-button {
    min-height: 40px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 16px !important;

    border: 1px solid #1468f3 !important;
    border-radius: 9px !important;

    background: #1468f3 !important;
    color: #fff !important;

    font-size: 12px !important;
    font-weight: 800 !important;

    text-decoration: none !important;
}

body.page-contracts .contracts-no-results {
    padding: 28px 15px !important;

    color: #64748b !important;

    font-size: 13px !important;

    text-align: center !important;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    body.page-contracts .contracts-hero {
        align-items: flex-start !important;
    }

    body.page-contracts .contracts-hero-actions {
        flex-wrap: wrap !important;
    }

    body.page-contracts .contracts-list-heading {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    body.page-contracts .contracts-search {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

}

@media (max-width: 767px) {

    body.page-contracts .contracts-hero {
        padding: 18px !important;
        align-items: flex-start !important;
    }

    body.page-contracts .contracts-card {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    body.page-contracts .contracts-new-button,
    body.page-contracts .contracts-back-button {
        width: 145px !important;
        min-height: 44px !important;
    }

}

@media (max-width: 600px) {

    body.page-contracts .contracts-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-contracts .contracts-hero-actions {
        width: 100% !important;

        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-contracts .contracts-new-button,
    body.page-contracts .contracts-back-button {
        width: 100% !important;
    }

    body.page-contracts .contracts-section-heading {
        align-items: flex-start !important;
    }

}

/* =========================================================
   QUOTATION CREATE — PATRÓN VISUAL DE CLIENTS.PHP
   ========================================================= */
body.page-quotation-create .quotation-create-page{width:min(100%,1220px)!important;margin:0 auto!important}
body.page-quotation-create .quotation-create-hero{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:24px!important;min-height:112px!important;padding:22px 26px!important;margin-bottom:18px!important;background:#fff!important;border:1px solid #dfe8f4!important;border-radius:16px!important;box-shadow:0 10px 30px rgba(30,64,175,.06)!important}
body.page-quotation-create .quotation-create-hero-main{display:flex!important;align-items:center!important;gap:18px!important;min-width:0!important}
body.page-quotation-create .quotation-create-hero-icon{width:58px!important;height:58px!important;flex:0 0 58px!important;display:grid!important;place-items:center!important;border-radius:16px!important;background:#eef5ff!important;color:#1468f3!important}
body.page-quotation-create .quotation-create-hero-icon svg{width:29px!important;height:29px!important}
body.page-quotation-create .quotation-create-eyebrow{margin:0 0 5px!important;color:#1468f3!important;font-size:11px!important;font-weight:900!important;letter-spacing:.12em!important;text-transform:uppercase!important}
body.page-quotation-create .quotation-create-hero h1{margin:0!important;color:#0f172a!important;font-size:clamp(28px,3vw,36px)!important;line-height:1.05!important;letter-spacing:-.04em!important}
body.page-quotation-create .quotation-create-hero-copy{margin:7px 0 0!important;color:#64748b!important;font-size:14px!important;line-height:1.5!important}
body.page-quotation-create .quotation-create-hero-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 0 auto!important}
body.page-quotation-create .quotation-create-back-button{width:160px!important;min-height:52px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;padding:0 18px!important;border:1px solid #cfdbeb!important;border-radius:11px!important;background:#fff!important;color:#334155!important;font-size:13px!important;font-weight:800!important;text-decoration:none!important;transition:.18s ease!important}
body.page-quotation-create .quotation-create-back-button svg{width:18px!important;height:18px!important}
body.page-quotation-create .quotation-create-back-button:hover{color:#1468f3!important;border-color:#b8cdf0!important;background:#f7faff!important;transform:translateY(-1px)!important}
body.page-quotation-create .quotation-create-alert{padding:13px 16px!important;margin-bottom:18px!important;border-radius:11px!important;font-size:13px!important}
body.page-quotation-create .quotation-create-alert-error{background:#fef2f2!important;color:#991b1b!important;border:1px solid #fecaca!important}
body.page-quotation-create .quotation-create-form{width:100%!important}
body.page-quotation-create .quotation-create-card{padding:20px 24px!important;margin-bottom:18px!important;background:#fff!important;border:1px solid #dfe8f4!important;border-radius:16px!important;box-shadow:0 10px 30px rgba(30,64,175,.06)!important}
body.page-quotation-create .quotation-create-section-heading{display:flex!important;align-items:center!important;gap:14px!important;margin-bottom:20px!important}
body.page-quotation-create .quotation-create-section-icon{width:46px!important;height:46px!important;flex:0 0 46px!important;display:grid!important;place-items:center!important;border-radius:50%!important;background:linear-gradient(135deg,#2676ff,#0f63ef)!important;color:#fff!important;box-shadow:0 8px 18px rgba(20,104,243,.18)!important}
body.page-quotation-create .quotation-create-section-icon svg{width:21px!important;height:21px!important}
body.page-quotation-create .quotation-create-section-heading h2{margin:0!important;color:#0f172a!important;font-size:21px!important;letter-spacing:-.025em!important}
body.page-quotation-create .quotation-create-section-heading p{margin:4px 0 0!important;color:#64748b!important;font-size:12px!important}
body.page-quotation-create .quotation-create-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px 20px!important}
body.page-quotation-create .quotation-create-field{display:flex!important;flex-direction:column!important;gap:7px!important;margin:0!important;color:#334155!important;font-size:13px!important;font-weight:700!important}
body.page-quotation-create .quotation-create-field>span{color:#334155!important;font-size:13px!important;font-weight:700!important}
body.page-quotation-create .quotation-create-field input,body.page-quotation-create .quotation-create-field textarea,body.page-quotation-create .quotation-create-line input{width:100%!important;border:1px solid #cfdaea!important;border-radius:10px!important;background:#fff!important;color:#172033!important;transition:border-color .18s ease,box-shadow .18s ease!important}
body.page-quotation-create .quotation-create-field input,body.page-quotation-create .quotation-create-line input{min-height:44px!important}
body.page-quotation-create .quotation-create-field textarea{padding:13px 14px!important;resize:vertical!important}
body.page-quotation-create .quotation-create-field input:focus,body.page-quotation-create .quotation-create-field textarea:focus,body.page-quotation-create .quotation-create-line input:focus{outline:none!important;border-color:#87b4ff!important;box-shadow:0 0 0 3px rgba(20,104,243,.09)!important}
body.page-quotation-create .quotation-fixed-note{display:flex!important;align-items:flex-start!important;gap:8px!important;margin-top:16px!important;padding:13px 15px!important;border:1px solid #dbe7f6!important;border-left:4px solid #1468f3!important;border-radius:10px!important;background:#f8fbff!important;color:#52627f!important;font-size:12px!important;line-height:1.55!important}
body.page-quotation-create .quotation-fixed-note strong{color:#1468f3!important}
body.page-quotation-create .quotation-create-lines{display:grid!important;gap:9px!important;margin-bottom:12px!important}
body.page-quotation-create .quotation-create-line{display:grid!important;grid-template-columns:minmax(220px,1fr) 120px 150px 42px!important;gap:8px!important;align-items:center!important}
body.page-quotation-create .quotation-create-line .remove-line{width:42px!important;height:42px!important;display:inline-grid!important;place-items:center!important;padding:0!important;border:1px solid #fde0e3!important;border-radius:9px!important;background:#fff1f2!important;color:#dc2626!important;font-size:20px!important;line-height:1!important}
body.page-quotation-create .quotation-add-line{min-height:40px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0 14px!important;border:1px solid #cbd8ea!important;border-radius:9px!important;background:#fff!important;color:#1468f3!important;font-family: var(--app-font-family);font-size:12px!important;font-weight:800!important;cursor:pointer!important}
body.page-quotation-create .quotation-create-totals{width:100%!important;max-width:380px!important;margin:26px 0 0 auto!important;padding:16px 18px!important;border:1px solid #e3eaf4!important;border-radius:12px!important;background:#f8fafc!important}
body.page-quotation-create .quotation-create-totals>div{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:20px!important;padding:7px 0!important;color:#64748b!important;font-size:12px!important}
body.page-quotation-create .quotation-create-totals .grand{margin-top:8px!important;padding:13px 14px!important;border:1px solid #bfdbfe!important;border-radius:9px!important;background:#eef5ff!important;color:#1468f3!important}
body.page-quotation-create .quotation-create-totals .grand strong{color:#1468f3!important;font-size:18px!important}
body.page-quotation-create .quotation-create-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;width:100%!important;margin:0 0 18px!important}
body.page-quotation-create .quotation-create-actions .quotation-save-btn,body.page-quotation-create .quotation-create-actions .quotation-cancel-btn{width:100%!important;min-height:46px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0 18px!important;border-radius:10px!important;font-family: var(--app-font-family);font-size:13px!important;font-weight:800!important;text-decoration:none!important;cursor:pointer!important}
body.page-quotation-create .quotation-create-actions .quotation-save-btn{border:1px solid #1468f3!important;background:linear-gradient(135deg,#2676ff,#0f63ef)!important;color:#fff!important}
body.page-quotation-create .quotation-create-actions .quotation-cancel-btn{border:1px solid #cbd8ea!important;background:#fff!important;color:#465875!important}
@media(max-width:900px){body.page-quotation-create .quotation-create-grid{grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-line{grid-template-columns:minmax(180px,1fr) 100px 125px 42px!important}}
@media(max-width:767px){body.page-quotation-create .quotation-create-hero{padding:18px!important;align-items:flex-start!important;border-radius:14px!important}body.page-quotation-create .quotation-create-card{padding:16px!important;border-radius:14px!important}body.page-quotation-create .quotation-create-back-button{width:112px!important;min-height:44px!important}body.page-quotation-create .quotation-create-line{grid-template-columns:1fr 1fr!important}body.page-quotation-create .quotation-create-line>input:first-child{grid-column:1/-1!important}body.page-quotation-create .quotation-create-line .remove-line{width:100%!important}}
@media(max-width:520px){body.page-quotation-create .quotation-create-hero{display:grid!important;grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-hero-actions{width:100%!important;justify-content:stretch!important}body.page-quotation-create .quotation-create-back-button{width:100%!important}body.page-quotation-create .quotation-create-actions{grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-line{grid-template-columns:1fr!important}body.page-quotation-create .quotation-create-line>input:first-child{grid-column:auto!important}}

/* =========================================================
   QUOTATION-VIEW.PHP — PATRÓN MODERNO
   ========================================================= */

body.page-quotation-view .quotation-page {
    width: min(100%, 1220px) !important;
    margin: 0 auto !important;
}


/* =========================================================
   CABECERA
   ========================================================= */

body.page-quotation-view .quotation-view-hero {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 24px !important;

    min-height: 112px !important;

    margin: 0 0 18px !important;
    padding: 22px 26px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow:
        0 10px 30px
        rgba(30,64,175,.06) !important;
}

body.page-quotation-view .quotation-view-hero-main {
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;

    gap: 18px !important;
}

body.page-quotation-view .quotation-view-hero-icon {
    width: 58px !important;
    height: 58px !important;

    flex: 0 0 58px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 16px !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-quotation-view .quotation-view-hero-icon svg {
    width: 29px !important;
    height: 29px !important;
}

body.page-quotation-view .quotation-view-hero-copy {
    min-width: 0 !important;
}

body.page-quotation-view .quotation-view-eyebrow {
    margin: 0 0 5px !important;

    color: #1468f3 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

body.page-quotation-view .quotation-view-hero h1 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: clamp(28px,3vw,36px) !important;
    line-height: 1.05 !important;
    font-weight: 850 !important;

    letter-spacing: -.04em !important;
}

body.page-quotation-view .quotation-view-description {
    margin: 7px 0 0 !important;

    color: #64748b !important;

    font-size: 14px !important;
    line-height: 1.5 !important;
}

body.page-quotation-view .quotation-view-description strong {
    color: #334155 !important;
    font-weight: 800 !important;
}


/* =========================================================
   ACCIONES
   ========================================================= */

body.page-quotation-view .quotation-view-hero-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;

    flex: 0 0 auto !important;
}

body.page-quotation-view .quotation-view-action {
    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 9px !important;

    padding: 0 18px !important;

    border-radius: 11px !important;

    font-family: var(--app-font-family);
    font-size: 13px !important;
    font-weight: 800 !important;

    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    cursor: pointer !important;

    box-sizing: border-box !important;

    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease !important;
}

body.page-quotation-view .quotation-view-action svg {
    width: 18px !important;
    height: 18px !important;

    flex: 0 0 18px !important;
}


/* NUEVA COTIZACIÓN */

body.page-quotation-view .quotation-view-new {
    min-width: 170px !important;

    border: 1px solid #1468f3 !important;

    background:
        linear-gradient(
            135deg,
            #2676ff,
            #0f63ef
        ) !important;

    color: #fff !important;

    box-shadow:
        0 8px 18px
        rgba(20,104,243,.14) !important;
}

body.page-quotation-view .quotation-view-new:hover {
    color: #fff !important;

    transform: translateY(-1px) !important;

    box-shadow:
        0 10px 22px
        rgba(20,104,243,.20) !important;
}


/* IMPRIMIR */

body.page-quotation-view .quotation-view-print {
    min-width: 145px !important;

    border: 1px solid #1468f3 !important;

    background: #1468f3 !important;
    color: #fff !important;
}

body.page-quotation-view .quotation-view-print:hover {
    border-color: #0f5edc !important;
    background: #0f5edc !important;
    color: #fff !important;

    transform: translateY(-1px) !important;
}


/* VOLVER */

body.page-quotation-view .quotation-view-back {
    width: 160px !important;
    min-width: 160px !important;

    border: 1px solid #cfdbeb !important;

    background: #fff !important;
    color: #334155 !important;
}

body.page-quotation-view .quotation-view-back:hover {
    color: #1468f3 !important;

    border-color: #b8cdf0 !important;
    background: #f7faff !important;

    transform: translateY(-1px) !important;
}


/* =========================================================
   DOCUMENTO
   ========================================================= */

body.page-quotation-view .quotation-paper {
    width: 100% !important;
    max-width: 950px !important;

    margin: 0 auto 28px !important;
    padding: 46px !important;

    background: #fff !important;

    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;

    box-shadow:
        0 10px 30px
        rgba(30,64,175,.06) !important;

    overflow: hidden !important;
}


/* CABECERA INTERIOR DEL DOCUMENTO */

body.page-quotation-view .quotation-company-header {
    gap: 35px !important;
}

body.page-quotation-view .quotation-company-logo {
    border-radius: 12px !important;
}

body.page-quotation-view .quotation-heading-label {
    color: #1468f3 !important;
}

body.page-quotation-view .quotation-divider {
    height: 4px !important;

    margin: 30px 0 !important;

    border: 0 !important;

    background:
        linear-gradient(
            to right,
            #1468f3 0%,
            #1468f3 80%,
            #3f4650 80%,
            #3f4650 100%
        ) !important;
}


/* INFORMACIÓN */

body.page-quotation-view .quotation-info-grid {
    gap: 15px !important;
}

body.page-quotation-view .quotation-info-box {
    padding: 18px !important;

    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;

    background: #f8fafc !important;
}

body.page-quotation-view .quotation-info-label {
    color: #1468f3 !important;

    font-size: 10px !important;
    font-weight: 900 !important;

    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

body.page-quotation-view .quotation-info-value {
    color: #172033 !important;

    font-weight: 800 !important;
}


/* TABLA */

body.page-quotation-view .quotation-table-wrap {
    border: 1px solid #e3eaf4 !important;
    border-radius: 12px !important;

    overflow: auto !important;
}

body.page-quotation-view .quotation-table {
    width: 100% !important;

    border-collapse: collapse !important;
}

body.page-quotation-view .quotation-table th {
    padding: 11px 13px !important;

    background: #f5f8fc !important;
    color: #51617c !important;

    border: 0 !important;

    font-size: 9px !important;
    font-weight: 900 !important;

    letter-spacing: .035em !important;

    text-transform: uppercase !important;
}

body.page-quotation-view .quotation-table td {
    padding: 12px 13px !important;

    border-top: 1px solid #edf1f6 !important;
    border-bottom: 0 !important;

    color: #475569 !important;
}

body.page-quotation-view .quotation-table tbody tr:hover {
    background: #fbfdff !important;
}


/* CONDICIONES */

body.page-quotation-view .quotation-work-conditions {
    margin-top: 24px !important;
    padding: 18px 20px !important;

    border: 1px solid #dbe7f6 !important;
    border-left: 4px solid #1468f3 !important;
    border-radius: 10px !important;

    background: #f8fbff !important;
}

body.page-quotation-view .quotation-work-conditions-title {
    color: #1468f3 !important;
}


/* TOTALES */

body.page-quotation-view .quotation-totals {
    border: 1px solid #e3eaf4 !important;
    border-radius: 12px !important;

    background: #f8fafc !important;

    overflow: hidden !important;
}

body.page-quotation-view .quotation-total-row {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

body.page-quotation-view .quotation-total-row.grand-total {
    border: 1px solid #bfdbfe !important;

    background: #eef5ff !important;
    color: #1468f3 !important;
}

body.page-quotation-view .quotation-total-row.grand-total strong {
    color: #1468f3 !important;
}


/* NOTAS */

body.page-quotation-view .quotation-notes {
    border-radius: 10px !important;

    border-left-color: #1468f3 !important;

    background: #f8fbff !important;
}

body.page-quotation-view .quotation-notes-title {
    color: #1468f3 !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

    body.page-quotation-view .quotation-view-hero {
        align-items: flex-start !important;
    }

    body.page-quotation-view .quotation-view-hero-actions {
        flex-wrap: wrap !important;
    }

}

@media (max-width: 767px) {

    body.page-quotation-view .quotation-view-hero {
        display: grid !important;
        grid-template-columns: 1fr !important;

        padding: 18px !important;

        border-radius: 14px !important;
    }

    body.page-quotation-view .quotation-view-hero-main {
        align-items: flex-start !important;
    }

    body.page-quotation-view .quotation-view-hero-icon {
        width: 50px !important;
        height: 50px !important;

        flex-basis: 50px !important;

        border-radius: 13px !important;
    }

    body.page-quotation-view .quotation-view-hero-icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    body.page-quotation-view .quotation-view-hero h1 {
        font-size: 25px !important;
    }

    body.page-quotation-view .quotation-view-hero-actions {
        width: 100% !important;
    }

    body.page-quotation-view .quotation-paper {
        padding: 22px !important;

        border-radius: 14px !important;
    }

}

@media (max-width: 620px) {

    body.page-quotation-view .quotation-view-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.page-quotation-view .quotation-view-action,
    body.page-quotation-view .quotation-view-new,
    body.page-quotation-view .quotation-view-print,
    body.page-quotation-view .quotation-view-back {
        width: 100% !important;
        min-width: 0 !important;
    }

}

@media print {

    body.page-quotation-view .quotation-view-hero {
        display: none !important;
    }

    body.page-quotation-view .quotation-paper {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

}

/* =========================================================
   CONTRACT SEND - BOTÓN WHATSAPP POPUP
   ========================================================= */

body.page-contract-send #invoiceWhatsappButton {
    border: 0;
    font: inherit;
    cursor: pointer;
}

body.page-contract-send #invoiceWhatsappButton:disabled {
    cursor: not-allowed;
}



/* =========================================================
   TIPOGRAFÍA GLOBAL ÚNICA
   Debe permanecer al FINAL del último bloque CSS.
   ========================================================= */

:root {
    --app-font-family: "Segoe UI", Arial, sans-serif;
}

html,
body,
body *,
body *::before,
body *::after,
button,
input,
select,
textarea,
option,
table,
th,
td {
    font-family: var(--app-font-family) !important;
}

/* Los controles nativos también heredan exactamente la misma fuente. */
button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   TÍTULOS - TIPOGRAFÍA 100% UNIFICADA
   ========================================================= */

/*
 * Todos los títulos visibles del panel usan exactamente
 * la misma familia y el mismo peso tipográfico.
 */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .dashboard-hero h1,
body .clients-hero h1,
body .invoices-hero h1,
body .invoice-view-hero h1,
body .invoice-create-hero h1,
body .quotation-hero h1,
body .quotation-create-hero h1,
body .quotation-view-hero h1,
body .contracts-hero h1,
body .contract-create-hero h1,
body .contract-view-hero h1,
body .settings-hero h1,
body .account-hero h1,
body .section-title,
body .card-title {
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-style: normal !important;
    font-synthesis: none !important;
}

/* Títulos principales de cada página */
body h1,
body .dashboard-hero h1,
body .clients-hero h1,
body .invoices-hero h1,
body .invoice-view-hero h1,
body .invoice-create-hero h1,
body .quotation-hero h1,
body .quotation-create-hero h1,
body .quotation-view-hero h1,
body .contracts-hero h1,
body .contract-create-hero h1,
body .contract-view-hero h1,
body .settings-hero h1,
body .account-hero h1 {
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
}

/* Títulos internos: Nuevo cliente, Listado..., etc. */
body h2,
body h3,
body h4,
body h5,
body h6,
body .section-title,
body .card-title {
    font-weight: 700 !important;
    letter-spacing: -0.015em !important;
}
