:root {
    --dt-primary: #1559EA;
    --dt-secondary: #06B2A5;
    --dt-graphite: #1B222D;
    --dt-gray: #D0D3D8;
    --dt-bg: #F7F8FA;
    --dt-border: #E5E9EF;
    --dt-text: #27313F;
    --dt-muted: #6F7B8B;
    --dt-radius: 3px;
    --dt-nav: #18212D;
    --dt-nav-soft: #222D3A;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--dt-bg);
    color: var(--dt-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   Cabecera única: logo + navegación + búsqueda + alertas + perfil
   ========================================================= */
.desktodo-topbar {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, .985);
    border-bottom: 1px solid #DDE3EA;
    box-shadow: 0 2px 8px rgba(27, 34, 45, .035);
    position: relative;
    z-index: 1030;
}

.desktodo-topbar-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 22px;
    padding-right: 22px;
}

.desktodo-brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.desktodo-brand-logo {
    width: 158px;
    height: auto;
}

.desktodo-brand-icon {
    width: 38px;
    height: 38px;
}

.desktodo-topbar-nav {
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: stretch;
    gap: 0;
    white-space: nowrap;
}

.desktodo-nav-link {
    min-height: 68px;
    padding: 0 10px;
    color: #596474;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    background: transparent;
    white-space: nowrap;
    position: relative;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    transition: color .16s ease, background-color .16s ease;
}

.desktodo-nav-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #707B89;
    transition: color .16s ease;
}

.desktodo-nav-link i {
    font-size: 16px;
    line-height: 1;
}

.desktodo-nav-link:hover,
.desktodo-nav-link:focus-visible,
.desktodo-nav-dropdown.show > .desktodo-nav-link {
    color: var(--dt-primary);
    background: transparent;
}

.desktodo-nav-link:hover .desktodo-nav-icon,
.desktodo-nav-link:focus-visible .desktodo-nav-icon,
.desktodo-nav-dropdown.show > .desktodo-nav-link .desktodo-nav-icon {
    color: var(--dt-primary);
}

.desktodo-nav-link.active {
    color: var(--dt-primary);
    font-weight: 500;
}

.desktodo-nav-link.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--dt-primary);
}

.desktodo-nav-link.active .desktodo-nav-icon {
    color: var(--dt-primary);
}

.desktodo-topbar-actions {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.desktodo-search {
    width: 168px;
    height: 38px;
    display: flex;
    align-items: center;
    border: 1px solid #E2E7ED;
    border-radius: 20px;
    background: #F4F6F8;
    overflow: hidden;
    transition: width .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.desktodo-search:focus-within {
    width: 192px;
    border-color: rgba(21, 89, 234, .35);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(21, 89, 234, .08);
}

.desktodo-search-input {
    min-width: 0;
    flex: 1 1 auto;
    height: 100%;
    padding: 0 4px 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--dt-text);
    font-size: 12.5px;
}

.desktodo-search-input::placeholder {
    color: #8B95A3;
}

.desktodo-search-input::-webkit-search-cancel-button {
    opacity: .55;
}

.desktodo-search-btn {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--dt-graphite);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.desktodo-search-btn:hover {
    color: var(--dt-primary);
}

.desktodo-menu-btn,
.desktodo-icon-btn,
.desktodo-user-btn {
    border: 0;
    color: var(--dt-graphite);
}

.desktodo-menu-btn,
.desktodo-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .18s ease, background .18s ease;
}

.desktodo-menu-btn {
    background: rgba(21, 89, 234, .08);
    color: var(--dt-primary);
}

.desktodo-menu-btn:hover,
.desktodo-icon-btn:hover,
.desktodo-user-btn:hover {
    background: #F1F4F8;
    color: var(--dt-primary);
}

.desktodo-notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dt-secondary);
    box-shadow: 0 0 0 2px #fff;
}

.desktodo-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px 3px 3px;
    border-radius: 20px;
    font-size: 13px;
}

.desktodo-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F0F3F6;
    color: var(--dt-graphite);
    border: 1px solid #E0E5EB;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.desktodo-user-btn:hover .desktodo-avatar {
    color: var(--dt-primary);
    border-color: rgba(21, 89, 234, .22);
    background: rgba(21, 89, 234, .06);
}

/* Menú responsive */
.desktodo-offcanvas {
    --bs-offcanvas-width: min(92vw, 360px);
    border: 0;
    background: #fff;
    box-shadow: 20px 0 50px rgba(27, 34, 45, .16);
}

.desktodo-offcanvas-header {
    min-height: 72px;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    padding: 14px 68px 14px 18px;
    border-bottom: 1px solid var(--dt-border);
}

.desktodo-offcanvas-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}

.desktodo-offcanvas-brand img {
    width: 170px;
    max-width: 100%;
    height: auto;
}

.desktodo-offcanvas-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: #F2F5F8;
    color: var(--dt-graphite);
    font-size: 22px;
}

.desktodo-offcanvas-close:hover {
    color: var(--dt-primary);
    background: rgba(21, 89, 234, .08);
}

.desktodo-mobile-nav {
    padding: 14px 12px;
}

.desktodo-mobile-nav-link {
    min-height: 55px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 9px;
    margin-bottom: 3px;
    color: var(--dt-text);
    text-decoration: none;
    font-weight: 500;
    border: 0;
    position: relative;
    transition: color .18s ease;
}

.desktodo-mobile-nav-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #F2F5F8;
    color: var(--dt-muted);
    font-size: 20px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.desktodo-mobile-nav-arrow {
    margin-left: auto;
    color: #B2BAC5;
    font-size: 19px;
    transition: color .18s ease, transform .18s ease;
}

.desktodo-mobile-nav-link:hover {
    color: var(--dt-primary);
}

.desktodo-mobile-nav-link:hover .desktodo-mobile-nav-icon {
    background: rgba(21, 89, 234, .08);
    color: var(--dt-primary);
}

.desktodo-mobile-nav-link:hover .desktodo-mobile-nav-arrow {
    transform: translateX(2px);
}

.desktodo-mobile-nav-link.active {
    color: var(--dt-primary);
    font-weight: 650;
}

.desktodo-mobile-nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 22px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: var(--dt-secondary);
}

.desktodo-mobile-nav-link.active .desktodo-mobile-nav-icon {
    color: #fff;
    background: var(--dt-primary);
    box-shadow: 0 5px 13px rgba(21, 89, 234, .16);
}

.desktodo-mobile-nav-link.active .desktodo-mobile-nav-arrow {
    color: var(--dt-secondary);
}

.desktodo-offcanvas-footer {
    margin-top: auto;
    padding: 15px 20px;
    border-top: 1px solid var(--dt-border);
    color: var(--dt-muted);
    font-size: 12px;
    text-align: center;
}

/* Notificaciones */
.desktodo-notification-menu {
    --bs-dropdown-min-width: 370px;
    width: 370px;
    padding: 0;
    margin-top: 10px !important;
    overflow: hidden;
    border: 1px solid var(--dt-border) !important;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(27, 34, 45, .14) !important;
}

.desktodo-notification-header {
    min-height: 66px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--dt-border);
}

.desktodo-notification-header strong {
    display: block;
    color: var(--dt-graphite);
    font-size: 15px;
}

.desktodo-notification-caption {
    display: block;
    margin-top: 1px;
    color: var(--dt-muted);
    font-size: 12px;
}

.desktodo-notification-count {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(6, 178, 165, .10);
    color: #078B82;
    font-size: 11px;
    font-weight: 700;
}

.desktodo-notification-list {
    max-height: 330px;
    overflow-y: auto;
}

.desktodo-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #EFF2F5;
    transition: background .18s ease;
}

.desktodo-notification-item:hover {
    background: #F8FAFC;
}

.desktodo-notification-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 20px;
}

.desktodo-notification-icon.blue {
    color: var(--dt-primary);
    background: rgba(21, 89, 234, .09);
}

.desktodo-notification-icon.turquoise {
    color: #078F85;
    background: rgba(6, 178, 165, .10);
}

.desktodo-notification-icon.graphite {
    color: var(--dt-graphite);
    background: #EEF1F4;
}

.desktodo-notification-content {
    min-width: 0;
    display: block;
    flex: 1 1 auto;
}

.desktodo-notification-title,
.desktodo-notification-text,
.desktodo-notification-time {
    display: block;
}

.desktodo-notification-title {
    color: var(--dt-graphite);
    font-size: 13px;
    font-weight: 700;
}

.desktodo-notification-text {
    margin-top: 2px;
    color: var(--dt-muted);
    font-size: 12px;
    line-height: 1.4;
}

.desktodo-notification-time {
    margin-top: 5px;
    color: #9AA4B0;
    font-size: 11px;
}

.desktodo-notification-time i {
    margin-right: 3px;
}

.desktodo-notification-footer {
    min-height: 47px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--dt-primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
    background: #FBFCFE;
}

.desktodo-notification-footer:hover {
    color: #0E4ED5;
    background: #F6F8FC;
}

.desktodo-main {
    flex: 1 1 auto;
    width: 100%;
    padding: 30px 28px 42px;
}

.desktodo-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.desktodo-page-header > .btn {
    flex: 0 0 auto;
}

.desktodo-page-title {
    margin: 0;
    color: var(--dt-graphite);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.desktodo-page-subtitle {
    margin: 5px 0 0;
    color: var(--dt-muted);
}

.desktodo-card {
    border: 1px solid var(--dt-border);
    border-radius: var(--dt-radius);
    box-shadow: 0 5px 18px rgba(27, 34, 45, .045);
}

.desktodo-stat-card .card-body {
    padding: 21px;
}

.desktodo-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(21, 89, 234, .10);
    color: var(--dt-primary);
}

.desktodo-stat-icon.turquoise {
    background: rgba(6, 178, 165, .11);
    color: var(--dt-secondary);
}

.desktodo-stat-label {
    color: var(--dt-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.desktodo-stat-value {
    margin-top: 10px;
    font-size: 30px;
    font-weight: 750;
    color: var(--dt-graphite);
}

.desktodo-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dt-graphite);
    margin: 0;
}

.desktodo-empty-state {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--dt-muted);
}

.desktodo-empty-state > i {
    font-size: 42px;
    color: var(--dt-gray);
}

.desktodo-empty-state p {
    margin: 8px 0 0;
    max-width: 580px;
}

.desktodo-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 18px 28px;
    color: var(--dt-muted);
    font-size: 13px;
    background: rgba(247, 248, 250, .98);
    border-top: 1px solid var(--dt-border);
}

.btn-primary {
    --bs-btn-bg: var(--dt-primary);
    --bs-btn-border-color: var(--dt-primary);
    --bs-btn-hover-bg: #0E4ED5;
    --bs-btn-hover-border-color: #0E4ED5;
    --bs-btn-active-bg: #0B46C4;
    --bs-btn-active-border-color: #0B46C4;
    border-radius: 9px;
}

.dropdown-menu {
    --bs-dropdown-border-radius: 12px;
}

@media (max-width: 1199.98px) {
    .desktodo-main {
        padding-top: 26px;
    }
}

@media (max-width: 991.98px) {
    .desktodo-topbar-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .desktodo-main {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 32px;
    }

    .desktodo-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .desktodo-page-title {
        font-size: 25px;
    }
}

@media (max-width: 767.98px) {
    .desktodo-topbar-inner {
        min-height: 66px;
    }

    .desktodo-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 20px;
    }

    .desktodo-stat-value {
        font-size: 27px;
    }

    .desktodo-card .card-body.p-4 {
        padding: 20px !important;
    }

    .table-responsive {
        margin-left: -1px;
        margin-right: -1px;
    }
}

@media (max-width: 575.98px) {
    .desktodo-topbar-inner,
    .desktodo-main,
    .desktodo-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .desktodo-topbar-inner {
        gap: 10px;
    }

    .desktodo-topbar-actions {
        gap: 3px;
    }

    .desktodo-icon-btn {
        width: 39px;
        height: 39px;
    }

    .desktodo-user-btn {
        padding-right: 5px;
    }

    .desktodo-main {
        padding-top: 20px;
        padding-bottom: 26px;
    }

    .desktodo-page-title {
        font-size: 23px;
    }

    .desktodo-page-subtitle {
        font-size: 14px;
    }

    .desktodo-page-header > .btn {
        width: 100%;
    }

    .desktodo-card {
        border-radius: 12px;
    }

    .desktodo-stat-card .card-body {
        padding: 18px;
    }

    .desktodo-empty-state {
        min-height: 150px;
    }

    .desktodo-footer {
        text-align: center;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .desktodo-notification-menu {
        --bs-dropdown-min-width: calc(100vw - 28px);
        width: calc(100vw - 28px);
        max-width: 390px;
    }
}

/* Ajustes de la cabecera única por ancho de escritorio */
@media (max-width: 1399.98px) and (min-width: 1200px) {
    .desktodo-topbar-inner {
        gap: 8px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .desktodo-brand-logo {
        width: 142px;
    }

    .desktodo-nav-link {
        padding-left: 7px;
        padding-right: 7px;
        gap: 5px;
        font-size: 12.2px;
    }

    .desktodo-nav-link i {
        font-size: 15px;
    }

    .desktodo-search {
        width: 142px;
    }

    .desktodo-search:focus-within {
        width: 160px;
    }

    .desktodo-search-input {
        padding-left: 11px;
        font-size: 12px;
    }
}

@media (max-width: 1199.98px) {
    .desktodo-topbar-inner {
        min-height: 66px;
    }

    .desktodo-brand-logo {
        width: 160px;
    }
}

/* =========================================================
   Clientes
   ========================================================= */
.desktodo-check-card {
    margin: 0;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--dt-border);
    border-radius: 2px;
    background: #FAFBFC;
}

.desktodo-check-card .form-check-input {
    margin-left: -28px;
    margin-top: 3px;
}

.desktodo-check-card .form-check-label {
    display: grid;
    gap: 2px;
    color: var(--dt-text);
}

.desktodo-check-card .form-check-label span {
    color: var(--dt-muted);
    font-size: 13px;
    line-height: 1.45;
}

.desktodo-history-list {
    display: grid;
    gap: 0;
}

.desktodo-history-item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 14px 0;
    border-bottom: 1px solid var(--dt-border);
}

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

.desktodo-history-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    background: rgba(21, 89, 234, .08);
    color: var(--dt-primary);
    font-size: 19px;
}

.desktodo-history-content {
    min-width: 0;
    padding-top: 1px;
}

/* =========================================================
   Login
   ========================================================= */
.desktodo-login-body {
    background: #F4F6F9;
}

.desktodo-login-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

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

.desktodo-login-logo {
    width: 230px;
    max-width: 85%;
    height: auto;
}

.desktodo-login-card .input-group-text {
    min-width: 46px;
    justify-content: center;
    background: #F7F9FB;
    border-color: var(--dt-border);
    color: var(--dt-muted);
}

/* DataTables responsive */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background: var(--dt-primary);
    border: 0;
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .desktodo-check-card {
        padding: 13px 13px 13px 40px;
    }

    .desktodo-history-item {
        padding: 12px 0;
    }
}

.desktodo-login-link {
    color: var(--dt-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.desktodo-login-link:hover {
    color: #0E4ED5;
    text-decoration: underline;
}


/* Validaciones de formularios */
.invalid-feedback.d-block {
    margin-top: .22rem;
    font-size: .70rem;
    line-height: 1.25;
    font-weight: 400;
}

.desktodo-check-card .invalid-feedback.d-block {
    margin-top: .35rem;
}

/* Teléfonos: entrada exclusivamente numérica sin controles de incremento. */
.desktodo-phone-input::-webkit-outer-spin-button,
.desktodo-phone-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.desktodo-phone-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Selección y acciones visibles en listados */
.desktodo-bulk-toolbar {
    min-height: 48px;
    padding: 9px 12px;
    border: 1px solid var(--dt-border);
    border-radius: 2px;
    background: #F9FAFC;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.desktodo-bulk-summary,
.desktodo-bulk-actions,
.desktodo-row-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.desktodo-bulk-summary {
    color: var(--dt-muted);
    font-size: 13px;
    white-space: nowrap;
}

.desktodo-bulk-summary i {
    color: var(--dt-primary);
    font-size: 18px;
}

.desktodo-select-column {
    width: 38px !important;
    min-width: 38px;
}

.desktodo-row-check {
    width: 17px;
    height: 17px;
    margin: 0;
    cursor: pointer;
    border-color: #B7C1CE;
}

.desktodo-row-actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.desktodo-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

.desktodo-row-actions .btn i {
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 1399.98px) {
    .desktodo-row-actions .btn span {
        display: none;
    }

    .desktodo-row-actions .btn {
        width: 32px;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 767.98px) {
    .desktodo-bulk-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .desktodo-bulk-actions {
        flex-wrap: wrap;
    }

    .desktodo-bulk-actions .btn {
        flex: 1 1 auto;
    }
}

/* =========================================================
   Clientes · Ficha de edición con altura estable
   0.5.15
   ========================================================= */
#modalCliente .modal-dialog.modal-dialog-scrollable {
    height: min(760px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
}

#modalCliente .modal-content {
    height: 100%;
    max-height: none;
    overflow: hidden;
}

#modalCliente .modal-header,
#modalCliente .modal-footer,
#modalCliente .desktodo-form-tabs {
    flex: 0 0 auto;
}

#modalCliente #formCliente {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

#modalCliente .modal-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#modalCliente .tab-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

#modalCliente .desktodo-form-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

#modalCliente .desktodo-form-tabs .nav-item {
    flex: 0 0 auto;
}

#modalCliente .desktodo-form-tabs .nav-link {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    #modalCliente .modal-dialog.modal-dialog-scrollable {
        width: auto;
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        margin: 8px;
    }

    #modalCliente .modal-content {
        border-radius: 12px;
    }
}

/* =========================================================
   Clientes · Ficha de edición compacta sin scroll interno
   0.5.16
   ========================================================= */
@media (min-width: 768px) {
    #modalCliente .modal-dialog {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    #modalCliente .modal-content {
        min-height: 680px;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    #modalCliente #formCliente {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
    }

    #modalCliente .modal-body {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        overflow: visible;
    }

    #modalCliente .tab-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow: visible;
        scrollbar-gutter: auto;
    }
}

#modalCliente .desktodo-privacy-alert {
    margin: 0 0 14px;
    padding: 9px 12px;
    border: 1px solid rgba(21, 89, 234, .12);
    border-radius: 9px;
    background: rgba(21, 89, 234, .035);
    color: var(--dt-muted);
    font-size: 12px;
    line-height: 1.35;
}

#modalCliente .desktodo-privacy-alert i {
    flex: 0 0 auto;
    color: var(--dt-primary);
    font-size: 17px;
}

#modalCliente .desktodo-privacy-alert strong {
    color: var(--dt-text);
}

#modalCliente #tab-privacidad .desktodo-check-card {
    padding-top: 10px;
    padding-bottom: 10px;
}

#modalCliente #tab-privacidad textarea.form-control {
    min-height: 72px;
}

@media (max-width: 767.98px) {
    #modalCliente .modal-dialog {
        margin: 8px;
    }

    #modalCliente .modal-content {
        min-height: calc(100dvh - 16px);
        max-height: none;
        overflow: visible;
    }

    #modalCliente .modal-body,
    #modalCliente .tab-content {
        overflow: visible;
    }
}

/* =========================================================
   Clientes · Editor de notas ampliado
   0.5.17
   ========================================================= */
#modalCliente #tab-notas .note-editor {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    #modalCliente #tab-notas .note-editable {
        min-height: 240px;
    }
}


/* =========================================================
   Clientes · Contactos con acciones siempre visibles
   0.5.18
   ========================================================= */
#listaContactos {
    gap: 0 !important;
    border-top: 1px solid var(--dt-border);
}

.desktodo-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--dt-border);
}

.desktodo-contact-item.is-inactive {
    opacity: .68;
}

.desktodo-contact-avatar {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(21, 89, 234, .07);
    color: var(--dt-primary);
}

.desktodo-contact-avatar i {
    font-size: 18px;
    line-height: 1;
}

.desktodo-contact-info {
    flex: 1 1 auto;
    min-width: 0;
}

.desktodo-contact-details {
    display: grid;
    gap: 3px;
    margin-top: 7px;
}

.desktodo-contact-detail {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--dt-muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.desktodo-contact-detail i {
    flex: 0 0 15px;
    width: 15px;
    color: var(--dt-primary);
    font-size: 13px;
    line-height: 1;
    text-align: center;
}

.desktodo-contact-detail span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.desktodo-contact-role {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--dt-bg);
    color: var(--dt-muted);
    font-size: 11px;
    line-height: 1.2;
}

.desktodo-contact-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 1px;
}

.desktodo-contact-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
}

.desktodo-contact-actions .btn i {
    font-size: 17px;
    line-height: 1;
}

.desktodo-empty-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 4px;
    color: var(--dt-muted);
}

.desktodo-empty-contact > i {
    font-size: 24px;
    color: var(--dt-primary);
}

@media (max-width: 575.98px) {
    .desktodo-contact-item {
        gap: 9px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .desktodo-contact-avatar {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }

    .desktodo-contact-actions {
        gap: 4px;
    }

    .desktodo-contact-actions .btn {
        width: 32px;
        height: 32px;
    }
}

/* Directorio de clientes: cabecera y filtro de estado */
.desktodo-directory-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.desktodo-directory-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.desktodo-list-filter {
    flex: 0 0 220px;
    min-width: 220px;
}

.desktodo-list-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 7px;
    color: var(--dt-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
}

.desktodo-list-filter-label i {
    color: var(--dt-primary);
    font-size: 16px;
    line-height: 1;
}

.desktodo-list-filter .form-select {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-color: #CBD5E1;
    border-radius: 9px;
    background-color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(27, 34, 45, .04);
}

.desktodo-list-filter .form-select:hover {
    border-color: #AEBACA;
}

.desktodo-list-filter .form-select:focus {
    border-color: var(--dt-primary);
    box-shadow: 0 0 0 3px rgba(21, 89, 234, .10);
}

@media (max-width: 767.98px) {
    .desktodo-directory-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .desktodo-list-filter {
        flex-basis: auto;
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   Clientes · relaciones multimarca
   0.6.0
   ========================================================= */
.desktodo-list-filters {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

.desktodo-client-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 130px;
}

.desktodo-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(21, 89, 234, .12);
    border-radius: 999px;
    background: rgba(21, 89, 234, .055);
    color: #315078;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.desktodo-brand-badge i {
    color: var(--dt-primary);
    font-size: 13px;
    line-height: 1;
}

/* Select2 se mantiene visualmente alineado con Bootstrap 5. */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--multiple {
    min-height: 40px;
    border: 1px solid #D7DEE7;
    border-radius: 8px;
    background: #fff;
    padding: 3px 5px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--dt-primary);
    box-shadow: 0 0 0 3px rgba(21, 89, 234, .10);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    margin-top: 3px;
    margin-left: 3px;
    padding: 2px 8px 2px 24px;
    border: 1px solid rgba(21, 89, 234, .14);
    border-radius: 999px;
    background: rgba(21, 89, 234, .065);
    color: #315078;
    font-size: 12px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    height: 100%;
    padding: 0 6px;
    border-right: 0;
    color: var(--dt-muted);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: transparent;
    color: #DC3545;
}

.select2-container .select2-selection.is-invalid {
    border-color: #DC3545 !important;
    box-shadow: none;
}

.select2-container .select2-selection.is-valid {
    border-color: #198754 !important;
}

.select2-dropdown {
    border-color: #D7DEE7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(27, 34, 45, .10);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--dt-primary);
}

@media (max-width: 991.98px) {
    .desktodo-list-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .desktodo-list-filters .desktodo-list-filter {
        flex: 1 1 220px;
    }
}

@media (max-width: 575.98px) {
    .desktodo-list-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .desktodo-list-filters .desktodo-list-filter {
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   Navegación · Ventas agrupadas
   ========================================================= */
.desktodo-nav-dropdown {
    display: inline-flex;
    align-items: stretch;
}

.desktodo-nav-dropdown-toggle {
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.desktodo-nav-caret {
    margin-left: 0;
    color: #8C96A3;
    font-size: 13px !important;
    opacity: 1;
    transition: transform .16s ease, color .16s ease;
}

.desktodo-nav-dropdown.show .desktodo-nav-caret,
.desktodo-nav-dropdown-toggle:hover .desktodo-nav-caret,
.desktodo-nav-dropdown-toggle.active .desktodo-nav-caret {
    color: var(--dt-primary);
}

.desktodo-nav-dropdown.show .desktodo-nav-caret {
    transform: rotate(180deg);
}

.desktodo-nav-dropdown-menu {
    min-width: 215px;
    margin-top: -1px !important;
    padding: 6px;
    border: 1px solid #E1E6EC;
    border-radius: 6px;
    background: #FFFFFF;
    box-shadow: 0 10px 25px rgba(27, 34, 45, .10);
}

.desktodo-nav-dropdown-menu .dropdown-item {
    min-height: 38px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 5px;
    color: #596474;
    font-size: 13.5px;
    font-weight: 400;
}

.desktodo-nav-dropdown-menu .dropdown-item i {
    width: 19px;
    color: #798493;
    font-size: 16px;
    text-align: center;
}

.desktodo-nav-dropdown-menu .dropdown-item:hover,
.desktodo-nav-dropdown-menu .dropdown-item:focus {
    background: #F6F8FB;
    color: var(--dt-primary);
}

.desktodo-nav-dropdown-menu .dropdown-item:hover i,
.desktodo-nav-dropdown-menu .dropdown-item:focus i {
    color: var(--dt-primary);
}

.desktodo-nav-dropdown-menu .dropdown-item.active {
    background: #F3F7FF;
    color: var(--dt-primary);
    font-weight: 500;
}

.desktodo-nav-dropdown-menu .dropdown-item.active i {
    color: var(--dt-primary);
}

.desktodo-mobile-nav-group {
    margin-bottom: 3px;
}

.desktodo-mobile-nav-parent {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 9px;
    color: var(--dt-text);
    font-weight: 600;
}

.desktodo-mobile-nav-group.active .desktodo-mobile-nav-parent {
    color: var(--dt-primary);
}

.desktodo-mobile-nav-group.active .desktodo-mobile-nav-icon {
    background: rgba(21, 89, 234, .10);
    color: var(--dt-primary);
}

.desktodo-mobile-nav-children {
    margin: -2px 0 5px 54px;
    padding-left: 10px;
    border-left: 1px solid #E3E8EF;
}

.desktodo-mobile-nav-child {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    color: var(--dt-muted);
    text-decoration: none;
    font-size: 13.5px;
    position: relative;
}

.desktodo-mobile-nav-child > i:first-child {
    width: 19px;
    color: #8B96A5;
    font-size: 16px;
}

.desktodo-mobile-nav-child:hover,
.desktodo-mobile-nav-child.active {
    color: var(--dt-primary);
}

.desktodo-mobile-nav-child.active {
    font-weight: 600;
}

.desktodo-mobile-nav-child.active > i:first-child,
.desktodo-mobile-nav-child.active .desktodo-mobile-nav-arrow {
    color: var(--dt-primary);
}


/* =========================================================
   DESKTODO · lenguaje visual rectilíneo
   0.6.4
   ========================================================= */
:root {
    --bs-border-radius: 2px;
    --bs-border-radius-sm: 2px;
    --bs-border-radius-lg: 3px;
    --bs-border-radius-xl: 3px;
    --bs-border-radius-xxl: 3px;
    --bs-border-radius-pill: 2px;
}

/* Superficies, formularios y controles: esquinas mínimas. */
.card,
.desktodo-card,
.modal-content,
.dropdown-menu,
.form-control,
.form-select,
.input-group-text,
.btn,
.alert,
.nav-tabs .nav-link,
.desktodo-search,
.desktodo-user-btn,
.desktodo-offcanvas-close,
.desktodo-mobile-nav-icon,
.desktodo-notification-menu,
.desktodo-notification-count,
.desktodo-stat-icon,
.desktodo-check-card,
.desktodo-bulk-toolbar,
.desktodo-row-actions .btn,
#modalCliente .desktodo-privacy-alert,
.desktodo-contact-avatar,
.desktodo-contact-actions .btn,
.desktodo-list-filter .form-select,
.desktodo-brand-badge,
.desktodo-contact-role,
.select2-container .select2-selection--multiple,
.select2-container .select2-selection--single,
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-dropdown,
.desktodo-nav-dropdown-menu,
.desktodo-nav-dropdown-menu .dropdown-item {
    border-radius: 2px !important;
}

/* Mantener circulares solo los elementos cuya función visual lo requiere. */
.desktodo-avatar,
.desktodo-notification-dot {
    border-radius: 50% !important;
}

/* Botones de icono: compactos pero no circulares. */
.desktodo-menu-btn,
.desktodo-icon-btn {
    border-radius: 2px;
}

/* La línea de navegación activa también queda recta. */
.desktodo-nav-link.active::after,
.desktodo-mobile-nav-link.active::before {
    border-radius: 0;
}

/* Paginación DataTables coherente con el resto del sistema. */
.dataTables_wrapper .pagination .page-link,
.dt-container .pagination .page-link {
    border-radius: 2px !important;
}

/* =========================================================
   Cotizaciones · ajustes de controles 0.7.8
   ========================================================= */
#formNuevaCotizacion .form-select {
    border-radius: 0 !important;
}

#formNuevaCotizacion #cot_marca_id,
#formNuevaCotizacion #cot_cliente_id {
    min-height: 38px;
    padding-top: .375rem;
    padding-bottom: .375rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* El selector de código debe verse como un control auxiliar compacto,
   no como un select principal del formulario. */
.desktodo-quote-items td:first-child .select2-container {
    width: 276px !important;
    min-width: 276px !important;
    max-width: 276px !important;
}

.desktodo-quote-items .item-codigo,
.desktodo-quote-items .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 11.5px !important;
}

.desktodo-code-dropdown .select2-results__message,
.desktodo-code-dropdown .select2-results__option {
    font-size: 10.5px !important;
}

/* =========================================================
   Cotizaciones · motor autónomo 0.7.1
   ========================================================= */
.desktodo-static-field {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    border: 1px solid #D7DEE7;
    background: #F7F8FA;
    color: var(--dt-text);
    font-weight: 600;
}

.desktodo-quote-items th {
    color: #657180;
    background: #F7F8FA;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.desktodo-quote-items td {
    padding-top: 10px;
    padding-bottom: 10px;
    border-color: #EDF0F3;
}

.desktodo-quote-items .form-control-sm,
.desktodo-quote-items .form-select-sm,
.desktodo-quote-items .input-group-sm > .form-control,
.desktodo-quote-items .input-group-sm > .input-group-text {
    min-height: 34px;
    font-size: 12.5px;
}


.desktodo-quote-items .select2-container {
    min-width: 0;
}

.desktodo-quote-items .select2-container .select2-selection--single {
    height: 28px;
    min-height: 28px;
    border: 1px solid #BFC8D3;
    border-radius: 0 !important;
    background: #FFFFFF;
}

.desktodo-quote-items .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 7px;
    padding-right: 22px;
    color: var(--dt-text);
    font-size: 11.5px !important;
    font-weight: 400;
    line-height: 26px !important;
}

.desktodo-quote-items .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #8A95A3;
}

.desktodo-quote-items .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 26px;
}

.desktodo-quote-items .select2-container--default.select2-container--focus .select2-selection--single,
.desktodo-quote-items .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--dt-primary);
    box-shadow: 0 0 0 2px rgba(21, 89, 234, .10);
}

.desktodo-quote-items .select2-container--disabled .select2-selection--single {
    background: #F3F5F7;
    color: #8A95A3;
}

.desktodo-code-dropdown {
    border-radius: 0 !important;
}

.desktodo-code-dropdown .select2-search--dropdown {
    padding: 4px;
}

.desktodo-code-dropdown .select2-search__field {
    height: 27px;
    min-height: 27px;
    padding: 3px 6px;
    border: 1px solid #BFC8D3 !important;
    border-radius: 0 !important;
    font-size: 10.5px !important;
    text-transform: uppercase;
    outline: 0;
}

.desktodo-code-dropdown .select2-results__option {
    padding: 4px 6px !important;
    font-size: 10.5px !important;
    line-height: 1.15 !important;
}

.desktodo-code-result-main {
    overflow: hidden;
    color: var(--dt-text);
    font-size: 10.5px !important;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktodo-code-result-code {
    font-weight: 700;
}

.desktodo-code-result-name {
    color: #4F5B69;
    font-weight: 400;
}

.desktodo-code-result-meta {
    margin-top: 1px;
    overflow: hidden;
    color: #87919D;
    font-size: 9.5px !important;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktodo-code-dropdown .select2-results__options {
    max-height: 170px !important;
}

.desktodo-code-dropdown .select2-results__option--highlighted.select2-results__option--selectable .desktodo-code-result-code,
.desktodo-code-dropdown .select2-results__option--highlighted.select2-results__option--selectable .desktodo-code-result-name,
.desktodo-code-dropdown .select2-results__option--highlighted.select2-results__option--selectable .desktodo-code-result-meta {
    color: #FFFFFF;
}

.desktodo-quote-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 15px 16px;
    border: 1px solid #DDE4EC;
    border-left: 3px solid var(--dt-primary);
    background: #F8FAFD;
    color: #5D6876;
    font-size: 12.5px;
    line-height: 1.45;
}

.desktodo-quote-note > i {
    color: var(--dt-primary);
    font-size: 19px;
    line-height: 1;
}

.desktodo-quote-note strong,
.desktodo-quote-note span {
    display: block;
}

.desktodo-quote-note strong {
    margin-bottom: 3px;
    color: var(--dt-text);
}

.desktodo-quote-totals {
    height: 100%;
    padding: 12px 16px;
    border: 1px solid #DDE4EC;
    background: #FFFFFF;
}

.desktodo-quote-totals > div {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #EDF0F3;
    color: #5D6876;
    font-size: 13px;
}

.desktodo-quote-totals > div:last-child {
    border-bottom: 0;
}

.desktodo-quote-totals strong {
    color: var(--dt-text);
    font-size: 14px;
}

.desktodo-quote-totals .total {
    min-height: 44px;
    color: var(--dt-text);
    font-size: 14px;
    font-weight: 600;
}

.desktodo-quote-totals .total strong {
    color: var(--dt-primary);
    font-size: 20px;
}

#tablaCotizaciones .dtr-control {
    cursor: pointer;
}

#tablaCotizaciones .desktodo-cotizacion-folio-cell {
    min-width: 142px;
}

#tablaCotizaciones .desktodo-cotizacion-folio-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

#tablaCotizaciones .desktodo-cotizacion-fecha {
    display: block;
    color: #7A8695;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

#tablaCotizaciones .desktodo-cotizacion-folio {
    display: inline-block;
    color: var(--dt-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

#tablaCotizaciones .desktodo-cotizacion-folio:hover,
#tablaCotizaciones .desktodo-cotizacion-folio:focus {
    color: var(--dt-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}


.desktodo-quote-items .item-categoria,
.desktodo-quote-items .item-producto,
.desktodo-quote-items .item-periodicidad,
.desktodo-quote-items .item-tipo,
.desktodo-quote-items .item-valor-display {
    display: inline-block;
    font-size: 12.5px;
    line-height: 1.35;
}

.desktodo-quote-items .item-producto {
    color: var(--dt-text);
    font-weight: 600;
}

#formNuevaCotizacion input[readonly] {
    background: #F7F8FA;
    color: #4E5967;
}

#cotTipoClienteBadge {
    border-radius: 2px !important;
    color: #5D6876 !important;
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .desktodo-quote-items,
    .desktodo-quote-items tbody,
    .desktodo-quote-items tr,
    .desktodo-quote-items td {
        display: block;
        width: 100%;
    }

    .desktodo-quote-items thead {
        display: none;
    }

    .desktodo-quote-items tbody tr {
        padding: 12px;
        border-bottom: 1px solid #DDE4EC;
    }

    .desktodo-quote-items td {
        position: relative;
        padding: 5px 0 5px 104px;
        border: 0;
    }

    .desktodo-quote-items td::before {
        position: absolute;
        left: 0;
        top: 12px;
        width: 94px;
        color: #7A8593;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .desktodo-quote-items td:nth-child(1)::before { content: 'Código'; }
    .desktodo-quote-items td:nth-child(2)::before { content: 'Categoría'; }
    .desktodo-quote-items td:nth-child(3)::before { content: 'Producto'; }
    .desktodo-quote-items td:nth-child(4)::before { content: 'Periodicidad'; }
    .desktodo-quote-items td:nth-child(5)::before { content: 'Tipo'; }
    .desktodo-quote-items td:nth-child(6)::before { content: 'Valor neto'; }
    .desktodo-quote-items td:nth-child(7) {
        padding-left: 0;
        text-align: right;
    }
    .desktodo-quote-items td:nth-child(7)::before { content: none; }

    .desktodo-quote-items td:first-child .select2-container {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}


/* =========================================================
   Listados DataTables · ajuste visual 0.7.3
   ========================================================= */
.desktodo-data-list {
    overflow: visible;
}

.desktodo-data-list .dt-container,
.desktodo-data-list .dataTables_wrapper {
    width: 100%;
}

.desktodo-data-list .dt-layout-row,
.desktodo-data-list .dataTables_wrapper > .row {
    margin: 0;
}

.desktodo-data-list .dt-layout-row:first-child,
.desktodo-data-list .dataTables_wrapper > .row:first-child {
    min-height: 38px;
    margin-bottom: 12px;
    align-items: center;
}

.desktodo-data-list .dt-layout-row:last-child,
.desktodo-data-list .dataTables_wrapper > .row:last-child {
    min-height: 32px;
    margin-top: 12px;
    align-items: center;
}

.desktodo-data-list .dt-length,
.desktodo-data-list .dt-search,
.desktodo-data-list .dataTables_length,
.desktodo-data-list .dataTables_filter {
    color: #56616F;
    font-size: 12.5px;
}

.desktodo-data-list .dt-length label,
.desktodo-data-list .dt-search label,
.desktodo-data-list .dataTables_length label,
.desktodo-data-list .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    white-space: nowrap;
}

.desktodo-data-list .dt-length select,
.desktodo-data-list .dataTables_length select {
    width: 68px;
    min-width: 68px;
    height: 34px;
    margin: 0 2px;
    padding-top: 4px;
    padding-bottom: 4px;
    border: 1px solid #D7DEE7;
    border-radius: 2px !important;
    background-color: #FFFFFF;
    color: var(--dt-text);
    font-size: 12.5px;
}

.desktodo-data-list .dt-search input,
.desktodo-data-list .dataTables_filter input {
    width: 190px;
    height: 34px;
    margin-left: 0 !important;
    padding: 5px 9px;
    border: 1px solid #D7DEE7;
    border-radius: 2px !important;
    background: #FFFFFF;
    color: var(--dt-text);
    font-size: 12.5px;
    outline: 0;
}

.desktodo-data-list .dt-search input:focus,
.desktodo-data-list .dataTables_filter input:focus,
.desktodo-data-list .dt-length select:focus,
.desktodo-data-list .dataTables_length select:focus {
    border-color: rgba(21, 89, 234, .55);
    box-shadow: 0 0 0 2px rgba(21, 89, 234, .07);
}

.desktodo-data-list table.dataTable,
.desktodo-data-list table.desktodo-table {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0;
}

.desktodo-data-list table.dataTable > thead > tr > th,
.desktodo-data-list table.dataTable > thead > tr > td,
.desktodo-data-list table.desktodo-table > thead > tr > th {
    padding: 10px 24px 10px 10px;
    border-top: 1px solid #E2E7ED;
    border-bottom: 1px solid #DCE2E9;
    background: #F8F9FB;
    color: #4F5B69;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
}

.desktodo-data-list table.dataTable > thead > tr > th:first-child,
.desktodo-data-list table.desktodo-table > thead > tr > th:first-child {
    padding-left: 12px;
}

.desktodo-data-list table.dataTable > thead > tr > th:last-child,
.desktodo-data-list table.desktodo-table > thead > tr > th:last-child {
    padding-right: 10px;
}

.desktodo-data-list table.dataTable > tbody > tr > td,
.desktodo-data-list table.desktodo-table > tbody > tr > td {
    padding: 10px;
    border-top: 0;
    border-bottom: 1px solid #E7EBF0;
    background: #FFFFFF;
    color: #26313E;
    font-size: 12.8px;
    line-height: 1.35;
    vertical-align: middle;
}

.desktodo-data-list table.dataTable > tbody > tr > td:first-child,
.desktodo-data-list table.desktodo-table > tbody > tr > td:first-child {
    padding-left: 12px;
}

.desktodo-data-list table.dataTable > tbody > tr > td:last-child,
.desktodo-data-list table.desktodo-table > tbody > tr > td:last-child {
    padding-right: 8px;
}

.desktodo-data-list table.dataTable > tbody > tr:hover > td {
    background: #FBFCFE;
}

.desktodo-data-list table.dataTable > tbody > tr:last-child > td,
.desktodo-data-list table.desktodo-table > tbody > tr:last-child > td {
    border-bottom-color: #DCE2E9;
}

.desktodo-data-list table.dataTable > tbody > tr > td.dt-empty,
.desktodo-data-list table.dataTable > tbody > tr > td.dataTables_empty {
    height: 92px;
    padding: 28px 16px !important;
    color: var(--dt-muted);
    background: #FFFFFF;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
}

.desktodo-data-list table.dataTable thead .dt-column-order {
    right: 6px !important;
    opacity: .28;
}

.desktodo-data-list table.dataTable thead th:hover .dt-column-order {
    opacity: .55;
}

.desktodo-table-primary {
    color: #18212D;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
}

.desktodo-table-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    color: #7A8593;
    font-size: 11px;
    line-height: 1.2;
}

.desktodo-table-meta > span + span::before {
    content: "·";
    margin-right: 5px;
    color: #B0B8C2;
}

.desktodo-table-code {
    color: #4D5967;
    font-weight: 600;
}

.desktodo-data-list .badge {
    border-radius: 2px !important;
    padding: 3px 5px;
    font-size: 10.5px;
    font-weight: 600;
}

.desktodo-data-list .desktodo-brand-badge {
    padding: 3px 6px;
    font-size: 10.5px;
    line-height: 1.25;
}

.desktodo-data-list .desktodo-row-actions {
    gap: 4px;
}

.desktodo-data-list .desktodo-row-actions .btn {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    height: 30px;
    padding: 0;
    border-radius: 2px !important;
}

.desktodo-data-list .desktodo-row-actions .btn i {
    font-size: 15px;
}

.desktodo-data-list .dt-info,
.desktodo-data-list .dataTables_info {
    padding-top: 0 !important;
    color: #7A8593;
    font-size: 11.5px;
}

.desktodo-data-list .dt-paging,
.desktodo-data-list .dataTables_paginate {
    padding-top: 0 !important;
}

.desktodo-data-list .pagination {
    gap: 3px;
    margin: 0;
}

.desktodo-data-list .pagination .page-item .page-link {
    min-width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border: 1px solid #DCE2E9;
    border-radius: 2px !important;
    background: #FFFFFF;
    color: #5E6976;
    font-size: 11px;
    line-height: 1;
    box-shadow: none;
}

.desktodo-data-list .pagination .page-item.active .page-link {
    border-color: var(--dt-primary);
    background: var(--dt-primary);
    color: #FFFFFF;
}

.desktodo-data-list .pagination .page-item.disabled .page-link {
    background: #F5F7F9;
    color: #A3ABB5;
}

.desktodo-data-list table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control {
    position: relative;
    padding-left: 34px !important;
    cursor: pointer;
}

.desktodo-data-list table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
    left: 11px;
    top: 50%;
    width: 15px;
    height: 15px;
    margin-top: -8px;
    border: 0;
    border-radius: 2px;
    box-shadow: none;
    background: var(--dt-primary);
    color: #FFFFFF;
    font-size: 11px;
    line-height: 15px;
}

.desktodo-data-list table.dataTable > tbody > tr.child > td,
.desktodo-data-list table.dataTable > tbody > tr.dtr-expanded + tr > td {
    background: #FAFBFD;
}

.desktodo-data-list ul.dtr-details {
    width: 100%;
    margin: 0;
}

.desktodo-data-list ul.dtr-details > li {
    display: grid;
    grid-template-columns: minmax(105px, 32%) 1fr;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #E8ECF1;
}

.desktodo-data-list ul.dtr-details > li:last-child {
    border-bottom: 0;
}

.desktodo-data-list .dtr-title {
    color: #697583;
    font-size: 11px;
    font-weight: 600;
}

.desktodo-data-list .dtr-data {
    min-width: 0;
    color: var(--dt-text);
    font-size: 12px;
}

@media (max-width: 767.98px) {
    .desktodo-data-list {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .desktodo-data-list .dt-layout-row:first-child,
    .desktodo-data-list .dataTables_wrapper > .row:first-child {
        gap: 9px;
        margin-bottom: 10px;
    }

    .desktodo-data-list .dt-layout-cell,
    .desktodo-data-list .dataTables_wrapper > .row:first-child > div {
        width: 100%;
    }

    .desktodo-data-list .dt-length,
    .desktodo-data-list .dt-search,
    .desktodo-data-list .dataTables_length,
    .desktodo-data-list .dataTables_filter {
        width: 100%;
        text-align: left !important;
    }

    .desktodo-data-list .dt-search label,
    .desktodo-data-list .dataTables_filter label {
        width: 100%;
    }

    .desktodo-data-list .dt-search input,
    .desktodo-data-list .dataTables_filter input {
        width: 100%;
        flex: 1 1 auto;
    }

    .desktodo-data-list table.dataTable > thead > tr > th,
    .desktodo-data-list table.desktodo-table > thead > tr > th,
    .desktodo-data-list table.dataTable > tbody > tr > td,
    .desktodo-data-list table.desktodo-table > tbody > tr > td {
        font-size: 12px;
    }

    .desktodo-data-list .dt-layout-row:last-child,
    .desktodo-data-list .dataTables_wrapper > .row:last-child {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .desktodo-data-list .dt-info,
    .desktodo-data-list .dataTables_info {
        text-align: center !important;
    }

    .desktodo-data-list .dt-paging,
    .desktodo-data-list .dataTables_paginate {
        display: flex;
        justify-content: center;
        text-align: center !important;
    }
}

/* =========================================================
   Productos / Servicios 0.7.4
   ========================================================= */
#productosModulo #btnFiltrarProductos {
    min-height: 38px;
}

#tablaProductos th:first-child,
#tablaProductos td:first-child {
    min-width: 245px;
}

#tablaProductos .desktodo-table-primary {
    font-size: 13.2px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    #productosModulo #btnFiltrarProductos {
        width: 100%;
    }

    #tablaProductos th:first-child,
    #tablaProductos td:first-child {
        min-width: 0;
    }
}

/* =========================================================
   Cotizaciones / Configuración multimarca · 0.8.0
   ========================================================= */
.desktodo-price-editable {
    cursor: pointer;
    font-weight: 600;
    transition: color .15s ease;
}

.desktodo-price-editable:hover {
    color: var(--dt-primary);
}

.desktodo-price-swal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 12px;
    text-align: left;
    font-size: 12px;
}

.desktodo-price-swal-info span {
    color: #6B7684;
}

.desktodo-brand-logo-preview {
    min-height: 126px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 1px solid #DDE4EC;
    border-radius: 0;
    background: #FAFBFC;
}

.desktodo-brand-logo-preview img {
    display: block;
    max-width: 100%;
    max-height: 96px;
    object-fit: contain;
}

#formConfiguracionCotizacion .form-control,
#formConfiguracionCotizacion .form-select,
#formConfiguracionCotizacion .input-group-text,
#formConfiguracionCotizacion .note-editor,
#formConfiguracionCotizacion .note-toolbar,
#formConfiguracionCotizacion .note-statusbar,
#formConfiguracionCotizacion .note-btn,
#formConfiguracionCotizacion .dropdown-menu {
    border-radius: 0 !important;
}

#formConfiguracionCotizacion .form-control-color {
    width: 52px;
    min-width: 52px;
    padding: 4px;
}

.desktodo-condition-item {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #DDE4EC;
    border-radius: 0;
    background: #FFFFFF;
}

.desktodo-condition-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.desktodo-condition-number {
    color: var(--dt-primary);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.desktodo-condition-actions {
    display: flex;
    gap: 4px;
}

.desktodo-condition-actions .btn {
    min-width: 30px;
    border-radius: 0 !important;
}

.desktodo-quote-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 26px;
}

.desktodo-quote-detail-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 0;
    border-bottom: 1px solid #EDF0F3;
}

.desktodo-quote-detail-row span {
    color: #7A8593;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.desktodo-quote-detail-row strong {
    color: var(--dt-text);
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.desktodo-quote-detail-row--full {
    grid-column: 1 / -1;
}

.desktodo-quote-detail-row--hash strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    word-break: break-all;
}

.desktodo-detail-items th {
    padding: 10px 14px;
    color: #657180;
    background: #F7F8FA;
    border-bottom: 1px solid #E5E9EE;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.desktodo-detail-items td {
    padding: 11px 14px;
    border-color: #EDF0F3;
    font-size: 12px;
}

.desktodo-quote-history {
    position: relative;
}

.desktodo-quote-history-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 10px;
    padding: 0 0 14px;
}

.desktodo-quote-history-item:last-child {
    padding-bottom: 0;
}

.desktodo-quote-history-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--dt-primary);
}

.desktodo-quote-history-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.desktodo-quote-history-item strong {
    color: var(--dt-text);
    font-size: 12.5px;
    font-weight: 600;
}

.desktodo-quote-history-item span {
    color: #7A8593;
    font-size: 11px;
}

@media (max-width: 767.98px) {
    .desktodo-condition-head {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .desktodo-condition-actions {
        grid-column: 2;
        justify-content: flex-end;
    }

    .desktodo-quote-detail-grid {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   COTIZACIONES · SEGUIMIENTO COMERCIAL 0.8.5
   ================================================================ */
.desktodo-quote-comment-form {
    padding: 14px 0 16px;
    border-top: 1px solid #E5E9EE;
    border-bottom: 1px solid #E5E9EE;
}

.desktodo-quote-comment-row + .desktodo-quote-comment-row {
    margin-top: 12px;
}

.desktodo-quote-comment-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.desktodo-quote-comment-form .form-control,
.desktodo-quote-comment-form .form-select,
.desktodo-quote-comment-form .btn {
    border-radius: 0 !important;
}

.desktodo-quote-comment-form .form-label {
    margin-bottom: 5px;
    color: #5F6C7B;
    font-size: 11px;
    font-weight: 600;
}

.desktodo-quote-comment-form textarea {
    min-height: 56px;
    resize: vertical;
    font-size: 12px;
    line-height: 1.4;
}

.desktodo-quote-comment-form .form-select {
    width: 100%;
    min-height: 31px;
    font-size: 12px;
}

.desktodo-quote-comment-form .btn {
    min-width: 170px;
    min-height: 31px;
    white-space: nowrap;
}

.desktodo-quote-history-item {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding: 0 0 16px;
    position: relative;
}

.desktodo-quote-history-item::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 1px;
    background: #E5E9EE;
}

.desktodo-quote-history-item:last-child::before {
    display: none;
}

.desktodo-quote-history-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #DCE2E8;
    border-radius: 2px;
    color: #6B7785;
    background: #FFFFFF;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.desktodo-quote-history-item.comentario .desktodo-quote-history-icon {
    color: var(--dt-primary);
    border-color: rgba(21, 89, 234, .28);
    background: #F8FAFF;
}

.desktodo-quote-history-content {
    display: block !important;
    min-width: 0;
    padding-top: 1px;
}

.desktodo-quote-history-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.desktodo-quote-history-head strong {
    color: var(--dt-text);
    font-size: 12px;
    font-weight: 650;
}

.desktodo-quote-history-head span,
.desktodo-quote-history-author {
    color: #7A8593;
    font-size: 10.5px;
    white-space: nowrap;
}

.desktodo-quote-history-text {
    display: block !important;
    margin-top: 4px;
    color: #394553;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.desktodo-quote-history-author {
    display: block;
    margin-top: 4px;
}

@media (max-width: 767.98px) {
    .desktodo-quote-history-head {
        align-items: flex-start;
        flex-direction: column !important;
        gap: 2px;
    }

    .desktodo-quote-history-head span,
    .desktodo-quote-history-author {
        white-space: normal;
    }
}

/* =========================================================
   Cotizaciones · Revisiones y descuentos · 0.9.0
   ========================================================= */
.desktodo-discount-editable {
    cursor: pointer;
    transition: color .15s ease;
}

.desktodo-discount-editable:hover,
.desktodo-discount-editable:focus {
    color: var(--dt-primary);
    outline: 0;
}

#tablaCotizaciones .desktodo-cotizacion-revision {
    display: block;
    margin-top: 1px;
    color: #7A8593;
    font-size: 10px;
    line-height: 1.15;
}

#detalleRevisionesCotizacion th,
#detalleRevisionesCotizacion td {
    font-size: 12px;
}

/* =========================================================
   Configuración 0.10.0
   ========================================================= */
.desktodo-settings-nav-wrap {
    position: sticky;
    top: 82px;
}

.desktodo-settings-nav {
    border: 1px solid #E1E6EC;
    background: #FFFFFF;
}

.desktodo-settings-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #EEF1F4;
    border-radius: 0;
    color: #4A5562;
    background: #FFFFFF;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    transition: color .12s ease, background-color .12s ease;
}

.desktodo-settings-nav-item:last-child {
    border-bottom: 0;
}

.desktodo-settings-nav-item i {
    width: 20px;
    color: #74808D;
    font-size: 18px;
    line-height: 1;
}

.desktodo-settings-nav-item:hover {
    color: var(--dt-primary);
    background: #FAFBFC;
}

.desktodo-settings-nav-item.active {
    color: var(--dt-primary);
    background: #F7F9FC;
    box-shadow: inset 3px 0 0 var(--dt-primary);
    font-weight: 600;
}

.desktodo-settings-nav-item.active i {
    color: var(--dt-primary);
}

.desktodo-settings-section .form-control,
.desktodo-settings-section .form-select,
.desktodo-settings-section .input-group-text,
#modalConfiguracionUsuario .form-control,
#modalConfiguracionUsuario .form-select,
#modalConfiguracionUsuario .modal-content {
    border-radius: 0 !important;
}

.desktodo-settings-table {
    font-size: 12.5px;
}

.desktodo-settings-table thead th {
    color: #59636F;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
}

.desktodo-cell-main {
    color: #252D36;
    font-weight: 600;
}

.desktodo-cell-meta {
    margin-top: 2px;
    color: #7A8591;
    font-size: 10.5px;
    line-height: 1.25;
}

.desktodo-status-text {
    font-size: 11px;
    font-weight: 700;
}

.desktodo-status-text.is-active { color: #16754B; }
.desktodo-status-text.is-inactive { color: #8A3F3F; }

.desktodo-inline-actions {
    display: inline-flex;
    gap: 4px;
    white-space: nowrap;
}

.desktodo-inline-actions .btn {
    min-width: 30px;
    border-radius: 0 !important;
}

.desktodo-role-select-wrap {
    min-width: 230px;
}

.desktodo-permissions-matrix {
    border-top: 1px solid #E5E9EE;
}

.desktodo-permission-group {
    display: grid;
    grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid #EEF1F4;
}

.desktodo-permission-module {
    color: #27313B;
    font-size: 12.5px;
    font-weight: 700;
}

.desktodo-permission-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

.desktodo-permission-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.desktodo-permission-option .form-check-input {
    margin-top: 3px;
    border-radius: 0 !important;
}

.desktodo-permission-option strong,
.desktodo-permission-option small {
    display: block;
}

.desktodo-permission-option strong {
    color: #303944;
    font-size: 11.5px;
    line-height: 1.2;
}

.desktodo-permission-option small {
    margin-top: 1px;
    color: #7B8692;
    font-size: 10.5px;
    line-height: 1.25;
}

.desktodo-settings-placeholder {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
}

.desktodo-settings-placeholder > i {
    color: var(--dt-primary);
    font-size: 30px;
    line-height: 1;
}

.desktodo-audit-result {
    font-size: 10.5px;
    font-weight: 800;
}

.desktodo-audit-result.is-ok { color: #16754B; }
.desktodo-audit-result.is-error { color: #B42318; }
.desktodo-audit-result.is-denegado { color: #9A6700; }

.desktodo-audit-changes {
    max-width: 520px;
    margin-top: 3px;
    color: #6D7783;
    font-size: 10.5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.desktodo-log-viewer {
    min-height: 330px;
    max-height: 620px;
    margin: 0;
    padding: 14px;
    overflow: auto;
    border: 1px solid #DDE3E9;
    border-radius: 0;
    color: #26313C;
    background: #F8FAFC;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1199.98px) {
    .desktodo-settings-nav-wrap { position: static; }
}

@media (max-width: 767.98px) {
    .desktodo-permission-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .desktodo-permission-options {
        grid-template-columns: 1fr;
    }
    .desktodo-role-select-wrap {
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   Configuración 0.10.1
   ========================================================= */
.desktodo-brand-logo-preview {
    width: 100%;
    aspect-ratio: 3 / 1;
    min-height: 0;
    max-height: 130px;
    padding: 12px;
}

.desktodo-brand-logo-preview img,
.desktodo-brand-logo-preview svg {
    width: 100%;
    height: 100%;
    max-width: 320px;
    max-height: 100px;
    object-fit: contain;
}

.desktodo-exchange-box {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #DDE4EC;
    background: #FFFFFF;
}
.desktodo-exchange-adjust {
    width: 130px;
    margin-left: auto;
}
.desktodo-exchange-adjust label {
    display: block;
    margin-bottom: 3px;
    color: #707B87;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.desktodo-integration-card {
    padding: 20px 0;
    border-top: 1px solid #E3E8ED;
}
.desktodo-integration-card:first-child {
    padding-top: 0;
    border-top: 0;
}
.desktodo-integration-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}
.desktodo-integration-head h3 {
    margin: 0 0 3px;
    color: #202830;
    font-size: 15px;
    font-weight: 700;
}
.desktodo-integration-head p {
    margin: 0;
    color: #707B87;
    font-size: 12px;
}
.desktodo-user-avatar-preview {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #D9E0E7;
    background: #F7F9FB;
    color: #8B96A2;
}
.desktodo-user-avatar-preview i {
    font-size: 72px;
}
.desktodo-user-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.desktodo-back-link {
    color: #66717D;
    font-size: 12px;
    text-decoration: none;
}
.desktodo-back-link:hover {
    color: var(--dt-primary);
}
@media (max-width: 767.98px) {
    .desktodo-exchange-box {
        flex-wrap: wrap;
    }
    .desktodo-exchange-adjust {
        width: 100%;
        order: 3;
    }
}

.desktodo-exchange-box > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.desktodo-exchange-code {
    color: #707B87;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
}

.desktodo-exchange-box strong {
    color: #202830;
    font-size: 17px;
    font-weight: 700;
}

.desktodo-exchange-box small {
    color: #7A8591;
    font-size: 10.5px;
}

.desktodo-flat-tabs {
    border-bottom: 1px solid #E3E8ED;
}

.desktodo-flat-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0 !important;
    color: #5C6672;
    background: transparent;
    font-size: 12.5px;
}

.desktodo-flat-tabs .nav-link.active {
    border-bottom-color: var(--dt-primary);
    color: var(--dt-primary);
    background: transparent;
}

.desktodo-contract-clause {
    padding: 14px 0;
    border-top: 1px solid #EDF0F3;
}

.desktodo-contract-clause:first-child {
    border-top: 0;
}

.desktodo-contract-clause-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 160px 42px;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}

.desktodo-contract-clause-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--dt-primary);
    text-align: center;
    padding-bottom: 8px;
}

@media (max-width: 767.98px) {
    .desktodo-contract-clause-head {
        grid-template-columns: 34px minmax(0, 1fr) 42px;
    }
    .desktodo-contract-clause-rule {
        grid-column: 2 / 4;
    }
}

/* =========================================================
   Fichas Usuario / Contacto · acciones específicas
   0.10.8
   ========================================================= */
.desktodo-section-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--dt-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.desktodo-specific-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--dt-border);
}

.desktodo-specific-action > div {
    min-width: 0;
}

.desktodo-specific-action strong {
    color: #202830;
    font-size: 13px;
}

.desktodo-access-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.desktodo-access-summary > div {
    padding: 0 0 10px;
    border-bottom: 1px solid var(--dt-border);
}

.desktodo-access-summary strong {
    display: block;
    margin-top: 2px;
    color: #202830;
    font-size: 13px;
}

.desktodo-contact-avatar {
    overflow: hidden;
}

.desktodo-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .desktodo-specific-action {
        align-items: stretch;
        flex-direction: column;
    }

    .desktodo-specific-action .btn {
        width: 100%;
    }

    .desktodo-access-summary {
        grid-template-columns: 1fr;
    }
}

/* Mi cuenta */
.desktodo-avatar {
    overflow: hidden;
}
.desktodo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.desktodo-account-summary {
    display: flex;
    align-items: center;
    gap: 18px;
}
.desktodo-account-summary-avatar {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #D9E0E7;
    border-radius: 3px;
    background: #F7F9FB;
    color: #8B96A2;
}
.desktodo-account-summary-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.desktodo-account-summary-avatar i {
    font-size: 38px;
}
.desktodo-account-summary-name {
    margin: 0 0 3px;
    color: #202830;
    font-size: 20px;
    font-weight: 700;
}
.desktodo-account-summary-meta {
    margin: 0;
    color: #6F7B87;
    font-size: 13px;
}
.desktodo-account-section-title {
    margin: 0 0 4px;
    color: #202830;
    font-size: 16px;
    font-weight: 700;
}
.desktodo-account-section-text {
    margin: 0;
    color: #77828D;
    font-size: 12px;
}
.desktodo-account-security-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.desktodo-account-security-item {
    padding: 12px 14px;
    border: 1px solid #E0E5EB;
    border-radius: 3px;
    background: #FAFBFC;
}
.desktodo-account-security-item span {
    display: block;
    margin-bottom: 3px;
    color: #7A8590;
    font-size: 11px;
}
.desktodo-account-security-item strong {
    color: #27313B;
    font-size: 13px;
    font-weight: 600;
}
@media (max-width: 767.98px) {
    .desktodo-account-summary {
        align-items: flex-start;
    }
    .desktodo-account-security-info {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Configuración · Folios 0.10.14
   ========================================================= */
.desktodo-folios-table {
    min-width: 980px;
}

.desktodo-folios-table .cfg-folio-prefijo {
    width: 78px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: center;
}

.desktodo-folios-table .cfg-folio-digitos {
    width: 78px;
}

.desktodo-folios-table .cfg-folio-proximo {
    width: 126px;
}

.desktodo-folio-document {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
}

.desktodo-folio-document > i {
    color: var(--dt-primary);
    font-size: 20px;
    line-height: 1;
}

.desktodo-folio-preview {
    display: inline-block;
    min-width: 145px;
    padding: 7px 9px;
    border: 1px solid #DDE3E9;
    border-radius: 0;
    color: #25303B;
    background: #F8FAFC;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.desktodo-folios-table .form-switch .form-check-input {
    border-radius: 0 !important;
}

/* =========================================================
   Configuración · Respaldos 0.10.16
   ========================================================= */
.desktodo-backup-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid #DDE3E9;
    border-radius: 2px;
    background: #FFFFFF;
}

.desktodo-backup-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid #EDF0F4;
    background: #FAFBFC;
}

.desktodo-backup-panel-heading strong {
    display: block;
    margin-bottom: 2px;
    color: #27313B;
    font-size: 13px;
    font-weight: 700;
}

.desktodo-backup-panel-heading span {
    display: block;
    color: #73808C;
    font-size: 12px;
    line-height: 1.45;
}

.desktodo-backup-panel-heading > i {
    flex: 0 0 auto;
    color: var(--dt-primary);
    font-size: 22px;
    line-height: 1;
}

.desktodo-backup-panel-body {
    flex: 1 1 auto;
    padding: 16px;
}

.desktodo-backup-panel-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 16px;
}

.desktodo-backup-security,
.desktodo-backup-storage {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid #DDE3E9;
    border-radius: 2px;
    background: #F8FAFC;
}

.desktodo-backup-security > i,
.desktodo-backup-storage > i {
    color: var(--dt-primary);
    font-size: 21px;
    line-height: 1;
}

.desktodo-backup-security strong,
.desktodo-backup-storage strong {
    display: block;
    color: #27313B;
    font-size: 12px;
    font-weight: 700;
}

.desktodo-backup-security span,
.desktodo-backup-storage span {
    display: block;
    color: #73808C;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.desktodo-backup-progress {
    padding: 14px;
    border: 1px solid #DDE3E9;
    border-radius: 2px;
    background: #FAFBFC;
}

.desktodo-backup-progress-bar {
    height: 8px;
    border-radius: 0;
    background: #E8EDF2;
}

.desktodo-backup-progress-bar .progress-bar {
    border-radius: 0;
}

.desktodo-backup-hash {
    color: #55616D;
    font-size: 11px;
}

#tablaConfiguracionRespaldos {
    min-width: 1040px;
}

@media (max-width: 767.98px) {
    .desktodo-backup-security {
        width: 100%;
    }

    .desktodo-backup-panel-actions .btn {
        width: 100%;
    }
}

/* ================================================================
   TRABAJOS
   ================================================================ */
.desktodo-modal-content {
    border-radius: 2px;
}

.desktodo-work-progress {
    min-width: 90px;
    height: 7px;
    border-radius: 2px;
}

.desktodo-work-progress .progress-bar {
    border-radius: 2px;
}

.desktodo-work-description,
.desktodo-work-copy,
.desktodo-work-message {
    line-height: 1.65;
    white-space: normal;
    word-break: break-word;
}

.desktodo-work-timeline {
    position: relative;
}

.desktodo-work-event {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f4;
}

.desktodo-work-event:last-child {
    border-bottom: 0;
}

.desktodo-work-event-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe4ea;
    border-radius: 2px;
    color: #1559EA;
    background: #fff;
}

.desktodo-work-event-body {
    min-width: 0;
}

.desktodo-email-preview {
    max-width: 440px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktodo-contact-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid #dfe4ea;
    border-radius: 2px;
    background: #f8f9fb;
}

.desktodo-contact-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #e3e7ed;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
}

.desktodo-contact-option .form-check-input {
    margin-top: 3px;
    flex: 0 0 auto;
}

.desktodo-contact-option span {
    display: block;
    min-width: 0;
}

.desktodo-contact-option strong,
.desktodo-contact-option small {
    display: block;
}

.desktodo-contact-option small {
    margin-top: 2px;
    color: #778291;
    line-height: 1.35;
    word-break: break-word;
}

/* ================================================================
   TRABAJO · ficha independiente y detalle valorizado
   ================================================================ */
.desktodo-work-items-wrap {
    border: 1px solid #dfe4ea;
    border-radius: 2px;
}

.desktodo-work-items thead th {
    background: #f7f8fa;
    color: #4c5662;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.desktodo-work-items tbody td,
.desktodo-work-items tfoot td {
    vertical-align: middle;
}

.desktodo-work-items tfoot td {
    border-top: 1px solid #dfe4ea;
    background: #fbfcfd;
}

.desktodo-work-items .form-control-sm {
    min-height: 35px;
}

@media (max-width: 767.98px) {
    .desktodo-work-items {
        min-width: 760px;
    }
}

/* =========================================================
   DESKTODO 0.10.30 · Selección alineada en listados
   ========================================================= */
#tablaTrabajos th.desktodo-select-column,
#tablaTrabajos td.desktodo-select-column,
#tablaCotizaciones th.desktodo-select-column,
#tablaCotizaciones td.desktodo-select-column {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

#tablaTrabajos .desktodo-select-column .dt-column-header,
#tablaCotizaciones .desktodo-select-column .dt-column-header {
    justify-content: center !important;
    gap: 0 !important;
}

#tablaTrabajos .desktodo-select-column .dt-column-order,
#tablaCotizaciones .desktodo-select-column .dt-column-order {
    display: none !important;
}

#tablaTrabajos .desktodo-select-column .desktodo-row-check,
#tablaCotizaciones .desktodo-select-column .desktodo-row-check {
    display: block;
    margin: 0 auto !important;
}

/* =========================================================
   DESKTODO 0.10.34 · Selección alineada en Tareas
   ========================================================= */
#tablaTareas th.desktodo-select-column,
#tablaTareas td.desktodo-select-column {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

#tablaTareas .desktodo-select-column .dt-column-header {
    justify-content: center !important;
    gap: 0 !important;
}

#tablaTareas .desktodo-select-column .dt-column-order {
    display: none !important;
}

#tablaTareas .desktodo-select-column .desktodo-row-check {
    display: block;
    margin: 0 auto !important;
}

/* =========================================================
   DESKTODO 0.10.39 · Ficha de Trabajo 60/40 + comunicaciones
   ========================================================= */
.desktodo-work-summary {
    width: 100%;
}

.desktodo-work-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.desktodo-work-summary-head h2 {
    margin: 0 0 4px;
    color: #1b222d;
    font-size: 16px;
    font-weight: 700;
}

.desktodo-work-summary-head p {
    margin: 0;
    color: #778291;
    font-size: 12px;
}

.desktodo-work-summary-head > a {
    color: #1559ea;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.desktodo-work-summary-head > a:hover {
    text-decoration: underline;
}

.desktodo-work-summary-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 9px;
}

.desktodo-work-summary-progress-head > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.desktodo-work-summary-progress-head span {
    color: #697386;
    font-size: 12px;
    font-weight: 600;
}

.desktodo-work-summary-progress-head strong {
    color: #1559ea;
    font-size: 19px;
}

.desktodo-work-summary-progress-head small {
    color: #7a8494;
    font-size: 11px;
    text-align: right;
}

.desktodo-work-summary-progress {
    height: 10px;
    border-radius: 1px;
    background: #e7ebf0;
}

.desktodo-work-summary-progress .progress-bar {
    background: #1559ea;
}

.desktodo-work-summary-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 20px 0 0;
    border-top: 1px solid #e7eaf0;
}

.desktodo-work-summary-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f3;
}

.desktodo-work-summary-meta dt,
.desktodo-work-summary-meta dd {
    margin: 0;
    font-size: 12px;
}

.desktodo-work-summary-meta dt {
    color: #7a8494;
    font-weight: 500;
}

.desktodo-work-summary-meta dd {
    color: #303946;
    font-weight: 650;
    text-align: right;
}

.desktodo-work-summary-meta dd a {
    color: #1559ea;
    text-decoration: none;
}

.desktodo-work-summary-meta dd a:hover {
    text-decoration: underline;
}

.desktodo-work-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
    gap: 18px;
    align-items: start;
}

.desktodo-work-main {
    min-width: 0;
}

.desktodo-work-comms {
    position: sticky;
    top: 84px;
    min-width: 0;
    height: calc(100vh - 108px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dfe4ea;
    border-radius: 2px;
}

.desktodo-work-comms-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid #e7ebf0;
}

.desktodo-work-comms-status {
    padding: 9px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e7ebf0;
    color: #6b7583;
    font-size: 12px;
}

.desktodo-work-comms-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid #e7ebf0;
}

.desktodo-work-composer {
    padding: 14px 18px;
    background: #fbfcfd;
    border-bottom: 1px solid #e7ebf0;
}

.desktodo-work-comms-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 18px 22px;
}

.desktodo-work-comm {
    position: relative;
    padding: 12px 0 12px 14px;
    border-bottom: 1px solid #e7ebf0;
}

.desktodo-work-comm::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    background: #9aa5b1;
}

.desktodo-work-comm.is-in::before {
    background: #1559ea;
}

.desktodo-work-comm.is-out::before {
    background: #06b2a5;
}

.desktodo-work-comm.is-note::before {
    background: #8a94a1;
}

.desktodo-work-comm-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    color: #6b7583;
    font-size: 11px;
    line-height: 1.4;
}

.desktodo-work-comm-meta span {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.desktodo-work-comm-meta time {
    white-space: nowrap;
}

.desktodo-work-comm-subject {
    margin-bottom: 5px;
    color: #1b222d;
    font-size: 13px;
    font-weight: 700;
}

.desktodo-work-comm-address {
    margin-bottom: 6px;
    color: #7a8491;
    font-size: 11px;
}

.desktodo-work-comm-body {
    color: #46515f;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.desktodo-work-comm-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.desktodo-work-comm-attachment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    border: 1px solid #d9e0e8;
    border-radius: 2px;
    color: #1559ea;
    font-size: 11px;
    text-decoration: none;
}

.desktodo-work-comm-attachment:hover {
    background: #f4f7fb;
}

.desktodo-work-comms-empty {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #8a94a1;
    font-size: 13px;
    text-align: center;
}

.desktodo-work-comms-empty .mdi {
    font-size: 28px;
}

@media (max-width: 1199.98px) {
    .desktodo-work-layout {
        grid-template-columns: 1fr;
    }

    .desktodo-work-comms {
        position: static;
        height: auto;
        margin-top: 18px;
    }

    .desktodo-work-comms-list {
        max-height: 650px;
    }
}

@media (max-width: 575.98px) {
    .desktodo-work-summary-head,
    .desktodo-work-summary-progress-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .desktodo-work-summary-progress-head small {
        text-align: left;
    }

    .desktodo-work-summary-meta {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .desktodo-work-comms-head,
    .desktodo-work-comms-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .desktodo-work-comms-tools > .d-flex {
        width: 100%;
    }

    .desktodo-work-comms-tools > .d-flex .btn {
        flex: 1 1 0;
    }

    .desktodo-work-comm-meta {
        flex-direction: column;
        gap: 2px;
    }
}

/* =========================================================
   DESKTODO 0.10.45 · Selección alineada en Cobros
   ========================================================= */
#tablaCobros th.desktodo-select-column,
#tablaCobros td.desktodo-select-column {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

#tablaCobros .desktodo-select-column .dt-column-header {
    justify-content: center !important;
    gap: 0 !important;
}

#tablaCobros .desktodo-select-column .dt-column-order {
    display: none !important;
}

#tablaCobros .desktodo-select-column .desktodo-row-check {
    display: block;
    margin: 0 auto !important;
}


/* Portal de Clientes: accesos externos */
.desktodo-oauth-btn {
    border-radius: 2px;
    font-weight: 500;
    transition: opacity .15s ease-in-out;
}

.desktodo-oauth-btn:hover,
.desktodo-oauth-btn:focus {
    opacity: .9;
}

.desktodo-oauth-google {
    background: #ffffff;
    border: 1px solid #747775;
    color: #1f1f1f;
}

.desktodo-oauth-google:hover,
.desktodo-oauth-google:focus {
    background: #f8fafd;
    border-color: #747775;
    color: #1f1f1f;
}

.desktodo-oauth-facebook {
    background: #1877f2;
    border: 1px solid #1877f2;
    color: #ffffff;
}

.desktodo-oauth-facebook:hover,
.desktodo-oauth-facebook:focus {
    background: #1877f2;
    border-color: #1877f2;
    color: #ffffff;
}

.desktodo-oauth-apple {
    background: #000000;
    border: 1px solid #000000;
    color: #ffffff;
}

.desktodo-oauth-apple:hover,
.desktodo-oauth-apple:focus {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}


.desktodo-oauth-google-logo {
    display: inline-block;
    width: 26px;
    height: 26px;
    margin-right: .5rem;
    object-fit: contain;
    vertical-align: -7px;
}


/* Portal de Clientes */
.cliente-portal-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f4f6f9;
    color: #1b222d;
}

.cliente-portal-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid #dfe3e8;
}

.cliente-portal-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.cliente-portal-brand img {
    display: block;
    max-width: 170px;
    max-height: 42px;
}

.cliente-portal-nav {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 2px;
    margin-left: 12px;
}

.cliente-portal-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    color: #596273;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
}

.cliente-portal-nav a:hover,
.cliente-portal-nav a.active {
    color: #1559ea;
}

.cliente-portal-nav a.active::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 2px;
    background: #1559ea;
}

.cliente-portal-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cliente-portal-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 1px solid #d9dee5;
    border-radius: 2px;
    color: #596273;
    font-size: 1.2rem;
}

.cliente-portal-notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    background: #06b2a5;
    border-radius: 50%;
}

.cliente-portal-profile-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px 4px 4px;
    background: transparent;
    border: 0;
    color: #1b222d;
}

.cliente-portal-profile-btn::after {
    margin-left: 2px;
}

.cliente-portal-profile-btn strong,
.cliente-portal-profile-btn small {
    display: block;
    line-height: 1.2;
}

.cliente-portal-profile-btn strong {
    font-size: .85rem;
}

.cliente-portal-profile-btn small {
    margin-top: 3px;
    color: #7a8494;
    font-size: .72rem;
}

.cliente-portal-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1559ea;
    color: #ffffff;
    border-radius: 50%;
    font-size: .9rem;
    font-weight: 700;
}

.cliente-portal-main {
    flex: 1 0 auto;
    padding: 28px 0 40px;
}

.cliente-portal-lite-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #cfd9ed;
    background: #f5f8ff;
    color: #1559ea;
    border-radius: 2px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.cliente-portal-lite-welcome {
    padding: 20px 22px;
    background: linear-gradient(90deg, #f7f9ff 0%, #ffffff 72%);
    border: 1px solid #dbe3f2;
    border-left: 3px solid #1559ea;
    border-radius: 2px;
}

.cliente-portal-lite-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #d9dee5;
    border-radius: 2px;
    color: #596273;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.cliente-portal-lite-life {
    border-top: 2px solid #1559ea;
}

.cliente-portal-lite-days {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 2px 0 10px;
}

.cliente-portal-lite-days strong {
    color: #1559ea;
    font-size: 2rem;
    line-height: 1;
}

.cliente-portal-lite-days span {
    color: #697386;
    font-size: .78rem;
}

.cliente-portal-lite-progress {
    height: 7px;
    margin-bottom: 18px;
    background: #edf0f4;
    border-radius: 1px;
}

.cliente-portal-lite-progress .progress-bar {
    background: #1559ea;
}

.cliente-portal-lite-meta {
    margin: 0;
    border-top: 1px solid #e5e8ec;
}

.cliente-portal-lite-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e8ec;
}

.cliente-portal-lite-meta dt,
.cliente-portal-lite-meta dd {
    margin: 0;
    font-size: .74rem;
}

.cliente-portal-lite-meta dt {
    color: #7a8494;
    font-weight: 500;
}

.cliente-portal-lite-meta dd {
    color: #1b222d;
    font-weight: 600;
    text-align: right;
}

.cliente-portal-lite-note {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 9px;
    margin-top: 16px;
    padding: 12px;
    background: #f7f9fc;
    border: 1px solid #e2e7ee;
    border-radius: 2px;
    color: #596273;
    font-size: .73rem;
    line-height: 1.45;
}

.cliente-portal-lite-note > i {
    color: #06b2a5;
    font-size: 1.15rem;
}

.cliente-portal-lite-alert {
    border-radius: 2px;
    font-size: .8rem;
}

.cliente-portal-welcome {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
}

.cliente-portal-eyebrow {
    margin-bottom: 5px;
    color: #1559ea;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cliente-portal-welcome h1 {
    margin: 0 0 5px;
    font-size: 1.75rem;
    font-weight: 700;
}

.cliente-portal-welcome p {
    margin: 0;
    color: #697386;
}

.cliente-portal-kpi,
.cliente-portal-panel,
.cliente-portal-help {
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 2px;
}

.cliente-portal-kpi {
    min-height: 118px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.cliente-portal-kpi-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    color: #1559ea;
    border-radius: 2px;
    font-size: 1.45rem;
}

.cliente-portal-kpi span,
.cliente-portal-kpi strong,
.cliente-portal-kpi small {
    display: block;
}

.cliente-portal-kpi span {
    color: #697386;
    font-size: .78rem;
}

.cliente-portal-kpi strong {
    margin: 1px 0;
    color: #1b222d;
    font-size: 1.45rem;
}

.cliente-portal-kpi small {
    color: #8a93a2;
    font-size: .7rem;
}

.cliente-portal-panel {
    padding: 22px;
}

.cliente-portal-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
}

.cliente-portal-panel-head h2 {
    margin: 0 0 3px;
    font-size: 1rem;
    font-weight: 700;
}

.cliente-portal-panel-head p {
    margin: 0;
    color: #7a8494;
    font-size: .78rem;
}

.cliente-portal-panel-head > a {
    color: #1559ea;
    font-size: .78rem;
    text-decoration: none;
}


/* Portal de Clientes · listados estandarizados */
.cliente-portal-panel.cliente-portal-list-panel {
    padding: 0;
    overflow: visible;
}

.cliente-portal-list-panel > .cliente-portal-panel-head {
    margin-bottom: 0;
    padding: 20px 22px 0;
}

.cliente-portal-table-shell {
    padding: 18px 22px 22px;
}

.cliente-portal-table-shell .desktodo-data-list {
    border: 1px solid #e6eaf0;
    background: #ffffff;
}

.cliente-portal-table-shell .desktodo-data-list .dataTables_wrapper > .row:first-child,
.cliente-portal-table-shell .desktodo-data-list .dt-layout-row:first-child {
    margin-bottom: 12px;
    padding: 13px 14px 0;
}

.cliente-portal-table-shell .desktodo-data-list .dataTables_wrapper > .row:last-child,
.cliente-portal-table-shell .desktodo-data-list .dt-layout-row:last-child {
    margin-top: 12px;
    padding: 0 14px 13px;
}

.cliente-portal-table-shell .desktodo-data-list table.dataTable > thead > tr > th,
.cliente-portal-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th {
    padding-top: 13px;
    padding-bottom: 13px;
}

.cliente-portal-table-shell .desktodo-data-list table.dataTable > tbody > tr > td,
.cliente-portal-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.cliente-portal-table-shell .desktodo-data-list table.dataTable > thead > tr > th:first-child,
.cliente-portal-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th:first-child,
.cliente-portal-table-shell .desktodo-data-list table.dataTable > tbody > tr > td:first-child,
.cliente-portal-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td:first-child {
    padding-left: 18px;
}

.cliente-portal-table-shell .desktodo-data-list table.dataTable > thead > tr > th:last-child,
.cliente-portal-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th:last-child,
.cliente-portal-table-shell .desktodo-data-list table.dataTable > tbody > tr > td:last-child,
.cliente-portal-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td:last-child {
    padding-right: 18px;
}

.cliente-portal-data-table .desktodo-table-code {
    color: #1b222d;
    font-weight: 700;
}

.cliente-portal-data-table .desktodo-table-primary {
    font-size: 12.8px;
}

.cliente-portal-data-table .badge {
    padding: 5px 8px;
    border-radius: 2px;
    background: #f8f9fb !important;
    color: #45505e !important;
    font-size: 11px;
    font-weight: 650;
}

@media (max-width: 767.98px) {
    .cliente-portal-list-panel > .cliente-portal-panel-head {
        padding: 16px 16px 0;
    }

    .cliente-portal-table-shell {
        padding: 14px 16px 16px;
    }

    .cliente-portal-table-shell .desktodo-data-list .dataTables_wrapper > .row:first-child,
    .cliente-portal-table-shell .desktodo-data-list .dt-layout-row:first-child {
        padding: 12px 12px 0;
    }

    .cliente-portal-table-shell .desktodo-data-list .dataTables_wrapper > .row:last-child,
    .cliente-portal-table-shell .desktodo-data-list .dt-layout-row:last-child {
        padding: 0 12px 12px;
    }
}

.cliente-portal-module {
    min-height: 94px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e1e5ea;
    border-radius: 2px;
    color: #1b222d;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cliente-portal-module:hover {
    border-color: #aebbd0;
    box-shadow: 0 3px 10px rgba(27, 34, 45, .06);
    color: #1b222d;
}

.cliente-portal-module-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    color: #1559ea;
    border-radius: 2px;
    font-size: 1.35rem;
}

.cliente-portal-module strong,
.cliente-portal-module small {
    display: block;
}

.cliente-portal-module strong {
    margin-bottom: 3px;
    font-size: .88rem;
}

.cliente-portal-module small {
    color: #7a8494;
    font-size: .73rem;
    line-height: 1.4;
}

.cliente-portal-module > .mdi-chevron-right {
    color: #9aa3b0;
    font-size: 1.2rem;
}

.cliente-portal-empty {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border: 1px dashed #d9dee5;
    color: #7a8494;
    text-align: center;
}

.cliente-portal-empty > i {
    margin-bottom: 8px;
    color: #a2abb8;
    font-size: 1.7rem;
}

.cliente-portal-empty strong {
    margin-bottom: 4px;
    color: #4c5667;
    font-size: .85rem;
}

.cliente-portal-empty span {
    max-width: 520px;
    font-size: .75rem;
}

.cliente-portal-account {
    text-align: center;
}

.cliente-portal-account-avatar {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px auto 10px;
    background: #1559ea;
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 700;
}

.cliente-portal-account-name strong,
.cliente-portal-account-name span {
    display: block;
}

.cliente-portal-account-name strong {
    font-size: .95rem;
}

.cliente-portal-account-name span {
    margin-top: 2px;
    color: #7a8494;
    font-size: .75rem;
}

.cliente-portal-account-links {
    margin-top: 20px;
    border-top: 1px solid #e5e8ec;
    text-align: left;
}

.cliente-portal-account-links a {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 13px 3px;
    border-bottom: 1px solid #e5e8ec;
    color: #1b222d;
    text-decoration: none;
}

.cliente-portal-account-links a > i:first-child {
    color: #1559ea;
    font-size: 1.15rem;
}

.cliente-portal-account-links strong,
.cliente-portal-account-links small {
    display: block;
}

.cliente-portal-account-links strong {
    font-size: .82rem;
}

.cliente-portal-account-links small {
    margin-top: 2px;
    color: #8a93a2;
    font-size: .7rem;
}

.cliente-portal-account-links a > .mdi-chevron-right {
    color: #a2abb8;
}

.cliente-portal-help {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 18px;
}

.cliente-portal-help > i {
    color: #06b2a5;
    font-size: 1.7rem;
}

.cliente-portal-help strong,
.cliente-portal-help span {
    display: block;
}

.cliente-portal-help strong {
    font-size: .86rem;
}

.cliente-portal-help span {
    margin-top: 3px;
    color: #7a8494;
    font-size: .72rem;
    line-height: 1.45;
}

.cliente-portal-help .btn {
    grid-column: 1 / -1;
}

.cliente-portal-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 18px 0;
    border-top: 1px solid #dfe3e8;
    color: #8a93a2;
    font-size: .72rem;
}

.cliente-portal-footer .container-fluid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

@media (max-width: 991.98px) {
    .cliente-portal-header-inner {
        min-height: 64px;
    }

    .cliente-portal-brand img {
        max-width: 150px;
    }

    .cliente-portal-welcome {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .cliente-portal-main {
        padding-top: 20px;
    }

    .cliente-portal-welcome h1 {
        font-size: 1.45rem;
    }

    .cliente-portal-welcome .btn {
        width: 100%;
    }

    .cliente-portal-panel {
        padding: 16px;
    }

    .cliente-portal-footer .container-fluid {
        align-items: center;
        gap: 12px;
    }
}


.cliente-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cliente-ticket-message {
    max-width: 82%;
    padding: 14px 16px;
    border: 1px solid #dfe3e8;
    border-radius: 2px;
    background: #f7f8fa;
}

.cliente-ticket-message.cliente {
    align-self: flex-end;
    background: #edf3ff;
    border-color: #cddcff;
}

.cliente-ticket-message.equipo {
    align-self: flex-start;
}

.cliente-ticket-message strong,
.cliente-ticket-message small {
    display: block;
}

.cliente-ticket-message small {
    margin-top: 2px;
    color: #7a8494;
    font-size: .7rem;
}

.cliente-ticket-message p {
    margin: 8px 0 0;
    font-size: .85rem;
    line-height: 1.55;
}


/* Tickets: hilo formal de correspondencia */
.ticket-thread,
.cliente-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ticket-thread-item,
.cliente-ticket-correspondencia {
    border: 1px solid #dfe3e8;
    border-left: 3px solid #aab3c0;
    border-radius: 2px;
    background: #ffffff;
}

.ticket-thread-client,
.cliente-ticket-correspondencia.cliente {
    border-left-color: #1559ea;
}

.ticket-thread-team,
.cliente-ticket-correspondencia.equipo {
    border-left-color: #06b2a5;
}

.ticket-thread-note {
    border-left-color: #8a93a2;
    background: #f7f8fa;
}

.ticket-thread-system {
    border-left-color: #d0d3d8;
}

.ticket-thread-header,
.cliente-ticket-correspondencia header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    border-bottom: 1px solid #e7eaee;
    background: #fafbfc;
}

.ticket-thread-author {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ticket-thread-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe3e8;
    border-radius: 2px;
    background: #ffffff;
    color: #1559ea;
    font-size: 1.05rem;
    overflow: hidden;
}

.ticket-thread-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ticket-thread-author strong,
.ticket-thread-author span,
.ticket-thread-address,
.cliente-ticket-correspondencia header strong,
.cliente-ticket-correspondencia header span {
    display: block;
}

.ticket-thread-author strong,
.cliente-ticket-correspondencia header strong {
    color: #1b222d;
    font-size: .86rem;
}

.ticket-thread-author span,
.ticket-thread-address,
.ticket-thread-header time,
.cliente-ticket-correspondencia header span,
.cliente-ticket-correspondencia header time {
    color: #7a8494;
    font-size: .7rem;
}

.ticket-thread-header time {
    flex-shrink: 0;
}

.ticket-thread-subject {
    padding: 12px 16px 0;
    color: #1b222d;
    font-size: .82rem;
    font-weight: 700;
}

.ticket-thread-body,
.cliente-ticket-correspondencia-cuerpo {
    padding: 15px 16px 18px;
    color: #303846;
    font-size: .84rem;
    line-height: 1.6;
}

.ticket-thread-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e7eaee;
    background: #fafbfc;
}

.ticket-thread-attachments-title {
    width: 100%;
    color: #697386;
    font-size: .7rem;
    font-weight: 700;
}

.ticket-thread-attachments a {
    color: #1559ea;
    font-size: .75rem;
    text-decoration: none;
}

@media (max-width: 575.98px) {
    .ticket-thread-header,
    .cliente-ticket-correspondencia header {
        flex-direction: column;
        gap: 7px;
    }
}


/* Portal de clientes: fotografía/avatar del contacto */
.cliente-portal-avatar {
    overflow: hidden;
}

.cliente-portal-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cliente-profile-avatar-box {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 0 0 24px;
    margin-bottom: 22px;
    border-bottom: 1px solid #e3e7ec;
}

.cliente-profile-avatar-preview {
    width: 104px;
    height: 104px;
    flex: 0 0 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #d7dde5;
    border-radius: 2px;
    background: #f3f6fa;
    color: #1559ea;
    font-size: 2.25rem;
    font-weight: 700;
}

.cliente-profile-avatar-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cliente-profile-avatar-actions {
    flex: 1;
    min-width: 0;
}

.cliente-profile-avatar-actions > strong,
.cliente-profile-avatar-actions > small {
    display: block;
}

.cliente-profile-avatar-actions > small {
    margin: 3px 0 12px;
    color: #7a8494;
    font-size: .75rem;
}

.cliente-profile-avatar-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cliente-profile-avatar-form .form-control {
    max-width: 420px;
}

.cliente-profile-avatar-form .btn {
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .cliente-profile-avatar-box,
    .cliente-profile-avatar-form {
        flex-direction: column;
    }

    .cliente-profile-avatar-form {
        align-items: stretch;
    }

    .cliente-profile-avatar-form .form-control {
        max-width: none;
    }
}

/* =========================================================
   Tickets · Editor HTML simple
   0.10.80
   ========================================================= */
.ticket-rich-editor .note-editor.note-frame {
    margin-bottom: 0;
    border: 1px solid #dfe3e8;
    border-radius: 2px;
    box-shadow: none;
}

.ticket-rich-editor .note-toolbar {
    padding: 7px 8px;
    border-bottom: 1px solid #dfe3e8;
    background: #fafbfc;
}

.ticket-rich-editor .note-btn-group {
    margin-right: 4px;
}

.ticket-rich-editor .note-btn {
    border-radius: 2px;
}

.ticket-rich-editor .note-editing-area .note-editable {
    padding: 14px 16px;
    color: #303846;
    font-size: .9rem;
    line-height: 1.6;
    background: #ffffff;
}

.ticket-rich-editor .note-editing-area .note-editable p:last-child,
.ticket-thread-body p:last-child,
.ticket-thread-body ul:last-child,
.ticket-thread-body ol:last-child,
.ticket-thread-body blockquote:last-child,
.ticket-thread-body pre:last-child {
    margin-bottom: 0;
}

.ticket-thread-body p {
    margin: 0 0 10px;
}

.ticket-thread-body ul,
.ticket-thread-body ol {
    margin: 0 0 10px;
    padding-left: 1.4rem;
}

.ticket-thread-body blockquote {
    margin: 10px 0;
    padding: 8px 12px;
    border-left: 3px solid #d0d3d8;
    background: #f7f8fa;
}

.ticket-thread-body a {
    color: #1559ea;
    text-decoration: underline;
}

.ticket-thread-body pre,
.ticket-thread-body code {
    font-size: .8rem;
}

.ticket-thread-body pre {
    margin: 10px 0;
    padding: 10px 12px;
    overflow: auto;
    border: 1px solid #e7eaee;
    border-radius: 2px;
    background: #f7f8fa;
}

/* =========================================================
   Tickets 0.10.81 · Bandeja de entrada y estados de lectura
   ========================================================= */
.desktodo-notification-badge,
.cliente-portal-notification-badge {
    position: absolute;
    top: -3px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 9px;
    background: #1559EA;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.cliente-portal-notifications {
    position: relative;
}

.cliente-portal-notifications .cliente-portal-icon-btn {
    border: 0;
    font-size: 1.25rem;
}

.desktodo-notification-menu {
    border-radius: 2px !important;
}

.desktodo-notification-count {
    border-radius: 2px;
}

.desktodo-notification-icon {
    border-radius: 2px;
}

.desktodo-notification-empty {
    min-height: 118px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #7A8494;
    text-align: center;
    font-size: 12px;
}

.desktodo-notification-empty i {
    color: #A2ABB7;
    font-size: 28px;
}

.soporte-mailbox {
    overflow: hidden;
}

.soporte-mailbox-head {
    min-height: 72px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #E5E9EF;
}

.soporte-mailbox-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #6F7B8B;
    font-size: 12px;
    white-space: nowrap;
}

.soporte-mailbox-summary strong {
    margin-right: 4px;
    color: #1B222D;
    font-size: 14px;
}

.soporte-mailbox-toolbar {
    padding: 14px 20px 16px;
    border-bottom: 1px solid #E5E9EF;
    background: #FBFCFD;
}

.ticket-mailbox-table {
    --bs-table-bg: transparent;
    margin-bottom: 0 !important;
}

.ticket-mailbox-table thead th {
    padding: 10px 12px;
    border-bottom: 1px solid #DDE3EA;
    color: #6F7B8B;
    background: #fff;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
}

.ticket-mailbox-table tbody td {
    padding: 11px 12px;
    border-color: #E8ECF1;
    vertical-align: middle;
}

.ticket-mailbox-row {
    transition: background-color .12s ease;
}

.ticket-mailbox-row:hover {
    background: #F7F9FC;
}

.ticket-mailbox-row.is-unread {
    background: #F2F6FF;
    box-shadow: inset 3px 0 0 #1559EA;
}

.ticket-mailbox-row.is-unread:hover {
    background: #ECF2FF;
}

.ticket-mailbox-envelope-col,
.ticket-mailbox-envelope {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

.ticket-mailbox-envelope a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7A8494;
    text-decoration: none;
    font-size: 19px;
}

.ticket-mailbox-row.is-unread .ticket-mailbox-envelope a {
    color: #1559EA;
}

.ticket-mailbox-client-name,
.ticket-mailbox-subject {
    display: inline-block;
    max-width: 100%;
    color: #27313F;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.ticket-mailbox-row.is-unread .ticket-mailbox-client-name,
.ticket-mailbox-row.is-unread .ticket-mailbox-subject {
    color: #111A27;
    font-weight: 700;
}

.ticket-mailbox-client-name:hover,
.ticket-mailbox-subject:hover {
    color: #1559EA;
}

.ticket-mailbox-meta {
    margin-top: 2px;
    color: #8993A1;
    font-size: 11px;
    line-height: 1.25;
}

.ticket-mailbox-preview {
    max-width: 620px;
    margin-top: 3px;
    overflow: hidden;
    color: #6F7B8B;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-mailbox-row.is-unread .ticket-mailbox-preview {
    color: #4D5968;
}

.ticket-mailbox-category,
.ticket-mailbox-date {
    color: #596474;
    font-size: 12px;
}

.cliente-ticket-inbox {
    padding: 0;
    overflow: hidden;
}

.cliente-ticket-inbox-head {
    min-height: 68px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #E5E9EF;
    background: #fff;
}

.cliente-ticket-inbox-head h2 {
    margin: 0;
    color: #1B222D;
    font-size: 16px;
    font-weight: 700;
}

.cliente-ticket-inbox-head p {
    margin: 3px 0 0;
    color: #7A8494;
    font-size: 12px;
}

.cliente-ticket-unread-counter {
    padding: 5px 8px;
    border: 1px solid #C8D6F7;
    border-radius: 2px;
    color: #1559EA;
    background: #F4F7FF;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cliente-ticket-inbox .table-responsive {
    padding: 6px 14px 14px;
}

.cliente-ticket-mailbox thead th {
    padding-top: 12px;
    padding-bottom: 12px;
}

.cliente-ticket-mailbox tbody td {
    padding-top: 15px;
    padding-bottom: 15px;
}

.cliente-ticket-mailbox .ticket-mailbox-conversation {
    min-width: 360px;
}

@media (max-width: 991.98px) {
    .soporte-mailbox-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .soporte-mailbox-summary {
        width: 100%;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .cliente-ticket-mailbox .ticket-mailbox-conversation {
        min-width: 260px;
    }
}

@media (max-width: 575.98px) {
    .desktodo-notification-menu {
        width: min(350px, calc(100vw - 24px));
        --bs-dropdown-min-width: min(350px, calc(100vw - 24px));
    }

    .cliente-ticket-inbox-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* =========================================================
   Portal de Clientes · Cobros 0.10.84
   ========================================================= */
.portal-cobros-welcome {
    align-items: center;
}

.portal-cobros-welcome-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #7A8494;
    font-size: .74rem;
}

.portal-cobros-welcome-meta i {
    color: #06B2A5;
    font-size: 1.1rem;
}

.portal-cobros-kpi {
    min-height: 126px;
}

.portal-cobros-kpi-content {
    min-width: 0;
}

.portal-cobros-kpi-content strong {
    line-height: 1.15;
}

.portal-cobros-kpi-content small + small {
    margin-top: 2px;
}

.portal-cobros-kpi-icon-credit {
    background: #EAF9F7;
    color: #068D84;
}

.portal-cobros-kpi-icon-docs {
    background: #F1F3F6;
    color: #495466;
}

.portal-cobros-kpi-icon-date {
    background: #FFF5E5;
    color: #B96E00;
}

.portal-cobros-overview > [class*="col-"] {
    min-height: 330px;
}

.portal-cobros-account,
.portal-cobros-chart-panel {
    min-height: 330px;
}

.portal-cobros-account-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid #DDE3EA;
    border-radius: 2px;
    color: #667181;
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
}

.portal-cobros-account-state.ok {
    border-color: #BDE7E1;
    background: #F1FBF9;
    color: #087F76;
}

.portal-cobros-account-state.pending {
    border-color: #F0D8AB;
    background: #FFF9EF;
    color: #9A6100;
}

.portal-cobros-account-total {
    padding: 19px 0 20px;
    border-top: 1px solid #EEF1F4;
    border-bottom: 1px solid #E5E9EF;
}

.portal-cobros-account-total span,
.portal-cobros-account-total strong,
.portal-cobros-account-total small {
    display: block;
}

.portal-cobros-account-total span {
    color: #7A8494;
    font-size: .74rem;
}

.portal-cobros-account-total strong {
    margin-top: 3px;
    color: #1B222D;
    font-size: 1.65rem;
    line-height: 1.2;
}

.portal-cobros-account-total small {
    margin-top: 3px;
    color: #8A93A2;
    font-size: .68rem;
}

.portal-cobros-account-list {
    margin-top: 7px;
}

.portal-cobros-account-list > div {
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #EEF1F4;
    color: #5F6978;
    font-size: .75rem;
}

.portal-cobros-account-list > div:last-child {
    border-bottom: 0;
}

.portal-cobros-account-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.portal-cobros-account-list i {
    width: 18px;
    color: #1559EA;
    font-size: 1rem;
    text-align: center;
}

.portal-cobros-account-list strong {
    color: #1B222D;
    font-size: .78rem;
    white-space: nowrap;
}

.portal-cobros-chart-panel {
    display: flex;
    flex-direction: column;
}

.portal-cobros-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 235px;
}

.portal-cobros-chart-bars {
    min-height: 240px;
}

.portal-cobros-list-panel {
    padding: 0;
    overflow: hidden;
}

.portal-cobros-list-head {
    margin: 0;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #E5E9EF;
}

.portal-cobros-list-summary {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: #7A8494;
    font-size: .72rem;
}

.portal-cobros-list-summary strong {
    color: #1B222D;
    font-size: 1rem;
}

.portal-cobros-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(280px, 1.3fr);
    gap: 14px;
    padding: 15px 22px;
    border-bottom: 1px solid #E5E9EF;
    background: #FBFCFD;
}

.portal-cobros-toolbar label {
    display: block;
    margin-bottom: 5px;
    color: #697386;
    font-size: .7rem;
    font-weight: 600;
}

.portal-cobros-toolbar .form-select,
.portal-cobros-toolbar .form-control,
.portal-cobros-toolbar .input-group-text {
    min-height: 38px;
    border-radius: 2px;
    border-color: #D9DFE6;
    font-size: .78rem;
}

.portal-cobros-toolbar .input-group-text {
    background: #FFFFFF;
    color: #7A8494;
}

.portal-cobros-table {
    font-size: .76rem;
}

.portal-cobros-table > thead > tr > th {
    padding: 12px 14px;
    border-bottom-color: #DCE2E8;
    color: #667181;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-cobros-table > tbody > tr.portal-cobro-row > td {
    padding: 14px;
    border-bottom-color: #E7EBEF;
    vertical-align: middle;
}

.portal-cobro-row:hover > td {
    background: #FBFCFE;
}

.portal-cobro-folio {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1559EA;
    font-size: .78rem;
    font-weight: 700;
    text-align: left;
}

.portal-cobro-folio:hover {
    text-decoration: underline;
}

.portal-cobro-row td small,
.portal-cobro-concepto + small {
    display: block;
    margin-top: 3px;
    color: #8A93A2;
    font-size: .66rem;
    font-weight: 400;
}

.portal-cobro-concepto {
    display: block;
    color: #1B222D;
    font-size: .77rem;
}

.portal-cobro-date {
    white-space: nowrap;
}

.portal-cobro-status {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: .66rem;
    font-weight: 700;
    white-space: nowrap;
}

.portal-cobro-status-pendiente {
    border-color: #EFD39D;
    background: #FFF8EA;
    color: #9A6100;
}

.portal-cobro-status-pagado {
    border-color: #BDE7E1;
    background: #F0FAF8;
    color: #087F76;
}

.portal-cobro-status-vencido {
    border-color: #F1BEC3;
    background: #FFF3F4;
    color: #B32837;
}

.portal-cobro-status-suspendido {
    border-color: #D8DDE4;
    background: #F4F6F8;
    color: #5F6978;
}

.portal-cobro-status-cortesia {
    border-color: #BFD0F8;
    background: #F1F5FF;
    color: #244EAB;
}

.portal-cobro-status-cancelado,
.portal-cobro-status-default {
    border-color: #D8DDE4;
    background: #F7F8FA;
    color: #697386;
}

.portal-cobro-saldo-pendiente {
    color: #B32837;
}

.portal-cobro-detail-row > td {
    padding: 0 !important;
    border-bottom: 1px solid #DCE2E8;
    background: #F8FAFC;
}

.portal-cobro-detail {
    margin: 0 14px 14px;
    border-left: 3px solid #1559EA;
    background: #FFFFFF;
}

.portal-cobro-detail-head {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 14px;
    border-bottom: 1px solid #E5E9EF;
}

.portal-cobro-detail-head > div:first-child strong,
.portal-cobro-detail-head > div:first-child span {
    display: block;
}

.portal-cobro-detail-head > div:first-child strong {
    color: #1B222D;
    font-size: .76rem;
}

.portal-cobro-detail-head > div:first-child span {
    margin-top: 2px;
    color: #8A93A2;
    font-size: .66rem;
}

.portal-cobro-detail-totals {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #7A8494;
    font-size: .67rem;
}

.portal-cobro-detail-totals strong {
    margin-left: 3px;
    color: #1B222D;
}

.portal-cobro-items-table > thead > tr > th,
.portal-cobro-items-table > tbody > tr > td {
    padding: 9px 12px;
    border-color: #EEF1F4;
    font-size: .68rem;
}

.portal-cobro-items-table > thead > tr > th {
    color: #7A8494;
    font-weight: 600;
}

.portal-cobros-filter-empty td {
    padding: 30px !important;
    color: #7A8494;
    text-align: center;
}

@media (max-width: 991.98px) {
    .portal-cobros-welcome-meta {
        display: none;
    }

    .portal-cobros-overview > [class*="col-"] {
        min-height: auto;
    }

    .portal-cobros-account,
    .portal-cobros-chart-panel {
        min-height: 310px;
    }

    .portal-cobro-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-cobro-detail-totals {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 767.98px) {
    .portal-cobros-toolbar {
        grid-template-columns: 1fr;
        padding: 14px 16px;
    }

    .portal-cobros-list-head {
        padding: 17px 16px 14px;
    }

    .portal-cobros-table > thead > tr > th:nth-child(3),
    .portal-cobros-table > tbody > tr.portal-cobro-row > td:nth-child(3),
    .portal-cobros-table > thead > tr > th:nth-child(5),
    .portal-cobros-table > tbody > tr.portal-cobro-row > td:nth-child(5) {
        display: none;
    }

    .portal-cobro-detail-totals {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* DESKTODO 0.10.85 - Ficha de cliente / pestaña Cobros */
.cliente-ficha-main-tabs {
    border-bottom: 1px solid #DDE3EA;
}

.cliente-ficha-main-tabs .nav-tabs {
    gap: 4px;
    border-bottom: 0;
}

.cliente-ficha-main-tabs .nav-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 9px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #667181;
    font-size: .83rem;
    font-weight: 600;
}

.cliente-ficha-main-tabs .nav-link:hover {
    color: #1559EA;
}

.cliente-ficha-main-tabs .nav-link.active {
    border-bottom-color: #1559EA;
    background: transparent;
    color: #1559EA;
}

.cliente-ficha-tab-count {
    min-width: 21px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 6px;
    border: 1px solid #D9DFE6;
    border-radius: 2px;
    background: #F7F9FB;
    color: #667181;
    font-size: .66rem;
    font-weight: 700;
}

.cliente-ficha-main-tabs .nav-link.active .cliente-ficha-tab-count {
    border-color: #BDD0FA;
    background: #F0F5FF;
    color: #1559EA;
}

.cliente-admin-cobro-kpi .card-body {
    min-height: 124px;
}

.cliente-admin-cobro-kpi-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    background: #EDF3FF;
    color: #1559EA;
    font-size: 1.25rem;
}

.cliente-admin-cobro-kpi-icon.credito {
    background: #EAF9F7;
    color: #068D84;
}

.cliente-admin-cobro-kpi-icon.documentos {
    background: #F1F3F6;
    color: #495466;
}

.cliente-admin-cobro-kpi-icon.fecha {
    background: #FFF5E5;
    color: #B96E00;
}

.cliente-admin-cobros-overview > [class*="col-"] {
    min-height: 326px;
}

.cliente-admin-cobro-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid #DDE3EA;
    border-radius: 2px;
    color: #667181;
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
}

.cliente-admin-cobro-state.ok {
    border-color: #BDE7E1;
    background: #F1FBF9;
    color: #087F76;
}

.cliente-admin-cobro-state.pending {
    border-color: #F0D8AB;
    background: #FFF9EF;
    color: #9A6100;
}

.cliente-admin-cobro-account-total {
    padding: 19px 0 20px;
    border-top: 1px solid #EEF1F4;
    border-bottom: 1px solid #E5E9EF;
}

.cliente-admin-cobro-account-total span,
.cliente-admin-cobro-account-total strong,
.cliente-admin-cobro-account-total small {
    display: block;
}

.cliente-admin-cobro-account-total span {
    color: #7A8494;
    font-size: .74rem;
}

.cliente-admin-cobro-account-total strong {
    margin-top: 3px;
    color: #1B222D;
    font-size: 1.65rem;
    line-height: 1.2;
}

.cliente-admin-cobro-account-total small {
    min-height: 16px;
    margin-top: 3px;
    color: #8A93A2;
    font-size: .68rem;
}

.cliente-admin-cobro-account-list {
    margin-top: 7px;
}

.cliente-admin-cobro-account-list > div {
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #EEF1F4;
    color: #5F6978;
    font-size: .75rem;
}

.cliente-admin-cobro-account-list > div:last-child {
    border-bottom: 0;
}

.cliente-admin-cobro-account-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cliente-admin-cobro-account-list i {
    width: 18px;
    color: #1559EA;
    font-size: 1rem;
    text-align: center;
}

.cliente-admin-cobro-account-list strong {
    color: #1B222D;
    font-size: .78rem;
    white-space: nowrap;
}

.cliente-admin-cobro-chart {
    position: relative;
    min-height: 235px;
    height: 235px;
}

.cliente-admin-cobros-list-card {
    overflow: hidden;
}

.cliente-admin-cobros-list-head {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 15px;
    border-bottom: 1px solid #E5E9EF;
}

.cliente-admin-cobros-list-count {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: #7A8494;
    font-size: .72rem;
}

.cliente-admin-cobros-list-count strong {
    color: #1B222D;
    font-size: 1rem;
}

.cliente-admin-cobros-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(280px, 1.3fr);
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #E5E9EF;
    background: #FBFCFD;
}

.cliente-admin-cobros-toolbar label {
    display: block;
    margin-bottom: 5px;
    color: #697386;
    font-size: .7rem;
    font-weight: 600;
}

.cliente-admin-cobros-toolbar .form-select,
.cliente-admin-cobros-toolbar .form-control,
.cliente-admin-cobros-toolbar .input-group-text {
    min-height: 38px;
    border-radius: 2px;
    border-color: #D9DFE6;
    font-size: .78rem;
}

.cliente-admin-cobros-toolbar .input-group-text {
    background: #FFFFFF;
    color: #7A8494;
}

.cliente-admin-cobros-table {
    font-size: .76rem;
}

.cliente-admin-cobros-table > thead > tr > th {
    padding: 12px 14px;
    border-bottom-color: #DCE2E8;
    color: #667181;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cliente-admin-cobros-table > tbody > tr.cliente-admin-cobro-row > td {
    padding: 13px 14px;
    border-bottom-color: #E7EBEF;
    vertical-align: middle;
}

.cliente-admin-cobro-row:hover > td {
    background: #FBFCFE;
}

.cliente-admin-cobro-folio {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1559EA;
    font-size: .78rem;
    font-weight: 700;
    text-align: left;
}

.cliente-admin-cobro-folio:hover {
    text-decoration: underline;
}

.cliente-admin-cobro-row td small,
.cliente-admin-cobro-concepto + small {
    display: block;
    margin-top: 3px;
    color: #8A93A2;
    font-size: .66rem;
    font-weight: 400;
}

.cliente-admin-cobro-concepto {
    display: block;
    color: #1B222D;
    font-size: .77rem;
}

.cliente-admin-cobro-date {
    white-space: nowrap;
}

.cliente-admin-cobro-status {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: .66rem;
    font-weight: 700;
    white-space: nowrap;
}

.cliente-admin-cobro-status.pendiente {
    border-color: #EFD39D;
    background: #FFF8EA;
    color: #9A6100;
}

.cliente-admin-cobro-status.pagado {
    border-color: #BDE7E1;
    background: #F0FAF8;
    color: #087F76;
}

.cliente-admin-cobro-status.vencido {
    border-color: #F1BEC3;
    background: #FFF3F4;
    color: #B32837;
}

.cliente-admin-cobro-status.suspendido {
    border-color: #D8DDE4;
    background: #F4F6F8;
    color: #5F6978;
}

.cliente-admin-cobro-status.cortesia {
    border-color: #BFD0F8;
    background: #F1F5FF;
    color: #244EAB;
}

.cliente-admin-cobro-status.cancelado,
.cliente-admin-cobro-status.baja,
.cliente-admin-cobro-status.default {
    border-color: #D8DDE4;
    background: #F7F8FA;
    color: #697386;
}

.cliente-admin-cobro-detail-row > td {
    padding: 0 !important;
    border-bottom: 1px solid #DCE2E8;
    background: #F8FAFC;
}

.cliente-admin-cobro-detail {
    margin: 0 14px 14px;
    border-left: 3px solid #1559EA;
    background: #FFFFFF;
}

.cliente-admin-cobro-detail-head {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 14px;
    border-bottom: 1px solid #E5E9EF;
}

.cliente-admin-cobro-detail-head > div:first-child strong,
.cliente-admin-cobro-detail-head > div:first-child span {
    display: block;
}

.cliente-admin-cobro-detail-head > div:first-child strong {
    color: #1B222D;
    font-size: .76rem;
}

.cliente-admin-cobro-detail-head > div:first-child span {
    margin-top: 2px;
    color: #8A93A2;
    font-size: .66rem;
}

.cliente-admin-cobro-detail-totals {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #7A8494;
    font-size: .67rem;
}

.cliente-admin-cobro-detail-totals strong {
    margin-left: 3px;
    color: #1B222D;
}

.cliente-admin-cobro-detail .table > thead > tr > th,
.cliente-admin-cobro-detail .table > tbody > tr > td {
    padding: 9px 12px;
    border-color: #EEF1F4;
    font-size: .68rem;
}

.cliente-admin-cobro-detail .table > thead > tr > th {
    color: #7A8494;
    font-weight: 600;
}

.cliente-admin-cobros-filter-empty td {
    padding: 30px !important;
    color: #7A8494;
    text-align: center;
}

@media (max-width: 991.98px) {
    .cliente-admin-cobros-overview > [class*="col-"] {
        min-height: auto;
    }

    .cliente-admin-cobro-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .cliente-admin-cobro-detail-totals {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 767.98px) {
    .cliente-ficha-main-tabs .nav-link {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cliente-admin-cobros-toolbar {
        grid-template-columns: 1fr;
        padding: 14px 16px;
    }

    .cliente-admin-cobros-list-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 17px 16px 14px;
    }

    .cliente-admin-cobros-table > thead > tr > th:nth-child(3),
    .cliente-admin-cobros-table > tbody > tr.cliente-admin-cobro-row > td:nth-child(3),
    .cliente-admin-cobros-table > thead > tr > th:nth-child(5),
    .cliente-admin-cobros-table > tbody > tr.cliente-admin-cobro-row > td:nth-child(5) {
        display: none;
    }

    .cliente-admin-cobro-detail-totals {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* --------------------------------------------------------------------------
   Flujo de caja · listado de próximos cobros
   -------------------------------------------------------------------------- */

.flujo-caja-table-shell {
    padding: 12px 20px 20px;
}

.flujo-caja-table-shell .table-responsive {
    border: 1px solid #E6EAF0;
    background: #FFFFFF;
}

.flujo-caja-table {
    min-width: 1080px;
    font-size: .76rem;
}

.flujo-caja-table > thead > tr > th {
    padding: 13px 15px;
    border-bottom: 1px solid #DCE2E8;
    background: #FBFCFD;
    color: #667181;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.flujo-caja-table > tbody > tr > td {
    padding: 15px;
    border-bottom-color: #E7EBEF;
    vertical-align: middle;
}

.flujo-caja-table > thead > tr > th:first-child,
.flujo-caja-table > tbody > tr > td:first-child {
    padding-left: 18px;
}

.flujo-caja-table > thead > tr > th:last-child,
.flujo-caja-table > tbody > tr > td:last-child {
    padding-right: 18px;
}

.flujo-caja-table > tbody > tr:not(.flujo-caja-empty):hover > td {
    background: #FBFCFE;
}

.flujo-caja-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.flujo-caja-empty > td {
    padding: 0 !important;
}

.flujo-caja-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 110px;
    padding: 24px;
    color: #7A8494;
    text-align: left;
}

.flujo-caja-empty-state > i {
    color: #A6AFBB;
    font-size: 1.45rem;
}

.flujo-caja-empty-state strong,
.flujo-caja-empty-state span {
    display: block;
}

.flujo-caja-empty-state strong {
    margin-bottom: 2px;
    color: #1B222D;
    font-size: .78rem;
}

.flujo-caja-empty-state span {
    font-size: .7rem;
}

@media (max-width: 767.98px) {
    .flujo-caja-table-shell {
        padding: 10px 14px 16px;
    }
}


/* --------------------------------------------------------------------------
   Clientes · listado estandarizado 0.10.88
   -------------------------------------------------------------------------- */

.clientes-table-shell {
    padding: 0 20px 20px;
}

.clientes-table-shell .desktodo-data-list {
    border: 1px solid #E6EAF0;
    background: #FFFFFF;
}

.clientes-table-shell .desktodo-data-list .dataTables_wrapper > .row:first-child,
.clientes-table-shell .desktodo-data-list .dt-layout-row:first-child {
    margin-bottom: 12px;
    padding: 13px 14px 0;
}

.clientes-table-shell .desktodo-data-list .dataTables_wrapper > .row:last-child,
.clientes-table-shell .desktodo-data-list .dt-layout-row:last-child {
    margin-top: 12px;
    padding: 0 14px 13px;
}

.clientes-table-shell .desktodo-data-list table.dataTable > thead > tr > th,
.clientes-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th {
    padding-top: 13px;
    padding-bottom: 13px;
}

.clientes-table-shell .desktodo-data-list table.dataTable > tbody > tr > td,
.clientes-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.clientes-table-shell .desktodo-data-list table.dataTable > thead > tr > th:first-child,
.clientes-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th:first-child,
.clientes-table-shell .desktodo-data-list table.dataTable > tbody > tr > td:first-child,
.clientes-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td:first-child {
    padding-left: 18px;
}

.clientes-table-shell .desktodo-data-list table.dataTable > thead > tr > th:last-child,
.clientes-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th:last-child,
.clientes-table-shell .desktodo-data-list table.dataTable > tbody > tr > td:last-child,
.clientes-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td:last-child {
    padding-right: 18px;
}

@media (max-width: 767.98px) {
    .clientes-table-shell {
        padding: 0 14px 16px;
    }

    .clientes-table-shell .desktodo-data-list {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .clientes-table-shell .desktodo-data-list .dataTables_wrapper > .row:first-child,
    .clientes-table-shell .desktodo-data-list .dt-layout-row:first-child {
        padding: 12px 12px 0;
    }

    .clientes-table-shell .desktodo-data-list .dataTables_wrapper > .row:last-child,
    .clientes-table-shell .desktodo-data-list .dt-layout-row:last-child {
        padding: 0 12px 12px;
    }
}

/* --------------------------------------------------------------------------
   Tareas · listado estandarizado 0.10.89
   -------------------------------------------------------------------------- */

.tareas-table-shell {
    padding: 0 20px 20px;
}

.tareas-table-shell .desktodo-data-list {
    border: 1px solid #E6EAF0;
    background: #FFFFFF;
}

.tareas-table-shell .desktodo-data-list .dataTables_wrapper > .row:first-child,
.tareas-table-shell .desktodo-data-list .dt-layout-row:first-child {
    margin-bottom: 12px;
    padding: 13px 14px 0;
}

.tareas-table-shell .desktodo-data-list .dataTables_wrapper > .row:last-child,
.tareas-table-shell .desktodo-data-list .dt-layout-row:last-child {
    margin-top: 12px;
    padding: 0 14px 13px;
}

.tareas-table-shell .desktodo-data-list table.dataTable > thead > tr > th,
.tareas-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th {
    padding-top: 13px;
    padding-bottom: 13px;
}

.tareas-table-shell .desktodo-data-list table.dataTable > tbody > tr > td,
.tareas-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.tareas-table-shell .desktodo-data-list table.dataTable > thead > tr > th:first-child,
.tareas-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th:first-child,
.tareas-table-shell .desktodo-data-list table.dataTable > tbody > tr > td:first-child,
.tareas-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td:first-child {
    padding-left: 18px;
}

.tareas-table-shell .desktodo-data-list table.dataTable > thead > tr > th:last-child,
.tareas-table-shell .desktodo-data-list table.desktodo-table > thead > tr > th:last-child,
.tareas-table-shell .desktodo-data-list table.dataTable > tbody > tr > td:last-child,
.tareas-table-shell .desktodo-data-list table.desktodo-table > tbody > tr > td:last-child {
    padding-right: 18px;
}

@media (max-width: 767.98px) {
    .tareas-table-shell {
        padding: 0 14px 16px;
    }

    .tareas-table-shell .desktodo-data-list {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .tareas-table-shell .desktodo-data-list .dataTables_wrapper > .row:first-child,
    .tareas-table-shell .desktodo-data-list .dt-layout-row:first-child {
        padding: 12px 12px 0;
    }

    .tareas-table-shell .desktodo-data-list .dataTables_wrapper > .row:last-child,
    .tareas-table-shell .desktodo-data-list .dt-layout-row:last-child {
        padding: 0 12px 12px;
    }
}

/* Módulos adicionales / Inteligencia */
.desktodo-module-layout {
    width: 100%;
}

.desktodo-module-row + .desktodo-module-row {
    margin-top: 2px;
}

.desktodo-module-card {
    width: 100%;
    max-width: none;
    border-radius: 3px;
}

.desktodo-module-card-head,
.desktodo-module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.desktodo-module-icon,
.desktodo-intelligence-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(21, 89, 234, .09);
    color: var(--dt-primary);
    font-size: 27px;
    border-radius: 3px;
}


.desktodo-module-title {
    margin: 0;
    color: var(--dt-graphite);
    font-size: 21px;
    font-weight: 750;
}

.desktodo-module-description {
    margin: 7px 0 0;
    min-height: 66px;
    color: var(--dt-muted);
    line-height: 1.55;
}

.desktodo-module-features {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 18px 0 22px;
}

.desktodo-module-features span {
    padding: 5px 9px;
    border: 1px solid var(--dt-border);
    background: #fff;
    color: var(--dt-muted);
    font-size: 12px;
    font-weight: 600;
    border-radius: 2px;
}

.desktodo-module-footer {
    padding-top: 18px;
    border-top: 1px solid var(--dt-border);
}

.desktodo-module-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
    color: var(--dt-muted);
    font-size: 12px;
    font-weight: 600;
}

.desktodo-module-breadcrumb a {
    color: var(--dt-primary);
    text-decoration: none;
}

.desktodo-module-breadcrumb i {
    font-size: 15px;
}

.desktodo-intelligence-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--dt-border);
}

.desktodo-intelligence-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 76px;
    margin: 0;
    padding: 14px;
    background: #fff;
    border-right: 1px solid var(--dt-border);
    border-bottom: 1px solid var(--dt-border);
    cursor: pointer;
}

.desktodo-intelligence-option:nth-child(2n) {
    border-right: 0;
}

.desktodo-intelligence-option:nth-last-child(-n+2) {
    border-bottom: 0;
}

.desktodo-intelligence-option-fixed {
    background: #f7f9fc;
    cursor: default;
}

.desktodo-intelligence-option .form-check-input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.desktodo-intelligence-option span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.desktodo-intelligence-option strong {
    color: var(--dt-graphite);
    font-size: 13px;
}

.desktodo-intelligence-option small {
    margin-top: 3px;
    color: var(--dt-muted);
    font-size: 12px;
    line-height: 1.35;
}

.desktodo-intelligence-security {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(6, 178, 165, .06);
    border: 1px solid rgba(6, 178, 165, .24);
    border-radius: 2px;
}

.desktodo-intelligence-security > i {
    flex: 0 0 auto;
    color: var(--dt-secondary);
    font-size: 23px;
}

.desktodo-intelligence-security > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.desktodo-intelligence-security strong {
    color: var(--dt-graphite);
    font-size: 13px;
}

.desktodo-intelligence-security span {
    color: var(--dt-muted);
    font-size: 12px;
    line-height: 1.45;
}

.desktodo-package-files {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--dt-border);
}

.desktodo-package-files span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--dt-border);
    color: var(--dt-graphite);
    font-size: 13px;
}

.desktodo-package-files span:last-child {
    border-bottom: 0;
}

.desktodo-package-files i {
    width: 20px;
    color: var(--dt-primary);
    font-size: 18px;
    text-align: center;
}

@media (max-width: 767.98px) {
    .desktodo-module-row + .desktodo-module-row {
        margin-top: 0;
    }

    .desktodo-intelligence-options {
        grid-template-columns: 1fr;
    }

    .desktodo-intelligence-option,
    .desktodo-intelligence-option:nth-child(2n),
    .desktodo-intelligence-option:nth-last-child(-n+2) {
        border-right: 0;
        border-bottom: 1px solid var(--dt-border);
    }

    .desktodo-intelligence-option:last-child {
        border-bottom: 0;
    }
}


/* --------------------------------------------------------------------------
   Inteligencia · historial de exportaciones 0.10.90
   -------------------------------------------------------------------------- */

.inteligencia-history-shell {
    padding: 0 20px 20px;
}

.inteligencia-history-shell .table-responsive {
    border: 1px solid #E6EAF0;
    background: #FFFFFF;
}

.inteligencia-history-table {
    min-width: 760px;
    font-size: .76rem;
}

.inteligencia-history-table > thead > tr > th {
    padding: 13px 15px;
    border-bottom: 1px solid #DCE2E8;
    background: #FBFCFD;
    color: #667181;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.inteligencia-history-table > tbody > tr > td {
    padding: 14px 15px;
    border-bottom-color: #E7EBEF;
    vertical-align: middle;
}

.inteligencia-history-table > thead > tr > th:first-child,
.inteligencia-history-table > tbody > tr > td:first-child {
    padding-left: 18px;
}

.inteligencia-history-table > thead > tr > th:last-child,
.inteligencia-history-table > tbody > tr > td:last-child {
    padding-right: 18px;
}

.inteligencia-history-table > tbody > tr:not(.inteligencia-history-empty):hover > td {
    background: #FBFCFE;
}

.inteligencia-history-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.inteligencia-history-empty > td {
    padding: 0 !important;
}

.inteligencia-history-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 108px;
    padding: 24px;
    color: #7A8494;
    text-align: left;
}

.inteligencia-history-empty-state > i {
    color: #A6AFBB;
    font-size: 1.45rem;
}

.inteligencia-history-empty-state strong,
.inteligencia-history-empty-state span {
    display: block;
}

.inteligencia-history-empty-state strong {
    margin-bottom: 2px;
    color: #1B222D;
    font-size: .78rem;
}

.inteligencia-history-empty-state span {
    font-size: .7rem;
}

@media (max-width: 767.98px) {
    .inteligencia-history-shell {
        padding: 0 14px 16px;
    }
}

/* --------------------------------------------------------------------------
   Hosting · módulo adicional 0.10.91
   -------------------------------------------------------------------------- */

.hosting-table-shell {
    padding: 18px 20px 20px;
}

.hosting-table-shell .desktodo-data-list {
    border: 1px solid var(--dt-border);
    background: #fff;
}

.hosting-table-shell .dt-container {
    padding: 0;
}

.hosting-table-shell .dt-layout-row:first-child {
    margin: 0;
    padding: 14px 16px 8px;
}

.hosting-table-shell .dt-layout-row:last-child {
    margin: 0;
    padding: 10px 16px 14px;
}

.hosting-table-shell .table-responsive,
.hosting-table-shell .dt-layout-table {
    margin: 0;
}

#tablaHostingCuentas {
    min-width: 980px;
    font-size: .78rem;
}

#tablaHostingCuentas > thead > tr > th {
    padding: 12px 14px;
    background: #fbfcfd;
    border-bottom: 1px solid var(--dt-border);
    color: #667181;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

#tablaHostingCuentas > tbody > tr > td {
    padding: 13px 14px;
    border-bottom-color: #e7ebef;
    vertical-align: middle;
}

#tablaHostingCuentas > thead > tr > th:first-child,
#tablaHostingCuentas > tbody > tr > td:first-child {
    padding-left: 17px;
}

#tablaHostingCuentas > thead > tr > th:last-child,
#tablaHostingCuentas > tbody > tr > td:last-child {
    padding-right: 17px;
}

#tablaHostingCuentas > tbody > tr:hover > td {
    background: #fbfcfe;
}

.hosting-domain {
    margin-top: 2px;
    color: var(--dt-primary);
    font-size: .76rem;
    font-weight: 600;
}

.hosting-delivery {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .73rem;
    font-weight: 600;
}

.hosting-delivery.ok {
    color: #168350;
}

.hosting-delivery.pending {
    color: #9a6a00;
}


.hosting-modal .modal-dialog,
#modalHostingCuenta .modal-dialog {
    max-width: 1080px;
    margin: .75rem auto;
}

#modalHostingCuenta .modal-content {
    max-height: calc(100vh - 1.5rem);
    overflow: hidden;
}

#modalHostingCuenta #formHostingCuenta {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: inherit;
}

#modalHostingCuenta .modal-header {
    flex-shrink: 0;
    padding: 14px 18px;
}

#modalHostingCuenta .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 16px 16px;
}

#modalHostingCuenta .modal-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid var(--dt-border);
}

#modalHostingCuenta .btn-close {
    background-size: 14px;
}

#modalHostingCuenta .form-label {
    margin-bottom: 7px;
}

.hosting-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    min-width: 188px;
}

.hosting-row-actions .btn {
    width: 31px;
    height: 31px;
    padding: 0;
    border-radius: 2px;
}

.hosting-form-section {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--dt-border);
    background: #fff;
}

.hosting-form-section > h3,
.hosting-form-section > .d-flex > h3 {
    margin: 0 0 14px;
    color: var(--dt-graphite);
    font-size: .9rem;
    font-weight: 700;
}



.hosting-choice-step {
    margin-top: 2px;
    padding-top: 16px;
    border-top: 1px solid var(--dt-border);
}

.hosting-choice-step .form-select {
    width: 100%;
}

.hosting-inline-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hosting-inline-group-item {
    min-width: 0;
}

.hosting-inline-group-item-value {
    flex: 1 1 220px;
}

.hosting-inline-group-item-currency {
    flex: 0 0 255px;
    max-width: 255px;
}

.hosting-form-section .form-text {
    margin-top: 6px;
}

.hosting-server-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hosting-server-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--dt-border);
    background: #fff;
}

.hosting-server-main {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
}

.hosting-server-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    background: rgba(21, 89, 234, .07);
    color: var(--dt-primary);
    font-size: 22px;
}

.hosting-server-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 7px;
    color: var(--dt-muted);
    font-size: .7rem;
}

.hosting-server-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hosting-server-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.hosting-send-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 14px;
    border-left: 3px solid var(--dt-primary);
    background: #f7f9fc;
}

.hosting-send-summary strong {
    color: var(--dt-graphite);
    font-size: .88rem;
}

.hosting-send-summary span {
    color: var(--dt-muted);
    font-size: .74rem;
}

.hosting-secret-box {
    border: 1px solid var(--dt-border);
    text-align: left;
}

.hosting-secret-box > div {
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--dt-border);
}

.hosting-secret-box > div:last-child {
    border-bottom: 0;
}

.hosting-secret-box span {
    color: var(--dt-muted);
    font-size: .72rem;
}

.hosting-secret-box strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--dt-graphite);
    font-size: .78rem;
}

@media (max-width: 767.98px) {
    .hosting-table-shell {
        padding: 14px;
    }

    .hosting-server-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .hosting-server-actions {
        width: 100%;
    }

    .hosting-server-actions .btn {
        flex: 1 1 auto;
    }

    .hosting-form-section {
        padding: 14px;
    }

    .hosting-secret-box > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* --------------------------------------------------------------------------
   Correos corporativos · módulo adicional 0.10.96
   -------------------------------------------------------------------------- */

.correos-table-shell {
    padding: 18px 20px 20px;
}

.correos-table-shell .desktodo-data-list {
    border: 1px solid var(--dt-border);
    background: #fff;
}

.correos-table-shell .dt-container {
    padding: 0;
}

.correos-table-shell .dt-layout-row:first-child {
    margin: 0;
    padding: 14px 16px 8px;
}

.correos-table-shell .dt-layout-row:last-child {
    margin: 0;
    padding: 10px 16px 14px;
}

.correos-table-shell .table-responsive,
.correos-table-shell .dt-layout-table {
    margin: 0;
}

#tablaCorreosCorporativos {
    min-width: 980px;
    font-size: .78rem;
}

#tablaCorreosCorporativos > thead > tr > th {
    padding: 12px 14px;
    background: #fbfcfd;
    border-bottom: 1px solid var(--dt-border);
    color: #667181;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

#tablaCorreosCorporativos > tbody > tr > td {
    padding: 13px 14px;
    border-bottom-color: #e7ebef;
    vertical-align: middle;
}

#tablaCorreosCorporativos > thead > tr > th:first-child,
#tablaCorreosCorporativos > tbody > tr > td:first-child {
    padding-left: 17px;
}

#tablaCorreosCorporativos > thead > tr > th:last-child,
#tablaCorreosCorporativos > tbody > tr > td:last-child {
    padding-right: 17px;
}

#tablaCorreosCorporativos > tbody > tr:hover > td {
    background: #fbfcfe;
}

.correo-domain {
    margin-top: 2px;
    color: var(--dt-primary);
    font-size: .76rem;
    font-weight: 600;
}

.correo-provider {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.correo-provider i {
    color: var(--dt-primary);
    font-size: 1rem;
}

.correo-delivery {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .73rem;
    font-weight: 600;
}

.correo-delivery.ok {
    color: #168350;
}

.correo-delivery.pending {
    color: #9a6a00;
}

.correo-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    min-width: 132px;
}

.correo-row-actions .btn {
    width: 31px;
    height: 31px;
    padding: 0;
    border-radius: 2px;
}

#modalCorreoEnviar .modal-header {
    padding: 14px 18px;
}

.correos-form-page {
    width: 100%;
}

.correos-form-page .correo-form-section {
    box-shadow: 0 1px 2px rgba(27, 34, 45, .03);
}

.correos-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid var(--dt-border);
    background: #fff;
}

.correo-form-section {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--dt-border);
    background: #fff;
}

.correo-form-section > h3,
.correo-form-section > .d-flex h3 {
    margin: 0 0 14px;
    color: var(--dt-graphite);
    font-size: .9rem;
    font-weight: 700;
}

.correo-cuentas-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.correo-cuenta-row {
    padding: 14px;
    border: 1px solid var(--dt-border);
    background: #fbfcfd;
}

.correo-cuenta-row .input-group .btn {
    border-radius: 0 2px 2px 0;
}

.correo-credentials-dialog {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    text-align: left;
}

.correo-credential-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--dt-border);
    background: #f8fafc;
}

.correo-credential-item code {
    display: block;
    min-width: 0;
    padding: 7px 9px;
    overflow-wrap: anywhere;
    background: #fff;
    border: 1px solid var(--dt-border);
    color: var(--dt-graphite);
    font-size: .75rem;
}

@media (max-width: 767.98px) {
    .correos-table-shell {
        padding: 14px;
    }

    .correo-form-section {
        padding: 14px;
    }

    .correo-credential-item {
        grid-template-columns: 1fr;
    }
}

/* Correos corporativos 0.10.97 · catálogos vinculados y proveedor */
.correo-provider-summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--dt-border);
    background: #f8fafc;
}

.correo-provider-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    background: rgba(21, 89, 234, .08);
    color: var(--dt-primary);
    font-size: 20px;
}

.correo-provider-summary-body {
    min-width: 0;
    flex: 1 1 auto;
}

.correo-provider-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 7px;
    color: #657181;
    font-size: .72rem;
}

.correo-provider-links span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.correo-provider-custom {
    padding: 14px;
    border: 1px solid var(--dt-border);
    background: #fbfcfd;
}

.correos-form-page .form-text {
    margin-top: 6px;
}

/* Correos corporativos 0.10.99: alias y grupos de distribución */
.correo-aliases-list,
.correo-grupos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.correo-alias-row,
.correo-grupo-row {
    padding: 14px;
    border: 1px solid var(--dt-border);
    background: #fbfcfd;
}

.correo-empty-inline {
    padding: 13px 14px;
    border: 1px dashed var(--dt-border);
    color: var(--dt-muted);
    background: #fbfcfd;
    font-size: .78rem;
}

.correo-grupo-miembros {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    padding: 12px 14px;
    border: 1px solid var(--dt-border);
    background: #fff;
}

.correo-grupo-miembro-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    margin: 0;
    color: var(--dt-graphite);
    font-size: .78rem;
    cursor: pointer;
}

.correo-grupo-miembro-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .correo-grupo-miembros {
        grid-template-columns: 1fr;
    }
}


/* Correos corporativos 0.10.101 · alineación de casillas, alias y grupos */
.correo-cuenta-row .row,
.correo-alias-row .row,
.correo-grupo-row .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.correo-cuenta-row .form-label,
.correo-alias-row .form-label,
.correo-grupo-row .form-label {
    margin-bottom: 7px;
}

.correo-row-footer {
    margin-top: 2px;
    padding-top: 2px;
    min-height: 32px;
}

.correo-address-help {
    margin-top: -4px;
}

@media (max-width: 991.98px) {
    .correo-row-footer {
        align-items: flex-start !important;
    }
}

/* Reseller Hosting: modal con desplazamiento vertical interno */
#modalResellerServidor .modal-dialog {
    margin: .75rem auto;
}

#modalResellerServidor .modal-content {
    max-height: calc(100vh - 1.5rem);
    overflow: hidden;
}

#modalResellerServidor #formResellerServidor {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: inherit;
}

#modalResellerServidor .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#modalResellerServidor .modal-footer {
    flex-shrink: 0;
    background: #fff;
}

@media (max-width: 991.98px) {
    #modalResellerServidor .modal-dialog {
        margin: .5rem;
    }

    #modalResellerServidor .modal-content {
        max-height: calc(100vh - 1rem);
    }
}

.hosting-provision-box {
    padding: 14px 16px;
    border: 1px solid #d7e3f4;
    background: #f7faff;
}

.hosting-provision-box strong {
    color: var(--dt-graphite);
    font-size: .86rem;
}

#hostingPaqueteHelp {
    min-height: 18px;
}


@media (max-width: 991.98px) {
    #modalHostingCuenta .modal-dialog {
        margin: .5rem;
    }

    #modalHostingCuenta .modal-content {
        max-height: calc(100vh - 1rem);
    }
}

/* Hosting 0.10.114: navegación interna del módulo */
.hosting-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--dt-border);
    background: #fff;
}

.hosting-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--dt-graphite);
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none;
}

.hosting-subnav-link:hover {
    border-color: var(--dt-border);
    background: #f7f9fc;
    color: var(--dt-primary);
}

.hosting-subnav-link.active {
    border-color: rgba(21, 89, 234, .22);
    background: rgba(21, 89, 234, .08);
    color: var(--dt-primary);
}

.hosting-subnav-link i {
    font-size: 1.05rem;
}

#modalHostingTercero .modal-dialog {
    max-width: 1120px;
    margin: .75rem auto;
}

#modalHostingTercero .modal-content {
    max-height: calc(100vh - 1.5rem);
    overflow: hidden;
}

#modalHostingTercero #formHostingTercero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: inherit;
}

#modalHostingTercero .modal-header,
#modalHostingTercero .modal-footer {
    flex-shrink: 0;
}

#modalHostingTercero .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 16px 16px;
}

#modalHostingTercero .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    border-top: 1px solid var(--dt-border);
}

@media (max-width: 991.98px) {
    .hosting-subnav {
        display: grid;
        grid-template-columns: 1fr;
    }

    #modalHostingTercero .modal-dialog {
        margin: .5rem;
    }

    #modalHostingTercero .modal-content {
        max-height: calc(100vh - 1rem);
    }
}


/* --------------------------------------------------------------------------
   Dominios · módulo adicional 0.10.121
   -------------------------------------------------------------------------- */

.dominios-table-shell {
    padding: 18px 20px 20px;
}

.dominios-table-shell .desktodo-data-list {
    border: 1px solid var(--dt-border);
    background: #fff;
}

.dominios-table-shell .dt-container {
    padding: 0;
}

.dominios-table-shell .dt-layout-row:first-child {
    margin: 0;
    padding: 14px 16px 8px;
}

.dominios-table-shell .dt-layout-row:last-child {
    margin: 0;
    padding: 10px 16px 14px;
}

.dominios-table-shell .table-responsive,
.dominios-table-shell .dt-layout-table {
    margin: 0;
}

#tablaDominios {
    min-width: 850px;
    font-size: .78rem;
}

@media (max-width: 767.98px) {
    .dominios-table-shell {
        padding: 14px;
    }
}

/* Configuración: índice visual 0.10.143 */
.desktodo-config-grid .desktodo-config-card .card-body {
    min-height: 258px;
    display: flex;
    flex-direction: column;
}

.desktodo-config-card-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(21, 89, 234, .09);
    color: var(--dt-primary);
    font-size: 25px;
    line-height: 1;
    border-radius: 3px;
}

.desktodo-config-card-content {
    flex: 1 1 auto;
}

.desktodo-config-card-title {
    margin: 0;
    color: var(--dt-graphite);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.25;
}

.desktodo-config-card-description {
    margin: 8px 0 18px;
    color: var(--dt-muted);
    font-size: 13px;
    line-height: 1.5;
}

.desktodo-config-card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--dt-border);
}

@media (max-width: 575.98px) {
    .desktodo-config-grid .desktodo-config-card .card-body {
        min-height: 0;
    }
}

/* DESKTODO 0.10.152 · Detalle de cobros en Portal de Clientes */
.portal-cobro-row-link {
    cursor: pointer;
}

.portal-cobro-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.portal-cobro-page-head h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.portal-cobro-page-head p,
.portal-cobro-back {
    color: #667085;
}

.portal-cobro-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none;
    font-size: .9rem;
}

.portal-cobro-back:hover {
    color: #1559EA;
}

.portal-cobro-detail-kpi {
    min-height: 108px;
}

.portal-cobro-detail-kpi > div:last-child {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.portal-cobro-detail-kpi span {
    color: #667085;
    font-size: .82rem;
}

.portal-cobro-detail-kpi strong {
    font-size: 1.25rem;
}

.portal-cobro-detail-page-table > thead > tr > th,
.portal-cobro-detail-page-table > tbody > tr > td {
    white-space: nowrap;
}

.portal-cobro-payment-panel {
    position: sticky;
    top: 1rem;
}

.portal-cobro-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-cobro-payment-method {
    border: 1px solid #E2E7EE;
    padding: 1rem;
    background: #fff;
}

.portal-cobro-payment-method-head {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.portal-cobro-payment-method-head > div {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.portal-cobro-payment-method-head small {
    color: #667085;
    line-height: 1.35;
}

.portal-cobro-payment-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    background: #EEF4FF;
    color: #1559EA;
    font-size: 1.35rem;
}

.portal-cobro-bank-data {
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
}

.portal-cobro-bank-data > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: .75rem;
    padding: .45rem 0;
    border-bottom: 1px solid #EEF1F4;
}

.portal-cobro-bank-data dt,
.portal-cobro-bank-data dd {
    margin: 0;
}

.portal-cobro-bank-data dt {
    color: #667085;
    font-weight: 500;
}

.portal-cobro-bank-data dd {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.portal-cobro-paid-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 180px;
    gap: .35rem;
}

.portal-cobro-paid-box i {
    font-size: 2rem;
    color: #198754;
}

.portal-cobro-paid-box span,
.portal-cobro-payments-empty span {
    color: #667085;
}

.portal-cobro-payments-empty {
    min-height: 130px;
}

@media (max-width: 1199.98px) {
    .portal-cobro-payment-panel {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .portal-cobro-page-head h1 {
        font-size: 1.45rem;
    }

    .portal-cobro-bank-data > div {
        grid-template-columns: 1fr;
        gap: .15rem;
    }
}

/* Portal de Clientes · ficha de Orden de Trabajo */
.cliente-portal-clickable-row {
    cursor: pointer;
}

.cliente-portal-clickable-row:hover > * {
    background: #f8faff !important;
}

.cliente-portal-work-heading .badge {
    padding: 5px 8px;
    border-radius: 2px;
    background: #f8f9fb !important;
    color: #45505e !important;
    font-size: 11px;
    font-weight: 650;
}

.cliente-portal-work-stat {
    min-height: 108px;
    height: 100%;
    padding: 18px;
    border: 1px solid #dfe3e8;
    border-radius: 2px;
    background: #ffffff;
}

.cliente-portal-work-stat span,
.cliente-portal-work-stat strong,
.cliente-portal-work-stat small {
    display: block;
}

.cliente-portal-work-stat span {
    margin-bottom: 5px;
    color: #7a8494;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cliente-portal-work-stat strong {
    color: #1b222d;
    font-size: 1.08rem;
}

.cliente-portal-work-stat small {
    margin-top: 5px;
    color: #8a93a2;
    font-size: .7rem;
}

.cliente-portal-work-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
    align-items: start;
}

.cliente-portal-work-main,
.cliente-portal-work-side {
    min-width: 0;
}

.cliente-portal-work-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 9px;
}

.cliente-portal-work-progress-head > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cliente-portal-work-progress-head span {
    color: #697386;
    font-size: .78rem;
    font-weight: 600;
}

.cliente-portal-work-progress-head strong {
    color: #1559ea;
    font-size: 1.15rem;
}

.cliente-portal-work-progress-head small {
    color: #7a8494;
    font-size: .72rem;
    text-align: right;
}

.cliente-portal-work-progress {
    height: 10px;
    border-radius: 1px;
    background: #e7ebf0;
}

.cliente-portal-work-progress .progress-bar {
    background: #1559ea;
}

.cliente-portal-list-progress-wrap {
    min-width: 150px;
}

.cliente-portal-list-progress {
    min-width: 105px;
    background: #e7ebf0;
}

.cliente-portal-list-progress .progress-bar {
    background: #1559ea;
}

.cliente-portal-work-scope {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e7eaf0;
}

.cliente-portal-work-scope > span {
    display: block;
    margin-bottom: 7px;
    color: #45505e;
    font-size: .75rem;
    font-weight: 700;
}

.cliente-portal-work-scope p {
    margin: 0;
    color: #5f6978;
    font-size: .82rem;
    line-height: 1.65;
}

.cliente-portal-work-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 20px 0 0;
    border-top: 1px solid #e7eaf0;
}

.cliente-portal-work-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f3;
}

.cliente-portal-work-meta dt,
.cliente-portal-work-meta dd {
    margin: 0;
    font-size: .75rem;
}

.cliente-portal-work-meta dt {
    color: #7a8494;
    font-weight: 500;
}

.cliente-portal-work-meta dd {
    color: #303946;
    font-weight: 650;
    text-align: right;
}

.cliente-portal-work-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #dfe3e8;
    border-radius: 2px;
    background: #f8f9fb;
    color: #697386;
    font-size: .7rem;
    font-weight: 650;
    white-space: nowrap;
}

.cliente-portal-work-plan {
    border-top: 1px solid #e6eaf0;
}

.cliente-portal-work-task {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 17px 0;
    border-bottom: 1px solid #e9edf2;
}

.cliente-portal-work-task:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.cliente-portal-work-task-marker {
    display: flex;
    justify-content: center;
}

.cliente-portal-work-task-marker span {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd4df;
    border-radius: 50%;
    background: #ffffff;
    color: #697386;
    font-size: .7rem;
    font-weight: 700;
}

.cliente-portal-work-task.is-done .cliente-portal-work-task-marker span {
    border-color: #06b2a5;
    background: #ecfbf9;
    color: #078f86;
}

.cliente-portal-work-task-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.cliente-portal-work-task-title strong {
    display: block;
    color: #1b222d;
    font-size: .84rem;
}

.cliente-portal-work-task-title p {
    margin: 5px 0 0;
    color: #778191;
    font-size: .74rem;
    line-height: 1.55;
}

.cliente-portal-work-task-title .badge {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 2px;
    background: #f8f9fb !important;
    color: #45505e !important;
    font-size: 10.5px;
    font-weight: 650;
}

.cliente-portal-work-task-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    margin-top: 11px;
}

.cliente-portal-work-task-dates span {
    display: inline-grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 5px;
    color: #697386;
    font-size: .7rem;
}

.cliente-portal-work-task-dates i {
    color: #1559ea;
    font-size: .9rem;
}

.cliente-portal-work-task-dates b {
    color: #4f5a68;
    font-weight: 650;
}

.cliente-portal-work-milestones {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e6eaf0;
}

.cliente-portal-work-milestone {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid #e9edf2;
}

.cliente-portal-work-milestone:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.cliente-portal-work-milestone > i {
    color: #06b2a5;
    font-size: 1.1rem;
}

.cliente-portal-work-milestone strong,
.cliente-portal-work-milestone small {
    display: block;
}

.cliente-portal-work-milestone strong {
    font-size: .82rem;
}

.cliente-portal-work-milestone p {
    margin: 4px 0;
    color: #697386;
    font-size: .74rem;
    line-height: 1.5;
}

.cliente-portal-work-milestone small {
    margin-top: 4px;
    color: #8a93a2;
    font-size: .69rem;
}

.cliente-portal-work-items thead th {
    color: #697386;
    font-size: .72rem;
    font-weight: 650;
}

.cliente-portal-work-items tbody td,
.cliente-portal-work-items tfoot td {
    font-size: .76rem;
}

.cliente-portal-work-comms-panel {
    position: sticky;
    top: 86px;
}

.cliente-portal-work-thread {
    display: flex;
    flex-direction: column;
    gap: 11px;
    max-height: calc(100vh - 235px);
    overflow-y: auto;
    padding-right: 3px;
}

.cliente-portal-work-message {
    padding: 13px 14px;
    border: 1px solid #dfe3e8;
    border-radius: 2px;
    background: #f8f9fb;
}

.cliente-portal-work-message.cliente {
    border-left: 3px solid #1559ea;
    background: #f5f8ff;
}

.cliente-portal-work-message.equipo {
    border-left: 3px solid #06b2a5;
    background: #f5fbfa;
}

.cliente-portal-work-message-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.cliente-portal-work-message-head strong {
    color: #303946;
    font-size: .72rem;
}

.cliente-portal-work-message-head time {
    color: #8a93a2;
    font-size: .66rem;
    white-space: nowrap;
}

.cliente-portal-work-message-subject {
    margin-bottom: 7px;
    color: #45505e;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.4;
}

.cliente-portal-work-message-body {
    max-height: 330px;
    overflow: auto;
    color: #5f6978;
    font-size: .73rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.cliente-portal-work-message-files {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #dfe5eb;
}

.cliente-portal-work-message-files a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1559ea;
    font-size: .7rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.cliente-portal-work-message-files a:hover {
    text-decoration: underline;
}

@media (max-width: 1199.98px) {
    .cliente-portal-work-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cliente-portal-work-comms-panel {
        position: static;
    }

    .cliente-portal-work-thread {
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .cliente-portal-work-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .cliente-portal-work-progress-head,
    .cliente-portal-work-task-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .cliente-portal-work-progress-head small {
        text-align: left;
    }

    .cliente-portal-work-task-dates {
        flex-direction: column;
        gap: 7px;
    }
}

/* =========================================================
   DESKTODO 0.10.160 · Ficha de Trabajo organizada por pestañas
   ========================================================= */
.desktodo-work-tabs-shell {
    min-width: 0;
}

.desktodo-work-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid #dce2e9;
    scrollbar-width: thin;
}

.desktodo-work-tabs .nav-item {
    flex: 0 0 auto;
}

.desktodo-work-tabs .nav-link {
    margin-bottom: -1px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 0;
    background: transparent;
    color: #1559ea;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.desktodo-work-tabs .nav-link:hover,
.desktodo-work-tabs .nav-link:focus {
    border-color: #e3e7ed #e3e7ed transparent;
    color: #104bc8;
}

.desktodo-work-tabs .nav-link.active {
    border-color: #dce2e9 #dce2e9 #ffffff;
    background: #ffffff;
    color: #1b222d;
    font-weight: 650;
}

.desktodo-work-tab-content {
    padding-top: 18px;
}

.desktodo-work-tab-content > .tab-pane {
    min-width: 0;
}

.desktodo-work-tab-content .desktodo-work-comms-tab {
    position: relative;
    top: auto;
    width: 100%;
    height: min(650px, calc(100vh - 190px));
    min-height: 500px;
    margin-top: 0;
}

.desktodo-work-tab-content .desktodo-work-comms-tab .desktodo-work-comms-list {
    max-height: none;
}

@media (max-width: 767.98px) {
    .desktodo-work-tabs .nav-link {
        padding: 11px 14px;
        font-size: 13px;
    }

    .desktodo-work-tab-content {
        padding-top: 14px;
    }

    .desktodo-work-tab-content .desktodo-work-comms-tab {
        height: auto;
        min-height: 0;
    }

    .desktodo-work-tab-content .desktodo-work-comms-tab .desktodo-work-comms-list {
        max-height: 560px;
    }
}


/* =========================================================
   DESKTODO 0.10.161 · Comunicaciones sin altura limitada
   ========================================================= */
.desktodo-work-tab-content .desktodo-work-comms-tab {
    height: auto;
    min-height: 0;
    display: block;
}

.desktodo-work-tab-content .desktodo-work-comms-tab .desktodo-work-comms-list {
    flex: none;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

@media (max-width: 767.98px) {
    .desktodo-work-tab-content .desktodo-work-comms-tab .desktodo-work-comms-list {
        max-height: none;
        overflow: visible;
    }
}

/* ================================================================
   Cotizaciones · aprobación contractual Portal de Clientes
   ================================================================ */
.cliente-portal-approval-banner {
    display:flex;
    align-items:center;
    gap:18px;
    padding:20px 22px;
    border:1px solid #1559EA;
    background:#1559EA;
    color:#fff;
}

.cliente-portal-approval-banner.is-approved {
    border-color:#06B2A5;
    background:#06B2A5;
}

.cliente-portal-approval-banner.is-expired {
    border-color:#b7791f;
    background:#b7791f;
}

.cliente-portal-approval-banner-icon {
    flex:0 0 auto;
    width:48px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.45);
    background:rgba(255,255,255,.12);
    font-size:26px;
}

.cliente-portal-approval-banner strong,
.cliente-portal-approval-banner span {
    display:block;
}

.cliente-portal-approval-banner strong {
    margin-bottom:4px;
    font-size:17px;
    font-weight:700;
}

.cliente-portal-approval-banner span {
    color:rgba(255,255,255,.9);
    font-size:13px;
}

.cliente-portal-approval-banner .btn-light {
    flex:0 0 auto;
    border-color:#fff;
    background:#fff;
    color:#1559EA;
    font-weight:600;
}

.cliente-portal-approval-banner.is-approved .btn-light {
    color:#067f77;
}

.cliente-portal-approval-banner.is-expired .btn-light {
    color:#8a5b14;
    opacity:.92;
}

.cliente-portal-contract-panel .cliente-portal-panel-head {
    border-bottom:1px solid #e3e7ec;
}

.cliente-portal-contract-copy,
.desktodo-contract-snapshot {
    padding:24px 26px;
    color:#20252b;
    font-size:14px;
    line-height:1.65;
}

.desktodo-contract-snapshot {
    padding:0;
}

.cliente-portal-contract-copy h1,
.cliente-portal-contract-copy h2,
.cliente-portal-contract-copy h3,
.desktodo-contract-snapshot h1,
.desktodo-contract-snapshot h2,
.desktodo-contract-snapshot h3 {
    margin:0 0 10px;
    color:#111827;
    font-size:16px;
    font-weight:700;
}

.cliente-portal-contract-copy p:last-child,
.desktodo-contract-snapshot p:last-child {
    margin-bottom:0;
}

.dt-contract-clause {
    padding:0 0 20px;
    margin:0 0 20px;
    border-bottom:1px solid #e7eaee;
}

.dt-contract-clause:last-child {
    margin-bottom:0;
    border-bottom:0;
}

.dt-contract-closing {
    margin-top:22px;
    padding:16px 18px;
    border-left:4px solid #1559EA;
    background:#f5f8ff;
}

.cliente-portal-approval-checks {
    padding:24px 26px 8px;
}

.cliente-portal-approval-checks .form-check {
    margin:0 0 16px;
    padding:16px 18px 16px 46px;
    border:1px solid #dfe4ea;
    background:#fff;
}

.cliente-portal-approval-checks .form-check-input {
    margin-left:-28px;
    margin-top:.2rem;
}

.cliente-portal-approval-checks .form-check-label {
    color:#20252b;
    font-size:14px;
    line-height:1.45;
}

.cliente-portal-approval-actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    padding:8px 26px 24px;
}



.cliente-portal-resend-code {
    display:flex;
    align-items:center;
    gap:16px;
    padding:18px 20px;
    border:1px solid #dfe4ea;
    background:#fff;
}

.cliente-portal-resend-code-icon {
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    flex:0 0 42px;
    border:1px solid #d8e3ff;
    background:#f3f7ff;
    color:#1559EA;
    font-size:21px;
}

.cliente-portal-resend-code-copy {
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    min-width:0;
}

.cliente-portal-resend-code-copy strong {
    color:#1B222D;
    font-size:14px;
    line-height:1.35;
}

.cliente-portal-resend-code-copy span {
    margin-top:3px;
    color:#6f7885;
    font-size:12px;
    line-height:1.45;
}

.cliente-portal-resend-code .btn {
    flex:0 0 auto;
    white-space:nowrap;
}

@media (max-width: 767.98px) {
    .cliente-portal-approval-banner {
        align-items:flex-start;
        flex-direction:column;
    }
    .cliente-portal-approval-banner .btn-light {
        width:100%;
    }
    .cliente-portal-contract-copy {
        padding:20px;
    }
    .cliente-portal-approval-actions {
        align-items:stretch;
        flex-direction:column-reverse;
    }
    .cliente-portal-approval-actions .btn {
        width:100%;
    }
    .cliente-portal-resend-code {
        align-items:stretch;
        flex-direction:column;
    }
    .cliente-portal-resend-code-icon {
        display:none;
    }
    .cliente-portal-resend-code .btn {
        width:100%;
    }
}


.cliente-portal-contract-success {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}

.cliente-portal-contract-success-copy {
    display:flex;
    align-items:center;
    min-width:0;
}

.cliente-portal-contract-success .btn {
    flex:0 0 auto;
    white-space:nowrap;
}


.cliente-portal-verification-panel {
    scroll-margin-top:92px;
}

.cliente-portal-verification-inner {
    width:100%;
    max-width:620px;
    margin:0 auto;
    padding:6px 18px 20px;
}

.cliente-portal-verification-head {
    margin-bottom:22px;
    text-align:center;
}

.cliente-portal-verification-head h2 {
    margin:0 0 6px;
}

.cliente-portal-verification-head p {
    margin:0;
    color:#6f7885;
    font-size:13px;
    line-height:1.5;
}

.cliente-portal-verification-field {
    width:100%;
    max-width:520px;
    margin:0 auto;
}

.cliente-portal-verification-field .form-label {
    display:block;
    margin-bottom:8px;
    text-align:center;
}

.cliente-portal-verification-field .form-control {
    width:100%;
    min-height:56px;
    letter-spacing:.35em;
}

.cliente-portal-verification-action {
    display:flex;
    justify-content:center;
    margin-top:18px;
}

.cliente-portal-verification-action .btn {
    min-width:280px;
}

@media (max-width: 767.98px) {
    .cliente-portal-verification-inner {
        padding:4px 0 12px;
    }
    .cliente-portal-verification-action .btn {
        width:100%;
        min-width:0;
    }
}

@media (max-width: 767.98px) {
    .cliente-portal-contract-success {
        align-items:stretch;
        flex-direction:column;
    }
    .cliente-portal-contract-success .btn {
        width:100%;
    }
}

/* =========================================================
   Listados · etiquetas de estado a ancho completo 0.10.190
   Toda etiqueta de estado ubicada al inicio de una celda ocupa
   el ancho útil completo, aunque exista información secundaria
   debajo (prioridad, observación, fecha u otro dato auxiliar).
   Esto mantiene todos los estados visualmente uniformes.
   ========================================================= */
.table > tbody > tr > td > .badge:first-child,
.table > tbody > tr > td > .portal-cobro-status:first-child,
.table > tbody > tr > td > .desktodo-status-active:first-child,
.table > tbody > tr > td > .desktodo-status-inactive:first-child {
    display: flex !important;
    width: 100%;
    min-width: 86px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    line-height: 1.15;
    white-space: normal;
}

@media (max-width: 767.98px) {
    .table > tbody > tr > td > .badge:first-child,
    .table > tbody > tr > td > .portal-cobro-status:first-child,
    .table > tbody > tr > td > .desktodo-status-active:first-child,
    .table > tbody > tr > td > .desktodo-status-inactive:first-child {
        min-width: 72px;
    }
}


/* v0.10.185 · Portal de Clientes: listados de Trabajos y Soporte más informativos */
.cliente-ticket-mailbox .ticket-mailbox-requester {
    min-width: 190px;
}

.cliente-ticket-mailbox .ticket-mailbox-requester strong {
    display: block;
    color: #27313f;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
}

.cliente-ticket-mailbox .badge {
    display: flex;
    width: 100%;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    white-space: normal;
}

#tablaPortalTrabajos td:nth-child(3),
#tablaPortalTrabajos th:nth-child(3) {
    text-align: left !important;
}

#tablaPortalTrabajos td:nth-child(6),
#tablaPortalTrabajos th:nth-child(6),
#tablaPortalTrabajos td:nth-child(7),
#tablaPortalTrabajos th:nth-child(7) {
    text-align: right !important;
}

@media (max-width: 991.98px) {
    .cliente-ticket-mailbox .ticket-mailbox-requester {
        min-width: 160px;
    }
}


/* Portal de Clientes · Dashboard · avance de trabajos */
.cliente-portal-dashboard-chart-panel {
    overflow: hidden;
}

.cliente-portal-dashboard-chart {
    position: relative;
    width: 100%;
    min-height: 230px;
}

.cliente-portal-dashboard-chart-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #8a93a2;
    font-size: .7rem;
}

.cliente-portal-dashboard-chart-note i {
    color: #1559ea;
    font-size: .9rem;
}

.cliente-portal-dashboard-deliveries {
    border-top: 1px solid #e5e8ec;
}

.cliente-portal-dashboard-delivery {
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #e5e8ec;
    color: #1b222d;
    text-decoration: none;
}

.cliente-portal-dashboard-delivery:hover {
    color: #1b222d;
}

.cliente-portal-dashboard-delivery-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    color: #1559ea;
    border-radius: 2px;
    font-size: 1.05rem;
}

.cliente-portal-dashboard-delivery.is-overdue .cliente-portal-dashboard-delivery-icon {
    background: #fff2f2;
    color: #dc3545;
}

.cliente-portal-dashboard-delivery-copy,
.cliente-portal-dashboard-delivery-date {
    min-width: 0;
}

.cliente-portal-dashboard-delivery-copy strong,
.cliente-portal-dashboard-delivery-copy small,
.cliente-portal-dashboard-delivery-date strong,
.cliente-portal-dashboard-delivery-date small {
    display: block;
}

.cliente-portal-dashboard-delivery-copy strong {
    overflow: hidden;
    color: #1b222d;
    font-size: .79rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cliente-portal-dashboard-delivery-copy small {
    margin-top: 2px;
    color: #7a8494;
    font-size: .68rem;
}

.cliente-portal-dashboard-delivery-date {
    text-align: right;
    white-space: nowrap;
}

.cliente-portal-dashboard-delivery-date strong {
    color: #1b222d;
    font-size: .75rem;
}

.cliente-portal-dashboard-delivery-date small {
    margin-top: 2px;
    color: #8a93a2;
    font-size: .64rem;
}

.cliente-portal-dashboard-delivery.is-overdue .cliente-portal-dashboard-delivery-date small {
    color: #dc3545;
    font-weight: 700;
}

.cliente-portal-dashboard-empty {
    min-height: 230px;
}

@media (max-width: 767.98px) {
    .cliente-portal-dashboard-delivery {
        grid-template-columns: 34px minmax(0,1fr);
    }

    .cliente-portal-dashboard-delivery-date {
        grid-column: 2;
        margin-top: -5px;
        text-align: left;
    }
}

/* Dashboard · comparativa de ingresos mensuales */
.dashboard-revenue-currency {
    width: 150px;
    flex: 0 0 150px;
}
.dashboard-revenue-metric {
    padding: 0.9rem 1rem;
    min-height: 78px;
}
.dashboard-revenue-chart-wrap {
    position: relative;
    width: 100%;
    height: 340px;
}
@media (max-width: 767.98px) {
    .dashboard-revenue-currency {
        width: 100%;
        flex-basis: auto;
    }
    .dashboard-revenue-chart-wrap {
        height: 300px;
    }
}

/* =========================================================
   Chat en Vivo + presencia de clientes · v0.10.209
   ========================================================= */
.desktodo-online-count {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 9px;
    background: var(--dt-primary);
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    line-height: 12px;
    text-align: center;
}

.desktodo-presence-dot {
    display: inline-block;
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #98a2b1;
}

.desktodo-presence-dot.online {
    background: #169b62;
    box-shadow: 0 0 0 3px rgba(22, 155, 98, .12);
}

.desktodo-presence-dot.idle {
    background: #e3a008;
    box-shadow: 0 0 0 3px rgba(227, 160, 8, .12);
}

.chat-admin-card {
    overflow: hidden;
}

.chat-admin-grid {
    display: grid;
    grid-template-columns: minmax(245px, 290px) minmax(420px, 1fr) minmax(245px, 300px);
    min-height: 640px;
    max-height: calc(100vh - 220px);
}

.chat-admin-sidebar,
.chat-admin-presence {
    min-width: 0;
    background: #fff;
}

.chat-admin-sidebar {
    border-right: 1px solid var(--dt-border);
}

.chat-admin-presence {
    border-left: 1px solid var(--dt-border);
}

.chat-admin-pane-head {
    min-height: 79px;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--dt-border);
    display: flex;
    align-items: center;
}

.chat-admin-conversations,
.chat-admin-presence-list {
    height: calc(100% - 79px);
    overflow-y: auto;
}

.chat-admin-conversation {
    width: 100%;
    padding: .9rem 1rem;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    background: #fff;
    color: var(--dt-text);
    text-align: left;
    transition: background .15s ease, box-shadow .15s ease;
}

.chat-admin-conversation:hover {
    background: #f8faff;
}

.chat-admin-conversation.is-active {
    background: #f3f7ff;
    box-shadow: inset 3px 0 0 var(--dt-primary);
}

.chat-admin-conversation.is-unread .chat-admin-conversation-contact,
.chat-admin-conversation.is-unread .chat-admin-conversation-preview {
    font-weight: 700;
}

.chat-admin-conversation-head,
.chat-admin-conversation-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.chat-admin-conversation-contact {
    overflow: hidden;
    font-size: .84rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-admin-conversation-client,
.chat-admin-conversation-preview,
.chat-admin-conversation-foot {
    display: block;
    margin-top: .24rem;
    color: var(--dt-muted);
    font-size: .7rem;
}

.chat-admin-conversation-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-admin-conversation-foot {
    display: flex;
    margin-top: .55rem;
}

.chat-admin-unread {
    min-width: 21px;
    border-radius: 11px;
}

.chat-admin-thread {
    min-width: 0;
    min-height: 0;
    background: #f8f9fb;
}

.chat-admin-thread-empty {
    height: 100%;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: 2rem;
    color: var(--dt-muted);
    text-align: center;
}

.chat-admin-thread-empty > i {
    color: #a8b1bf;
    font-size: 3rem;
}

.chat-admin-thread-empty strong {
    color: var(--dt-text);
    font-size: 1rem;
}

.chat-admin-thread-active {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(260px, 1fr) auto;
}

.chat-admin-thread-head {
    min-height: 79px;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--dt-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.chat-admin-thread-client {
    margin-top: .18rem;
    color: var(--dt-muted);
    font-size: .76rem;
}

.chat-admin-assignee {
    padding: .55rem 1.15rem;
    border-bottom: 1px solid var(--dt-border);
    background: #fff;
    color: var(--dt-muted);
    font-size: .7rem;
}

.chat-admin-messages {
    min-height: 0;
    padding: 1.2rem;
    overflow-y: auto;
}

.chat-admin-message-row {
    display: flex;
    margin-bottom: .85rem;
}

.chat-admin-message-row.is-team {
    justify-content: flex-end;
}

.chat-admin-message-row.is-system {
    justify-content: center;
}

.chat-admin-message-bubble {
    max-width: min(78%, 620px);
    padding: .72rem .82rem;
    border: 1px solid #e3e7ed;
    border-radius: 10px 10px 10px 2px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(27, 34, 45, .04);
}

.chat-admin-message-row.is-team .chat-admin-message-bubble {
    border-color: rgba(21, 89, 234, .18);
    border-radius: 10px 10px 2px 10px;
    background: #edf4ff;
}

.chat-admin-message-row.is-system .chat-admin-message-bubble {
    max-width: 88%;
    border-style: dashed;
    background: #f4f6f8;
    color: var(--dt-muted);
    text-align: center;
}

.chat-admin-message-author {
    margin-bottom: .22rem;
    color: #526071;
    font-size: .65rem;
    font-weight: 700;
}

.chat-admin-message-text {
    color: var(--dt-text);
    font-size: .81rem;
    line-height: 1.48;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-admin-message-time {
    margin-top: .3rem;
    color: #8d97a6;
    font-size: .6rem;
    text-align: right;
}

.chat-admin-message-empty {
    padding: 3rem 1rem;
    color: var(--dt-muted);
    font-size: .78rem;
    text-align: center;
}

.chat-admin-composer {
    padding: .9rem 1rem;
    border-top: 1px solid var(--dt-border);
    background: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: end;
}

.chat-admin-composer textarea {
    min-height: 62px;
    max-height: 150px;
    resize: vertical;
}

.chat-admin-readonly {
    padding: 1rem;
    border-top: 1px solid var(--dt-border);
    background: #fff;
    color: var(--dt-muted);
    font-size: .75rem;
    text-align: center;
}

.chat-admin-presence-item {
    padding: .9rem 1rem;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.chat-admin-presence-info {
    min-width: 0;
    font-size: .75rem;
}

.chat-admin-presence-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-admin-presence-client,
.chat-admin-presence-page,
.chat-admin-presence-time {
    margin-top: .22rem;
    color: var(--dt-muted);
    font-size: .68rem;
}

.chat-admin-presence-page {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-admin-empty {
    min-height: 170px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    color: var(--dt-muted);
    font-size: .75rem;
    text-align: center;
}

.chat-admin-empty i {
    color: #a8b1bf;
    font-size: 2rem;
}

/* Dashboard · presencia */
.dashboard-online-list {
    display: flex;
    flex-direction: column;
}

.dashboard-online-item {
    display: grid;
    grid-template-columns: 12px minmax(190px, 1fr) minmax(220px, 1.4fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .8rem 1.5rem;
    border-bottom: 1px solid #edf0f4;
    color: inherit;
    text-decoration: none;
}

.dashboard-online-item:last-child {
    border-bottom: 0;
}

.dashboard-online-item:hover {
    background: #f8faff;
    color: inherit;
}

.dashboard-online-identity {
    min-width: 0;
}

.dashboard-online-identity strong,
.dashboard-online-identity span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-online-identity strong {
    font-size: .78rem;
}

.dashboard-online-identity span,
.dashboard-online-page {
    color: var(--dt-muted);
    font-size: .68rem;
}

.dashboard-online-page {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-online-action {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--dt-primary);
    font-size: .7rem;
    font-weight: 700;
}

.dashboard-online-empty {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    color: var(--dt-muted);
    font-size: .76rem;
}

/* Portal de Clientes · Chat en Vivo */
.cliente-live-chat {
    position: fixed;
    right: 24px;
    bottom: 72px;
    z-index: 1045;
}

.cliente-live-chat-toggle {
    position: relative;
    min-height: 44px;
    padding: 0 .95rem;
    border: 0;
    border-radius: 3px;
    background: var(--dt-primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(27, 34, 45, .18);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
    font-weight: 700;
}

.cliente-live-chat-toggle:hover {
    filter: brightness(.96);
}

.cliente-live-chat-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 11px;
    background: #dc3545;
    color: #fff;
    font-size: .61rem;
    line-height: 16px;
    text-align: center;
}

.cliente-live-chat-panel {
    position: absolute;
    right: 0;
    bottom: 54px;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 150px));
    border: 1px solid #dfe4eb;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(27, 34, 45, .22);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(180px, 1fr) auto auto;
}

.cliente-live-chat-head {
    padding: .85rem 1rem;
    background: var(--dt-graphite);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.cliente-live-chat-head strong,
.cliente-live-chat-head span {
    display: block;
}

.cliente-live-chat-head strong {
    font-size: .86rem;
}

.cliente-live-chat-head span {
    margin-top: .18rem;
    color: rgba(255,255,255,.76);
    font-size: .66rem;
}

.cliente-live-chat-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: .35rem;
    border-radius: 50%;
    background: #f4b740;
}

.cliente-live-chat-status-dot.online {
    background: #20c77a;
}

.cliente-live-chat-status-dot.away {
    background: #f4b740;
}

.cliente-live-chat-close {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
}

.cliente-live-chat-context {
    padding: .55rem .85rem;
    border-bottom: 1px solid var(--dt-border);
    background: #f7f9fc;
    color: var(--dt-muted);
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .65rem;
}

.cliente-live-chat-messages {
    min-height: 0;
    padding: .85rem;
    overflow-y: auto;
    background: #fbfcfd;
}

.cliente-live-chat-welcome {
    min-height: 185px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: 1rem;
    color: var(--dt-muted);
    text-align: center;
}

.cliente-live-chat-welcome i {
    color: #9aa5b4;
    font-size: 2rem;
}

.cliente-live-chat-welcome strong {
    color: var(--dt-text);
    font-size: .86rem;
}

.cliente-live-chat-welcome span {
    max-width: 280px;
    font-size: .71rem;
    line-height: 1.45;
}

.cliente-live-chat-message {
    max-width: 82%;
    margin: 0 auto .7rem 0;
    padding: .62rem .72rem;
    border: 1px solid #e2e7ee;
    border-radius: 9px 9px 9px 2px;
    background: #fff;
}

.cliente-live-chat-message.mine {
    margin-right: 0;
    margin-left: auto;
    border-color: rgba(21,89,234,.18);
    border-radius: 9px 9px 2px 9px;
    background: #edf4ff;
}

.cliente-live-chat-message-meta {
    margin-bottom: .18rem;
    color: #667284;
    font-size: .61rem;
    font-weight: 700;
}

.cliente-live-chat-message-text {
    color: var(--dt-text);
    font-size: .76rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.cliente-live-chat-message-time {
    margin-top: .24rem;
    color: #9099a7;
    font-size: .57rem;
    text-align: right;
}

.cliente-live-chat-closed {
    padding: .6rem .75rem;
    border-top: 1px solid var(--dt-border);
    background: #f8f9fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    color: var(--dt-muted);
    font-size: .68rem;
}

.cliente-live-chat-composer {
    padding: .7rem;
    border-top: 1px solid var(--dt-border);
    background: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: .55rem;
    align-items: end;
}

.cliente-live-chat-composer textarea {
    min-height: 58px;
    max-height: 120px;
    resize: none;
    font-size: .76rem;
}

.cliente-live-chat-composer .btn {
    height: 42px;
    padding: 0;
}

@media (max-width: 1199.98px) {
    .chat-admin-grid {
        grid-template-columns: 260px minmax(390px, 1fr);
    }
    .chat-admin-presence {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .chat-admin-grid {
        display: block;
        max-height: none;
    }
    .chat-admin-sidebar,
    .chat-admin-thread {
        border: 0;
    }
    .chat-admin-conversations {
        max-height: 250px;
    }
    .chat-admin-thread-active,
    .chat-admin-thread-empty {
        min-height: 500px;
    }
    .chat-admin-thread-head {
        align-items: flex-start;
    }
    .chat-admin-message-bubble {
        max-width: 90%;
    }
    .dashboard-online-item {
        grid-template-columns: 12px minmax(0, 1fr) auto;
        padding: .8rem 1rem;
    }
    .dashboard-online-page {
        grid-column: 2 / -1;
    }
    .cliente-live-chat {
        right: 12px;
        bottom: 64px;
    }
    .cliente-live-chat-panel {
        position: fixed;
        right: 12px;
        bottom: 118px;
        width: calc(100vw - 24px);
        height: min(600px, calc(100vh - 150px));
    }
}

.min-w-0 { min-width: 0 !important; }
