/**
 * SourceBans++ dark blue theme.
 *
 * This file is loaded after the core and vendor stylesheets. Keeping all
 * visual overrides here avoids changes to SourceBans, Smarty and JavaScript
 * logic and makes the theme easy to remove or adjust later.
 */

:root {
    --sb-bg: #06111f;
    --sb-bg-deep: #030b15;
    --sb-surface: #0d1d30;
    --sb-surface-2: #12263d;
    --sb-surface-3: #18314d;
    --sb-surface-hover: #1d3a59;
    --sb-disabled-row: #17283a;
    --sb-border: #29445f;
    --sb-border-strong: #385b79;
    --sb-text: #dce8f5;
    --sb-heading: #f4f8fc;
    --sb-muted: #93abc2;
    --sb-faint: #718aa3;
    --sb-accent: #58adf7;
    --sb-accent-hover: #80c4ff;
    --sb-accent-deep: #1769aa;
    --sb-header: #0b2c50;
    --sb-header-2: #10406f;
    --sb-shadow: rgba(0, 0, 0, 0.38);
    --sb-radius-lg: 12px;
    --sb-radius-md: 9px;
    --sb-radius-sm: 7px;
}

/* Foundation */
html {
    color-scheme: dark;
    scrollbar-color: var(--sb-border-strong) var(--sb-bg-deep);
}

html,
body {
    background-color: var(--sb-bg) !important;
    color: var(--sb-text) !important;
}

body {
    background-image:
        radial-gradient(circle at 85% 0, rgba(35, 101, 157, 0.18), transparent 38%),
        linear-gradient(145deg, var(--sb-bg) 0%, var(--sb-bg-deep) 100%) !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

::selection {
    background: #276da7;
    color: #ffffff;
}

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background: var(--sb-bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--sb-border-strong);
    border: 2px solid var(--sb-bg-deep);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: #497492;
}

a,
.footer_link {
    color: var(--sb-accent);
}

a:hover,
a:focus,
.footer_link:hover,
.footer_link:focus {
    color: var(--sb-accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--sb-accent) !important;
    outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
legend,
dt,
.block-header h2,
.card .card-header h2,
.panel-title,
.modal-title,
.lv-title {
    color: var(--sb-heading);
}

small,
.small,
.text-muted,
.help-block,
.dropdown-header,
.listview .lv-item .lv-small,
.card .card-header h2 small,
.lvh-label {
    color: var(--sb-muted) !important;
}

.c-black {
    color: var(--sb-heading) !important;
}

.c-gray,
.c-bluegray {
    color: #a7bdd2 !important;
}

.bgm-white {
    background-color: var(--sb-surface) !important;
}

hr,
legend,
blockquote {
    border-color: var(--sb-border);
}

mark {
    background: #235f91;
    color: #ffffff;
}

code,
kbd,
pre,
samp {
    color: #c7e5ff;
    background-color: #081522;
    border-color: var(--sb-border);
}

/* Header and navigation */
#header {
    background-color: var(--sb-header) !important;
    background-image: linear-gradient(110deg, var(--sb-header), var(--sb-header-2)) !important;
    border-bottom: 1px solid rgba(119, 185, 238, 0.2);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
}

#header .logo a,
#header .top-menu > li > a,
#header .tm-icon {
    color: #ffffff;
}

#header .top-menu > li > a:hover,
#header .top-menu > li.open > a {
    background-color: rgba(255, 255, 255, 0.1);
}

#menu-trigger .line-wrap .line {
    background-color: #ffffff;
}

#top-search-wrap {
    background: var(--sb-surface-2);
    border-bottom: 1px solid var(--sb-border);
}

#top-search-wrap input[type="text"] {
    background-color: var(--sb-surface-3);
    color: var(--sb-text);
}

#top-search-wrap #top-search-close:hover {
    background-color: var(--sb-surface-hover);
}

.sidebar,
#sidebar,
#chat {
    background: var(--sb-surface) !important;
    color: var(--sb-text);
    border-color: var(--sb-border);
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.32);
}

#chat {
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.32);
}

.profile-menu > a {
    background-color: #0b2744;
    background-image:
        linear-gradient(rgba(4, 18, 33, 0.38), rgba(4, 18, 33, 0.7)),
        url(../img/profile-menu.png) !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.profile-menu > a .profile-pic > img {
    border-color: rgba(191, 224, 250, 0.35);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.profile-menu > a .profile-info {
    background: rgba(3, 15, 28, 0.72);
    color: #ffffff;
}

.profile-menu .main-menu {
    border-bottom-color: var(--sb-border);
}

.main-menu > li > a,
.sub-menu ul > li > a {
    color: #bfd0e1;
}

.main-menu > li > a:hover,
.main-menu > li.active > a,
.sub-menu ul > li > a.active,
.sub-menu ul > li > a:hover {
    color: #ffffff;
    background-color: var(--sb-surface-3);
}

.main-menu > li.active > a {
    box-shadow: inset 3px 0 0 var(--sb-accent);
}

.main-menu > li > a > i,
.sub-menu > a:before,
.sub-menu > a:after {
    color: #8fc6f1;
}

.sub-menu ul > li ul {
    background-color: #0a1929;
}

#footer,
#footer .f-menu > li,
#footer .f-menu > li > a {
    color: var(--sb-muted);
}

/* Main surfaces */
.card,
.panel,
.well,
.jumbotron,
.list-group-item,
.thumbnail,
.lc-block,
.four-zero-content,
#best-selling,
#pie-charts,
.t-view,
.c-timeline .tab-nav {
    background-color: var(--sb-surface);
    color: var(--sb-text);
    border-color: var(--sb-border);
}

.card {
    border: 1px solid rgba(83, 121, 154, 0.34);
    box-shadow: 0 8px 24px var(--sb-shadow);
}

.card .card-header.ch-alt:not([class*="bgm-"]),
.panel-default > .panel-heading,
.panel-footer,
.well,
.jumbotron {
    background-color: var(--sb-surface-2);
    border-color: var(--sb-border);
}

.card .card-header.ch-alt:not([class*="bgm-"]) {
    border-bottom: 1px solid var(--sb-border);
}

.panel-heading,
.panel-footer,
.panel-group .panel-heading + .panel-collapse > .panel-body,
.panel-group .panel-heading + .panel-collapse > .list-group,
.list-group-item,
.thumbnail,
.img-thumbnail {
    border-color: var(--sb-border);
}

a.list-group-item,
button.list-group-item,
.list-group-item-heading,
.thumbnail .caption {
    color: var(--sb-text);
}

a.list-group-item:hover,
a.list-group-item:focus,
button.list-group-item:hover,
button.list-group-item:focus {
    background-color: var(--sb-surface-hover);
    color: #ffffff;
}

.list-group-item.disabled,
.list-group-item.disabled:hover,
.list-group-item.disabled:focus {
    background-color: var(--sb-disabled-row);
    color: var(--sb-faint);
}

/* Rounded component geometry. Children receive matching corner radii instead
 * of clipping the whole component, so dropdowns and floating actions remain
 * fully visible. */
.card,
.panel,
.well,
.jumbotron,
.breadcrumb,
.modal-content,
.modal .modal-content,
.sweet-alert,
.popover,
.dropdown-menu,
.bootstrap-select .dropdown-menu,
.twitter-typeahead .tt-menu,
.list-group,
.thumbnail,
.img-thumbnail,
.lc-block,
.four-zero-content,
#best-selling,
#pie-charts,
.t-view,
.c-timeline .tab-nav,
.mini-charts-item,
.contacts .c-item,
.fc,
.note-editor.note-frame,
div.contextmenu,
.contextmenu,
.chosen-container .chosen-drop,
.file-preview,
.file-drop-zone,
.file-preview-frame,
.fileinput .fileinput-preview {
    border-radius: var(--sb-radius-lg);
}

#sidebar {
    border-radius: 0 var(--sb-radius-lg) var(--sb-radius-lg) 0;
}

#chat {
    border-radius: var(--sb-radius-lg) 0 0 var(--sb-radius-lg);
}

#sidebar .profile-menu > a {
    border-top-right-radius: var(--sb-radius-lg);
}

.card > .card-header:first-child,
.card > .card-body:first-child,
.card > .list-group:first-child,
.card > div.table-responsive:first-child {
    border-top-left-radius: calc(var(--sb-radius-lg) - 1px);
    border-top-right-radius: calc(var(--sb-radius-lg) - 1px);
}

.card > .card-header:last-child,
.card > .card-body:last-child,
.card > .list-group:last-child,
.card > div.table-responsive:last-child {
    border-bottom-right-radius: calc(var(--sb-radius-lg) - 1px);
    border-bottom-left-radius: calc(var(--sb-radius-lg) - 1px);
}

.panel > :first-child,
.modal-content > :first-child,
.sweet-alert > :first-child {
    border-top-left-radius: calc(var(--sb-radius-lg) - 1px);
    border-top-right-radius: calc(var(--sb-radius-lg) - 1px);
}

.panel > :last-child,
.modal-content > :last-child,
.sweet-alert > :last-child {
    border-bottom-right-radius: calc(var(--sb-radius-lg) - 1px);
    border-bottom-left-radius: calc(var(--sb-radius-lg) - 1px);
}

.list-group-item:first-child,
.dropdown-menu > li:first-child > a,
.dropdown-menu > li:first-child > button {
    border-top-left-radius: var(--sb-radius-md);
    border-top-right-radius: var(--sb-radius-md);
}

.list-group-item:last-child,
.dropdown-menu > li:last-child > a,
.dropdown-menu > li:last-child > button {
    border-bottom-right-radius: var(--sb-radius-md);
    border-bottom-left-radius: var(--sb-radius-md);
}

div.table-responsive,
.card-body.table-responsive,
.alert,
.note-toolbar,
.note-statusbar {
    border-radius: var(--sb-radius-md);
}

.btn,
.button-Submit,
input[type="file"]::file-selector-button {
    border-radius: var(--sb-radius-sm);
}

.btn-float,
.btn-icon,
.actions > li > a,
.pagination > li > a,
.pagination > li > span {
    border-radius: 50%;
}

.actions > li > a > i,
.actions > a > i,
.close {
    color: var(--sb-muted);
    text-shadow: none;
}

.actions > li > a:hover > i,
.actions > a:hover > i,
.close:hover,
.close:focus {
    color: #ffffff;
}

/* Lists, dropdowns and context menus */
.dropdown-menu,
.bootstrap-select .dropdown-menu,
.twitter-typeahead .tt-menu {
    background-color: var(--sb-surface-2);
    color: var(--sb-text);
    border: 1px solid var(--sb-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.48);
}

.dropdown-menu:not([class*="bgm-"]) > li > a,
.dropdown-menu > li > a,
.bootstrap-select .dropdown-menu > li > a,
.bootgrid-header .dropdown-menu .dropdown-item,
.bootgrid-footer .dropdown-menu .dropdown-item {
    color: var(--sb-text);
}

.dropdown-menu:not([class*="bgm-"]) > li > a:hover,
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus,
.bootstrap-select .dropdown-menu > li > a:hover,
.bootstrap-select .dropdown-menu > li > a:focus,
.bootgrid-header .dropdown-menu .dropdown-item:hover,
.bootgrid-footer .dropdown-menu .dropdown-item:hover {
    background-color: var(--sb-surface-hover) !important;
    color: #ffffff;
}

.dropdown-menu .divider {
    background-color: var(--sb-border);
}

.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
    color: var(--sb-faint);
    background-color: transparent !important;
}

.listview .lv-item {
    color: var(--sb-text);
}

.listview.lv-lg .lv-item:hover,
.listview a.lv-item:hover {
    background-color: var(--sb-surface-hover);
}

.listview.lv-bordered .lv-item:not(:last-child),
.lv-footer,
.lv-pagination {
    border-color: var(--sb-border);
}

.listview .lv-attrs > li:not(.info):not(.primary):not(.warning):not(.danger) {
    background: var(--sb-surface-3);
    color: var(--sb-text);
    border-color: var(--sb-border-strong);
}

a.lv-footer:hover {
    color: var(--sb-accent-hover);
}

div.contextmenu,
.contextmenu {
    background: var(--sb-surface-2);
    border-color: var(--sb-border-strong);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.contextmenu a {
    color: var(--sb-text);
}

.contextmenu a:hover {
    background-color: var(--sb-surface-hover);
}

.contextmenu a.disabled,
.contextmenu a.disabled:hover {
    background-color: transparent;
    color: var(--sb-faint);
}

.contextmenu .separator {
    background: var(--sb-border-strong);
    border-bottom-color: var(--sb-border);
}

.contextmenu .head {
    background: var(--sb-header);
    color: #ffffff;
}

/* Tables */
table,
.table,
.table .table {
    background-color: var(--sb-surface);
    color: var(--sb-text);
}

.table > thead > tr > th {
    background-color: var(--sb-surface-2);
    color: var(--sb-heading);
    border-color: var(--sb-border);
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td,
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border-color: var(--sb-border);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--sb-surface-2);
}

.table-hover > tbody > tr:hover,
.table-striped > tbody > tr:hover {
    background-color: var(--sb-surface-hover);
}

.table > tbody > tr.active > td,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > td,
.table > tfoot > tr.active > th {
    background-color: #3c3819 !important;
    color: #fff1a8;
}

.table > tbody > tr.success > td,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > td,
.table > tfoot > tr.success > th {
    background-color: #143b2c !important;
    color: #c2f5d5;
}

.table > tbody > tr.info > td,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > td,
.table > tfoot > tr.info > th {
    background-color: #123852 !important;
    color: #c5e9ff;
}

.table > tbody > tr.warning > td,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > td,
.table > tfoot > tr.warning > th {
    background-color: #493616 !important;
    color: #ffe1a0;
}

.table > tbody > tr.danger > td,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > td,
.table > tfoot > tr.danger > th {
    background-color: #4a2028 !important;
    color: #ffc8ce;
}

.table-responsive {
    border-color: var(--sb-border);
}

.bootgrid-table td.loading,
.bootgrid-table td.no-results {
    background: var(--sb-surface) !important;
    color: var(--sb-muted);
}

.bootgrid-footer .infoBar,
.bootgrid-header .search {
    color: var(--sb-muted);
}

.bootgrid-header .actions .btn-group .dropdown-menu .dropdown-item:hover {
    background-color: var(--sb-surface-hover) !important;
}

.command-edit,
.command-delete {
    background: var(--sb-surface-2);
}

/* Forms and controls */
.form-control,
.form-control:focus,
textarea.form-control,
select.form-control {
    background-color: transparent;
    color: var(--sb-text);
    border-color: var(--sb-border-strong);
}

.form-control:focus {
    border-color: var(--sb-accent);
    box-shadow: 0 1px 0 var(--sb-accent) !important;
}

.form-control::-moz-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: var(--sb-faint);
    opacity: 1;
}

.form-control:-ms-input-placeholder,
input:-ms-input-placeholder,
textarea:-ms-input-placeholder,
.form-control::-webkit-input-placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: var(--sb-faint);
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
    background-color: var(--sb-disabled-row) !important;
    color: var(--sb-muted);
    opacity: 1;
}

select,
option,
optgroup {
    background-color: var(--sb-surface-2);
    color: var(--sb-text);
}

input[type="file"] {
    color: var(--sb-muted);
}

input[type="file"]::file-selector-button {
    background: var(--sb-surface-3);
    color: var(--sb-text);
    border: 1px solid var(--sb-border-strong);
    border-radius: 2px;
    padding: 6px 10px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--sb-text);
    -webkit-box-shadow: 0 0 0 1000px var(--sb-surface-2) inset !important;
    caret-color: var(--sb-text);
}

.input-group-addon {
    background-color: transparent;
    color: var(--sb-muted);
    border-color: var(--sb-border-strong);
}

.fg-line:after {
    background: var(--sb-accent);
}

.checkbox .input-helper:before,
.radio .input-helper:before {
    border-color: var(--sb-border-strong);
}

.checkbox .input-helper:after {
    border-bottom-color: var(--sb-accent);
    border-left-color: var(--sb-accent);
}

.radio .input-helper:after {
    background: var(--sb-accent);
}

.toggle-switch .ts-helper {
    background: #40566b;
}

.toggle-switch .ts-helper:before {
    background: #c8d8e7;
}

.toggle-switch:not([data-ts-color]) input:not(:disabled):checked + .ts-helper {
    background: rgba(88, 173, 247, 0.45);
}

.toggle-switch:not([data-ts-color]) input:not(:disabled):checked + .ts-helper:before {
    background: var(--sb-accent);
}

html:not(.ie9) .select:before,
.bootstrap-select > .btn-default:before {
    background-color: var(--sb-surface) !important;
}

.bootstrap-select > .btn-default,
.bootstrap-select > .btn-default:focus,
.bootstrap-select > .btn-default:hover {
    color: var(--sb-text);
}

.bootstrap-select .bs-searchbox,
.chosen-container-single .chosen-search {
    background: var(--sb-surface-3);
    color: var(--sb-text);
}

.bootstrap-select .bs-searchbox input,
.chosen-container-single .chosen-search input[type="text"] {
    color: var(--sb-text);
}

.chosen-container .chosen-drop {
    background: var(--sb-surface-2);
    color: var(--sb-text);
    border: 1px solid var(--sb-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.48);
}

.chosen-container-single .chosen-single,
.chosen-container-active.chosen-with-drop .chosen-single,
.chosen-container-multi .chosen-choices {
    background: transparent;
    color: var(--sb-text);
    border-color: var(--sb-border-strong);
}

.chosen-container-single .chosen-single span,
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
    color: var(--sb-text);
}

.chosen-container .chosen-results li.highlighted {
    background: var(--sb-surface-hover);
    color: #ffffff;
}

.chosen-container .chosen-results li.result-selected {
    background: transparent;
    color: var(--sb-accent-hover);
}

.chosen-container .chosen-results li.group-result {
    color: var(--sb-muted);
}

.chosen-container .chosen-results li.group-result:not(:first-child) {
    border-top-color: var(--sb-border);
}

.chosen-container-multi .chosen-choices li.search-choice {
    background: var(--sb-surface-3);
    color: var(--sb-text);
}

.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before {
    color: var(--sb-muted);
}

.btn-default,
.btn-default:focus,
.btn-default.focus,
.btn-default:hover,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
    background-color: var(--sb-surface-3);
    border-color: var(--sb-border-strong);
    color: var(--sb-text);
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
    background-color: var(--sb-surface-hover);
    color: #ffffff;
}

.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default {
    background-color: var(--sb-disabled-row);
    color: var(--sb-faint);
}

.btn-link {
    color: var(--sb-accent);
}

.btn-link:hover,
.btn-link:focus {
    color: var(--sb-accent-hover);
    background-color: rgba(88, 173, 247, 0.1);
}

.button-Submit {
    background: var(--sb-surface-3);
    color: var(--sb-text);
    border: 1px solid var(--sb-border-strong);
    border-radius: 2px;
    padding: 7px 14px;
    cursor: pointer;
}

.button-Submit:hover,
.button-Submit:focus {
    background: var(--sb-surface-hover);
    color: #ffffff;
}

font[color="green"] {
    color: #79dfa0 !important;
}

font[color="red"] {
    color: #ff8e98 !important;
}

font[color="#677882"] {
    color: var(--sb-muted) !important;
}

.contacts .c-footer {
    border-color: var(--sb-border);
}

.contacts .c-footer > button,
.wcc-inner {
    background: var(--sb-surface-2);
    color: var(--sb-text);
    border-color: var(--sb-border);
}

/* Tabs, breadcrumbs and pagination */
.nav-tabs,
.tab-nav,
.fw-container .fw-footer {
    border-color: var(--sb-border);
}

.nav-tabs > li > a,
.tab-nav > li > a {
    color: var(--sb-muted);
}

.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus,
.tab-nav > li > a:hover,
.tab-nav > li.active > a {
    background-color: var(--sb-surface-3);
    border-color: var(--sb-border);
    color: #ffffff;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    background-color: var(--sb-surface-2);
    border-color: var(--sb-border);
    border-bottom-color: var(--sb-surface-2);
    color: #ffffff;
}

.breadcrumb {
    background-color: var(--sb-surface);
    border-color: var(--sb-border);
}

.breadcrumb > li > a,
.breadcrumb > .active {
    color: var(--sb-muted);
}

.breadcrumb > li > a:hover {
    color: var(--sb-accent-hover);
}

.breadcrumb > li + li:before {
    color: var(--sb-faint);
}

.pagination > li > a,
.pagination > li > span,
.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus,
.pager li > a,
.pager li > span {
    background-color: var(--sb-surface-2);
    border-color: var(--sb-border);
    color: var(--sb-text);
}

.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus,
.pager li > a:hover,
.pager li > a:focus {
    background-color: var(--sb-surface-hover);
    border-color: var(--sb-border-strong);
    color: #ffffff;
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    background-color: var(--sb-accent-deep);
    border-color: var(--sb-accent);
    color: #ffffff;
}

/* Alerts keep their semantic colours, but use dark surfaces. */
.alert-success {
    background-color: #123b2b;
    border-color: #246448;
    color: #bff3d2;
}

.alert-info {
    background-color: #103650;
    border-color: #235f88;
    color: #c3e9ff;
}

.alert-warning {
    background-color: #493616;
    border-color: #795b22;
    color: #ffe0a0;
}

.alert-danger {
    background-color: #4a2028;
    border-color: #7c3641;
    color: #ffc5cc;
}

.alert .alert-link {
    color: inherit;
    text-decoration: underline;
}

/* Dialogs, popovers and loading screens */
.modal-content,
.modal .modal-content,
.sweet-alert,
.popover {
    background-color: var(--sb-surface-2);
    color: var(--sb-text);
    border-color: var(--sb-border);
}

.modal:not([data-modal-color]) .modal-header,
.modal:not([data-modal-color]) .modal-footer,
.popover-title {
    background-color: var(--sb-surface-3);
    border-color: var(--sb-border);
}

.modal:not([data-modal-color]) .modal-footer .btn-link,
.modal .modal-footer .btn-link {
    color: var(--sb-accent);
}

.modal:not([data-modal-color]) .modal-footer .btn-link:hover,
.modal .modal-footer .btn-link:hover {
    background-color: var(--sb-surface-hover);
    color: #ffffff;
}

.modal-backdrop,
.modal[data-modal-color] .modal-backdrop,
.sweet-overlay {
    background: #01060c;
}

.tooltip-inner {
    background: #020913;
    color: var(--sb-text);
    border: 1px solid var(--sb-border);
}

.popover.top > .arrow {
    border-top-color: var(--sb-border);
}

.popover.top > .arrow:after {
    border-top-color: var(--sb-surface-2);
}

.popover.right > .arrow {
    border-right-color: var(--sb-border);
}

.popover.right > .arrow:after {
    border-right-color: var(--sb-surface-2);
}

.popover.bottom > .arrow {
    border-bottom-color: var(--sb-border);
}

.popover.bottom > .arrow:after {
    border-bottom-color: var(--sb-surface-2);
}

.popover.left > .arrow {
    border-left-color: var(--sb-border);
}

.popover.left > .arrow:after {
    border-left-color: var(--sb-surface-2);
}

.sweet-alert h2,
.sweet-alert p,
.sweet-alert .lead {
    color: var(--sb-text);
}

.sweet-alert input {
    background: var(--sb-surface);
    color: var(--sb-text);
    border-color: var(--sb-border-strong);
}

.sweet-alert .icon.success::before,
.sweet-alert .icon.success::after,
.sweet-alert .icon.success .fix,
.sweet-alert .sa-icon.sa-success::before,
.sweet-alert .sa-icon.sa-success::after,
.sweet-alert .sa-icon.sa-success .sa-fix {
    background: var(--sb-surface-2);
}

html:not(.ismobile) .page-loader,
html.ismobile .page-loader {
    background: var(--sb-bg) !important;
}

.page-loader .preloader p {
    color: var(--sb-muted);
}

/* Editors, calendars and auxiliary widgets */
.note-editor,
.note-editor.note-frame,
.note-editor .note-editable,
.note-editor .note-statusbar,
.note-popover .popover-content {
    background: var(--sb-surface);
    color: var(--sb-text);
    border-color: var(--sb-border);
}

.note-editor .note-toolbar,
.note-popover .note-toolbar,
.note-editor .popover-content,
.note-popover .popover-content {
    background: var(--sb-surface-2);
    border-color: var(--sb-border);
}

.note-editor .note-statusbar .note-resizebar,
.note-popover .note-statusbar .note-resizebar,
.note-editor .note-statusbar .note-resizebar .note-icon-bar,
.note-popover .note-statusbar .note-resizebar .note-icon-bar {
    border-color: var(--sb-border-strong);
}

.fc {
    background-color: var(--sb-surface);
    color: var(--sb-text);
    border: 1px solid var(--sb-border);
    box-shadow: 0 8px 24px var(--sb-shadow);
}

.fc-unthemed th,
.fc-unthemed td,
.fc-unthemed thead,
.fc-unthemed tbody,
.fc-unthemed .fc-divider,
.fc-unthemed .fc-row,
.fc-unthemed .fc-content,
.fc-unthemed .fc-popover {
    border-color: var(--sb-border);
}

.fc-unthemed .fc-today {
    background: #153b5c !important;
}

.fc-unthemed .fc-divider,
.fc-unthemed .fc-popover .fc-header,
.fc-unthemed .fc-list-heading td {
    background: var(--sb-surface-2);
}

.fc-toolbar .ui-button:hover {
    background: var(--sb-surface-hover);
    color: var(--sb-accent-hover);
}

.bootstrap-datetimepicker-widget,
.datepicker,
.timepicker-picker {
    background: var(--sb-surface-2);
    color: var(--sb-text);
}

.datepicker table td.day {
    color: var(--sb-text);
}

.datepicker table td.day.old,
.datepicker table td.day.new,
.bootstrap-datetimepicker-widget [data-action="togglePicker"] span {
    color: var(--sb-faint);
}

.datepicker table td:not(.today):not(.active):hover:before,
.datepicker-months .month:not(.active):hover,
.datepicker-years .year:not(.active):hover,
.timepicker-minutes .minute:not(.active):hover,
.timepicker-hours .hour:not(.active):hover {
    background: var(--sb-surface-hover);
}

.datepicker table td.today {
    color: #ffffff;
}

.datepicker table td.today:before {
    background-color: #315574;
}

.datepicker table thead tr:first-child th,
.datepicker table thead tr:first-child th:hover,
.timepicker-picker table tbody tr + tr:not(:last-child) {
    background: var(--sb-header);
}

.datepicker table thead tr:last-child:not(:only-child) {
    background: var(--sb-header-2);
}

.timepicker-picker .btn,
.timepicker-picker .btn:hover {
    background: var(--sb-surface-3);
    color: var(--sb-text);
}

.file-preview,
.file-drop-zone,
.file-preview-frame,
.fileinput .fileinput-preview {
    background: var(--sb-surface-2);
    color: var(--sb-text);
    border-color: var(--sb-border);
}

.fileinput .close {
    border-color: var(--sb-border-strong);
}

.fileinput .close:hover {
    background: var(--sb-surface-hover);
}

#lg-outer {
    background: rgba(3, 11, 21, 0.96);
}

#lg-action > a,
#lg-action > a:hover {
    color: var(--sb-text);
}

/* SourceBans-specific inline colour overrides. Layout declarations stay intact. */
.card-body.card-padding td[colspan="3"][align="center"][style*="background-color: #f4f4f4"],
.card-body > table.table td[colspan="4"][align="center"][style*="background-color: #f4f4f4"] {
    background-color: var(--sb-surface-2) !important;
    border-top-color: var(--sb-border) !important;
}

#data-table-command.bootgrid-table tr[id^="sid_"][style*="background-color:#eaeaea"] {
    background-color: var(--sb-disabled-row) !important;
}

#data-table-command.bootgrid-table tr[id^="sid_"] > td[style*="border-bottom"] {
    border-bottom-color: var(--sb-border) !important;
}

.lv-header[style*="border-top"],
.lv-header[style*="border-bottom"] {
    border-color: var(--sb-border-strong) !important;
}

td[style*="border-top: 0px solid #FFFFFF"],
td[style*="border-top: 0px solid #ffffff"] {
    border-top-color: var(--sb-border) !important;
}

.customreasons-container .customreason:not(:last-child):after {
    color: var(--sb-muted);
}

@media print {
    html,
    body,
    .card,
    .table,
    .table > thead > tr > th {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
    }
}
