body {
    background-color: var(--portal-background);
    color: var(--portal-text);
}

.header,
.toolbar,
.card,
.modal-content,
.menu-sub-dropdown {
    background-color: var(--portal-surface);
    color: var(--portal-text);
}

.content :is(h1, h2, h3) {
    color: var(--portal-text);
}

.aside.aside-dark,
.aside-dark .aside-logo,
.aside-dark .aside-menu,
.aside-dark .hover-scroll-overlay-y,
.theme-preview-aside {
    background-color: var(--portal-sidebar) !important;
    color: var(--portal-sidebar-text);
}

.aside-brand,
.aside-brand:hover,
.aside-toggle,
.aside-dark .menu .menu-item .menu-link :is(.menu-title, .menu-icon i) {
    color: var(--portal-sidebar-text) !important;
}

.aside-dark .menu .menu-item .menu-link:is(.active, :hover, :focus-visible) {
    background-color: color-mix(in srgb, var(--portal-primary) 38%, var(--portal-sidebar)) !important;
}

.tenant-logo,
.theme-logo-preview {
    background: #fff;
    border-radius: .475rem;
    flex: 0 0 auto;
    object-fit: contain;
}

.tenant-logo {
    height: 40px;
    width: 40px;
}

.theme-logo-preview {
    height: 68px;
    width: 68px;
}

.btn.btn-primary,
.page-item.active .page-link {
    background-color: var(--portal-primary) !important;
    border-color: var(--portal-primary) !important;
    color: var(--portal-primary-text) !important;
}

.btn.btn-primary:is(:hover, :focus-visible),
.page-item.active .page-link:is(:hover, :focus-visible) {
    background-color: var(--portal-accent) !important;
    border-color: var(--portal-accent) !important;
    color: var(--portal-accent-text) !important;
}

.btn.btn-light-primary,
.bg-light-primary,
.badge-light-primary {
    background-color: color-mix(in srgb, var(--portal-primary) 12%, var(--portal-surface)) !important;
    color: var(--portal-primary) !important;
}

.btn.btn-light-primary i,
.btn.btn-light-primary .svg-icon {
    color: var(--portal-primary) !important;
}

.text-primary {
    color: var(--portal-primary) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--portal-primary);
}

.portal-table {
    --bs-table-color: var(--portal-text);
    --bs-table-bg: var(--portal-surface);
    --bs-table-striped-color: var(--portal-text);
    --bs-table-striped-bg: color-mix(in srgb, var(--portal-primary) 5%, var(--portal-surface));
    --bs-table-hover-color: var(--portal-text);
    --bs-table-hover-bg: color-mix(in srgb, var(--portal-accent) 12%, var(--portal-surface));
    border-color: color-mix(in srgb, var(--portal-text) 17%, var(--portal-surface));
    color: var(--portal-text);
}

.portal-table > thead {
    background-color: color-mix(in srgb, var(--portal-primary) 9%, var(--portal-surface));
    color: var(--portal-text);
}

.portal-table > thead > tr > th {
    background-color: transparent;
}

.portal-table.table-row-dashed > tbody > tr,
.portal-table.table-bordered :is(th, td) {
    border-color: color-mix(in srgb, var(--portal-text) 17%, var(--portal-surface));
}

.theme-preview {
    background-color: var(--portal-background);
    color: var(--portal-text);
    display: flex;
    min-width: 0;
}

.theme-preview-swatch {
    background-color: var(--portal-primary);
    border-radius: .25rem;
    height: 1rem;
    width: 2rem;
}

.theme-preview-accent {
    background-color: var(--portal-accent);
}

.login-page {
    min-height: 100vh;
    background: radial-gradient(ellipse at 18% 0%, color-mix(in srgb, var(--portal-primary) 12%, transparent), transparent 52%);
}

.login-card {
    width: min(100%, 430px);
}

.login-brand {
    background-color: var(--portal-sidebar);
    color: var(--portal-sidebar-text);
}

.login-logo {
    width: 56px;
    height: 56px;
}

.login-card h1 {
    color: var(--portal-text);
}

@media (max-width: 575.98px) {
    .theme-preview {
        display: block;
    }

    .theme-preview-aside {
        border-radius: .475rem .475rem 0 0 !important;
    }
}

.portal-validation-summary ul {
    margin: 0;
    padding-inline-start: 1.2rem;
}

.portal-swal-popup.swal2-popup {
    background-color: var(--portal-surface);
    color: var(--portal-text);
    border-radius: 1rem;
}

.portal-swal-popup .swal2-html-container,
.portal-swal-popup .swal2-title {
    color: inherit;
}

.portal-editor-slot,
.portal-editor-fragment,
.portal-editor-fragment > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.portal-editor-fragment .modal-body {
    padding-block: clamp(1rem, 3vw, 2rem);
}

[data-portal-notification][hidden] {
    display: none !important;
}

.display-thumb {
    width: 144px;
    height: 81px;
    object-fit: contain;
    background: var(--portal-sidebar);
}

.screens-workspace {
    max-width: 1480px;
    margin-inline: auto;
}

.screen-category-thumb {
    flex: 0 0 auto;
    width: 76px;
    height: 46px;
    object-fit: cover;
    background-color: var(--portal-sidebar);
}

.display-video-thumb {
    flex: 0 0 auto;
}

.display-slide-details {
    flex-basis: 100%;
    cursor: default;
}

.display-slide-details > summary {
    width: fit-content;
    list-style: none;
}

.display-slide-details .display-detail-close,
.display-slide-details[open] .display-detail-open {
    display: none;
}

.display-slide-details[open] .display-detail-close {
    display: inline;
}

.display-preview-visual {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: .65rem;
    background: var(--portal-sidebar);
    color: var(--portal-sidebar-text);
}

.display-preview-visual > img,
.display-preview-visual > video {
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    object-fit: contain;
}

.display-preview-message {
    margin: 0;
    padding: .75rem 1rem;
    text-align: center;
}

.display-editor-files {
    scroll-margin-top: calc(var(--kt-toolbar-height, 55px) + 90px);
}

.portal-dropzone.dropzone {
    display: flex;
    align-items: center;
    min-height: 4.75rem;
    padding: .8rem 1rem;
    text-align: start;
    color: var(--portal-text);
    border: 1px dashed color-mix(in srgb, var(--portal-primary) 64%, var(--portal-surface));
    border-radius: .65rem;
    background-color: color-mix(in srgb, var(--portal-primary) 5%, var(--portal-surface));
    cursor: pointer;
}

.portal-dropzone.dropzone:is(:hover, :focus-visible, .dz-drag-hover) {
    border-color: var(--portal-primary);
    background-color: color-mix(in srgb, var(--portal-primary) 12%, var(--portal-surface));
}

.portal-dropzone.dropzone:focus-visible {
    outline: 2px solid var(--portal-primary);
    outline-offset: 2px;
}

.portal-dropzone.dropzone[hidden] {
    display: none;
}

.portal-logo-editor .display-preview-visual {
    max-height: 9rem;
}

.screen-effect-demo {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.screen-effect-demo[hidden] { display: none; }

.screen-effect-sample {
    position: relative;
    width: 8.5rem;
    height: 3.5rem;
    overflow: hidden;
    border-radius: .55rem;
    background: var(--portal-sidebar);
    color: var(--portal-sidebar-text);
}

.screen-effect-sample > span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: .25rem;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-align: center;
}

.screen-effect-sample > span:last-child {
    background: var(--portal-primary);
    color: var(--portal-primary-text);
}

.display-program-list > li {
    background: transparent;
    border-inline: 0;
}

.display-program-list summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
}

.display-program-list summary::before {
    content: "›";
    flex-shrink: 0;
    color: var(--portal-primary);
    font-size: 1.4rem;
    line-height: .9;
}

.display-program-list details[open] > summary::before {
    transform: rotate(90deg);
}

.display-program-list summary > :last-child {
    margin-inline-start: auto;
    white-space: nowrap;
}

.display-program-detail {
    padding: .75rem 0 .15rem 1.05rem;
}

.display-program-products {
    margin: 0 0 .75rem;
    padding: 0;
    list-style: none;
}

.display-program-products > li {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding-block: .35rem;
    border-bottom: 1px solid var(--bs-border-color, #e4e6ef);
}

.display-program-products strong {
    white-space: nowrap;
}

[data-display-order="editable"] [draggable="true"] {
    cursor: grab;
}

[data-display-order="editable"] [draggable="true"]:active {
    cursor: grabbing;
}
