/**
 * Estilos propios de Office.
 *
 * Este archivo queda reservado para personalizaciones futuras sobre
 * Bootstrap 5 y Tabler.
 */

.office-brand-logo {
    display: block;
    width: 112px;
    max-width: 100%;
    height: auto;
}

.office-sidebar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.office-login-logo {
    width: 118px;
}

.office-layout-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050 !important;
    width: min(15rem, 85vw);
    max-width: 85vw;
    align-items: stretch;
    overflow-y: auto;
    transform: translateX(-100%) !important;
    transition: transform .2s ease;
    will-change: transform;
}

.office-shell > .page-wrapper {
    margin-left: 0 !important;
    min-width: 0;
    transition: none;
}

.office-sidebar-overlay {
    display: none;
    padding: 0;
    border: 0;
    background: transparent;
}

.office-layout-sidebar > .container-fluid {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100%;
    padding: 0;
}

.office-layout-sidebar .navbar-brand {
    justify-content: center;
    padding: .75rem 0;
}

.office-layout-sidebar .navbar-collapse {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.office-layout-sidebar .navbar-nav {
    flex-direction: column;
    padding-top: .75rem;
}

html.office-sidebar-open .office-layout-sidebar,
body.office-sidebar-open .office-layout-sidebar {
    transform: translateX(0) !important;
}

html.office-sidebar-open,
html.office-sidebar-open body,
body.office-sidebar-open {
    overflow: hidden;
}

html.office-sidebar-open .office-sidebar-overlay,
body.office-sidebar-open .office-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1045;
    display: block;
    background: rgba(15, 23, 42, .42);
}

@media (prefers-reduced-motion: reduce) {
    .office-layout-sidebar {
        transition: none;
    }
}

.form-control:not([type="file"]),
.form-select,
textarea.form-control {
    background-color: #eef8ff;
    border-color: #b8def5;
}

.form-control:not([type="file"]):focus,
.form-select:focus,
textarea.form-control:focus {
    background-color: #f6fbff;
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--tblr-primary-rgb), .12);
}

.form-control[type="file"]::file-selector-button {
    color: #ffffff;
    background-color: var(--tblr-primary);
    border-color: var(--tblr-primary);
}

.form-control[type="file"]::-webkit-file-upload-button {
    color: #ffffff;
    background-color: var(--tblr-primary);
    border-color: var(--tblr-primary);
}

.form-control[type="file"]:hover::file-selector-button,
.form-control[type="file"]:focus::file-selector-button {
    color: #ffffff;
    background-color: var(--tblr-primary);
    border-color: var(--tblr-primary);
    filter: brightness(.95);
}

.form-control[type="file"]:hover::-webkit-file-upload-button,
.form-control[type="file"]:focus::-webkit-file-upload-button {
    color: #ffffff;
    background-color: var(--tblr-primary);
    border-color: var(--tblr-primary);
    filter: brightness(.95);
}

.table > tbody > tr.office-represented-account-row > td {
    --bs-table-bg: #d7effb;
    --tblr-table-bg: #d7effb;
    background-color: #d7effb !important;
}

.table > tbody > tr.office-represented-account-row:hover > td {
    --bs-table-bg: #c7e7f7;
    --tblr-table-bg: #c7e7f7;
    background-color: #c7e7f7 !important;
}

.office-service-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 13rem;
}

.office-service-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.office-service-text {
    min-width: 0;
    line-height: 1.2;
}

.office-service-title {
    display: block;
    color: var(--tblr-body-color);
    font-weight: 600;
    white-space: normal;
}

.office-service-description {
    display: block;
    margin-top: .125rem;
    color: var(--tblr-secondary);
    font-size: .75rem;
    white-space: normal;
}

.office-dashboard-panel-card,
.office-dashboard-summary-card {
    box-shadow: 0 .25rem .85rem rgba(15, 23, 42, .12);
    transition: box-shadow .2s ease, transform .2s ease;
}

.office-dashboard-summary-card {
    --office-dashboard-summary-border: rgba(var(--tblr-primary-rgb), .45);
    --office-dashboard-summary-footer-border: rgba(var(--tblr-primary-rgb), .18);
    overflow: hidden;
    border: 1px solid var(--office-dashboard-summary-border);
}

.office-dashboard-summary-card .card-footer {
    border-top: 1px solid var(--office-dashboard-summary-footer-border);
}

.office-dashboard-summary-card-blue {
    --office-dashboard-summary-border: rgba(var(--tblr-blue-rgb), .45);
    --office-dashboard-summary-footer-border: rgba(var(--tblr-blue-rgb), .2);
}

.office-dashboard-summary-card-yellow {
    --office-dashboard-summary-border: rgba(var(--tblr-yellow-rgb), .6);
    --office-dashboard-summary-footer-border: rgba(var(--tblr-yellow-rgb), .28);
}

.office-dashboard-summary-card-azure {
    --office-dashboard-summary-border: rgba(var(--tblr-azure-rgb), .45);
    --office-dashboard-summary-footer-border: rgba(var(--tblr-azure-rgb), .2);
}

.office-dashboard-summary-card-green {
    --office-dashboard-summary-border: rgba(var(--tblr-green-rgb), .52);
    --office-dashboard-summary-footer-border: rgba(var(--tblr-green-rgb), .24);
}

.office-dashboard-summary-card:hover .card-footer {
    filter: saturate(1.08);
}

.office-dashboard-panel-card:hover,
.office-dashboard-summary-card:hover {
    box-shadow: 0 .4rem 1.1rem rgba(15, 23, 42, .16);
    transform: translateY(-2px);
}

.office-dashboard-account-card {
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 .25rem .85rem rgba(15, 23, 42, .12);
    transition: box-shadow .2s ease, transform .2s ease;
}

.office-dashboard-account-card:hover {
    box-shadow: 0 .4rem 1.1rem rgba(15, 23, 42, .16);
    transform: translateY(-2px);
}

.office-dashboard-debt-total {
    color: var(--tblr-danger);
    font-size: 1.15rem;
    line-height: 1.2;
    white-space: nowrap;
}

.office-dashboard-account-card .card-body {
    padding: .9rem;
}

.office-dashboard-account-card .card-footer {
    padding: .55rem .9rem;
}

.office-dashboard-account-balance {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
}

.office-dashboard-account-card .avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 12px;
    box-shadow: 0 .5rem 1rem rgba(15, 23, 42, .08);
}

.office-dashboard-account-card .avatar-lg .icon {
    width: 2rem;
    height: 2rem;
    stroke-width: 2.25;
}

.office-dashboard-account-card .avatar-xs {
    width: 1.9rem;
    height: 1.9rem;
}

.office-dashboard-account-card .avatar-xs .icon {
    width: 1.28rem;
    height: 1.28rem;
    stroke-width: 2.25;
}

.office-dashboard-account-card .card-footer .link-primary {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-weight: 500;
}

.office-dashboard-message-list {
    display: grid;
    gap: .65rem;
}

.office-dashboard-message-thread {
    display: block;
    min-width: 0;
    padding: .75rem;
    color: inherit;
    text-decoration: none;
    background: rgba(var(--tblr-primary-rgb), .04);
    border: 1px solid rgba(var(--tblr-primary-rgb), .2);
    border-radius: 12px;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.office-dashboard-message-thread:hover {
    color: inherit;
    text-decoration: none;
    background: rgba(var(--tblr-primary-rgb), .07);
    border-color: rgba(var(--tblr-primary-rgb), .35);
    box-shadow: 0 .2rem .6rem rgba(15, 23, 42, .08);
}

.office-dashboard-message-thread-closed {
    opacity: .82;
}

.office-dashboard-message-meta {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    font-size: .8125rem;
    line-height: 1.2;
    white-space: nowrap;
}

.office-dashboard-message-state {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
}

.office-dashboard-message-state .icon {
    width: 1rem;
    height: 1rem;
}

.office-dashboard-message-preview {
    margin-top: .65rem;
    overflow: hidden;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.office-account-show-card {
    border-radius: 12px;
    box-shadow: 0 .2rem .75rem rgba(15, 23, 42, .1);
}

.card.card-link.office-procedure-type-card {
    border: 1px solid rgba(15, 23, 42, .12);
    box-shadow: 0 4px 8px rgba(15, 23, 42, .12), 0 14px 26px rgba(15, 23, 42, .22) !important;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.card.card-link.office-procedure-type-card:hover,
.card.card-link.office-procedure-type-card:focus {
    border-color: rgba(var(--tblr-primary-rgb), .24);
    box-shadow: 0 6px 12px rgba(15, 23, 42, .14), 0 18px 34px rgba(15, 23, 42, .26) !important;
    transform: translateY(-1px);
}

.office-detail-section-card {
    border: 1px solid rgba(var(--tblr-primary-rgb), .45);
    overflow: hidden;
}

.office-detail-section-card > .card-header {
    background-color: #f1f8ff;
    border-bottom: 1px solid rgba(var(--tblr-primary-rgb), .28);
}

.office-detail-section-card > .card-header .card-title {
    color: var(--tblr-primary);
    font-weight: 700;
}

.office-detail-section-card > .card-header .icon {
    color: var(--tblr-primary);
}

.office-account-show-grid {
    display: grid;
    grid-template-columns: minmax(230px, .9fr) minmax(260px, 1.08fr) minmax(230px, .9fr);
    gap: 1.75rem;
    align-items: stretch;
}

.office-account-show-grid > * {
    min-width: 0;
}

.office-account-balance {
    display: flex;
    align-items: center;
    gap: .875rem;
}

.office-account-balance .avatar {
    flex: 0 0 auto;
    width: 3.5rem;
    height: 3.5rem;
}

.office-account-balance .avatar .icon {
    width: 2rem;
    height: 2rem;
}

.office-account-balance-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
}

.office-account-services .list-group-item {
    border-color: rgba(15, 23, 42, .09);
}

.office-account-chart-block h4 {
    font-size: .9375rem;
    font-weight: 600;
}

.office-account-chart-wrap {
    position: relative;
    height: 200px;
}

.office-account-map {
    min-height: 360px;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #eef5f9;
}

.office-account-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    gap: .75rem;
    color: var(--tblr-secondary);
    text-align: center;
}

.office-account-empty-state .icon-xl {
    width: 3.25rem;
    height: 3.25rem;
    color: var(--tblr-secondary);
    opacity: .65;
}

.office-invoices-summary-mini,
.office-invoices-account-card,
.office-invoices-general-summary {
    border-radius: 14px;
    box-shadow: 0 .25rem .85rem rgba(15, 23, 42, .12);
}

.office-invoices-account-card {
    overflow: hidden;
}

.office-invoices-account-header {
    background-color: #ffffff;
}

.office-invoices-total-account {
    color: var(--tblr-danger);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.15;
}

.office-invoices-period {
    padding: 1.1rem 0 1.35rem;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.office-invoices-period:first-child {
    padding-top: 0;
}

.office-invoices-period:last-of-type {
    border-bottom: 0;
}

.office-invoices-period-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: .8rem;
}

.office-invoices-period-total {
    color: var(--tblr-danger);
    font-size: 1.15rem;
    font-weight: 700;
}

.office-invoices-total-account.text-success,
.office-invoices-period-total.text-success {
    color: var(--tblr-success) !important;
}

.office-invoices-table {
    margin-bottom: 0;
}

.office-invoices-table thead th {
    color: var(--tblr-body-color);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    border-bottom-width: 2px;
}

.office-invoices-table tbody td {
    vertical-align: middle;
}

.office-invoices-table tfoot th {
    color: var(--tblr-body-color);
    font-weight: 700;
    background-color: #f8fafc;
}

.office-invoices-account-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    margin-top: .5rem;
    border: 1px solid rgba(var(--tblr-primary-rgb), .16);
    border-radius: 10px;
    background-color: #f5faff;
}

.office-invoices-account-total-values {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem 1rem;
    text-align: right;
}

.office-invoices-notes {
    margin-top: 1.25rem;
    color: #6b7fa8;
    font-size: .82rem;
}

.office-invoices-notes p {
    margin-bottom: .35rem;
}

.office-invoices-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.office-invoices-actions a {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-weight: 500;
}

.office-messages-toolbar {
    margin: 1rem 0 1.25rem;
}

.office-messages-list {
    display: grid;
    gap: 1rem;
}

.office-messages-card,
.office-messages-empty {
    border-radius: 14px;
    box-shadow: 0 .25rem .85rem rgba(15, 23, 42, .12);
}

.office-messages-card {
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.office-messages-card:hover {
    box-shadow: 0 .4rem 1.1rem rgba(15, 23, 42, .16);
    transform: translateY(-2px);
}

.office-messages-card-closed {
    opacity: .88;
}

.office-messages-card-header,
.office-messages-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.office-messages-state,
.office-messages-context span,
.office-messages-context a,
.office-messages-meta span,
.office-messages-footer a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.office-messages-context {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    margin-top: 1rem;
    color: var(--tblr-secondary);
}

.office-messages-context a {
    color: var(--tblr-primary);
    text-decoration: none;
}

.office-messages-context a:hover {
    text-decoration: underline;
}

.office-messages-preview {
    margin: 1rem 0 0;
    color: var(--tblr-body-color);
    font-size: .98rem;
    line-height: 1.55;
}

.office-messages-conversation {
    display: grid;
    gap: .75rem;
    margin: 1rem 0 0;
}

.office-messages-conversation-item {
    max-width: 860px;
    padding: .85rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background-color: #ffffff;
}

.office-messages-conversation-item-user {
    margin-left: auto;
    border-color: rgba(var(--tblr-primary-rgb), .16);
    background-color: #f5faff;
}

.office-messages-conversation-item-admin {
    margin-right: auto;
    border-color: rgba(47, 179, 68, .24);
    background-color: #eefaf0;
}

.office-messages-conversation-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .65rem;
    margin-bottom: .5rem;
    color: var(--tblr-secondary);
    font-size: .8125rem;
}

.office-messages-conversation-body {
    color: var(--tblr-body-color);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.office-messages-footer {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.office-messages-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    color: var(--tblr-secondary);
    font-size: .875rem;
}

.office-messages-form-card {
    max-width: 760px;
    border-radius: 14px;
    box-shadow: 0 .25rem .85rem rgba(15, 23, 42, .12);
}

.office-messages-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

.office-messages-form-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.office-messages-thread-card,
.office-messages-reply-card {
    border-radius: 14px;
    box-shadow: 0 .25rem .85rem rgba(15, 23, 42, .12);
}

.office-messages-thread-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.office-thread-list {
    display: grid;
    gap: 1rem;
}

.office-thread-message {
    max-width: 860px;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background-color: #ffffff;
}

.office-thread-message-user {
    margin-left: auto;
    border-color: rgba(var(--tblr-primary-rgb), .16);
    background-color: #f5faff;
}

.office-thread-message-admin {
    margin-right: auto;
    border-color: rgba(47, 179, 68, .24);
    background-color: #eefaf0;
}

.office-tramite-message-admin {
    border-left: 3px solid rgba(47, 179, 68, .45);
    background-color: #eefaf0;
}

.office-thread-message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    margin-bottom: .75rem;
    color: var(--tblr-secondary);
    font-size: .875rem;
}

.office-thread-message-body {
    color: var(--tblr-body-color);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.office-messages-reply-card .card-title {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.office-messages-confirmation {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.office-messages-confirmation-card {
    width: min(100%, 520px);
    border-radius: 14px;
    box-shadow: 0 .25rem .85rem rgba(15, 23, 42, .12);
}

.office-messages-confirmation-card .avatar-xl {
    width: 5rem;
    height: 5rem;
}

.office-messages-confirmation-card .avatar-xl .icon {
    width: 2.75rem;
    height: 2.75rem;
}

.office-messages-confirmation-card .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

@media (max-width: 575.98px) {
    .office-dashboard-account-card .card-body {
        padding: .85rem;
    }

    .office-dashboard-account-balance {
        font-size: 1.15rem;
    }

    .office-account-balance-value {
        font-size: 1.5rem;
    }

    .office-account-chart-wrap {
        height: 180px;
    }

    .office-account-map {
        min-height: 300px;
    }

    .office-invoices-period-header,
    .office-invoices-account-total,
    .office-invoices-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .office-invoices-account-total-values {
        justify-content: flex-start;
        text-align: left;
    }

    .office-messages-card-header,
    .office-messages-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .office-messages-footer a {
        justify-content: center;
    }

    .office-messages-form-actions {
        flex-direction: column-reverse;
    }

    .office-messages-form-actions .btn {
        justify-content: center;
    }

    .office-messages-thread-header {
        align-items: stretch;
        flex-direction: column;
    }

    .office-thread-message {
        max-width: 100%;
    }

    .office-messages-conversation-item {
        max-width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 899.98px) {
    .office-account-show-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .office-account-show-consumption {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .office-account-show-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .office-account-show-consumption {
        grid-column: auto;
    }
}
