.htmx-indicator {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-color: #1B2024;*/
    /*opacity: 0.85;*/
    cursor: wait;
    z-index: 10;
    /*display: flex;*/
    align-items: center;
    justify-content: center;
}

.htmx-indicator i.spinner {
    font-size: 1rem;
    color: white;
}

.card-roles {
    border-top: none;
    border-left: none;
    border-right: none;
}

.card-header-roles {
    padding-top: 0.55em!important;
    padding-bottom: 0.55em!important;
}

#order_comments_form .ts-wrapper {
    width: 100%;
}

#order_comments_form .ts-wrapper.multi .ts-control > .item {
    background-color: #455A64;
    color: #fff;
    border: 0;
    border-radius: 0.1875rem;
}

#order_comments_form .ts-wrapper.multi .ts-control > .item .remove {
    border-left-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.page-back-icon {
    cursor: pointer;
}

.page-back-icon:hover {
    opacity: 0.7;
}

#notifications_nav_item #notifications_badge_frame {
    pointer-events: none;
}

.pantry-context-menu .dropdown-item {
    cursor: pointer;
}

.pantry-context-menu.dropdown-menu.show {
    display: block !important;
}

.pantry-folder-drag-handle {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0 0.15rem;
    cursor: grab;
    opacity: 0.45;
    vertical-align: middle;
}

.pantry-folder-drag-handle:hover,
.fancytree-node:hover > .pantry-folder-drag-handle {
    opacity: 0.9;
}

.pantry-folder-drag-handle:active {
    cursor: grabbing;
}

.pantry-card-layout {
    min-height: 420px;
}

.pantry-card-tree {
    border-right: 1px solid #ddd;
}

.catalog-tree {
    max-height: none;
    min-height: 420px;
    overflow-y: auto;
}

.catalog-tree-group input[type="checkbox"],
.catalog-tree-item input[type="checkbox"] {
    margin-right: 0.4rem;
}

@media (max-width: 991.98px) {
    .pantry-card-tree {
        border-right: 0;
        border-bottom: 1px solid #ddd;
    }
}

.tree-default .fancytree-title .badge {
    font-size: 0.6875rem;
    vertical-align: middle;
}

.tree-default .fancytree-container {
    display: block;
}

.tree-default .fancytree-container > li,
.tree-default .fancytree-container ul[role="group"] > li {
    display: list-item;
    list-style: none;
}

.tree-default .fancytree-container ul[role="group"] {
    display: block;
    padding-left: 1.25rem;
    margin: 0;
}

.tree-default .fancytree-node {
    display: inline-block;
    vertical-align: top;
}

.pantry-device-row {
    cursor: grab;
}

.pantry-device-row:active {
    cursor: grabbing;
}

.pantry-device-dragging {
    opacity: 0.45;
}

.pantry-folder-dragging {
    opacity: 0.45;
}

.fancytree-drop-target.fancytree-drop-accept .fancytree-title {
    background-color: #2196F3;
    color: #fff;
}

.flash-toasts {
    position: fixed;
    top: 4.5rem;
    right: 1.25rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    max-width: min(24rem, calc(100vw - 2.5rem));
    pointer-events: none;
}

.flash-toast {
    pointer-events: auto;
    width: 100%;
    margin: 0;
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.18);
}

.flash-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.flash-toast.is-hiding {
    opacity: 0;
    transform: translateY(-0.5rem);
}

@media (max-width: 767.98px) {
    .flash-toasts {
        top: 4rem;
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
        align-items: stretch;
    }
}

.rich-text-content,
.news-preview {
    line-height: 1.6;
}

.rich-text-content img,
.news-preview img {
    max-width: 100%;
    height: auto;
}

.rich-text-content ul,
.news-preview ul,
.rich-text-content ol,
.news-preview ol {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.rich-text-content p,
.news-preview p {
    margin-bottom: 0.75rem;
}

.rich-text-content p:last-child,
.news-preview p:last-child {
    margin-bottom: 0;
}

.note-editor.note-frame {
    margin-bottom: 0;
}

.order-list-table tbody tr.order-list-row--paid > td:first-child {
    box-shadow: inset 3px 0 0 #e0b44a;
}

.order-list-paid-coin {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-right: 0.35rem;
    vertical-align: -0.05em;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, #fff6a8 0%, #ffd84d 28%, #f0b429 62%, #c98912 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -2px 3px rgba(160, 100, 0, 0.35),
        0 0 0 1px rgba(176, 120, 16, 0.55);
}

.order-list-table tbody td {
    padding: 0;
}

.order-list-table .order-list-row-link {
    display: block;
    height: 100%;
    padding: 0.75rem 1.25rem;
    color: inherit;
    text-decoration: none;
}

.order-list-table .order-list-row-link:hover,
.order-list-table .order-list-row-link:focus {
    color: inherit;
    text-decoration: none;
}

.order-list-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
    float: left;
    margin: 0 0 1.25rem 0;
}

.order-list-filters .form-group,
.order-list-page-size .form-group {
    margin-bottom: 0;
}

.order-list-filters label,
.order-list-page-size label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    color: #999;
}

.order-list-filters select.form-control {
    min-width: 9.5rem;
}

.order-list-filters__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-list-page-size {
    float: right;
    margin: 0 0 1.25rem 0;
}

.order-list-page-size select.form-control {
    width: auto;
    min-width: 4.5rem;
}

.order-list-dates {
    line-height: 1.4;
    white-space: nowrap;
}

.order-list-claim {
    position: relative;
    overflow: hidden;
    max-width: 18rem;
    max-height: 7.5em;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.order-list-claim.is-clamped::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3em;
    content: '';
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, #fff);
}

.order-list-table.table-striped tbody tr:nth-of-type(odd) .order-list-claim.is-clamped::after {
    background: linear-gradient(to bottom, transparent, #fafafa);
}

.order-list-table.table-hover tbody tr:hover .order-list-claim.is-clamped::after {
    background: linear-gradient(to bottom, transparent, #f7f7f7);
}

.order-comments-chat .media-chat-item,
#order_comments_frame .media-chat-item {
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-list-feed.list-feed-time .list-feed-item {
    margin-left: 5.5rem;
}

.audit-list-feed.list-feed-time .list-feed-item .feed-time {
    left: -5.5rem;
    width: 5.25rem;
    text-align: right;
    line-height: 1.25;
}

.order-nav-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar-order-search {
    min-width: 14rem;
    max-width: 22rem;
    flex: 1 1 16rem;
}

.navbar-order-search .form-group-feedback {
    margin-bottom: 0;
}

.order-nav-stat {
    min-width: 1.5rem;
    cursor: default;
}

.order-nav-stat--new {
    background-color: #dc3545;
    color: #fff;
}

.order-nav-stat--active {
    background-color: #ffc107;
    color: #212529;
}

.order-nav-stat--ready {
    background-color: #28a745;
    color: #fff;
}

.order-passport-card {
    overflow: hidden;
}

.order-passport {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: 0;
    row-gap: 0;
    align-items: stretch;
    grid-template-areas:
        "header header"
        "client device"
        "claim money"
        "people people";
}

.order-passport--no-client {
    grid-template-areas:
        "header header"
        "device device"
        "claim money"
        "people people";
}

.order-passport__info,
.order-passport__editor,
.order-passport__form {
    display: contents;
}

.order-passport__header {
    grid-area: header;
    padding: 1.25rem;
    border-bottom: 1px solid #ddd;
    overflow: visible;
    position: relative;
    z-index: 4;
}

.order-passport__claim {
    grid-area: claim;
}

.order-passport__money {
    grid-area: money;
}

.order-passport__people {
    grid-area: people;
}

.order-passport__device {
    grid-area: device;
}

.order-passport__client {
    grid-area: client;
}

.order-passport__device,
.order-passport__client {
    display: flex;
    flex-direction: column;
}

.order-passport__device,
.order-passport__claim,
.order-passport__client,
.order-passport__money,
.order-passport__people {
    position: relative;
    min-width: 0;
    background: transparent;
}

.order-passport__client > .order-passport__zone,
.order-passport__device > .order-passport__zone {
    position: relative;
}

.order-passport__client > .order-passport__zone::after,
.order-passport__claim::after {
    content: "";
    position: absolute;
    top: 1.25rem;
    bottom: 1.25rem;
    right: 0;
    width: 1px;
    background: #ddd;
}

.order-passport__client > .order-passport__zone::before,
.order-passport__device > .order-passport__zone::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 0;
    height: 1px;
    background: #ddd;
}

.order-passport--no-client .order-passport__client > .order-passport__zone::after {
    content: none;
}

.order-passport__zone,
.order-passport__claim,
.order-passport__money {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}

.order-passport__device > .order-passport__zone,
.order-passport__client > .order-passport__zone {
    flex: 1 1 auto;
}

.order-passport__zone-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.order-passport__zone-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.order-passport__finance-section {
    margin-bottom: 1rem;
    min-width: 0;
}

.order-passport__finance-section turbo-frame {
    display: block;
    min-width: 0;
}

.order-passport__finance-section .table {
    font-size: 0.8125rem;
}

.order-passport__finance-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
    padding: 0.15rem 0;
}

.order-passport__finance-list-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.order-passport__finance-list-price {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.order-passport__finance-totals {
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.order-passport__people {
    padding: 1rem 1.25rem;
    border-top: 1px solid #ddd;
    background: #fafafa;
}

.order-passport__people-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem 1.75rem;
}

.order-passport__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 0.65rem;
}

.order-passport__actions,
.order-passport__actions-save {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.order-passport__icon-btn {
    line-height: 1;
    min-width: 1.25rem;
}

.order-passport__icon-btn:hover,
.order-passport__icon-btn:focus {
    text-decoration: none;
    color: #2196f3 !important;
}

.order-passport__icon-btn i {
    font-size: 0.9rem;
    top: 0;
}

.order-passport__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.order-passport__number {
    font-size: 1.35rem;
    line-height: 1.2;
}

.order-passport__status-form .form-control {
    min-width: 12rem;
    max-width: 18rem;
}

.order-passport__claim-input {
    flex: 1 1 auto;
    min-height: 4.5rem;
}

.order-passport__claim-input[readonly] {
    border: 0;
    background: transparent;
    box-shadow: none;
    resize: none;
    font-weight: 600;
    font-size: 1.05rem;
    padding-left: 0;
    padding-right: 0;
}

.order-passport__field-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.15rem;
}

.order-passport__money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

#order_due_frame {
    display: block;
    min-width: 0;
}

.order-passport__stat-value {
    font-weight: 600;
    font-size: 1.05rem;
}

.order-passport__stat-edit {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
}

.order-passport__stat-input {
    display: inline-block;
    font-weight: 600;
    font-size: 1.05rem;
    width: 7ch;
    field-sizing: content;
    padding: 0.15rem 0.25rem;
    height: auto;
}

.order-passport__stat-input::-webkit-outer-spin-button,
.order-passport__stat-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.order-passport__stat-label {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.15rem;
}

.order-passport__print-menu {
    min-width: 18rem;
    max-height: min(24rem, 70vh);
    overflow-y: auto;
    padding-top: 0.5rem;
    z-index: 1080;
}

@media (max-width: 767.98px) {
    .order-passport,
    .order-passport--no-client {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "header"
            "client"
            "device"
            "claim"
            "money"
            "people";
    }

    .order-passport__client > .order-passport__zone::after,
    .order-passport__claim::after {
        content: none;
    }

    .order-passport__claim::before {
        content: "";
        position: absolute;
        left: 1.25rem;
        right: 1.25rem;
        bottom: 0;
        height: 1px;
        background: #ddd;
    }

    .order-passport__claim-input {
        flex: 0 1 auto;
    }

    .order-passport__zone-footer,
    .order-passport__finance-totals {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
}

.sidebar-org-avatar {
    overflow: hidden;
    border-radius: 0.5rem;
    line-height: 0;
}

.sidebar-org-avatar svg {
    display: block;
}

.card-img-actions:focus-within .card-img-actions-overlay {
    opacity: 1;
    visibility: visible;
}

.profile-avatar-actions .card-img-actions-overlay {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.35);
}

.card-img-actions-overlay [data-action]::after {
    content: none;
    display: none;
}

.image-crop-stage {
    position: relative;
    overflow: hidden;
}

.image-crop-stage img {
    max-width: none;
    display: block;
}

/* Limitless sets z-index: 96 on .sidebar-component. That stacking context
   hides Bootstrap's modal (1050) behind the body backdrop (1040). */
@media (min-width: 768px) {
    .sidebar-expand-md.sidebar-component.profile-sidebar {
        z-index: auto;
    }
}

.profile-content {
    min-width: 0;
    width: 100%;
}

.profile-weekly-chart {
    width: 100%;
    position: relative;
}

.profile-weekly-chart .chart.has-fixed-height {
    width: 100%;
    height: 400px;
    min-height: 400px;
    position: relative;
    overflow: visible;
}

.profile-weekly-chart canvas {
    display: block !important;
}

.profile-weekly-chart-watermark {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    font-family: Roboto, Arial, sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(33, 33, 33, 0.12);
    transform: rotate(-28deg);
    white-space: nowrap;
}

@media (hover: none) {
    .card-img-actions .card-img-actions-overlay {
        opacity: 1;
        visibility: visible;
        background-color: rgba(0, 0, 0, 0.35);
    }
}

/* Текст масштабируется от --ui-root-font-size; rem-вёрстка (кнопки, поля, отступы) всегда от 16px. */
html {
    font-size: 16px;
    --ui-font-mult: calc(var(--ui-root-font-size, 16px) / 16px);
}

body {
    font-size: calc(0.8125rem * var(--ui-font-mult));
}

h1, .h1 { font-size: calc(1.5625rem * var(--ui-font-mult)); }
h2, .h2 { font-size: calc(1.4375rem * var(--ui-font-mult)); }
h3, .h3 { font-size: calc(1.3125rem * var(--ui-font-mult)); }
h4, .h4 { font-size: calc(1.1875rem * var(--ui-font-mult)); }
h5, .h5 { font-size: calc(1.0625rem * var(--ui-font-mult)); }
h6, .h6 { font-size: calc(0.9375rem * var(--ui-font-mult)); }

.lead { font-size: calc(1.01562rem * var(--ui-font-mult)); }

legend { font-size: calc(1.5rem * var(--ui-font-mult)); }

.btn,
.form-control,
.custom-select,
.input-group-text,
.dropdown-menu,
.tooltip,
.popover,
.popover-header {
    font-size: calc(0.8125rem * var(--ui-font-mult));
}

.btn-lg,
.btn-group-lg > .btn,
.form-control-lg,
.col-form-label-lg,
.input-group-lg > .form-control,
.input-group-lg > .input-group-prepend > .form-control,
.input-group-lg > .input-group-append > .form-control,
.input-group-lg > .input-group-prepend > .input-group-text,
.input-group-lg > .input-group-append > .input-group-text,
.input-group-lg > .input-group-prepend > .btn,
.input-group-lg > .input-group-append > .btn,
.pagination-lg .page-link,
.font-size-lg {
    font-size: calc(0.875rem * var(--ui-font-mult));
}

.btn-sm,
.btn-group-sm > .btn,
.form-control-sm,
.col-form-label-sm,
.input-group-sm > .form-control,
.input-group-sm > .input-group-prepend > .form-control,
.input-group-sm > .input-group-append > .form-control,
.input-group-sm > .input-group-prepend > .input-group-text,
.input-group-sm > .input-group-append > .input-group-text,
.input-group-sm > .input-group-prepend > .btn,
.input-group-sm > .input-group-append > .btn,
.font-size-sm {
    font-size: calc(0.75rem * var(--ui-font-mult));
}

.font-size-base {
    font-size: calc(0.8125rem * var(--ui-font-mult));
}

.font-size-xs {
    font-size: calc(0.6875rem * var(--ui-font-mult));
}

.close {
    font-size: calc(1.25003rem * var(--ui-font-mult));
}

.ts-wrapper .ts-control,
.ts-dropdown {
    font-size: calc(0.8125rem * var(--ui-font-mult));
}

[class^="icon-"],
[class*=" icon-"] {
    font-size: calc(1rem * var(--ui-font-mult));
}

.icon-2x { font-size: calc(2rem * var(--ui-font-mult)); }
.icon-3x { font-size: calc(3rem * var(--ui-font-mult)); }
.icon-4x { font-size: calc(4rem * var(--ui-font-mult)); }
.icon-5x { font-size: calc(5rem * var(--ui-font-mult)); }

/* Слайдер размера интерфейса в профиле: длинные подписи под делениями. */
@media (scripting: enabled) {
    .interface-scale-choices {
        display: none !important;
    }
}

.interface-scale-slider.ui-slider-pips.ui-slider-horizontal {
    margin-top: 0.75rem;
    margin-bottom: 3.5rem;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    touch-action: none;
}

.interface-scale-slider .ui-slider-label {
    width: 3.25rem;
    margin-left: -1.625rem;
    white-space: normal;
    line-height: 1.2;
}

.interface-scale-slider .ui-slider-pip-first .ui-slider-label {
    left: 50%;
    margin-left: 0;
    text-align: left;
}

.interface-scale-slider .ui-slider-pip-last .ui-slider-label {
    left: auto;
    right: 0;
    width: 5.5rem;
    margin-left: 0;
    text-align: right;
}

.interface-scale-slider .ui-slider-pip-selected .ui-slider-label {
    color: #333;
    font-weight: 500;
}
