.page, .page-content {
    min-height: auto !important;
}

/* Tablas: columnas reutilizables (título, texto largo, acciones) */
.card-table th.table-col-title {
    max-width: 16rem;
    white-space: normal;
    vertical-align: middle;
}

.card-table td.table-col-title {
    max-width: 16rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    vertical-align: middle;
}

.card-table th.table-col-text {
    max-width: 18rem;
    white-space: normal;
    vertical-align: middle;
}

.card-table td.table-col-text {
    max-width: 18rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    vertical-align: middle;
}

.card-table th.table-col-actions,
.card-table td.table-col-actions {
    white-space: nowrap;
    width: 1%;
}

/* Contracts table: layout automático; título compacto; acciones sin partir */
#contracts-table,
.contracts-table {
    width: 100% !important;
}

#contracts-table .contract-status-badge,
.contracts-table .contract-status-badge {
    white-space: normal;
    line-height: 1.1;
    text-align: center;
    max-width: 100%;
}

/*
 * Botones DataTables «Este mes» / «El mes pasado» (.buttons-month-filter): el theme suma btn-primary por defecto
 * sobre outline → texto invisible; span interno hereda color.
 */
.dt-buttons .buttons-month-filter.dt-button span {
    color: inherit !important;
    background-color: transparent !important;
}
.dt-buttons .buttons-month-filter.dt-button {
    border-radius: 0.375rem !important;
    color: #0d6efd !important;
    font-weight: 600 !important;
    border: 1px solid #0d6efd !important;
    padding: 0.375rem 0.75rem !important;
    background-color: #fff !important;
    align-self: center;
    line-height: 1.5 !important;
    box-shadow: none !important;
}
.dt-buttons .buttons-month-filter.dt-button:hover,
.dt-buttons .buttons-month-filter.dt-button:hover span {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}
.dt-buttons .buttons-month-filter.dt-button.btn-primary,
.dt-buttons .buttons-month-filter.dt-button.btn-primary span,
.dt-buttons .buttons-month-filter.dt-button.btn-primary:hover,
.dt-buttons .buttons-month-filter.dt-button.btn-primary:hover span {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Barra DataTables con filtros por mes: marcar la tabla con class rs-datatable-month-filters */
div.dataTables_wrapper:has(table.rs-datatable-month-filters) div.col-md-8.d-flex {
    align-items: center !important;
}
div.dataTables_wrapper:has(table.rs-datatable-month-filters) div.dataTables_filter {
    margin-bottom: 0 !important;
}
div.dataTables_wrapper:has(table.rs-datatable-month-filters) div.dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
}
div.dataTables_wrapper:has(table.rs-datatable-month-filters) div.dt-buttons {
    margin-bottom: 0 !important;
}

.rs-coming-soon-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: middle;
    color: #92600a;
    background: rgba(251, 197, 24, 0.18);
    border: 1px solid rgba(251, 197, 24, 0.45);
    white-space: nowrap;
}

.pricing-features .rs-coming-soon-badge,
.onboarding-plan__features .rs-coming-soon-badge {
    margin-left: 0.5rem;
    vertical-align: baseline;
}

.contract-photos-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contract-photos-empty {
    padding: 0.75rem 1rem;
    border: 1px dashed #d8dce3;
    border-radius: 0.5rem;
    background: #fafbfc;
}

.contract-photo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e9f2;
    border-radius: 0.5rem;
    background: #fff;
}

.contract-photo-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #467fcf;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.contract-photo-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.35rem;
    border: 1px solid #e5e9f2;
    flex-shrink: 0;
}

.contract-photo-meta {
    flex: 1;
    min-width: 0;
}

.contract-photo-name {
    font-weight: 600;
    word-break: break-word;
}

.contract-photo-caption {
    color: #6c757d;
    font-size: 0.875rem;
}

.contract-photo-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* Importar datos: tabs del theme (tabs-menu1 / table_tabs) */
.data-import-guide .card-body {
    padding-bottom: 0.5rem;
}

.data-import-guide .data-import-guide-tabs {
    padding: 0.75rem 1.25rem 0;
    border: 0;
    border-bottom: 1px solid #e9ebfa;
}

.data-import-guide .tabs-menu-body {
    border: 0;
    border-radius: 0 0 8px 8px;
    padding: 1.25rem 1.5rem 1.5rem;
}

.data-import-guide .data-import-guide-tabs .tabs-menu1 ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.data-import-guide .data-import-guide-tabs .tabs-menu1 ul li {
    margin: 0;
}

.data-import-guide .data-import-guide-tabs .tabs-menu1 ul li a {
    padding: 0.65rem 1.15rem;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e9ebfa;
    border-bottom: 0;
    margin-bottom: -1px;
    background: #f3f4f6;
    color: #495057;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.data-import-guide .data-import-guide-tabs .tabs-menu1 ul li a:hover:not(.active) {
    color: var(--primary-bg-color);
    background: #eceef1;
}

.data-import-guide .data-import-guide-tabs .tabs-menu1 ul li a.active,
.data-import-guide .data-import-guide-tabs .tabs-menu1 ul li a.active:hover {
    background: var(--primary-bg-color);
    color: #fff;
    border-color: var(--primary-bg-color);
}

.data-import-guide .data-import-guide-tabs .tabs-menu1 ul li a.active .data-import-guide-tab-dot {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.data-import-guide-tab-dot {
    width: 10px;
    height: 10px;
}

.help-header-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: auto !important;
    min-width: 9.5rem;
    height: 38px !important;
    margin: 0 8px 0 6px;
    padding: 0 14px !important;
    gap: 0.45rem;
    border-radius: 8px;
    line-height: 1 !important;
    text-align: left;
    white-space: nowrap;
    background: #d9f2f8 !important;
    color: #0a6678;
    border: 1px solid #b8e4ef;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.help-header-link--attention {
    position: relative;
    overflow: visible !important;
}

.help-header-link--attention::before,
.help-header-link--attention::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    box-sizing: border-box;
}

.help-header-link--attention::before {
    z-index: 2;
    background: rgba(23, 162, 184, 0.92);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
    animation: help-header-link-dot-glow 2.4s ease-in-out infinite;
}

.help-header-link--attention::after {
    z-index: 1;
    border: 2px solid rgba(23, 162, 184, 0.45);
    background: rgba(23, 162, 184, 0.15);
    transform-origin: center center;
    animation: help-header-link-corner-ring 2.4s ease-out infinite;
}

@keyframes help-header-link-corner-ring {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }

    70%,
    100% {
        transform: scale(3.2);
        opacity: 0;
    }
}

@keyframes help-header-link-dot-glow {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-header-link--attention::before {
        animation: none;
    }

    .help-header-link--attention::after {
        animation: none;
        opacity: 0.5;
        transform: scale(1.6);
    }
}

@media (max-width: 575.98px) {
    .help-header-link--attention::before,
    .help-header-link--attention::after {
        top: -1px;
        right: -1px;
        width: 9px;
        height: 9px;
    }
}

.help-header-link i {
    font-size: 1.125rem;
    line-height: 1;
    flex-shrink: 0;
}

.help-header-link__label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    color: inherit;
}

.help-header-link:hover,
.help-header-link:focus {
    background: #c4ebf4 !important;
    color: #084f5e;
    border-color: #9fd9e6;
}

.help-header-link.active {
    background: #17a2b8 !important;
    border-color: #17a2b8;
    color: #fff !important;
}

@media (min-width: 992px) {
    .help-header-link {
        height: 45px !important;
        min-width: 10.5rem;
        padding: 0 16px !important;
    }
}

@media (max-width: 575.98px) {
    .help-header-link {
        min-width: 38px;
        width: 38px !important;
        padding: 0 !important;
    }

    .help-header-link__label {
        display: none;
    }
}

.help-doc__welcome {
    font-size: 0.9375rem;
    line-height: 1.65;
    font-weight: 500;
    color: #495057;
    margin-bottom: 1.25rem;
}

.help-doc__intro .help-doc__welcome {
    margin-bottom: 1rem;
}

.help-doc__toc {
    margin-top: 1.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ebfa;
}

.help-doc__toc-title {
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    color: #1a1630;
}

.help-doc__toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    column-gap: 2rem;
    row-gap: 0.35rem;
}

@media (min-width: 768px) {
    .help-doc__toc-list {
        columns: 2;
    }
}

@media (min-width: 1200px) {
    .help-doc__toc-list {
        columns: 3;
    }
}

.help-doc__toc-list li {
    break-inside: avoid;
    margin-bottom: 0.35rem;
}

.help-doc__toc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--primary-bg-color);
    text-decoration: none;
}

.help-doc__toc-link .fe {
    flex-shrink: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.help-doc__toc-link:hover {
    text-decoration: underline;
}

.help-doc__steps {
    margin-bottom: 1rem;
    padding-left: 1.35rem;
}

.help-doc__steps li {
    margin-bottom: 0.85rem;
    color: #6c757d;
    line-height: 1.65;
}

.help-doc__steps .help-doc__link {
    display: inline-block;
    margin-left: 0.25rem;
}

.help-doc__inline-icon {
    font-size: 0.9em;
    vertical-align: -0.1em;
    margin-left: 0.15rem;
    color: #6c757d;
}

.help-doc {
    width: 100%;
    max-width: none;
}

.help-doc .card-body {
    padding: 1.75rem 1.75rem 2rem;
}

.help-doc__intro p:not(.help-doc__welcome) {
    color: #6c757d;
    line-height: 1.65;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.help-doc__intro p:last-child {
    margin-bottom: 0;
}

.help-doc__section {
    margin-top: 2.5rem;
    padding-top: 0;
    scroll-margin-top: 5rem;
}

.help-doc__section:first-of-type {
    margin-top: 2rem;
}

.help-doc__section:not(.help-doc__section--faq):not(.help-doc__section--support) h2 {
    font-size: calc(1.125rem + 2px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #1a1630;
}

.help-doc__section:not(.help-doc__section--faq):not(.help-doc__section--support) h3 {
    font-size: calc(0.9375rem + 4px);
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.help-doc__section p,
.help-doc__section li {
    color: #6c757d;
    line-height: 1.65;
    font-size: 0.9375rem;
}

.help-doc__section ul,
.help-doc__section ol {
    margin-bottom: 1rem;
    padding-left: 1.35rem;
}

.help-doc__section ul ul {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.help-doc__link {
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-bg-color);
}

.help-doc__link:hover {
    text-decoration: underline;
}

.help-doc__section--faq h2,
.help-doc__section--support h2 {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #1a1630;
}

.help-doc__section--faq {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ebfa;
}

.help-doc__section--support {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ebfa;
}

.help-quickstart-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.help-quickstart-step {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #e9ebfa;
    border-radius: 8px;
    background: #fafbfc;
}

.help-quickstart-step--highlight {
    border-color: #b8cce4;
    background: #f0f6fc;
}

.help-quickstart-step__number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    background: var(--primary-bg-color);
}

.help-quickstart-step__body h6 {
    font-weight: 600;
}

.help-doc__section--faq .help-faq-accordion {
    margin-top: 0.5rem;
}

.data-import-upload-zone {
    padding: 1.25rem 1.5rem;
    border: 1px dashed #d3dfea;
    border-radius: 8px;
    background: #fafbfc;
}
