:root {
    --klammer-green: #00463f;
    --klammer-green-2: #006257;
    --klammer-orange: #f05a1a;
    --klammer-light: #f5f7f7;
}

body {
    background: var(--klammer-light);
}

.bg-klammer {
    background: linear-gradient(90deg, var(--klammer-green), var(--klammer-green-2));
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1;
}

.brand-title span {
    display: block;
    font-weight: 500;
    font-size: .9rem;
    letter-spacing: 0;
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid #e6e9e9;
}

.sidebar .nav-link {
    color: #263b3a;
    border-radius: .5rem;
    margin-bottom: .25rem;
}

.sidebar .nav-link:hover {
    background: #eef5f4;
    color: var(--klammer-green);
}

.card {
    border: 1px solid #e4e7e7;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

.btn-klammer {
    color: #fff;
    background-color: var(--klammer-orange);
    border-color: var(--klammer-orange);
}

.btn-klammer:hover {
    color: #fff;
    filter: brightness(.95);
}

.badge-klammer {
    background: #e7f4f1;
    color: var(--klammer-green);
}

/* BusinessGest2.0 - Configuracion general v3.2.20b */
.app-brand-logo {
    display: block;
    max-width: 220px;
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.app-brand-product {
    white-space: nowrap;
}

.config-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.config-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.15rem;
    padding: .4rem .75rem;
    border: 1px solid #d9e2e1;
    border-radius: .55rem;
    background: #fff;
    color: var(--klammer-green);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
}

.config-nav a:hover {
    background: #eef5f4;
}

.config-card {
    color: inherit;
    transition: transform .12s ease, box-shadow .12s ease;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 70, 63, .1);
}

.config-card-kicker {
    margin-bottom: .35rem;
    color: var(--klammer-green-2);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.config-section-title {
    margin-bottom: .85rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid #e4e7e7;
    color: var(--klammer-green);
    font-weight: 800;
}

.brand-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 1rem;
    border: 1px dashed #cbd8d6;
    border-radius: .6rem;
    background: #f8fbfa;
}

.brand-preview img {
    max-width: 100%;
    max-height: 95px;
    object-fit: contain;
}

.audit-value {
    min-width: 160px;
    max-width: 360px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


/* BusinessGest2.0 - Inventario de espacios v3.2.21b */
.space-flag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.table code {
    color: var(--klammer-green);
    font-size: .82rem;
}

.config-section-title + .row .form-check-label {
    line-height: 1.25;
}

/* BG319C_SMART_CUSTOMER_PERSON_SEARCH */
.rx-smart-search-row {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    gap: .65rem;
    align-items: center;
}

.rx-search-field-live {
    min-width: 0;
}

.rx-search-submit {
    min-width: 74px;
}

.rx-search-scopes {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--bs-border-color, #d8e0de);
    border-radius: 10px;
    background: #f4f7f6;
    white-space: nowrap;
}

.rx-search-scope {
    margin: 0;
    cursor: pointer;
}

.rx-search-scope input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rx-search-scope span {
    display: block;
    padding: .42rem .62rem;
    border-radius: 7px;
    color: #52615e;
    font-size: .82rem;
    font-weight: 650;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.rx-search-scope input:checked + span {
    background: #ffffff;
    color: #0c5b50;
    box-shadow: 0 1px 3px rgba(21, 55, 49, .14);
}

.rx-search-scope input:focus-visible + span {
    outline: 2px solid #0c7566;
    outline-offset: 2px;
}

.rx-smart-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
}

.rx-customer-result-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .12rem;
}

.rx-customer-result-primary,
.rx-customer-result-secondary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rx-customer-result-primary {
    color: #172622;
    font-weight: 700;
}

.rx-customer-result-secondary {
    color: #65736f;
    font-size: .82rem;
}

.rx-result-kind {
    padding: .24rem .45rem;
    border-radius: 999px;
    background: #edf4f2;
    color: #24675d;
    font-size: .72rem;
    font-weight: 700;
}

.rx-customer-result.is-keyboard-active {
    border-color: #75a99f;
    background: #f0f8f6;
    box-shadow: 0 0 0 2px rgba(12, 117, 102, .12);
}

@media (max-width: 860px) {
    .rx-smart-search-row {
        grid-template-columns: 1fr;
    }

    .rx-search-scopes {
        width: 100%;
        overflow-x: auto;
    }

    .rx-search-scope {
        flex: 1 0 auto;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .rx-search-submit {
        display: none;
    }

    .rx-smart-result {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .rx-result-kind {
        display: none;
    }
}
/* BG319D_R2_SHARED_SEARCH_VISUAL_FIX
   Normaliza el buscador compartido en Documentacion a terceros y Nueva reserva.
   Estas pantallas no usan el contenedor visual completo de Recepcion y, sin esta
   regla, el SVG conserva su tamano nativo y estira toda la fila. */
.rx-smart-customer-person-search .rx-search-field {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    overflow: hidden;
    border: 1px solid #aebdb9;
    border-radius: 10px;
    background: #ffffff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.rx-smart-customer-person-search .rx-search-field:focus-within {
    border-color: #0c7566;
    box-shadow: 0 0 0 3px rgba(12, 117, 102, .14);
}

.rx-smart-customer-person-search .rx-search-field > svg {
    display: block;
    width: 18px;
    height: 18px;
    margin-left: .8rem;
    color: #64736f;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.rx-smart-customer-person-search .rx-search-field > input[type="search"] {
    display: block;
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: .55rem .7rem;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: #24312f;
    font: inherit;
    box-shadow: none;
}

.rx-smart-customer-person-search .rx-search-field > input[type="search"]::placeholder {
    color: #7a8784;
    opacity: 1;
}

.rx-smart-customer-person-search .rx-search-field > input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}

.rx-smart-customer-person-search .rx-search-submit {
    align-self: stretch;
    min-width: 74px;
    min-height: 42px;
    margin: 0;
    padding: 0 .9rem;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .18);
    border-radius: 0;
    background: #075f54;
    color: #ffffff;
    font-size: .86rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.rx-smart-customer-person-search .rx-search-submit:hover,
.rx-smart-customer-person-search .rx-search-submit:focus-visible {
    background: #064f46;
}

.rx-smart-customer-person-search .rx-search-submit:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -4px;
}

.rx-smart-customer-person-search .rx-search-help {
    margin-top: .42rem;
    color: #6b7875;
    font-size: .8rem;
}

@media (max-width: 560px) {
    .rx-smart-customer-person-search .rx-search-field {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .rx-smart-customer-person-search .rx-search-submit {
        display: none;
    }
}
/* BG320A_R4_CUSTOMER_DIRECTORY_SEARCH_VISUAL_FIX
   Normaliza el buscador inmediato de la pantalla Clientes. El componente de
   Clientes no utiliza el contenedor .rx-smart-customer-person-search y, sin
   estas reglas, el SVG adopta el relleno y tamaño nativos del navegador. */
.rx-customer-search-card .rx-smart-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
    width: 100%;
}

.rx-customer-search-card .rx-search-field {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    overflow: hidden;
    border: 1px solid #aebdb9;
    border-radius: 10px;
    background: #ffffff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.rx-customer-search-card .rx-search-field:focus-within {
    border-color: #0c7566;
    box-shadow: 0 0 0 3px rgba(12, 117, 102, .14);
}

.rx-customer-search-card .rx-search-field > svg {
    display: block !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin: 0 0 0 .8rem !important;
    padding: 0 !important;
    overflow: visible;
    color: #64736f;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 18px;
}

.rx-customer-search-card .rx-search-field > input[type="search"] {
    display: block;
    width: 100%;
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: .5rem .7rem;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: #24312f;
    font: inherit;
    box-shadow: none;
}

.rx-customer-search-card .rx-search-field > input[type="search"]::placeholder {
    color: #7a8784;
    opacity: 1;
}

.rx-customer-search-card .rx-search-submit {
    align-self: stretch;
    min-width: 72px;
    min-height: 40px;
    margin: 0;
    padding: 0 .85rem;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .18);
    border-radius: 0;
    background: #075f54;
    color: #ffffff;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.rx-customer-search-card .rx-search-submit:hover,
.rx-customer-search-card .rx-search-submit:focus-visible {
    background: #064f46;
}

.rx-customer-search-card .rx-search-scopes {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    padding: 3px;
    border: 1px solid #d2dcda;
    border-radius: 10px;
    background: #f5f8f7;
    white-space: nowrap;
}

.rx-customer-search-card .rx-search-scope {
    margin: 0;
    cursor: pointer;
}

.rx-customer-search-card .rx-search-scope > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rx-customer-search-card .rx-search-scope > span {
    display: block;
    padding: .38rem .65rem;
    border-radius: 7px;
    color: #3f514d;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.1;
}

.rx-customer-search-card .rx-search-scope > input:checked + span {
    background: #ffffff;
    color: #075f54;
    box-shadow: 0 1px 4px rgba(25, 52, 46, .14);
}

.rx-customer-search-card .rx-search-help {
    margin-top: .4rem;
    color: #6b7875;
    font-size: .78rem;
}

@media (max-width: 760px) {
    .rx-customer-search-card .rx-smart-search-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .rx-customer-search-card .rx-search-scopes {
        width: max-content;
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .rx-customer-search-card .rx-search-field {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .rx-customer-search-card .rx-search-submit {
        display: none;
    }
}

/* BG323B_SPACE_INVENTORY_COMPACT
   Presentacion compacta de la ficha e inventario de espacios. */
.space-edit-page .space-edit-heading {
    min-height: 36px;
}

.space-edit-page .space-code-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: .15rem .45rem;
    border: 1px solid #d5dfdc;
    border-radius: 6px;
    background: #f6f8f7;
    color: #35504a;
    font-size: .78rem;
}

.space-edit-page .space-editor-card .card-body {
    padding: .85rem 1rem;
}

.space-edit-page .space-editor-card .form-label,
.space-edit-page .space-modules-card .form-label,
.space-edit-page .space-advanced-card .form-label {
    margin-bottom: .18rem;
    color: #42534f;
    font-size: .78rem;
    font-weight: 700;
}

.space-edit-page .space-form-section {
    padding-bottom: .7rem;
    margin-bottom: .7rem;
    border-bottom: 1px solid #e3e9e7;
}

.space-edit-page .space-form-section-title {
    margin-bottom: .45rem;
    color: #075f54;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.space-edit-page .space-modules-card {
    border-left: 4px solid #0c7566;
}

.space-edit-page .space-advanced-card > .card-body {
    min-height: 54px;
}

.space-edit-page .table.table-sm > :not(caption) > * > * {
    padding-top: .38rem;
    padding-bottom: .38rem;
}

.space-bulk-actions > summary {
    cursor: pointer;
    list-style: none;
}

.space-bulk-actions > summary::-webkit-details-marker {
    display: none;
}

.space-bulk-actions > summary::after {
    float: right;
    content: "+";
    color: #075f54;
    font-weight: 800;
}

.space-bulk-actions[open] > summary::after {
    content: "−";
}

.space-inventory-table .space-select-column {
    width: 38px;
}

@media (max-width: 991.98px) {
    .space-edit-page .space-editor-card .card-body {
        padding: .75rem;
    }
}

/* BG324B_EMAIL_CONFIGURATION */
.email-test-mode-banner {
    padding: .45rem 0;
    border-bottom: 1px solid #d6b452;
    background: #fff3cd;
    color: #5f4a00;
    font-size: .86rem;
}

.email-test-mode-banner a {
    color: inherit;
    font-weight: 700;
    white-space: nowrap;
}

.email-test-mode-banner-error {
    border-bottom-color: #b02a37;
    background: #f8d7da;
    color: #842029;
}

.email-config-account-status {
    min-width: 7rem;
}

@media (max-width: 767.98px) {
    .email-test-mode-banner .container-fluid {
        align-items: flex-start !important;
        flex-direction: column;
        gap: .2rem !important;
    }
}


/* BusinessGest2.0 - Base contractual controlada v3.2.27a */
.contract-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: .85rem;
}

.contract-list-card .card-body {
    display: flex;
    min-height: 100%;
    flex-direction: column;
}

.contract-list-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem 1rem;
}

.contract-list-meta > div {
    min-width: 0;
}

.contract-list-meta span,
.contract-summary-label {
    display: block;
    color: #687774;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.contract-list-meta strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: .9rem;
}

.contract-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .75rem;
}

.contract-summary-grid .card-body {
    padding: .85rem 1rem;
}

.contract-summary-grid strong {
    display: block;
    margin-top: .2rem;
    color: #19312d;
    font-size: .94rem;
}

.contract-create-card .form-label,
.contract-summary-grid + .card .form-label {
    margin-bottom: .25rem;
    font-size: .82rem;
    font-weight: 650;
}

@media (max-width: 575.98px) {
    .contract-list-grid,
    .contract-list-meta,
    .contract-summary-grid {
        grid-template-columns: 1fr;
    }
}


.kg-chip-warning {
    border-color: #e7c78e;
    color: #8a540c;
    background: #fff4de;
}
/* Contratos operativos en ficha de cliente */
.kg-contract-operation-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.kg-contract-operation-kpi {
    min-width: 0;
    padding: .9rem 1rem;
    border: 1px solid #dbe5e2;
    border-radius: .8rem;
    background: #fff;
}

.kg-contract-operation-kpi > span,
.kg-contract-operation-kpi > strong,
.kg-contract-operation-kpi > small {
    display: block;
}

.kg-contract-operation-kpi > span {
    color: #687774;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.kg-contract-operation-kpi > strong {
    margin-top: .3rem;
    color: #19312d;
    font-size: 1rem;
}

.kg-contract-operation-kpi > small {
    margin-top: .28rem;
    color: #687774;
    line-height: 1.35;
}

.kg-contract-operation-grid {
    align-items: stretch;
    margin-bottom: 1rem;
}

.kg-operational-service-list {
    display: grid;
    gap: .55rem;
}

.kg-operational-service-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
    padding: .65rem 0;
    border-bottom: 1px solid #e5ecea;
}

.kg-operational-service-row:last-child {
    border-bottom: 0;
}

.kg-operational-service-row strong,
.kg-operational-service-row small {
    display: block;
}

.kg-operational-service-row small {
    margin-top: .15rem;
    color: #687774;
}

.kg-operational-service-status {
    flex: 0 0 auto;
    text-align: right;
}

.kg-operational-service-status small {
    margin-top: .3rem;
}

.kg-contract-operation-note {
    display: grid;
    gap: .2rem;
    margin-top: .8rem;
    padding: .7rem .8rem;
    border-left: 3px solid #0f6b61;
    background: #f2f8f6;
}

.kg-contract-operation-note span {
    color: #52635f;
    white-space: pre-line;
}

@media (max-width: 991.98px) {
    .kg-contract-operation-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .kg-contract-operation-kpis {
        grid-template-columns: 1fr;
    }

    .kg-operational-service-row {
        flex-direction: column;
    }

    .kg-operational-service-status {
        text-align: left;
    }
}

/* Contratos, unidades, servicios y cargos recurrentes */
.contract-page-heading,
.contract-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #dbe5e2;
    border-radius: .85rem;
    background: linear-gradient(135deg, #f8fbfa 0%, #eef6f4 100%);
}

.contract-page-heading h1,
.contract-hero h1 {
    margin: 0;
    color: #163d38;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.contract-page-heading p,
.contract-hero p {
    margin: .35rem 0 0;
    color: #61716d;
}

.contract-eyebrow,
.contract-section-kicker {
    display: block;
    margin-bottom: .25rem;
    color: #0f6b61;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.contract-heading-actions,
.contract-hero-actions,
.contract-component-actions,
.contract-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
}

.contract-row-actions form,
.contract-component-actions form {
    margin: 0;
}

.contract-section-nav {
    position: sticky;
    top: .5rem;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .5rem;
    border: 1px solid #dbe5e2;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 .15rem .65rem rgba(22, 61, 56, .06);
}

.contract-section-nav a {
    padding: .45rem .7rem;
    border-radius: .55rem;
    color: #34534e;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}

.contract-section-nav a:hover {
    background: #edf5f3;
    color: #0f6b61;
}

.contract-section-card {
    margin-bottom: 1rem;
    border: 1px solid #dbe5e2;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 .2rem .75rem rgba(22, 61, 56, .05);
    overflow: hidden;
}

.contract-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid #e6eeec;
    background: #fbfdfc;
}

.contract-section-heading h2 {
    margin: 0;
    color: #203f3a;
    font-size: 1.05rem;
}

.contract-section-heading p,
.contract-section-summary {
    margin: .25rem 0 0;
    color: #687774;
    font-size: .85rem;
}

.contract-summary-grid,
.contract-component-facts,
.contract-note-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
}

.contract-summary-grid {
    padding: 1rem;
}

.contract-summary-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contract-summary-grid > div,
.contract-component-facts > div {
    min-width: 0;
}

.contract-summary-label,
.contract-component-facts span {
    display: block;
    margin-bottom: .15rem;
    color: #71807d;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.contract-summary-grid strong,
.contract-component-facts strong {
    color: #213e39;
    overflow-wrap: anywhere;
}

.contract-component-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    padding: 1rem;
}

.contract-component-card {
    min-width: 0;
    padding: .85rem;
    border: 1px solid #dfe8e6;
    border-radius: .7rem;
    background: #fff;
}

.contract-component-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

.contract-component-topline h3,
.contract-component-topline h4 {
    margin: 0;
    color: #203f3a;
    font-size: 1rem;
}

.contract-component-type {
    display: block;
    margin-bottom: .15rem;
    color: #6b7c78;
    font-size: .78rem;
}

.contract-component-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

.contract-component-note {
    margin: .65rem 0 0;
    padding: .55rem .65rem;
    border-left: 3px solid #6f9e96;
    background: #f4f8f7;
    color: #52635f;
    font-size: .84rem;
    white-space: pre-line;
}

.contract-status-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: .26rem .55rem;
    border-radius: 999px;
    background: #e7efed;
    color: #31534d;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.contract-status-chip.status-active { background: #dff2ea; color: #17634f; }
.contract-status-chip.status-suspended { background: #fff0cc; color: #76530b; }
.contract-status-chip.status-ended { background: #e9ecef; color: #586269; }
.contract-status-chip.status-cancelled { background: #f7dfe2; color: #8b2635; }

.contract-add-panel,
.contract-inline-editor {
    margin: 0 1rem 1rem;
    border: 1px solid #d9e5e2;
    border-radius: .7rem;
    background: #f9fcfb;
}

.contract-add-panel > summary,
.contract-inline-editor > summary {
    cursor: pointer;
    padding: .7rem .8rem;
    color: #285049;
    font-weight: 700;
}

.contract-add-panel-body,
.contract-inline-form,
.contract-admin-form {
    padding: .85rem;
    border-top: 1px solid #e1ebe8;
}

.contract-form-grid,
.contract-inline-form,
.contract-admin-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
    padding: 1rem;
}

.contract-inline-form,
.contract-admin-form {
    padding: .85rem;
}

.contract-form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contract-field {
    min-width: 0;
}

.contract-field label,
.contract-form-grid .form-label,
.contract-inline-form .form-label,
.contract-admin-form .form-label {
    display: block;
    margin-bottom: .25rem;
    color: #4f625e;
    font-size: .79rem;
    font-weight: 700;
}

.contract-form-grid .span-2,
.contract-inline-form .span-2,
.contract-admin-form .span-2 { grid-column: span 2; }
.contract-form-grid .span-3,
.contract-inline-form .span-3,
.contract-admin-form .span-3 { grid-column: span 3; }
.contract-form-grid .span-4,
.contract-inline-form .span-4,
.contract-admin-form .span-4,
.contract-validation { grid-column: 1 / -1; }

.contract-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding-top: .2rem;
}

.contract-day-selector {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
}

.contract-empty-state {
    margin: 1rem;
    padding: 1.25rem;
    border: 1px dashed #c8d7d3;
    border-radius: .7rem;
    color: #657571;
    text-align: center;
    background: #fafcfb;
}

.contract-toolbar {
    display: flex;
    align-items: flex-end;
    gap: .7rem;
    padding: 1rem;
    border-bottom: 1px solid #e6eeec;
}

.contract-table th {
    color: #52645f;
    font-size: .74rem;
    letter-spacing: .025em;
    text-transform: uppercase;
    background: #f8fbfa;
}

.contract-table td {
    padding: .7rem .65rem;
}

.contract-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.contract-note-wide { grid-column: 1 / -1; }

@media (max-width: 1199.98px) {
    .contract-summary-grid,
    .contract-component-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .contract-component-grid { grid-template-columns: 1fr; }
    .contract-form-grid,
    .contract-inline-form,
    .contract-admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contract-form-grid .span-3,
    .contract-inline-form .span-3,
    .contract-admin-form .span-3,
    .contract-form-grid .span-4,
    .contract-inline-form .span-4,
    .contract-admin-form .span-4 { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .contract-page-heading,
    .contract-hero { flex-direction: column; }
    .contract-heading-actions,
    .contract-hero-actions { justify-content: flex-start; }
    .contract-summary-grid,
    .contract-summary-grid-compact,
    .contract-component-facts,
    .contract-note-grid,
    .contract-form-grid,
    .contract-form-grid.compact,
    .contract-inline-form,
    .contract-admin-form { grid-template-columns: 1fr; }
    .contract-form-grid .span-2,
    .contract-inline-form .span-2,
    .contract-admin-form .span-2 { grid-column: auto; }
    .contract-toolbar { align-items: stretch; flex-direction: column; }
    .contract-row-actions { justify-content: flex-start; }
}

/* BG231A_RESERVATION_CONFIGURATION_AND_SPACE_IMAGES */
.space-images-card > summary {
    cursor: pointer;
    list-style: none;
}

.space-images-card > summary::-webkit-details-marker {
    display: none;
}

.space-image-preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eef2f1;
}

.space-image-item .card-body {
    padding: .65rem;
}

.space-image-column {
    min-width: 115px;
}

.space-list-thumbnail {
    display: inline-flex;
    width: 92px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e1df;
    border-radius: 6px;
    object-fit: cover;
    background: #f4f7f6;
}

.space-list-thumbnail-empty {
    color: #6c757d;
    font-size: .72rem;
}

@media (max-width: 767.98px) {
    .space-image-preview {
        height: 150px;
    }
}

/* v3.2.31b - primera fase del lateral de navegacion */
.app-shell {
    display: grid;
    grid-template-columns: 228px minmax(0, 1fr);
    min-height: calc(100vh - 76px);
}

.app-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    padding: .8rem .65rem 1rem;
    color: #e9f4f2;
    background: linear-gradient(180deg, #073f39 0%, #04332f 100%);
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 7px 0 22px rgba(4, 51, 47, .08);
}

.app-sidebar-context {
    margin: 0 .15rem .8rem;
    padding: .7rem .75rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .7rem;
    background: rgba(255, 255, 255, .06);
}

.app-sidebar-context span,
.app-sidebar-context strong,
.app-sidebar-context a {
    display: block;
}

.app-sidebar-context span {
    color: #aad1cc;
    font-size: .64rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-sidebar-context strong {
    margin-top: .18rem;
    overflow: hidden;
    color: #fff;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar-context a {
    margin-top: .3rem;
    color: #c7e6e2;
    font-size: .68rem;
    font-weight: 650;
    text-decoration: none;
}

.app-sidebar-nav {
    display: grid;
    gap: .75rem;
}

.app-nav-section {
    display: grid;
    gap: .16rem;
}

.app-nav-section-title {
    padding: .15rem .68rem .25rem;
    color: #82b8b1;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: .62rem;
    min-height: 36px;
    padding: .42rem .62rem;
    border: 1px solid transparent;
    border-radius: .58rem;
    color: #dceceb;
    font-size: .76rem;
    font-weight: 650;
    text-decoration: none;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.app-nav-link svg {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.app-nav-link.is-active {
    color: #073f39;
    border-color: rgba(255, 255, 255, .5);
    background: #fff;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .13);
}

.app-nav-link-secondary {
    min-height: 32px;
    padding-top: .33rem;
    padding-bottom: .33rem;
    color: #c6e0dd;
    font-size: .71rem;
}

.app-nav-sublinks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .18rem;
    padding: .08rem .28rem .25rem 2.3rem;
}

.app-nav-sublinks a {
    overflow: hidden;
    color: #9ec8c3;
    font-size: .64rem;
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-nav-sublinks a:hover {
    color: #fff;
}

.app-nav-sublinks-reservations {
    padding-left: .68rem;
}

.app-nav-section-system {
    padding-top: .58rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.app-content {
    min-width: 0;
    padding: 1rem 1.15rem 1.5rem;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
        min-height: 0;
    }

    .app-sidebar {
        position: static;
        min-height: 0;
        padding: .55rem;
    }

    .app-sidebar-context,
    .app-nav-section-title,
    .app-nav-sublinks {
        display: none;
    }

    .app-sidebar-nav {
        display: flex;
        gap: .35rem;
        overflow-x: auto;
        padding-bottom: .1rem;
    }

    .app-nav-section {
        display: flex;
        flex: 0 0 auto;
        gap: .25rem;
    }

    .app-nav-section-system {
        padding-top: 0;
        padding-left: .35rem;
        border-top: 0;
        border-left: 1px solid rgba(255, 255, 255, .14);
    }

    .app-nav-link {
        white-space: nowrap;
    }

    .app-content {
        padding: .85rem;
    }
}

/* v3.2.31i - segunda fase del lateral operativo */
.app-sidebar-nav {
    gap: .62rem;
}

.app-nav-section + .app-nav-section {
    padding-top: .52rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.app-nav-section:first-child .app-nav-link:first-of-type {
    min-height: 40px;
    font-weight: 800;
}

.app-nav-sublinks a[aria-current="page"] {
    color: #fff;
    font-weight: 800;
}

@media (max-width: 980px) {
    .app-nav-section + .app-nav-section {
        padding-top: 0;
        padding-left: .35rem;
        border-top: 0;
        border-left: 1px solid rgba(255, 255, 255, .14);
    }
}

/* BG v3.2.31j - consumos variables y alta manual */
.consumption-catalog-table {
    max-height: calc(100vh - 280px);
}

.consumption-catalog-table code {
    color: #315c57;
    font-size: .76rem;
}

.consumption-entry-page {
    max-width: 1480px;
    margin: 0 auto;
}

.consumption-customer-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid #dfe8e5;
    border-left: 4px solid #1e6259;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 4px 16px rgba(32, 72, 66, .05);
}

.consumption-entry-summary {
    position: sticky;
    top: 1rem;
}

.consumption-summary-name {
    color: #174c46;
    font-size: 1.05rem;
    font-weight: 700;
}

#quantityGroup.is-fixed-quantity .form-control {
    background: #f3f6f5;
}

@media (max-width: 1199.98px) {
    .consumption-entry-summary {
        position: static;
    }

    .consumption-catalog-table {
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .consumption-customer-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* v3.2.31l r1 · revisión y trazabilidad de consumos prefacturables */
.billing-movement-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.billing-movement-form .form-label {
    font-size: .82rem;
    font-weight: 650;
    color: #42534f;
}

.billing-movement-readonly-grid,
.billing-trace-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.billing-movement-readonly-grid > div,
.billing-trace-grid > div {
    border: 1px solid #e2e8e6;
    border-radius: .65rem;
    background: #f8faf9;
    padding: .75rem;
    min-width: 0;
}

.billing-movement-readonly-grid span,
.billing-trace-grid span,
.billing-status-timeline span {
    display: block;
    color: #687873;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .035em;
    margin-bottom: .18rem;
}

.billing-movement-readonly-grid strong,
.billing-trace-grid strong,
.billing-status-timeline strong {
    display: block;
    color: #22312d;
}

.billing-trace-grid small,
.billing-status-timeline small {
    display: block;
    color: #6d7b77;
    margin-top: .18rem;
}

.billing-status-timeline {
    display: grid;
    gap: .7rem;
}

.billing-status-timeline > div {
    border-left: 3px solid #2f665d;
    padding-left: .7rem;
}

.billing-audit-list {
    display: grid;
    gap: .65rem;
}

.billing-audit-list article {
    display: grid;
    grid-template-columns: minmax(180px, 30%) 1fr;
    gap: .8rem;
    padding: .75rem 0;
    border-bottom: 1px solid #e7ecea;
}

.billing-audit-list article:last-child {
    border-bottom: 0;
}

.billing-audit-list p {
    margin: 0;
    color: #4c5c57;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.billing-row-pricing-pending > td {
    background: #fffaf0;
}

.billing-movements-table td {
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .billing-movement-hero {
        flex-direction: column;
    }

    .billing-movement-hero > :last-child {
        align-items: flex-start !important;
    }

    .billing-movement-readonly-grid,
    .billing-trace-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .billing-movement-readonly-grid,
    .billing-trace-grid,
    .billing-audit-list article {
        grid-template-columns: 1fr;
    }
}

/* Billing movement list: compact numeric columns and one-line actions. */
.billing-movements-table {
    min-width: 1120px;
}

.billing-movements-table th:nth-child(1),
.billing-movements-table td:nth-child(1) {
    width: 92px;
    white-space: nowrap;
}

.billing-movements-table th:nth-child(5),
.billing-movements-table td:nth-child(5),
.billing-movements-table th:nth-child(6),
.billing-movements-table td:nth-child(6),
.billing-movements-table th:nth-child(7),
.billing-movements-table td:nth-child(7) {
    width: 86px;
    white-space: nowrap;
}

.billing-movements-table th:nth-child(8),
.billing-movements-table td:nth-child(8) {
    width: 118px;
}

.billing-movement-actions-column {
    width: 218px;
    white-space: nowrap;
}

.billing-movement-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
}

.billing-movement-actions form,
.billing-movement-actions .btn {
    flex: 0 0 auto;
    margin: 0;
}

/* v3.2.31m r1 - edicion contractual a ancho completo */
.contract-admin-form {
    display: block;
    padding: 1rem;
    border-top: 1px solid #e1ebe8;
    background: #f8fbfa;
}

.contract-admin-form > form,
.contract-edit-form {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.contract-edit-section {
    padding: 1rem;
    border: 1px solid #dce7e4;
    border-radius: .75rem;
    background: #fff;
}

.contract-edit-section + .contract-edit-section {
    margin-top: .85rem;
}

.contract-edit-section-financial {
    background: #fbfdfc;
}

.contract-edit-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #e8efed;
}

.contract-edit-section-heading strong,
.contract-edit-section-heading span {
    display: block;
}

.contract-edit-section-heading strong {
    color: #24443e;
    font-size: .94rem;
}

.contract-edit-section-heading span {
    margin-top: .12rem;
    color: #71807d;
    font-size: .79rem;
}

.contract-edit-form .form-label {
    margin-bottom: .3rem;
    color: #4f625e;
    font-size: .8rem;
    font-weight: 700;
}

.contract-edit-form .form-text {
    color: #71807d;
    font-size: .74rem;
}

.contract-center-selector {
    min-height: 7.2rem;
}

.contract-edit-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: .8rem 1rem;
    border: 1px solid #d6e3df;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -.2rem .7rem rgba(22, 61, 56, .06);
}

.contract-edit-actions span {
    color: #657571;
    font-size: .79rem;
}

@media (max-width: 767.98px) {
    .contract-admin-form,
    .contract-edit-section {
        padding: .8rem;
    }

    .contract-edit-actions {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .contract-edit-actions .btn {
        width: 100%;
    }
}

/* Corporate logo variants v3.2.31r */
.brand-preview-dark {
    background: #0f5b53;
    border-color: #0f5b53;
}

.brand-preview-dark .brand-preview-empty {
    color: rgba(255, 255, 255, .75);
}

.brand-preview-light {
    background: #ffffff;
}

.brand-preview-empty {
    color: #6c757d;
}

/* v3.2.32c r1 - editores de unidades y servicios a ancho completo */
.contract-component-editor {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    border: 0;
    background: transparent;
}

.contract-component-editor > summary {
    list-style: none;
    cursor: pointer;
}

.contract-component-editor > summary::-webkit-details-marker {
    display: none;
}

.contract-component-editor[open] {
    flex: 1 0 100%;
    width: 100%;
    margin-top: .45rem;
    text-align: left;
}

.contract-component-editor[open] > summary {
    margin-left: auto;
    margin-bottom: .6rem;
}

.contract-component-card:has(.contract-component-editor[open]) {
    grid-column: 1 / -1;
}

.contract-component-edit-form {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #d9e5e2;
    border-radius: .75rem;
    background: #f8fbfa;
}

.contract-component-edit-section {
    padding: .9rem;
    border: 1px solid #dfe9e6;
    border-radius: .7rem;
    background: #fff;
}

.contract-component-edit-section + .contract-component-edit-section {
    margin-top: .75rem;
}

.contract-component-edit-section-financial {
    background: #fbfdfc;
}

.contract-component-edit-heading {
    margin-bottom: .75rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid #e8efed;
}

.contract-component-edit-heading strong,
.contract-component-edit-heading span {
    display: block;
}

.contract-component-edit-heading strong {
    color: #24443e;
    font-size: .9rem;
}

.contract-component-edit-heading span {
    margin-top: .12rem;
    color: #71807d;
    font-size: .76rem;
}

.contract-component-edit-notice,
.contract-component-static-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .65rem .75rem;
    border: 1px solid #dce7e4;
    border-radius: .6rem;
    background: #f4f8f7;
}

.contract-component-edit-notice {
    margin-bottom: .75rem;
}

.contract-component-edit-notice strong,
.contract-component-static-info strong {
    color: #31534d;
    font-size: .82rem;
}

.contract-component-edit-notice span,
.contract-component-static-info span {
    color: #697975;
    font-size: .75rem;
}

.contract-component-edit-form .form-label {
    margin-bottom: .28rem;
    color: #4f625e;
    font-size: .79rem;
    font-weight: 700;
}

.contract-component-check {
    display: flex;
    min-height: 31px;
    align-items: center;
    gap: .45rem;
    margin: 0;
    padding: .4rem .65rem;
    border: 1px solid #d7e3df;
    border-radius: .45rem;
    background: #fff;
}

.contract-component-check .form-check-input {
    float: none;
    margin: 0;
}

.contract-day-selector-edit label {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-width: 2.3rem;
    padding: .35rem .45rem;
    border: 1px solid #d8e4e1;
    border-radius: .45rem;
    background: #fff;
}

@media (max-width: 767.98px) {
    .contract-component-edit-form,
    .contract-component-edit-section {
        padding: .75rem;
    }

    .contract-component-editor[open] > summary {
        width: 100%;
    }
}

/* BG333I_PAGED_CUSTOMER_PERSON_SEARCH
   Paginacion visible del buscador comun para evitar limites silenciosos. */
.rx-search-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    padding: .55rem .7rem;
    border-top: 1px solid #dde6e3;
    background: #f7faf9;
    color: #60716e;
    font-size: .78rem;
}

.rx-search-page-button {
    min-width: 76px;
    padding: .35rem .62rem;
    border: 1px solid #b9c8c4;
    border-radius: 8px;
    background: #ffffff;
    color: #245f56;
    font-size: .76rem;
    font-weight: 700;
    cursor: pointer;
}

.rx-search-page-button:hover,
.rx-search-page-button:focus-visible {
    border-color: #75a99f;
    background: #edf6f3;
}

.rx-search-page-button:disabled {
    cursor: default;
    opacity: .45;
}

@media (max-width: 560px) {
    .rx-search-pagination {
        gap: .4rem;
    }

    .rx-search-page-button {
        min-width: 68px;
        padding-inline: .45rem;
    }
}

/* v3.2.34l r1 - consumos mensuales por volumen y refinamiento de alta/catalogo */
.consumption-page-hero,
.consumption-catalog-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #dce7e4;
    border-radius: .85rem;
    background: linear-gradient(135deg, #ffffff 0%, #f4f9f7 100%);
    box-shadow: 0 7px 24px rgba(30, 83, 75, .06);
}

.consumption-catalog-workspace > [class*="col-"] > .card,
.consumption-catalog-workspace > [class*="col-"] > form.card {
    border-color: #dce7e4;
    box-shadow: 0 5px 18px rgba(30, 83, 75, .045);
}

.consumption-catalog-workspace .form-label,
.consumption-entry-page .form-label {
    margin-bottom: .3rem;
    color: #415b56;
    font-size: .8rem;
    font-weight: 700;
}

.consumption-treatment {
    min-height: 58px;
    padding: .62rem .72rem;
    border: 1px solid #d8e5e1;
    border-radius: .62rem;
    background: #f7faf9;
}

.consumption-treatment strong,
.consumption-treatment small {
    display: block;
}

.consumption-treatment strong {
    color: #24584f;
    font-size: .86rem;
}

.consumption-treatment small {
    margin-top: .15rem;
    color: #6c7d79;
    line-height: 1.3;
}

.consumption-monthly-notice {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .75rem .85rem;
    border: 1px solid #bfd9d2;
    border-left: 4px solid #2e756a;
    border-radius: .65rem;
    background: #f0f8f5;
}

.consumption-monthly-notice strong {
    color: #24584f;
    font-size: .86rem;
}

.consumption-monthly-notice span {
    color: #5f736e;
    font-size: .79rem;
    line-height: 1.4;
}

.consumption-rate-range {
    display: grid;
    grid-template-columns: minmax(150px, .9fr) minmax(150px, .9fr) minmax(240px, 1.5fr);
    gap: .75rem;
    align-items: end;
    padding: .8rem;
    border: 1px solid #dce7e4;
    border-radius: .7rem;
    background: #f7faf9;
}

.consumption-rate-range-help {
    align-self: center;
    color: #667a75;
    font-size: .78rem;
    line-height: 1.4;
}

.consumption-monthly-page {
    --monthly-accent: #1f665c;
}

.monthly-consumption-selector {
    border-color: #dce7e4;
    box-shadow: 0 4px 14px rgba(30, 83, 75, .04);
}

.monthly-selector-grid {
    display: grid;
    grid-template-columns: 110px 120px minmax(180px, .85fr) minmax(260px, 1.55fr) 100px;
    gap: .7rem;
    align-items: end;
}

.monthly-consumption-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr);
    gap: 1rem;
    align-items: start;
}

.monthly-consumption-grid > .monthly-validation {
    grid-column: 1 / -1;
}

.monthly-consumption-main,
.monthly-settlement-summary,
.monthly-entry-list {
    border-color: #dce7e4;
    box-shadow: 0 5px 18px rgba(30, 83, 75, .045);
}

.monthly-settlement-summary {
    position: sticky;
    top: 1rem;
}

.monthly-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.monthly-card-heading > div {
    min-width: 0;
}

.monthly-card-heading strong,
.monthly-card-heading span:not(.badge) {
    display: block;
}

.monthly-card-heading strong {
    color: #284d47;
}

.monthly-card-heading span:not(.badge) {
    margin-top: .12rem;
    color: #72817e;
    font-size: .76rem;
    font-weight: 400;
}

.monthly-consumption-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}

.monthly-consumption-metrics > div {
    min-width: 0;
    padding: .8rem;
    border: 1px solid #dfe9e6;
    border-radius: .72rem;
    background: #f8fbfa;
}

.monthly-consumption-metrics > div.is-total {
    border-color: #b9d7d0;
    background: #eef8f5;
}

.monthly-consumption-metrics span,
.monthly-consumption-metrics strong,
.monthly-consumption-metrics small {
    display: block;
}

.monthly-consumption-metrics span {
    color: #657873;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.monthly-consumption-metrics strong {
    margin-top: .12rem;
    color: #234f48;
    font-size: 1.55rem;
    line-height: 1.1;
}

.monthly-consumption-metrics small {
    margin-top: .28rem;
    color: #74837f;
    font-size: .72rem;
    line-height: 1.35;
}

.monthly-meter-entry {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr);
    gap: .8rem;
    padding-top: .85rem;
    border-top: 1px solid #e5ecea;
}

.monthly-pricing-summary {
    display: grid;
    gap: .55rem;
}

.monthly-pricing-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid #e7eeec;
}

.monthly-pricing-summary > div.is-total {
    margin-top: .15rem;
    padding: .7rem .75rem;
    border: 0;
    border-radius: .6rem;
    background: #edf7f4;
}

.monthly-pricing-summary dt {
    color: #61736f;
    font-size: .78rem;
    font-weight: 650;
}

.monthly-pricing-summary dd {
    margin: 0;
    color: #244f48;
    font-size: .86rem;
    font-weight: 750;
    text-align: right;
}

.monthly-pricing-summary .is-total dd {
    font-size: 1.05rem;
}

.monthly-existing-settlement {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem .75rem;
    border: 1px solid #d8e6e2;
    border-radius: .65rem;
    background: #f8fbfa;
}

.monthly-existing-settlement strong,
.monthly-existing-settlement span {
    display: block;
}

.monthly-existing-settlement span {
    margin-top: .12rem;
    color: #71817d;
    font-size: .75rem;
}

.monthly-existing-settlement a {
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 700;
}

.monthly-entry-list .table > :not(caption) > * > * {
    padding: .55rem .75rem;
}

@media (max-width: 1199.98px) {
    .monthly-selector-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monthly-selector-consumption {
        grid-column: 1 / -1;
    }

    .monthly-selector-action {
        grid-column: 2;
    }

    .monthly-consumption-grid {
        grid-template-columns: 1fr;
    }

    .monthly-settlement-summary {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .consumption-page-hero,
    .consumption-catalog-hero {
        flex-direction: column;
        padding: .85rem;
    }

    .consumption-rate-range,
    .monthly-selector-grid,
    .monthly-consumption-metrics,
    .monthly-meter-entry {
        grid-template-columns: 1fr;
    }

    .monthly-selector-consumption,
    .monthly-selector-action {
        grid-column: auto;
    }

    .monthly-consumption-metrics strong {
        font-size: 1.3rem;
    }
}

/* v3.2.34m r2 - selector buscable de consumos y bloqueo visual de doble envio */
.service-catalog-picker {
    position: relative;
}

.service-catalog-search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.service-catalog-search-field > svg {
    position: absolute;
    left: .78rem;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: #5f7771;
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
    z-index: 2;
}

.service-catalog-search-field .form-control {
    padding-left: 2.35rem;
    padding-right: 2.35rem;
}

.service-catalog-search-clear {
    position: absolute;
    right: .55rem;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #647772;
    font-size: 1.25rem;
    line-height: 1;
}

.service-catalog-search-clear:hover,
.service-catalog-search-clear:focus-visible {
    background: #edf4f2;
    color: #245f56;
}

.service-catalog-picker.is-enhanced .service-catalog-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.service-catalog-search-results {
    position: absolute;
    z-index: 1080;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    max-height: min(410px, 55vh);
    overflow-y: auto;
    padding: .35rem;
    border: 1px solid #cbdad6;
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 14px 34px rgba(25, 66, 60, .16);
}

.service-catalog-search-result {
    display: block;
    width: 100%;
    padding: .58rem .65rem;
    border: 0;
    border-radius: .48rem;
    background: transparent;
    color: #263e3a;
    text-align: left;
}

.service-catalog-search-result:hover,
.service-catalog-search-result:focus-visible,
.service-catalog-search-result.is-active {
    outline: none;
    background: #edf6f3;
}

.service-catalog-search-result-title {
    display: flex;
    align-items: baseline;
    gap: .45rem;
    min-width: 0;
}

.service-catalog-search-result-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .85rem;
}

.service-catalog-search-code {
    flex: 0 0 auto;
    padding: .08rem .32rem;
    border-radius: .3rem;
    background: #e0ece9;
    color: #245f56;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.service-catalog-search-result small {
    display: -webkit-box;
    margin-top: .22rem;
    overflow: hidden;
    color: #667b76;
    font-size: .73rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.service-catalog-search-empty {
    padding: .7rem;
    color: #6f817d;
    font-size: .78rem;
}

.service-catalog-picker-compact .service-catalog-search-result {
    padding-block: .45rem;
}

[data-consumption-entry-form].is-submitting {
    cursor: progress;
}

[data-consumption-entry-form].is-submitting [data-consumption-submit] {
    opacity: .72;
}

/* Contract lifecycle: effective-date finalization */
.contract-component-lifecycle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .2rem;
    min-width: 0;
}

.contract-component-lifecycle small {
    color: #6c7b77;
    font-size: .72rem;
    white-space: nowrap;
}

.contract-status-chip.status-scheduled { background: #e3f0f7; color: #285b76; }
.contract-status-chip.status-nearend { background: #fff0cc; color: #76530b; }

.contract-lifecycle-action {
    position: relative;
}

.contract-lifecycle-action > summary {
    list-style: none;
    cursor: pointer;
}

.contract-lifecycle-action > summary::-webkit-details-marker {
    display: none;
}

.contract-lifecycle-form {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + .35rem);
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.4fr) auto;
    align-items: end;
    gap: .55rem;
    min-width: min(620px, 88vw);
    padding: .7rem;
    border: 1px solid #d8e4e1;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 .55rem 1.4rem rgba(22, 61, 56, .16);
}

.contract-lifecycle-form label {
    display: grid;
    gap: .2rem;
    margin: 0;
    color: #52635f;
    font-size: .76rem;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .contract-lifecycle-form {
        position: fixed;
        left: .75rem;
        right: .75rem;
        top: auto;
        bottom: .75rem;
        grid-template-columns: 1fr;
        min-width: 0;
        max-height: calc(100vh - 1.5rem);
        overflow: auto;
    }

    .contract-component-lifecycle {
        align-items: flex-start;
    }
}

/* BG v3.2.34r - navegacion de Recepcion con scroll independiente */
.app-nav-section-primary .app-nav-link {
    color: #e8f4f2;
    font-weight: 700;
}

.app-nav-section-primary .app-nav-link.is-active {
    color: #073f39;
}

.app-nav-section-primary .app-nav-link-home {
    min-height: 40px;
    font-weight: 800;
}

.app-nav-section-management {
    margin-top: .2rem;
}

@media (min-width: 981px) {
    html,
    body {
        height: 100%;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        overflow: hidden;
    }

    body > .bg-klammer,
    body > .email-test-mode-banner {
        flex: 0 0 auto;
    }

    .app-shell {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        overflow: hidden;
    }

    .app-sidebar {
        position: static;
        align-self: stretch;
        min-height: 0;
        height: 100%;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: rgba(199, 230, 226, .45) transparent;
    }

    .app-sidebar::-webkit-scrollbar {
        width: 7px;
    }

    .app-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .app-sidebar::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(199, 230, 226, .4);
    }

    .app-content {
        min-height: 0;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* v3.2.34v r5 - cambio de mesa/modalidad visible y responsive */
.contract-component-card:has(.contract-coworking-change[open]) {
    grid-column: 1 / -1;
}

.contract-component-actions:has(.contract-coworking-change[open]) {
    align-items: stretch;
}

.contract-coworking-change[open] {
    flex: 1 0 100%;
    width: 100%;
    margin-top: .45rem;
}

.contract-coworking-change[open] > summary {
    width: max-content;
    margin-bottom: .55rem;
    margin-left: auto;
}

.contract-coworking-change-form {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: .85rem;
    background: #f8fbfa;
}

.contract-coworking-change-form > label {
    min-width: 0;
}

.contract-coworking-change-form > label:has(input[name="reason"]) {
    grid-column: span 3;
}

.contract-coworking-change-form .form-control,
.contract-coworking-change-form .form-select {
    width: 100%;
}

.contract-coworking-change-form [data-space-unit-help] {
    display: block;
    margin-top: .2rem;
    font-weight: 400;
}

@media (max-width: 1100px) {
    .contract-coworking-change-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contract-coworking-change-form > label:has(input[name="reason"]),
    .contract-coworking-change-form > button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .contract-coworking-change-form {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .contract-coworking-change-form > button {
        grid-column: auto;
        width: 100%;
    }

    .contract-coworking-change[open] > summary {
        width: 100%;
    }
}
