:root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bs-primary: #7f74f1;
    --bs-primary-rgb: 127, 116, 241;
}
:root {
    --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    --bs-body-color: #626262;
    --bs-body-bg: #f8f8f8;
    --bs-border-color: #e6e5ec;
    --bs-border-radius: 0.428rem;
    --bs-link-color: #7f74f1;
    --bs-link-hover-color: #675bd8;
}
html { font-size: 14px; letter-spacing: 0; }
body { font-family: var(--bs-body-font-family); }
body:not(.dark-layout) { --bs-body-color: #697a8d; --bs-heading-color: #5e5873; --bs-emphasis-color: #5e5873; color: #697a8d; line-height: 1.53; }
*, *::before, *::after { letter-spacing: 0; }
a { text-decoration: none; }
h2 { font-size: 1.714rem; }
h4 { font-size: 1.286rem; }
h5 { font-size: 1.07rem; }
h6 { font-size: 1rem; }
h2, h4, h5, h6 { font-weight: 500; color: #5e5873; }
.row { --bs-gutter-x: 2rem; }
.container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl { --bs-gutter-x: 2rem; }
.row > * { min-width: 0; }
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; min-width: 0; }
.form-group { margin-bottom: 1rem; }
.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > * { padding-left: 5px; padding-right: 5px; }
.form-check-input { float: left; }
.modal .form-check-label { cursor: pointer; }
.modal iframe { max-height: calc(100dvh - 150px); }
#qrcode img, #qrcode canvas { max-width: 100%; height: auto; }
.card { --bs-card-spacer-x: 1.5rem; --bs-card-spacer-y: 1.5rem; --bs-card-border-width: 0; --bs-card-color: inherit; margin-bottom: 2rem; border-radius: 6px; }
.card-body { min-width: 0; }
.card-header { border: 0; background: transparent; padding: 1.5rem 1.5rem 0; }
.card-header .card-title { margin: 0; color: var(--bs-heading-color); }
.card .list-group-item { padding: 0.75rem 1.25rem; background: transparent; color: inherit; border-color: rgb(34 41 47 / 12.5%); overflow-wrap: anywhere; }
.meetup-img-wrapper img { max-width: 100%; object-fit: contain; }
.table { --bs-table-bg: transparent; --bs-table-color: #6e6b7b; font-size: 1rem; }
.table th, .table td { vertical-align: middle; padding: 1rem; }
.table th { font-size: 0.9rem; }
.table th { white-space: nowrap; font-weight: 500; }
.table td { white-space: nowrap; }
.table-responsive { overscroll-behavior-inline: contain; }
.form-control { min-height: 2.714rem; padding: 0.438rem 1rem; border-color: #d8d6de; color: #6e6b7b; background-color: #fff; line-height: 1.45; }
.form-select { min-height: 2.714rem; padding: 0.438rem 2.25rem 0.438rem 1rem; border-color: #d8d6de; color: #6e6b7b; line-height: 1.45; }
.form-control[readonly] { background-color: #efefef; }
.form-label { margin-bottom: 0.5rem; }
.input-group { flex-wrap: nowrap; }
.input-group > .form-control { min-width: 0; }
.input-group .btn { margin-top: 0 !important; flex: 0 0 auto; white-space: nowrap; }
.btn { --bs-btn-padding-x: 1.5rem; --bs-btn-padding-y: 0.786rem; --bs-btn-line-height: 1; border-radius: 5px; font-weight: 500; }
.btn-sm { --bs-btn-padding-x: 1rem; --bs-btn-padding-y: 0.486rem; font-size: 0.9rem; }
.btn-primary { --bs-btn-bg: #7f74f1; --bs-btn-border-color: #978ef4; --bs-btn-hover-bg: #776cf0; --bs-btn-hover-border-color: #968df4; --bs-btn-active-bg: #675bd8; --bs-btn-active-border-color: #675bd8; --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--bs-btn-bg); --bs-btn-disabled-border-color: var(--bs-btn-border-color); }
.btn-info { --bs-btn-color: #fff; --bs-btn-bg: #6ea0ff; --bs-btn-border-color: #6ea0ff; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #598ff3; --bs-btn-hover-border-color: #598ff3; }
.btn-warning { --bs-btn-color: #2a2e30; --bs-btn-bg: #ff9f43; --bs-btn-border-color: #ff9f43; --bs-btn-hover-color: #2a2e30; }
.btn-secondary { --bs-btn-bg: #82868b; --bs-btn-border-color: #82868b; }
.btn-danger { --bs-btn-bg: #ea5455; --bs-btn-border-color: #ea5455; }
.btn-close { flex: 0 0 auto; width: 1rem; height: 1rem; padding: 0.75rem; margin: -0.3rem -0.3rem -0.3rem auto; border-radius: 4px; }
/* tabindex="-1" 是弹窗容器、<main> 这类程序化焦点目标（供读屏定位），不参与 Tab 键序，不画焦点框 */
:where([tabindex="-1"]):focus { outline: none !important; }
:where(a, button, input, [tabindex]:not([tabindex="-1"])):focus-visible { outline: 2px solid #7f74f1 !important; outline-offset: 3px; }
.modal { --bs-modal-width: 500px; --bs-modal-border-width: 0; --bs-modal-border-radius: 6px; --bs-modal-padding: 1.5rem; }
.modal-header { background: #f8f8f8; padding: 1.2rem 1.5rem; border-bottom: 0; }
.modal-header .modal-title { line-height: 1.5; }
.modal-body { padding: 1.5rem; overscroll-behavior: contain; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid #eeedf3; background: #fafafd; gap: 0.5rem; }
.modal-footer > * { margin: 0; }
.modal-content { box-shadow: 0 14px 60px rgb(34 29 59 / 18%); }
.modal-body h2 { font-size: 1.714rem; }
.modal .custom-option-item, .modal .custom-option { background: #fff; border: 1px solid #e2dfeb; border-radius: 6px; }
.modal .custom-option-item { padding: 0.85rem 1rem; }
.custom-option-item-check:focus-visible + label { outline: 2px solid #7f74f1; outline-offset: 3px; }
.custom-option-item-check:checked + .custom-option-item { border: 1px solid #7f74f1 !important; box-shadow: 0 0 0 1px rgb(127 116 241 / 10%); color: #7f74f1; }
.custom-option-item-check:checked + .custom-option-item .custom-option-item-title { color: #7f74f1; }
.custom-option-item-check:disabled + .custom-option-item { cursor: not-allowed; }
.custom-option-item .d-flex > img { flex: 0 0 40px; }
.custom-option-item .ms-1, .modal .alert .ms-1 { min-width: 0; }
.custom-option-item h6, .custom-option-item small { overflow-wrap: anywhere; }
.custom-option-basic .custom-option-content { padding: 0.9rem 0.7rem 0.9rem 2.3rem; min-height: 44px; display: flex; align-items: center; }
.custom-option .form-check-input { margin: 0 0 0 -1.6rem; position: absolute; }
.custom-option.checked { border-color: #7f74f1; background-color: rgb(127 116 241 / 5%); }
.custom-option-header { line-height: 1.5; }
.form-check-input:checked { background-color: #7f74f1; border-color: #7f74f1; }
.w-px-40 { width: 40px; } .h-px-40 { height: 40px; }
.round { border-radius: 1.5rem; }
.content-header .breadcrumb { margin-bottom: 0; background: transparent; padding: 0; }
.header-navbar .navbar-collapse { display: flex; flex-basis: auto; align-items: center; justify-content: space-between; }
.header-navbar .navbar-nav { flex-direction: row; align-items: center; }
.header-navbar .dropdown-menu { position: absolute; }
.header-navbar .user-nav { max-width: 240px; overflow: hidden; }
.header-navbar .user-name, .header-navbar .user-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-navbar .user-status { font-size: 0.857rem; }
.header-navbar .avatar img { object-fit: contain; }
.header-navbar .dropdown-menu-end { right: 0; left: auto; }
/* 顶栏导航：焦点提示统一用主题紫框，去掉 Bootstrap 自带的蓝色光晕 */
.header-navbar .nav-link:focus-visible,
.header-navbar .dropdown-toggle:focus-visible { box-shadow: none; }
.header-navbar .dropdown-toggle::after { display: none; }
.header-navbar .notification-toggle { display: inline-flex; align-items: center; }
.header-navbar .nav-link { cursor: pointer; }
.navbar-header .navbar-nav { align-items: center; }
.sidenav-overlay { padding: 0; border: 0; }
.main-menu .navbar-header .brand-text { white-space: nowrap; }
.main-menu .navigation li.active > a { color: #fff; background: #7f74f1; box-shadow: 0 0 10px 1px rgb(127 116 241 / 35%); border-radius: 4px; }
.main-menu .navbar-header .navbar-brand { padding-top: 1rem; margin: 0; }
.footer .scroll-top { bottom: 1.5rem; right: 1.5rem; }
.swal2-container { z-index: 2000; }
/* Preserve the Cool dialog geometry across the SweetAlert2 DOM upgrade. */
.swal2-container { padding: 10px; }
.swal2-popup { border-radius: 6px; padding: 1.25em; }
/* The dialog container receives programmatic focus; its controls retain visible focus. */
.swal2-popup:focus { outline: none !important; }
.swal2-popup .swal2-title { margin: 0 0 .4em; padding: 0; font-weight: 600; }
.swal2-popup .swal2-html-container { margin: 0; padding: 0; font-size: 1.125em; font-weight: 300; line-height: normal; overflow-wrap: anywhere; }
.swal2-popup .swal2-icon { margin: 1.25em auto 1.875em; }
.swal2-popup .swal2-actions { margin: 1.25em auto 0; }
.swal2-popup .swal2-styled { margin: .3125em; padding: .625em 2em; font-size: 1.0625em; font-weight: 500; }
.swal2-popup .swal2-styled.swal2-cancel { background-color: #aaa; border-radius: .25em; }
.swal2-popup .swal2-styled.swal2-confirm { background-color: #7f74f1; border-radius: 5px; }
.swal2-popup .swal2-styled:focus { box-shadow: 0 0 0 3px rgb(127 116 241 / 25%); }

/* Keep the theme's actual spacing while using Bootstrap 5 directional names. */
.mt-1,.my-1 { margin-top: 1rem !important; } .mb-1,.my-1 { margin-bottom: 1rem !important; }
.ms-1,.mx-1 { margin-left: 1rem !important; } .me-1,.mx-1 { margin-right: 1rem !important; }
.mt-2,.my-2 { margin-top: 1.5rem !important; } .mb-2,.my-2 { margin-bottom: 1.5rem !important; }
.ms-2,.mx-2 { margin-left: 1.5rem !important; } .me-2,.mx-2 { margin-right: 1.5rem !important; }
.mt-3,.my-3 { margin-top: 3rem !important; } .mb-3,.my-3 { margin-bottom: 3rem !important; }
.ms-3,.mx-3 { margin-left: 3rem !important; } .me-3,.mx-3 { margin-right: 3rem !important; }
.mt-25 { margin-top: 0.25rem !important; }
.px-1 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-1 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.p-1 { padding: 1.2rem !important; } .p-2 { padding: 1.5rem !important; }

[data-bs-theme="dark"] { --bs-body-color: #d0cde0; --bs-body-bg: #161d31; --bs-border-color: #42465b; }
body[data-bs-theme="dark"] { background: #161d31; color: #d0cde0; }
[data-bs-theme="dark"] :is(h2,h4,h5,h6) { color: #e0ddee; }
[data-bs-theme="dark"] .card, [data-bs-theme="dark"] .modal-content, [data-bs-theme="dark"] .modal-header, [data-bs-theme="dark"] .modal-footer { background: #283046; color: #d0cde0; }
[data-bs-theme="dark"] .card, [data-bs-theme="dark"] .modal-content { border: 1px solid #3b4055; }
[data-bs-theme="dark"] .form-control { background: #242b3d; color: #e2dfed; border-color: #464b61; }
[data-bs-theme="dark"] .form-select { background-color: #242b3d; color: #e2dfed; border-color: #464b61; }
[data-bs-theme="dark"] .input-group-text { background: #30374d; color: #d0cde0; border-color: #464b61; }
[data-bs-theme="dark"] .modal .bg-white, [data-bs-theme="dark"] .modal .custom-option { background-color: #242b3d !important; color: #d0cde0; }
[data-bs-theme="dark"] .table { --bs-table-color: #d0cde0; --bs-table-border-color: #42465b; }
[data-bs-theme="dark"] .table thead th { background: #30374d; color: #d0cde0; }
[data-bs-theme="dark"] .modal-footer { border-color: #42465b; }
[data-bs-theme="dark"] .swal2-popup { background: #283046; }
[data-bs-theme="dark"] .swal2-title, [data-bs-theme="dark"] .swal2-html-container { color: #e0ddee; }

/* Inputs use their border and soft shadow as the focus indicator, without a second ring. */
.form-control:focus, .form-select:focus {
    border-color: #7f74f1;
    outline: 0 !important;
    box-shadow: 0 3px 10px rgb(34 41 47 / 10%);
}
@media (forced-colors: active) {
    .form-control:focus, .form-select:focus { outline: 2px solid Highlight !important; outline-offset: 2px; }
}

/* Preserve the original authentication card spacing across Bootstrap versions. */
.auth-wrapper.auth-v1.px-2 { padding-inline: 1.5rem !important; }
.auth-wrapper.auth-v1 .auth-inner.py-2 { padding-block: 1.5rem !important; }
.auth-wrapper.auth-v1 .card-body { padding: 1.5rem; }

@media (max-width: 575.98px) {
    .header-navbar .navbar-container { padding: 0.3rem 0.5rem; }
    .header-navbar .navbar-nav .nav-link { padding: 0.65rem; min-width: 40px; }
    .header-navbar .dropdown-notification .dropdown-menu { width: min(320px, calc(100vw - 28px)); right: -65px; }
    .card-body, .card-header { padding-left: 1.1rem; padding-right: 1.1rem; }
    .modal { --bs-modal-margin: 0.75rem; }
    .modal-body { padding: 1.1rem; }
    .modal-header, .modal-footer { padding: 1rem 1.1rem; }
    .modal-dialog-scrollable { height: calc(100% - 1.5rem); }
    .modal .custom-option-item .d-flex { align-items: center; }
    .modal .custom-option-item .justify-content-between { row-gap: 0.3rem; }
    .modal .alert .ms-1 { margin-left: 0.6rem !important; }
    .modal-body .custom-options-checkable { --bs-gutter-x: 1rem; }
    .modal .nav .col { padding-left: 0.35rem; padding-right: 0.35rem; }
    .custom-option-basic .custom-option-content { padding-right: 0.3rem; }
    .custom-option-header { font-size: 0.857rem; }
    .modal .btn { min-height: 40px; }
    #invite-link { font-size: 0.857rem; padding-left: 0.5rem; padding-right: 0.5rem; }
    .input-group .btn { padding-left: 0.7rem; padding-right: 0.7rem; }
    .modal .table { min-width: 570px; }
    .content-header .breadcrumb-wrapper { display: none; }
    html body .content .content-wrapper .content-header-title { border-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
    .waves-ripple { display: none !important; }
}

/* Statistics are an inline component, not a Bootstrap grid row. */
.account-stat { display: flex; align-items: center; gap: 1rem; }
.account-stat-copy { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.account-stat > .avatar { flex: 0 0 auto; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; }

.card-profile-stats > div { flex: 1 1 0; min-width: 0; margin: 0; padding: 0.875rem 0.35rem; overflow-wrap: anywhere; }

.ticket-introduction .btn { display: table; margin: 0.75rem 0 0.75rem auto; }

.form-check.form-switch { padding-left: 3.25em; min-height: 1.5em; }
.form-switch .form-check-input { width: 2.5em; height: 1.5em; margin-left: -3.25em; }

/* Match the production statistics typography, rather than the old utility name. */
.account-stat-value { font-family: Arial, "Microsoft YaHei", sans-serif; font-size: 1.5rem; font-weight: 500; line-height: 1.2; }
.account-stat-value small { font-size: 0.857rem; font-weight: 400; }
