:root {
    --theme: #525fd0;
    --theme-subtle: #cdd0f0;
    --main: #f2f3f6;
    --bs-body-bg: #f2f3f6;
    --bs-body-color: #242238;
    --bs-heading-color: #17152a;
    --bs-border-color: #e3e1ed;
    --theme-toggle-border: #9996a8;
    color-scheme: light;
}

[data-bs-theme="dark"] {
    --theme: #525fd0;
    --theme-subtle: #252b49;
    --main: #0d0b1c;
    --bs-body-bg: #0d0b1c;
    --bs-body-color: #eceaf6;
    --bs-emphasis-color: #f8f6ff;
    --bs-secondary-color: #b6b2c7;
    --bs-tertiary-color: #9994ad;
    --bs-heading-color: #f8f6ff;
    --theme-toggle-border: #68627e;
    --bs-secondary-bg: #171428;
    --bs-tertiary-bg: #121020;
    --bs-border-color: #302b48;
    --bs-primary: #525fd0;
    --bs-primary-rgb: 82, 95, 208;
    --bs-link-color: #8998ff;
    --bs-link-hover-color: #b0baff;
    --bs-secondary-bg-subtle: #1d2238;
    --bs-primary-bg-subtle: #20284b;
    --bs-primary-text-emphasis: #a4afff;
    --bs-secondary-text-emphasis: #c2bdd4;
    --bs-light-bg-subtle: #1d1930;
    --bs-dark-bg-subtle: #171428;
    --bs-light-text-emphasis: #f1edff;
    --bs-dark-text-emphasis: #d5d0e7;
    color-scheme: dark;
}

html,
body {
    background-color: var(--main) !important;
    color: var(--bs-body-color);
}

.auth-page {
    min-height: 100vh;
    flex-direction: column;
    justify-content: safe center;
    padding-top: clamp(2rem, 7vh, 4rem);
    padding-bottom: 1rem;
}

.auth-page > .row {
    flex-shrink: 0;
}

.ticket-template-offcanvas {
    --bs-offcanvas-bg: var(--main);
    background-color: var(--main);
    height: fit-content !important;
    max-height: 90vh !important;
    padding-bottom: 10px !important;
}

.ticket-template-offcanvas > .offcanvas-body {
    min-height: 0;
    background-color: var(--main);
    overflow-y: auto;
}

.ticket-template-preview {
    --theme: #525fd0;
    --theme-subtle: #cdd0f0;
    color-scheme: light;
}

[data-bs-theme="dark"] .ticket-template-preview .card:not(.bg-transparent) {
    --bs-card-bg: #fff;
    --bs-card-border-color: rgba(0, 0, 0, 0.175);
}

[data-bs-theme="dark"] .ticket-template-preview .text-dark,
[data-bs-theme="dark"] .ticket-template-preview .text-black {
    color: #212529 !important;
}

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

a {
    color: var(--bs-body-color);
    text-decoration: none;
}

a:hover {
    color: var(--bs-primary);
}

.site-search {
    flex: 1 1 0;
    width: auto;
    min-width: 50px !important;
    max-width: 650px !important;
    overflow: hidden;
    border: 1px solid var(--theme);
    border-radius: 1rem;
    background: transparent;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search:focus-within {
    border-color: var(--theme);
    box-shadow: 0 0 0 0.2rem rgba(82, 95, 208, 0.08);
}

.site-search .site-search-input,
.site-search .site-search-button {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.site-search .site-search-input {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    padding-right: 0.25rem;
    background: transparent;
    text-overflow: ellipsis;
}

.site-search .site-search-input::placeholder {
    color: #77748a;
    opacity: 0.8;
}

.site-search .site-search-button {
    flex-shrink: 0;
    padding: 0 0.65rem;
    background: transparent;
}

.site-search .site-search-button:hover {
    background: rgba(82, 95, 208, 0.08);
}

.site-search .site-search-button:focus-visible {
    outline: 2px solid var(--theme);
    outline-offset: -4px;
}

.site-search .site-search-input::-webkit-search-cancel-button {
    margin-left: 0.25rem;
    margin-right: 0;
}

.dropdown-item.is-selected,
.dropdown-item.is-selected:hover,
.dropdown-item[data-theme-value].active,
.dropdown-item[data-theme-value].active:hover {
    background-color: transparent !important;
    color: var(--theme) !important;
    opacity: 1;
}

.site-profile-logout:hover,
.site-profile-logout:focus-visible {
    color: var(--bs-danger) !important;
}

.theme-toggle {
    border-color: var(--theme-toggle-border) !important;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--theme) !important;
}

.theme-toggle:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(82, 95, 208, 0.2);
}

:root .shimmerBG {
    animation-duration: 6s !important;
    background: linear-gradient(to right, #e9ebef 8%, #dfe2e7 18%, #e9ebef 33%);
}

.date-time-range {
    border: 0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--bs-box-shadow-sm);
}

.event-filter-sort {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0.5rem 0.75rem 0.25rem;
    border: 0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--bs-box-shadow-sm);
}

.event-filter-sort label {
    color: #77748a;
    line-height: 1.25;
}

.event-filter-sort .form-select {
    flex: 1;
    min-height: 2.5rem;
    padding: 0.25rem 1.75rem 0.25rem 0;
    background-color: transparent;
    box-shadow: none !important;
}

#filter .event-date-presets .btn {
    border: 0 !important;
    background: #fff;
    box-shadow: var(--bs-box-shadow-sm);
    color: #77748a;
}

#filter .event-date-presets .btn:hover {
    background: #f8f7fc;
    color: #525fd0;
}

#filter .event-date-presets .btn.btn-color,
#filter .event-date-presets .btn.btn-color:hover {
    background: var(--theme) !important;
    color: #fff !important;
}

.event-date-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.event-date-presets .btn {
    width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    white-space: normal;
    line-height: 1.15;
}

.date-time-range > .form-floating + .form-floating {
    border-left: 0;
}

.date-time-range .date-time-input.form-control {
    min-width: 0;
    padding-right: 0.75rem;
    background: transparent;
    color-scheme: light;
}

.date-time-range .date-time-input:focus {
    background: transparent;
    box-shadow: inset 0 0 0 2px rgba(82, 95, 208, 0.16);
}

.date-time-input::-webkit-datetime-edit {
    padding: 0;
}

.date-time-input::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.date-time-input::-webkit-datetime-edit-text,
.date-time-input::-webkit-datetime-edit-month-field,
.date-time-input::-webkit-datetime-edit-day-field,
.date-time-input::-webkit-datetime-edit-year-field,
.date-time-input::-webkit-datetime-edit-hour-field,
.date-time-input::-webkit-datetime-edit-minute-field,
.date-time-input::-webkit-datetime-edit-ampm-field {
    padding: 0 0.08em;
}

.date-time-input::-webkit-calendar-picker-indicator {
    margin-left: 0.25rem;
    padding: 0.35rem;
    border-radius: 0.5rem;
    cursor: pointer;
    opacity: 0.72;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.date-time-input::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(82, 95, 208, 0.12);
    opacity: 1;
}

[data-bs-theme="dark"] body {
    background-image:
        radial-gradient(ellipse at 50% -18%, rgba(82, 95, 208, 0.12), transparent 55%),
        linear-gradient(180deg, #0d0b1c 0%, #0b0a17 100%);
    background-attachment: fixed;
}

[data-bs-theme="dark"] .site-search {
    min-height: unset;
    border: 1px solid #302b48;
    border-radius: 1rem;
    background: rgba(18, 16, 32, 0.78);
}

[data-bs-theme="dark"] .site-search:focus-within {
    border-color: rgba(82, 95, 208, 0.78);
    box-shadow: 0 0 0 0.2rem rgba(82, 95, 208, 0.18);
}

[data-bs-theme="dark"] .site-search .site-search-input::placeholder {
    color: #aaa5bd;
}

[data-bs-theme="dark"] .site-search .site-search-button {
    color: #8998ff !important;
}

[data-bs-theme="dark"] .site-search .site-search-button:hover {
    background: rgba(82, 95, 208, 0.16);
}

[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .bg-dark-subtle {
    background-color: var(--bs-secondary-bg) !important;
}

[data-bs-theme="dark"] .card:not(.bg-transparent) {
    --bs-card-bg: #171428;
    --bs-card-border-color: #302b48;
}

[data-bs-theme="light"] .card:not(.bg-transparent):not([class*="bg-"]) {
    --bs-card-bg: #fff;
    background-color: #fff;
}

[data-bs-theme="dark"] .card.scale,
[data-bs-theme="dark"] #canvas.card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

[data-bs-theme="dark"] .card:not(.border-0):not(.bg-transparent) {
    border-color: var(--bs-card-border-color);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
    color: var(--bs-body-color);
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--bs-tertiary-color);
}

[data-bs-theme="dark"] .form-floating > .form-control::placeholder {
    color: transparent;
}

[data-bs-theme="dark"] .form-select option {
    color: var(--bs-body-color);
    background-color: var(--bs-secondary-bg);
}

[data-bs-theme="light"] {
    --select2-bg: var(--bs-body-bg);
    --select2-color: var(--bs-body-color);
    --select2-border: var(--bs-border-color);
    --select2-placeholder: var(--bs-secondary-color);
    --select2-selected-bg: #e9eaff;
    --select2-selected-color: #525fd0;
}

[data-bs-theme="dark"] {
    --select2-bg: #171428;
    --select2-color: #eceaf6;
    --select2-border: #302b48;
    --select2-placeholder: #9994ad;
    --select2-selected-bg: #252b49;
    --select2-selected-color: #c2caff;
}

[data-bs-theme] .select2-container--default .select2-selection--multiple,
[data-bs-theme] .select2-container--default .select2-dropdown {
    color: var(--select2-color);
    background-color: var(--select2-bg);
    border-color: var(--select2-border);
}

[data-bs-theme] #types + .select2-container {
    display: block;
    width: 100% !important;
    max-width: 100%;
}

[data-bs-theme] #types + .select2-container .select2-selection--multiple {
    min-height: calc(3.5rem + 2px);
}

[data-bs-theme] .select2-container--default .select2-selection--multiple .select2-selection__rendered,
[data-bs-theme] .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    color: var(--select2-color);
}

[data-bs-theme] .select2-container--default .select2-selection--multiple .select2-selection__placeholder,
[data-bs-theme] .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
    color: var(--select2-placeholder);
}

[data-bs-theme] .select2-container--default .select2-search--dropdown .select2-search__field {
    color: var(--select2-color);
    background-color: var(--select2-bg);
    border-color: var(--select2-border);
}

[data-bs-theme] .select2-container--default .select2-results__option {
    color: var(--select2-color);
}

[data-bs-theme] .select2-container--default .select2-results__option[aria-selected="true"] {
    color: var(--select2-selected-color);
    background-color: var(--select2-selected-bg);
}

[data-bs-theme] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: #fff;
    background-color: var(--theme);
}

[data-bs-theme] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    color: #fff;
    background-color: var(--theme);
    border-color: var(--theme);
}

[data-bs-theme] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
[data-bs-theme] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-menu {
    --bs-dropdown-bg: #171428;
    --bs-dropdown-color: var(--bs-body-color);
    --bs-dropdown-border-color: var(--bs-border-color);
    --bs-dropdown-link-color: var(--bs-body-color);
    --bs-dropdown-link-hover-color: var(--bs-emphasis-color);
    --bs-dropdown-link-hover-bg: #202746;
    --bs-dropdown-link-active-color: var(--bs-emphasis-color);
    --bs-dropdown-link-active-bg: #252f58;
}

[data-bs-theme="dark"] #canvas .table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(82, 95, 208, 0.08);
}

[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-black {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .border-light {
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .bg-blur {
    background-color: rgba(18, 15, 36, 0.86);
    border: 1px solid rgba(82, 95, 208, 0.16);
}

[data-bs-theme="dark"] .filter-card {
    background: rgba(23, 20, 40, 0.94);
    border-color: rgba(82, 95, 208, 0.2);
}

[data-bs-theme="dark"] .date-time-range {
    border: 1px solid #302b48;
    background: #171428;
}

[data-bs-theme="dark"] .event-filter-sort {
    border: 1px solid #302b48;
    background: #171428;
}

[data-bs-theme="dark"] .event-filter-sort label {
    color: #b6b2c7;
}

[data-bs-theme="dark"] .event-filter-sort .form-select {
    color: #eceaf6;
}

[data-bs-theme="dark"] .date-time-range > .form-floating + .form-floating {
    border-left: 1px solid #302b48;
}

[data-bs-theme="dark"] .date-time-range .date-time-input.form-control {
    color: #eceaf6;
    color-scheme: dark;
}

[data-bs-theme="dark"] .date-time-range .date-time-input:focus {
    box-shadow: inset 0 0 0 2px rgba(82, 95, 208, 0.28);
}

[data-bs-theme="dark"] #filter .event-date-presets .btn {
    border: 1px solid #3c4568 !important;
    background: #171428;
    box-shadow: none;
    color: #eceaf6;
}

[data-bs-theme="dark"] #filter .event-date-presets .btn:hover {
    background: #202746;
    border-color: #4b5685 !important;
}

[data-bs-theme="dark"] #filter .event-date-presets .btn.btn-color,
[data-bs-theme="dark"] #filter .event-date-presets .btn.btn-color:hover {
    border-color: var(--theme) !important;
    background: var(--theme) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .date-time-input::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(82, 95, 208, 0.2);
}

[data-bs-theme="dark"] .shimmerBG {
    background: linear-gradient(to right, #191b2b 8%, #272e47 18%, #191b2b 33%);
}

[data-bs-theme="dark"] .shadow,
[data-bs-theme="dark"] .shadow-sm,
[data-bs-theme="dark"] .shadow-lg {
    --bs-box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.28);
    --bs-box-shadow-sm: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.22);
}

[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: var(--bs-secondary-bg);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: #202746;
    --bs-btn-hover-border-color: #3c4568;
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: #252f58;
    --bs-btn-active-border-color: #4b5685;
}

[data-bs-theme="dark"] .table {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--bs-border-color);
    --bs-table-striped-bg: rgba(82, 95, 208, 0.045);
    --bs-table-hover-bg: rgba(82, 95, 208, 0.08);
    --bs-table-active-bg: rgba(82, 95, 208, 0.1);
}

[data-bs-theme="light"] .table,
[data-bs-theme="light"] .table-light {
    --bs-table-bg: #fff;
}

table.table > tbody > tr > * {
    border-bottom: 0 !important;
}

[data-bs-theme="dark"] .table-light {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: var(--bs-secondary-bg);
    --bs-table-border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .dataTables_wrapper,
[data-bs-theme="dark"] .dataTables_info,
[data-bs-theme="dark"] .dataTables_length,
[data-bs-theme="dark"] .dataTables_filter,
[data-bs-theme="dark"] .dataTables_paginate {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    color-scheme: dark;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] textarea::placeholder {
    color: #9994ad;
}

[data-bs-theme="dark"] .nav-tabs {
    --bs-nav-tabs-border-color: var(--bs-border-color);
    --bs-nav-tabs-link-hover-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-border-color);
    --bs-nav-tabs-link-active-color: var(--bs-emphasis-color);
    --bs-nav-tabs-link-active-bg: var(--bs-secondary-bg);
    --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-secondary-bg);
}

[data-bs-theme="dark"] .list-group {
    --bs-list-group-color: var(--bs-body-color);
    --bs-list-group-bg: var(--bs-secondary-bg);
    --bs-list-group-border-color: var(--bs-border-color);
    --bs-list-group-action-hover-color: var(--bs-emphasis-color);
    --bs-list-group-action-hover-bg: #1d2238;
}

[data-bs-theme="light"] .list-group {
    --bs-list-group-bg: #fff;
}

[data-bs-theme="dark"] .accordion {
    --bs-accordion-color: var(--bs-body-color);
    --bs-accordion-bg: var(--bs-secondary-bg);
    --bs-accordion-border-color: var(--bs-border-color);
    --bs-accordion-btn-color: var(--bs-body-color);
    --bs-accordion-active-color: var(--bs-emphasis-color);
    --bs-accordion-active-bg: #1d2238;
}

[data-bs-theme="light"] .accordion {
    --bs-accordion-bg: #fff;
}

@media (max-width: 575.98px) {
    .site-search .site-search-input {
        padding-left: 0.6rem;
    }
    .site-search .site-search-button {
        padding: 0 0.5rem;
    }
}

[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .offcanvas:not(.ticket-template-offcanvas) {
    border-color: var(--bs-border-color);
    background-color: var(--bs-secondary-bg);
}

[data-bs-theme="light"] .modal-content,
[data-bs-theme="light"] .offcanvas:not(.ticket-template-offcanvas) {
    background-color: #fff;
}

[data-bs-theme="dark"] .dropdown-divider,
[data-bs-theme="dark"] hr {
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .theme-toggle {
    color: var(--bs-body-color);
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .theme-toggle:hover {
    color: var(--bs-emphasis-color);
    border-color: #525fd0 !important;
    background-color: #202746;
}

[data-bs-theme="dark"] .theme-toggle:focus-visible {
    border-color: #525fd0 !important;
    box-shadow: 0 0 0 0.2rem rgba(82, 95, 208, 0.28);
}

[data-bs-theme="dark"] add-to-calendar-button {
    --btn-text: #fff !important;
    --btn-hover-text: #333 !important;
}

[data-bs-theme="dark"] #dropzone.drag-over {
    background-color: #1d2238 !important;
}

[data-bs-theme="dark"] .refund-status-notice--pending {
    color: #ffe08a;
    background-color: #3a2f14;
}

[data-bs-theme="dark"] .refund-status-notice--processing {
    color: #a9c7ff;
    background-color: #172746;
}

[data-bs-theme="dark"] .refund-status-notice--rejected,
[data-bs-theme="dark"] .refund-status-notice--failed {
    color: #ffb4b4;
    background-color: #3a1c27;
}

:where([data-bs-theme="dark"]) a {
    color: #fff;
}

:where([data-bs-theme="light"]) a {
    color: #212529;
}

:where([data-bs-theme="dark"]) a:hover {
    color: #adb5bd;
}

:where([data-bs-theme="light"]) a:hover {
    color: #495057;
}