.pagination li > input[type=text] {
    width: 60px !important;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
}

.pagination li button:disabled {
    color: lightgray;
}

i.bi > sup, i.bi > sub {
    margin-left: -6px;
}

h2 > a {
    text-decoration: none;
}

h2 > a:hover {
    text-decoration: underline;
}

.inline-search-button {
    margin-left: -44px;
}

.digits-3 {
    text-align: right !important;
    width: 70px;
}

.digits-6 {
    width: 80px;
}

select.month {
    width: 120px;
}

.digits-3 input[type="text"],
.digits-6 input[type="text"] {
text-align: right !important;
}
td.digits-3 input[type="text"],
td.digits-6 input[type="text"] {
padding-top: 0;
padding-bottom: 0;
padding-right: 3px;
}

table.form td {
    vertical-align: middle;
}

td.digits-3, 
td.digits-6, 
td.digits-10 
{
    text-align: right !important;
}

td.digits-3 {
    width: 70px;
}
td.digits-6 {
    width: 80px;
}
td.digits-10 {
    width: 150px;
}

td.digits-3 input[type="text"],
td.digits-6 input[type="text"],
td.digits-10 input[type="text"] {
    text-align: right !important;
}
tr:has(+ tr:has(.collapse)) td {
    border: 0 !important;
    border-spacing: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
tr:has(.collapse):not(:has(.show))  td {
    border-spacing: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.row-bg-success,
.row-bg-success > td {
    background-color: #EEFFEE !important;
}

.row-bg-warning,
.row-bg-warning > td {
    background-color: #FFF7DD !important;
}

.row-bg-danger,
.row-bg-danger > td {
    background-color: #FFEEEE !important;
}

.row-bg-info,
.row-bg-info > td {
    background-color: #C1EAF2 !important;
    color: #000000 !important;
}

#status .status{
    padding: 1.25rem 0 1.25rem 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border: 0px solid #e9ecef;
    border-left-width: .25rem;
    border-radius: .25rem;
}
#status .status.border-info {
    background-color: #EEFFFF;
}
#status .status.border-danger {
    background-color: #FFF7F7;
}
#status .status.border-warning {
    background-color: #FFF7DD;
}
#status .status.border-success {
    background-color: #EEFFEE;
}

.text-indent {
    text-indent: 2rem;
}
.text-no-indent {
    text-indent: 0;
}

.text-rotate-90 {
  writing-mode: sideways-lr;
}

.text-rotate-0 {
  writing-mode: lr;
}

.text-vertical {
  writing-mode: vertical-lr; /* Text flows vertically from right to left */
  text-orientation: upright;    
}

table th,
table td {
    vertical-align: baseline;
}

thead.sticky {
    position: sticky;
    top: 0;
}

tfoot.sticky {
    position: sticky;
    bottom: 0;
}

.widgets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin-bottom: 18px;
    gap: 12px;
}

.widget {
    position: relative;
    background-image: linear-gradient(to bottom, white, #F7F7F7);
    border: solid 1px gray;
    border-radius: 10px;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    max-height: 118px;
}

.widget.empty {
    border: 0;
    max-width: 0px;
    max-height: 0px;
    padding: 0;
    margin: 0;    
}

.widget.h-auto {
    max-height: max-content;
}

.widget.rows-2 {
    grid-row: span 2;
    max-height: 248px;
}

.widget.rows-3 {
    grid-row: span 3;
    max-height: 382px;
}

.widget.rows-4 {
    grid-row: span 4;
    max-height: 510px;
}

.widget.cols-2 {
    grid-column: span 2;
}

.widget.cols-3 {
    grid-column: span 3;
}

.widget.cols-4 {
    grid-column: span 4;
}

.widget.cols-5 {
    grid-column: span 5;
}

.widget.cols-6 {
    grid-column: span 6;
}

.widget.row-bg-success {
    background-image: linear-gradient(to bottom, white, #EEFFEE);
    border-color: #198754;
}

.widget.row-bg-warning {
    background-image: linear-gradient(to bottom, white, #FFF7DD);
    border-color: #664d03;
}

.widget.row-bg-danger {
    background-image: linear-gradient(to bottom, white, #FFEEEE);
    border-color: #DC3545;
}

.widget-header {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 6px;
}

.widget-header > i {
    flex-basis: content;
}

.widget-header > span:first-child,
.widget-header > i:first-child + span {
    flex: auto;
}


.tip {
    position: relative;
    display: inline-flex;
}

.tip-btn {
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    background-image: none;
}

.tip-btn:hover + .tip-popup {
    display: block !important;
}

.tip-popup {
    display: none;
    position: absolute;
    z-index: 10000;
    top: calc(100% + 3px);
    left: -250px;
    width: 280px;
    backdrop-filter: blur(20px);
    box-shadow: rgba(0, 0, 0, 0.24) 0px 8px 30px;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.55;
    padding: 14px 16px;
    background-image: linear-gradient(to bottom, white, #EEFFFF);
    border: solid 1px cadetblue;
    border-radius: 12px;
    text-align: left;
    text-transform: none;
}

.widget-body {
    display: flex;
    flex-direction: row;
    flex: auto;
    align-items: center;
    text-align: left;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.widget-body > span:first-child,
.widget-body > i:first-child + span {
    flex: auto;
}


.widget-body:has(.table) {
    flex-direction: column;
    overflow: auto;
}

.widget-body .table>tbody>tr>* {
    background-color: transparent;
}

.widget-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.report .info {
    border-top: dashed 1px gray;
    padding-top: 1rem;
    margin-top: 1rem;
}

.report .pages {
    border-top: dashed 1px gray;
    margin-top: 1rem;
}

.report .page {
    display: flex;
    flex-direction: row;
    border-bottom: dashed 1px gray;
    margin-top: 1rem;
    padding-bottom: 1rem;
}

.report .page .ordering {
    display: flex;
    flex-direction: column;
    margin-right: 1rem;
}

.report .page .ordering span {
    flex: auto;
    align-content: center;
    text-align: center;
    font-weight: 600;
}

.report .page .ordering .btn {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.report .page .content {
    flex: auto;
}

.report .page .content .inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.report .page .content .actions {
    text-align: right !important;
    margin-top: .5rem !important;
}

.report .page .content .inputs .department-list-select {
    grid-column: span 3;
    display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
}

.report .page .content .inputs .department-list-select :first-child,
.report .page .content .inputs .department-list-select :last-child {
    grid-column: span 3;
}

.report input.is-invalid,
.report select.is-invalid {
    background-image: linear-gradient(to bottom, white, #ffeeee);
    border-color: #DC3545;
}


.report input+.invalid-feedback,
.report select+.invalid-feedback {
    color: #DC3545;
    display: none;
}

.report input.is-invalid+.invalid-feedback,
.report select.is-invalid+.invalid-feedback {
    display: inline;
}

.history-diff-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.82rem;
}

.history-diff-table th,
.history-diff-table td {
    overflow-wrap: break-word;
    word-break: break-word;
    vertical-align: top;
}

/* 3 колонки: Поле / Было / Стало */
.history-diff-table th:first-child,
.history-diff-table td:first-child {
    width: 34%;
}
.history-diff-table th:nth-child(2),
.history-diff-table td:nth-child(2),
.history-diff-table th:nth-child(3),
.history-diff-table td:nth-child(3) {
    width: 33%;
}

/* 2 колонки: Поле / Значение — первая шире, вторая = 33% как в 3-колоночном */
.history-diff-table:has(th:nth-child(2):last-child) th:first-child,
.history-diff-table:has(td:nth-child(2):last-child) td:first-child {
    width: 67%;
}
.history-diff-table:has(th:nth-child(2):last-child) th:nth-child(2),
.history-diff-table:has(td:nth-child(2):last-child) td:nth-child(2) {
    width: 33%;
}

td.history-data {
    min-width: 260px;
}