.app-header .main-header-container {
    position: relative;
}

.desk-signed-in {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    max-width: min(28rem, 46vw);
    overflow: hidden;
    transform: translate(-50%, -50%);
    color: #1c1917;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}

.main-sidebar-header .header-logo,
.horizontal-logo .header-logo {
    display: flex !important;
    align-items: center;
    gap: 0.7rem;
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    height: auto;
    padding-inline: 0.85rem;
    text-decoration: none;
}

.app-sidebar .main-sidebar-header {
    height: auto;
    min-height: 5.5rem;
}

.app-sidebar .main-sidebar-header .header-logo img.showroom-mark,
.app-header .horizontal-logo .header-logo img.showroom-mark {
    display: block;
    width: 56px;
    height: 56px;
    max-width: none;
    max-height: none;
    line-height: 1;
    object-fit: contain;
    overflow: visible;
    flex: 0 0 auto;
}

.auth-mark {
    display: block;
    width: min(400px, 46vh);
    height: auto;
    aspect-ratio: 1;
    max-width: 100%;
    margin: 0 -2rem 1.5rem;
    transform: scale(1.5);
}

.showroom-brand { line-height: 1.15; }
.showroom-brand strong {
    display: block;
    max-width: 8.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.15;
}
.app-sidebar .showroom-brand { color: #fff; }
.horizontal-logo .showroom-brand { color: #1c1917; }
[data-menu-styles="light"] .app-sidebar .showroom-brand { color: #1c1917; }

[data-toggled="icon-overlay-close"] .app-sidebar .showroom-brand,
[data-toggled="icon-text-close"] .app-sidebar .showroom-brand,
[data-toggled="icon-click-closed"] .app-sidebar .showroom-brand,
[data-toggled="icon-hover-closed"] .app-sidebar .showroom-brand {
    display: none;
}

[data-toggled="icon-overlay-close"] .app-sidebar .main-sidebar-header .header-logo,
[data-toggled="icon-text-close"] .app-sidebar .main-sidebar-header .header-logo,
[data-toggled="icon-click-closed"] .app-sidebar .main-sidebar-header .header-logo,
[data-toggled="icon-hover-closed"] .app-sidebar .main-sidebar-header .header-logo {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding-inline: 0.35rem;
    gap: 0;
}

[data-toggled="icon-overlay-close"][data-icon-overlay="open"] .app-sidebar .showroom-brand {
    display: block;
}

[data-toggled="icon-overlay-close"][data-icon-overlay="open"] .app-sidebar .main-sidebar-header .header-logo {
    width: auto;
    min-width: max-content;
    justify-content: flex-start;
    padding-inline: 0.85rem;
    gap: 0.7rem;
}

.header-search form { position: relative; }
.header-search .header-search-bar { padding-inline-start: 2.35rem; }

.authentication-cover {
    background: linear-gradient(160deg, #1c1610 0%, #6d4e22 55%, #c4a574 100%);
}

.ql-container.legal-editor {
    min-height: 18rem;
    background: #fff;
    font-size: 0.95rem;
}
.ql-container.legal-editor .ql-editor {
    min-height: 18rem;
    max-height: min(32rem, calc(100vh - 18rem));
    overflow-y: auto;
}

.piece-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f6f6f6;
}

.piece-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Desk tables and lists, aligned with the Xintra orders and basic-table layouts. */
.app-content .card > .card-body.p-0:has(> .table) {
    overflow-x: auto;
}

.app-content .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--default-text-color);
    --bs-table-border-color: var(--default-border);
    --bs-table-hover-bg: var(--list-hover-focus-bg);
    --bs-table-hover-color: var(--default-text-color);
    margin-bottom: 0;
    vertical-align: middle;
    border-color: var(--default-border);
}

.app-content .table > :not(caption) > * > * {
    padding: 0.9rem 1.15rem;
    border-bottom-color: var(--default-border);
    box-shadow: none;
}

.app-content .table > thead > tr > th {
    padding-block: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--default-background);
    border-bottom-width: 1px;
    white-space: nowrap;
}

.app-content .table > tbody > tr > td,
.app-content .table > tbody > tr > th {
    background-color: var(--custom-white);
}

.app-content .table > tbody > tr:hover > * {
    --bs-table-bg-state: var(--list-hover-focus-bg);
    background-color: var(--list-hover-focus-bg);
    color: var(--default-text-color);
}

.app-content .table > tbody > tr:last-child > * {
    border-bottom-width: 0;
}

.app-content .table .btn-list {
    flex-wrap: nowrap;
}

.app-content .card-header form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
    margin-inline-start: auto;
}

.app-content .card-header form .form-control,
.app-content .card-header form .form-select {
    width: auto;
    min-width: 10.5rem;
    max-width: 16rem;
    flex: 1 1 10.5rem;
}

.app-content .card-header form .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.app-content .list-group-item {
    padding: 0.8rem 1.25rem;
    border-color: var(--default-border);
    transition: background-color 0.15s ease;
}

.app-content .list-group-flush > .list-group-item:hover {
    background-color: var(--list-hover-focus-bg);
}

.app-content .list-group-item .fw-medium,
.app-content .list-group-item strong {
    color: var(--default-text-color);
}

.app-content .desk-lines {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    white-space: normal;
}

.app-content .desk-lines li {
    padding: 0.35rem 0.6rem;
    border-radius: 0.45rem;
    background: rgba(var(--primary-rgb), 0.06);
    font-size: 0.75rem;
    line-height: 1.4;
}

.app-content tbody.desk-fold.collapse:not(.show) {
    display: none;
}

.app-content tbody.desk-fold.collapsing,
.app-content tbody.desk-fold.collapse.show {
    display: table-row-group;
    height: auto;
    overflow: visible;
    transition: none;
}

.app-content tbody.desk-fold > tr > * {
    background: rgba(var(--primary-rgb), 0.035);
}

.app-content tbody.desk-fold > tr > td:first-child {
    box-shadow: inset 3px 0 0 rgba(var(--primary-rgb), 0.45);
}

.desk-fold-toggle .desk-fold-minus {
    display: none;
}

.desk-fold-toggle[aria-expanded="true"] .desk-fold-plus {
    display: none;
}

.desk-fold-toggle[aria-expanded="true"] .desk-fold-minus {
    display: inline-block;
}

.desk-fold-spacer {
    display: inline-block;
    width: 1.75rem;
    flex: 0 0 1.75rem;
}

.desk-tree > li + li {
    margin-top: 0.65rem;
}

.desk-tree-node {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--default-border);
    border-radius: 0.7rem;
    background: var(--custom-white);
}

.desk-tree-node:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.035);
}

.desk-tree-children {
    margin-top: 0.55rem;
    margin-inline-start: 1.35rem;
    padding-inline-start: 0.9rem;
    border-inline-start: 1px dashed var(--default-border);
}

.app-content .card-footer .pagination {
    margin-bottom: 0;
    justify-content: flex-end;
}

.rate-book-clock-track {
    height: 3px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    overflow: hidden;
}

.rate-book-clock-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: rgb(var(--primary-rgb));
}
