:root {
    --office-table-blue: #1E3F6E;
    --office-table-border: #ddd;
    --office-table-soft: #f5f7fb;
    --office-table-zebra: #fbfcfe;
    --office-control-border: #d7dee8;
    --office-control-focus: #2b6cb0;}


.config-page-header {
    gap: 0.75rem;
    margin-bottom: 0.35rem !important;
    padding: 0;
    background: #fff;
}

.config-page-header h4 {
    color: var(--office-table-blue);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0;
}

.data-grid-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 8px;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.data-grid-title {
    color: var(--office-table-blue);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
}
.data-grid-title-block {
    min-width: 0;
}

.data-grid-selection-summary {
    display: none;
    max-width: 100%;
    margin-top: 0.1rem;
    color: #4b5563;
    font-size: 0.72rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-grid-title-row .pagination-wrapper {
    justify-content: flex-end;
    margin-left: auto;
}
.config-page-header .btn {
    font-size: 0.78rem;
}

.config-page-header .btn,
.config-table-toolbar .btn,
.config-pagination-controls .btn,
.table-transfer-toolbar .btn,
.table-transfer-import-button,
.data-grid-back-button,
.data-grid-title-actions .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 1.8rem !important;
    min-height: 1.8rem !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0.2rem 0.5rem !important;
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    gap: 0.35rem !important;
    white-space: nowrap !important;
}

/* Tabla fluida */
.table-config {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
    table-layout: fixed;
}

    /* Columnas fijas */
    .table-config col.fixed-col {
        width: 80px;
    }

    .table-config col.col-action {
        width: 80px;
    }

    /* Columnas autoexpandibles con ancho minimo */
    .table-config col.autoexpand-col {
        min-width: 120px;
    }

    /* Columnas seleccionables con ancho fijo */
    .table-config col.select-col {
        width: 180px;
        min-width: 120px;
    }

    .table-config td.select-col {
        min-width: 120px;
    }


.table-config th {
        background: var(--office-table-blue);
        color: #fff;
        font-weight: 600;
        padding: 3px 5px;
        border: 0;
        border-bottom: 1px solid var(--office-table-border);
        text-align: left;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .table-config td {
        padding: 2px 5px;
        border: 0;
        border-bottom: 1px solid var(--office-table-border);
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .table-config tbody tr:nth-child(even) {
        background-color: var(--office-table-zebra);
    }

    .table-config tbody tr:hover {
        background-color: var(--office-table-soft);
    }

    /* Inputs y selects compactos */
    .table-config input:not([type="checkbox"]),
    .table-config select,
    .table-config textarea {
        width: 100%;
        min-width: 0;
        min-height: 1.35rem;
        box-sizing: border-box;
        padding: 1px 4px;
        font-size: 0.78rem;
        line-height: 1.2;
        color: inherit;
        background-color: #fff;
        border: 1px solid var(--office-control-border);
        border-radius: 0.2rem;
        box-shadow: none;
    }

    .table-config input:not([type="checkbox"]):hover,
    .table-config select:hover,
    .table-config textarea:hover {
        border-color: #b9c7d8;
    }

    .table-config input:not([type="checkbox"]):focus,
    .table-config select:focus,
    .table-config textarea:focus {
        border-color: var(--office-control-focus);
        outline: 0;
        box-shadow: 0 0 0 1px rgba(43, 108, 176, 0.18);
    }

    .table-config input[readonly],
    .table-config input:disabled,
    .table-config select:disabled,
    .table-config textarea:disabled {
        color: #6c757d;
        background-color: #f3f6fa;
    }

    .table-config textarea {
        resize: vertical;
        white-space: normal;
    }

    /* Checkbox */
    .table-config .form-check-input {
        margin: 0;
        padding: 0;
        width: 0.85rem;
        height: 0.85rem;
        min-height: 0;
        vertical-align: middle;
        cursor: pointer;
        display: inline-block;
    }

/* Celdas numericas */
.numeric-col {
    text-align: center;
}

.table-config .numeric-col input {
    text-align: right;
}

/* Celda de acciones */
.table-config th.action-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    text-align: center;
    border-bottom: 1px solid var(--office-table-border) !important;
}

.table-config td.action-cell,
.table-config td.action-cell.d-flex {
    display: table-cell !important;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    padding: 2px 5px;
    border-bottom: 1px solid var(--office-table-border) !important;
    background-color: transparent !important;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    overflow: visible;
    position: relative;
}

.table-config td.action-cell .btn-icon + .btn-icon {
    margin-left: 0.2rem;
}

/* Botones icono sin bordes */
.btn-icon {
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    line-height: 1;
}

.btn-icon:disabled,
.btn-icon.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-icon:disabled i,
.btn-icon.disabled i {
    color: #9aa3af !important;
}
/* Iconos */
.table-config td.action-cell i.bi-check-lg {
    color: #198754;
}

    .table-config td.action-cell i.bi-check-lg:hover {
        color: #157347;
    }

.table-config td.action-cell i.bi-trash-fill {
    color: #dc3545;
}

    .table-config td.action-cell i.bi-trash-fill:hover {
        color: #bb2d3b;
    }

.config-table-toolbar {
    width: 100%;
    margin-bottom: 0.35rem !important;
    padding: 0;
    overflow: visible;
    background: #fff;
}

.config-table-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.config-table-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.config-table-toolbar-actions .btn {
    font-size: 0.78rem;
    min-height: 1.8rem;
}

.config-table-toolbar-actions .pagination-wrapper {
    justify-content: flex-end;
}
.config-table-toolbar label,
.config-table-toolbar .form-control,
.config-table-toolbar .form-select,
.config-table-toolbar input,
.config-table-toolbar select {
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
}

.config-table-toolbar .form-control,
.config-table-toolbar .form-select,
.config-table-toolbar input:not([type="checkbox"]),
.config-table-toolbar select {
    height: 1.8rem !important;
    min-height: 1.8rem !important;
    padding: 0.2rem 0.45rem !important;
}

.config-pagination-controls {
    align-items: center;
    gap: 0.4rem;
}

.config-pagination-controls .pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.config-pagination-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Paginacion */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-header-cell {
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 2px 0;
}

.calendar-cell {
    padding: 6px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

    .calendar-cell.empty {
        background: transparent;
        cursor: default;
    }

.day-laborable {
    background: #e8f5e9;
}

.day-capsetmana {
    background: #eeeeee;
}

.day-festiu {
    background: #ff1f1f;
}

.day-nolaborable {
    background: #ff8a65;
}

.calendar-cell:hover {
    outline: 2px solid #007bff;
}

.legend-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 0.85rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid #ccc;
}

.legend-number {
    font-weight: 600;
}

.legend-text {
    opacity: 0.85;
}

/* Colors coherents amb el calendari */
.legend-color.festiu {
    background: #ff1f1f;
}

.legend-color.nolaborable {
    background: #ff8a65;
}

.legend-color.laborable {
    background: #e8f5e9;
}

.legend-color.capsetmana {
    background: #eeeeee;
}

/* Unified configuration surfaces */
.config-page {
    font-size: 0.78rem;
    color: #1f2937;
}

.config-page .form-label,
.config-page .form-select,
.config-page .form-control,
.config-page .btn,
.config-page .alert {
    font-size: 0.78rem;
}

.config-page .form-label {
    color: #334155;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.config-page .form-select,
.config-page .form-control {
    min-height: 1.45rem;
    padding: 0.2rem 0.45rem;
    line-height: 1.2;
    border-color: var(--office-control-border);
    border-radius: 0.2rem;
    box-shadow: none;
}

.config-page .form-select:focus,
.config-page .form-control:focus {
    border-color: var(--office-control-focus);
    box-shadow: 0 0 0 1px rgba(43, 108, 176, 0.18);
}

.config-page .form-check-input {
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0;
}

.config-page .badge {
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.config-section-title,
.config-subsection-title {
    color: var(--office-table-blue);
    font-weight: 600;
    line-height: 1.25;
}

.config-section-title {
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

.config-subsection-title {
    font-size: 0.82rem;
    margin: 0.75rem 0 0.35rem;
}

.config-action-button,
.config-inline-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
}

.config-action-button {
    padding: 0.28rem 0.65rem;
}

.config-inline-button {
    padding: 0.2rem 0.45rem;
}

.config-alert {
    padding: 0.35rem 0.55rem;
    margin-bottom: 0.65rem;
}

.config-empty-state {
    margin: 0.4rem 0;
    color: #64748b;
}

.config-form-panel {
    max-width: 560px;
    border: 1px solid var(--office-table-border);
    border-radius: 0.35rem;
    background: #fff;
    padding: 0.75rem;
}

.config-field-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

.selector-config-page .form-select {
    max-width: 360px;
}

.config-two-column {
    margin-left: 0;
    margin-right: 0;
    overflow-x: hidden;
}

.config-split-column {
    padding-top: 0.15rem;
}

.config-split-column-left {
    border-right: 1px solid var(--office-table-border);
    padding-right: 1rem;
}

.user-management-page .col-md-7.config-split-column {
    padding-left: 1rem;
}

.user-management-table th:last-child,
.user-management-table td:last-child {
    width: 70px;
}

.user-management-table .user-active-checkbox:disabled {
    opacity: 1;
    cursor: not-allowed;
}
.user-management-table td {
    white-space: normal;
}

.user-management-table td:first-child,
.user-management-table td:nth-child(2),
.user-management-table td.action-cell {
    white-space: nowrap;
}

.config-assignment-row {
    border: 1px solid var(--office-table-border);
    border-radius: 0.35rem;
    background: #fbfcfe;
    padding: 0.55rem;
    margin-bottom: 0.45rem;
}

.config-assignment-row .d-flex.mt-2 {
    gap: 0.35rem;
}

@media (max-width: 767.98px) {
    .config-field-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .config-form-panel {
        max-width: none;
    }

    .config-split-column-left {
        border-right: 0;
        border-bottom: 1px solid var(--office-table-border);
        padding-right: 0;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .user-management-page .col-md-7.config-split-column {
        padding-left: 0;
    }
}


/* Scheduler diagnostics */
.scheduler-message,
.scheduler-error-details {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.scheduler-error-details summary {
    cursor: pointer;
    font-weight: 600;
}

.scheduler-error-details pre,
.scheduler-error-modal-panel pre {
    margin: 0.45rem 0 0;
    padding: 0.55rem;
    max-height: 55vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.74rem;
    line-height: 1.35;
    color: #111827;
    background: #fff;
    border: 1px solid #f1b7b7;
    border-radius: 0.25rem;
}

.table-config td.scheduler-error-cell {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.scheduler-error-button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 1.55rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.74rem;
    line-height: 1.2;
}

.scheduler-error-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.42);
}

.scheduler-error-modal-panel {
    width: min(980px, 96vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d7dee8;
    border-radius: 0.4rem;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.28);
}

.scheduler-error-modal-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #d7dee8;
    color: var(--office-table-blue);
}

.scheduler-error-modal-panel h5 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
}

.scheduler-error-modal-panel pre {
    margin: 0;
    max-height: none;
    flex: 1 1 auto;
    border: 0;
    border-radius: 0;
}

.scheduler-running {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: normal !important;
}


.scheduler-page {
    overflow-x: hidden;
}

.scheduler-table {
    width: 100%;
    table-layout: fixed;
}

.scheduler-table col.scheduler-col-enabled {
    width: 76px;
}

.scheduler-table col.scheduler-col-servers {
    width: 96px;
}

.scheduler-table col.scheduler-col-date {
    width: 126px;
}

.scheduler-table col.scheduler-col-duration {
    width: 78px;
}

.scheduler-table col.scheduler-col-result {
    width: 104px;
}

.scheduler-table col.scheduler-col-actions {
    width: 92px;
}

.scheduler-table col.scheduler-col-name,
.scheduler-table col.scheduler-col-schedule {
    width: auto;
}

.scheduler-table td.action-cell,
.scheduler-table th.action-cell {
    width: 92px;
}

.scheduler-table td,
.scheduler-table th {
    min-width: 0;
}

.scheduler-table th {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
}
.table-config tbody tr.scheduler-row-running {
    background: #eaf4ff !important;
    box-shadow: inset 3px 0 0 #2b6cb0;
}

.btn-icon .spinner-border-sm {
    width: 0.8rem;
    height: 0.8rem;
    border-width: 0.12em;
}
.table-config .category-color-cell {
    min-width: 105px;
}

.table-config .category-color-picker {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.table-config .category-color-picker .form-control-color {
    width: 1.7rem;
    min-width: 1.7rem;
    height: 1.35rem;
    padding: 1px;
}

.table-config .category-color-value {
    min-width: 3.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72rem;
}

.table-config .category-color-clear {
    width: 1.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    font-size: 0.68rem;
}

.table-config .category-color-clear:disabled {
    opacity: 0.25;
    cursor: default;
}

.config-rules-transfer-toolbar,
.table-transfer-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.config-rules-transfer-toolbar .btn,
.table-transfer-toolbar .btn,
.config-rules-import-button {
    margin: 0 !important;
}

.config-rules-import-button.disabled,
.table-transfer-import-button.disabled {
    pointer-events: none;
    opacity: 0.65;
}

@media print {
    .sidebar,
    .top-row,
    .navbar,
    .site-footer,
    #cookieConsent,
    .cookie-modal-overlay,
    .selection-grid,
    .config-page-header button,
    .config-table-toolbar,
    .config-table-toolbar-actions,
    .data-grid-title-actions,
    .activity-detail-header-actions,
    .table-transfer-toolbar,
    .pagination-wrapper,
    .btn,
    button,
    button.btn,
    a.btn,
    label.btn,
    .btn.d-flex,
    .btn.d-inline-flex,
    .config-page-header .btn,
    .config-page-header button,
    .config-page-header a.btn,
    .data-grid-back-button,
    .detail-back-button,
    .btn-icon,
    .action-cell,
    .grid-loading-overlay,
    .activity-detail-loading-overlay {
        display: none !important;
        visibility: hidden !important;
    }
    body,
    .page,
    .content,
    main,
    article.content,
    .scroll-zone {
        background: #fff !important;
        color: #000 !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: none !important;
    }

    .config-page-header {
        margin-bottom: 0.35rem !important;
    }

    .data-grid-title-row,
    .activity-detail-header {
        display: block !important;
        margin: 0 0 0.35rem 0 !important;
    }

    .data-grid-selection-summary {
        display: block !important;
        color: #333 !important;
        font-size: 7pt !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    .grid-container,
    .time-attendance-grid-container,
    .activity-detail-shell,
    .activity-detail-table-wrap {
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
    }

    .table-config,
    .activity-grid,
    .time-attendance-grid,
    .activity-detail-table,
    .rule-table {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        table-layout: auto !important;
        border-collapse: collapse !important;
        font-size: 6.5pt !important;
    }

    .table-config th,
    .table-config td,
    .activity-grid th,
    .activity-grid td,
    .time-attendance-grid th,
    .time-attendance-grid td,
    .activity-detail-table th,
    .activity-detail-table td,
    .rule-table th,
    .rule-table td {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-break: break-word !important;
        padding: 1.5pt 2pt !important;
    }

    .table-config input:not([type="checkbox"]),
    .table-config select,
    .table-config textarea {
        border: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        width: auto !important;
        min-width: 0 !important;
    }
}
.config-calendar-summary-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.config-calendar-year-select {
    width: 120px;
    min-height: 34px;
}

.config-calendar-legend {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.config-calendar-summary-row .legend-box {
    min-height: 34px;
}

.config-calendar-day-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.config-calendar-day-footer-left {
    justify-self: start;
}

.config-calendar-day-footer-center {
    justify-self: center;
}

.config-calendar-day-footer-right {
    justify-self: end;
}

@media (max-width: 767.98px) {
    .config-page-header {
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .config-page-header h4 {
        flex: 1 1 100%;
    }

    .config-table-toolbar {
        align-items: stretch !important;
        gap: 0.5rem !important;
    }

    .config-table-toolbar > .form-control,
    .config-table-toolbar > .form-select,
    .config-table-toolbar > input:not([type="checkbox"]),
    .config-table-toolbar > select {
        width: 100% !important;
        max-width: none !important;
    }

    .config-table-toolbar-actions {
        width: 100%;
        margin-left: 0 !important;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0.45rem;
    }

    .config-table-toolbar-actions > .btn,
    .config-table-toolbar-actions > .pagination-wrapper {
        flex: 1 1 9rem;
        min-width: 0;
    }

    .config-rules-transfer-toolbar,
    .table-transfer-toolbar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
        width: 100%;
        gap: 0.4rem;
    }

    .config-rules-transfer-toolbar .btn,
    .table-transfer-toolbar .btn,
    .config-rules-import-button,
    .table-transfer-import-button,
    .config-table-toolbar-actions > .btn,
    .data-grid-title-actions .btn {
        width: 100%;
        height: auto !important;
        min-height: 2rem !important;
        white-space: normal !important;
        text-align: center;
    }

    .config-pagination-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .config-pagination-controls .pagination-controls {
        margin-left: auto;
    }

    .config-table-toolbar + form,
    .config-table-toolbar ~ form {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .table-config,
    .rule-table {
        min-width: 760px;
        table-layout: auto;
    }

    .table-config th,
    .table-config td,
    .rule-table th,
    .rule-table td {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        vertical-align: top;
    }

    .table-config input:not([type="checkbox"]),
    .table-config select,
    .table-config textarea {
        min-width: 6.5rem;
    }

    .table-config th.action-cell,
    .table-config td.action-cell,
    .table-config td.action-cell.d-flex {
        width: 76px;
        min-width: 76px;
        max-width: 76px;
        white-space: nowrap;
        vertical-align: middle;
    }
}

/* Unified toolbar layout */
.config-table-toolbar,
.data-grid-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.config-table-toolbar {
    justify-content: space-between;
}

.config-table-toolbar-filters {
    flex: 1 1 18rem;
    min-width: 0;
}

.config-table-toolbar-actions,
.data-grid-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-left: auto;
    flex: 0 1 auto;
    min-width: 0;
}

.config-rules-transfer-toolbar,
.table-transfer-toolbar,
.config-pagination-controls,
.config-pagination-controls .pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.config-page-header .btn,
.config-table-toolbar .btn,
.config-pagination-controls .btn,
.table-transfer-toolbar .btn,
.table-transfer-import-button,
.config-rules-transfer-toolbar .btn,
.config-rules-import-button,
.data-grid-back-button,
.data-grid-title-actions .btn {
    min-width: 0;
    height: 1.9rem !important;
    min-height: 1.9rem !important;
    padding: 0.25rem 0.55rem !important;
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    gap: 0.35rem !important;
    margin: 0 !important;
}

.config-table-toolbar .mb-3,
.data-grid-title-actions .mb-3 {
    margin-bottom: 0 !important;
}

.config-table-toolbar .form-control,
.config-table-toolbar .form-select,
.config-table-toolbar input:not([type="checkbox"]),
.config-table-toolbar select {
    height: 1.9rem !important;
    min-height: 1.9rem !important;
}

.config-table-toolbar ~ .table-config,
.config-table-toolbar ~ .rule-table {
    max-width: 100%;
}

/* Unified mobile toolbar and table behavior */
@media (max-width: 767.98px) {
    .config-table-toolbar,
    .data-grid-title-row {
        align-items: stretch !important;
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .config-table-toolbar-filters,
    .config-table-toolbar-actions,
    .data-grid-title-block,
    .data-grid-title-actions {
        width: 100%;
        margin-left: 0 !important;
    }

    .config-table-toolbar-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .config-table-toolbar-actions,
    .data-grid-title-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        justify-content: stretch;
        gap: 0.45rem;
    }

    .config-table-toolbar-actions > .config-rules-transfer-toolbar,
    .config-table-toolbar-actions > .table-transfer-toolbar,
    .data-grid-title-actions > .table-transfer-toolbar {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 0.45rem;
    }

    .config-table-toolbar-actions > .pagination-wrapper,
    .data-grid-title-actions > .pagination-wrapper {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: stretch;
    }

    .config-pagination-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .config-pagination-controls .pagination-controls {
        margin-left: auto;
    }

    .config-page-header .btn,
    .config-table-toolbar .btn,
    .config-pagination-controls .btn,
    .table-transfer-toolbar .btn,
    .table-transfer-import-button,
    .config-rules-transfer-toolbar .btn,
    .config-rules-import-button,
    .data-grid-back-button,
    .data-grid-title-actions .btn {
        width: 100%;
        height: auto !important;
        min-height: 2rem !important;
        white-space: normal !important;
        text-align: center;
    }

    .config-table-toolbar > .form-control,
    .config-table-toolbar > .form-select,
    .config-table-toolbar > input:not([type="checkbox"]),
    .config-table-toolbar > select,
    .config-table-toolbar-filters > .form-control,
    .config-table-toolbar-filters > .form-select,
    .config-table-toolbar-filters > input:not([type="checkbox"]),
    .config-table-toolbar-filters > select {
        width: 100% !important;
        max-width: none !important;
    }

    .config-table-toolbar + form,
    .config-table-toolbar ~ form,
    .config-table-toolbar ~ .table-config,
    .config-table-toolbar ~ .rule-table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .table-config,
    .rule-table {
        min-width: 760px;
        table-layout: auto;
    }

    .table-config th,
    .table-config td,
    .rule-table th,
    .rule-table td {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        vertical-align: top;
    }

    .table-config th.action-cell,
    .table-config td.action-cell,
    .table-config td.action-cell.d-flex,
    .rule-table th.action-cell,
    .rule-table td.action-cell {
        position: sticky;
        right: 0;
        width: 76px;
        min-width: 76px;
        max-width: 76px;
        white-space: nowrap;
        vertical-align: middle;
        z-index: 2;
        box-shadow: -1px 0 0 var(--office-table-border);
    }

    .table-config th.action-cell,
    .rule-table th.action-cell {
        z-index: 3;
        background: var(--office-table-blue);
    }

    .table-config td.action-cell,
    .table-config td.action-cell.d-flex,
    .rule-table td.action-cell {
        background: inherit !important;
    }
}

.config-table-scroll-wrap {
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .config-table-scroll-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }
}

/* Final unified responsive toolbar/action-column overrides */
.config-page-header {
    margin-bottom: 0.25rem !important;
}

.config-page-header .btn {
    margin-bottom: 0 !important;
}

.config-table-toolbar,
.data-grid-title-row {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    width: 100%;
    min-width: 0;
    margin-bottom: 0.35rem !important;
}

.config-table-toolbar-filters {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0.45rem !important;
    flex: 1 1 auto;
    min-width: 0;
}

.config-table-toolbar-actions,
.data-grid-title-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    margin-left: auto !important;
    min-width: 0;
    max-width: 100%;
}

.config-rules-transfer-toolbar,
.table-transfer-toolbar,
.config-pagination-controls,
.config-pagination-controls .pagination-controls {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    width: auto !important;
}

.config-page-header .btn,
.config-table-toolbar .btn,
.config-pagination-controls .btn,
.table-transfer-toolbar .btn,
.table-transfer-import-button,
.config-rules-transfer-toolbar .btn,
.config-rules-import-button,
.data-grid-back-button,
.data-grid-title-actions .btn {
    flex: 0 0 auto !important;
    width: auto !important;
    height: 1.9rem !important;
    min-height: 1.9rem !important;
    padding: 0.25rem 0.55rem !important;
    white-space: nowrap !important;
}

.config-table-toolbar .form-control,
.config-table-toolbar .form-select,
.config-table-toolbar input:not([type="checkbox"]),
.config-table-toolbar select {
    flex: 0 1 15rem;
    width: auto !important;
    max-width: 15rem !important;
    margin-bottom: 0 !important;
}

.config-table-scroll-wrap,
.config-table-toolbar + form,
.config-table-toolbar ~ form {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    .config-table-toolbar,
    .data-grid-title-row {
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.15rem;
    }

    .config-table-toolbar-filters,
    .config-table-toolbar-actions,
    .data-grid-title-actions {
        flex: 0 0 auto;
        width: auto !important;
    }

    .config-table-toolbar .form-control,
    .config-table-toolbar .form-select,
    .config-table-toolbar input:not([type="checkbox"]),
    .config-table-toolbar select {
        flex: 0 0 12rem;
        width: 12rem !important;
        max-width: 12rem !important;
    }

    .data-grid-title-block,
    .data-grid-title {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .table-config,
    .rule-table {
        min-width: 760px;
        table-layout: auto;
    }

    .table-config th,
    .table-config td,
    .rule-table th,
    .rule-table td {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        vertical-align: top;
    }

    .table-config th.action-cell,
    .table-config td.action-cell,
    .table-config td.action-cell.d-flex,
    .rule-table th.action-cell,
    .rule-table td.action-cell {
        position: sticky !important;
        right: 0 !important;
        min-width: 74px !important;
        width: 74px !important;
        max-width: 74px !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        z-index: 5 !important;
        box-shadow: -1px 0 0 var(--office-table-border), -8px 0 10px rgba(255,255,255,0.92) !important;
    }

    .table-config td.action-cell.d-flex,
    .rule-table td.action-cell.d-flex {
        min-width: 132px !important;
        width: 132px !important;
        max-width: 132px !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.12rem !important;
    }

    .table-config th.action-cell,
    .rule-table th.action-cell {
        color: #fff !important;
        background: var(--office-table-blue) !important;
        z-index: 6 !important;
    }

    .table-config tbody tr td.action-cell,
    .rule-table tbody tr td.action-cell {
        background: #fff !important;
    }

    .table-config tbody tr:nth-child(even) td.action-cell,
    .rule-table tbody tr:nth-child(even) td.action-cell {
        background: var(--office-table-zebra) !important;
    }

    .table-config tbody tr:hover td.action-cell,
    .rule-table tbody tr:hover td.action-cell {
        background: var(--office-table-soft) !important;
    }
}

/* Action headers are visual spacers only */
.table-config th.action-cell,
.rule-table th.action-cell,
.scheduler-table th.action-cell {
    color: transparent !important;
    font-size: 0 !important;
}

.table-config th.action-cell *,
.rule-table th.action-cell *,
.scheduler-table th.action-cell * {
    visibility: hidden !important;
}

/* Hide action-column header completely */
.table-config th.action-cell,
.rule-table th.action-cell,
.scheduler-table th.action-cell {
    color: transparent !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 767.98px) {
    .table-config th.action-cell,
    .rule-table th.action-cell,
    .scheduler-table th.action-cell {
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* Publication-ready toolbar and sticky action cleanup */
:root {
    --office-toolbar-button-width: 8.25rem;
    --office-action-cell-width: 4.8rem;
    --office-rule-action-cell-width: 8.6rem;
}

.config-page-header {
    align-items: center !important;
    margin-bottom: 0.25rem !important;
}

.config-page-header > button,
.config-page-header > .btn,
.data-grid-back-button,
.detail-back-button {
    display: none !important;
}

.config-table-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
    margin-bottom: 0.35rem !important;
}

.config-table-toolbar-filters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.45rem !important;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.1rem;
}

.config-table-toolbar-actions,
.data-grid-title-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.4rem !important;
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.1rem;
}

.config-rules-transfer-toolbar,
.table-transfer-toolbar,
.config-pagination-controls,
.config-pagination-controls .pagination-controls {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.config-table-toolbar .btn,
.config-pagination-controls .btn,
.table-transfer-toolbar .btn,
.table-transfer-import-button,
.config-rules-transfer-toolbar .btn,
.config-rules-import-button,
.data-grid-title-actions .btn {
    flex: 0 0 var(--office-toolbar-button-width) !important;
    width: var(--office-toolbar-button-width) !important;
    min-width: var(--office-toolbar-button-width) !important;
    max-width: var(--office-toolbar-button-width) !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    padding: 0.25rem 0.45rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.config-table-toolbar-actions > .btn-primary {
    flex-basis: 100% !important;
    width: var(--office-toolbar-button-width) !important;
    max-width: var(--office-toolbar-button-width) !important;
}

.config-table-toolbar .form-control,
.config-table-toolbar .form-select,
.config-table-toolbar input:not([type="checkbox"]),
.config-table-toolbar select {
    flex: 0 0 14rem !important;
    width: 14rem !important;
    max-width: 14rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    margin: 0 !important;
}

.data-grid-title-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
    margin-bottom: 0.35rem !important;
}

.data-grid-title-block,
.data-grid-title {
    width: 100%;
    min-width: 0;
}

.config-table-scroll-wrap,
.config-table-toolbar + form,
.config-table-toolbar ~ form {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    .config-table-toolbar-actions,
    .data-grid-title-actions {
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
    }

    .config-table-toolbar-actions > .btn-primary {
        flex: 0 0 var(--office-toolbar-button-width) !important;
    }
}

@media (max-width: 767.98px) {
    .table-config,
    .rule-table {
        min-width: 760px;
        table-layout: auto;
    }

    .table-config th,
    .table-config td,
    .rule-table th,
    .rule-table td {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        vertical-align: top;
    }

    .table-config th.action-cell,
    .table-config td.action-cell,
    .table-config td.action-cell.d-flex,
    .rule-table th.action-cell,
    .rule-table td.action-cell,
    .rule-table td.action-cell.d-flex {
        position: sticky !important;
        right: 0 !important;
        display: table-cell !important;
        width: var(--office-action-cell-width) !important;
        min-width: var(--office-action-cell-width) !important;
        max-width: var(--office-action-cell-width) !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        z-index: 20 !important;
        box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(255,255,255,0.96) !important;
    }

    .table-config td.action-cell.d-flex,
    .rule-table td.action-cell.d-flex {
        width: var(--office-rule-action-cell-width) !important;
        min-width: var(--office-rule-action-cell-width) !important;
        max-width: var(--office-rule-action-cell-width) !important;
    }

    .table-config th.action-cell,
    .rule-table th.action-cell,
    .scheduler-table th.action-cell {
        color: transparent !important;
        font-size: 0 !important;
        background: #fff !important;
        border: 0 !important;
        z-index: 30 !important;
        box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(255,255,255,0.96) !important;
    }

    .table-config tbody tr td.action-cell,
    .rule-table tbody tr td.action-cell {
        background: #fff !important;
    }

    .table-config tbody tr:nth-child(even) td.action-cell,
    .rule-table tbody tr:nth-child(even) td.action-cell {
        background: var(--office-table-zebra) !important;
    }

    .table-config tbody tr:hover td.action-cell,
    .rule-table tbody tr:hover td.action-cell {
        background: var(--office-table-soft) !important;
    }
}

/* Scheduler table layout */
.scheduler-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 0 0.35rem 0;
    padding-bottom: 0.1rem;
}

.scheduler-table-toolbar .btn {
    flex: 0 0 var(--office-toolbar-button-width) !important;
    width: var(--office-toolbar-button-width) !important;
    min-width: var(--office-toolbar-button-width) !important;
    max-width: var(--office-toolbar-button-width) !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    padding: 0.25rem 0.45rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.scheduler-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.scheduler-table {
    min-width: 900px;
}

.scheduler-table col.scheduler-col-actions {
    width: 104px;
}

.scheduler-table td.action-cell,
.scheduler-table th.action-cell {
    position: sticky !important;
    right: 0 !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    z-index: 20 !important;
    box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(255,255,255,0.96) !important;
}

.scheduler-table th.action-cell {
    color: transparent !important;
    font-size: 0 !important;
    background: #fff !important;
    border: 0 !important;
    z-index: 30 !important;
}

.scheduler-table tbody tr td.action-cell {
    background: #fff !important;
}

.scheduler-table tbody tr:nth-child(even) td.action-cell {
    background: var(--office-table-zebra) !important;
}

.scheduler-table tbody tr:hover td.action-cell,
.scheduler-table tbody tr.scheduler-row-running td.action-cell {
    background: var(--office-table-soft) !important;
}

@media (max-width: 767.98px) {
    .scheduler-table-toolbar {
        justify-content: flex-start;
    }
}

/* Final requested grid/config corrections */
.config-table-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
    margin-bottom: 0.35rem !important;
}

.config-table-toolbar-filters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.45rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 1.95rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 0.1rem !important;
}

.config-table-toolbar-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 0.1rem !important;
}

.config-table-toolbar label {
    flex: 0 0 auto !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.config-table-toolbar .form-control,
.config-table-toolbar .form-select,
.config-table-toolbar input:not([type="checkbox"]),
.config-table-toolbar select {
    flex: 0 0 14rem !important;
    width: 14rem !important;
    max-width: 14rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    max-height: 1.95rem !important;
    margin: 0 !important;
    padding: 0.2rem 0.45rem !important;
    line-height: 1.2 !important;
}

.config-table-toolbar-actions > .btn-primary {
    order: -10 !important;
    flex: 0 0 var(--office-toolbar-button-width) !important;
    width: var(--office-toolbar-button-width) !important;
    max-width: var(--office-toolbar-button-width) !important;
}

.table-config th.action-cell,
.rule-table th.action-cell,
.scheduler-table th.action-cell {
    color: transparent !important;
    font-size: 0 !important;
    background: var(--office-table-blue) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--office-table-border) !important;
    box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(30,63,110,0.35) !important;
    z-index: 30 !important;
}

.table-config th.action-cell *,
.rule-table th.action-cell *,
.scheduler-table th.action-cell * {
    visibility: hidden !important;
}

.table-config td.action-cell,
.table-config td.action-cell.d-flex,
.rule-table td.action-cell,
.rule-table td.action-cell.d-flex,
.scheduler-table td.action-cell {
    position: sticky !important;
    right: 0 !important;
    display: table-cell !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    background: #fff !important;
    z-index: 20 !important;
    box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(255,255,255,0.96) !important;
}

.table-config td.action-cell.d-flex,
.rule-table td.action-cell.d-flex {
    width: var(--office-rule-action-cell-width) !important;
    min-width: var(--office-rule-action-cell-width) !important;
    max-width: var(--office-rule-action-cell-width) !important;
}

.table-config td.action-cell:not(.d-flex),
.rule-table td.action-cell:not(.d-flex) {
    width: var(--office-action-cell-width) !important;
    min-width: var(--office-action-cell-width) !important;
    max-width: var(--office-action-cell-width) !important;
}

.table-config tbody tr:nth-child(even) td.action-cell,
.rule-table tbody tr:nth-child(even) td.action-cell,
.scheduler-table tbody tr:nth-child(even) td.action-cell {
    background: var(--office-table-zebra) !important;
}

.table-config tbody tr:hover td.action-cell,
.rule-table tbody tr:hover td.action-cell,
.scheduler-table tbody tr:hover td.action-cell,
.scheduler-table tbody tr.scheduler-row-running td.action-cell {
    background: var(--office-table-soft) !important;
}

/* Final action-column width and separator correction */
:root {
    --office-action-cell-width: 3.75rem;
    --office-rule-action-cell-width: 8.2rem;
    --office-scheduler-action-cell-width: 6.5rem;
}

.table-config th.action-cell,
.rule-table th.action-cell {
    width: var(--office-action-cell-width) !important;
    min-width: var(--office-action-cell-width) !important;
    max-width: var(--office-action-cell-width) !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    box-shadow: none !important;
}

.table-config td.action-cell,
.table-config td.action-cell.d-flex,
.rule-table td.action-cell,
.rule-table td.action-cell.d-flex {
    width: var(--office-action-cell-width) !important;
    min-width: var(--office-action-cell-width) !important;
    max-width: var(--office-action-cell-width) !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    text-align: center !important;
    box-shadow: none !important;
}

.table-config:has(td.action-cell button:nth-of-type(5)) th.action-cell,
.table-config td.action-cell:has(button:nth-of-type(5)),
.table-config td.action-cell.d-flex:has(button:nth-of-type(5)),
.rule-table:has(td.action-cell button:nth-of-type(5)) th.action-cell,
.rule-table td.action-cell:has(button:nth-of-type(5)),
.rule-table td.action-cell.d-flex:has(button:nth-of-type(5)) {
    width: var(--office-rule-action-cell-width) !important;
    min-width: var(--office-rule-action-cell-width) !important;
    max-width: var(--office-rule-action-cell-width) !important;
}

.scheduler-table col.scheduler-col-actions {
    width: var(--office-scheduler-action-cell-width) !important;
}

.scheduler-table th.action-cell,
.scheduler-table td.action-cell {
    width: var(--office-scheduler-action-cell-width) !important;
    min-width: var(--office-scheduler-action-cell-width) !important;
    max-width: var(--office-scheduler-action-cell-width) !important;
    box-shadow: none !important;
}

/* Final desktop corrections: requests sticky, scheduler width, config toolbar split */
@media (min-width: 768px) {
    .config-table-toolbar-actions {
        justify-content: flex-end !important;
    }

    .config-table-toolbar-actions > .btn-primary {
        margin-right: auto !important;
    }

    .scheduler-table-wrap {
        overflow-x: hidden !important;
    }

    .scheduler-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .scheduler-table col.scheduler-col-enabled {
        width: 4.8rem !important;
    }

    .scheduler-table col.scheduler-col-date {
        width: 7.4rem !important;
    }

    .scheduler-table col.scheduler-col-duration {
        width: 5.1rem !important;
    }

    .scheduler-table col.scheduler-col-result {
        width: 10rem !important;
    }

    .scheduler-table col.scheduler-col-actions {
        width: var(--office-scheduler-action-cell-width) !important;
    }

    .scheduler-table th.action-cell,
    .scheduler-table td.action-cell,
    .table-config th.action-cell,
    .table-config td.action-cell,
    .table-config td.action-cell.d-flex,
    .rule-table th.action-cell,
    .rule-table td.action-cell,
    .rule-table td.action-cell.d-flex {
        border-left: 0 !important;
        box-shadow: none !important;
    }
}

@media (max-width: 767.98px) {
    .config-table-toolbar-actions > .btn-primary {
        margin-right: 0 !important;
    }
}

/* Final config filter row correction */
.config-table-toolbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.45rem !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.config-table-toolbar > .form-control,
.config-table-toolbar > .form-select,
.config-table-toolbar > input:not([type="checkbox"]),
.config-table-toolbar > select,
.config-table-toolbar > label,
.config-table-toolbar > .form-check,
.config-table-toolbar-filters {
    flex: 0 0 auto !important;
}

.config-table-toolbar-filters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.45rem !important;
    width: auto !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
}

.config-table-toolbar > .form-check,
.config-table-toolbar-filters > .form-check {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.4rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.config-table-toolbar > .form-control,
.config-table-toolbar > .form-select,
.config-table-toolbar > input:not([type="checkbox"]),
.config-table-toolbar > select,
.config-table-toolbar-filters > .form-control,
.config-table-toolbar-filters > .form-select,
.config-table-toolbar-filters > input:not([type="checkbox"]),
.config-table-toolbar-filters > select {
    flex: 0 0 14rem !important;
    width: 14rem !important;
    max-width: 14rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    max-height: 1.95rem !important;
    margin: 0 !important;
}

.config-table-toolbar-actions {
    flex: 1 0 100% !important;
    width: 100% !important;
    min-width: 0 !important;
}

@media (max-width: 767.98px) {
    .config-table-toolbar {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.1rem !important;
    }

    .config-table-toolbar-actions {
        flex: 0 0 100% !important;
        min-width: 100% !important;
    }
}

/* Final config toolbar grouping correction */
.config-table-toolbar {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.config-table-toolbar-filters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.45rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.1rem !important;
    white-space: nowrap !important;
}

.config-table-toolbar-filters > .form-control,
.config-table-toolbar-filters > .form-select,
.config-table-toolbar-filters > input:not([type="checkbox"]),
.config-table-toolbar-filters > select {
    flex: 0 0 14rem !important;
    width: 14rem !important;
    max-width: 14rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    max-height: 1.95rem !important;
    margin: 0 !important;
}

.config-table-toolbar-filters > label,
.config-table-toolbar-filters > .form-check {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.4rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.config-table-toolbar-actions {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Final year load button correction */
.config-table-toolbar:has(> .config-year-load-button) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.45rem !important;
}

.config-table-toolbar:has(> .config-year-load-button) > label {
    flex: 0 0 auto !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

.config-table-toolbar:has(> .config-year-load-button) > .form-control,
.config-table-toolbar:has(> .config-year-load-button) > input:not([type="checkbox"]) {
    flex: 0 0 7.5rem !important;
    width: 7.5rem !important;
    min-width: 7.5rem !important;
    max-width: 7.5rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    max-height: 1.95rem !important;
    margin: 0 !important;
}

.config-table-toolbar > .config-year-load-button {
    flex: 0 0 8.25rem !important;
    width: 8.25rem !important;
    min-width: 8.25rem !important;
    max-width: 8.25rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    max-height: 1.95rem !important;
    padding: 0.25rem 0.45rem !important;
    margin: 0 !important;
    align-self: center !important;
    white-space: nowrap !important;
}

.config-table-toolbar:has(> .config-year-load-button) > .config-table-toolbar-actions {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 0 !important;
}
.config-year-toolbar-filters {
    justify-content: flex-start !important;
}

.config-year-toolbar-filters > .form-control,
.config-year-toolbar-filters > input:not([type="checkbox"]) {
    flex: 0 0 7.5rem !important;
    width: 7.5rem !important;
    min-width: 7.5rem !important;
    max-width: 7.5rem !important;
}

.config-year-toolbar-filters > .config-year-load-button {
    flex: 0 0 8.25rem !important;
    width: 8.25rem !important;
    min-width: 8.25rem !important;
    max-width: 8.25rem !important;
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    max-height: 1.95rem !important;
    padding: 0.25rem 0.45rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
}
.config-page-header-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.4rem !important;
    margin-left: auto !important;
    min-width: 0 !important;
}

.config-page-header-actions .table-transfer-toolbar {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
    width: auto !important;
}

.config-page-header-actions .table-transfer-toolbar .btn {
    flex: 0 0 7.1rem !important;
    width: 7.1rem !important;
    min-width: 7.1rem !important;
    max-width: 7.1rem !important;
    height: 1.65rem !important;
    min-height: 1.65rem !important;
    padding: 0.15rem 0.35rem !important;
    font-size: 0.7rem !important;
    line-height: 1.1 !important;
    margin-bottom: 0 !important;
}

.config-page-header-actions > button,
.config-page-header-actions > .btn {
    display: none !important;
}

@media (max-width: 767.98px) {
    .config-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .config-page-header-actions {
        width: 100% !important;
        margin-left: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start !important;
        padding-bottom: 0.1rem !important;
    }

    .config-page-header-actions .table-transfer-toolbar {
        flex: 0 0 auto !important;
        width: auto !important;
    }
}
.config-page-header-actions .config-pagination-controls {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
    width: auto !important;
    margin: 0 !important;
}

.config-page-header-actions .config-pagination-controls .pagination-controls {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
}

.config-page-header-actions .config-pagination-controls .btn {
    flex: 0 0 7.1rem !important;
    width: 7.1rem !important;
    min-width: 7.1rem !important;
    max-width: 7.1rem !important;
    height: 1.65rem !important;
    min-height: 1.65rem !important;
    padding: 0.15rem 0.35rem !important;
    font-size: 0.7rem !important;
    line-height: 1.1 !important;
    margin-bottom: 0 !important;
}

.config-page-header-actions .config-pagination-controls .pagination-controls .btn {
    flex: 0 0 1.75rem !important;
    width: 1.75rem !important;
    max-width: 1.75rem !important;
    min-width: 1.75rem !important;
}
.config-page-header-actions .table-transfer-toolbar .btn:focus,
.config-page-header-actions .table-transfer-toolbar .btn:active,
.config-page-header-actions .table-transfer-toolbar .btn:focus-visible,
.config-page-header-actions .config-pagination-controls .btn:focus,
.config-page-header-actions .config-pagination-controls .btn:active,
.config-page-header-actions .config-pagination-controls .btn:focus-visible {
    outline: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 767.98px) {
    .config-page-header-actions .config-pagination-controls {
        flex: 0 0 auto !important;
    }
}



/* Shared sortable/resizable table headers */
.resizable-columns-table th.resizable-column-header {
    position: relative;
}

.column-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    z-index: 4;
}

.column-resize-handle::after {
    content: "";
    position: absolute;
    top: 20%;
    right: 2px;
    width: 1px;
    height: 60%;
    background: rgba(255,255,255,0.45);
}

.column-resize-active {
    cursor: col-resize !important;
    user-select: none !important;
}

.sortable-header-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
}

.sortable-header-button:hover,
.sortable-header-button:focus-visible {
    color: inherit;
    text-decoration: underline;
    outline: none;
}

.sortable-header-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sortable-header-glyph {
    flex: 0 0 auto;
    min-width: 0.65rem;
    font-size: 0.68rem;
    line-height: 1;
    opacity: 0.95;
}

/* Final table sizing pass: fill available width, but allow horizontal scroll when columns need more space. */
.table-size-scroll-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}

.grid-container,
.time-attendance-grid-container,
.requests-grid-container,
.activity-detail-shell,
.activity-detail-table-wrap {
    max-width: 100% !important;
    overflow-x: visible !important;
}

.table-size-scroll-wrap > .activity-grid,
.table-size-scroll-wrap > .activity-detail-table,
.table-size-scroll-wrap > .time-attendance-grid,
.table-size-scroll-wrap > .requests-grid,
.table-size-scroll-wrap > .table-config {
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    table-layout: auto !important;
}

.table-size-scroll-wrap > .activity-grid th,
.table-size-scroll-wrap > .activity-detail-table th,
.table-size-scroll-wrap > .time-attendance-grid th,
.table-size-scroll-wrap > .requests-grid th,
.table-size-scroll-wrap > .table-config th {
    min-width: 5.75rem;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.table-size-scroll-wrap > .activity-grid td,
.table-size-scroll-wrap > .activity-detail-table td,
.table-size-scroll-wrap > .time-attendance-grid td,
.table-size-scroll-wrap > .requests-grid td,
.table-size-scroll-wrap > .table-config td {
    max-width: 28rem;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.table-size-scroll-wrap > .activity-grid.resized-columns-table,
.table-size-scroll-wrap > .activity-detail-table.resized-columns-table,
.table-size-scroll-wrap > .time-attendance-grid.resized-columns-table,
.table-size-scroll-wrap > .requests-grid.resized-columns-table,
.table-size-scroll-wrap > .table-config.resized-columns-table {
    min-width: max-content !important;
}

.table-size-scroll-wrap > .requests-grid th.actions-col,
.table-size-scroll-wrap > .requests-grid td.actions-cell,
.table-size-scroll-wrap > .table-config th.action-cell,
.table-size-scroll-wrap > .table-config td.action-cell,
.table-size-scroll-wrap > .table-config td.action-cell.d-flex {
    min-width: 4.8rem !important;
    width: 4.8rem !important;
    max-width: 4.8rem !important;
}

.table-size-scroll-wrap > .table-config input:not([type="checkbox"]),
.table-size-scroll-wrap > .table-config select,
.table-size-scroll-wrap > .table-config textarea {
    min-width: 6.5rem;
}

@media (max-width: 767.98px) {
    .table-size-scroll-wrap {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .table-size-scroll-wrap > .activity-grid,
    .table-size-scroll-wrap > .activity-detail-table,
    .table-size-scroll-wrap > .time-attendance-grid,
    .table-size-scroll-wrap > .requests-grid,
    .table-size-scroll-wrap > .table-config {
        min-width: max(100%, 760px) !important;
    }

    .table-size-scroll-wrap > .activity-grid th,
    .table-size-scroll-wrap > .activity-grid td,
    .table-size-scroll-wrap > .activity-detail-table th,
    .table-size-scroll-wrap > .activity-detail-table td,
    .table-size-scroll-wrap > .time-attendance-grid th,
    .table-size-scroll-wrap > .time-attendance-grid td,
    .table-size-scroll-wrap > .requests-grid th,
    .table-size-scroll-wrap > .requests-grid td,
    .table-size-scroll-wrap > .table-config th,
    .table-size-scroll-wrap > .table-config td {
        min-width: 5.75rem !important;
    }
}

/* Final horizontal-scroll action columns: keep commands visible when the table scrolls. */
.table-size-scroll-wrap > .requests-grid th.actions-col,
.table-size-scroll-wrap > .requests-grid td.actions-cell,
.table-size-scroll-wrap > .table-config th.action-cell,
.table-size-scroll-wrap > .table-config td.action-cell,
.table-size-scroll-wrap > .table-config td.action-cell.d-flex {
    position: sticky !important;
    right: 0 !important;
    z-index: 24 !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

.table-size-scroll-wrap > .requests-grid th.actions-col,
.table-size-scroll-wrap > .table-config th.action-cell {
    background: var(--office-table-blue) !important;
    color: transparent !important;
    font-size: 0 !important;
    z-index: 34 !important;
    border-bottom: 1px solid var(--office-table-border) !important;
    box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(30,63,110,0.32) !important;
}

.table-size-scroll-wrap > .requests-grid td.actions-cell,
.table-size-scroll-wrap > .table-config td.action-cell,
.table-size-scroll-wrap > .table-config td.action-cell.d-flex {
    background: #fff !important;
    box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(255,255,255,0.96) !important;
}

.table-size-scroll-wrap > .requests-grid tbody tr:nth-child(even) td.actions-cell,
.table-size-scroll-wrap > .table-config tbody tr:nth-child(even) td.action-cell {
    background: var(--office-table-zebra) !important;
}

.table-size-scroll-wrap > .requests-grid tbody tr:hover td.actions-cell,
.table-size-scroll-wrap > .table-config tbody tr:hover td.action-cell,
.table-size-scroll-wrap > .scheduler-table tbody tr.scheduler-row-running td.action-cell {
    background: var(--office-table-soft) !important;
}

.table-size-scroll-wrap > .scheduler-table th.action-cell,
.table-size-scroll-wrap > .scheduler-table td.action-cell {
    width: var(--office-scheduler-action-cell-width) !important;
    min-width: var(--office-scheduler-action-cell-width) !important;
    max-width: var(--office-scheduler-action-cell-width) !important;
    text-align: center !important;
}

.table-size-scroll-wrap > .scheduler-table col.scheduler-col-actions {
    width: var(--office-scheduler-action-cell-width) !important;
}

.table-size-scroll-wrap > .scheduler-table td.action-cell .btn-icon {
    flex: 0 0 auto !important;
    width: 1.35rem !important;
    min-width: 1.35rem !important;
}

.table-size-scroll-wrap > .scheduler-table td.action-cell,
.table-size-scroll-wrap > .requests-grid td.actions-cell {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Configuration tables: keep action buttons visible when horizontal table scroll is active. */
.config-page .table-size-scroll-wrap > .table-config th.action-cell,
.config-page .table-size-scroll-wrap > .table-config td.action-cell,
.config-page .table-size-scroll-wrap > .table-config td.action-cell.d-flex,
.config-page .table-size-scroll-wrap > .rule-table th.action-cell,
.config-page .table-size-scroll-wrap > .rule-table td.action-cell,
.config-page .table-size-scroll-wrap > .rule-table td.action-cell.d-flex {
    position: sticky !important;
    right: 0 !important;
    width: var(--office-action-cell-width) !important;
    min-width: var(--office-action-cell-width) !important;
    max-width: var(--office-action-cell-width) !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: center !important;
    vertical-align: middle !important;
    z-index: 24 !important;
}

.config-page .table-size-scroll-wrap > .table-config:has(td.action-cell .btn-icon:nth-child(4)) th.action-cell,
.config-page .table-size-scroll-wrap > .table-config td.action-cell:has(.btn-icon:nth-child(4)),
.config-page .table-size-scroll-wrap > .table-config td.action-cell.d-flex:has(.btn-icon:nth-child(4)),
.config-page .table-size-scroll-wrap > .rule-table:has(td.action-cell .btn-icon:nth-child(4)) th.action-cell,
.config-page .table-size-scroll-wrap > .rule-table td.action-cell:has(.btn-icon:nth-child(4)),
.config-page .table-size-scroll-wrap > .rule-table td.action-cell.d-flex:has(.btn-icon:nth-child(4)) {
    width: var(--office-rule-action-cell-width) !important;
    min-width: var(--office-rule-action-cell-width) !important;
    max-width: var(--office-rule-action-cell-width) !important;
}

.config-page .table-size-scroll-wrap > .table-config th.action-cell,
.config-page .table-size-scroll-wrap > .rule-table th.action-cell {
    background: var(--office-table-blue) !important;
    color: transparent !important;
    font-size: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--office-table-border) !important;
    box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(30,63,110,0.32) !important;
    z-index: 34 !important;
}

.config-page .table-size-scroll-wrap > .table-config td.action-cell,
.config-page .table-size-scroll-wrap > .table-config td.action-cell.d-flex,
.config-page .table-size-scroll-wrap > .rule-table td.action-cell,
.config-page .table-size-scroll-wrap > .rule-table td.action-cell.d-flex {
    background: #fff !important;
    box-shadow: -1px 0 0 var(--office-table-border), -10px 0 12px rgba(255,255,255,0.96) !important;
}

.config-page .table-size-scroll-wrap > .table-config tbody tr:nth-child(even) td.action-cell,
.config-page .table-size-scroll-wrap > .rule-table tbody tr:nth-child(even) td.action-cell {
    background: var(--office-table-zebra) !important;
}

.config-page .table-size-scroll-wrap > .table-config tbody tr:hover td.action-cell,
.config-page .table-size-scroll-wrap > .rule-table tbody tr:hover td.action-cell {
    background: var(--office-table-soft) !important;
}

/* Manual column resize must override default readable minimums, including mobile and form controls. */
.table-size-scroll-wrap th.manual-column-width,
.table-size-scroll-wrap td.manual-column-width {
    min-width: var(--manual-column-width, inherit);
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.table-size-scroll-wrap td.manual-column-width input:not([type="checkbox"]),
.table-size-scroll-wrap td.manual-column-width select,
.table-size-scroll-wrap td.manual-column-width textarea {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Final adaptive table sizing: default tables fit the viewport; overflow is shown only when content or manual resize requires it. */
.table-top-scrollbar {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    height: 12px !important;
    margin: 0 0 0.15rem 0 !important;
}

.table-top-scrollbar[hidden] {
    display: none !important;
}

.table-top-scrollbar-inner {
    height: 1px !important;
}

.table-size-scroll-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
}

.table-size-scroll-wrap > .activity-grid,
.table-size-scroll-wrap > .activity-detail-table,
.table-size-scroll-wrap > .time-attendance-grid,
.table-size-scroll-wrap > .requests-grid,
.table-size-scroll-wrap > .table-config {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
}

.table-size-scroll-wrap.has-horizontal-scroll > .activity-grid,
.table-size-scroll-wrap.has-horizontal-scroll > .activity-detail-table,
.table-size-scroll-wrap.has-horizontal-scroll > .time-attendance-grid,
.table-size-scroll-wrap.has-horizontal-scroll > .requests-grid,
.table-size-scroll-wrap.has-horizontal-scroll > .table-config,
.table-size-scroll-wrap > .activity-grid.resized-columns-table,
.table-size-scroll-wrap > .activity-detail-table.resized-columns-table,
.table-size-scroll-wrap > .time-attendance-grid.resized-columns-table,
.table-size-scroll-wrap > .requests-grid.resized-columns-table,
.table-size-scroll-wrap > .table-config.resized-columns-table {
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
}

.table-size-scroll-wrap th.data-col-time,
.table-size-scroll-wrap td.data-col-time {
    width: 5.35rem !important;
    min-width: 5rem !important;
    max-width: 5.75rem !important;
}

.table-size-scroll-wrap th.data-col-percent,
.table-size-scroll-wrap td.data-col-percent {
    width: 4.75rem !important;
    min-width: 4.35rem !important;
    max-width: 5.1rem !important;
    text-align: right !important;
}

.table-size-scroll-wrap th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap th.data-col-time .sortable-header-button {
    justify-content: flex-end !important;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-1 {
    --activity-key-col-1: 10rem;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-2 {
    --activity-key-col-1: 8.75rem;
    --activity-key-col-2: 8.75rem;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-3 {
    --activity-key-col-1: 7.75rem;
    --activity-key-col-2: 7.75rem;
    --activity-key-col-3: 7.75rem;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-1 th:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-1 td:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 th:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 td:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 th:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 td:nth-child(1) {
    position: sticky !important;
    left: 0 !important;
    width: var(--activity-key-col-1) !important;
    min-width: var(--activity-key-col-1) !important;
    max-width: var(--activity-key-col-1) !important;
    z-index: 18 !important;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-2 th:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 td:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 th:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 td:nth-child(2) {
    position: sticky !important;
    left: var(--activity-key-col-1) !important;
    width: var(--activity-key-col-2) !important;
    min-width: var(--activity-key-col-2) !important;
    max-width: var(--activity-key-col-2) !important;
    z-index: 18 !important;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-3 th:nth-child(3),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 td:nth-child(3) {
    position: sticky !important;
    left: calc(var(--activity-key-col-1) + var(--activity-key-col-2)) !important;
    width: var(--activity-key-col-3) !important;
    min-width: var(--activity-key-col-3) !important;
    max-width: var(--activity-key-col-3) !important;
    z-index: 18 !important;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-1 thead th:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 thead th:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 thead th:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 thead th:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 thead th:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 thead th:nth-child(3) {
    background: var(--office-table-blue) !important;
    color: #fff !important;
    z-index: 38 !important;
}

.table-size-scroll-wrap > .activity-grid.activity-sticky-1 tbody td:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 tbody td:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 tbody td:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 tbody td:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 tbody td:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 tbody td:nth-child(3) {
    background: #fff !important;
    box-shadow: 1px 0 0 var(--office-table-border) !important;
}

.table-size-scroll-wrap > .activity-grid tbody tr:nth-child(even) td:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 tbody tr:nth-child(even) td:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 tbody tr:nth-child(even) td:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 tbody tr:nth-child(even) td:nth-child(3) {
    background: var(--office-table-zebra) !important;
}

.table-size-scroll-wrap > .activity-grid tbody tr:hover td:nth-child(1),
.table-size-scroll-wrap > .activity-grid.activity-sticky-2 tbody tr:hover td:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 tbody tr:hover td:nth-child(2),
.table-size-scroll-wrap > .activity-grid.activity-sticky-3 tbody tr:hover td:nth-child(3) {
    background: var(--office-table-soft) !important;
}

@media (max-width: 767.98px) {
    .table-size-scroll-wrap > .activity-grid,
    .table-size-scroll-wrap > .activity-detail-table,
    .table-size-scroll-wrap > .time-attendance-grid,
    .table-size-scroll-wrap > .requests-grid,
    .table-size-scroll-wrap > .table-config {
        min-width: max(100%, 720px) !important;
        max-width: none !important;
    }

    .table-size-scroll-wrap > .activity-grid.activity-sticky-1 {
        --activity-key-col-1: 8.5rem;
    }

    .table-size-scroll-wrap > .activity-grid.activity-sticky-2 {
        --activity-key-col-1: 7.5rem;
        --activity-key-col-2: 7.5rem;
    }

    .table-size-scroll-wrap > .activity-grid.activity-sticky-3 {
        --activity-key-col-1: 6.75rem;
        --activity-key-col-2: 6.75rem;
        --activity-key-col-3: 6.75rem;
    }
}

/* Strong compact column overrides after legacy minimum-width table rules. */
.table-size-scroll-wrap > .activity-grid th.data-col-time,
.table-size-scroll-wrap > .activity-grid td.data-col-time,
.table-size-scroll-wrap > .activity-detail-table th.data-col-time,
.table-size-scroll-wrap > .activity-detail-table td.data-col-time,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-time,
.table-size-scroll-wrap > .time-attendance-grid td.data-col-time,
.table-size-scroll-wrap > .requests-grid th.data-col-time,
.table-size-scroll-wrap > .requests-grid td.data-col-time,
.table-size-scroll-wrap > .table-config th.data-col-time,
.table-size-scroll-wrap > .table-config td.data-col-time {
    width: 5.35rem !important;
    min-width: 5rem !important;
    max-width: 5.75rem !important;
}

.table-size-scroll-wrap > .activity-grid th.data-col-percent,
.table-size-scroll-wrap > .activity-grid td.data-col-percent,
.table-size-scroll-wrap > .activity-detail-table th.data-col-percent,
.table-size-scroll-wrap > .activity-detail-table td.data-col-percent,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-percent,
.table-size-scroll-wrap > .time-attendance-grid td.data-col-percent,
.table-size-scroll-wrap > .requests-grid th.data-col-percent,
.table-size-scroll-wrap > .requests-grid td.data-col-percent,
.table-size-scroll-wrap > .table-config th.data-col-percent,
.table-size-scroll-wrap > .table-config td.data-col-percent {
    width: 4.75rem !important;
    min-width: 4.35rem !important;
    max-width: 5.1rem !important;
    text-align: right !important;
}

/* Generic sticky grid columns. Components decide which columns receive sticky-col-N; CSS is reusable across report types. */
.table-size-scroll-wrap > table th.grid-sticky-column,
.table-size-scroll-wrap > table td.grid-sticky-column {
    position: sticky !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.table-size-scroll-wrap > table th.grid-sticky-column.sticky-col-1,
.table-size-scroll-wrap > table td.grid-sticky-column.sticky-col-1 {
    left: 0 !important;
    width: var(--grid-sticky-col-1-width, 9rem) !important;
    min-width: var(--grid-sticky-col-1-width, 9rem) !important;
    max-width: var(--grid-sticky-col-1-width, 9rem) !important;
}

.table-size-scroll-wrap > table th.grid-sticky-column.sticky-col-2,
.table-size-scroll-wrap > table td.grid-sticky-column.sticky-col-2 {
    left: var(--grid-sticky-col-1-width, 9rem) !important;
    width: var(--grid-sticky-col-2-width, 9rem) !important;
    min-width: var(--grid-sticky-col-2-width, 9rem) !important;
    max-width: var(--grid-sticky-col-2-width, 9rem) !important;
}

.table-size-scroll-wrap > table th.grid-sticky-column.sticky-col-3,
.table-size-scroll-wrap > table td.grid-sticky-column.sticky-col-3 {
    left: calc(var(--grid-sticky-col-1-width, 9rem) + var(--grid-sticky-col-2-width, 9rem)) !important;
    width: var(--grid-sticky-col-3-width, 9rem) !important;
    min-width: var(--grid-sticky-col-3-width, 9rem) !important;
    max-width: var(--grid-sticky-col-3-width, 9rem) !important;
}

.table-size-scroll-wrap > table thead th.grid-sticky-column {
    background: var(--office-table-blue) !important;
    color: #fff !important;
    z-index: 45 !important;
}

.table-size-scroll-wrap > table tbody td.grid-sticky-column {
    background: #fff !important;
    box-shadow: 1px 0 0 var(--office-table-border) !important;
    z-index: 22 !important;
}

.table-size-scroll-wrap > table tbody tr:nth-child(even) td.grid-sticky-column {
    background: var(--office-table-zebra) !important;
}

.table-size-scroll-wrap > table tbody tr:hover td.grid-sticky-column {
    background: var(--office-table-soft) !important;
}

@media (max-width: 767.98px) {
    .table-size-scroll-wrap > .activity-grid.activity-grid-usergroup-and-project,
    .table-size-scroll-wrap > .activity-grid.activity-grid-project-and-userid {
        --grid-sticky-col-1-width:7.5rem !important;
        --grid-sticky-col-2-width:7.5rem !important;
    }

    .table-size-scroll-wrap > .activity-grid.activity-grid-company-and-userid {
        --grid-sticky-col-1-width:6.75rem !important;
        --grid-sticky-col-2-width:6.75rem !important;
        --grid-sticky-col-3-width:6.75rem !important;
    }

    .table-size-scroll-wrap > .activity-grid.has-grid-sticky-columns:not(.activity-grid-usergroup-and-project):not(.activity-grid-project-and-userid):not(.activity-grid-company-and-userid) {
        --grid-sticky-col-1-width:8.5rem !important;
    }
}

/* Undo top synchronized scrollbar: it was too visually noisy near the report toolbar. */
.table-top-scrollbar {
    display: none !important;
}

.table-size-scroll-wrap.has-horizontal-scroll > .activity-grid,
.table-size-scroll-wrap.has-horizontal-scroll > .activity-detail-table,
.table-size-scroll-wrap.has-horizontal-scroll > .time-attendance-grid,
.table-size-scroll-wrap.has-horizontal-scroll > .requests-grid,
.table-size-scroll-wrap.has-horizontal-scroll > .table-config {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.table-size-scroll-wrap > .activity-grid.resized-columns-table,
.table-size-scroll-wrap > .activity-detail-table.resized-columns-table,
.table-size-scroll-wrap > .time-attendance-grid.resized-columns-table,
.table-size-scroll-wrap > .requests-grid.resized-columns-table,
.table-size-scroll-wrap > .table-config.resized-columns-table {
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
}

.table-size-scroll-wrap th.data-col-time,
.table-size-scroll-wrap td.data-col-time,
.table-size-scroll-wrap > .activity-grid th.data-col-time,
.table-size-scroll-wrap > .activity-grid td.data-col-time,
.table-size-scroll-wrap > .activity-detail-table th.data-col-time,
.table-size-scroll-wrap > .activity-detail-table td.data-col-time,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-time,
.table-size-scroll-wrap > .time-attendance-grid td.data-col-time,
.table-size-scroll-wrap > .requests-grid th.data-col-time,
.table-size-scroll-wrap > .requests-grid td.data-col-time,
.table-size-scroll-wrap > .table-config th.data-col-time,
.table-size-scroll-wrap > .table-config td.data-col-time {
    text-align: left !important;
}

.table-size-scroll-wrap th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .activity-grid th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .activity-detail-table th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .requests-grid th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .table-config th.data-col-time .sortable-header-button {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* Inner top scrollbar for long overflowing grids: belongs to the table, not to the toolbar. */
.table-inner-top-scrollbar {
    position: sticky !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    margin: 0 0 0.2rem 0 !important;
    background: #fff !important;
    z-index: 50 !important;
}

.table-inner-top-scrollbar[hidden] {
    display: none !important;
}

.table-inner-top-scrollbar-content {
    height: 1px !important;
}

/* Column alignment policy: numeric-like columns right, date/text columns keep the default left alignment. */
.table-size-scroll-wrap th.data-col-time,
.table-size-scroll-wrap td.data-col-time,
.table-size-scroll-wrap th.data-col-percent,
.table-size-scroll-wrap td.data-col-percent,
.table-size-scroll-wrap th.data-col-number,
.table-size-scroll-wrap td.data-col-number,
.table-size-scroll-wrap > .activity-grid th.data-col-time,
.table-size-scroll-wrap > .activity-grid td.data-col-time,
.table-size-scroll-wrap > .activity-grid th.data-col-percent,
.table-size-scroll-wrap > .activity-grid td.data-col-percent,
.table-size-scroll-wrap > .activity-grid th.data-col-number,
.table-size-scroll-wrap > .activity-grid td.data-col-number,
.table-size-scroll-wrap > .activity-detail-table th.data-col-time,
.table-size-scroll-wrap > .activity-detail-table td.data-col-time,
.table-size-scroll-wrap > .activity-detail-table th.data-col-percent,
.table-size-scroll-wrap > .activity-detail-table td.data-col-percent,
.table-size-scroll-wrap > .activity-detail-table th.data-col-number,
.table-size-scroll-wrap > .activity-detail-table td.data-col-number,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-time,
.table-size-scroll-wrap > .time-attendance-grid td.data-col-time,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-percent,
.table-size-scroll-wrap > .time-attendance-grid td.data-col-percent,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-number,
.table-size-scroll-wrap > .time-attendance-grid td.data-col-number,
.table-size-scroll-wrap > .requests-grid th.data-col-time,
.table-size-scroll-wrap > .requests-grid td.data-col-time,
.table-size-scroll-wrap > .requests-grid th.data-col-percent,
.table-size-scroll-wrap > .requests-grid td.data-col-percent,
.table-size-scroll-wrap > .requests-grid th.data-col-number,
.table-size-scroll-wrap > .requests-grid td.data-col-number,
.table-size-scroll-wrap > .table-config th.data-col-time,
.table-size-scroll-wrap > .table-config td.data-col-time,
.table-size-scroll-wrap > .table-config th.data-col-percent,
.table-size-scroll-wrap > .table-config td.data-col-percent,
.table-size-scroll-wrap > .table-config th.data-col-number,
.table-size-scroll-wrap > .table-config td.data-col-number {
    text-align: right !important;
}

.table-size-scroll-wrap th.data-col-time .sortable-header-button,
.table-size-scroll-wrap th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap th.data-col-number .sortable-header-button,
.table-size-scroll-wrap > .activity-grid th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .activity-grid th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap > .activity-grid th.data-col-number .sortable-header-button,
.table-size-scroll-wrap > .activity-detail-table th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .activity-detail-table th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap > .activity-detail-table th.data-col-number .sortable-header-button,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap > .time-attendance-grid th.data-col-number .sortable-header-button,
.table-size-scroll-wrap > .requests-grid th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .requests-grid th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap > .requests-grid th.data-col-number .sortable-header-button,
.table-size-scroll-wrap > .table-config th.data-col-time .sortable-header-button,
.table-size-scroll-wrap > .table-config th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap > .table-config th.data-col-number .sortable-header-button {
    justify-content: flex-end !important;
    text-align: right !important;
}

.table-size-scroll-wrap th.data-col-number,
.table-size-scroll-wrap td.data-col-number {
    min-width: 4.5rem !important;
}

/* Header text follows numeric/time alignment too. */
.table-size-scroll-wrap th.data-col-time .sortable-header-text,
.table-size-scroll-wrap th.data-col-percent .sortable-header-text,
.table-size-scroll-wrap th.data-col-number .sortable-header-text {
    text-align: right !important;
}

/* Strong header alignment: numeric/time header text must line up with right-aligned cell values. */
.table-size-scroll-wrap th.data-col-time,
.table-size-scroll-wrap th.data-col-percent,
.table-size-scroll-wrap th.data-col-number {
    text-align: right !important;
}

.table-size-scroll-wrap th.data-col-time .sortable-header-button,
.table-size-scroll-wrap th.data-col-percent .sortable-header-button,
.table-size-scroll-wrap th.data-col-number .sortable-header-button {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-end !important;
    text-align: right !important;
}

.table-size-scroll-wrap th.data-col-time .sortable-header-text,
.table-size-scroll-wrap th.data-col-percent .sortable-header-text,
.table-size-scroll-wrap th.data-col-number .sortable-header-text {
    flex: 0 1 auto !important;
    margin-left: auto !important;
    text-align: right !important;
}

.table-size-scroll-wrap th.data-col-time .sortable-header-glyph,
.table-size-scroll-wrap th.data-col-percent .sortable-header-glyph,
.table-size-scroll-wrap th.data-col-number .sortable-header-glyph {
    flex: 0 0 auto !important;
}

/* Razor-defined alignment: header and values share this class from render time. */
.table-size-scroll-wrap th.grid-align-right,
.table-size-scroll-wrap td.grid-align-right {
    text-align: right !important;
}

.table-size-scroll-wrap th.grid-align-right .sortable-header-button {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-end !important;
    text-align: right !important;
}

.table-size-scroll-wrap th.grid-align-right .sortable-header-text {
    flex: 0 1 auto !important;
    margin-left: auto !important;
    text-align: right !important;
}

.table-size-scroll-wrap th.grid-align-right .sortable-header-glyph {
    flex: 0 0 auto !important;
}

/* Align right headers to the same visual edge as right-aligned cell values; resize handle must not reserve text space. */
.table-size-scroll-wrap th.grid-align-right {
    padding-right: 0.35rem !important;
}

.table-size-scroll-wrap td.grid-align-right {
    padding-right: 0.35rem !important;
}

.table-size-scroll-wrap th.grid-align-right .sortable-header-button {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

.table-size-scroll-wrap th.grid-align-right .sortable-header-text {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

.table-size-scroll-wrap th.grid-align-right .column-resize-handle {
    right: -3px !important;
    width: 7px !important;
}

/* Empty sort glyph must not leave an invisible right margin in sortable headers. */
.sortable-header-glyph:empty {
    display: none !important;
}

/* Keep column resize usable after right-aligned header fixes. */
.resizable-columns-table th.resizable-column-header .column-resize-handle,
.table-size-scroll-wrap th.grid-align-right .column-resize-handle {
    right: 0 !important;
    width: 12px !important;
    min-width: 12px !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

.resizable-columns-table th.resizable-column-header .column-resize-handle::after,
.table-size-scroll-wrap th.grid-align-right .column-resize-handle::after {
    right: 3px !important;
}

/* Time & Attendance detail: no invisible header spacing on right-aligned sortable headers. */
.time-attendance-grid th.grid-align-right .sortable-header-button {
    gap: 0 !important;
}

.time-attendance-grid th.grid-align-right .sortable-header-glyph:empty {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    flex-basis: 0 !important;
}

/* Time & Attendance weekly summary: sticky first columns and compact metric columns. */
.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(1),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(1),
.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(2),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(2) {
    width: 8rem !important;
    min-width: 8rem !important;
    max-width: 8rem !important;
}

.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(3),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(3) {
    width: 3.75rem !important;
    min-width: 3.75rem !important;
    max-width: 3.75rem !important;
}

.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(n+4),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(n+4) {
    width: 4.65rem !important;
    min-width: 4.35rem !important;
    max-width: 4.85rem !important;
}

/* Time & Attendance weekly summary: slightly denser title and columns only for this report. */
.time-attendance-week-summary-title {
    font-size: 1rem !important;
    line-height: 1.2 !important;
}

.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(1),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(1),
.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(2),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(2) {
    width: 7.25rem !important;
    min-width: 7.25rem !important;
    max-width: 7.25rem !important;
}

.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(3),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(3) {
    width: 3.25rem !important;
    min-width: 3.25rem !important;
    max-width: 3.25rem !important;
}

.table-size-scroll-wrap > .time-attendance-week-summary th:nth-child(n+4),
.table-size-scroll-wrap > .time-attendance-week-summary td:nth-child(n+4) {
    width: 4.15rem !important;
    min-width: 4rem !important;
    max-width: 4.35rem !important;
}

/* Activity grouped report column sizing. */
.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(1),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(1),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(2),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(2),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(3),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(3),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(5),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(5),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(1),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(1),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(2),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(2),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(4),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(4),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(5),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(5) {
    width: 8.75rem !important;
    min-width: 8.75rem !important;
    max-width: 8.75rem !important;
}

.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(4),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(4),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(3),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(3) {
    width: 17.5rem !important;
    min-width: 14rem !important;
    max-width: 17.5rem !important;
}

.table-size-scroll-wrap > .activity-grid-company-and-userid th:nth-child(1),
.table-size-scroll-wrap > .activity-grid-company-and-userid td:nth-child(1),
.table-size-scroll-wrap > .activity-grid-company-and-userid th:nth-child(2),
.table-size-scroll-wrap > .activity-grid-company-and-userid td:nth-child(2),
.table-size-scroll-wrap > .activity-grid-company-and-userid th:nth-child(3),
.table-size-scroll-wrap > .activity-grid-company-and-userid td:nth-child(3) {
    width: 7.75rem !important;
    min-width: 7.75rem !important;
    max-width: 7.75rem !important;
}

.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(6),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(6),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(7),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(7),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(8),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(8),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(6),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(6),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(7),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(7),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(8),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(8),
.table-size-scroll-wrap > .activity-grid-company-and-userid th:nth-child(4),
.table-size-scroll-wrap > .activity-grid-company-and-userid td:nth-child(4),
.table-size-scroll-wrap > .activity-grid-company-and-userid th:nth-child(5),
.table-size-scroll-wrap > .activity-grid-company-and-userid td:nth-child(5),
.table-size-scroll-wrap > .activity-grid-company-and-userid th:nth-child(6),
.table-size-scroll-wrap > .activity-grid-company-and-userid td:nth-child(6) {
    width: 5.75rem !important;
    min-width: 5.25rem !important;
    max-width: 6.25rem !important;
}

.table-size-scroll-wrap > .activity-grid-usergroup-and-project th:nth-child(n+9),
.table-size-scroll-wrap > .activity-grid-usergroup-and-project td:nth-child(n+9),
.table-size-scroll-wrap > .activity-grid-project-and-userid th:nth-child(n+9),
.table-size-scroll-wrap > .activity-grid-project-and-userid td:nth-child(n+9),
.table-size-scroll-wrap > .activity-grid-company-and-userid th:nth-child(n+7),
.table-size-scroll-wrap > .activity-grid-company-and-userid td:nth-child(n+7) {
    width: 4.75rem !important;
    min-width: 4.35rem !important;
    max-width: 5.1rem !important;
}

/* Activity and Time & Attendance sticky columns must be fully opaque over horizontally scrolling cells. */
.table-size-scroll-wrap > .activity-grid thead th.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid thead th.grid-sticky-column {
    background: var(--office-table-blue) !important;
    background-color: var(--office-table-blue) !important;
    color: #fff !important;
    z-index: 70 !important;
    background-clip: padding-box !important;
}

.table-size-scroll-wrap > .activity-grid tbody td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid tbody td.grid-sticky-column {
    background: #fff !important;
    background-color: #fff !important;
    z-index: 55 !important;
    background-clip: padding-box !important;
    box-shadow: 1px 0 0 var(--office-table-border) !important;
}

.table-size-scroll-wrap > .activity-grid tbody tr:nth-child(even) td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid tbody tr:nth-child(even) td.grid-sticky-column {
    background: var(--office-table-zebra) !important;
    background-color: var(--office-table-zebra) !important;
}

.table-size-scroll-wrap > .activity-grid tbody tr:hover td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid tbody tr:hover td.grid-sticky-column,
.table-size-scroll-wrap > .activity-grid tbody tr.row-selected td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid tbody tr.row-selected td.grid-sticky-column {
    background: var(--office-table-soft) !important;
    background-color: var(--office-table-soft) !important;
}

.table-size-scroll-wrap > .activity-grid tbody tr.row-bold td.grid-sticky-column,
.table-size-scroll-wrap > .activity-grid tbody tr.row-group td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid tbody tr.row-bold td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid tbody tr.row-comment td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid tbody tr.row-blank td.grid-sticky-column {
    background: #fff !important;
    background-color: #fff !important;
}

/* Resize separators should not draw over sticky columns while horizontally scrolling. */
.table-size-scroll-wrap > .activity-grid .column-resize-handle,
.table-size-scroll-wrap > .time-attendance-grid .column-resize-handle {
    z-index: 35 !important;
}

.table-size-scroll-wrap > .activity-grid th.grid-sticky-column,
.table-size-scroll-wrap > .activity-grid td.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid th.grid-sticky-column,
.table-size-scroll-wrap > .time-attendance-grid td.grid-sticky-column {
    z-index: 80 !important;
}

.table-size-scroll-wrap > .activity-grid th.grid-sticky-column .column-resize-handle,
.table-size-scroll-wrap > .time-attendance-grid th.grid-sticky-column .column-resize-handle {
    z-index: 90 !important;
}

/* Scheduler: keep task name visible while horizontally scrolling. */
.scheduler-table th:first-child,
.scheduler-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 42 !important;
    background: #fff !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    box-shadow: 1px 0 0 var(--office-table-border) !important;
}

.scheduler-table thead th:first-child {
    background: var(--office-table-blue) !important;
    background-color: var(--office-table-blue) !important;
    color: #fff !important;
    z-index: 62 !important;
}

.scheduler-table tbody tr:nth-child(even) td:first-child {
    background: var(--office-table-zebra) !important;
    background-color: var(--office-table-zebra) !important;
}

.scheduler-table tbody tr:hover td:first-child,
.scheduler-table tbody tr.scheduler-row-running td:first-child {
    background: var(--office-table-soft) !important;
    background-color: var(--office-table-soft) !important;
}

/* Selected configuration tables: keep the first key column visible. */
.table-config.config-sticky-first th:first-child,
.table-config.config-sticky-first td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 42 !important;
    background: #fff !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    box-shadow: 1px 0 0 var(--office-table-border) !important;
}

.table-config.config-sticky-first thead th:first-child {
    background: var(--office-table-blue) !important;
    background-color: var(--office-table-blue) !important;
    color: #fff !important;
    z-index: 62 !important;
}

.table-config.config-sticky-first tbody tr:nth-child(even) td:first-child {
    background: var(--office-table-zebra) !important;
    background-color: var(--office-table-zebra) !important;
}

.table-config.config-sticky-first tbody tr:hover td:first-child {
    background: var(--office-table-soft) !important;
    background-color: var(--office-table-soft) !important;
}



/* Rule configuration pages: keep standard visual formatting, only reduce column width. */
.table-config.config-rule-compact th:not(.action-cell),
.table-config.config-rule-compact td:not(.action-cell) {
    min-width: 5.2rem !important;
    max-width: 9.5rem !important;
}

.table-config.config-rule-compact th.autoexpand-col,
.table-config.config-rule-compact td.autoexpand-col {
    min-width: 5.2rem !important;
    max-width: 8.75rem !important;
}

.table-config.config-rule-compact input:not([type="checkbox"]),
.table-config.config-rule-compact select,
.table-config.config-rule-compact textarea,
.table-config.config-rule-compact .form-control,
.table-config.config-rule-compact .form-select {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Requests grid final desktop fit: keep the table inside the page unless the user manually resizes columns wider. */
@media (min-width: 768px) {
.requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }

    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-status-col { width: 5.5rem !important; }
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-user-col { width: 6.35rem !important; }
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-date-col { width: 4.45rem !important; }
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-type-col { width: 8rem !important; }
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-param-date-col { width: 7.75rem !important; }
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-approver-col { width: 6rem !important; }
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-approval-col { width: 4.45rem !important; }
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) col.request-actions-col { width: 3.8rem !important; }

    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) th.request-date-header,
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) td.request-date-cell,
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) th.request-approval-header,
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) td.request-approval-cell {
        width: 4.45rem !important;
        min-width: 4.45rem !important;
        max-width: 4.45rem !important;
    }

    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) th,
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) td {
        min-width: 0 !important;
        padding-left: 3px !important;
        padding-right: 3px !important;
    }

    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) td.text-cell {
        max-width: 18rem !important;
    }

    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) th.actions-col,
    .requests-grid-container .table-size-scroll-wrap > table.requests-grid:not(.resized-columns-table) td.actions-cell {
        width: 3.8rem !important;
        min-width: 3.8rem !important;
        max-width: 3.8rem !important;
    }

    .requests-grid-container .table-size-scroll-wrap > table.requests-grid th.actions-col {
        padding: 3px 3px !important;
        line-height: 1.2 !important;
        height: auto !important;
        min-height: 0 !important;
        vertical-align: middle !important;
        background: #1E3F6E !important;
        border: 0 !important;
        border-bottom: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
/* Category color input: keep the swatch visible inside compact configuration grids. */
.table-config input.category-color-input,
.table-size-scroll-wrap > .table-config input.category-color-input {
    width: 3.2rem !important;
    min-width: 3.2rem !important;
    max-width: 3.2rem !important;
    height: 1.45rem !important;
    min-height: 1.45rem !important;
    padding: 1px !important;
    border: 1px solid var(--office-table-border) !important;
    overflow: visible !important;
}
/* Rule configuration header actions */
.config-page-header-actions .config-rules-transfer-toolbar {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.config-page-header-actions .config-rules-transfer-toolbar .btn,
.config-page-header-actions .config-rules-transfer-toolbar .config-rules-import-button,
.config-page-header-actions > .config-rule-add-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 7.1rem !important;
    width: 7.1rem !important;
    min-width: 7.1rem !important;
    max-width: 7.1rem !important;
    height: 1.65rem !important;
    min-height: 1.65rem !important;
    padding: 0.15rem 0.35rem !important;
    font-size: 0.7rem !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.config-page-header-actions .config-rules-transfer-toolbar .btn:focus,
.config-page-header-actions .config-rules-transfer-toolbar .btn:active,
.config-page-header-actions .config-rules-transfer-toolbar .btn:focus-visible,
.config-page-header-actions > .config-rule-add-button:focus,
.config-page-header-actions > .config-rule-add-button:active,
.config-page-header-actions > .config-rule-add-button:focus-visible {
    outline: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 767.98px) {
    .config-page-header-actions .config-rules-transfer-toolbar {
        flex: 0 0 auto !important;
        width: auto !important;
    }
}