:root {
    color-scheme: light;
    --k-brand: #fead35;
    --k-brand-hover: #e99a24;
    --k-brand-active: #d88918;
    --k-brand-soft: #fff3dc;
    --k-bg: #f4f4f3;
    --k-surface: #ffffff;
    --k-surface-2: #f8f8f7;
    --k-surface-3: #ececea;
    --k-text: #202020;
    --k-muted: #686868;
    --k-border: #dadad6;
    --k-border-strong: #bdbdb7;
    --k-link: #8a5100;
    --k-link-hover: #633a00;
    --k-info: #a96300;
    --k-success: #1f8b6c;
    --k-danger: #cf4540;
    --k-warning: #a96300;
    --k-shadow: 0 1px 2px rgba(32, 32, 32, 0.08), 0 8px 24px rgba(32, 32, 32, 0.05);
    --k-focus: 0 0 0 3px rgba(254, 173, 53, 0.32);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --k-brand-soft: #3b301f;
    --k-bg: #151515;
    --k-surface: #1f1f1f;
    --k-surface-2: #282828;
    --k-surface-3: #333333;
    --k-text: #f5f5f3;
    --k-muted: #b3b3ad;
    --k-border: #42423e;
    --k-border-strong: #62625b;
    --k-link: #ffc766;
    --k-link-hover: #ffdda3;
    --k-info: #fead35;
    --k-success: #55c9a0;
    --k-danger: #ff7d76;
    --k-warning: #ffc263;
    --k-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.2);
    --k-focus: 0 0 0 3px rgba(254, 173, 53, 0.38);
}

html,
body {
    background: var(--k-bg);
    color: var(--k-text);
}

body,
button,
input,
select,
textarea {
    letter-spacing: 0 !important;
}

body,
.cust-help,
.main,
.main__content,
.wrapper,
.header,
.breadcrumbs,
.navlink,
.table-wrap,
.table-wrapper,
.ticket__body_block,
.reg__section,
.topbar,
.document,
.kontackt-footer {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

a,
.link {
    color: var(--k-link);
}

a:hover,
.link:hover {
    color: var(--k-link-hover);
}

:focus-visible {
    outline: 2px solid var(--k-brand) !important;
    outline-offset: 2px;
}

/* Shared theme control */
.brand-theme-toggle {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--k-border);
    border-radius: 6px;
    background: var(--k-surface-2);
    color: var(--k-text);
    cursor: pointer;
}

.brand-theme-toggle::before {
    content: "\263E";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
}

html[data-theme="dark"] .brand-theme-toggle::before {
    content: "\2600";
    font-size: 18px;
}

.brand-theme-toggle:hover {
    border-color: var(--k-brand);
    background: var(--k-brand-soft);
}

.brand-theme-toggle--floating {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    box-shadow: var(--k-shadow);
}

.brand-theme-toggle--mobile {
    margin-left: 8px;
}

/* Announcement and customer navigation */
.afo3h4 {
    box-sizing: border-box;
    padding: 6px 16px !important;
    border: 0 !important;
    border-bottom: 2px solid var(--k-brand) !important;
    background: #202020 !important;
    color: #f7f7f5 !important;
    font-size: 12px !important;
    line-height: 1.35;
    text-align: center;
    text-shadow: none !important;
}

.afo3h4:hover {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

.cust-help,
.cust-help .wrapper,
.cust-help .main {
    background: var(--k-bg) !important;
    color: var(--k-text);
}

.cust-help .header {
    border-bottom: 1px solid var(--k-border) !important;
    background: var(--k-surface) !important;
    box-shadow: 0 1px 0 rgba(32, 32, 32, 0.03);
}

.cust-help .header__inner {
    min-height: 68px;
    gap: 12px;
    padding: 8px 0 !important;
}

.cust-help .header__logo {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    overflow: hidden;
    background: url('/brand_assets/logo/kontackt-symbol.svg') center / 48px 48px no-repeat;
    white-space: nowrap;
    text-indent: -9999px;
}

.cust-help .header__inner .header__nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    margin: 0 !important;
}

.cust-help .header__inner .header__nav .nav-item:not(:first-child) {
    margin-left: 18px !important;
}

.cust-help .header__inner .header__nav .nav-item,
.cust-help .header__inner .header__nav .nav-item.text-only,
.cust-help .header__inner .header__nav .nav-item a {
    color: var(--k-text) !important;
    font-weight: 700;
}

.cust-help .header__inner .header__nav .nav-item a:hover {
    color: var(--k-warning) !important;
}

.cust-help .header .dropdown-select .label,
.cust-help .header .dropdown-select .label span,
.cust-help .header .dropdown-select .label .icon {
    color: var(--k-text) !important;
    fill: currentColor !important;
}

.breadcrumbs {
    border-bottom: 1px solid var(--k-border);
    background: var(--k-surface-2) !important;
}

.breadcrumbs__inner,
.breadcrumbs__inner a,
.breadcrumbs__inner .last {
    color: var(--k-muted) !important;
}

.breadcrumbs__inner a:hover {
    color: var(--k-link) !important;
}

.breadcrumbs__inner .icon {
    fill: var(--k-border-strong) !important;
}

.cust-help .main__content {
    background: var(--k-bg) !important;
    color: var(--k-text);
    padding-top: 34px;
    padding-bottom: 48px;
}

.cust-help .search__title,
.cust-help .select__title,
.cust-help .article__heading,
.cust-help .h-3,
.cust-help h1,
.cust-help h2,
.cust-help h3,
.cust-help h4,
.cust-help h5 {
    color: var(--k-text) !important;
}

.cust-help .search__title {
    font-size: 28px;
    line-height: 1.25;
}

.cust-help .select__title {
    margin-top: 32px;
    margin-bottom: 18px;
    font-size: 20px;
}

.cust-help .nav {
    gap: 16px 24px;
}

.cust-help .navlink,
.cust-help .preview,
.cust-help .topics,
.cust-help .article,
.cust-help .ticket__body_block,
.cust-help .ticket__params,
.cust-help .table-wrap,
.cust-help #forgot-modal {
    border: 1px solid var(--k-border);
    border-radius: 6px;
    background: var(--k-surface) !important;
    color: var(--k-text);
    box-shadow: var(--k-shadow);
}

.cust-help .navlink {
    min-height: 84px;
    box-shadow: var(--k-shadow) !important;
}

.cust-help .navlink:hover,
.cust-help .preview:hover {
    border-color: var(--k-brand);
    background: var(--k-surface-2) !important;
    box-shadow: 0 2px 4px rgba(32, 32, 32, 0.08) !important;
}

.cust-help .navlink .navlink__title,
.cust-help .preview .preview__title,
.cust-help .topics__title {
    color: var(--k-text) !important;
}

.cust-help .navlink .navlink__descr,
.cust-help .preview__text,
.cust-help .article-heading-tip {
    color: var(--k-muted) !important;
}

.cust-help .icon-in-circle,
.cust-help .navlink .icon-in-circle,
.cust-help .preview .icon-in-circle {
    border-color: var(--k-brand) !important;
    background: var(--k-brand) !important;
    color: #202020 !important;
}

.cust-help .icon-in-circle .icon,
.cust-help .navlink .icon-in-circle .icon,
.cust-help .preview .icon-in-circle .icon {
    fill: #202020 !important;
}

.cust-help .topics__list a,
.cust-help .ticket__body_block p > a,
.cust-help .article a {
    color: var(--k-link) !important;
}

/* Forms and controls */
.form-submit-ticket {
    border: 1px solid var(--k-border);
    border-radius: 6px;
    background: var(--k-surface) !important;
    box-shadow: var(--k-shadow);
}

.article__heading--form {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.form-group label,
.form-group .label,
.param label,
.param .label,
.checkbox-custom label,
.radio-custom label,
.section__heading {
    color: var(--k-text) !important;
    font-weight: 700;
}

.form input.form-control,
.form textarea.form-control,
.form select.form-control,
.selectize-input,
.dropdown:not(.right) .label,
.dropdown-select:not(.right) .label,
.dropdown:not(.right) label,
.dropdown-select:not(.right) label {
    border: 1px solid var(--k-border-strong) !important;
    border-radius: 4px !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
    box-shadow: none !important;
}

.form input.form-control::placeholder,
.form textarea.form-control::placeholder,
.selectize-input input::placeholder {
    color: var(--k-muted) !important;
}

.form input.form-control:hover,
.form textarea.form-control:hover,
.form select.form-control:hover,
.selectize-input:hover {
    border-color: var(--k-muted) !important;
}

.form input.form-control:focus,
.form textarea.form-control:focus,
.form select.form-control:focus,
.selectize-input.focus,
.selectize-input.input-active {
    border-color: var(--k-brand) !important;
    background: var(--k-surface) !important;
    box-shadow: var(--k-focus) !important;
}

.selectize-dropdown,
.dropdown .dropdown-list,
.dropdown-select .dropdown-list,
.datepicker,
.modal .modal__body,
.profile__menu {
    border: 1px solid var(--k-border) !important;
    border-radius: 4px !important;
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
    box-shadow: var(--k-shadow) !important;
}

.selectize-dropdown .option,
.selectize-dropdown .optgroup-header,
.dropdown .dropdown-list > li,
.dropdown-select .dropdown-list > li,
.dropdown .dropdown-list > li a,
.dropdown-select .dropdown-list > li a {
    color: var(--k-text) !important;
}

.selectize-dropdown .option.active,
.dropdown .dropdown-list > li:hover,
.dropdown-select .dropdown-list > li:hover {
    background: var(--k-brand) !important;
    color: #202020 !important;
}

.checkbox-custom [type="checkbox"]:checked + label::before,
.radio-custom [type="radio"]:checked + label::before,
.checkbox-custom [type="checkbox"]:not(:checked) + label::before,
.radio-custom [type="radio"]:not(:checked) + label::before {
    border-color: var(--k-border-strong) !important;
    background: var(--k-surface) !important;
}

.checkbox-custom [type="checkbox"]:checked + label::after,
.radio-custom [type="radio"]:checked + label::after {
    border-color: var(--k-brand) !important;
    background-color: var(--k-brand) !important;
}

.checkbox-custom [type="checkbox"]:checked + label,
.radio-custom [type="radio"]:checked + label {
    color: var(--k-text) !important;
}

.switch-checkbox input[type="checkbox"]:checked + .switch-checkbox__bullet {
    border-color: var(--k-brand-active) !important;
    background: var(--k-brand) !important;
}

.btn-full,
#cc-link,
.param.calendar .calendar--button button {
    border: 1px solid var(--k-brand-active) !important;
    border-radius: 4px !important;
    background: var(--k-brand) !important;
    color: #202020 !important;
    font-weight: 800 !important;
    box-shadow: none !important;
}

.btn-full:hover,
#cc-link:hover,
.param.calendar .calendar--button button:hover {
    border-color: var(--k-brand-active) !important;
    background: var(--k-brand-hover) !important;
    color: #202020 !important;
}

.btn--blue-border,
.btn-border,
.btn-transparent,
.btn.cancel {
    border: 1px solid var(--k-border-strong) !important;
    border-radius: 4px !important;
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
}

.btn--blue-border:hover,
.btn-border:hover,
.btn-transparent:hover,
.btn.cancel:hover {
    border-color: var(--k-brand) !important;
    background: var(--k-brand-soft) !important;
    color: var(--k-text) !important;
}

.captcha-block,
.form-group .form-control__error,
.alert,
.notification-bar.white {
    border-color: var(--k-border) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
}

.divider {
    border-color: var(--k-border) !important;
    background: var(--k-border) !important;
}

/* Rich text editor */
.tox.tox-tinymce {
    border-color: var(--k-border-strong) !important;
    border-radius: 4px !important;
    background: var(--k-surface) !important;
}

.tox .tox-editor-header,
.tox .tox-menubar,
.tox .tox-toolbar,
.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary,
.tox .tox-statusbar,
.tox .tox-dialog,
.tox .tox-dialog__header,
.tox .tox-dialog__body,
.tox .tox-dialog__footer,
.tox .tox-menu,
.tox .tox-collection__group {
    border-color: var(--k-border) !important;
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
    box-shadow: none !important;
}

.tox .tox-tbtn,
.tox .tox-mbtn,
.tox .tox-statusbar a,
.tox .tox-statusbar__path-item,
.tox .tox-dialog__title,
.tox .tox-label,
.tox .tox-collection__item,
.tox .tox-collection__item-label {
    color: var(--k-text) !important;
}

.tox .tox-tbtn svg,
.tox .tox-mbtn svg,
.tox .tox-collection__item-icon svg {
    fill: currentColor !important;
}

.tox .tox-tbtn:hover,
.tox .tox-mbtn:hover,
.tox .tox-collection__item--active,
.tox .tox-collection__item:hover {
    background: var(--k-brand-soft) !important;
    color: var(--k-text) !important;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover,
.tox .tox-mbtn--active,
.tox .tox-collection__item--state-enabled {
    background: var(--k-brand) !important;
    color: #202020 !important;
}

.tox .tox-textfield,
.tox .tox-textarea,
.tox .tox-selectfield select {
    border-color: var(--k-border-strong) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
}

.tox .tox-textfield:focus,
.tox .tox-textarea:focus,
.tox .tox-selectfield select:focus {
    border-color: var(--k-brand) !important;
    box-shadow: var(--k-focus) !important;
}

.tox .tox-button {
    border-color: var(--k-brand-active) !important;
    background: var(--k-brand) !important;
    color: #202020 !important;
}

.tox .tox-button--secondary {
    border-color: var(--k-border-strong) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
}

.tox .tox-edit-area__iframe {
    background: var(--k-surface) !important;
}

/* Tables, tickets, and framed work surfaces */
.table-wrap,
.table-wrapper,
.ticket__body_block,
.params--block,
.profile__wrapper,
.notifications__list,
.category__list,
.knowledge__list,
.knowledge__tabs_tab,
.article__body,
.article__detalies,
.tools__body,
.settings__body,
.reports__block,
.service-message,
.ticket__list,
.response__list {
    border-color: var(--k-border) !important;
    background-color: var(--k-surface) !important;
    color: var(--k-text);
    box-shadow: var(--k-shadow) !important;
}

.ticket__body_block.response {
    border-left: 3px solid var(--k-success) !important;
    background: var(--k-surface-2) !important;
}

.ticket__body_block h1,
.ticket__body_block h2,
.ticket__body_block h3,
.ticket__body_block .block--head .contact b,
.main__content :where(h1, h2, h3, h4, h5, h6) {
    color: var(--k-text) !important;
}

.ticket__body_block .block--head,
.ticket__body_block .block--head time,
.ticket__body_block .block--head .more,
.subtext,
.text-muted {
    color: var(--k-muted) !important;
}

.table-wrap,
.table-wrapper {
    overflow: auto;
    border: 1px solid var(--k-border);
    border-radius: 6px;
}

.table-wrap .table,
.table-wrapper .table,
.table-wrap table,
.table-wrapper table {
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
}

.table-wrap .table thead,
.table-wrapper .table thead,
.table-wrap thead,
.table-wrapper thead {
    border-bottom: 2px solid var(--k-brand) !important;
    background: var(--k-surface-3) !important;
}

.table-wrap .table thead th,
.table-wrapper .table thead th,
.table-wrap .table thead a,
.table-wrapper .table thead a {
    color: var(--k-text) !important;
}

html[data-theme="light"] .table-wrap .table thead .sort,
html[data-theme="light"] .table-wrapper .table thead .sort {
    color: var(--k-text) !important;
}

html[data-theme="light"] .table-wrap .table thead th .handle::before,
html[data-theme="light"] .table-wrapper .table thead th .handle::before {
    border-bottom-color: var(--k-muted) !important;
}

html[data-theme="light"] .table-wrap .table thead th .handle::after,
html[data-theme="light"] .table-wrapper .table thead th .handle::after {
    border-top-color: var(--k-muted) !important;
}

.table-wrap .table tbody tr,
.table-wrapper .table tbody tr,
.table-wrap tbody tr,
.table-wrapper tbody tr {
    border-color: var(--k-border) !important;
    background: var(--k-surface) !important;
}

.table-wrap .table tbody tr:nth-child(even),
.table-wrapper .table tbody tr:nth-child(even),
.table-wrap tbody tr:nth-child(even),
.table-wrapper tbody tr:nth-child(even) {
    background: var(--k-surface-2) !important;
}

.table-wrap .table tbody tr:hover,
.table-wrapper .table tbody tr:hover,
.table-wrap tbody tr:hover,
.table-wrapper tbody tr:hover {
    background: var(--k-brand-soft) !important;
}

.pagination__item.is-current .pagination__link,
.pagination__link:hover {
    border-color: var(--k-brand) !important;
    background: var(--k-brand) !important;
    color: #202020 !important;
}

/* Admin navigation and content */
.main-menu {
    border-right: 1px solid #353532;
    background: #202020 !important;
    color: #ccccca !important;
}

.navbar__logo {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    overflow: hidden;
    background: url('/brand_assets/logo/kontackt-symbol.svg') center / 36px 36px no-repeat;
    white-space: nowrap;
    text-indent: -9999px;
}

.main-menu .listitem,
.main-menu .listitem a,
.main-menu .listitem__caption {
    color: #ccccca;
}

.main-menu .listitem:hover,
.main-menu .listitem.submenu-is-opened {
    background: #2b2b2b !important;
}

.main-menu .listitem.current {
    border-left: 3px solid var(--k-brand);
    background: #303030 !important;
    color: #ffffff !important;
}

.main-menu .listitem.current a,
.main-menu .listitem.current .listitem__caption {
    color: #ffffff !important;
}

.main-menu .listitem.current .icon,
.main-menu .listitem:hover .icon {
    fill: var(--k-brand) !important;
}

.header:not(.cust-help .header) {
    border-bottom-color: var(--k-border) !important;
    background: var(--k-surface) !important;
    color: var(--k-text);
}

.header .header__left,
.header .header__right,
.header .profile__user,
.header .user__name,
.header .user__name p {
    color: var(--k-text) !important;
}

.header .header__right .brand-theme-toggle {
    margin-right: 12px;
}

.main,
.main__content {
    background-color: var(--k-bg) !important;
    color: var(--k-text);
}

.main__content {
    padding: 24px;
}

.main__content > h2,
.main__content > section > h2,
.main__content > article > h2 {
    color: var(--k-text) !important;
}

.main__content :where(p, li, td, th, label, .value, .description) {
    border-color: var(--k-border);
}

.icon-add,
.icon-edit,
.icon-edit-ticket,
.icon-search,
.icon-actions {
    fill: var(--k-link) !important;
}

html[data-theme="dark"] .icon-chevron-right,
html[data-theme="dark"] .icon-chevron-left,
html[data-theme="dark"] .icon-chevron-down,
html[data-theme="dark"] .icon-chevron-up,
html[data-theme="dark"] .icon-eye-close,
html[data-theme="dark"] .icon-eye-open,
html[data-theme="dark"] .icon-close {
    fill: var(--k-muted);
}

/* Dark-mode completion for legacy admin components */
html[data-theme="dark"] .filters__listing .btn:not(.is-bookmarks):not(.is-due-soon):not(.is-overdue) {
    border-color: var(--k-border-strong) !important;
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .filters__listing .btn:not(.is-bookmarks):not(.is-due-soon):not(.is-overdue):hover {
    border-color: var(--k-brand) !important;
    background: var(--k-brand-soft) !important;
}

html[data-theme="dark"] .filters__listing .btn.is-selected:not(.is-bookmarks):not(.is-due-soon):not(.is-overdue) {
    border-color: var(--k-brand-active) !important;
    background: var(--k-brand) !important;
    color: #202020 !important;
}

html[data-theme="dark"] .filters__listing .btn.is-bookmarks {
    border-color: #3f9b73 !important;
    background: #1d382d !important;
    color: #8ee3bd !important;
}

html[data-theme="dark"] .filters__listing .btn.is-bookmarks:hover,
html[data-theme="dark"] .filters__listing .btn.is-bookmarks.is-selected {
    background: #265640 !important;
    color: #dff8ed !important;
}

html[data-theme="dark"] .filters__listing .btn.is-due-soon {
    border-color: #a77b20 !important;
    background: #3a321e !important;
    color: #ffd27a !important;
}

html[data-theme="dark"] .filters__listing .btn.is-due-soon:hover,
html[data-theme="dark"] .filters__listing .btn.is-due-soon.is-selected {
    background: #5b4922 !important;
    color: #fff0c2 !important;
}

html[data-theme="dark"] .filters__listing .btn.is-overdue {
    border-color: #c95b59 !important;
    background: #3a2325 !important;
    color: #ff9993 !important;
}

html[data-theme="dark"] .filters__listing .btn.is-overdue:hover,
html[data-theme="dark"] .filters__listing .btn.is-overdue.is-selected {
    background: #642f31 !important;
    color: #ffe2df !important;
}

html[data-theme="dark"] .notification,
html[data-theme="dark"] .notification-flash,
html[data-theme="dark"] .users-online {
    border: 1px solid var(--k-border) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
    box-shadow: var(--k-shadow) !important;
}

html[data-theme="dark"] .notification.red {
    background: #3a2325 !important;
}

html[data-theme="dark"] .notification.orange {
    background: #3a321e !important;
}

html[data-theme="dark"] .notification.green {
    background: #1d382d !important;
}

html[data-theme="dark"] .notification.blue {
    background: var(--k-brand-soft) !important;
}

html[data-theme="dark"] .notification b,
html[data-theme="dark"] .notification strong,
html[data-theme="dark"] .notification span,
html[data-theme="dark"] .notification p,
html[data-theme="dark"] .notification-flash .notification--title {
    color: var(--k-text) !important;
}

html[data-theme="dark"] .notification a,
html[data-theme="dark"] .notification-flash a {
    color: var(--k-link) !important;
}

html[data-theme="dark"] .notification > .icon,
html[data-theme="dark"] .users-online .icon {
    fill: var(--k-muted) !important;
}

html[data-theme="dark"] .notification-flash .notification--text {
    color: var(--k-muted) !important;
}

html[data-theme="dark"] .notification-bar.white .notification--text {
    color: var(--k-text) !important;
}

html[data-theme="dark"] .notification-bar.white .btn {
    border-color: var(--k-border-strong) !important;
    color: var(--k-link) !important;
}

html[data-theme="dark"] .form__search,
html[data-theme="dark"] .form__search .form__search_type,
html[data-theme="dark"] .form__search .form__search_results,
html[data-theme="dark"] .right-bar .right-bar__body,
html[data-theme="dark"] .right-bar .right-bar__body > h3,
html[data-theme="dark"] .right-bar .right-bar__body .right-bar__footer::before,
html[data-theme="dark"] .ticket__params .params--bar,
html[data-theme="dark"] .ticket__params .params--block,
html[data-theme="dark"] .main__content.emails .email__tabs,
html[data-theme="dark"] .main__content.emails .email__tabs .email__list .email__list_article,
html[data-theme="dark"] .email__list_descr .form,
html[data-theme="dark"] .new-message,
html[data-theme="dark"] .main__content.reports .reports__table,
html[data-theme="dark"] .main__content.settings .settings__status,
html[data-theme="dark"] .main__content.search .templates__list,
html[data-theme="dark"] .header .profile__item.profile__item--notification .notification-list,
html[data-theme="dark"] .header .profile__user .profile__menu,
html[data-theme="dark"] .tooltype .tooltype__content .tooltype__wrapper,
html[data-theme="dark"] .datepicker .datepicker--content,
html[data-theme="dark"] .datepicker .datepicker--nav,
html[data-theme="dark"] .loading-message {
    border-color: var(--k-border) !important;
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .right-bar.filter-list .filter-list__section .section--title,
html[data-theme="dark"] .right-bar.advanced-search .right-bar__body .search__section .search__section_title,
html[data-theme="dark"] .step-bar,
html[data-theme="dark"] .main__content.tickets .table .customer-count,
html[data-theme="dark"] .main__content.tickets.actions .tickets__mobile_head [data-action="ticket-mobile-actions"],
html[data-theme="dark"] .ticket__body_block .block--attach-list div,
html[data-theme="dark"] .main__content.knowledge.article .block--attach-list div,
html[data-theme="dark"] .main__content.search .article__list li .article__list_info .category span {
    border-color: var(--k-border) !important;
    background: var(--k-surface-3) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .dropzone {
    border-color: var(--k-border-strong) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-muted) !important;
}

html[data-theme="dark"] .dropzone.dz-drag-hover {
    border-color: var(--k-brand) !important;
    background: var(--k-brand-soft) !important;
}

html[data-theme="dark"] .dropzone > .file-row {
    border-color: var(--k-border) !important;
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .dropzone .attachment-row .upload-progress > div {
    border-color: var(--k-border-strong) !important;
    background: var(--k-surface-3) !important;
}

html[data-theme="dark"] .dropzone .attachment-row svg {
    fill: var(--k-muted) !important;
}

html[data-theme="dark"] .dropzone .attachment-row svg:hover {
    fill: var(--k-link) !important;
}

html[data-theme="dark"] .main__content.templates .ticket__list li:not(.deleted):nth-child(odd),
html[data-theme="dark"] .main__content.templates .response__list li:not(.deleted):nth-child(odd),
html[data-theme="dark"] .main__content.knowledge.category .category__list .category__list_table table tr:nth-child(odd),
html[data-theme="dark"] .main__content.emails .email__tabs .email__list .list--item,
html[data-theme="dark"] .main__content.notifications .notifications__list li:nth-child(odd),
html[data-theme="dark"] .main__content.search .templates__list li:not(.deleted):nth-child(odd),
html[data-theme="dark"] .dropzone > .file-row:nth-child(even) {
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .main__content.knowledge.category .category__list .category__list_table table tr:hover,
html[data-theme="dark"] .main__content.emails .email__tabs .email__list .list--item:hover,
html[data-theme="dark"] .header .profile__item.profile__item--notification .notification-list ul li:hover {
    background: var(--k-brand-soft) !important;
}

html[data-theme="dark"] .main__content a:not(.btn),
html[data-theme="dark"] .right-bar a:not(.btn),
html[data-theme="dark"] .header .profile__item.profile__item--notification .notification-list a {
    color: var(--k-link) !important;
}

html[data-theme="dark"] .main__content a:not(.btn):hover,
html[data-theme="dark"] .right-bar a:not(.btn):hover,
html[data-theme="dark"] .header .profile__item.profile__item--notification .notification-list a:hover {
    color: var(--k-link-hover) !important;
}

html[data-theme="dark"] .ticket__body_block .block--description,
html[data-theme="dark"] .ticket__body_block .block--description * {
    color: var(--k-text) !important;
}

html[data-theme="dark"] .ticket__body_block .block--description[style*="background" i],
html[data-theme="dark"] .ticket__body_block .block--description [style*="background" i],
html[data-theme="dark"] .ticket__body_block .block--description[bgcolor],
html[data-theme="dark"] .ticket__body_block .block--description [bgcolor] {
    background: transparent !important;
}

html[data-theme="dark"] .ticket__body_block .block--description a {
    color: var(--k-link) !important;
}

html[data-theme="dark"] .ticket__body_block .block--description pre,
html[data-theme="dark"] .ticket__body_block .block--description code {
    background: var(--k-surface-3) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .ticket__body_block .block--notes .note {
    border-color: #705b2b !important;
    background: var(--k-brand-soft) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .ticket__body_block .block--notes .note .note__head .name,
html[data-theme="dark"] .ticket__body_block .block--notes .note .note__head .name b,
html[data-theme="dark"] .ticket__body_block .block--notes .note .note__description {
    color: var(--k-text) !important;
}

html[data-theme="dark"] .ticket__body_block .block--head .contact > span,
html[data-theme="dark"] .ticket__body_block .block--head .contact .dropdown .dropdown-list li a,
html[data-theme="dark"] .ticket__body_block .block--uploads a,
html[data-theme="dark"] .ticket__body_block .block--submit .submit-us,
html[data-theme="dark"] .ticket__body_block .block--submit .submit-us span,
html[data-theme="dark"] .ticket__replies .ticket__replies_link,
html[data-theme="dark"] .ticket__params .params--bar a {
    color: var(--k-link) !important;
}

html[data-theme="dark"] .ticket__body_block .block--checkboxs .checkbox-custom label,
html[data-theme="dark"] .ticket__body_block .block--checkboxs .checkbox-custom input[type="checkbox"]:checked + label,
html[data-theme="dark"] .ticket__body_block .block--head .contact .dropdown .dropdown-list li .value,
html[data-theme="dark"] .ticket__params .params--block .row .value,
html[data-theme="dark"] .right-bar.ticket-create .step-item,
html[data-theme="dark"] .form__search .form__search_results .results--list li,
html[data-theme="dark"] .main__content.knowledge.article .article__body .article__description,
html[data-theme="dark"] .main__content.search .article__list li .article__list_description,
html[data-theme="dark"] .select__title,
html[data-theme="dark"] .select__title-alt {
    color: var(--k-text) !important;
}

html[data-theme="dark"] .ticket__params .params--block .row .title,
html[data-theme="dark"] .ticket__body_block .block--head .contact .dropdown .dropdown-list li .title,
html[data-theme="dark"] .main__content.emails .email__tabs .email__list .list--item .text,
html[data-theme="dark"] .main__content.notifications .notifications__list li time {
    color: var(--k-muted) !important;
}

html[data-theme="dark"] .ticket__params .params--bar .dropdown {
    border-color: var(--k-border) !important;
}

html[data-theme="dark"] .ticket__body_block .block--message,
html[data-theme="dark"] .ticket__body_block .block--message textarea {
    border-color: var(--k-border-strong) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
}

html[data-theme="dark"] .open {
    color: #ff7d76 !important;
}

html[data-theme="dark"] .waitingreply {
    color: #ffc263 !important;
}

html[data-theme="dark"] .replied {
    color: #fead35 !important;
}

html[data-theme="dark"] .resolved {
    color: #55c9a0 !important;
}

html[data-theme="dark"] .inprogress {
    color: #c39aff !important;
}

html[data-theme="dark"] .onhold {
    color: #ff8fc6 !important;
}

html[data-theme="dark"] .allbutresolved,
html[data-theme="dark"] .show_tickets .checkbox-custom label span[style*="color"],
html[data-theme="dark"] .table.ticket-list td span[style*="color"] {
    color: var(--k-text) !important;
}

/* Admin login */
.wrapper.login,
.wrapper.login .main,
.reg__wrap {
    min-height: 100vh;
    background: var(--k-bg) !important;
}

.reg__image,
.reg__image .bg-absolute {
    overflow: hidden;
    background: #202020 !important;
}

.reg__image .bg-absolute img {
    opacity: 0;
}

.reg__image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: url('/brand_assets/logo/kontackt-symbol.svg') center / min(28vw, 240px) auto no-repeat;
}

.reg__section {
    display: flex;
    align-items: center;
    border-left: 1px solid var(--k-border);
    background: var(--k-surface) !important;
    box-shadow: none !important;
}

.reg__box {
    max-width: 360px !important;
}

.reg__heading {
    margin-bottom: 12px;
    color: var(--k-text) !important;
    font-size: 26px !important;
    line-height: 1.2 !important;
}

.reg__footer {
    padding-top: 24px;
    border-top: 1px solid var(--k-border);
}

/* Server error page */
body.error-page {
    box-sizing: border-box;
    display: flex;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    font-family: Arial, Helvetica, sans-serif;
}

.error-page__content {
    width: min(100%, 620px);
    margin: auto;
    text-align: center;
}

.error-page .brand {
    display: inline-block;
    margin-bottom: 48px;
}

.error-page .brand img {
    display: block;
    width: 96px;
    height: auto;
}

.error-page__code {
    margin: 0 0 8px;
    color: var(--k-warning);
    font-size: 16px;
    font-weight: 700;
}

.error-page h1 {
    margin: 0 0 16px;
    color: var(--k-text);
    font-size: 40px;
    line-height: 1.15;
}

.error-page__message {
    margin: 0 auto 32px;
    color: var(--k-muted);
    font-size: 17px;
    line-height: 1.6;
}

.error-page__action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 1px solid var(--k-brand-active);
    border-radius: 6px;
    background: var(--k-brand);
    color: #202020 !important;
    font-weight: 700;
    text-decoration: none;
}

.error-page__action:hover {
    background: var(--k-brand-hover);
}

/* Legal pages */
.topbar {
    border-bottom: 1px solid var(--k-border) !important;
    background: var(--k-surface) !important;
}

.topbar__inner {
    gap: 16px !important;
}

.brand {
    color: var(--k-text) !important;
}

.topbar .brand img {
    display: block;
    width: 44px !important;
    height: 44px !important;
    object-fit: contain;
}

.legal-nav a {
    color: var(--k-muted) !important;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
    border-bottom-color: var(--k-brand) !important;
    color: var(--k-text) !important;
}

.hero {
    border-bottom-color: var(--k-brand) !important;
    background: #202020 !important;
    color: #f7f7f5 !important;
}

.hero h1,
.hero__intro,
.hero__meta,
.hero .eyebrow {
    color: #f7f7f5 !important;
}

.hero .eyebrow {
    color: var(--k-brand) !important;
}

.document {
    background: var(--k-surface) !important;
    color: var(--k-text) !important;
}

.document h2,
.document h3,
.document h4,
.contents summary {
    color: var(--k-text) !important;
}

.document p,
.document li,
.document td,
.document th,
.document .hero__meta {
    color: var(--k-muted);
}

html[data-theme="dark"] .contents a {
    color: var(--k-muted) !important;
}

html[data-theme="dark"] .contents a:hover,
html[data-theme="dark"] .contents a:focus-visible {
    color: var(--k-link) !important;
}

html[data-theme="dark"] .summary strong {
    color: var(--k-text) !important;
}

html[data-theme="dark"] .contents a {
    color: var(--k-muted) !important;
}

html[data-theme="dark"] .contents a:hover,
html[data-theme="dark"] .contents a:focus-visible {
    color: var(--k-link) !important;
}

html[data-theme="dark"] .summary strong {
    color: var(--k-text) !important;
}

.contents,
.summary,
.contact-panel,
.table-wrap {
    border-color: var(--k-border) !important;
}

.summary,
.contact-panel {
    border-left-color: var(--k-brand) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
}

.site-footer {
    border-top-color: var(--k-border) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-muted) !important;
}

/* Custom customer footer appears after this stylesheet, so these stay important. */
.kontackt-footer {
    border-top: 1px solid var(--k-border) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-muted) !important;
}

.kontackt-footer .footer-bottom {
    border-top-color: var(--k-border) !important;
    color: var(--k-muted) !important;
}

.kontackt-footer p {
    color: var(--k-muted) !important;
}

.kontackt-footer a {
    color: var(--k-link) !important;
}

.kontackt-footer .fafGdsge:hover {
    border-color: var(--k-brand) !important;
    color: var(--k-link-hover) !important;
}

#iframePopup {
    background: var(--k-surface) !important;
}

.popup-iframe-header {
    border-bottom-color: var(--k-border) !important;
    background: var(--k-surface-2) !important;
    color: var(--k-text) !important;
}

@media screen and (max-width: 899px) {
    .main__content {
        padding: 16px;
    }

    .reg__image {
        display: none !important;
    }

    .reg__section {
        width: 100%;
        max-width: none;
        padding: 84px 20px 36px !important;
        border-left: 0;
    }

    .reg__box::before {
        content: "";
        display: block;
        width: 48px;
        height: 48px;
        margin-bottom: 28px;
        background: url('/brand_assets/logo/kontackt-symbol.svg') center / 48px 48px no-repeat;
    }

    .header__mobile .navbar__logo {
        width: 34px;
        height: 34px;
        background-size: 34px 34px;
    }
}

@media screen and (max-width: 640px) {
    .cust-help .header__inner {
        gap: 8px;
    }

    .cust-help .header__logo {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        background-size: 40px 40px;
    }

    .cust-help .header__inner .header__nav .nav-item:not(:first-child) {
        margin-left: 12px !important;
    }

    .cust-help .header__inner .header__nav .nav-item,
    .cust-help .header__inner .header__nav .nav-item a {
        font-size: 13px;
    }

    .brand-theme-toggle {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .cust-help .main__content {
        padding-top: 24px;
        padding-bottom: 36px;
    }

    .cust-help .search__title {
        font-size: 24px;
    }

    .cust-help .nav {
        gap: 14px;
    }

    .form-submit-ticket {
        padding: 18px 12px !important;
    }

    .topbar__inner {
        width: calc(100% - 24px) !important;
        gap: 10px !important;
    }

    .topbar .brand img {
        width: 40px !important;
        height: 40px !important;
    }

    .error-page .brand img {
        width: 80px;
    }

    .legal-nav {
        gap: 12px !important;
    }

    .legal-nav a {
        font-size: 13px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
