/* =========================
   APP LAYOUT
========================= */

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f6fa;
    color: #212529;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* =========================
   SIDEBAR
========================= */

.app-sidebar,
.app-sidebar-mobile {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    background-color: #111827;
    color: #ffffff;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
}

.app-sidebar-mobile {
    width: 260px !important;
}

.sidebar-header {
    height: 64px;
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar-mobile .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

.sidebar-brand:hover {
    color: #ffffff;
}

.sidebar-brand-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    font-size: 0.925rem;
    transition: all 0.2s ease-in-out;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: #ffffff;
    background-color: #0d6efd;
}

/* =========================
   MAIN
========================= */

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: 64px;
    min-height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-content {
    flex: 1;
    padding: 1.5rem;
}

.app-footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 0.9rem 1.25rem;
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

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

@media (max-width: 991.98px) {

    .app-wrapper {
        display: block;
    }

    .app-main {
        min-height: 100vh;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 1020;
    }

    .topbar-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-content {
        padding: 1rem;
    }

    .app-footer {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {

    .app-topbar {
        padding: 0 0.75rem;
        gap: 0.75rem;
    }

    .topbar-title {
        font-size: 0.95rem;
    }

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

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

.error-card {
    width: 100%;
    max-width: 480px;
}

.error-icon {
    width: 72px;
    height: 72px;
    border-radius: 1.25rem;
    background-color: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.error-icon-danger {
    background-color: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

/* =========================
   AUTH PAGES
========================= */

.login-card {
    width: 100%;
    max-width: 430px;
}

.login-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 1.25rem;
    background-color: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* =========================
   DASHBOARD
========================= */

.dashboard-card {
    transition: all 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.dashboard-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.dashboard-action {
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    font-weight: 500;
}

.dashboard-action:hover {
    background-color: #f1f3f5;
}

/* =========================
   DETAIL PAGES
========================= */

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #eef0f3;
}

.detail-item:first-child {
    padding-top: 0;
}

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

.detail-item span {
    font-size: 0.8rem;
    color: #6c757d;
}

.detail-item strong {
    font-size: 0.95rem;
    color: #212529;
}

/* =========================
   TABLE CUENTA CORRIENTE
========================= */
.cc-row td {
    padding-top: .45rem !important;
    padding-bottom: .45rem !important;
    font-size: .92rem;
}

/* ==========================
   ALQUIHUB - Tablas
   ========================== */

.alquihub-table {
    font-size: .90rem;
}

.alquihub-table thead th {
    font-size: .80rem;
    font-weight: 600;
    white-space: nowrap;
}

.alquihub-table td,
.alquihub-table th {
    padding-top: .50rem;
    padding-bottom: .50rem;
    vertical-align: middle;
}

.alquihub-table-actions {
    padding: .20rem .45rem;
}

.alquihub-table-dropdown {
    font-size: .85rem;
}

/* ==========================
   ALQUIHUB - DataTables compact
   ========================== */

.dt-container {
    font-size: .875rem;
}

.dt-container .dt-search label,
.dt-container .dt-length label,
.dt-container .dt-info {
    font-size: .825rem;
    color: #6c757d;
}

.dt-container .dt-search input {
    height: calc(1.5em + .5rem + 2px);
    padding: .25rem .5rem;
    font-size: .825rem;
}

.dt-container .dt-length select {
    height: calc(1.5em + .5rem + 2px);
    padding: .25rem 1.75rem .25rem .5rem;
    font-size: .825rem;
}

/* Paginador DataTables con Bootstrap */

.dt-container .dt-paging .pagination {
    margin-bottom: 0;
    gap: .15rem;
}

.dt-container .dt-paging .page-item {
    margin: 0;
}

.dt-container .dt-paging .page-link {
    padding: .20rem .50rem;
    font-size: .80rem;
    line-height: 1.2;
    min-height: auto;
    border-radius: .375rem;
}

.dt-container .dt-paging .page-link.first,
.dt-container .dt-paging .page-link.previous,
.dt-container .dt-paging .page-link.next,
.dt-container .dt-paging .page-link.last {
    padding-left: .45rem;
    padding-right: .45rem;
}

/* ==========================
   ALQUIHUB - DataTables buttons
   ========================== */

.dt-container .dt-buttons {
    display: flex;
    gap: .25rem;
    align-items: center;
}

.dt-container .alquihub-dt-button {
    padding: .20rem .45rem !important;
    font-size: .80rem !important;
    line-height: 1.2 !important;
    border-radius: .375rem !important;
    border: 1px solid #dee2e6 !important;
    background-color: #ffffff !important;
    color: #495057 !important;
}

.dt-container .alquihub-dt-button:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.alquihub-dt-export {
    display: flex;
    justify-content: center;
    align-items: center;
}

.alquihub-dt-export .dt-buttons {
    display: flex;
    gap: .25rem;
    align-items: center;
}

/* ==========================
   ALQUIHUB - Tablas detalle
   ========================== */

.alquihub-table-simple {
    margin-bottom: 0;
}

.alquihub-table-simple thead th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.alquihub-table-simple tbody td {
    border-bottom-color: #eef0f3;
}

/* ==========================
   ALQUIHUB - Acciones inline
   ========================== */

.alquihub-table-inline-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: .25rem;
}

.alquihub-table-inline-actions .btn {
    padding: .20rem .45rem;
    line-height: 1.2;
}


.sidebar-section-label {
    color: rgba(255, 255, 255, 0.42);
    font-size: .70rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .65rem .85rem .25rem;
}

/* ===========
    SELECT2
   =========== */
.alquihub-select2-dropdown-sm {
    font-size: .875rem;
}

.alquihub-select2-dropdown-sm .select2-results__option {
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.3;
}

.alquihub-select2-dropdown-sm .select2-search__field {
    padding: .25rem .5rem;
    font-size: .875rem;
    min-height: calc(1.5em + .5rem + 2px);
}

.alquihub-select2-dropdown-sm {
    font-size: .875rem !important;
}

.alquihub-select2-dropdown-sm .select2-results__option {
    padding: .25rem .5rem !important;
    font-size: .875rem !important;
    line-height: 1.3 !important;
}

.alquihub-select2-dropdown-sm .select2-search__field {
    padding: .25rem .5rem !important;
    font-size: .875rem !important;
    min-height: calc(1.5em + .5rem + 2px) !important;
}



.alquihub-select2-dropdown-lg {
    font-size: 1.25rem;
}

.alquihub-select2-dropdown-lg .select2-results__option {
    padding: .5rem .75rem;
    font-size: 1.25rem;
    line-height: 1.5;
}

.alquihub-select2-dropdown-lg .select2-search__field {
    padding: .5rem .75rem;
    font-size: 1.25rem;
    min-height: calc(1.5em + 1rem + 2px);
}

/* ========================
    Agrupación de cobranza
   ======================== */
.cc-row-recibo td {
    background-color: #f8fafc;
}

.cc-row-recibo-start td {
    border-top: 2px solid #198754;
}

.cc-row-recibo td:first-child {
    border-left: 4px solid #198754;
}

/* 
==================
  C O L O R E S
==================
*/


.clr-blue{
    color: #007eb2;
}

.clr-orange{
    color: #e86710;  
}

.clr-lightblue{
   color: lightblue;
}

.bg-lightblue{
    background-color: #f0fffe;
 }
.clr-bord-card{
    border-color: #bce8f1;
}

.clr-bord-gold{
    border-color: #ECB857;
}
.clr-bord-orange{
    border-color:#eb5f0a;
}
.clr-gold{
    color: #ECB857;
}

.clr-black_100{
    background-color:black;
}  

.clr-red{
    color: rgb(255,61,65);
}

.clr-grey{
    background-color: #AFA5D9;
}

.clr-grey2{
    background-color: #DEDEDE;
}
.clr-btn-eliminar {
    color: #fff;
    background-color:rgb(255,61,65);
    border-color:rgb(255,61,65); 
}
.clr-btn-eliminar:hover {
    color: #fff;
    background-color:rgb(200,0,4);
    border-color:rgb(200,0,4); 
}

.bg-lightblue{
    background-color:#bce8f1;
}

.bg-gold{
    background-color:#ECB857;
}
.bg-orange{
	background-color:#e86710;
}

/* 
======================
  D A S H B O A R D
======================
*/

.agenda-histograma-dia {
        min-width: 56px;
        width: 56px;
        padding: 0 !important;
        position: relative;
        vertical-align: middle;
    }

    .agenda-histograma-dia::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        border-left: 1px dashed rgba(0, 0, 0, .05);
        z-index: 0;
    }

    .agenda-histograma-hoy {
        background: rgba(13, 110, 253, .08) !important;
    }

    .agenda-histograma-hoy::before {
        border-left: 2px solid rgba(13, 110, 253, .45);
    }

    .agenda-histograma-barra {
        position: relative;
        z-index: 1;
        height: 18px;
        margin: 14px 0;
        background: transparent;
    }

    .agenda-histograma-barra-activa {
        background: #0d6efd;
    }

    .agenda-histograma-barra-inicio {
        border-radius: 999px 0 0 999px;
        margin-left: 8px;
    }

    .agenda-histograma-barra-fin {
        border-radius: 0 999px 999px 0;
        margin-right: 8px;
    }

    .agenda-histograma-barra-inicio.agenda-histograma-barra-fin {
        border-radius: 999px;
        margin-left: 8px;
        margin-right: 8px;
    }

    .agenda-histograma-barra-cobrado.agenda-histograma-barra-activa {
        background: #198754;
    }

    .agenda-histograma-barra-vencido.agenda-histograma-barra-activa {
        background: #dc3545;
    }

    .agenda-histograma-barra-proximo.agenda-histograma-barra-activa {
        background: #6c757d;
        opacity: .55;
    }

    .agenda-histograma-barra-en-ventana.agenda-histograma-barra-activa {
        background: #0d6efd;
    }

    .agenda-histograma-barra-alerta.agenda-histograma-barra-activa {
        background: #ffc107;
    }

    .agenda-histograma-fin {
        position: absolute;
        right: -2px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .95);
        border: 1px solid rgba(0, 0, 0, .12);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .7rem;
        color: #212529;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
    }