@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --habitat-celeste: #00b4df;
    --habitat-verde: #dad813;
    --habitat-naranja: #f26f00;
    --habitat-azul: #013972;
    --habitat-blanco: #ffffff;
    --habitat-negro: #111111;

    --habitat-celeste-rgb: 0, 180, 223;
    --habitat-verde-rgb: 218, 216, 19;
    --habitat-naranja-rgb: 242, 111, 0;
    --habitat-azul-rgb: 1, 57, 114;
    --habitat-blanco-rgb: 255, 255, 255;
    --habitat-negro-rgb: 17, 17, 17;

    --habitat-texto: #223036;
    --habitat-muted: #64748b;
    --habitat-muted-dark: #475569;
    --habitat-borde: #dfe7ef;
    --habitat-borde-soft: #e5eaf0;
    --habitat-borde-input: #ccd6e0;
    --habitat-fondo: #f5f7fa;
    --habitat-soft: #f8fafc;
    --habitat-soft-2: #f1f5f9;
    --habitat-table-even: #fafafa;
    --habitat-table-border: #f1f3f5;
    --habitat-card: #ffffff;

    --habitat-success: #54a147;
    --habitat-danger: #dc3545;
    --habitat-danger-rgb: 220, 53, 69;

    --habitat-radius: 5px;
    --habitat-radius-md: 6px;
    --habitat-shadow-card: 0 6px 16px rgba(var(--habitat-negro-rgb), .05);
    --habitat-shadow-modal: 0 18px 45px rgba(var(--habitat-negro-rgb), .22);
    --habitat-shadow-loader: 0 10px 25px rgba(var(--habitat-celeste-rgb), .15);
}

body {
    font-family: 'Poppins', sans-serif !important;
    background: var(--habitat-fondo) !important;
}

/* CONTENEDOR */
.habitat-shell {
    margin-top: 8px;
    margin-bottom: 16px;
}

/* HEADER PRINCIPAL */
.habitat-page-header {
    background: linear-gradient(135deg, rgba(var(--habitat-celeste-rgb), .16), rgba(var(--habitat-azul-rgb), .08));
    border: 1px solid rgba(var(--habitat-celeste-rgb), .20);
    border-radius: var(--habitat-radius-md);
    padding: 16px 18px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.habitat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.habitat-header-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    color: var(--habitat-azul);
    border: 1px solid rgba(var(--habitat-celeste-rgb), .35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.habitat-page-title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--habitat-azul);
    line-height: 1.2;
}

.habitat-page-subtitle {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 500;
    color: var(--habitat-muted);
}

/* CARDS */
.habitat-card {
    background: var(--habitat-card);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--habitat-shadow-card);
}

.habitat-card-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--habitat-borde);
}

.habitat-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.habitat-card-subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: var(--habitat-muted);
}

.habitat-card-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* PILLS */
.habitat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: var(--habitat-radius);
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.habitat-pill-info {
    background: rgba(var(--habitat-celeste-rgb), .12);
    border-color: rgba(var(--habitat-celeste-rgb), .25);
    color: var(--habitat-azul);
}

.habitat-pill-gray {
    background: var(--habitat-soft-2);
    border-color: var(--habitat-borde);
    color: var(--habitat-muted-dark);
}

/* FORMULARIO */
.habitat-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--habitat-muted-dark);
}

.habitat-inline-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.habitat-field {
    flex: 1 1 auto;
    min-width: 0;
}

.habitat-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--habitat-borde-input);
    border-radius: var(--habitat-radius-md);
    font-size: 15px;
    font-weight: 500;
    background: var(--habitat-blanco);
    color: var(--habitat-texto);
}

.habitat-input:focus {
    border-color: var(--habitat-celeste) !important;
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .15) !important;
    outline: none;
}

.habitat-input[readonly],
.habitat-input:disabled {
    background: var(--habitat-soft-2) !important;
    color: var(--habitat-muted) !important;
    cursor: not-allowed;
}

/* BOTONES GENERALES */
.habitat-btn {
    height: 30px !important;
    border-radius: var(--habitat-radius) !important;
    padding: 0 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

.habitat-btn-primary {
    background: var(--habitat-azul) !important;
    border-color: var(--habitat-azul) !important;
    color: var(--habitat-blanco) !important;
}

.habitat-btn-primary:hover {
    background: var(--habitat-celeste) !important;
    border-color: var(--habitat-celeste) !important;
}

.habitat-btn-info {
    background: rgba(var(--habitat-celeste-rgb), .12) !important;
    border-color: rgba(var(--habitat-celeste-rgb), .25) !important;
    color: var(--habitat-azul) !important;
}

.habitat-btn-info:hover {
    background: rgba(var(--habitat-celeste-rgb), .18) !important;
    border-color: rgba(var(--habitat-celeste-rgb), .35) !important;
}

.habitat-btn-success {
    background: var(--habitat-verde) !important;
    border-color: var(--habitat-verde) !important;
    color: var(--habitat-negro) !important;
}

.habitat-btn-success:hover {
    background: rgba(var(--habitat-verde-rgb), .85) !important;
    border-color: rgba(var(--habitat-verde-rgb), .85) !important;
}

.habitat-btn-warning {
    background: var(--habitat-naranja) !important;
    border-color: var(--habitat-naranja) !important;
    color: var(--habitat-blanco) !important;
}

.habitat-btn-warning:hover {
    background: rgba(var(--habitat-naranja-rgb), .85) !important;
    border-color: rgba(var(--habitat-naranja-rgb), .85) !important;
}

.habitat-btn-danger {
    background: rgba(var(--habitat-naranja-rgb), .13) !important;
    border-color: rgba(var(--habitat-naranja-rgb), .28) !important;
    color: var(--habitat-naranja) !important;
}

.habitat-btn-light {
    background: var(--habitat-blanco) !important;
    border-color: var(--habitat-borde-input) !important;
    color: var(--habitat-muted-dark) !important;
}

.habitat-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.habitat-hint {
    margin-top: 10px;
    font-size: 11px;
    color: var(--habitat-muted);
    text-align: right;
}

.habitat-message {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

/* TABLAS */
.table-card {
    background: var(--habitat-blanco);
    border: 0;
    border-radius: 0;
    overflow: hidden;
    width: 100%;
}

.table-responsive-clean {
    width: 100%;
    overflow-x: auto;
}

.table-clean {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse;
    background: var(--habitat-blanco);
    font-size: 13px;
}

.table-clean thead th {
    background: var(--habitat-verde) !important;
    color: var(--habitat-negro);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 14px 16px !important;
    border: 0 !important;
    white-space: nowrap;
}

.table-clean tbody td {
    padding: 14px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--habitat-table-border) !important;
    vertical-align: middle !important;
    color: var(--habitat-muted-dark);
    background: var(--habitat-blanco);
}

.table-clean tbody tr:nth-child(even) td {
    background: var(--habitat-table-even);
}

.table-clean tbody tr:hover td {
    background: rgba(var(--habitat-celeste-rgb), .07);
}

.table-clean tbody tr:last-child td {
    border-bottom: 0 !important;
}

.table-clean td strong,
.table-clean .table-title {
    font-weight: 800;
    color: var(--habitat-texto);
}

.table-clean .table-subtitle,
.table-clean small {
    color: var(--habitat-muted);
    font-size: 11px;
}

.table-compact thead th,
.table-compact tbody td {
    padding: 10px 11px !important;
    font-size: 12px;
}

/* DATATABLES */
.dataTables_wrapper {
    width: 100%;
}

.dataTables_wrapper .row:first-child {
    margin-bottom: 12px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 0 2px;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: 12px;
    font-weight: 700;
    color: var(--habitat-muted-dark);
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    height: 36px !important;
    border-radius: var(--habitat-radius) !important;
    border: 1px solid var(--habitat-borde-input) !important;
    box-shadow: none !important;
    background: var(--habitat-blanco) !important;
    color: var(--habitat-texto) !important;
}

.dataTables_wrapper .dataTables_length select {
    padding: 4px 8px !important;
    margin: 0 6px;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 240px;
    padding: 6px 10px !important;
    margin-left: 8px !important;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--habitat-celeste) !important;
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .13) !important;
    outline: none;
}

.dt-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.dt-buttons .btn,
.dt-buttons button {
    height: 36px !important;
    border-radius: var(--habitat-radius) !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border: 1px solid var(--habitat-borde-input) !important;
    background: var(--habitat-blanco) !important;
    color: var(--habitat-muted-dark) !important;
    box-shadow: none !important;
}

.dt-buttons .btn:hover,
.dt-buttons button:hover {
    background: rgba(var(--habitat-celeste-rgb), .08) !important;
    border-color: var(--habitat-celeste) !important;
    color: var(--habitat-azul) !important;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 12px !important;
    font-size: 12px;
    color: var(--habitat-muted);
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 8px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--habitat-radius) !important;
    padding: 5px 9px !important;
    margin-left: 4px !important;
    border: 1px solid transparent !important;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--habitat-azul) !important;
    color: var(--habitat-blanco) !important;
    border-color: var(--habitat-azul) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--habitat-celeste) !important;
    color: var(--habitat-blanco) !important;
    border-color: var(--habitat-celeste) !important;
}

/* BUSCADOR EN HEADER */
.habitat-card-tools .dataTables_filter {
    margin: 0;
}

.habitat-card-tools .dataTables_filter label {
    margin: 0;
    font-size: 0;
}

.habitat-card-tools .dataTables_filter input {
    width: 220px;
    height: 36px;
    border: 1px solid var(--habitat-borde-input);
    border-radius: var(--habitat-radius);
    padding: 0 12px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    box-shadow: none;
    background: var(--habitat-blanco);
    color: var(--habitat-texto);
}

.habitat-card-tools .dataTables_filter input:focus {
    outline: none;
    border-color: var(--habitat-celeste);
}

/* FILTROS */
.habitat-filter-panel {
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--habitat-soft);
    border: 1px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.habitat-filter-info {
    min-width: 220px;
}

.habitat-filter-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--habitat-texto);
    line-height: 1.2;
}

.habitat-filter-desc {
    margin-top: 3px;
    font-size: 11px;
    font-style: italic;
    color: var(--habitat-muted);
    line-height: 1.35;
}

.habitat-filter-controls {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

.habitat-filter-item {
    width: 128px;
}

.habitat-filter-item-year {
    width: 96px;
}

.habitat-filter-item label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.habitat-filter-input {
    width: 100%;
    height: 34px !important;
    border-radius: var(--habitat-radius) !important;
    border: 1px solid var(--habitat-borde-input) !important;
    padding: 5px 9px !important;
    font-size: 12px !important;
    font-weight: 600;
    color: var(--habitat-muted-dark) !important;
    background: var(--habitat-blanco) !important;
    box-shadow: none !important;
}

.habitat-filter-input:focus {
    border-color: var(--habitat-celeste) !important;
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .13) !important;
}

.habitat-filter-btn {
    height: 34px !important;
    border-radius: var(--habitat-radius) !important;
    border: 1px solid var(--habitat-azul) !important;
    padding: 0 13px !important;
    background: var(--habitat-azul) !important;
    color: var(--habitat-blanco) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
}

.habitat-filter-btn:hover {
    background: var(--habitat-celeste) !important;
    border-color: var(--habitat-celeste) !important;
}

/* LOADING TABLAS */
.habitat-table-wrapper {
    position: relative;
}

.habitat-table-loading {
    position: absolute;
    inset: 0;
    display: none;
    background: rgba(var(--habitat-blanco-rgb), .85);
    z-index: 100;
}

.habitat-table-loading.show {
    display: block;
}

.habitat-table-loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.habitat-table-loading i {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--habitat-verde);
    border-radius: 12px;
    box-shadow: var(--habitat-shadow-loader);
    font-size: 58px;
    color: var(--habitat-azul);
    animation: habitatLoading .9s ease-in-out infinite;
}

.habitat-table-loading span {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 500;
    color: var(--habitat-azul);
}

@keyframes habitatLoading {
    0% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-6px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(6px);
    }

    100% {
        transform: translateY(0);
    }
}

/* INFO CARD */
.habitat-info {
    margin-top: 12px;
    border-radius: var(--habitat-radius);
    border: 1px solid rgba(var(--habitat-celeste-rgb), .25);
    background: rgba(var(--habitat-celeste-rgb), .07);
    padding: 14px;
}

.habitat-info-head,
.habitat-info-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.habitat-info-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--habitat-azul);
}

.habitat-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
}

.habitat-kv {
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius);
    padding: 10px 12px;
}

.habitat-kv-label {
    font-size: 11px;
    color: var(--habitat-muted);
}

.habitat-kv-value {
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.habitat-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: var(--habitat-radius);
    font-size: 11px;
    font-weight: 800;
}

.habitat-tag-success {
    background: rgba(var(--habitat-verde-rgb), .22);
    color: var(--habitat-negro);
}

.habitat-tag-light {
    background: var(--habitat-soft-2);
    color: var(--habitat-muted-dark);
}

/* MODAL */
.habitat-modal .modal-dialog {
    margin: 25px auto;
}

.habitat-modal-content {
    border: 0;
    border-radius: var(--habitat-radius-md);
    box-shadow: var(--habitat-shadow-modal);

    max-height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.habitat-modal .habitat-modal-header,
.habitat-modal .modal-header {
    flex: 0 0 auto;
}

.habitat-modal .habitat-modal-footer,
.habitat-modal .modal-footer {
    flex: 0 0 auto;
}

.habitat-modal .modal-footer,
.habitat-modal .habitat-modal-footer {
    padding: 12px 18px 16px;
    margin: 0;
    background: var(--habitat-soft);
    border-top: 1px solid var(--habitat-borde-soft);
}

.habitat-modal-header {
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(var(--habitat-celeste-rgb), .13), rgba(var(--habitat-azul-rgb), .07));
    border-bottom: 1px solid var(--habitat-borde);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.habitat-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.habitat-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    border: 1px solid rgba(var(--habitat-celeste-rgb), .28);
    color: var(--habitat-azul);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.habitat-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--habitat-azul);
    line-height: 1.2;
}

.habitat-modal-subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: var(--habitat-muted);
}

.habitat-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    color: var(--habitat-muted);
    font-size: 22px;
    line-height: 1;
}

.habitat-modal-close:hover {
    background: var(--habitat-soft-2);
    color: var(--habitat-azul);
}

.habitat-modal .modal-body,
.habitat-modal .habitat-modal-body {
    padding: 18px;
    background: var(--habitat-blanco);

    flex: 1 1 auto;
    min-height: 0;

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

.habitat-modal-footer {
    padding: 14px 18px;
    background: var(--habitat-soft);
    border-top: 1px solid var(--habitat-borde-soft);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* SUMMARY */
.habitat-summary-box {
    margin-bottom: 18px;
    padding: 14px;
    background: var(--habitat-blanco);
    border: 3px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
}

.habitat-summary-head {
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-summary-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.habitat-summary-desc {
    margin-top: 3px;
    font-size: 12px;
    color: var(--habitat-muted);
}

.habitat-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.habitat-summary-item {
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius);
    padding: 10px 12px;
    min-height: 64px;
}

.habitat-summary-item span {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.habitat-summary-item strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-texto);
    line-height: 1.35;
    word-break: break-word;
}

/* FORM MODAL */
.habitat-form-section {
    margin-top: 4px;
}

.habitat-form-group {
    margin-bottom: 15px;
}

.habitat-form-group-last {
    margin-bottom: 0;
}

.habitat-required {
    color: var(--habitat-danger);
}

.habitat-help-text {
    display: block;
    margin: 0px 12px;
    font-size: 11px;
    color: var(--habitat-muted);
}

.habitat-text-success {
    color: var(--habitat-success);
}

.habitat-text-danger {
    color: var(--habitat-danger);
}

.habitat-textarea {
    width: 100%;
    border-radius: var(--habitat-radius) !important;
    border: 1px solid var(--habitat-borde-input) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    resize: vertical;
    box-shadow: none !important;
    background: var(--habitat-blanco);
    color: var(--habitat-texto);
}

.habitat-textarea:focus {
    border-color: var(--habitat-celeste) !important;
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .13) !important;
}

/* SELECT2 */
.habitat-select+.select2-container {
    width: 100% !important;
}

.habitat-select+.select2-container .select2-selection--single {
    height: 46px !important;
    border-radius: var(--habitat-radius-md) !important;
    border: 1px solid var(--habitat-borde-input) !important;
    box-shadow: none !important;
    background: var(--habitat-blanco) !important;
}

.habitat-select+.select2-container .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 14px !important;
    font-size: 13px;
    color: var(--habitat-muted-dark);
}

.habitat-select+.select2-container .select2-selection__arrow {
    height: 44px !important;
}

.habitat-select+.select2-container.select2-container--focus .select2-selection--single {
    border-color: var(--habitat-celeste) !important;
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .13) !important;
}

/* BOTONES TABLAS */
.habitat-btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: nowrap;
}

.habitat-btn-table {
    height: 30px !important;
    padding: 0 10px !important;
    border-radius: var(--habitat-radius) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border: 1px solid var(--habitat-borde) !important;
    background: var(--habitat-blanco) !important;
    color: var(--habitat-azul) !important;
    box-shadow: none !important;
    transition: .15s ease-in-out;
}

.habitat-btn-table:hover {
    background: rgba(var(--habitat-celeste-rgb), .08) !important;
    border-color: var(--habitat-celeste) !important;
    color: var(--habitat-azul) !important;
}

.habitat-btn-table i {
    font-size: 11px;
}

.habitat-btn-table-primary {
    background: var(--habitat-azul) !important;
    border-color: var(--habitat-azul) !important;
    color: var(--habitat-blanco) !important;
}

.habitat-btn-table-primary:hover {
    background: var(--habitat-celeste) !important;
    border-color: var(--habitat-celeste) !important;
    color: var(--habitat-blanco) !important;
}

.habitat-btn-table-success {
    background: var(--habitat-verde) !important;
    border-color: var(--habitat-verde) !important;
    color: var(--habitat-negro) !important;
}

.habitat-btn-table-success:hover {
    background: rgba(var(--habitat-verde-rgb), .85) !important;
    border-color: rgba(var(--habitat-verde-rgb), .85) !important;
}

.habitat-btn-table-warning {
    background: rgba(var(--habitat-naranja-rgb), .12) !important;
    border-color: rgba(var(--habitat-naranja-rgb), .30) !important;
    color: var(--habitat-naranja) !important;
}

.habitat-btn-table-warning:hover {
    background: var(--habitat-naranja) !important;
    border-color: var(--habitat-naranja) !important;
    color: var(--habitat-blanco) !important;
}

.habitat-btn-table-danger {
    background: rgba(var(--habitat-danger-rgb), .12) !important;
    border-color: rgba(var(--habitat-danger-rgb), .30) !important;
    color: var(--habitat-danger) !important;
}

.habitat-btn-table-danger:hover {
    background: var(--habitat-danger) !important;
    border-color: var(--habitat-danger) !important;
    color: var(--habitat-blanco) !important;
}

/* BOTONES ICONO TABLAS */
.habitat-btn-icon {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: var(--habitat-radius) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid var(--habitat-borde) !important;
    background: var(--habitat-blanco) !important;
    color: var(--habitat-azul) !important;
    font-size: 12px !important;
    box-shadow: none !important;
    transition: .15s ease-in-out;
}

.habitat-btn-icon-circle {
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    border-radius: 10px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 10px !important;
    box-shadow: none !important;
    transition: .15s ease-in-out;
}

.habitat-btn-icon:hover {
    background: rgba(var(--habitat-celeste-rgb), .08) !important;
    border-color: var(--habitat-celeste) !important;
    color: var(--habitat-azul) !important;
}

.habitat-btn-icon-primary {
    background: var(--habitat-azul) !important;
    border-color: var(--habitat-azul) !important;
    color: var(--habitat-blanco) !important;
}

.habitat-btn-icon-success {
    background: var(--habitat-verde) !important;
    border-color: var(--habitat-verde) !important;
    color: var(--habitat-negro) !important;
}

.habitat-btn-icon-warning {
    background: rgba(var(--habitat-naranja-rgb), .12) !important;
    border-color: rgba(var(--habitat-naranja-rgb), .30) !important;
    color: var(--habitat-naranja) !important;
}

.habitat-btn-icon-danger {
    background: rgba(var(--habitat-danger-rgb), .12) !important;
    border-color: rgba(var(--habitat-danger-rgb), .30) !important;
    color: var(--habitat-danger) !important;
}

.habitat-btn-icon-danger-full {
    background: var(--habitat-danger) !important;
    border-color: rgba(var(--habitat-danger-rgb), .30) !important;
    color: var(--habitat-blanco) !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .habitat-page-header,
    .habitat-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .habitat-inline-row {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .habitat-actions {
        justify-content: flex-start;
        margin-top: 14px;
    }

    .habitat-hint {
        text-align: left;
    }

    .habitat-info-grid,
    .habitat-summary-grid {
        grid-template-columns: 1fr;
    }

    .habitat-filter-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .habitat-filter-controls {
        flex-wrap: wrap;
    }

    .habitat-filter-item,
    .habitat-filter-item-year {
        flex: 1;
        width: auto;
        min-width: 120px;
    }

    .habitat-filter-btn {
        width: 100%;
        margin-top: 4px;
    }

    .habitat-modal .modal-dialog {
        margin: 10px;
    }

    .habitat-modal-footer {
        flex-direction: column-reverse;
    }

    .habitat-modal-footer .habitat-btn {
        width: 100%;
    }
}

/*==================================================
    HABITAT LOADING MODAL
==================================================*/

.habitat-loading-modal .modal-dialog {

    width: 340px;
    margin: 120px auto;

}

.habitat-loading-card {

    background: var(--habitat-blanco);

    border: 1px solid var(--habitat-borde);

    border-radius: 8px;

    padding: 28px 24px;

    text-align: center;

    box-shadow: 0 18px 45px rgba(var(--habitat-negro-rgb), .18);

}

.habitat-loading-icon {

    display: flex;
    justify-content: center;

    margin-bottom: 18px;

}

.habitat-loading-icon i {

    width: 74px;
    height: 74px;

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

    background: var(--habitat-verde);

    border-radius: 12px;

    color: var(--habitat-azul);

    font-size: 42px;

    box-shadow: var(--habitat-shadow-loader);

    animation: habitatLoading .9s ease-in-out infinite;

}

.habitat-loading-title {

    font-size: 18px;
    font-weight: 700;

    color: var(--habitat-azul);

}

.habitat-loading-text {

    margin-top: 8px;

    font-size: 13px;

    color: var(--habitat-muted);

    line-height: 1.5;

}

/*==================================================
    HABITAT WORKSPACE / CARRITO
==================================================*/

.habitat-requisition-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.habitat-requisition-main {
    min-width: 0;
}

.habitat-requisition-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.habitat-side-panel {
    margin-bottom: 0;
}

.habitat-project-strip {
    margin-bottom: 14px;
}

.habitat-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.habitat-cart-table td {
    padding: 0 0 10px;
    border: 0;
}

.habitat-cart-table tr:last-child td {
    padding-bottom: 0;
}


.habitat-cart-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-cart-product {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.habitat-cart-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--habitat-radius);
    background: rgba(var(--habitat-celeste-rgb), .10);
    color: var(--habitat-azul);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}

.habitat-cart-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--habitat-texto);
    line-height: 1.3;
}

.habitat-cart-meta {
    margin-top: 3px;
    font-size: 11px;
    color: var(--habitat-muted);
}

.habitat-cart-total {
    min-width: 125px;
    text-align: right;
}

.habitat-cart-total span,
.habitat-cart-breakdown span,
.habitat-total-row span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.habitat-cart-total strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    color: var(--habitat-azul);
}

.habitat-cart-controls {
    display: grid;
    grid-template-columns: 90px 95px minmax(130px, 1fr) minmax(120px, 1fr) minmax(150px, 1.2fr);
    gap: 8px;
    align-items: end;
    min-width: 0;
}

.habitat-cart-field {
    min-width: 0;
}

.habitat-cart-field .select2-container {
    width: 100% !important;
    min-width: 0 !important;
}

.habitat-cart-field .select2-selection__rendered {
    max-width: 100%;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding-right: 24px !important;
}

.habitat-cart-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.habitat-cart-field .habitat-input,
.habitat-cart-field .select2-container .select2-selection--single {
    height: 36px !important;
}

.habitat-cart-field .select2-container .select2-selection__rendered {
    line-height: 34px !important;
}

.habitat-cart-field .select2-container .select2-selection__arrow {
    height: 34px !important;
}

.habitat-cart-item {
    position: relative;
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    padding: 12px 42px 12px 12px;
    border: 1px solid var(--habitat-borde);
    box-shadow:
        0 1px 2px rgba(var(--habitat-negro-rgb), .04),
        0 8px 20px rgba(var(--habitat-negro-rgb), .03);
}

.habitat-cart-item:hover {

    border-color: rgba(var(--habitat-celeste-rgb), .35);

    box-shadow:
        0 8px 24px rgba(var(--habitat-negro-rgb), .08);

}

.habitat-cart-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.habitat-cart-breakdown {
    display: flex;
    gap: 8px;
}

.habitat-cart-breakdown div {
    min-width: 110px;
    padding: 8px 10px;
    border-radius: var(--habitat-radius);
    background: var(--habitat-soft);
    border: 1px solid var(--habitat-borde-soft);
}

.habitat-cart-breakdown strong {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--habitat-texto);
}

.habitat-total-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.habitat-total-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-total-row:last-child {
    border-bottom: 0;
}

.habitat-total-row strong {
    font-size: 13px;
    color: var(--habitat-texto);
    text-align: right;
}

.habitat-total-row-main {
    margin: 4px 0;
    padding: 12px;
    border: 1px solid rgba(var(--habitat-celeste-rgb), .25);
    border-radius: var(--habitat-radius);
    background: rgba(var(--habitat-celeste-rgb), .08);
}

.habitat-total-row-main strong {
    font-size: 17px;
    color: var(--habitat-azul);
}

.habitat-save-panel {
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius);
    padding: 12px;
    box-shadow: var(--habitat-shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.habitat-save-panel .habitat-btn {
    width: 100%;
}

.habitat-savebar-text {
    font-size: 12px;
    color: var(--habitat-muted);
    text-align: center;
}

.habitat-history-card {
    opacity: .95;
}

.habitat-history-list {
    /*max-height: 260px;*/
    overflow-y: auto;
}

.habitat-history-item {
    padding: 9px 0;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-history-item:last-child {
    border-bottom: 0;
}

.habitat-history-state {
    font-size: 11px;
    color: var(--habitat-texto);
}

.habitat-history-state i {
    margin: 0 5px;
    color: var(--habitat-celeste);
}

.habitat-history-text {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--habitat-muted-dark);
}

.habitat-history-meta {
    margin-top: 4px;
    font-size: 10px;
    color: var(--habitat-muted);
}

@media (max-width: 1100px) {
    .habitat-requisition-layout {
        grid-template-columns: 1fr;
    }

    .habitat-requisition-side {
        order: -1;
    }

    .habitat-cart-controls {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .habitat-cart-item-head,
    .habitat-cart-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .habitat-cart-total {
        text-align: left;
    }

    .habitat-cart-controls {
        grid-template-columns: 1fr;
    }

    .habitat-cart-breakdown {
        flex-direction: column;
    }
}

.habitat-cart-close {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;

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

    border: 1px solid rgba(var(--habitat-danger-rgb), .25) !important;
    border-radius: var(--habitat-radius) !important;

    background: rgba(var(--habitat-danger-rgb), .08) !important;
    color: var(--habitat-danger) !important;

    font-size: 11px !important;
    box-shadow: none !important;
}

.habitat-cart-close:hover {
    background: var(--habitat-danger) !important;
    border-color: var(--habitat-danger) !important;
    color: var(--habitat-blanco) !important;
}

.habitat-cart-bottom-compact {
    border-top: 1px solid var(--habitat-borde-soft);
    padding-top: 10px;
}

.habitat-cart-note {
    flex: 1;
}

.habitat-cart-note label {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.habitat-cart-note .habitat-input {
    height: 34px;
    font-size: 12px;
}

/*=========================================
INPUTS PEQUEÑOS
=========================================*/

.habitat-input-sm {
    height: 30px;
    padding: 4px 10px;
    font-size: 12px;
}

.habitat-input-xs {
    height: 26px;
    padding: 2px 8px;
    font-size: 11px;
}

.habitat-select-sm+.select2-container .select2-selection--single {
    height: 30px !important;
}

.habitat-select-sm+.select2-container .select2-selection__rendered {
    line-height: 28px !important;
    font-size: 12px !important;
}

.habitat-select-sm+.select2-container .select2-selection__arrow {
    height: 28px !important;
}

/*=========================================
SUMARIO FLOTANTE
=========================================*/

.habitat-fixed-summary {
    position: fixed !important;
    left: 260px !important;
    right: 24px !important;
    bottom: 7px !important;
    z-index: 1030 !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;

    padding: 10px 12px !important;
    background: rgba(var(--habitat-blanco-rgb), .94) !important;
    border: 1px solid var(--habitat-borde) !important;
    border-radius: var(--habitat-radius-md) !important;
    box-shadow: 0 10px 30px rgba(var(--habitat-negro-rgb), .12) !important;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .25s;
}

body.modal-open .habitat-fixed-summary {
    display: none !important;
}

.habitat-fixed-summary.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.habitat-fixed-summary-item {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;

    padding: 7px 10px !important;
    background: var(--habitat-soft) !important;
    border: 1px solid var(--habitat-borde-soft) !important;
    border-radius: var(--habitat-radius) !important;
}

.habitat-fixed-summary-item span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
}

.habitat-fixed-summary-item strong {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--habitat-texto);
    white-space: nowrap;
}

.habitat-fixed-summary-item.is-total {
    background: rgba(var(--habitat-celeste-rgb), .10) !important;
    border-color: rgba(var(--habitat-celeste-rgb), .25) !important;
}

.habitat-fixed-summary-item.is-total strong {
    color: var(--habitat-azul);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .habitat-fixed-summary {
        left: 12px !important;
        right: 12px !important;
        justify-content: flex-start !important;
        overflow-x: auto;
    }
}


.habitat-fixed-left {
    flex: 1;
    min-width: 220px;

    display: flex;
    align-items: center;
    gap: 10px;
}

.habitat-fixed-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

/*=========================================
ESTADO AJUSTE
=========================================*/

.habitat-status-ok {

    border-color: rgba(var(--habitat-verde-rgb), .35) !important;


    margin: 4px 0;
    padding: 12px;
    border: 1px solid rgba(var(--habitat-verde-rgb), .25);
    border-radius: var(--habitat-radius);
    background: rgba(var(--habitat-verde-rgb), .12) !important;


}

.habitat-status-ok strong {
    color: var(--habitat-verde-texto) !important;
}

.habitat-status-danger {
    background: rgba(var(--habitat-naranja-rgb), .12) !important;
    border-color: rgba(var(--habitat-naranja-rgb), .35) !important;
    margin: 4px 0;
    padding: 12px;

}

.habitat-status-danger strong {
    color: var(--habitat-naranja) !important;
}



/* MATERIALES TABS*/
.catalogo-panel {
    display: none;
}

.catalogo-panel.active {
    display: block;
}

.feic-menu-item {
    width: 100%;
    height: 42px;
    margin-bottom: 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    color: var(--habitat-texto);
    font-weight: 700;
}

.feic-menu-item.active {
    background: var(--habitat-azul);
    border-color: var(--habitat-azul);
    color: var(--habitat-blanco);
}

.feic-menu-item strong {
    margin-left: auto;
}

.catalogo-panel {
    display: none;
}

.catalogo-panel.active {
    display: block;
}


.input-uppercase {
    text-transform: uppercase;
}

/*=========================================
RECETAS CONSTRUCTIVAS
=========================================*/

.habitat-recipes-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.habitat-recipes-side,
.habitat-recipes-main {
    min-width: 0;
}

.recetas-bank-list {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.recetas-bank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius);
    cursor: grab;
}

.recetas-bank-item:hover {
    border-color: var(--habitat-celeste);
    background: rgba(var(--habitat-celeste-rgb), .06);
}

.recetas-drag-icon,
.recetas-handle {
    width: 28px;
    height: 28px;
    border-radius: var(--habitat-radius);
    background: rgba(var(--habitat-celeste-rgb), .10);
    color: var(--habitat-azul);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    flex: 0 0 28px;
}

.recetas-bank-name,
.recetas-item-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.recetas-bank-meta,
.recetas-item-meta {
    margin-top: 2px;
    font-size: 10px;
    color: var(--habitat-muted);
}

.recetas-unit-badge {
    margin-left: auto;
    padding: 4px 7px;
    border-radius: var(--habitat-radius);
    background: var(--habitat-soft-2);
    border: 1px solid var(--habitat-borde);
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted-dark);
}

.recetas-fase {
    margin-bottom: 10px;
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius-md);
    overflow: hidden;
}

.recetas-fase-header {
    padding: 12px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 28px;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    background: var(--habitat-soft);
}

.recetas-fase-num {
    width: 30px;
    height: 30px;
    border-radius: var(--habitat-radius);
    background: var(--habitat-azul);
    color: var(--habitat-blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.recetas-fase-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.recetas-fase-desc {
    font-size: 11px;
    color: var(--habitat-muted);
}

.recetas-fase-count {
    padding: 5px 9px;
    border-radius: var(--habitat-radius);
    background: rgba(var(--habitat-celeste-rgb), .10);
    color: var(--habitat-azul);
    font-size: 11px;
    font-weight: 800;
}

.recetas-fase-toggle {
    border: 0;
    background: transparent;
    color: var(--habitat-muted);
}

.recetas-fase-body {
    display: none;
    padding: 12px;
}

.recetas-fase.open .recetas-fase-body {
    display: block;
}

.recetas-items-head,
.recetas-item {
    display: grid;
    grid-template-columns: 32px minmax(180px, 1fr) 80px 120px minmax(160px, 1fr) 34px;
    gap: 8px;
    align-items: center;
}

.recetas-items-head {
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
}

.recetas-dropzone {
    min-height: 58px;
    border-radius: var(--habitat-radius);
}

.recetas-empty {
    padding: 14px;
    text-align: center;
    border: 1px dashed var(--habitat-borde-input);
    border-radius: var(--habitat-radius);
    color: var(--habitat-muted);
    font-size: 12px;
}

.recetas-item {
    padding: 8px;
    margin-bottom: 7px;
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
}

.recetas-item:hover {
    border-color: rgba(var(--habitat-celeste-rgb), .35);
}

.recetas-input-sm {
    height: 30px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: var(--habitat-radius) !important;
    border: 1px solid var(--habitat-borde-input) !important;
}

.recetas-remove {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(var(--habitat-danger-rgb), .25);
    border-radius: var(--habitat-radius);
    background: rgba(var(--habitat-danger-rgb), .08);
    color: var(--habitat-danger);
}

.recetas-remove:hover {
    background: var(--habitat-danger);
    color: var(--habitat-blanco);
}

@media (max-width: 1100px) {
    .habitat-recipes-layout {
        grid-template-columns: 1fr;
    }

    .recetas-items-head,
    .recetas-item {
        grid-template-columns: 32px minmax(150px, 1fr) 70px 100px;
    }

    .recetas-observacion,
    .recetas-items-head div:nth-child(5) {
        grid-column: 2 / -1;
    }
}

/*=========================================
VALIDACIONES SIMPLES
=========================================*/

.habitat-validation-list {
    margin-top: 14px;
}

.habitat-validation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--habitat-muted-dark);
}

.habitat-validation-item:last-child {
    margin-bottom: 0;
}

.habitat-validation-item i {
    width: 16px;
    flex: 0 0 16px;
    text-align: center;
    font-size: 14px;
}

.habitat-validation-item.is-info,
.habitat-validation-item.is-info i {
    color: var(--habitat-azul);
}

.habitat-validation-item.is-success,
.habitat-validation-item.is-success i {
    color: var(--habitat-verde-texto);
}

.habitat-validation-item.is-error,
.habitat-validation-item.is-error i {
    color: var(--habitat-danger);
}

.habitat-validation-icon {
    display: block;
    margin: 0 auto 12px;
    text-align: center;
    font-size: 48px;
}

.habitat-validation-icon.is-info {
    color: var(--habitat-azul);
}

.habitat-validation-icon.is-success {
    color: var(--habitat-verde-texto);
}

.habitat-validation-icon.is-error {
    color: var(--habitat-danger);
}

.habitat-validation-message {
    display: none;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.habitat-validation-message.is-info {
    color: var(--habitat-azul);
}

.habitat-validation-message.is-success {
    color: var(--habitat-verde-texto);
}

.habitat-validation-message.is-error {
    color: var(--habitat-danger);
}

/*=========================================
VALES DE MATERIALES
=========================================*/

.habitat-vales-page {
    padding-bottom: 20px;
}

.habitat-vales-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.habitat-vales-summary .habitat-summary-item {
    min-width: 0;
}

.habitat-vales-summary .habitat-summary-item strong {
    font-size: 15px;
    color: var(--habitat-azul);
}

.habitat-vales-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 60px;
}

.habitat-vales-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--habitat-borde-soft);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.habitat-vales-footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--habitat-muted);
}

.habitat-vales-footer-status i {
    color: var(--habitat-celeste);
}

.habitat-vales-footer .habitat-actions {
    margin-top: 0;
}

.material-pendiente-vista {
    font-weight: 800;
    color: var(--habitat-azul);
}

@media (max-width: 1100px) {
    .habitat-vales-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .habitat-vales-summary {
        grid-template-columns: 1fr 1fr;
    }

    .habitat-vales-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .habitat-vales-footer-actions {
        justify-content: stretch;
    }

    .habitat-vales-footer-actions .habitat-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .habitat-vales-summary {
        grid-template-columns: 1fr;
    }
}


/*==================================================
    ADMINISTRACIÓN Y SEGUIMIENTO DE VALES
==================================================*/

.habitat-vales-management-layout {
    margin-top: 14px;
}

.habitat-vales-management-layout>[class*="col-"] {
    min-width: 0;
}

/* PROVEEDOR */

.habitat-proveedor-vales {
    padding: 14px;
    margin-bottom: 14px;
}

.habitat-proveedor-vales>.habitat-card-header {
    align-items: center;
    margin-bottom: 10px;
}

.habitat-proveedor-vales .habitat-card-title {
    color: var(--habitat-texto);
    font-size: 14px;
}

.habitat-proveedor-vales .habitat-card-title i {
    margin-right: 6px;
    color: var(--habitat-celeste);
}

.habitat-vales-provider-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* CARD DE CADA VALE */

.habitat-vale-management-card {
    padding: 12px;
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius);
    box-shadow: 0 2px 7px rgba(var(--habitat-negro-rgb), .035);
}

.habitat-vale-management-card:hover {
    border-color: rgba(var(--habitat-celeste-rgb), .38);
}

.habitat-vale-management-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-vale-management-main {
    min-width: 0;
}

.habitat-vale-management-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.habitat-vale-management-title i {
    color: var(--habitat-azul);
}

.habitat-vale-management-subtitle {
    margin-top: 3px;
    font-size: 11px;
    color: var(--habitat-muted);
}

.habitat-vale-management-status {
    flex: 0 0 auto;
}

/* RESUMEN INTERNO DEL VALE */

.habitat-vale-management-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.habitat-vale-management-summary-item {
    min-width: 0;
    padding: 8px 10px;
    background: var(--habitat-soft);
    border: 1px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
}

.habitat-vale-management-summary-item span {
    display: block;
    margin-bottom: 3px;
    font-size: 9px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .35px;
}

.habitat-vale-management-summary-item strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.habitat-vale-management-summary-item.is-total {
    background: rgba(var(--habitat-celeste-rgb), .07);
    border-color: rgba(var(--habitat-celeste-rgb), .22);
}

.habitat-vale-management-summary-item.is-total strong {
    color: var(--habitat-azul);
    font-size: 13px;
}

/* ACCIONES */

.habitat-vale-management-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--habitat-borde-soft);
}

.habitat-vale-management-actions .habitat-btn {
    height: 34px !important;
    padding: 0 11px !important;
    font-size: 11px !important;
}

/* DETALLE EXPANDIBLE */

.habitat-vale-detail-list {
    margin-top: 10px;
    padding: 10px;
    background: var(--habitat-soft);
    border: 1px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
}

.habitat-vale-detail-title {
    padding-bottom: 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--habitat-borde);
    font-size: 11px;
    font-weight: 800;
    color: var(--habitat-texto);
    text-transform: uppercase;
    letter-spacing: .35px;
}

.habitat-vale-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-vale-detail-item:last-child {
    border-bottom: 0;
}

.habitat-vale-detail-info {
    flex: 1 1 auto;
    min-width: 0;
}

.habitat-vale-detail-name {
    font-size: 12px;
    font-weight: 600;
    margin-left: 30px;
    color: var(--habitat-texto);
}

.habitat-vale-detail-meta {
    margin-top: 2px;
    font-size: 10px;
    color: var(--habitat-muted);
    margin-left: 34px;
}

.habitat-vale-detail-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(82px, auto));
    gap: 10px;
    flex: 0 0 auto;
}

.habitat-vale-detail-value {
    min-width: 82px;
    text-align: right;
}

.habitat-vale-detail-value span {
    display: block;
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
}

.habitat-vale-detail-value strong {
    display: block;
    font-size: 11px;
    color: var(--habitat-texto);
}

.habitat-vale-detail-value.is-total strong {
    color: var(--habitat-azul);
}

/*==================================================
    PANEL LATERAL
==================================================*/

.habitat-management-side-summary {
    display: flex;
    flex-direction: column;
}

.habitat-management-side-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-management-side-item:last-child {
    border-bottom: 0;
}

.habitat-management-side-item span {
    font-size: 11px;
    color: var(--habitat-muted);
}

.habitat-management-side-item strong {
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-texto);
    text-align: right;
}

.habitat-management-side-item.is-total {
    margin-top: 8px;
    padding: 10px;
    background: rgba(var(--habitat-celeste-rgb), .07);
    border: 1px solid rgba(var(--habitat-celeste-rgb), .22);
    border-radius: var(--habitat-radius);
}

.habitat-management-side-item.is-total strong {
    font-size: 14px;
    color: var(--habitat-azul);
}

/*==================================================
    BITÁCORA LATERAL
==================================================*/

.habitat-vales-management-layout .habitat-history-card {
    margin-top: 14px;
    opacity: 1;
}

.habitat-vales-management-layout .habitat-history-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.habitat-vales-management-layout .habitat-history-item {
    padding: 9px 0;
    margin: 0;
    border-left: 0;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-vales-management-layout .habitat-history-item::before {
    display: none;
}

.habitat-vales-management-layout .habitat-history-state {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
    color: var(--habitat-texto);
}

.habitat-vales-management-layout .habitat-history-state strong {
    font-weight: 800;
}

.habitat-vales-management-layout .habitat-history-state i {
    margin: 0 3px;
    color: var(--habitat-celeste);
}

.habitat-vales-management-layout .habitat-history-text {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--habitat-muted-dark);
}

.habitat-vales-management-layout .habitat-history-meta {
    margin-top: 4px;
    font-size: 9px;
    color: var(--habitat-muted);
}

.habitat-history-empty {
    padding: 22px 12px;
    text-align: center;
    font-size: 11px;
    color: var(--habitat-muted);
}

/*==================================================
    ESTADOS
==================================================*/

.habitat-pill-success {
    background: rgba(var(--habitat-verde-rgb), .18);
    border-color: rgba(var(--habitat-verde-rgb), .40);
    color: var(--habitat-negro);
}

.habitat-pill-warning {
    background: rgba(var(--habitat-naranja-rgb), .10);
    border-color: rgba(var(--habitat-naranja-rgb), .25);
    color: var(--habitat-naranja);
}

/*==================================================
    RESPONSIVE
==================================================*/

@media (max-width: 1100px) {

    .habitat-vales-management-layout .col-md-8,
    .habitat-vales-management-layout .col-md-4 {
        width: 100%;
    }

    .habitat-vales-management-layout .habitat-history-card {
        margin-top: 14px;
    }
}

@media (max-width: 768px) {

    .habitat-vale-management-header,
    .habitat-vale-detail-item {
        flex-direction: column;
        align-items: stretch;
    }

    .habitat-vale-management-summary {
        grid-template-columns: 1fr;
    }

    .habitat-vale-detail-values {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .habitat-vale-detail-value {
        min-width: 0;
        text-align: left;
    }

    .habitat-vale-management-actions {
        align-items: stretch;
    }

    .habitat-vale-management-actions .habitat-btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {

    .habitat-vale-detail-values {
        grid-template-columns: 1fr;
    }
}

.habitat-modal-factura {
    width: 70%;
    max-width: 1450px;
}

/*=========================================
CHECKBOX
=========================================*/

.habitat-checkbox {
    appearance: none;
    -webkit-appearance: none;

    width: 18px;
    height: 18px;

    cursor: pointer;

    border: 2px solid var(--habitat-borde-input);
    border-radius: 5px;
    background: #fff;

    position: relative;

    transition: .18s ease;
}

.habitat-checkbox:hover {
    border-color: var(--habitat-celeste);
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .10);
}

.habitat-checkbox:checked {
    background: var(--habitat-celeste);
    border-color: var(--habitat-celeste);
}

.habitat-checkbox:checked::after {
    content: "";

    position: absolute;

    left: 4px;
    top: 0px;

    width: 5px;
    height: 10px;

    border: solid #fff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}

.habitat-checkbox:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.table-clean td .habitat-checkbox,
.table-compact td .habitat-checkbox {
    display: block;
    margin: auto;
}

#modalFacturaProveedor {
    overflow-y: auto !important;
}

#modalFacturaProveedor .modal-dialog {
    width: 70%;
    max-width: 1450px;
    margin: 20px auto;
}

#modalFacturaProveedor .habitat-modal-body {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

#modalFacturaProveedor .select2-container {
    width: 100% !important;
}

#modalFacturaProveedor .select2-dropdown {
    z-index: 10050 !important;
}

.habitat-btn-group {
    display: flex;
    align-items: center;
    /* justify-content: flex-start;*/
    flex-wrap: wrap;
    gap: 5px;
    width: 100%;
}

.habitat-btn-group .btn,
.habitat-btn-group .habitat-pill {
    flex: 0 0 auto;
}

.habitat-payment-status {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.15;
}

.habitat-payment-status-main {
    display: block;
    white-space: nowrap;
}

.habitat-payment-reference {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 400;
    opacity: .8;
    white-space: nowrap;
}

.habitat-actions-cell {
    text-align: left !important;
    min-width: 190px;
    max-width: 260px;
    white-space: normal !important;
}

.vale-facturado {
    background: #fff9e6 !important;
}

.vale-facturado:hover {
    background: #fff3cc !important;
}

.vale-pagado {
    background: #eefbf3 !important;
}

.vale-pagado:hover {
    background: #dff6e8 !important;
}

.filaValeProveedor.vale-facturado>td {
    background: #fff8dc !important;
}

.filaValeProveedor.vale-pagado>td {
    background: #e8f8ee !important;
}

.filaValeProveedor.vale-facturado>td:first-child {
    border-left: 5px solid #f5b400;
}

.filaValeProveedor.vale-pagado>td:first-child {
    border-left: 5px solid #22a66f;
}

.habitat-filter-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 2px;
    height: 100%;
    padding-top: 24px;
    white-space: nowrap;
}

.habitat-filter-actions .btn {
    margin: 0;
}

.habitat-modal .select2-container {
    width: 100% !important;
}

.habitat-modal .select2-dropdown {
    z-index: 1060 !important;
}

/*==================================================
REQUISICIÓN - WORKSPACE PROFESIONAL
==================================================*/

.habitat-requisition-page {
    padding-bottom: 86px;
}

.req-workspace {
    overflow: hidden;
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius-md);
    box-shadow: var(--habitat-shadow-card);
}

/* CONFIGURACIÓN SUPERIOR */

.req-workspace-config {
    min-height: 94px;
    padding: 14px 16px;
    display: flex;
    align-items: stretch;
    gap: 16px;
    background: var(--habitat-soft);
    border-bottom: 1px solid var(--habitat-borde);
}

.req-config-block {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.req-config-label,
.req-config-block label {
    display: block;
    margin: 0 0 5px;
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .45px;
}

.req-config-budget {
    flex: 0 0 185px;
}

.req-config-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--habitat-naranja);
    white-space: nowrap;
}

.req-config-divider {
    width: 1px;
    flex: 0 0 1px;
    background: var(--habitat-borde);
}

.req-config-percent {
    flex: 0 0 135px;
}

.req-percent-control {
    position: relative;
}

.req-percent-control input {
    width: 100%;
    height: 38px;
    padding: 0 34px 0 10px;
    border: 1px solid var(--habitat-borde-input);
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    box-shadow: none;
}

.req-percent-control input:focus {
    outline: none;
    border-color: var(--habitat-celeste);
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .12);
}

.req-percent-control span {
    position: absolute;
    right: 11px;
    top: 9px;
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-muted);
}

.req-config-observation {
    flex: 1 1 auto;
}

.req-config-observation textarea {
    width: 100%;
    height: 56px;
    min-height: 56px;
    max-height: 90px;
    padding: 8px 10px;
    border: 1px solid var(--habitat-borde-input);
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    font-size: 11px;
    line-height: 1.4;
    resize: vertical;
    box-shadow: none;
}

.req-config-observation textarea:focus {
    outline: none;
    border-color: var(--habitat-celeste);
    box-shadow: 0 0 0 3px rgba(var(--habitat-celeste-rgb), .12);
}

.req-config-status {
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
}

.req-config-status .habitat-btn {
    width: 100%;
    height: 36px !important;
}

.req-change-status {
    display: block;
    min-height: 18px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    color: var(--habitat-muted);
}

.req-change-status.pending {
    color: var(--habitat-naranja);
}

.req-change-status.saved {
    color: var(--habitat-success);
}

/* ENCABEZADO DE MATERIALES */

.req-materials-section {
    background: var(--habitat-blanco);
}

.req-materials-heading {
    min-height: 66px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.req-section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.req-section-description {
    margin-top: 2px;
    font-size: 12px;
    color: var(--habitat-muted);
}

.req-materials-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.req-search-box {
    position: relative;
    width: 245px;
}

.req-search-box i {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    font-size: 11px;
    color: var(--habitat-muted);
}

.req-search-box input {
    width: 100%;
    height: 34px;
    padding: 0 10px 0 30px;
    border: 1px solid var(--habitat-borde-input);
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    font-size: 11px;
    box-shadow: none;
}

.req-search-box input:focus {
    outline: none;
    border-color: var(--habitat-celeste);
}

/* BARRA MASIVA */

.req-bulk-toolbar {
    padding: 11px 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    background: rgba(var(--habitat-celeste-rgb), .045);
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.req-bulk-summary {
    flex: 0 0 210px;
    min-width: 0;
}

.req-bulk-title {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--habitat-azul);
}

.req-bulk-help {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--habitat-muted);
}

.req-selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 7px;
    border: 1px solid rgba(var(--habitat-celeste-rgb), .22);
    border-radius: var(--habitat-radius);
    background: var(--habitat-blanco);
    font-size: 12px;
    color: var(--habitat-muted-dark);
}

.req-selected-badge strong {
    font-size: 12px;
    color: var(--habitat-azul);
}

.req-bulk-actions {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 14px;
}

.req-bulk-group {
    flex: 1 1 auto;
    min-width: 280px;
    max-width: 440px;
}

.req-bulk-group-brand {
    min-width: 210px;
    max-width: 330px;
}

.req-bulk-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.req-bulk-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 6px;
}

.req-bulk-control .habitat-btn {
    width: 100%;
    height: 34px !important;
    padding: 0 9px !important;
}

.req-bulk-separator {
    width: 1px;
    height: 36px;
    margin-bottom: 1px;
    background: var(--habitat-borde);
}

.req-bulk-toolbar .select2-container {
    width: 100% !important;
}

.req-bulk-toolbar .select2-selection--single {
    height: 34px !important;
    border: 1px solid var(--habitat-borde-input) !important;
    border-radius: var(--habitat-radius) !important;
}

.req-bulk-toolbar .select2-selection__rendered {
    line-height: 32px !important;
    padding-left: 9px !important;
    padding-right: 24px !important;
    font-size: 10px !important;
}

.req-bulk-toolbar .select2-selection__arrow {
    height: 32px !important;
}

/* TABLA */

.req-table-shell {
    width: 100%;
    overflow: visible;
}

.req-material-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--habitat-blanco);
}

.req-material-table thead th {
    padding: 9px 10px;
    background: var(--habitat-verde);
    border: 0;
    font-size: 9px;
    font-weight: 800;
    color: var(--habitat-negro);
    text-transform: uppercase;
    letter-spacing: .4px;
    text-align: left;
}

.req-material-table tbody td {
    padding: 10px;
    vertical-align: top;
    border: 0;
    border-bottom: 1px solid var(--habitat-borde-soft);
    background: var(--habitat-blanco);
}

.req-material-table tbody tr:nth-child(even) td {
    background: var(--habitat-table-even);
}

.req-material-table tbody tr:hover td {
    background: rgba(var(--habitat-celeste-rgb), .045);
}

.req-material-table tbody tr.req-row-selected td {
    background: rgba(var(--habitat-verde-rgb), .11) !important;
}

.req-material-table tbody tr.req-row-changed td {
    border-bottom-color: rgba(var(--habitat-celeste-rgb), .28);
}

.req-table-check {
    width: 38px;
    text-align: center !important;
}

/* BITÁCORA */

.req-history-section {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--habitat-blanco);
    border: 1px solid var(--habitat-borde);
    border-radius: var(--habitat-radius-md);
    box-shadow: var(--habitat-shadow-card);
}

.req-history-heading {
    padding-bottom: 10px;
    margin-bottom: 3px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.req-history-list {
    display: flex;
    flex-direction: column;
}

.req-history-entry {
    padding: 10px 2px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.req-history-entry:last-child {
    border-bottom: 0;
}

.req-history-flow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--habitat-muted-dark);
}

.req-history-flow strong {
    color: var(--habitat-texto);
}

.req-history-flow i {
    color: var(--habitat-celeste);
}

.req-history-message {
    margin-top: 4px;
    font-size: 10px;
    color: var(--habitat-muted-dark);
}

.req-history-meta {
    margin-top: 3px;
    font-size: 8px;
    color: var(--habitat-muted);
}

/* RESUMEN FIJO */

.habitat-requisition-page .habitat-fixed-summary {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    left: 260px !important;
    right: 14px !important;
    bottom: 6px !important;
}

.habitat-requisition-page .habitat-fixed-left {
    min-width: 280px;
}

.habitat-requisition-page .habitat-fixed-summary-item {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
}

/* RESPONSIVE */

@media (max-width: 1180px) {
    .req-workspace-config {
        flex-wrap: wrap;
    }

    .req-config-observation {
        flex: 1 1 420px;
    }

    .req-config-status {
        flex: 0 0 180px;
    }

    .req-bulk-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .req-bulk-summary {
        flex: none;
    }

    .req-bulk-actions {
        justify-content: stretch;
    }

    .req-bulk-group {
        max-width: none;
    }

    .req-table-shell {
        overflow-x: auto;
    }

    .req-material-table {
        min-width: 980px;
    }
}

@media (max-width: 768px) {
    .req-workspace-config {
        display: grid;
        grid-template-columns: 1fr;
    }

    .req-config-divider {
        display: none;
    }

    .req-config-budget,
    .req-config-percent,
    .req-config-observation,
    .req-config-status {
        width: 100%;
        flex: none;
    }

    .req-materials-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .req-materials-actions {
        width: 100%;
    }

    .req-search-box {
        flex: 1;
        width: auto;
    }

    .req-bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .req-bulk-separator {
        display: none;
    }

    .req-bulk-group,
    .req-bulk-group-brand {
        width: 100%;
        min-width: 0;
    }

    .habitat-requisition-page .habitat-fixed-summary {
        left: 8px !important;
        right: 8px !important;
        overflow-x: auto;
    }
}


/*LOGIN*/

/*************************************************
 * LOGIN HABITAT – Minimalista, elegante y más cómodo
 *************************************************/
/*LOGIN*/
.auth-fluid {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-height: 100vh;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    background: url(../images/login-bg.jpg) center;
    background-size: cover
}

.auth-fluid .auth-fluid-form-box {
    max-width: 480px;
    border-radius: 0;
    z-index: 2;
    padding: 3rem 2rem;
    background-color: #fff;
    position: relative;
    width: 100%
}

.auth-fluid .auth-fluid-right {
    padding: 6rem 3rem;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    position: relative;
    color: #fff;
    background-color: rgba(0, 0, 0, .5)
}

.auth-fluid .auth-fluid-right {
    padding: 6rem 3rem;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    position: relative;
    color: #fff;
    background-color: rgba(0, 0, 0, .5)
}

@media (max-width: 767.98px) {
    .auth-fluid {
        display: block
    }

    .auth-fluid .auth-fluid-form-box {
        max-width: 100%;
        min-height: 100vh
    }

    .auth-fluid .auth-fluid-right {
        display: none
    }
}

.auth-user-testimonial {
    position: absolute;
    margin: 0 auto;
    padding: 0 2.75rem;
    bottom: 3rem;
    left: 0;
    right: 0
}

.auth-user-testimonial p.lead {
    max-width: 700px
}

/*==================================================
REQUISICIÓN - TABLA TIPO FACTURA
==================================================*/

.req-invoice-table tbody td {
    padding: 7px 8px !important;
    vertical-align: middle !important;
}

.req-invoice-table tbody tr {
    height: 58px;
}

.req-invoice-input {
    width: 100%;
    height: 28px !important;
    padding: 3px 6px !important;
    border: 1px solid var(--habitat-borde-input) !important;
    border-radius: var(--habitat-radius) !important;
    background: var(--habitat-blanco) !important;
    font-size: 12px !important;
    box-shadow: none !important;
}

.req-invoice-input:focus {
    border-color: var(--habitat-celeste) !important;
    box-shadow: 0 0 0 2px rgba(var(--habitat-celeste-rgb), .10) !important;
}

.req-invoice-number {
    text-align: right;
    font-weight: 700;
}


.req-invoice-material-line {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
}

.req-invoice-material-main {
    display: block;
    min-width: 0;
    max-width: 182px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.req-invoice-unit {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    color: var(--habitat-muted);
}

.req-invoice-type {
    flex: 0 0 auto;
    padding-left: 5px;
    border-left: 1px solid var(--habitat-borde);
    font-size: 10px;
    color: var(--habitat-muted);
}

.req-invoice-reference {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    color: var(--habitat-azul);
}

.req-invoice-reference {
    color: var(--habitat-azul);
    font-weight: 700;
}

.req-invoice-material {
    width: 210px;
    min-width: 210px;
    max-width: 210px;
}

.req-invoice-material-line {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
}



.req-invoice-unit,
.req-invoice-type,
.req-invoice-reference {
    flex: 0 0 auto;
    white-space: nowrap;
}

.req-invoice-note {
    display: block;
    width: 78%;
    height: 19px !important;
    margin-top: 3px;
    padding: 0 3px !important;
    /*border: 0 !important;
    border-bottom: 1px dashed var(--habitat-borde-input) !important;*/
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 10px !important;
    line-height: 18px !important;
    color: var(--habitat-muted-dark);
    box-shadow: none !important;
}

.req-invoice-note:focus {
    width: 100%;
    border-bottom-color: var(--habitat-celeste) !important;
    outline: none;
}

.req-invoice-note:focus {
    border-bottom-color: var(--habitat-celeste) !important;
    outline: none;
}

.req-invoice-money {
    position: relative;
}

.req-invoice-money span {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 2;
    font-size: 9px;
    font-weight: 800;
    color: var(--habitat-muted);
}

.req-invoice-money input {
    padding-left: 18px !important;
    text-align: right;
    font-weight: 700;
}

.req-invoice-purchase {
    position: relative;
    padding-left: 10px !important;
}

.req-invoice-purchase:before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 2px;
    background: var(--habitat-celeste);
}

.req-invoice-purchase {
    position: relative;
    min-width: 310px;
    padding-left: 10px !important;
}

.req-invoice-purchase:before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 2px;
    background: var(--habitat-celeste);
}

.req-purchase-line {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.req-provider-field,
.req-brand-field {
    display: block;
    min-width: 0;
}

.req-provider-field {
    flex: 1.5;
}

.req-brand-field {
    flex: 1;
}

.req-provider-field label,
.req-brand-field label {
    display: block;
    margin: 0 0 3px 1px;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.req-provider-field .select2-container,
.req-brand-field .select2-container {
    width: 100% !important;
    min-width: 0;
}

.req-provider-field .select2-selection--single {
    border-color: rgba(var(--habitat-celeste-rgb), .35) !important;
    background: rgba(var(--habitat-celeste-rgb), .035) !important;
}

.req-provider-field .select2-selection__rendered {
    font-weight: 700;
    color: var(--habitat-azul) !important;
}

.req-invoice-purchase .select2-container {
    width: 100% !important;
}

.req-invoice-purchase .select2-selection--single,
.req-invoice-phase .select2-selection--single {
    height: 28px !important;
}

.req-invoice-purchase .select2-selection__rendered,
.req-invoice-phase .select2-selection__rendered {
    line-height: 26px !important;
    padding-left: 6px !important;
    padding-right: 20px !important;
    font-size: 9px !important;
}

.req-invoice-purchase .select2-selection__arrow,
.req-invoice-phase .select2-selection__arrow {
    height: 26px !important;
}

.req-invoice-total {
    text-align: right;
    white-space: nowrap;
}

.req-invoice-total>.total_linea {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--habitat-azul);
}

.req-invoice-total-detail {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--habitat-muted);
}

.req-invoice-total-detail span+span {
    padding-left: 6px;
    border-left: 1px solid var(--habitat-borde);
}

.req-invoice-table .req-table-check {
    width: 34px;
}

.req-invoice-table .req-table-action {
    width: 36px;
    padding-left: 3px !important;
    padding-right: 3px !important;
}

@media(max-width:1180px) {
    .req-invoice-table {
        min-width: 1050px;
    }
}


.req-invoice-total {
    position: relative;
    text-align: right;
    white-space: nowrap;
    padding-right: 18px !important;
}

.req-invoice-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 5;
    width: 19px;
    height: 19px;
    padding: 0 !important;
    border: 2px solid var(--habitat-blanco) !important;
    border-radius: 50% !important;
    background: var(--habitat-rojo) !important;
    color: var(--habitat-blanco) !important;
    font-size: 8px;
    line-height: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .14);
}

.req-invoice-remove:hover {
    background: var(--habitat-rojo-hover) !important;
    color: var(--habitat-blanco) !important;
    transform: scale(1.08);
}

.req-invoice-total {
    position: relative;
    text-align: right;
    white-space: nowrap;
    padding-right: 18px !important;
}

.req-btn-remove {
    position: absolute;
    top: -9px;
    right: 0px;
    z-index: 20;

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

    width: 18px;
    height: 18px;
    padding: 0;

    border: 2px solid #fff;
    border-radius: 50%;

    background: #dc3545;
    color: #fff;

    font-size: 10px;
    line-height: 1;

    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);

    transition: all .15s ease;
}

.req-btn-remove:hover,
.req-btn-remove:focus {
    background: #bd2130;
    color: #fff;
    transform: scale(1.08);
    outline: none;
}

body.modal-open .habitat-fixed-summary {
    display: none !important;
}

.habitat-fixed-summary {
    flex-direction: column !important;
    align-items: stretch !important;
}

.habitat-fixed-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.habitat-fixed-alert {
    width: 100%;
    margin: 0 0 8px 0 !important;
    padding: 7px 10px !important;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
}

.habitat-fixed-left {
    flex: 1;
}

.habitat-fixed-right {
    flex: 0 0 auto;
}

/*==================================================
VALES - CUPÓN COMPACTO MODERNO
==================================================*/

.vale-coupons-container {
    padding: 12px 46px 4px;
}

/*==================================================
VALE COMPLETO
==================================================*/

.vale-coupon {
    position: relative;
    margin: 0 0 40px;
    overflow: visible;

    background: var(--habitat-blanco);

    /* border: 1px solid var(--habitat-borde);*/
    /*  border-left: 4px solid var(--habitat-celeste);*/

    /*    border-radius: 7px;*/

    box-shadow:
        0 2px 6px rgba(var(--habitat-negro-rgb), .04),
        0 7px 16px rgba(var(--habitat-negro-rgb), .025);

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

/* Todo el vale reacciona */
.vale-coupon:hover {
    border-color: rgba(var(--habitat-celeste-rgb), .65);
    border-left-color: var(--habitat-azul);

    background: rgba(var(--habitat-celeste-rgb), .018);

    box-shadow:
        0 5px 15px rgba(var(--habitat-negro-rgb), .07),
        0 12px 24px rgba(var(--habitat-azul-rgb), .04);

    transform: translateY(-1px);
}

/*==================================================
LINEA DE CORTE ENTRE VALES
==================================================*/

.vale-coupon:not(:first-child)::before {
    content: "";

    position: absolute;

    top: -16px;
    left: 46px;
    right: 14px;

    height: 2px;

    background:
        repeating-linear-gradient(to right,
            #9daab4 0,
            #9daab4 12px,
            transparent 12px,
            transparent 21px);

    opacity: .9;
}

/* Tijera */
.vale-coupon:not(:first-child)::after {
    content: "✂";

    position: absolute;

    top: -27px;
    left: 10px;

    width: 30px;
    height: 22px;

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

    background: var(--habitat-fondo);

    color: #74838e;

    font-size: 19px;
    line-height: 1;

    z-index: 5;
}

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

.vale-coupon-head {
    position: relative;

    min-height: 54px;

    padding: 8px 42px 8px 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    /*   background:
        linear-gradient(90deg,
            rgba(var(--habitat-celeste-rgb), .075),
            rgba(var(--habitat-celeste-rgb), .018) 55%,
            transparent);*/
    background: rgba(var(--habitat-celeste-rgb), .075);

    border-bottom: 1px solid var(--habitat-borde-soft);

    border-radius: 6px 6px 0 0;

    transition: background .18s ease;
}

.vale-coupon:hover .vale-coupon-head {
    background:
        linear-gradient(90deg,
            rgba(var(--habitat-celeste-rgb), .12),
            rgba(var(--habitat-celeste-rgb), .035) 58%,
            transparent);
}

.vale-coupon-main {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}

/*==================================================
NUMERO DEL VALE
==================================================*/

.vale-coupon-number {
    flex: 0 0 auto;

    min-width: 90px;

    padding: 6px 9px;

    background: var(--habitat-celeste);

    /* border-radius: 5px;*/

    color: var(--habitat-blanco);

    text-align: left;

    box-shadow:
        0 2px 7px rgba(var(--habitat-azul-rgb), .12);
}

.vale-coupon-number span {
    display: block;

    font-size: 10px;
    line-height: 1;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: .45px;

    opacity: .75;
}

.vale-coupon-number strong {
    display: block;

    margin-top: 3px;

    font-size: 11px;
    line-height: 1.1;

    font-weight: 800;

    white-space: nowrap;
}

/*==================================================
PROVEEDOR
==================================================*/

.vale-coupon-provider {
    min-width: 0;
}

.vale-coupon-provider-label {
    display: block;

    margin-bottom: 2px;

    font-size: 10px;
    line-height: 1;

    font-weight: 700;

    color: var(--habitat-muted);

    text-transform: uppercase;

    letter-spacing: .4px;
}

.vale-proveedor-titulo {
    display: block;

    max-width: 480px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 12px;
    line-height: 1.2;

    font-weight: 800;

    color: var(--habitat-texto);
}

.vale-coupon-provider-meta {
    margin-top: 2px;

    font-size: 10px;
    line-height: 1.2;

    color: var(--habitat-muted);
}

/*==================================================
RESUMEN DEL HEADER
==================================================*/

.vale-coupon-stats {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 5px;

    flex: 0 0 auto;
}

.vale-coupon-stat {
    min-width: 65px;

    padding: 4px 7px;

    background: #f8fafb;

    border: 1px solid var(--habitat-borde-soft);

    border-radius: 5px;

    text-align: right;
}

.vale-coupon-stat span {
    display: block;

    margin-bottom: 1px;

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

    font-weight: 700;

    color: var(--habitat-muted);

    text-transform: uppercase;
}

.vale-coupon-stat strong {
    display: block;

    font-size: 18px;
    line-height: 1.2;

    font-weight: 800;

    color: var(--habitat-texto);
}

.vale-coupon-stat.is-total {
    min-width: 130px;
    background: var(--habitat-azul);
    border-color: var(--habitat-azul);
}

.vale-coupon-stat.is-total span,
.vale-coupon-stat.is-total strong {
    color: #fff !important;
}

.vale-coupon-stat.is-total strong {
    font-size: 18px;
}

/*==================================================
BOTON ELIMINAR
==================================================*/

.vale-coupon-remove {
    top: -8px !important;
    right: -8px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    z-index: 7;
}

/*==================================================
CONTROLES
==================================================*/

.vale-coupon-controls {
    padding: 6px 10px;

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 8px;

    background: #f8fafb;

    border-bottom: 1px solid var(--habitat-borde-soft);

    transition: background .18s ease;
}

.vale-coupon:hover .vale-coupon-controls {
    background: rgba(var(--habitat-celeste-rgb), .025);
}

.vale-coupon-field {
    min-width: 0;
}

.vale-coupon-field label {
    display: block;

    margin: 0 0 3px;

    font-size: 10px;
    line-height: 1;

    font-weight: 700;

    color: var(--habitat-muted);

    text-transform: uppercase;

    letter-spacing: .3px;
}

.vale-coupon-field .form-control {
    width: 100%;

    height: 40px !important;

    padding: 3px 8px !important;

    border: 1px solid var(--habitat-borde-input) !important;

    border-radius: 4px !important;

    background: var(--habitat-blanco) !important;

    color: var(--habitat-texto) !important;

    font-size: 10px !important;

    font-weight: 600;

    box-shadow: none !important;

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

.vale-coupon-field .form-control:hover {
    border-color: #b8c6d0 !important;
}

.vale-coupon-field .form-control:focus {
    border-color: var(--habitat-celeste) !important;

    box-shadow:
        0 0 0 2px rgba(var(--habitat-celeste-rgb), .10) !important;
}

/*==================================================
TABLA
==================================================*/

.vale-coupon-table {
    width: 100%;

    overflow: hidden;

    background: var(--habitat-blanco);
}

.vale-coupon .req-material-table {
    width: 100%;

    margin: 0;
}

.vale-coupon .req-material-table thead th {
    padding: 6px 7px;

    background: rgba(var(--habitat-verde-rgb), .88);

    font-size: 10px;

    font-weight: 700;

    white-space: nowrap;
}

.vale-coupon .req-material-table tbody td {
    padding: 5px 7px !important;

    font-size: 12px;

    transition: background .15s ease;
}

.vale-coupon .req-invoice-table tbody tr {
    height: 42px;
}

.vale-coupon .req-material-table tbody tr:hover td {
    background: rgba(var(--habitat-celeste-rgb), .055);
}

/* Material */

.vale-coupon .req-invoice-material-main {
    max-width: none;

    font-size: 12px;

    font-weight: 700;
}

.vale-coupon .req-invoice-material-line {
    gap: 4px;
}

/* Tipo */

.vale-coupon .req-invoice-type {
    font-size: 10px;

    padding: 2px 5px;
}

/* Subtitulo */

.vale-coupon .table-subtitle {
    display: block;

    margin-top: 4px;

    font-size: 10px;

    color: var(--habitat-muted);
}

/* Inputs de tabla */

.vale-coupon .req-invoice-input,
.vale-coupon .req-invoice-note {
    height: 28px !important;

    padding: 3px 6px !important;

    font-size: 10px !important;
}

.vale-coupon .req-invoice-note {
    width: 100%;

    margin-top: 0;
}

/*==================================================
PIE DEL CUPON
==================================================*/

.vale-coupon-foot {
    min-height: 30px;

    padding: 5px 10px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    background: #f8fafb;

    border-top: 1px dashed #cdd7de;

    border-radius: 0 0 6px 6px;

    transition: background .18s ease;
}

.vale-coupon:hover .vale-coupon-foot {
    background: rgba(var(--habitat-celeste-rgb), .025);
}

.vale-coupon-foot-left {
    display: flex;

    align-items: center;

    gap: 14px;

    min-width: 0;
}

.vale-coupon-foot-item {
    display: flex;

    align-items: center;

    gap: 5px;

    white-space: nowrap;
}

.vale-coupon-foot-item span {
    font-size: 10px;

    color: var(--habitat-muted);
}

.vale-coupon-foot-item strong {
    font-size: 10px;

    font-weight: 700;

    color: var(--habitat-texto);
}

.vale-coupon-foot-total {
    display: flex;

    align-items: center;

    gap: 8px;

    padding-left: 12px;

    border-left: 1px solid var(--habitat-borde);

    white-space: nowrap;
}

.vale-coupon-foot-total span {
    font-size: 10px;

    font-weight: 700;

    color: var(--habitat-muted);

    text-transform: uppercase;
}

.vale-coupon-foot-total strong {
    font-size: 12px;

    font-weight: 800;

    color: var(--habitat-azul);
}

/* Si todavía usas el footer simple anterior */

.vale-coupon-foot>span {
    font-size: 12px;

    color: var(--habitat-muted);
}

.vale-coupon-foot>span strong {
    font-size: 16px;

    color: var(--habitat-azul);
}

/*==================================================
CAMBIOS PENDIENTES
==================================================*/

.vale-coupon.habitat-row-changed {
    border-color: rgba(var(--habitat-naranja-rgb), .40);

    border-left-color: var(--habitat-naranja);
}

.vale-coupon.habitat-row-changed .vale-coupon-head {
    background:
        linear-gradient(90deg,
            rgba(var(--habitat-naranja-rgb), .08),
            rgba(var(--habitat-naranja-rgb), .018) 55%,
            transparent);
}

.vale-coupon.habitat-row-changed:hover {
    border-color: rgba(var(--habitat-naranja-rgb), .60);

    border-left-color: var(--habitat-naranja);
}

/*==================================================
RESPONSIVE
==================================================*/

@media(max-width:1000px) {

    .vale-coupons-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .vale-coupon-controls {
        grid-template-columns: 1fr 1fr;
    }

    .vale-coupon-field:last-child {
        grid-column: 1/-1;
    }

    .vale-coupon-table {
        overflow-x: auto;
    }

    .vale-coupon .req-material-table {
        min-width: 820px;
    }
}

@media(max-width:650px) {

    .vale-coupon-head {
        align-items: flex-start;

        flex-direction: column;
    }

    .vale-coupon-main {
        width: 100%;
    }

    .vale-coupon-stats {
        width: 100%;

        justify-content: flex-start;
    }

    .vale-coupon-controls {
        grid-template-columns: 1fr;
    }

    .vale-coupon-field:last-child {
        grid-column: auto;
    }

    .vale-proveedor-titulo {
        max-width: 280px;
    }
}

/*==================================================
DASHBOARD SUPERIOR - VER VALES
==================================================*/

.vale-project-dashboard {
    margin-bottom: 16px;

    background: var(--habitat-blanco);

    border: 1px solid var(--habitat-borde);
    border-radius: 8px;

    box-shadow:
        0 2px 6px rgba(var(--habitat-negro-rgb), .035),
        0 9px 22px rgba(var(--habitat-negro-rgb), .025);

    overflow: hidden;
}


/*==================================================
PARTE SUPERIOR
==================================================*/

.vale-project-dashboard-main {
    display: grid;

    grid-template-columns:
        minmax(320px, .85fr) minmax(560px, 1.6fr);

    min-height: 108px;
}


/*==================================================
IDENTIDAD DEL PROYECTO
==================================================*/

.vale-project-identity {
    padding: 14px 16px;

    background:
        linear-gradient(135deg,
            rgba(var(--habitat-azul-rgb), .045),
            rgba(var(--habitat-celeste-rgb), .025));

    border-right: 1px solid var(--habitat-borde-soft);
}

.vale-project-identity-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.vale-project-icon {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

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

    border-radius: 7px;

    background: var(--habitat-azul);
    color: #fff;

    font-size: 15px;

    box-shadow:
        0 4px 10px rgba(var(--habitat-azul-rgb), .14);
}

.vale-project-identity-info {
    min-width: 0;
}

.vale-project-eyebrow {
    display: block;

    margin-bottom: 3px;

    font-size: 10px;
    font-weight: 700;

    color: var(--habitat-muted);

    text-transform: uppercase;
    letter-spacing: .4px;
}

.vale-project-name {
    display: block;

    font-size: 13px;
    line-height: 1.25;

    font-weight: 800;

    color: var(--habitat-texto);
}

.vale-project-client {
    display: block;

    margin-top: 2px;

    font-size: 10px;

    color: var(--habitat-muted);
}


/* METADATA */

.vale-project-meta {
    margin-top: 12px;

    display: grid;

    grid-template-columns: 1fr 1fr 1fr;

    gap: 7px;
}

.vale-project-meta-item {
    min-width: 0;

    padding-right: 7px;

    border-right: 1px solid var(--habitat-borde-soft);
}

.vale-project-meta-item:last-child {
    border-right: 0;
}

.vale-project-meta-item span {
    display: block;

    margin-bottom: 2px;

    font-size: 10px;
    font-weight: 600;

    color: var(--habitat-muted);
}

.vale-project-meta-item strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 10px;
    font-weight: 700;

    color: var(--habitat-texto);
}


/*==================================================
FINANZAS
==================================================*/

.vale-project-finance {
    padding: 13px 16px;
}

.vale-project-finance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 10px;
}

.vale-project-finance-head strong {
    display: block;

    font-size: 12px;

    color: var(--habitat-texto);
}

.vale-project-finance-grid {
    display: grid;

    grid-template-columns:
        minmax(115px, 1fr) 18px minmax(115px, 1fr) 18px minmax(135px, 1.1fr) 18px minmax(125px, 1fr);

    align-items: center;

    gap: 4px;
}

.vale-finance-item {
    min-width: 0;

    padding: 8px 9px;

    background: #f8fafb;

    border: 1px solid var(--habitat-borde-soft);

    border-radius: 5px;
}

.vale-finance-item span {
    display: block;

    margin-bottom: 3px;

    font-size: 10px;
    font-weight: 600;

    color: var(--habitat-muted);
}

.vale-finance-item strong {
    display: block;

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

    color: var(--habitat-texto);

    white-space: nowrap;
}

.vale-finance-item.is-available {
    background: var(--habitat-azul);

    border-color: var(--habitat-azul);
}

.vale-finance-item.is-available span {
    color: rgba(255, 255, 255, .72);
}

.vale-finance-item.is-available strong {
    color: #fff;
}

.vale-finance-arrow {
    text-align: center;

    color: #a8b4bc;

    font-size: 11px;
}


/*==================================================
PROCESO GENERAL
==================================================*/

.vale-project-process {
    display: grid;

    grid-template-columns:
        minmax(245px, .8fr) minmax(650px, 2fr);

    border-top: 1px solid var(--habitat-borde-soft);

    background: #fafcfd;
}


/*==================================================
DATASCOPE
==================================================*/

.vale-project-datascope {
    min-height: 62px;

    padding: 9px 14px;

    display: grid;

    grid-template-columns: 32px 1fr;

    align-items: center;

    column-gap: 9px;

    border-right: 1px solid var(--habitat-borde-soft);

    background:
        linear-gradient(90deg,
            rgba(var(--habitat-celeste-rgb), .055),
            rgba(var(--habitat-celeste-rgb), .015));
}

.vale-project-datascope-icon {
    width: 30px;
    height: 30px;

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

    border-radius: 50%;

    background: rgba(var(--habitat-celeste-rgb), .13);

    color: var(--habitat-azul);

    font-size: 13px;
}

.vale-project-datascope-info span {
    display: block;

    font-size: 10px;

    color: var(--habitat-muted);
}

.vale-project-datascope-info strong {
    display: block;

    margin-top: 1px;

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

    color: var(--habitat-azul);
}

.vale-project-datascope-state {
    grid-column: 1/-1;

    margin-top: 5px;

    display: flex;
    align-items: center;

    gap: 6px;

    font-size: 10px;

    color: var(--habitat-muted);
}

.vale-project-datascope-state .fa-spinner {
    color: var(--habitat-celeste);
}


/*==================================================
FLUJO
==================================================*/

.vale-process-flow {
    min-height: 62px;

    padding: 8px 12px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.vale-process-step {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 6px;

    flex: 0 1 auto;
}

.vale-process-count {
    width: 27px;
    height: 27px;

    flex: 0 0 27px;

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

    border-radius: 50%;

    background: #fff;

    border: 1px solid #d9e2e7;

    color: var(--habitat-texto);

    font-size: 11px;
    font-weight: 800;
}

.vale-process-step strong {
    display: block;

    font-size: 10px;
    line-height: 1.1;

    color: var(--habitat-texto);
}

.vale-process-step div>span {
    display: block;

    margin-top: 1px;

    font-size: 10px;
    line-height: 1.1;

    color: var(--habitat-muted);

    white-space: nowrap;
}

.vale-process-step.is-complete .vale-process-count {
    background: var(--habitat-azul);

    border-color: var(--habitat-azul);

    color: #fff;
}

.vale-process-step.is-complete strong {
    color: var(--habitat-azul);
}

.vale-process-line {
    height: 1px;

    min-width: 15px;

    flex: 1 1 28px;

    margin: 0 5px;

    background: #dce4e9;
}


/*==================================================
HOVER MUY SUAVE
==================================================*/

.vale-finance-item,
.vale-project-meta-item,
.vale-process-count {
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.vale-finance-item:not(.is-available):hover {
    border-color: rgba(var(--habitat-celeste-rgb), .30);

    box-shadow:
        0 3px 8px rgba(var(--habitat-negro-rgb), .035);

    transform: translateY(-1px);
}


/*==================================================
RESPONSIVE
==================================================*/

@media(max-width:1100px) {

    .vale-project-dashboard-main {
        grid-template-columns: 1fr;
    }

    .vale-project-identity {
        border-right: 0;

        border-bottom: 1px solid var(--habitat-borde-soft);
    }

    .vale-project-process {
        grid-template-columns: 1fr;
    }

    .vale-project-datascope {
        border-right: 0;

        border-bottom: 1px solid var(--habitat-borde-soft);
    }
}

@media(max-width:850px) {

    .vale-project-finance-grid {
        grid-template-columns: 1fr 1fr;
    }

    .vale-finance-arrow {
        display: none;
    }

    .vale-process-flow {
        overflow-x: auto;

        justify-content: flex-start;
    }

    .vale-process-step {
        flex: 0 0 auto;
    }

    .vale-process-line {
        flex: 0 0 22px;
    }
}

@media(max-width:600px) {

    .vale-project-meta {
        grid-template-columns: 1fr;
    }

    .vale-project-meta-item {
        padding: 4px 0;

        border-right: 0;

        border-bottom: 1px solid var(--habitat-borde-soft);
    }

    .vale-project-meta-item:last-child {
        border-bottom: 0;
    }

    .vale-project-finance-grid {
        grid-template-columns: 1fr;
    }
}

/*==================================================
RESUMEN DE FACTURA
==================================================*/

.factura-resumen-card {
    overflow: hidden;
}

.factura-resumen-body {
    padding: 0 20px 18px;
}

/* MONTO ORIGINAL */

.factura-resumen-principal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 14px;
    border-bottom: 1px solid var(--habitat-borde-soft);
}

.factura-resumen-label {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.factura-resumen-help {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--habitat-muted);
}

.factura-resumen-monto {
    flex: 0 0 auto;
    font-size: 16px;
    font-weight: 800;
    color: var(--habitat-texto);
}

/*==================================================
DEDUCCIONES
==================================================*/

.factura-deducciones {
    margin: 8px 14px 10px 34px;
    border-left: 2px solid rgba(var(--habitat-naranja-rgb), .28);
}

.factura-deducciones-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 7px 12px;
    background: rgba(var(--habitat-naranja-rgb), .035);
}

.factura-deducciones-head span {
    font-size: 15px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.factura-deducciones-head span i {
    margin-right: 5px;
    color: var(--habitat-naranja);
}

.factura-deducciones-head small {
    font-size: 10px;
    color: var(--habitat-muted);
}

/* TABLA DE DEDUCCIONES */

.factura-deducciones-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--habitat-blanco);
}

.factura-deducciones-table td {
    padding: 9px 12px;
    border-bottom: 1px dashed var(--habitat-borde-soft);
    font-size: 13px;
    vertical-align: middle;
}

.factura-deducciones-table tr:last-child td {
    border-bottom: 0;
}

/* TOTAL DEDUCCIONES */

.factura-deducciones-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(var(--habitat-naranja-rgb), .045);
    border-top: 1px solid rgba(var(--habitat-naranja-rgb), .12);
}

.factura-deducciones-total span {
    font-size: 15px;
    font-weight: 800;
    color: var(--habitat-texto);
}

.factura-deducciones-total strong {
    font-size: 18px;
    font-weight: 800;
    color: #c94f00;
}

/*==================================================
NETO A PAGAR
==================================================*/

.factura-neto {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 12px;
    padding: 13px 14px;
    background: rgba(var(--habitat-celeste-rgb), .065);
    border: 1px solid rgba(var(--habitat-celeste-rgb), .18);
    border-left: 4px solid var(--habitat-celeste);
    border-radius: 5px;
}

.factura-neto-info span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-azul);
}

.factura-neto-info small {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--habitat-muted);
}

.factura-neto>strong {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 800;
    color: var(--habitat-azul);
}

/* RESPONSIVE */

@media(max-width:650px) {
    .factura-resumen-body {
        padding: 0 12px 12px;
    }

    .factura-deducciones {
        margin-left: 12px;
    }

    .factura-deducciones-head small {
        display: none;
    }

    .factura-neto {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* =========================================================
   SEMÁFORO DE CRÉDITO - VALE COMPLETO
   ========================================================= */

.vale-coupon.vale-credito-vencido {
    border: 2px solid #d9534f !important;
    border-left: 7px solid #d9534f !important;
    box-shadow: 0 2px 10px rgba(217, 83, 79, .16) !important;
}

.vale-coupon.vale-credito-vencido .vale-coupon-head {
    background: #fff0f0 !important;
}

.vale-coupon.vale-credito-por-vencer {
    border: 2px solid #f0ad4e !important;
    border-left: 7px solid #f0ad4e !important;
    box-shadow: 0 2px 10px rgba(240, 173, 78, .15) !important;
}

.vale-coupon.vale-credito-por-vencer .vale-coupon-head {
    background: #fff9e8 !important;
}

.vale-coupon.vale-credito-vigente {
    border: 2px solid #5cb85c !important;
    border-left: 7px solid #5cb85c !important;
    box-shadow: 0 2px 10px rgba(92, 184, 92, .13) !important;
}

.vale-coupon.vale-credito-vigente .vale-coupon-head {
    background: #f1faf3 !important;
}


/* =========================================================
   BLOQUE CRÉDITO
   ========================================================= */

.vale-coupon-credit {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.vale-coupon-credit span,
.vale-coupon-credit strong,
.vale-coupon-credit small {
    display: block;
    width: 100%;
    text-align: center !important;
}

.vale-coupon-credit strong {
    font-size: 13px;
    line-height: 18px;
    margin: 3px 0;
}

.vale-coupon-credit small {
    font-size: 11px;
    line-height: 15px;
    white-space: nowrap;
}


/* ROJO */

.vale-credito-vencido .vale-coupon-credit {
    background: #d9534f !important;
    border-color: #d9534f !important;
    color: #fff !important;
}


/* AMARILLO */

.vale-credito-por-vencer .vale-coupon-credit {
    background: #f0ad4e !important;
    border-color: #f0ad4e !important;
    color: #fff !important;
}


/* VERDE */

.vale-credito-vigente .vale-coupon-credit {
    background: #5cb85c !important;
    border-color: #5cb85c !important;
    color: #fff !important;
}


/* TEXTO DEL SEMÁFORO */

.vale-credito-vencido .vale-coupon-credit *,
.vale-credito-por-vencer .vale-coupon-credit *,
.vale-credito-vigente .vale-coupon-credit * {
    color: #fff !important;
}


/*==================================================
MASTER VALES - SEMÁFORO DE CRÉDITO
==================================================*/

.fila-master-vale.master-credito-vencido>td,
.fila-master-vale.master-credito-urgente>td {
    background: #fff0f0 !important;
    border-bottom-color: #f0c7c7 !important;
}

.fila-master-vale.master-credito-vencido>td:first-child,
.fila-master-vale.master-credito-urgente>td:first-child {
    border-left: 5px solid #d9534f !important;
}

.fila-master-vale.master-credito-por-vencer>td {
    background: #fff9e8 !important;
    border-bottom-color: #ead9a9 !important;
}

.fila-master-vale.master-credito-por-vencer>td:first-child {
    border-left: 5px solid #f0ad4e !important;
}

.fila-master-vale.master-credito-a-tiempo>td {
    background: #f1faf3 !important;
    border-bottom-color: #cde5d2 !important;
}

.fila-master-vale.master-credito-a-tiempo>td:first-child {
    border-left: 5px solid #5cb85c !important;
}

.fila-master-vale.master-credito-vencido:hover>td,
.fila-master-vale.master-credito-urgente:hover>td {
    background: #ffe4e4 !important;
}

.fila-master-vale.master-credito-por-vencer:hover>td {
    background: #fff3d1 !important;
}

.fila-master-vale.master-credito-a-tiempo:hover>td {
    background: #e4f5e8 !important;
}

.habitat-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
}

.habitat-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.habitat-check span {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #b8c2cc;
    border-radius: 4px;
    transition: all .15s ease;
}

.habitat-check:hover span {
    border-color: #00b4df;
    box-shadow: 0 0 0 3px rgba(0, 180, 223, .10);
}

.habitat-check input:checked+span {
    background: #00b4df;
    border-color: #00b4df;
}

.habitat-check input:checked+span:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.habitat-check input:focus+span {
    box-shadow: 0 0 0 3px rgba(0, 180, 223, .18);
}

.habitat-check input:disabled+span {
    background: #f1f3f5;
    border-color: #d5d9dd;
    cursor: not-allowed;
}

/* MODAL GENERAL DE ERRORES */
#erroresModal .habitat-modal-header {
    background: #fff5f5 !important;
    border-bottom: 1px solid #f1caca !important;
}

#erroresModal .habitat-modal-icon {
    background: #dc3545 !important;
    color: #fff !important;
}

#erroresModal .habitat-modal-title {
    color: #b52a37 !important;
    font-weight: 600 !important;
}

#erroresModal .habitat-modal-subtitle {
    color: #7a5558 !important;
}

#erroresModal .habitat-summary-box {
    background: #fff7f7 !important;
    border: 1px solid #f0caca !important;
    border-left: 4px solid #dc3545 !important;
}

#erroresModal .habitat-summary-title {
    color: #b52a37 !important;
    font-weight: 600 !important;
}

#erroresModal .habitat-summary-title i {
    color: #dc3545 !important;
    margin-right: 5px;
}

#erroresModal .habitat-summary-desc {
    color: #666 !important;
}

#erroresModal #erroresContent {
    margin: 14px 0 0 20px !important;
    padding: 0 !important;
    color: #555 !important;
}

#erroresModal #erroresContent li {
    padding: 4px 0 !important;
}

#erroresModal .habitat-modal-footer {
    border-top: 1px solid #eee !important;
}

.cp-menu-card {
    display: block;
    position: relative;
    min-height: 180px;
    padding: 22px;
    background: #fff;
    border: 1px solid #e7e9ed;
    border-top: 4px solid #00b4df;
    text-decoration: none !important;
    transition: all .18s ease;
    overflow: hidden;
}

.cp-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    text-decoration: none !important;
}

.cp-menu-card-afiliado {
    border-top-color: #00b4df;
}

.cp-menu-card-archivo {
    border-top-color: #dad813;
}

.cp-menu-card-legal {
    border-top-color: #f26f00;
}

.cp-menu-card-historial {
    border-top-color: #013972;
}

.cp-menu-card-firmantes {
    border-top-color: #00b4df;
}

.cp-menu-card-cheques {
    border-top-color: #f26f00;
}

.cp-menu-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cp-menu-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    background: #f4f7f9;
    color: #013972;
}

.cp-menu-card-afiliado .cp-menu-icon {
    background: rgba(0, 180, 223, .10);
    color: #0098bd;
}

.cp-menu-card-archivo .cp-menu-icon {
    background: rgba(218, 216, 19, .15);
    color: #989700;
}

.cp-menu-card-legal .cp-menu-icon {
    background: rgba(242, 111, 0, .10);
    color: #f26f00;
}

.cp-menu-card-historial .cp-menu-icon {
    background: rgba(1, 57, 114, .09);
    color: #013972;
}

.cp-menu-card-firmantes .cp-menu-icon {
    background: rgba(0, 180, 223, .10);
    color: #0098bd;
}

.cp-menu-card-cheques .cp-menu-icon {
    background: rgba(242, 111, 0, .10);
    color: #f26f00;
}

.cp-menu-content {
    flex: 1;
    min-width: 0;
}

.cp-menu-title {
    margin: 1px 0 6px;
    color: #263238;
    font-size: 16px;
    font-weight: 600;
}

.cp-menu-description {
    color: #727b84;
    font-size: 13px;
    line-height: 1.5;
    min-height: 58px;
}

.cp-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.cp-menu-action {
    color: #013972;
    font-size: 12px;
    font-weight: 600;
}

.cp-menu-action i {
    margin-left: 4px;
}

.cp-menu-number {
    position: absolute;
    right: 14px;
    top: 7px;
    color: #f2f4f6;
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.cp-menu-row>[class*="col-"] {
    margin-bottom: 20px;
}

/* =========================================================
   SWITCH / SLIDE HABITAT
========================================================= */

.habitat-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    margin: 0;
    vertical-align: middle;
}

.habitat-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.habitat-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d5d9dc;
    border: 1px solid #c5cbd0;
    border-radius: 24px;
    transition: all .2s ease;
}

.habitat-switch-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .20);
    transition: transform .2s ease;
}

/* ACTIVO */
.habitat-switch input:checked+.habitat-switch-slider {
    background: var(--habitat-celeste, #00b4df);
    border-color: var(--habitat-celeste, #00b4df);
}

.habitat-switch input:checked+.habitat-switch-slider::before {
    transform: translateX(22px);
}

/* HOVER */
.habitat-switch:hover .habitat-switch-slider {
    box-shadow: 0 0 0 3px rgba(0, 180, 223, .12);
}

/* DESHABILITADO */
.habitat-switch input:disabled+.habitat-switch-slider {
    opacity: .55;
    cursor: not-allowed;
}

/* FOCO */
.habitat-switch input:focus+.habitat-switch-slider {
    box-shadow: 0 0 0 3px rgba(0, 180, 223, .15);
}

/* PROYECTOS - TABLA COMPACTA */
#tblProyectosCostos {
    width: 100% !important;
    table-layout: auto;
}

#tblProyectosCostos th,
#tblProyectosCostos td {
    padding: 8px 10px;
    vertical-align: middle;
    font-size: 12px;
    line-height: 1.35;
}

#tblProyectosCostos td {
    border-bottom: 1px solid #edf0f2;
}

#tblProyectosCostos .habitat-proyecto-codigo {
    font-size: 11px;
    font-weight: 700;
    color: var(--habitat-azul, #013972);
}

#tblProyectosCostos .habitat-proyecto-nombre {
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

#tblProyectosCostos .habitat-proyecto-secundario {
    font-size: 11px;
    color: #75818a;
    margin-top: 3px;
}

#tblProyectosCostos .habitat-proyecto-monto {
    font-size: 14px;
    font-weight: 700;
    color: #223036;
}

#tblProyectosCostos .habitat-proyecto-fecha {
    font-size: 11px;
    white-space: nowrap;
    margin: 2px 0;
}

#tblProyectosCostos .habitat-proyecto-fecha span {
    color: #8b949b;
    font-size: 10px;
    display: inline-block;
    width: 43px;
}

#tblProyectosCostos .habitat-proyecto-acciones {
    white-space: nowrap;
}

#tblProyectosCostos .habitat-btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

#tblProyectosCostos .habitat-btn-icon {
    width: 29px;
    height: 29px;
    padding: 5px;
    font-size: 12px;
}

#tblProyectosCostos .habitat-btn-table {
    font-size: 14px;
    padding: 5px 9px;
    min-height: 29px;
}

#tblProyectosCostos .habitat-pill {
    font-size: 10px;
    padding: 3px 7px;
}



/* ==========================================
   PROYECTOS COSTOS - DISTRIBUCIÓN DE TABLA
========================================== */

#tblProyectosCostos {
    width: 100% !important;
    border-collapse: collapse;
}

/* Anchos de columnas */

#tblProyectosCostos .col-proyecto-check {
    width: 4%;
}

#tblProyectosCostos .col-proyecto-cliente {
    width: 24%;
}

#tblProyectosCostos .col-proyecto-construccion {
    width: 23%;
}

#tblProyectosCostos .col-proyecto-fechas {
    width: 14%;
}

#tblProyectosCostos .col-proyecto-seguimiento {
    width: 15%;
}

#tblProyectosCostos .col-proyecto-acciones {
    width: 20%;
}

/* Encabezados */

#tblProyectosCostos thead th {
    vertical-align: middle;
    padding: 13px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .35px;
    white-space: nowrap;
}

/* Celdas */

#tblProyectosCostos tbody td {
    vertical-align: middle;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
}

/* Primera columna */

#tblProyectosCostos th:first-child,
#tblProyectosCostos td:first-child {
    text-align: center !important;
}

/* Proyecto y cliente */

#tblProyectosCostos td.habitat-proyecto-cliente {
    text-align: left !important;
}

/* Información constructiva */

#tblProyectosCostos td.habitat-proyecto-construccion {
    text-align: left !important;
}

/* Fechas */

#tblProyectosCostos td.habitat-proyecto-fechas {
    text-align: center !important;
    white-space: nowrap;
}

/* Seguimiento */

#tblProyectosCostos td.habitat-proyecto-seguimiento {
    text-align: center !important;
}

/* Acciones */

#tblProyectosCostos td.habitat-proyecto-acciones {
    text-align: right !important;
}

#tblProyectosCostos td.habitat-proyecto-acciones .habitat-btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
}

#tblProyectosCostos td.habitat-proyecto-acciones .btn {
    margin: 0;
    white-space: nowrap;
}

/* Estados y etiquetas */

#tblProyectosCostos td.habitat-proyecto-seguimiento .habitat-pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 2px;
}

/* Efecto de lectura */

#tblProyectosCostos tbody tr {
    transition: background-color .15s ease;
}

#tblProyectosCostos tbody tr:hover {
    background-color: rgba(0, 180, 223, .045);
}

/* Pantallas pequeñas */

@media (max-width: 1100px) {
    #tblProyectosCostos {
        min-width: 1050px;
    }
}



/* ==========================================
   ESTADOS DE PROYECTOS - COSTOS
   ========================================== */

.habitat-pill.habitat-pill-green {
    background: #e7f5eb;
    color: #18753b;
    border: 1px solid #b9dfc5;
}

.habitat-pill.habitat-pill-orange {
    background: #fff0e5;
    color: #b64c00;
    border: 1px solid #f7c59d;
}

.habitat-pill.habitat-pill-red {
    background: #fdeaea;
    color: #b42332;
    border: 1px solid #f3b7bd;
}

.habitat-pill.habitat-pill-info {
    background: #e4f8fd;
    color: #007f9e;
    border: 1px solid #a9e6f3;
}

.habitat-pill.habitat-pill-gray {
    background: #f1f3f5;
    color: #59636e;
    border: 1px solid #dce1e5;
}

/* ==============================================
   ESTADO DE ASIGNACIÓN DE MATERIALES
   ============================================== */

/* Sin proveedor y sin marca */
#tablaRequisicion tbody tr.req-fila-pendiente>td {
    background-color: #f3f4f6;
}

/* Solo proveedor o solo marca */
#tablaRequisicion tbody tr.req-fila-parcial>td {
    background-color: #fff3d6;
}

/* Proveedor y marca asignados */
#tablaRequisicion tbody tr.req-fila-completa>td {
    background-color: #e1f2e5;
}

/* Indicador lateral para reconocer el estado */
#tablaRequisicion tbody tr.req-fila-pendiente>td:first-child {
    box-shadow: inset 4px 0 0 #9ca3af;
}

#tablaRequisicion tbody tr.req-fila-parcial>td:first-child {
    box-shadow: inset 4px 0 0 #f26f00;
}

#tablaRequisicion tbody tr.req-fila-completa>td:first-child {
    box-shadow: inset 4px 0 0 #27834c;
}

/* Transición al cambiar proveedor o marca */
#tablaRequisicion tbody tr.req-pos-row>td {
    transition: background-color 0.2s ease;
}

/* Mantener visible la selección masiva */
#tablaRequisicion tbody tr.req-row-selected>td {
    outline: 1px solid rgba(0, 180, 223, 0.35);
    outline-offset: -1px;
}

/* Resaltar ligeramente al pasar el mouse */
#tablaRequisicion tbody tr.req-pos-row:hover>td {
    filter: brightness(0.98);
}

/* BITÁCORA COMPACTA */

.req-history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.req-history-count {
    display: inline-block;
    padding: 2px 9px;
    margin-left: 6px;
    border-radius: 20px;
    background: #013972;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.req-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.req-history-arrow {
    transition: transform .2s ease;
}

.req-history-toggle[aria-expanded="true"] .req-history-arrow {
    transform: rotate(180deg);
}

#historialRequisicion .req-history-list {
    margin-top: 15px;
}

@media (max-width: 600px) {
    .req-history-heading {
        flex-wrap: wrap;
    }
}

#tblAnulaciones th,
#tblAnulaciones td {
    box-sizing: border-box;
    padding: 10px 12px;
    vertical-align: middle;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.45;
}

#tblAnulaciones th {
    white-space: nowrap;
}

#tblAnulaciones td .btn {
    white-space: nowrap;
}

#revisionMotivoCatalogo,
#revisionCliente,
#revisionCotizacion,
#revisionVale {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.5;
}



/* ================================================
   COSTOS - SOLICITUDES DE ANULACION
   ================================================ */

.habitat-anulaciones-wrapper {
    width: 100%;
    overflow-x: auto;
}

#tblAnulaciones {
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse;
}

#tblAnulaciones thead th {
    padding: 13px 14px;
    vertical-align: middle;
    white-space: normal !important;
    font-size: 12px;
    font-weight: 700;
}

#tblAnulaciones tbody td {
    padding: 14px;
    vertical-align: middle;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.5;
}

#tblAnulaciones tbody tr {
    border-bottom: 1px solid #e5e9ed;
}

#tblAnulaciones tbody tr:hover {
    background: #f5f8fa;
}

/* Contenido agrupado */

#tblAnulaciones .anulacion-celda {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
    min-width: 0;
}

#tblAnulaciones .anulacion-principal {
    display: block;
    color: #013972;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

#tblAnulaciones .anulacion-secundario {
    display: block;
    color: #626d79;
    font-size: 11px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

#tblAnulaciones .anulacion-secundario b {
    color: #344456;
    font-weight: 600;
}

/* Monto */

#tblAnulaciones .anulacion-monto {
    color: #013972;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* Estado */

#tblAnulaciones .anulacion-estado {
    margin-top: 3px;
}

/* Acciones */

#tblAnulaciones .anulacion-acciones {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#tblAnulaciones .anulacion-acciones .btn {
    min-width: 90px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 5px;
}

/* Ajustes para pantallas medianas */

@media (max-width: 1100px) {

    #tblAnulaciones {
        min-width: 850px;
    }

    #tblAnulaciones thead th,
    #tblAnulaciones tbody td {
        padding: 10px;
    }
}

/* ==================================================
   PROYECTOS - HERRAMIENTAS SEGÚN LA ETAPA
   Los controles se muestran desde proyectos.js.
   ================================================== */

#sinAccesoCostos {
    display: none;
}

#sinAccesoCostos .habitat-summary-box {
    margin-bottom: 0;
}

#barraHerramientasEtapa {
    display: none;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--habitat-soft);
    border: 1px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
}

#panelQrAsignaciones,
#panelFiltroConciliacionVales {
    display: none;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {

    #barraHerramientasEtapa,
    #panelQrAsignaciones,
    #panelFiltroConciliacionVales {
        justify-content: flex-start;
    }
}

/* =====================================================
   REPORTE CRÉDITOS CONCILIADOS
   Extensión de tema-habitat.css
   ===================================================== */

.habitat-reporte-conciliados {
    padding-bottom: 20px;
}

/* PANEL */

.habitat-reporte-conciliados .habitat-reporte-panel {
    padding: 15px;
}

.habitat-reporte-conciliados .habitat-card-header {
    align-items: center;
    margin-bottom: 14px;
}

/* =====================================================
   FILTROS
   ===================================================== */

.habitat-conciliados-filtros {
    display: grid;
    grid-template-columns:
        minmax(125px, .75fr) minmax(125px, .75fr) minmax(140px, 1fr) minmax(150px, 1fr) minmax(200px, 1.5fr) auto;
    gap: 10px;
    align-items: end;

    padding: 12px;
    margin-bottom: 15px;

    background: var(--habitat-soft);
    border: 1px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
}

.habitat-conciliados-campo {
    min-width: 0;
}

.habitat-conciliados-campo label {
    display: block;
    margin-bottom: 5px;

    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .25px;
}

.habitat-conciliados-campo .habitat-filter-input {
    width: 100%;
    height: 34px !important;
    font-size: 11px !important;
    font-weight: 500;
}

.habitat-conciliados-acciones {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 2px;
}

.habitat-conciliados-acciones .habitat-btn {
    height: 32px !important;
    white-space: nowrap;
}

/* =====================================================
   SEPARADORES DE SECCIONES
   ===================================================== */

.habitat-conciliados-seccion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 10px 0 8px;
    margin-bottom: 10px;

    border-bottom: 1px solid var(--habitat-borde-soft);
}

.habitat-conciliados-seccion-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.habitat-conciliados-seccion-info strong {
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-texto);
    white-space: nowrap;
}

.habitat-conciliados-seccion-info span {
    font-size: 10px;
    color: var(--habitat-muted);
}

/* =====================================================
   RESUMEN FINANCIERO
   ===================================================== */

.habitat-conciliados-resumen {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;

    margin-bottom: 17px;
}

.habitat-conciliados-resumen .habitat-summary-item {
    min-width: 0;
    min-height: 66px;
    margin: 0;

    padding: 10px 12px;

    background: var(--habitat-soft);
    border: 1px solid var(--habitat-borde-soft);
    border-radius: var(--habitat-radius);
}

.habitat-conciliados-resumen .habitat-summary-item span {
    display: block;
    margin-bottom: 6px;

    font-size: 9px;
    font-weight: 800;
    color: var(--habitat-muted);
    text-transform: uppercase;
    letter-spacing: .25px;
}

.habitat-conciliados-resumen .habitat-summary-item strong {
    display: block;

    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--habitat-texto);

    overflow-wrap: anywhere;
}

/* SALDO DESTACADO */

.habitat-conciliados-resumen .habitat-conciliados-resumen-saldo {
    background: rgba(var(--habitat-celeste-rgb), .075);
    border-color: rgba(var(--habitat-celeste-rgb), .25);
}

.habitat-conciliados-resumen .habitat-conciliados-resumen-saldo strong {
    color: var(--habitat-azul);
}

/* =====================================================
   TABLA CONSOLIDADA
   ===================================================== */

#tblCreditosConciliados {
    width: 100% !important;
    table-layout: fixed;
}

#tblCreditosConciliados thead th {
    padding: 10px 12px !important;
    font-size: 10px !important;
}

#tblCreditosConciliados tbody td {
    padding: 10px 12px !important;
    font-size: 11px !important;
    vertical-align: middle !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

#tblCreditosConciliados .conciliados-fecha {
    display: flex;
    align-items: center;
    gap: 7px;
}

#tblCreditosConciliados .conciliados-fecha i {
    color: var(--habitat-celeste);
    font-size: 12px;
}

#tblCreditosConciliados .conciliados-fecha strong {
    color: var(--habitat-texto);
    font-size: 11px;
    white-space: nowrap;
}

/* CRÉDITO Y CLIENTE */

.conciliados-credito {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.conciliados-credito-numero {
    font-size: 12px;
    font-weight: 800;
    color: var(--habitat-azul) !important;
}

.conciliados-cliente {
    font-size: 11px;
    font-weight: 600;
    color: var(--habitat-texto);
}

.conciliados-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
}

.conciliados-meta span {
    font-size: 9px;
    color: var(--habitat-muted);
}

/* PRODUCTO Y AFILIADO */

.conciliados-proyecto {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.conciliados-proyecto strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--habitat-texto);
}

.conciliados-proyecto span {
    font-size: 10px;
    color: var(--habitat-muted);
}

/* EJECUCIÓN FINANCIERA */

.conciliados-finanzas {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.conciliados-finanza-linea {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.conciliados-finanza-linea span {
    font-size: 10px;
    color: var(--habitat-muted);
}

.conciliados-finanza-linea strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--habitat-texto);
    white-space: nowrap;
}

/* SALDO */

.conciliados-saldo {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    text-align: right;
}

.conciliados-saldo span {
    font-size: 9px;
    font-weight: 700;
    color: var(--habitat-muted);
    text-transform: uppercase;
}

.conciliados-saldo strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--habitat-azul) !important;
    white-space: nowrap;
}

.conciliados-saldo small {
    font-size: 9px;
    color: var(--habitat-muted);
}

.conciliados-saldo.negativo strong {
    color: var(--habitat-danger) !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1350px) {

    .habitat-conciliados-filtros {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .habitat-conciliados-buscar {
        grid-column: span 3;
    }

    .habitat-conciliados-resumen {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 900px) {

    .habitat-conciliados-filtros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .habitat-conciliados-buscar {
        grid-column: 1 / -1;
    }

    .habitat-conciliados-acciones {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .habitat-conciliados-resumen {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tblCreditosConciliados {
        min-width: 850px;
    }

}

@media (max-width: 600px) {

    .habitat-conciliados-filtros {
        grid-template-columns: 1fr;
    }

    .habitat-conciliados-buscar,
    .habitat-conciliados-acciones {
        grid-column: auto;
    }

    .habitat-conciliados-acciones .habitat-btn {
        flex: 1;
    }

    .habitat-conciliados-seccion-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

}

/* =====================================================
   RESUMEN DE CINCO INDICADORES
   ===================================================== */

.habitat-conciliados-resumen {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.habitat-conciliados-resumen .habitat-summary-item:last-child {
    background: rgba(var(--habitat-celeste-rgb), .08);
    border-color: rgba(var(--habitat-celeste-rgb), .28);
}

.habitat-conciliados-resumen .habitat-summary-item:last-child strong {
    color: var(--habitat-azul);
}

/* =====================================================
   BALANCE FINANCIERO EN UNA SOLA COLUMNA
   ===================================================== */

.conciliados-balance {
    width: 100%;
    max-width: 390px;
    margin-left: auto;
}

.conciliados-balance-linea {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
}

.conciliados-balance-linea span {
    font-size: 10px;
    color: var(--habitat-muted);
}

.conciliados-balance-linea strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--habitat-texto);
    white-space: nowrap;
}

.conciliados-balance-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    margin-top: 6px;
    padding: 9px 10px;

    background: rgba(var(--habitat-celeste-rgb), .08);
    border: 1px solid rgba(var(--habitat-celeste-rgb), .20);
    border-radius: var(--habitat-radius);
}

.conciliados-balance-total span {
    font-size: 10px;
    font-weight: 800;
    color: var(--habitat-azul);
    text-transform: uppercase;
}

.conciliados-balance-total strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--habitat-azul);
    white-space: nowrap;
}

.conciliados-balance-total.negativo {
    background: rgba(var(--habitat-danger-rgb), .06);
    border-color: rgba(var(--habitat-danger-rgb), .24);
}

.conciliados-balance-total.negativo span,
.conciliados-balance-total.negativo strong {
    color: var(--habitat-danger);
}

/* RESPONSIVE */

@media (max-width: 1350px) {
    .habitat-conciliados-resumen {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .habitat-conciliados-resumen {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tblCreditosConciliados {
        min-width: 760px;
    }
}


/* FECHAS AGRUPADAS */

.conciliados-fechas {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conciliados-fechas>div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conciliados-fechas span {
    font-size: 9px;
    color: var(--habitat-muted);
}

.conciliados-fechas strong {
    font-size: 11px;
    color: var(--habitat-texto);
    white-space: nowrap;
}

/* IDENTIFICACIÓN DEL CRÉDITO */

.conciliados-credito {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.conciliados-credito-numero {
    font-size: 12px;
    color: var(--habitat-azul) !important;
}

.conciliados-cliente {
    font-size: 11px;
    font-weight: 700;
    color: var(--habitat-texto);
}

.conciliados-credito .conciliados-proyecto {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--habitat-borde-soft);
}

.conciliados-credito .conciliados-proyecto span,
.conciliados-credito .conciliados-proyecto small {
    display: block;
    font-size: 10px;
    color: var(--habitat-muted);
}

/* COLUMNAS MONETARIAS */

.conciliados-monto {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.conciliados-monto strong {
    font-size: 12px;
    color: var(--habitat-texto);
    white-space: nowrap;
}

.conciliados-monto small {
    font-size: 10px;
    color: var(--habitat-muted);
    white-space: nowrap;
}

.conciliados-nota-ajuste {
    font-size: 13px;
    font-weight: 800;
    color: var(--habitat-azul) !important;
    white-space: nowrap;
}

#tblCreditosConciliados tbody td {
    vertical-align: middle !important;
}