.content-margin {
    margin-top: 0;
}

#portal-settings-page .portal-settings-card .card-header {
    cursor: default;
}

#portal-settings-page .portal-settings-card-placeholder {
    border: 1px solid #cfd4da;
    border-radius: 0.5rem;
    min-height: 140px;
    background: rgba(108, 117, 125, 0.06);
}

#portal-settings-page .settings-section-pane {
    border: 1px solid #dbe2ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(14, 35, 74, 0.08);
}

#portal-settings-page .settings-customer-config-pane {
    display: flex;
    flex-direction: column;
}

#portal-settings-page .settings-config-copy {
    border: 1px solid #dbe2ef;
    border-radius: 10px;
    padding: 0.75rem 0.875rem;
    background: transparent;
}

#portal-settings-page .settings-toggle-card {
    border-color: #dbe2ef !important;
    border-radius: 10px !important;
}

#portal-settings-page .settings-toggle-card > div {
    min-width: 0;
}

/* Settings (Customer Facing): dark theme contrast parity with billing card treatment. */
body.dark-theme #portal-settings-page .portal-settings-card .settings-section-pane {
    background-color: #1f2b46;
    border: 1px solid #33486f;
    color: #e6eefc;
    box-shadow: 0 8px 22px rgba(7, 14, 28, 0.38);
}

body.dark-theme #portal-settings-page .portal-settings-card h6,
body.dark-theme #portal-settings-page .portal-settings-card .fw-semibold {
    color: #eaf1ff;
}

body.dark-theme #portal-settings-page .portal-settings-card .form-text,
body.dark-theme #portal-settings-page .portal-settings-card .text-muted {
    color: #b9c7e3 !important;
}

body.dark-theme #portal-settings-page .portal-settings-card .settings-config-copy {
    background-color: #1b2740;
    border-color: #3a5078;
}

body.dark-theme #portal-settings-page .portal-settings-card .form-floating > label,
body.dark-theme #portal-settings-page .portal-settings-card .form-label {
    color: #b7c6e4;
    opacity: 1;
}

body.dark-theme #portal-settings-page .portal-settings-card .form-control,
body.dark-theme #portal-settings-page .portal-settings-card .form-select,
body.dark-theme #portal-settings-page .portal-settings-card .input-group-text {
    background-color: #212f4d;
    border-color: #41557e;
    color: #edf3ff;
}

body.dark-theme #portal-settings-page .portal-settings-card .form-control:focus,
body.dark-theme #portal-settings-page .portal-settings-card .form-select:focus {
    border-color: #6f8dc8;
    box-shadow: 0 0 0 0.2rem rgba(111, 141, 200, 0.25);
}

body.dark-theme #portal-settings-page .portal-settings-card .form-floating > .form-control::placeholder {
    color: transparent;
}

body.dark-theme #portal-settings-page #settings-seating-types-table tbody td {
    background-color: #1f2b46;
    color: #e6eefc;
    border-color: rgba(227, 235, 247, 0.2);
}

body.dark-theme #portal-settings-page #settings-seating-types-table .form-check-input {
    background-color: #16233b;
    border-color: #637ea8;
}

body.dark-theme #portal-settings-page #settings-seating-types-table .form-check-input:checked {
    background-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color)));
    border-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color)));
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .settings-section-pane {
    background-color: #1f2b46;
    border: 1px solid #33486f;
    color: #e6eefc;
    box-shadow: 0 8px 22px rgba(7, 14, 28, 0.38);
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] h6,
body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .fw-semibold {
    color: #eaf1ff;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-text,
body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .text-muted {
    color: #b9c7e3 !important;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .settings-config-copy {
    background-color: #1b2740;
    border-color: #3a5078;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-floating > label,
body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-label {
    color: #b7c6e4;
    opacity: 1;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-control,
body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-select {
    background-color: #212f4d;
    border-color: #41557e;
    color: #edf3ff;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-control:focus,
body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-select:focus {
    border-color: #6f8dc8;
    box-shadow: 0 0 0 0.2rem rgba(111, 141, 200, 0.25);
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .form-floating > .form-control::placeholder {
    color: transparent;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .settings-preview-viewport-label {
    color: #b9c7e3;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .settings-preview-viewport-label.is-active {
    color: #9fc1ff;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] #settings-waitlist-preview-summon-toggle {
    background-color: #18243c;
    border-color: #3a5078;
    color: #e8f0ff;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] #settings-waitlist-preview-summon-toggle:hover,
body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] #settings-waitlist-preview-summon-toggle:focus {
    background-color: #223154;
    border-color: #4b6390;
    color: #f2f7ff;
}

body.dark-theme #portal-settings-page .portal-settings-card[data-settings-card-id="customer-waitlist"] .settings-waitlist-mobile-preview {
    background: #18243b;
    border-color: #33486f;
}

#portal-settings-page .settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

#portal-settings-page .settings-toggle-row > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

#portal-settings-page .settings-toggle-row .form-switch {
    flex: 0 0 auto;
}

#portal-settings-page #settings-waitlist-preview-summon-toggle {
    width: 180px;
    min-width: 180px;
    text-align: center;
}

#portal-settings-page .settings-preview-viewport-switch {
    justify-content: center;
    gap: 0.45rem !important;
}

#portal-settings-page .settings-preview-viewport-switch .settings-preview-viewport-label {
    min-width: 52px;
    text-align: center;
}

@media (max-width: 575.98px) {
    #portal-settings-page .settings-preview-toggle-row {
        flex-wrap: wrap;
        align-items: stretch !important;
    }

    #portal-settings-page .settings-preview-viewport-switch {
        width: 100%;
        justify-content: center;
    }

    #portal-settings-page #settings-waitlist-preview-summon-toggle {
        width: 100%;
        min-width: 0;
    }

    #portal-settings-page .settings-preview-header-row {
        align-items: flex-start !important;
    }

    #portal-settings-page .settings-customer-scroll-hint.settings-customer-scroll-hint-top {
        margin-top: 0.1rem;
    }
}

#portal-settings-page .settings-customer-scroll-hint {
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 26px;
    gap: 0.4rem;
    color: rgba(33, 84, 184, 0.82);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

#portal-settings-page .settings-customer-scroll-hint.settings-customer-scroll-hint-top {
    width: auto;
    min-height: 0;
    margin: 0;
    justify-content: flex-end;
}

#portal-settings-page .settings-customer-scroll-hint.settings-customer-scroll-hint-top .settings-customer-scroll-hint-icon {
    width: 18px;
    height: 18px;
}

#portal-settings-page .settings-customer-scroll-hint.settings-customer-scroll-hint-top .settings-customer-scroll-hint-text {
    font-size: 11px;
}

#portal-settings-page .settings-customer-scroll-hint.is-hidden {
    opacity: 0;
    transform: translateY(-2px);
}

#portal-settings-page .settings-customer-scroll-hint-icon {
    width: 22px;
    height: 22px;
    display: block;
    vertical-align: middle;
    animation: settingsScrollHintBob 1.25s ease-in-out infinite;
}

#portal-settings-page .settings-customer-scroll-hint-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

#portal-settings-page .settings-customer-scroll-hint-icon circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    opacity: 0.45;
}

#portal-settings-page .settings-customer-scroll-hint-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes settingsScrollHintBob {
    0% { transform: translateY(0); opacity: 0.65; }
    50% { transform: translateY(4px); opacity: 1; }
    100% { transform: translateY(0); opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
    #portal-settings-page .settings-customer-scroll-hint-icon {
        animation: none;
    }
}

@media (min-width: 1200px) {
    #portal-settings-page .settings-preview-toggle-row {
        position: relative;
        min-height: 36px;
    }

    #portal-settings-page .settings-preview-toggle-row .settings-preview-viewport-switch {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    #portal-settings-page .settings-customer-scroll-hint {
        display: none;
    }
}

/* Keep notification disabled selects visible; global theme sets disabled selects to opacity: 0. */
#settings-notifications-horizontal-position:disabled,
#settings-notifications-vertical-position:disabled,
#settings-notifications-timeout-seconds:disabled,
#settings-notifications-effect:disabled {
    opacity: 1;
}

#settings-theme-nav-gradient-direction:disabled,
#settings-theme-header-gradient-direction:disabled,
#settings-waitlist-bg-gradient-direction:disabled,
#settings-theme-loader-size:disabled {
    opacity: 1;
}

/* Notification color + test button should look like one control, without thick seam borders. */
#portal-settings-page #settings-notifications-success-color,
#portal-settings-page #settings-notifications-error-color {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

#portal-settings-page #settings-notifications-preview-success-inline,
#portal-settings-page #settings-notifications-preview-error-inline {
    margin-inline-start: -1px;
    border-width: 1px;
    box-shadow: none;
}

#portal-settings-page #settings-modals-effect {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

#portal-settings-page #settings-modals-preview-btn {
    margin-inline-start: -1px;
    border-width: 1px;
    box-shadow: none;
}

#portal-settings-page #settings-theme-loader-spinner {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

#portal-settings-page #settings-theme-loader-preview-btn {
    margin-inline-start: -1px;
    border-width: 1px;
    box-shadow: none;
}

#portal-settings-page .settings-theme-loader-inline-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 100%;
    min-width: 56px;
    color: #2f6ee5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

#portal-settings-page .settings-theme-loader-inline-preview.is-active {
    opacity: 1;
}

#portal-settings-page .settings-theme-loader-inline-preview.input-group-text {
    margin-inline-start: -1px;
    border-width: 1px;
    background-color: var(--bs-body-bg);
    padding-inline: 0.5rem;
}

#portal-settings-page .settings-theme-loader-inline-preview .settings-inline-loader-svg {
    width: 20px;
    height: 20px;
}

#portal-settings-page .settings-theme-loader-inline-preview .settings-inline-loader-dual-ring {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 0.2em solid var(--settings-inline-loader-muted, rgba(47, 110, 229, 0.2));
    border-top-color: currentColor;
    border-bottom-color: currentColor;
    animation: spinner-border 0.75s linear infinite;
}

.dark-theme #portal-settings-page .settings-theme-loader-inline-preview {
    color: #7fb3ff;
}

.dark-theme #portal-settings-page .settings-theme-loader-inline-preview .settings-inline-loader-dual-ring {
    border-color: rgba(127, 179, 255, 0.25);
    border-top-color: #7fb3ff;
    border-bottom-color: #7fb3ff;
}

/* Billing: improve dark theme contrast/readability for cards, forms, and table controls. */
body.dark-theme #portal-billing-page .card {
    background-color: #1a243c;
    border-color: #2f3f63;
}

body.dark-theme #portal-billing-page .billing-section-pane {
    background-color: #1f2b46;
    border: 1px solid #33486f;
    border-radius: 12px;
    color: #e6eefc;
}

body.dark-theme #portal-billing-page h6,
body.dark-theme #portal-billing-page .fw-semibold,
body.dark-theme #portal-billing-page .card-title {
    color: #eaf1ff;
}

body.dark-theme #portal-billing-page .text-muted,
body.dark-theme #portal-billing-page .form-text {
    color: #b9c7e3 !important;
}

body.dark-theme #portal-billing-page .form-floating > label {
    color: #b7c6e4;
    opacity: 1;
}

body.dark-theme #portal-billing-page .form-control,
body.dark-theme #portal-billing-page .form-select {
    background-color: #212f4d;
    border-color: #41557e;
    color: #edf3ff;
}

/* Keep floating labels crisp by hiding placeholder text under them. */
body.dark-theme #portal-billing-page .form-floating > .form-control::placeholder {
    color: transparent;
}

/* Keep non-floating placeholders (like table search) readable. */
body.dark-theme #portal-billing-page .dataTables_wrapper .form-control::placeholder,
body.dark-theme #portal-billing-page .dataTables_wrapper input::placeholder {
    color: #98a9cc;
}

body.dark-theme #portal-billing-page .form-control:focus,
body.dark-theme #portal-billing-page .form-select:focus {
    border-color: #6f8dc8;
    box-shadow: 0 0 0 0.2rem rgba(111, 141, 200, 0.25);
}

body.dark-theme #portal-billing-page .dataTables_wrapper .dataTables_length label,
body.dark-theme #portal-billing-page .dataTables_wrapper .dataTables_filter label,
body.dark-theme #portal-billing-page .dataTables_wrapper .dataTables_info {
    color: #c9d5ee !important;
}

body.dark-theme #portal-billing-page .dataTables_wrapper .dataTables_filter input,
body.dark-theme #portal-billing-page .dataTables_wrapper .dataTables_length select {
    background-color: #212f4d;
    border-color: #41557e;
    color: #edf3ff;
}

body.dark-theme #portal-billing-page .btn-link {
    color: #9fc1ff;
}

body.dark-theme #portal-billing-page .btn-link:hover,
body.dark-theme #portal-billing-page .btn-link:focus {
    color: #c2d9ff;
}

#global-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

#global-loader .portal-global-loader-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 64px;
}

#global-loader .portal-global-loader-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-loader-color, #2f6ee5);
}

#global-loader .portal-loader-svg {
    position: static;
    width: 48px;
    height: 48px;
    margin: 0;
}

#global-loader .portal-loader-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.32em;
}

#global-loader .portal-loader-grow {
    width: 2.5rem;
    height: 2.5rem;
}

#global-loader .portal-loader-dual-ring {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 0.32em solid var(--portal-loader-muted, rgba(47, 110, 229, 0.2));
    border-top-color: currentColor;
    border-bottom-color: currentColor;
    animation: spinner-border 0.85s linear infinite;
}

#global-loader .portal-loader-dots,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
}

#global-loader .portal-loader-dots-dot,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-dots-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: currentColor;
    animation: portal-loader-dot-bounce var(--portal-loader-duration, 0.85s) ease-in-out infinite;
}

#global-loader .portal-loader-dots-dot:nth-child(2),
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-dots-dot:nth-child(2) {
    animation-delay: 0.14s;
}

#global-loader .portal-loader-dots-dot:nth-child(3),
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-dots-dot:nth-child(3) {
    animation-delay: 0.28s;
}

#global-loader .portal-loader-bars,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-bars {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

#global-loader .portal-loader-bars-bar,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-bars-bar {
    width: 0.26rem;
    height: 1.2rem;
    border-radius: 999px;
    background: currentColor;
    animation: portal-loader-bar-stretch var(--portal-loader-duration, 0.85s) ease-in-out infinite;
}

#global-loader .portal-loader-bars-bar:nth-child(2),
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-bars-bar:nth-child(2) {
    animation-delay: 0.1s;
}

#global-loader .portal-loader-bars-bar:nth-child(3),
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-bars-bar:nth-child(3) {
    animation-delay: 0.2s;
}

#global-loader .portal-loader-orbit,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-orbit {
    position: relative;
    width: 2.3rem;
    height: 2.3rem;
}

#global-loader .portal-loader-orbit-ring,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 0.18em solid var(--settings-inline-loader-muted, var(--portal-loader-muted, rgba(47, 110, 229, 0.2)));
    border-top-color: currentColor;
    animation: spinner-border var(--portal-loader-duration, 0.85s) linear infinite;
}

#global-loader .portal-loader-orbit-ring.is-inner,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-orbit-ring.is-inner {
    inset: 0.34rem;
    border-width: 0.15em;
    animation-direction: reverse;
}

#global-loader .portal-loader-pulse,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-pulse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
}

#global-loader .portal-loader-pulse-core,
#portal-settings-page .settings-theme-loader-inline-preview .portal-loader-pulse-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 0.22em solid currentColor;
    animation: portal-loader-pulse var(--portal-loader-duration, 0.85s) ease-in-out infinite;
}

@keyframes portal-loader-dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.55);
        opacity: 0.45;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes portal-loader-bar-stretch {
    0%, 100% {
        transform: scaleY(0.45);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes portal-loader-pulse {
    0%, 100% {
        transform: scale(0.72);
        opacity: 0.45;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

.dark-theme #global-loader .portal-global-loader-spinner {
    color: #7fb3ff;
}

.dark-theme #global-loader .portal-loader-dual-ring {
    border-color: rgba(127, 179, 255, 0.25);
    border-top-color: #7fb3ff;
    border-bottom-color: #7fb3ff;
}

.dark-theme #global-loader .portal-loader-orbit-ring,
.dark-theme #portal-settings-page .settings-theme-loader-inline-preview .portal-loader-orbit-ring {
    border-color: rgba(127, 179, 255, 0.25);
    border-top-color: #7fb3ff;
}

#portal-settings-page .settings-waitlist-header-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid #dbe2ef;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(140deg, #22365d 0%, #3d5f9f 100%);
}

#portal-settings-page .settings-waitlist-header-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#portal-settings-page .settings-waitlist-header-preview-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f7fbff;
    font-size: 13px;
    letter-spacing: 0.02em;
    background: linear-gradient(180deg, rgba(18, 28, 48, 0.36) 0%, rgba(18, 28, 48, 0.52) 100%);
}

#portal-settings-page .settings-waitlist-header-preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    padding: 12px;
    background: transparent;
}

#portal-settings-page .settings-waitlist-header-preview-overlay.is-top-left {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

#portal-settings-page .settings-waitlist-header-preview-overlay.is-top-right {
    justify-content: flex-end;
    align-items: flex-start;
    text-align: right;
}

#portal-settings-page .settings-waitlist-header-preview-overlay.is-bottom-left {
    justify-content: flex-start;
    align-items: flex-end;
    text-align: left;
}

#portal-settings-page .settings-waitlist-header-preview-overlay.is-bottom-right {
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
}

#portal-settings-page .settings-waitlist-header-preview-overlay.is-center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

#portal-settings-page .settings-waitlist-header-preview-text {
    display: inline-block;
    width: auto;
    margin: var(--waitlist-header-preview-margin, 5px);
    font-size: var(--waitlist-header-preview-font-size, 24px);
    color: #ffffff;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

#portal-settings-page .settings-waitlist-mobile-preview {
    border: 1px solid #dbe2ef;
    border-radius: 12px;
    background: #f6f8fc;
    padding: 14px;
    display: flex;
    justify-content: center;
}

#portal-settings-page .settings-waitlist-mobile-phone {
    width: 270px;
    border-radius: 28px;
    background: #111827;
    padding: 10px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.3);
}

#portal-settings-page .settings-waitlist-mobile-screen {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #eef2f8;
    min-height: 520px;
}

#portal-settings-page .settings-waitlist-mobile-preview.is-desktop .settings-waitlist-mobile-phone {
    width: 100%;
    max-width: 680px;
    border-radius: 14px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

#portal-settings-page .settings-waitlist-mobile-preview.is-desktop .settings-waitlist-mobile-screen {
    min-height: 460px;
    border-radius: 14px;
}

#portal-settings-page .settings-waitlist-mobile-hero {
    position: relative;
    height: 160px;
    background: linear-gradient(140deg, #22365d 0%, #3d5f9f 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#portal-settings-page .settings-waitlist-mobile-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 22, 39, 0.35) 0%, rgba(13, 22, 39, 0.62) 100%);
}

#portal-settings-page .settings-waitlist-mobile-logo {
    position: absolute;
    top: 12px;
    left: 12px;
    max-height: 26px;
    max-width: 128px;
    object-fit: contain;
    z-index: 1;
}

#portal-settings-page .settings-waitlist-mobile-header {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
}

#portal-settings-page .settings-waitlist-mobile-header.is-top-left {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

#portal-settings-page .settings-waitlist-mobile-header.is-top-right {
    justify-content: flex-end;
    align-items: flex-start;
    text-align: right;
}

#portal-settings-page .settings-waitlist-mobile-header.is-bottom-left {
    justify-content: flex-start;
    align-items: flex-end;
    text-align: left;
}

#portal-settings-page .settings-waitlist-mobile-header.is-bottom-right {
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
}

#portal-settings-page .settings-waitlist-mobile-header.is-center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

#portal-settings-page #settings-waitlist-mobile-header-text {
    margin: var(--waitlist-mobile-header-margin, 5px);
    font-size: var(--waitlist-mobile-header-font-size, 24px);
    color: #fff;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
}

#portal-settings-page .settings-waitlist-mobile-card {
    margin: 8px 8px 8px;
    border: 1px solid #dbe2ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(14, 35, 74, 0.1);
    overflow: hidden;
}

#portal-settings-page .settings-waitlist-mobile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
    background: #f7f9fd;
    border-bottom: 1px solid #dbe2ef;
}

#portal-settings-page .settings-waitlist-mobile-stats > div {
    border: 1px solid #dbe2ef;
    border-radius: 8px;
    background: #fff;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#portal-settings-page .settings-waitlist-mobile-stats span {
    font-size: 10px;
    color: #627189;
    text-transform: uppercase;
}

#portal-settings-page .settings-waitlist-mobile-stats strong {
    font-size: 13px;
    color: #17243b;
}

#portal-settings-page .settings-waitlist-mobile-listhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
}

#portal-settings-page .settings-waitlist-mobile-header-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}

#portal-settings-page .settings-waitlist-mobile-refresh {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #b8c4d9;
    background: conic-gradient(#2f6ee5 35%, #cfd7e6 0);
    position: relative;
    padding: 0;
}

#portal-settings-page .settings-waitlist-mobile-refresh::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: #fff;
}

#portal-settings-page .settings-waitlist-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#portal-settings-page .settings-waitlist-mobile-list li {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 8px;
    border: 1px solid #dbe2ef;
    border-radius: 10px;
    padding: 7px;
    background: #fff;
}

#portal-settings-page .settings-waitlist-mobile-list li.is-current {
    background: rgba(47, 110, 229, 0.12);
    border-color: #c4d8fb;
}

#portal-settings-page .settings-waitlist-mobile-list li > span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #eef3fc;
    color: #35588e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

#portal-settings-page .settings-waitlist-mobile-list li strong {
    display: block;
    font-size: 12px;
    color: #17243b;
}

#portal-settings-page .settings-waitlist-mobile-list li small {
    display: block;
    font-size: 10px;
    color: #627189;
}

#portal-settings-page .settings-waitlist-mobile-list li b {
    font-size: 11px;
    color: #17243b;
}

#portal-settings-page .settings-waitlist-mobile-summon {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(10, 20, 34, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

#portal-settings-page .settings-waitlist-mobile-summon.effect-none .settings-waitlist-mobile-summon-card::before {
    display: none;
}

#portal-settings-page .settings-waitlist-mobile-summon.effect-confetti .settings-waitlist-mobile-summon-card::before,
#portal-settings-page .settings-waitlist-mobile-summon.effect-sparkle .settings-waitlist-mobile-summon-card::before,
#portal-settings-page .settings-waitlist-mobile-summon.effect-streamers .settings-waitlist-mobile-summon-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    will-change: transform, opacity;
}

#portal-settings-page .settings-waitlist-mobile-summon.effect-confetti .settings-waitlist-mobile-summon-card::before {
    background-image:
        radial-gradient(circle at 15% 18%, #2f6ee5 0 2px, transparent 3px),
        radial-gradient(circle at 28% 30%, #f59e0b 0 2px, transparent 3px),
        radial-gradient(circle at 41% 22%, #ef4444 0 2px, transparent 3px),
        radial-gradient(circle at 60% 28%, #22c55e 0 2px, transparent 3px),
        radial-gradient(circle at 78% 20%, #8b5cf6 0 2px, transparent 3px);
    animation: settingsWaitlistSummonConfetti 1.3s linear infinite;
}

#portal-settings-page .settings-waitlist-mobile-summon.effect-sparkle .settings-waitlist-mobile-summon-card::before {
    background-image:
        radial-gradient(circle at 18% 20%, rgba(96, 165, 250, 0.95) 0 1.6px, transparent 2.2px),
        radial-gradient(circle at 35% 26%, rgba(253, 224, 71, 0.95) 0 1.4px, transparent 2px),
        radial-gradient(circle at 55% 18%, rgba(251, 113, 133, 0.9) 0 1.7px, transparent 2.3px),
        radial-gradient(circle at 72% 24%, rgba(134, 239, 172, 0.9) 0 1.3px, transparent 2px),
        radial-gradient(circle at 86% 14%, rgba(196, 181, 253, 0.95) 0 1.5px, transparent 2.2px);
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.55));
    animation: settingsWaitlistSummonSparkle 1.15s ease-in-out infinite alternate;
}

#portal-settings-page .settings-waitlist-mobile-summon.effect-streamers .settings-waitlist-mobile-summon-card::before {
    background-image:
        linear-gradient(25deg, transparent 0 46%, rgba(47, 110, 229, 0.7) 47% 50%, transparent 51%),
        linear-gradient(18deg, transparent 0 58%, rgba(245, 158, 11, 0.7) 59% 62%, transparent 63%),
        linear-gradient(28deg, transparent 0 36%, rgba(239, 68, 68, 0.7) 37% 40%, transparent 41%),
        linear-gradient(20deg, transparent 0 66%, rgba(34, 197, 94, 0.7) 67% 70%, transparent 71%);
    animation: settingsWaitlistSummonStreamers 1.6s linear infinite;
}

@keyframes settingsWaitlistSummonConfetti {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0.26;
    }
    100% {
        transform: translateY(14px) rotate(5deg);
        opacity: 0.45;
    }
}

@keyframes settingsWaitlistSummonSparkle {
    0% {
        transform: scale(0.96);
        opacity: 0.22;
    }
    100% {
        transform: scale(1.04);
        opacity: 0.52;
    }
}

@keyframes settingsWaitlistSummonStreamers {
    0% {
        transform: translateY(-8px);
        opacity: 0.22;
    }
    100% {
        transform: translateY(10px);
        opacity: 0.48;
    }
}

#portal-settings-page .settings-waitlist-mobile-summon-card {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    border: 1px solid #dbe2ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(13, 28, 56, 0.28);
    padding: 12px 12px 10px;
}

#portal-settings-page .settings-waitlist-mobile-summon-card h6 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #17243b;
}

#portal-settings-page .settings-waitlist-mobile-summon-card p {
    margin: 0 0 10px;
    font-size: 12px;
    color: #627189;
}

#portal-settings-page .settings-waitlist-mobile-summon-countdown {
    margin-top: -4px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #516079;
}

body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon {
    background: rgba(4, 10, 22, 0.62);
}

body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon-card {
    border-color: rgba(145, 172, 221, 0.34);
    background: #1a2740;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon-card h6 {
    color: #eef4ff;
}

body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon-card p {
    color: #ccd9f0;
}

body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon-countdown {
    color: #aec2e6;
}

body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon-card .btn-light {
    background-color: #2a3b5f;
    border-color: #4b6594;
    color: #e9f1ff;
}

body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon-card .btn-light:hover,
body.dark-theme #portal-settings-page .settings-waitlist-mobile-summon-card .btn-light:focus {
    background-color: #31456f;
    border-color: #5a79ae;
    color: #ffffff;
}

:root {
    --portal-btn-radius: 50px;
    --portal-btn-font-weight: 600;
    --portal-btn-padding-y: 0.6rem;
    --portal-btn-padding-x: 1.2rem;
    --portal-theme-active-color: var(--primary-bg-color);
    --portal-user-nav-bg: #242f48;
    --portal-user-nav-bg-image: none;
    --portal-user-nav-text: #ffffff;
    --portal-user-header-bg: #ffffff;
    --portal-user-header-bg-image: none;
    --portal-user-header-text: #1f2a44;
}

/* Global app button primitive: rounded, consistent weight/spacing */
.btn-portal {
    border-radius: var(--portal-btn-radius) !important;
    font-weight: var(--portal-btn-font-weight);
    padding: var(--portal-btn-padding-y) var(--portal-btn-padding-x);
}

.btn-portal-nowrap {
    white-space: nowrap;
    min-width: 8rem;
}

/* Universal destructive icon button (aligned with waitlist delete style). */
.portal-action-delete-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0 !important;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.portal-action-delete-btn i {
    font-size: 12px;
    line-height: 1;
    color: #fff;
}

/* Universal icon action button size (copy/refresh/etc.). */
.portal-action-icon-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0 !important;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.portal-action-icon-btn i {
    font-size: 12px;
    line-height: 1;
}

/* Standardized primary button variant */
.btn-portal-primary {
    color: #fff;
    background-color: var(--primary-bg-color);
    border-color: var(--primary-bg-hover);
}

/* Main app dark-mode floating form consistency:
   prevents placeholder/label overlap and keeps labels readable. */
body.dark-theme .main-content .form-floating > .form-control::placeholder,
body.dark-theme .main-content .form-floating > .form-control-plaintext::placeholder,
body.dark-theme .main-content .form-floating > .form-select::placeholder,
body.dark-theme .main-content .form-floating > textarea.form-control::placeholder {
    color: transparent !important;
}

body.dark-theme .main-content .form-floating > label {
    color: #dbe5f5 !important;
    opacity: 1;
}

body.dark-theme .main-content .modal .form-floating > .form-control,
body.dark-theme .main-content .modal .form-floating > .form-select,
body.dark-theme .main-content .modal .form-floating > .form-control-plaintext {
    background-color: #1f2940;
    border-color: rgba(255, 255, 255, 0.2);
    color: #dde3ea;
}

body.dark-theme .main-content .modal .form-floating > .form-control:focus,
body.dark-theme .main-content .modal .form-floating > .form-select:focus,
body.dark-theme .main-content .modal .form-floating > .form-control-plaintext:focus {
    border-color: #6f8dc8;
    box-shadow: 0 0 0 0.2rem rgba(111, 141, 200, 0.25);
}

.btn-portal-primary:hover {
    color: #fff;
    background-color: var(--primary-bg-hover);
    border-color: var(--primary-bg-color);
}

.btn-portal-primary:focus,
.btn-portal-primary.focus {
    box-shadow: 0 0 0 0.2rem var(--primary-5);
}

/* Keep checked switch/toggle indicators aligned to active theme color. */
body.app .form-switch-input:checked ~ .form-switch-indicator,
body.app .form-switch-input:checked ~ .form-switch-indicator-lg,
body.app .form-switch-input:checked ~ .form-switch-indicator-xl {
    background: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color))) !important;
    background-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color))) !important;
    border-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color))) !important;
}

/* Keep other legacy toggles/ranges on the same active theme color globally. */
body.app .custom-control-input:checked ~ .custom-control-label::before,
body.app .form-check-input:checked {
    background-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color))) !important;
    border-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color))) !important;
}

body.app .main-toggle.on,
body.app .main-toggle-secondary.on,
body.app .main-toggle-success.on,
body.app .main-toggle-dark.on {
    background-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color))) !important;
}

body.app .form-range::-webkit-slider-thumb,
body.app .form-range::-moz-range-thumb,
body.app .form-range::-ms-thumb {
    background-color: var(--portal-theme-active-color, var(--portal-user-header-bg, var(--primary-bg-color))) !important;
}

/* Improve switch contrast on dark settings pages (off and on states). */
body.app.dark-theme #portal-settings-page .form-switch-indicator,
body.app.dark-theme #portal-settings-page .form-switch-indicator-lg,
body.app.dark-theme #portal-settings-page .form-switch-indicator-xl {
    background-color: #33415e;
    border-color: #6f82a8;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.app.dark-theme #portal-settings-page .form-switch-indicator::before,
body.app.dark-theme #portal-settings-page .form-switch-indicator-lg::before,
body.app.dark-theme #portal-settings-page .form-switch-indicator-xl::before {
    background-color: #f4f8ff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(35, 51, 79, 0.35);
}

body.app.dark-theme #portal-settings-page .form-switch-input:checked ~ .form-switch-indicator,
body.app.dark-theme #portal-settings-page .form-switch-input:checked ~ .form-switch-indicator-lg,
body.app.dark-theme #portal-settings-page .form-switch-input:checked ~ .form-switch-indicator-xl {
    border-color: rgba(255, 255, 255, 0.72) !important;
    box-shadow: inset 0 0 0 1px rgba(7, 15, 30, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.24);
}

body.app.dark-theme #portal-settings-page .form-switch-input:focus ~ .form-switch-indicator,
body.app.dark-theme #portal-settings-page .form-switch-input:focus ~ .form-switch-indicator-lg,
body.app.dark-theme #portal-settings-page .form-switch-input:focus ~ .form-switch-indicator-xl,
body.app.dark-theme #portal-settings-page .form-switch-input:focus-visible ~ .form-switch-indicator,
body.app.dark-theme #portal-settings-page .form-switch-input:focus-visible ~ .form-switch-indicator-lg,
body.app.dark-theme #portal-settings-page .form-switch-input:focus-visible ~ .form-switch-indicator-xl {
    outline: 2px solid rgba(146, 179, 243, 0.65);
    outline-offset: 2px;
}

/* Add a little space at the bottom of the left navigation pane */
.app-sidebar .main-sidemenu .side-menu {
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.app-sidebar .main-sidemenu .side-menu .portal-other-menu-heading {
    margin-top: 40px;
}

/* Keep invite-link input + copy button aligned in users invites table. */
.users-invite-link-group {
    align-items: stretch;
}

.users-invite-link-group .users-invite-link-input,
.users-invite-link-group .users-invite-link-copy {
    min-height: 38px;
}

.users-invite-link-group .users-invite-link-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#users-invites-tbody td {
    vertical-align: middle;
}

.users-invite-circle-btn {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.users-invite-circle-btn i {
    font-size: 1.6rem;
    line-height: 1;
}

.users-invite-circle-btn:hover,
.users-invite-circle-btn:focus {
    background: #16a34a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35);
}

.users-invite-circle-btn:active {
    transform: translateY(0);
}

.users-invite-circle-btn[disabled],
.users-invite-circle-btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.has-user-theme .app-sidebar {
    background-color: var(--portal-user-nav-bg) !important;
    background-image: var(--portal-user-nav-bg-image) !important;
    box-shadow: 0 -1px 14.72px 1.28px rgba(0, 0, 0, 0.1);
    border-inline-end-color: rgba(255, 255, 255, 0.1) !important;
    border-inline-start-color: rgba(255, 255, 255, 0.1) !important;
}

body.has-user-theme .app-sidebar:before {
    background-color: var(--portal-user-nav-bg) !important;
    background-image: var(--portal-user-nav-bg-image) !important;
}

body.has-user-theme .app-sidebar .main-sidebar-header,
body.has-user-theme .app-sidebar .main-sidemenu {
    background-color: var(--portal-user-nav-bg) !important;
    background-image: var(--portal-user-nav-bg-image) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.has-user-theme .main-header.side-header {
    background-color: var(--portal-user-header-bg) !important;
    background-image: var(--portal-user-header-bg-image) !important;
}

body.has-user-theme .main-header.side-header:before,
body.has-user-theme .main-header.side-header.sticky.nav.nav-item.fixed-header.visible-title.sticky-pin,
body.has-user-theme .main-header.side-header.sticky.nav.nav-item.fixed-header {
    background-color: var(--portal-user-header-bg) !important;
    background-image: var(--portal-user-header-bg-image) !important;
}

body.has-user-theme .app-sidebar .side-item.side-item-category,
body.has-user-theme .app-sidebar .side-menu__label,
body.has-user-theme .app-sidebar .side-menu__icon,
body.has-user-theme .app-sidebar .angle,
body.has-user-theme .app-sidebar .sub-angle,
body.has-user-theme .app-sidebar .slide-item,
body.has-user-theme .app-sidebar .sub-side-menu__item,
body.has-user-theme .app-sidebar .side-menu__label1 a,
body.has-user-theme .app-sidebar .app-sidebar__user-name,
body.has-user-theme .app-sidebar .app-sidebar__user-designation,
body.has-user-theme .app-sidebar .app-sidebar__user .user-info h4,
body.has-user-theme .app-sidebar .app-sidebar__user .user-info .text-muted {
    color: var(--portal-user-nav-text) !important;
}

body.has-user-theme .app-sidebar .side-menu__item.active .side-menu__label,
body.has-user-theme .app-sidebar .side-menu__item:hover .side-menu__label,
body.has-user-theme .app-sidebar .side-menu__item:focus .side-menu__label,
body.has-user-theme .app-sidebar .slide-item.active,
body.has-user-theme .app-sidebar .slide-item:hover,
body.has-user-theme .app-sidebar .slide-item:focus {
    color: var(--portal-user-nav-text) !important;
}

/* Ensure active nav links cannot fallback to default blue theme color. */
body.has-user-theme .app-sidebar .navigation.active,
body.has-user-theme .app-sidebar .side-menu__item.active,
body.has-user-theme .app-sidebar .slide-item.active,
body.has-user-theme .app-sidebar .sub-side-menu__item.active,
body.has-user-theme .app-sidebar .navigation.active .side-menu__label,
body.has-user-theme .app-sidebar .navigation.active .side-menu__icon,
body.has-user-theme .app-sidebar .navigation.active .angle,
body.has-user-theme .app-sidebar .navigation.active .sub-angle {
    color: var(--portal-user-nav-text) !important;
}

/* Left submenu indicators (little arrows/markers) should follow nav contrast color. */
body.has-user-theme .app-sidebar .slide-menu a:before,
body.has-user-theme .app-sidebar .sub-slide-menu1 .sub-slide-item2:before {
    color: var(--portal-user-nav-text) !important;
    opacity: 0.9 !important;
}

/* Submenu right-arrow marker size override (avoids editing theme SCSS). */
body.app .app-sidebar .slide-menu a:before,
body.app .app-sidebar .sub-slide-menu1 .sub-slide-item2:before {
    font-size: 13px !important;
}

body.has-user-theme .main-header.side-header,
body.has-user-theme .main-header.side-header .header-icon,
body.has-user-theme .main-header.side-header .header-icon-svgs,
body.has-user-theme .main-header.side-header .main-profile-menu .dropdown-item,
body.has-user-theme .main-header.side-header .main-header-right .nav-link,
body.has-user-theme .main-header.side-header .main-header-center .btn,
body.has-user-theme .main-header.side-header .navbar-toggler-icon {
    color: var(--portal-user-header-text) !important;
}

body.has-user-theme .main-header.side-header .layout-setting .header-icon-svgs,
body.has-user-theme .main-header.side-header .resp-btn .header-icon-svgs,
body.has-user-theme .main-header.side-header .demo-icon .header-icon-svgs {
    fill: var(--portal-user-header-text) !important;
}

body.has-user-theme .main-header.side-header .main-profile-menu .main-header-profile {
    background-color: var(--portal-user-header-bg) !important;
    background-image: var(--portal-user-header-bg-image) !important;
    color: var(--portal-user-header-text) !important;
}

body.has-user-theme .main-header.side-header .main-profile-menu .main-header-profile h6,
body.has-user-theme .main-header.side-header .main-profile-menu .main-header-profile span {
    color: var(--portal-user-header-text) !important;
}

body.has-user-theme #header-messages-dropdown .menu-header-content {
    background-color: var(--portal-user-header-bg) !important;
    background-image: var(--portal-user-header-bg-image) !important;
    color: var(--portal-user-header-text) !important;
}

/* Keep profile dropdown actions readable regardless of themed header text color. */
body.has-user-theme .main-header.side-header .main-profile-menu .dropdown-menu {
    background-color: #ffffff !important;
}

body.has-user-theme .main-header.side-header .main-profile-menu .dropdown-menu .dropdown-item,
body.has-user-theme .main-header.side-header .main-profile-menu .dropdown-menu .dropdown-item i {
    color: #1f2a44 !important;
}

body.has-user-theme .main-header.side-header .main-profile-menu .dropdown-menu .dropdown-item:hover,
body.has-user-theme .main-header.side-header .main-profile-menu .dropdown-menu .dropdown-item:focus {
    color: #1f2a44 !important;
    background-color: #eef3ff !important;
}

body.app .form-select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.4rem;
    background-image:
        linear-gradient(45deg, transparent 50%, #7b8190 50%),
        linear-gradient(135deg, #7b8190 50%, transparent 50%);
    background-position:
        calc(100% - 1.05rem) calc(50% - 2px),
        calc(100% - 0.75rem) calc(50% - 2px);
    background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
    background-repeat: no-repeat;
}

body.app.dark-theme .form-select:not([multiple]):not([size]) {
    background-image:
        linear-gradient(45deg, transparent 50%, #aab7cf 50%),
        linear-gradient(135deg, #aab7cf 50%, transparent 50%);
}

.portal-location-switcher-wrap {
    display: flex;
    align-items: center;
    min-width: 320px;
}

.portal-location-switcher {
    min-width: 190px;
    color: #1f2a44;
    background-color: #ffffff;
    border: 1px solid #9fb4e8;
    font-weight: 600;
}

.portal-location-switcher:focus {
    border-color: #2f6de1;
    box-shadow: 0 0 0 0.2rem rgba(47, 109, 225, 0.2);
}

.portal-location-switcher option {
    color: #1f2a44;
    background-color: #ffffff;
}

body.dark-theme .portal-location-switcher {
    color: #e6edf8;
    background-color: #1f2940;
    border-color: #3a4968;
}

body.dark-theme .portal-location-switcher:focus {
    border-color: #6f8dc8;
    box-shadow: 0 0 0 0.2rem rgba(111, 141, 200, 0.25);
}

body.dark-theme .portal-location-switcher option {
    color: #e6edf8;
    background-color: #1f2940;
}

@media (max-width: 767.98px) {
    .portal-location-switcher-wrap {
        min-width: 100%;
        margin-top: 0.5rem;
    }

    .portal-location-switcher {
        min-width: 0;
        width: 100%;
    }
}

/* Portal table pagination: keep Previous/Next and page controls consistent across modules. */
#users-admin-page .dataTables_wrapper .dataTables_paginate,
#waitlist-page .dataTables_wrapper .dataTables_paginate,
#locations-admin-page .dataTables_wrapper .dataTables_paginate,
#portal-billing-page .dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

#users-admin-page .dataTables_wrapper .dataTables_paginate .pagination,
#waitlist-page .dataTables_wrapper .dataTables_paginate .pagination,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .pagination,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0;
    gap: 0 !important;
    display: inline-flex;
    align-items: center;
}

#users-admin-page .dataTables_wrapper .dataTables_paginate .pagination .page-item,
#waitlist-page .dataTables_wrapper .dataTables_paginate .pagination .page-item,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .pagination .page-item,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .pagination .page-item {
    margin: 0 !important;
}

#users-admin-page .dataTables_wrapper .dataTables_paginate .pagination .page-item + .page-item,
#waitlist-page .dataTables_wrapper .dataTables_paginate .pagination .page-item + .page-item,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .pagination .page-item + .page-item,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .pagination .page-item + .page-item {
    margin-inline-start: 0 !important;
}

#users-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button,
#users-admin-page .dataTables_wrapper .dataTables_paginate .page-link,
#waitlist-page .dataTables_wrapper .dataTables_paginate .paginate_button,
#waitlist-page .dataTables_wrapper .dataTables_paginate .page-link,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .page-link,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .paginate_button,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .page-link {
    --portal-dt-page-height: 1.85rem;
    min-width: 1.85rem;
    min-height: var(--portal-dt-page-height);
    height: var(--portal-dt-page-height);
    padding: 0.22rem 0.2rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.3rem;
    line-height: 1;
    width: auto !important;
    white-space: nowrap;
}

#users-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button,
#waitlist-page .dataTables_wrapper .dataTables_paginate .paginate_button,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .paginate_button {
    margin: 0 !important;
}

#users-admin-page .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
#users-admin-page .dataTables_wrapper .dataTables_paginate .page-item.next .page-link,
#users-admin-page .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link,
#waitlist-page .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
#waitlist-page .dataTables_wrapper .dataTables_paginate .page-item.next .page-link,
#waitlist-page .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .page-item.next .page-link,
#locations-admin-page .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .page-item.next .page-link,
#portal-billing-page .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link {
    width: auto !important;
    min-width: var(--portal-dt-page-height) !important;
    min-height: var(--portal-dt-page-height) !important;
    height: var(--portal-dt-page-height) !important;
    padding-inline: 0.55rem !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Shared DataTables footer alignment contract:
   left = length, center = info, right = pagination. */
.dataTables_wrapper .dataTables-footer-left .dataTables_length {
    margin-bottom: 0;
}

.dataTables_wrapper .dataTables-footer-center .dataTables_info {
    margin: 0;
    text-align: center;
    width: 100%;
}

.dataTables_wrapper .dataTables-footer-right .dataTables_paginate {
    margin: 0;
}

/* Apply the selected header theme color to table headers across app content. */
.main-content .table > :not(caption) > * > th {
    background-color: var(--portal-user-header-bg) !important;
    background-image: var(--portal-user-header-bg-image) !important;
    color: var(--portal-user-header-text) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.dark-theme .main-content .table > :not(caption) > * > th {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Header corners should round at the top edge only (not inward on bottom). */
.main-content .table > :not(caption) > thead > tr:first-child > th:first-child,
.main-content .table-responsive .dataTables_wrapper .table > :not(caption) > thead > tr:first-child > th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 0;
}

.main-content .table > :not(caption) > thead > tr:first-child > th:last-child,
.main-content .table-responsive .dataTables_wrapper .table > :not(caption) > thead > tr:first-child > th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 0;
}

/* Subtle card-like rounding for all table frames. */
.main-content .table-responsive {
    border-radius: 10px;
    overflow: hidden;
}

.main-content .table-responsive > .table,
.main-content .table-responsive .dataTables_wrapper .table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
}

.main-content .table-responsive > .table > :not(caption) > *:last-child > *:first-child,
.main-content .table-responsive .dataTables_wrapper .table > :not(caption) > *:last-child > *:first-child {
    border-bottom-left-radius: 10px;
}

.main-content .table-responsive > .table > :not(caption) > *:last-child > *:last-child,
.main-content .table-responsive .dataTables_wrapper .table > :not(caption) > *:last-child > *:last-child {
    border-bottom-right-radius: 10px;
}

/* Per-table corner enforcement (matches the waitlist behavior exactly). */
#waitlist-page .table-responsive,
#users-admin-page .table-responsive,
#locations-admin-page .table-responsive,
#portal-billing-page .table-responsive,
#portal-settings-page #settings-seating-types-table-wrap {
    border-radius: 10px !important;
    overflow: hidden;
}

#waitlist-page #waitlist-table,
#users-admin-page #users-basic-edit,
#users-admin-page #users-invites-table,
#locations-admin-page #locations-table,
#portal-billing-page #billing-payment-methods-table,
#portal-billing-page #billing-open-invoices-table,
#portal-billing-page #billing-invoice-history-table,
#portal-billing-page #billing-payments-table,
#portal-settings-page #settings-seating-types-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px !important;
    overflow: hidden;
}

#waitlist-page #waitlist-table > thead > tr:first-child > th:first-child,
#users-admin-page #users-basic-edit > thead > tr:first-child > th:first-child,
#users-admin-page #users-invites-table > thead > tr:first-child > th:first-child,
#locations-admin-page #locations-table > thead > tr:first-child > th:first-child,
#portal-billing-page #billing-payment-methods-table > thead > tr:first-child > th:first-child,
#portal-billing-page #billing-open-invoices-table > thead > tr:first-child > th:first-child,
#portal-billing-page #billing-invoice-history-table > thead > tr:first-child > th:first-child,
#portal-billing-page #billing-payments-table > thead > tr:first-child > th:first-child,
#portal-settings-page #settings-seating-types-table > thead > tr:first-child > th:first-child {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 0 !important;
}

#waitlist-page #waitlist-table > thead > tr:first-child > th:last-child,
#users-admin-page #users-basic-edit > thead > tr:first-child > th:last-child,
#users-admin-page #users-invites-table > thead > tr:first-child > th:last-child,
#locations-admin-page #locations-table > thead > tr:first-child > th:last-child,
#portal-billing-page #billing-payment-methods-table > thead > tr:first-child > th:last-child,
#portal-billing-page #billing-open-invoices-table > thead > tr:first-child > th:last-child,
#portal-billing-page #billing-invoice-history-table > thead > tr:first-child > th:last-child,
#portal-billing-page #billing-payments-table > thead > tr:first-child > th:last-child,
#portal-settings-page #settings-seating-types-table > thead > tr:first-child > th:last-child {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 0 !important;
}

#waitlist-page #waitlist-table > tbody > tr:last-child > td:first-child,
#users-admin-page #users-basic-edit > tbody > tr:last-child > td:first-child,
#users-admin-page #users-invites-table > tbody > tr:last-child > td:first-child,
#locations-admin-page #locations-table > tbody > tr:last-child > td:first-child,
#portal-billing-page #billing-payment-methods-table > tbody > tr:last-child > td:first-child,
#portal-billing-page #billing-open-invoices-table > tbody > tr:last-child > td:first-child,
#portal-billing-page #billing-invoice-history-table > tbody > tr:last-child > td:first-child,
#portal-billing-page #billing-payments-table > tbody > tr:last-child > td:first-child,
#portal-settings-page #settings-seating-types-table > tbody > tr:last-child > td:first-child {
    border-bottom-left-radius: 10px !important;
}

#waitlist-page #waitlist-table > tbody > tr:last-child > td:last-child,
#users-admin-page #users-basic-edit > tbody > tr:last-child > td:last-child,
#users-admin-page #users-invites-table > tbody > tr:last-child > td:last-child,
#locations-admin-page #locations-table > tbody > tr:last-child > td:last-child,
#portal-billing-page #billing-payment-methods-table > tbody > tr:last-child > td:last-child,
#portal-billing-page #billing-open-invoices-table > tbody > tr:last-child > td:last-child,
#portal-billing-page #billing-invoice-history-table > tbody > tr:last-child > td:last-child,
#portal-billing-page #billing-payments-table > tbody > tr:last-child > td:last-child,
#portal-settings-page #settings-seating-types-table > tbody > tr:last-child > td:last-child {
    border-bottom-right-radius: 10px !important;
}


/* notifIt in this theme adds a glow-like drop shadow; remove for cleaner Valex-style look. */
#ui_notifIt {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    -o-box-shadow: none !important;
    filter: none !important;
    z-index: 200000 !important;
}

#ui_notifIt p {
    text-shadow: none !important;
}

#notifIt_close {
    text-shadow: none !important;
    box-shadow: none !important;
    filter: none !important;
}

#ui_notifIt,
#ui_notifIt * {
    filter: none !important;
}

/* Keep public auth field heights/padding consistent across text/password inputs. */
body.error-page1.login-img .main-signup-header .form-floating > .form-control,
body.error-page1.login-img .main-signup-header .floating-group .form-control {
    height: 56px !important;
    min-height: 56px !important;
    padding-top: 1.45rem !important;
    padding-bottom: 0.45rem !important;
}

body.error-page1.login-img .main-signup-header .form-floating > .form-control {
    border-radius: 0.5rem !important;
}

body.error-page1.login-img .main-signup-header .floating-group .form-control {
    border-top-left-radius: 0.5rem !important;
    border-bottom-left-radius: 0.5rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

body.error-page1.login-img .main-signup-header .form-floating > label {
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
}

body.error-page1.login-img .main-signup-header .floating-group .input-group-text {
    height: 56px !important;
    min-height: 56px !important;
    border-top-right-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Keep header avatar rendering consistent on mobile when source image is not square. */
.main-profile-menu .profile-user img {
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 991px) {
    /* Mobile three-dot should open user menu directly without extra icon/avatar row. */
    #navbarSupportedContent-4 .navbar-nav-right > li:not(.main-profile-menu) {
        display: none !important;
    }

    #navbarSupportedContent-4 .navbar-nav-right {
        margin: 0 !important;
        padding: 0 !important;
    }

    #navbarSupportedContent-4 .main-profile-menu {
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
        height: 0 !important;
        overflow: visible !important;
    }

    #navbarSupportedContent-4 .main-profile-menu > .profile-user {
        display: none !important;
    }

    #navbarSupportedContent-4 .main-profile-menu .dropdown-menu {
        top: 62px !important;
        inset-inline-start: 0 !important;
        inset-inline-end: 0 !important;
        width: 100% !important;
        margin: 0 !important;
    }
}
