:root {
    --bg-1: #060b1d;
    --bg-2: #0f1d41;
    --bg-glow-1: rgba(64, 247, 255, 0.16);
    --bg-glow-2: rgba(124, 58, 237, 0.24);
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --text-main: #eef2ff;
    --text-muted: rgba(238, 242, 255, 0.82);
    --text-muted-strong: #d7e3f8;
    --text-subtle-dark: #475569;
    --text-secondary-dark: #334155;
    --accent: #40f7ff;
    --accent-2: #3b82f6;
    --danger: #fb7185;

    /* Global theme contract tokens (single source for page surfaces) */
    --ui-page-bg: linear-gradient(165deg, var(--bg-1), var(--bg-2));
    --ui-card-bg: linear-gradient(165deg, rgba(10, 18, 44, 0.92), rgba(9, 25, 56, 0.86));
    --ui-card-border: rgba(125, 211, 252, 0.2);
    --ui-card-shadow: 0 12px 30px rgba(2, 8, 23, 0.34);
    --ui-title-color: #f8fbff;
    --ui-subtitle-color: var(--text-muted);
    --ui-table-head-bg: rgba(7, 16, 40, 0.97);
    --ui-table-head-text: #6fe9ff;
    --ui-table-row-odd: rgba(10, 23, 54, 0.9);
    --ui-table-row-even: rgba(13, 28, 64, 0.9);
    --ui-table-row-hover: rgba(19, 45, 96, 0.96);
    --ui-table-cell-text: #e5eeff;
    --ui-table-cell-border: rgba(96, 165, 250, 0.2);

    /* Global topbar token contract */
    --topbar-bg: rgba(5, 10, 28, 0.75);
    --topbar-border: rgba(148, 163, 184, 0.2);
    --topbar-link-text: var(--text-main);
    --topbar-link-border: rgba(148, 163, 184, 0.18);
    --topbar-link-bg: transparent;
    --topbar-link-hover-text: #ffffff;
    --topbar-link-hover-border: rgba(125, 211, 252, 0.52);
    --topbar-link-hover-bg: rgba(30, 64, 175, 0.35);
    --topbar-link-active-text: #ffffff;
    --topbar-link-active-border: rgba(125, 211, 252, 0.58);
    --topbar-link-active-bg: linear-gradient(135deg, rgba(29, 78, 216, 0.34), rgba(14, 165, 233, 0.24));
    --ui-label-color: var(--text-main);
    --ui-label-muted-color: var(--text-muted);
    --ui-chip-text: #e6f0ff;
    --ui-chip-bg: rgba(15, 23, 42, 0.42);
    --ui-chip-border: rgba(148, 163, 184, 0.35);
    --ui-badge-text: #e2e8f0;
    --ui-badge-bg: rgba(148, 163, 184, 0.25);
    --ui-badge-border: rgba(148, 163, 184, 0.4);
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--text-main);
    font-family: "Vazirmatn", "Segoe UI", sans-serif;
    text-align: start;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 10%, var(--bg-glow-1) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, var(--bg-glow-2) 0%, transparent 44%),
        linear-gradient(165deg, var(--bg-1), var(--bg-2));
    background-attachment: fixed;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Global RTL defaults for app surfaces */
html[dir="rtl"] :is(
    .dashboard-page,
    .admin-dashboard-page,
    .account-manage-shell,
    .account-manage-content,
    .support-page,
    .admin-support-page,
    .content-card,
    .support-card,
    .ticket-item,
    .panel-topbar,
    .report-filter-grid,
    .notification-settings-grid,
    .notification-test-grid,
    .editor-form
) {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] :is(
    .form-actions,
    .wheel-actions,
    .admin-actions,
    .filter-actions,
    .segment-header-row,
    .status-tags,
    .table-uniform-meta
) {
    flex-direction: row-reverse;
}

html[dir="rtl"] .table {
    direction: rtl;
}

html[dir="rtl"] .table :is(th, td) {
    text-align: right;
}

/* Keep technical content LTR in RTL pages */
html[dir="rtl"] :is(
    input[dir="ltr"],
    textarea[dir="ltr"],
    td[dir="ltr"],
    th[dir="ltr"],
    .snippet-box,
    .preview-panel pre,
    .brand-logo-current-preview code,
    .embed-box pre
) {
    direction: ltr;
    text-align: left;
}

h1,
h2,
h3,
.brand {
    font-family: "Vazirmatn", "Segoe UI", sans-serif;
    font-weight: 700;
}

a {
    color: var(--accent);
}

a:hover {
    color: #7be9ff;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
}


.brand {
    font-size: 1.35rem;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    max-width: 100%;
    min-width: 0;
}

.brand-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.5rem;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.nav-links,
.auth-nav {
    gap: 0.2rem;
}

.nav-links .nav-link,
.auth-nav .nav-link,
.nav-form .nav-link {
    color: var(--text-main);
    opacity: 0.9;
}

.nav-links .nav-link:hover,
.auth-nav .nav-link:hover,
.nav-form .nav-link:hover {
    color: #ffffff;
    opacity: 1;
}

.topbar-user-nav {
    gap: 0.35rem;
}

.topbar-primary-nav {
    gap: 0.15rem;
    align-items: center;
}

html[dir="rtl"] .topbar .container {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .topbar .navbar-collapse {
    text-align: right;
    width: 100%;
}

html[dir="rtl"] .topbar .navbar-nav {
    align-items: center;
}

html[dir="rtl"] .topbar .navbar-nav.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .topbar .navbar-nav.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

@media (min-width: 992px) {
    html[dir="rtl"] .topbar .navbar-collapse {
        justify-content: space-between;
        display: flex !important;
        align-items: center;
    }

    /* Global canonical RTL order across all pages/roles:
       brand | user tools | primary links | auth slot */
    html[dir="rtl"] .topbar-user-nav {
        order: 1;
    }

    html[dir="rtl"] .topbar-primary-nav {
        order: 2;
    }

    html[dir="rtl"] .topbar-login-slot {
        order: 3;
    }

    html[dir="rtl"] .topbar .brand {
        order: 3;
        margin-inline-start: 0;
        margin-inline-end: 0.95rem;
    }

    html[dir="rtl"] .topbar .navbar-toggler {
        order: 2;
        margin-inline-start: 0.5rem;
        margin-inline-end: 0;
    }

    html[dir="rtl"] .topbar .navbar-collapse {
        order: 1;
        direction: rtl;
        text-align: right;
    }

    html[dir="rtl"] .topbar .navbar-nav,
    html[dir="rtl"] .topbar-primary-nav,
    html[dir="rtl"] .topbar-user-nav,
    html[dir="rtl"] .topbar-login-slot .auth-nav {
        direction: rtl;
        flex-direction: row;
    }

    html[dir="rtl"] .topbar .dropdown-menu {
        direction: rtl;
        text-align: right;
    }

    .topbar .brand {
        margin-inline-end: 1rem;
    }

    .topbar-primary-nav .nav-link {
        font-size: 0.95rem;
        padding: 0.45rem 0.55rem !important;
        white-space: nowrap;
    }

    .topbar-primary-nav .dropdown-toggle.topbar-link-secondary {
        padding-inline: 0.75rem !important;
    }

    .topbar-user-nav .topbar-link,
    .topbar-login-slot .topbar-link {
        padding: 0.42rem 0.68rem !important;
        font-size: 0.92rem;
    }

    .topbar-user-nav,
    .topbar-primary-nav {
        flex-wrap: nowrap;
    }

    .topbar .navbar > .container {
        gap: 0.75rem;
    }

    .topbar-login-slot {
        max-width: 210px;
    }

    .topbar .navbar-collapse {
        display: flex !important;
        align-items: center;
        gap: 0.6rem;
    }

    .topbar-primary-nav,
    .topbar-user-nav,
    .topbar-login-slot .auth-nav {
        min-width: 0;
        align-items: center;
    }

    .topbar-primary-nav {
        flex: 1 1 auto;
        overflow: visible;
    }

    .topbar .nav-link,
    .topbar-link {
        line-height: 1.2;
    }
}

.topbar-link {
    color: var(--topbar-link-text) !important;
    border: 1px solid var(--topbar-link-border);
    background: var(--topbar-link-bg);
    border-radius: 999px;
    padding: 0.45rem 0.82rem !important;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.topbar-link:hover,
.topbar-link:focus-visible {
    color: var(--topbar-link-hover-text) !important;
    border-color: var(--topbar-link-hover-border);
    background: var(--topbar-link-hover-bg);
    transform: translateY(-1px);
}

.topbar-link-active {
    color: var(--topbar-link-active-text) !important;
    border-color: var(--topbar-link-active-border);
    background: var(--topbar-link-active-bg);
}

.topbar-link-highlight {
    border-color: rgba(34, 211, 238, 0.55);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.26), rgba(29, 78, 216, 0.28));
}

.topbar-link-admin {
    border-color: rgba(251, 113, 133, 0.42);
    background: linear-gradient(135deg, rgba(190, 24, 93, 0.22), rgba(239, 68, 68, 0.18));
}

.topbar-link-secondary {
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(15, 23, 42, 0.18);
}

.topbar-credit-meta {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.68rem;
    line-height: 1.25;
    color: rgba(226, 232, 240, 0.9);
    white-space: nowrap;
}

.topbar-dropdown-meta {
    display: block;
    margin-top: 0.18rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(191, 219, 254, 0.86);
    white-space: normal;
}

.topbar-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.05rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    margin-inline-start: 0.4rem;
    border: 1px solid transparent;
    color: var(--ui-badge-text);
}

.topbar-state-badge.is-good {
    color: #dcfce7;
    background: rgba(22, 163, 74, 0.22);
    border-color: rgba(34, 197, 94, 0.34);
}

.topbar-state-badge.is-low {
    color: #fef3c7;
    background: rgba(217, 119, 6, 0.24);
    border-color: rgba(245, 158, 11, 0.34);
}

.topbar-state-badge.is-empty {
    color: #fecdd3;
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(248, 113, 113, 0.32);
}

.topbar-ticket-badge {
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

.topbar-notification-badge {
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 210px;
}

.profile-avatar {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: #e2e8f0;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.95), rgba(14, 165, 233, 0.92));
    border: 1px solid rgba(125, 211, 252, 0.58);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.45);
    flex-shrink: 0;
}

.profile-chip-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip,
.visual-effect-chip,
.style-combo-chip,
.table-uniform-chip {
    color: var(--ui-chip-text);
    background: var(--ui-chip-bg);
    border-color: var(--ui-chip-border);
}

label,
.form-label,
.col-form-label,
.form-check-label,
legend,
.form-floating > label {
    color: var(--ui-label-color);
}

:is(label.text-muted, .form-label.text-muted, .col-form-label.text-muted, .form-check-label.text-muted, legend.text-muted, .form-floating > label.text-muted) {
    color: var(--ui-label-muted-color);
}

.security-dot {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(5, 10, 28, 0.95);
    flex-shrink: 0;
}

.security-dot.is-safe {
    background: #22c55e;
}

.security-dot.is-risk {
    background: #f59e0b;
}

.auth-user-dropdown {
    min-width: 260px;
}

.auth-user-dropdown .dropdown-item i {
    width: 1.1rem;
    text-align: center;
}

.nav-form {
    margin: 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.footer-shell {
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    background:
        linear-gradient(180deg, rgba(8, 15, 36, 0.96), rgba(5, 10, 28, 0.9)),
        rgba(5, 10, 28, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-row {
    padding: 1.1rem 0 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1.1rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
    min-width: 0;
}

.footer-brand-name {
    color: #f8fbff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.footer-brand-copy {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.84rem;
    max-width: 24rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem 0.9rem;
    max-width: min(100%, 48rem);
    margin-inline: auto;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #8be8ff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 0.42rem 0.74rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    background: rgba(15, 23, 42, 0.28);
    transition: color 0.18s ease, opacity 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.footer-links a::after {
    content: "";
    position: absolute;
    inset-inline: 0.7rem;
    bottom: 0.32rem;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.18s ease;
    opacity: 0.75;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #d9fbff;
    border-color: rgba(125, 211, 252, 0.42);
    background: rgba(30, 64, 175, 0.22);
    transform: translateY(-1px);
}

.footer-links a:hover::after,
.footer-links a:focus-visible::after {
    transform: scaleX(1);
}

.footer-links i {
    font-size: 0.88rem;
    opacity: 0.92;
}

.footer-company-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}

.footer-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.52rem 0.88rem;
    border-radius: 999px;
    color: #eff6ff;
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.34), rgba(6, 182, 212, 0.22));
    border: 1px solid rgba(125, 211, 252, 0.36);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.16);
    transition: transform 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
    color: #ffffff;
    border-color: rgba(125, 211, 252, 0.58);
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.footer-enamad-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 98px;
    min-height: 98px;
    overflow: hidden;
    padding: 0.35rem 0.4rem;
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.footer-enamad-link:hover,
.footer-enamad-link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.55);
    background: rgba(30, 41, 59, 0.55);
}

.footer-enamad-link img {
    display: block;
    width: 72px !important;
    height: 72px !important;
    max-width: none;
    object-fit: contain;
    flex: 0 0 auto;
}

.footer-enamad-link-text {
    font-size: 0.76rem;
    color: #dbeafe;
    line-height: 1.35;
    margin: 0.2rem 0 0;
    text-align: center;
    white-space: normal;
}

.footer-enamad-fallback {
    display: none;
    font-size: 0.8rem;
    color: #c8daf7;
    border: 1px dashed rgba(125, 211, 252, 0.45);
    border-radius: 0.8rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.35;
}

.footer-enamad-link.is-fallback .footer-enamad-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
}

.creator-credit {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    color: var(--text-muted);
    text-align: left;
    min-width: 0;
    white-space: nowrap;
}

.creator-credit-label {
    color: rgba(226, 232, 240, 0.68);
    font-size: 0.82rem;
}

.creator-credit a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.creator-credit a:hover {
    color: #dbeafe;
    text-decoration: underline;
}

@media (max-width: 1400px) {
    .footer-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }

    .footer-links {
        grid-column: 1 / -1;
        justify-content: center;
        max-width: min(100%, 64rem);
    }

    .footer-company-block {
        align-items: flex-start;
    }

    html[dir="rtl"] .footer-company-block {
        align-items: flex-end;
    }
}

@media (max-width: 992px) {
    .footer-company-block {
        align-items: center;
    }

    .footer-enamad-link {
        width: 92px;
        min-height: 92px;
    }
}

.landing-hero {
    padding: 4.5rem 0 3rem;
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1.4fr 1fr;
    grid-template-areas: "copy preview";
    align-items: start;
}

html[dir="rtl"] .hero-grid {
    grid-template-columns: 1fr 1.4fr;
    grid-template-areas: "preview copy";
    align-items: start;
}

.hero-copy-panel {
    grid-area: copy;
    align-self: start;
    padding: 1.35rem 1.45rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.hero-copy-content {
    max-width: 42rem;
}

html[dir="rtl"] .hero-copy-panel {
    text-align: right;
}

.hero-preview-panel {
    grid-area: preview;
    align-self: start;
    margin-top: 0;
}

.hero-grid > *,
.auth-login-layout > *,
.report-grid > *,
.feature-grid > *,
.theme-cards > *,
.wheel-cards > * {
    min-width: 0;
}

.chip {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.32), rgba(64, 247, 255, 0.3));
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
}

.landing-hero h1 {
    font-size: clamp(2rem, 3.8vw, 3.05rem);
    line-height: 1.35;
    margin-bottom: 0.85rem;
    overflow-wrap: anywhere;
    letter-spacing: -0.01em;
}

.landing-hero p {
    color: var(--text-muted);
    max-width: 60ch;
    font-size: 1.08rem;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-actions-wrap {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    justify-items: end;
}

.hero-actions-primary {
    margin-top: 0;
}

.hero-actions-primary .btn {
    min-width: 11rem;
    border-radius: 0.75rem;
    font-weight: 800;
}

.hero-actions-secondary {
    margin-top: 0;
    gap: 0.5rem;
}

.hero-actions-secondary .btn {
    padding-inline: 0.8rem !important;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(100, 116, 139, 0.3);
}

html[dir="rtl"] .hero-actions {
    justify-content: flex-start;
}

html[dir="rtl"] .hero-actions-wrap {
    justify-items: start;
}

.btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #00b8db);
    border: 0;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #0891b2);
}

.preview-panel {
    background: linear-gradient(150deg, rgba(11, 18, 44, 0.88), rgba(13, 38, 85, 0.7));
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1.2rem;
    padding: 1.4rem;
    box-shadow: 0 12px 36px rgba(5, 10, 28, 0.35);
}

.preview-panel h3 {
    margin-bottom: 0.8rem;
}

.preview-panel pre {
    margin: 0.6rem 0 0.9rem;
    padding: 1rem;
    border-radius: 0.8rem;
    background: rgba(3, 7, 18, 0.8);
    color: #9cf4ff;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    direction: ltr;
    text-align: left;
}

.theme-showcase,
.platform-grid {
    padding: 2rem 0 3rem;
}

.theme-showcase h2,
.platform-grid h2 {
    margin-bottom: 1.2rem;
}

.theme-cards,
.feature-grid,
.wheel-cards,
.admin-kpis,
.report-kpi-grid,
.report-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-page .content-card,
.admin-dashboard-page .content-card {
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

.dashboard-page .report-filter-grid > div,
.admin-dashboard-page .report-filter-grid > div {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.82rem;
    background: rgba(15, 23, 42, 0.44);
    padding: 0.6rem;
}

.dashboard-page .report-filter-grid .form-label,
.admin-dashboard-page .report-filter-grid .form-label {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #cbd5e1;
}

.dashboard-page .wheel-card {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1rem;
    background:
        radial-gradient(circle at 16% 10%, rgba(56, 189, 248, 0.1), transparent 38%),
        linear-gradient(160deg, rgba(10, 18, 45, 0.86), rgba(12, 34, 74, 0.74));
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-page .wheel-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.44);
    box-shadow: 0 16px 28px rgba(2, 6, 23, 0.32);
}

.dashboard-page .wheel-actions .btn,
.dashboard-page .wheel-actions form {
    min-height: 2.15rem;
}

.dashboard-page .panel-topbar .btn,
.admin-dashboard-page .panel-topbar .btn {
    min-height: 2.25rem;
}

.theme-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.theme-card,
.feature-card,
.content-card {
    background: linear-gradient(160deg, rgba(17, 24, 54, 0.86), rgba(17, 30, 67, 0.76));
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1rem 1.1rem;
}

.auto-contrast-surface {
    color: var(--surface-text-dynamic, inherit);
}

.auto-contrast-surface h1,
.auto-contrast-surface h2,
.auto-contrast-surface h3,
.auto-contrast-surface h4,
.auto-contrast-surface h5,
.auto-contrast-surface h6 {
    color: var(--surface-text-dynamic, inherit);
}

.auto-contrast-surface .muted,
.auto-contrast-surface .panel-topbar p,
.auto-contrast-surface .kpi-card span,
.auto-contrast-surface .preset-label,
.auto-contrast-surface .form-text {
    color: var(--surface-muted-dynamic, var(--text-muted));
}

.auto-contrast-surface a:not(.btn):not(.nav-link):not(.tag) {
    color: var(--surface-link-dynamic, var(--accent));
}

.auto-contrast-surface a:not(.btn):not(.nav-link):not(.tag):hover {
    filter: brightness(1.12);
}

.auto-contrast-surface .table thead th {
    color: var(--surface-muted-dynamic, #c7d2fe);
}

.auto-contrast-surface[data-surface-tone="light"] .form-control,
.auto-contrast-surface[data-surface-tone="light"] .form-select,
.auto-contrast-surface[data-surface-tone="light"] .auth-input {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.24);
    color: #0f172a;
}

.auto-contrast-surface[data-surface-tone="light"] .form-control::placeholder,
.auto-contrast-surface[data-surface-tone="light"] .auth-input::placeholder {
    color: rgba(15, 23, 42, 0.54);
}

.auto-contrast-surface[data-surface-tone="light"] .form-control:focus,
.auto-contrast-surface[data-surface-tone="light"] .form-select:focus,
.auto-contrast-surface[data-surface-tone="light"] .auth-input:focus {
    border-color: rgba(29, 78, 216, 0.62);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.18);
    color: #0f172a;
}

.theme-card p,
.feature-card p,
.muted {
    color: var(--text-muted);
}

.theme-card.neon {
    box-shadow: inset 0 0 0 1px rgba(64, 247, 255, 0.4), 0 0 0 1px rgba(64, 247, 255, 0.12);
}

.theme-card.sunset {
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.4), 0 0 0 1px rgba(251, 146, 60, 0.1);
}

.theme-card.ocean-glass {
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.42), 0 0 0 1px rgba(129, 140, 248, 0.1);
}

.theme-card.carnival-lights {
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.42), 0 0 0 1px rgba(251, 191, 36, 0.1);
}

.theme-card.blossom-garden {
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.42), 0 0 0 1px rgba(244, 114, 182, 0.1);
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-topbar {
    --panel-title-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.35rem);
    --panel-subtitle-size: 1rem;
    --panel-subtitle-color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Title/action layout works regardless of child order in markup */
.panel-topbar > :has(h1, h2, h3) {
    min-width: 0;
    flex: 1 1 22rem;
}

.panel-topbar > :not(:has(h1, h2, h3)):not(.btn):not(button):not(a) {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

html[dir="rtl"] .panel-topbar > :not(:has(h1, h2, h3)):not(.btn):not(button):not(a) {
    justify-content: flex-start;
}

html[dir="ltr"] .panel-topbar > :not(:has(h1, h2, h3)):not(.btn):not(button):not(a) {
    justify-content: flex-end;
}

.panel-topbar :is(h1, h2, h3) {
    margin: 0;
    line-height: 1.24;
    letter-spacing: -0.01em;
    font-weight: 800;
}

.panel-topbar h1 {
    font-size: var(--panel-title-size);
}

.panel-topbar :is(h2, h3) {
    font-size: clamp(1.35rem, 1.05rem + 0.9vw, 1.8rem);
}

.panel-topbar p {
    margin: 0.42rem 0 0;
    font-size: var(--panel-subtitle-size);
    font-weight: 500;
    line-height: 1.5;
    color: var(--panel-subtitle-color);
}

/* Single-column variant for marketing/public pages that still use panel-topbar typography */
.panel-topbar.panel-topbar-single {
    display: block;
}

.release-notes-page .release-note-item {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.9rem;
    padding: 0.95rem 1rem;
    background: rgba(15, 23, 42, 0.2);
}

.release-notes-page .release-note-item p {
    color: var(--text-main);
}

.release-notes-page .panel-topbar-meta {
    align-self: flex-start;
}

.wheel-cards {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.theme-preset-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 100%;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 32%),
        linear-gradient(160deg, rgba(14, 20, 46, 0.94), rgba(16, 33, 72, 0.82));
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    padding: 1rem 1.05rem;
}

.theme-preset-card::after {
    content: "";
    position: absolute;
    inset-inline: 1rem;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.85), transparent);
    opacity: 0.7;
}

.theme-preset-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: flex-start;
}

.theme-preset-card-head h3 {
    margin: 0 0 0.2rem;
    font-size: 1.02rem;
}

.theme-preset-description {
    margin: 0;
    color: var(--surface-muted-dynamic, var(--text-muted));
    min-height: 2.7rem;
}

.theme-preset-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.82rem;
    color: var(--surface-text-dynamic, var(--text-main));
}

.theme-swatch i {
    width: 0.95rem;
    height: 0.95rem;
    display: inline-block;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.theme-preset-mini-preview {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.8rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.theme-preset-mini-wheel {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    flex: 0 0 auto;
    border: 6px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.theme-preset-mini-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.theme-preset-mini-copy strong {
    color: var(--surface-text-dynamic, var(--text-main));
}

.theme-preset-mini-copy span {
    font-size: 0.82rem;
    color: var(--surface-muted-dynamic, var(--text-muted));
}

.theme-preset-card-actions,
.theme-preset-apply-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-preset-apply-form .form-select {
    min-width: 12rem;
    flex: 1 1 12rem;
}

.wheel-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.status-tags,
.wheel-actions,
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wheel-share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.wheel-card-details-block,
.wheel-card-subdetails {
    margin-top: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.85rem;
    background: rgba(2, 6, 23, 0.34);
}

.wheel-card-details-block > summary,
.wheel-card-subdetails > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: #dbeafe;
    padding: 0.75rem 0.85rem;
}

.wheel-card-details-block > summary::-webkit-details-marker,
.wheel-card-subdetails > summary::-webkit-details-marker {
    display: none;
}

.wheel-card-details-body {
    padding: 0 0.8rem 0.8rem;
}

.wheel-card-subdetails {
    background: rgba(255, 255, 255, 0.04);
}

.wheel-preview-block {
    margin-top: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.85rem;
    background: rgba(2, 6, 23, 0.46);
    padding: 0.6rem 0.7rem;
}

.wheel-preview-block > summary {
    cursor: pointer;
    color: #bae6fd;
    font-weight: 700;
    list-style: none;
}

.wheel-preview-block > summary::-webkit-details-marker {
    display: none;
}

.wheel-preview-frame-wrap {
    margin-top: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.75);
}

.wheel-preview-frame {
    width: 100%;
    min-height: 640px;
    border: 0;
    display: block;
    background: transparent;
}

.user-admin-form {
    min-width: 220px;
}

.user-admin-form .form-control,
.user-admin-form .form-check-label {
    font-size: 0.82rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid #64748b;
    background: #334155;
    color: #f8fafc;
}

.tag-good {
    background: #166534;
    color: #ecfdf5;
    border-color: #22c55e;
}

.tag-danger {
    background: #991b1b;
    color: #fff1f2;
    border-color: #ef4444;
}

.tag-muted {
    background: #475569;
    color: #f8fafc;
    border-color: #94a3b8;
}

/* Admin Table Enhancements */
.admin-data-table .muted {
    color: #cbd5e1 !important; /* Higher contrast than default muted */
    opacity: 0.9;
}

.admin-data-table .small.muted {
    color: #94a3b8 !important;
}

.admin-data-table th.sortable {
    cursor: pointer;
    position: relative;
    padding-inline-start: 20px;
}

.admin-data-table th.sortable::after {
    content: "\F226"; /* Bootstrap Icon code for arrow-down-up */
    font-family: bi;
    position: absolute;
    inset-inline-start: 4px;
    opacity: 0.3;
    font-size: 0.8rem;
}

.admin-data-table th.sortable:hover::after {
    opacity: 0.7;
}

.admin-data-table th.sort-asc::after {
    content: "\F145" !important; /* chevron-up */
    opacity: 1 !important;
    color: var(--accent);
}

.admin-data-table th.sort-desc::after {
    content: "\F128" !important; /* chevron-down */
    opacity: 1 !important;
    color: var(--accent);
}
.warning-color{
    color: #fffbeb;
}
.tag-warning {
    background: #92400e;
    color: #fffbeb;
    border: 1px solid #f59e0b;
}

.wheel-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
    color: var(--text-muted);
}

.embed-box {
    margin-bottom: 1rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0.75rem;
    background: rgba(2, 6, 23, 0.65);
}

.embed-label {
    font-size: 0.78rem;
    color: #93c5fd;
    margin-bottom: 0.35rem;
}

.embed-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #bae6fd;
    transition: box-shadow 0.2s ease;
    cursor: copy;
}

img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

.embed-box pre.copied {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.6) inset;
}

.copy-text-btn.copied {
    border-color: rgba(34, 197, 94, 0.75);
    color: #dcfce7;
}

.public-link-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.public-link-text {
    flex: 1 1 260px;
    min-width: 220px;
    word-break: break-all;
    color: #93c5fd;
    text-decoration: none;
}

.public-link-text:hover {
    color: #dbeafe;
    text-decoration: underline;
}

.topbar .navbar,
.topbar .container,
.topbar .navbar-collapse,
.topbar .navbar-nav,
.topbar-login-slot,
.auth-nav {
    min-width: 0;
}

.topbar .navbar-toggler {
    flex-shrink: 0;
}

.qr-panel {
    margin-top: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    padding: 0.85rem;
    background: #ffffff;
}

.qr-canvas-wrap {
    display: inline-block;
    background: #ffffff;
    padding: 0.45rem; /* extra quiet zone around QR modules */
    line-height: 0;
}

.qr-canvas-wrap canvas,
.qr-canvas-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
}

.theme-note {
    border-radius: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.62);
}

.theme-note ul {
    margin-bottom: 0;
    padding-right: 1rem;
    padding-left: 0;
}

.theme-note li {
    margin-bottom: 0.6rem;
    color: var(--text-muted);
}

.editor-side-note-head {
    margin-bottom: 0.85rem;
}

.editor-side-note-head h3 {
    margin-bottom: 0.3rem;
}

.editor-note-group {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
}

.editor-note-group + .editor-note-group {
    margin-top: 0.7rem;
}

.editor-note-group > summary {
    cursor: pointer;
    list-style: none;
    padding: 0.72rem 0.8rem;
    color: #e2e8f0;
    font-weight: 700;
}

.editor-note-group > summary::-webkit-details-marker {
    display: none;
}

.editor-note-group ul {
    padding: 0 1.6rem 0.85rem 0.8rem;
}

.theme-note,
.theme-media-box,
.editor-live-preview {
    min-width: 0;
}

.editor-live-preview[open] {
    padding-bottom: 1rem;
}

.editor-preview-quick-toggle {
    width: 100%;
    position: sticky;
    top: 0.75rem;
    z-index: 3;
    backdrop-filter: blur(8px);
}

.editor-live-preview > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    margin-bottom: 0.9rem;
}

.editor-live-preview > summary::-webkit-details-marker {
    display: none;
}

.editor-live-preview > summary span {
    color: #f8fbff;
    font-weight: 800;
    font-size: 1.05rem;
}

.editor-live-preview > summary small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.editor-live-preview-body {
    margin-bottom: 0.75rem;
}

.editor-form-group {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.editor-form-group + .editor-form-group {
    margin-top: 0.9rem;
}

.editor-form-group > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.editor-form-group > summary::-webkit-details-marker {
    display: none;
}

.editor-form-group > summary span {
    color: #f8fbff;
    font-weight: 800;
}

.editor-form-group > summary small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.editor-form-group-body {
    padding: 0.95rem 1rem 1rem;
}

.editor-inline-note {
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 0.8rem;
    padding: 0.75rem 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.88rem;
}

.blog-editor-shell {
    overflow: hidden;
    border: 1px solid var(--blog-editor-shell-border);
    border-radius: 0.95rem;
    background: var(--blog-editor-shell-bg);
    box-shadow: var(--blog-editor-shell-shadow);
}

.blog-editor-toolbar {
    background: var(--blog-editor-toolbar-bg);
    border-color: var(--blog-editor-toolbar-border) !important;
}

.blog-editor-toolbar .btn {
    color: var(--blog-editor-toolbar-text);
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.35);
}

.blog-editor-toolbar .btn:hover,
.blog-editor-toolbar .btn:focus-visible {
    color: #ffffff;
    background: rgba(30, 64, 175, 0.32);
    border-color: rgba(125, 211, 252, 0.5);
}

.blog-editor-surface {
    min-height: 360px;
    outline: none;
    white-space: normal;
    background: var(--blog-editor-surface-bg);
    color: var(--blog-editor-surface-text);
    border-top: 1px solid var(--blog-editor-surface-border);
    caret-color: currentColor;
}

.blog-editor-surface:focus {
    background: var(--blog-editor-surface-bg-focus);
}

.editor-picker-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
}

.editor-picker-card > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.72rem 0.8rem;
}

.editor-picker-card > summary::-webkit-details-marker {
    display: none;
}

.editor-picker-card > summary span {
    color: #eaf2ff;
    font-weight: 700;
}

.editor-picker-card > summary small {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.editor-picker-card-body {
    padding: 0 0.75rem 0.75rem;
}

.auth-login-page {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
}

.auth-login-layout {
    width: min(1080px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 1.1rem;
    align-items: stretch;
}

.auth-brand-panel,
.auth-card {
    background: linear-gradient(160deg, rgba(11, 20, 44, 0.9), rgba(17, 36, 79, 0.72));
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 1rem;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.38);
}

.auth-brand-panel {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-brand-panel h1 {
    margin: 0.4rem 0 0.85rem;
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
}

.auth-brand-panel p {
    color: var(--text-muted);
    line-height: 1.9;
}

.auth-brand-panel :is(.text-muted, .text-secondary, .text-white-50, .small),
.auth-card :is(.text-muted, .text-secondary, .text-white-50, .small) {
    opacity: 1 !important;
}

.auth-points {
    margin: 0.7rem 0 0;
    padding-right: 1.1rem;
}

.auth-points li {
    margin-bottom: 0.55rem;
    color: #dbeafe;
}

.auth-form-panel {
    display: grid;
    gap: 1rem;
}

.auth-card {
    padding: 1.25rem;
}

.auth-card h2,
.auth-card h3 {
    margin-bottom: 0.9rem;
}

.auth-card .auth-method-tabs {
    gap: 0.45rem;
}

.auth-card .auth-method-tabs .nav-item {
    flex: 1 1 0;
}

.auth-card .auth-method-tab {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(15, 23, 42, 0.46);
    color: #bae6fd;
    font-weight: 700;
    min-height: 2.8rem;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.auth-card .auth-method-tab:hover {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.86);
    background: rgba(30, 64, 175, 0.34);
}

.auth-card .auth-method-tab.active {
    color: #eff6ff;
    border-color: rgba(14, 165, 233, 0.86);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.88), rgba(14, 165, 233, 0.72));
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.2);
}

.auth-card .auth-alt-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-width: 1px;
    border-color: rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.48);
    color: #dbeafe;
    font-weight: 700;
}

.auth-card .auth-alt-login-btn:hover,
.auth-card .auth-alt-login-btn:focus-visible {
    border-color: rgba(96, 165, 250, 0.85);
    background: rgba(30, 58, 138, 0.42);
    color: #ffffff;
}

.auth-form .form-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.auth-input {
    min-height: 3rem;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: #f8fafc;
}

.auth-input::placeholder {
    color: rgba(226, 232, 240, 0.7);
}

.auth-input:focus {
    border-color: rgba(64, 247, 255, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.24);
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
}

.auth-links {
    display: grid;
    gap: 0.45rem;
    font-size: 0.94rem;
}

.auth-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.72rem;
    border-radius: 0.62rem;
    border: 1px solid rgba(56, 189, 248, 0.48);
    background: rgba(15, 23, 42, 0.46);
    color: #bae6fd;
    text-decoration: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.auth-links a:hover {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.86);
    background: rgba(30, 64, 175, 0.34);
    text-decoration: none;
}

.identity-action-links a.identity-link-primary {
    border-color: rgba(59, 130, 246, 0.85);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.86), rgba(14, 165, 233, 0.72));
    color: #eff6ff;
}

.identity-action-links a.identity-link-primary:hover,
.identity-action-links a.identity-link-primary:focus-visible {
    border-color: rgba(96, 165, 250, 1);
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.94), rgba(2, 132, 199, 0.86));
    color: #ffffff;
}

.external-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.75rem;
}

.external-buttons .btn {
    width: 100%;
    min-height: 4.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 0.9rem;
    text-align: start;
    overflow: hidden;
}

.auth-provider-button {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.auth-provider-button:hover,
.auth-provider-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.auth-provider-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.12rem;
    line-height: 1.2;
}

.auth-provider-name {
    font-weight: 800;
    font-size: 0.98rem;
}

.auth-provider-subtitle {
    font-size: 0.78rem;
    opacity: 0.72;
}

.auth-provider-mark {
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 6px 14px rgba(15, 23, 42, 0.12);
}

.auth-provider-mark-google {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.96));
    border-color: rgba(66, 133, 244, 0.22);
}

.auth-provider-mark-microsoft {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
    border-color: rgba(0, 164, 239, 0.2);
}

.auth-provider-mark-github {
    background: linear-gradient(135deg, rgba(24, 24, 24, 0.98), rgba(31, 41, 55, 0.98));
    border-color: rgba(148, 163, 184, 0.18);
}

.auth-provider-mark-oidc {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    border-color: rgba(56, 189, 248, 0.22);
}

.auth-provider-mark-passkey {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(224, 231, 255, 0.96));
    border-color: rgba(59, 130, 246, 0.22);
}

.auth-provider-mark-external {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
    border-color: rgba(148, 163, 184, 0.24);
}

.auth-provider-icon {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
}

.auth-provider-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.auth-provider-heading .auth-provider-mark {
    width: 1.6rem;
    height: 1.6rem;
    flex-basis: 1.6rem;
    border-radius: 0.55rem;
    box-shadow: none;
}

.embed-key-box {
    margin-top: 1rem;
    padding: 0.65rem;
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(148, 163, 184, 0.35);
}

.logo-file-meta {
    margin-top: 0.28rem;
    color: var(--text-muted);
}

.logo-file-meta.is-error {
    color: #fecdd3;
}

.brand-logo-current-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.82rem;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    background: rgba(15, 23, 42, 0.42);
}

.brand-logo-current-preview {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.brand-logo-current-preview img {
    width: 3rem;
    height: 3rem;
    border-radius: 0.7rem;
    object-fit: contain;
    background: #ffffff;
    padding: 0.2rem;
    border: 1px solid rgba(15, 23, 42, 0.18);
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.24);
}

.brand-logo-current-preview code {
    display: block;
    max-width: 100%;
    color: #93c5fd;
    word-break: break-all;
    direction: ltr;
    text-align: left;
    background: rgba(2, 6, 23, 0.55);
    border-radius: 0.45rem;
    padding: 0.25rem 0.42rem;
}

.brand-logo-current-preview.logo-removed-state {
    opacity: 0.5;
    filter: grayscale(1);
}

.editor-live-preview {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.9rem;
    padding: 0.8rem;
    background: rgba(15, 23, 42, 0.56);
}

.editor-widget-preview {
    --editor-env-color: #0f172a;
    --editor-text-color: #e2e8f0;
    --editor-muted-text: rgba(226, 232, 240, 0.82);
    --editor-card: rgba(15, 23, 42, 0.82);
    --editor-border: rgba(148, 163, 184, 0.3);
    --editor-accent: #38bdf8;
    --editor-secondary: #818cf8;
    --editor-pattern: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 16%, transparent 16% 100%);
    --editor-pattern-opacity: 0.2;
    --editor-surface-opacity: 0.82;
    --editor-shadow-strength: 0.58;
    --editor-bg-image: none;
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, color-mix(in srgb, rgba(2, 6, 23, 0.85) calc(var(--editor-surface-opacity) * 100%), transparent), color-mix(in srgb, rgba(15, 23, 42, 0.7) calc(var(--editor-surface-opacity) * 100%), transparent));
    --editor-bg-size: cover;
    --editor-bg-position: center center;
    --editor-bg-repeat: no-repeat;
    --editor-bg-attachment: scroll;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--editor-border);
    border-radius: 0.95rem;
    padding: 0.72rem;
    background:
        var(--editor-bg-image),
        var(--editor-surface-background);
    background-size: var(--editor-bg-size), auto, auto;
    background-position: var(--editor-bg-position), center, center;
    background-repeat: var(--editor-bg-repeat), no-repeat, no-repeat;
    background-attachment: var(--editor-bg-attachment), scroll, scroll;
    color: var(--editor-text-color);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 calc(10px + (12px * var(--editor-shadow-strength))) calc(24px + (10px * var(--editor-shadow-strength))) rgba(2, 6, 23, calc(0.14 + (0.22 * var(--editor-shadow-strength))));
}

.editor-widget-preview.has-custom-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.34));
}

.editor-widget-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: var(--editor-pattern-opacity);
    background: var(--editor-pattern);
}

.editor-widget-preview.bg-soft-gradient {
    --editor-pattern: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.08));
}

.editor-widget-preview.bg-mesh {
    --editor-pattern:
        radial-gradient(circle at 16% 18%, rgba(56, 189, 248, 0.24), transparent 40%),
        radial-gradient(circle at 84% 74%, rgba(244, 114, 182, 0.22), transparent 42%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.04), transparent 65%);
}

.editor-widget-preview.bg-dots {
    --editor-pattern:
        radial-gradient(circle, rgba(255, 255, 255, 0.12) 0 1.1px, transparent 1.2px),
        linear-gradient(140deg, rgba(255, 255, 255, 0.05), transparent 62%);
    background-size: auto, auto;
}

.editor-widget-preview.bg-diagonal {
    --editor-pattern: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 9px, transparent 9px 19px);
}

.editor-widget-preview.bg-minimal::after {
    opacity: 0.08;
}

.editor-widget-preview.fx-none::before,
.editor-widget-preview.fx-none::after {
    animation: none !important;
}

.editor-widget-preview.fx-glow {
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 14px 30px rgba(2, 6, 23, 0.34), 0 0 24px rgba(56, 189, 248, 0.24);
}

.editor-widget-preview.fx-floating {
    animation: editor-float-soft 5.6s ease-in-out infinite;
}

.editor-widget-preview.fx-sparkle::after {
    animation: editor-sparkle 2.2s linear infinite;
}

.editor-widget-preview.card-solid {
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, color-mix(in srgb, var(--editor-env-color) 86%, #ffffff 14%) 0%, transparent 48%),
        linear-gradient(160deg, color-mix(in srgb, var(--editor-env-color) 92%, #ffffff 8%), color-mix(in srgb, var(--editor-env-color) 98%, #000000 2%));
}

.editor-widget-preview.card-outline {
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.02) 0%, transparent 48%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-width: 2px;
    border-color: color-mix(in srgb, var(--editor-accent) 44%, #ffffff 20%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.editor-widget-preview.card-soft {
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, color-mix(in srgb, var(--editor-env-color) 82%, #ffffff 18%) 0%, transparent 48%),
        linear-gradient(160deg, color-mix(in srgb, var(--editor-env-color) 84%, #ffffff 16%), color-mix(in srgb, var(--editor-env-color) 92%, #ffffff 8%));
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.2);
}

.editor-widget-preview.frame-glow .editor-preview-wheel-disc {
    box-shadow: inset 0 0 0 5px rgba(15, 23, 42, 0.72), 0 0 0 3px color-mix(in srgb, var(--editor-accent) 35%, transparent), 0 8px 20px rgba(2, 6, 23, 0.34), 0 0 22px color-mix(in srgb, var(--editor-accent) 28%, transparent);
}

.editor-widget-preview.frame-double-ring .editor-preview-wheel-disc {
    border-width: 6px;
    box-shadow: inset 0 0 0 5px rgba(15, 23, 42, 0.72), inset 0 0 0 12px color-mix(in srgb, var(--editor-secondary) 20%, transparent), 0 8px 20px rgba(2, 6, 23, 0.34);
}

.editor-widget-preview.frame-dashed .editor-preview-wheel-shell::before {
    background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--editor-accent) 56%, #ffffff 44%) 0deg 8deg, transparent 8deg 18deg);
    opacity: 0.88;
    filter: none;
    inset: -10px;
}

.editor-widget-preview.pointer-diamond .editor-preview-wheel-shell::after,
.editor-widget-preview.pointer-crystal .editor-preview-wheel-shell::after,
.editor-widget-preview.pointer-crown .editor-preview-wheel-shell::after,
.editor-widget-preview.pointer-triangle .editor-preview-wheel-shell::after {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.editor-widget-preview.pointer-triangle .editor-preview-wheel-shell::after {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 22px solid color-mix(in srgb, var(--editor-accent) 30%, #ffffff 70%);
}

.editor-widget-preview.pointer-diamond .editor-preview-wheel-shell::after {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--editor-accent) 32%, #ffffff 68%), var(--editor-secondary));
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.editor-widget-preview.pointer-crystal .editor-preview-wheel-shell::after {
    width: 24px;
    height: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), color-mix(in srgb, var(--editor-accent) 20%, #ffffff 80%));
    clip-path: polygon(50% 0%, 86% 34%, 68% 100%, 32% 100%, 14% 34%);
}

.editor-widget-preview.pointer-crown .editor-preview-wheel-shell::after {
    width: 26px;
    height: 22px;
    background: linear-gradient(135deg, var(--editor-accent), color-mix(in srgb, var(--editor-secondary) 45%, #ffffff 55%));
    clip-path: polygon(0% 100%, 10% 44%, 28% 68%, 42% 10%, 56% 68%, 72% 30%, 90% 46%, 100% 100%);
}

.editor-widget-preview.motion-none,
.editor-widget-preview.motion-none::before,
.editor-widget-preview.motion-none::after,
.editor-widget-preview.motion-none .editor-preview-wheel-shell::before {
    animation: none !important;
}

.editor-widget-preview.motion-slow {
    animation-duration: 8s;
}

.editor-widget-preview.motion-fast {
    animation-duration: 3s;
}

.editor-widget-preview > * {
    position: relative;
    z-index: 1;
}

.theme-media-box {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px dashed rgba(56, 189, 248, 0.28);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.14));
}

.visual-effect-picker,
.style-combo-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.visual-effect-picker {
    max-height: 11.5rem;
    overflow: auto;
    padding-inline-end: 0.2rem;
}

.style-combo-picker {
    max-height: 10rem;
    overflow: auto;
    padding-inline-end: 0.2rem;
}

.visual-effect-chip,
.style-combo-chip {
    max-width: 100%;
}

.visual-effect-chip,
.style-combo-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.5rem 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.26);
    background: rgba(15, 23, 42, 0.38);
    color: #dbeafe;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.visual-effect-chip:hover,
.style-combo-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.54);
}

.visual-effect-chip input,
.style-combo-chip input {
    accent-color: #38bdf8;
}

.visual-effect-chip:has(input:checked),
.style-combo-chip:has(input:checked) {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(34, 211, 238, 0.22));
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.2), inset 0 0 0 1px rgba(255,255,255,0.06);
}

.visual-effect-chip.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-style: dashed;
}

.visual-effect-chip.is-disabled:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.32);
}

[data-advanced-lock].is-advanced-locked {
    opacity: 0.62;
    filter: grayscale(0.12);
}

.editor-widget-preview.theme-neon {
    --editor-accent: #22d3ee;
    --editor-pattern: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.36), transparent 42%), radial-gradient(circle at 78% 76%, rgba(59, 130, 246, 0.26), transparent 44%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(2, 6, 23, 0.86), rgba(13, 36, 76, 0.78));
    border-color: rgba(34, 211, 238, 0.44);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.24), 0 10px 24px rgba(2, 6, 23, 0.3), 0 0 20px rgba(34, 211, 238, 0.12);
}

.editor-widget-preview.theme-sunset {
    --editor-accent: #fb923c;
    --editor-pattern: linear-gradient(132deg, rgba(251, 146, 60, 0.24) 0 26%, transparent 26% 56%, rgba(251, 113, 133, 0.22) 56% 100%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(158deg, rgba(76, 29, 18, 0.86), rgba(49, 46, 129, 0.8));
    border-color: rgba(251, 146, 60, 0.4);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.2), 0 10px 24px rgba(2, 6, 23, 0.3);
}

.editor-widget-preview.theme-ocean-glass {
    --editor-accent: #7dd3fc;
    --editor-pattern: linear-gradient(180deg, rgba(125, 211, 252, 0.18), transparent 38%), radial-gradient(circle at 84% 16%, rgba(99, 102, 241, 0.22), transparent 48%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(11, 19, 47, 0.84), rgba(10, 58, 85, 0.78));
    border-color: rgba(125, 211, 252, 0.36);
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.18), 0 10px 24px rgba(2, 6, 23, 0.3);
}

.editor-widget-preview.theme-carnival-lights {
    --editor-accent: #facc15;
    --editor-pattern: repeating-linear-gradient(135deg, rgba(250, 204, 21, 0.2) 0 10px, transparent 10px 20px), radial-gradient(circle at 84% 18%, rgba(251, 113, 133, 0.24), transparent 44%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(158deg, rgba(59, 7, 100, 0.86), rgba(124, 45, 18, 0.78));
    border-color: rgba(250, 204, 21, 0.42);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.2), 0 10px 24px rgba(2, 6, 23, 0.3);
}

.editor-widget-preview.theme-blossom-garden {
    --editor-accent: #f472b6;
    --editor-pattern: radial-gradient(circle at 78% 14%, rgba(244, 114, 182, 0.28), transparent 42%), radial-gradient(circle at 18% 82%, rgba(251, 191, 36, 0.14), transparent 46%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(158deg, rgba(63, 33, 66, 0.85), rgba(31, 41, 55, 0.78));
    border-color: rgba(244, 114, 182, 0.42);
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.2), 0 10px 24px rgba(2, 6, 23, 0.3);
}

.editor-widget-preview.theme-midnight-luxe {
    --editor-accent: #c084fc;
    --editor-pattern: radial-gradient(circle at 82% 14%, rgba(192, 132, 252, 0.28), transparent 38%), linear-gradient(140deg, rgba(250, 204, 21, 0.1), transparent 36%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(10, 8, 24, 0.92), rgba(42, 18, 68, 0.8));
    border-color: rgba(192, 132, 252, 0.42);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.12), 0 10px 24px rgba(2, 6, 23, 0.34);
}

.editor-widget-preview.theme-citrus-pop {
    --editor-accent: #f97316;
    --editor-pattern: radial-gradient(circle at 18% 16%, rgba(250, 204, 21, 0.26), transparent 36%), radial-gradient(circle at 80% 74%, rgba(249, 115, 22, 0.24), transparent 42%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(155deg, rgba(69, 26, 3, 0.9), rgba(120, 53, 15, 0.78));
    border-color: rgba(251, 146, 60, 0.44);
}

.editor-widget-preview.theme-royal-velvet {
    --editor-accent: #eab308;
    --editor-pattern: linear-gradient(135deg, rgba(234, 179, 8, 0.14), transparent 28%), radial-gradient(circle at 74% 24%, rgba(192, 132, 252, 0.2), transparent 42%);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(36, 10, 52, 0.92), rgba(70, 18, 92, 0.8));
    border-color: rgba(234, 179, 8, 0.3);
}

.editor-widget-preview.theme-frost-byte {
    --editor-accent: #60a5fa;
    --editor-pattern: linear-gradient(135deg, rgba(96, 165, 250, 0.12), transparent 32%), repeating-linear-gradient(90deg, rgba(186, 230, 253, 0.08) 0 2px, transparent 2px 12px);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(14, 27, 48, 0.9), rgba(20, 60, 92, 0.78));
    border-color: rgba(125, 211, 252, 0.36);
}

.editor-widget-preview.editor-tone-dark {
    --editor-card: rgba(248, 250, 252, 0.93);
    --editor-border: rgba(15, 23, 42, 0.24);
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.88));
}

.editor-widget-preview.editor-tone-dark .editor-preview-brand,
.editor-widget-preview.editor-tone-dark .editor-preview-promo {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(15, 23, 42, 0.2);
}

@keyframes editor-float-soft {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes editor-sparkle {
    0% {
        opacity: 0.12;
    }

    50% {
        opacity: 0.32;
    }

    100% {
        opacity: 0.12;
    }
}

.editor-preview-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.55rem;
    padding: 0.32rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.38);
}

.editor-preview-brand img {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.58rem;
    object-fit: contain;
    padding: 0.15rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.16);
}

.editor-preview-brand span {
    font-size: 0.88rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.editor-preview-header {
    text-align: center;
}

.editor-preview-header h4 {
    font-size: 1rem;
    margin: 0 0 0.2rem;
    line-height: 1.5;
    color: var(--editor-accent);
}

.editor-preview-header p {
    margin: 0;
    color: var(--editor-muted-text);
    font-size: 0.82rem;
    line-height: 1.6;
}

.editor-preview-promo {
    margin: 0.62rem 0 0.72rem;
    text-align: center;
    border-radius: 0.65rem;
    border: 1px dashed rgba(96, 165, 250, 0.48);
    background: rgba(15, 23, 42, 0.36);
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    color: var(--editor-text-color);
    line-height: 1.55;
}

.editor-preview-page-shell {
    display: grid;
    gap: 0.72rem;
}

.editor-preview-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: var(--editor-muted-text);
}

.editor-preview-topline span {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.22);
    padding: 0.2rem 0.55rem;
}

.editor-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
    gap: 0.85rem;
    align-items: start;
}

.editor-preview-copy,
.editor-preview-stage {
    display: grid;
    gap: 0.72rem;
}

.editor-preview-stage {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.12));
    padding: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.editor-preview-verify {
    border: 1px dashed rgba(125, 211, 252, 0.34);
    background: rgba(15, 23, 42, 0.32);
    border-radius: 0.8rem;
    padding: 0.65rem;
}

.editor-preview-verify-title {
    font-size: 0.78rem;
    color: var(--editor-muted-text);
    margin-bottom: 0.38rem;
}

.editor-preview-input {
    border-radius: 0.72rem;
    background: var(--editor-input-bg, rgba(255, 255, 255, 0.92));
    color: var(--editor-input-text, rgba(15, 23, 42, 0.7));
    border: 1px solid var(--editor-input-border, rgba(125, 211, 252, 0.28));
    min-height: 2.45rem;
    display: flex;
    align-items: center;
    padding: 0.42rem 0.7rem;
    font-size: 0.78rem;
}

.editor-preview-input-muted {
    background: var(--editor-input-muted-bg, rgba(255, 255, 255, 0.74));
    min-height: 2.15rem;
}

.editor-preview-mini-actions,
.editor-preview-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.editor-preview-mini-actions span,
.editor-preview-action-row span {
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    background: rgba(15, 23, 42, 0.28);
    padding: 0.22rem 0.55rem;
    font-size: 0.7rem;
    color: var(--editor-text-color);
}

.editor-preview-metrics,
.editor-preview-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    justify-content: center;
}

.editor-preview-metrics span,
.editor-preview-socials span {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.28);
    padding: 0.24rem 0.58rem;
    font-size: 0.72rem;
    color: var(--editor-text-color);
}

.editor-preview-button {
    background: linear-gradient(135deg, var(--editor-accent), color-mix(in srgb, var(--editor-accent) 35%, #ffffff 65%)) !important;
    border-color: color-mix(in srgb, var(--editor-accent) 70%, #ffffff 30%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 18px color-mix(in srgb, var(--editor-accent) 26%, transparent) !important;
    transform: translateZ(0);
    animation: editor-button-breathe 2.8s ease-in-out infinite;
}

.editor-widget-preview.btn-glass .editor-preview-button {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: var(--editor-text-color) !important;
}

.editor-widget-preview.btn-flat .editor-preview-button {
    background: var(--editor-accent) !important;
    border: 1px solid var(--editor-accent) !important;
}

.editor-widget-preview.btn-neon .editor-preview-button {
    background: linear-gradient(135deg, var(--editor-accent), color-mix(in srgb, var(--editor-accent) 10%, #ffffff 90%)) !important;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 0 18px color-mix(in srgb, var(--editor-accent) 52%, transparent) !important;
}

.editor-preview-wheel-shell {
    width: min(100%, 220px);
    aspect-ratio: 1 / 1;
    margin: 0 auto 0.7rem;
    position: relative;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.editor-preview-wheel-shell::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--editor-env-color) 0%, transparent 72%);
    opacity: 0.7;
    filter: blur(9px);
}

.editor-preview-wheel-disc,
.editor-preview-wheel-labels {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.editor-preview-wheel-disc {
    border: 7px solid rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 0 0 5px rgba(15, 23, 42, 0.72), inset 0 -14px 16px rgba(2, 6, 23, 0.22), 0 8px 20px rgba(2, 6, 23, 0.34);
}

.editor-preview-wheel-labels {
    pointer-events: none;
}

.editor-preview-wheel-label {
    position: absolute;
    transform: translate(-50%, -50%);
    max-width: 56px;
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(2, 6, 23, 0.55);
}

.verification-code-fields {
    display: none;
}

.active-window-fields {
    display: none;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.45);
    padding: 0.8rem;
}

.wheel-scale-controls {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.8rem;
    padding: 0.55rem 0.7rem;
    background: rgba(15, 23, 42, 0.45);
}

.wheel-scale-controls .form-range {
    margin-bottom: 0.45rem;
}

.range-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: rgba(191, 219, 254, 0.86);
}

.range-meta .range-min,
.range-meta .range-max {
    color: rgba(148, 163, 184, 0.92);
}

.range-meta .range-current {
    margin-inline-start: auto;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
    background: rgba(30, 41, 59, 0.7);
    color: #bfdbfe;
    font-weight: 700;
}

.editor-form .form-range[data-range-display-id] {
    --range-progress: 0%;
    height: 0.5rem;
    border-radius: 999px;
    background: linear-gradient(
        to left,
        rgba(59, 130, 246, 0.95) 0 var(--range-progress),
        rgba(51, 65, 85, 0.7) var(--range-progress) 100%
    );
}

.editor-form .form-range[data-range-display-id]::-webkit-slider-runnable-track {
    height: 0.5rem;
    border-radius: 999px;
    background: transparent;
}

.editor-form .form-range[data-range-display-id]::-webkit-slider-thumb {
    margin-top: -0.34rem;
}

.editor-form .form-range[data-range-display-id]::-moz-range-track {
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.7);
}

.editor-form .form-range[data-range-display-id]::-moz-range-progress {
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.95);
}

.wheel-scale-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wheel-scale-input-wrap .form-control {
    max-width: 130px;
}

.wheel-scale-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(30, 41, 59, 0.75);
    color: #bfdbfe;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
}

.date-preset-tools {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.segment-tools {
    margin-bottom: 0.85rem;
}

.editor-segments-card {
    padding-top: 1.05rem;
}

.chance-preset-tools {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.56);
    border-radius: 0.8rem;
    padding: 0.5rem 0.65rem;
}

.preset-label {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.segment-weight-visual-cell {
    min-width: 200px;
}

.editor-form #segment-table tbody td {
    color: #0f172a;
    background: rgba(248, 250, 252, 0.97);
    border-color: rgba(148, 163, 184, 0.3);
}

.editor-form #segment-table tbody tr:hover td {
    background: rgba(241, 245, 249, 0.98);
}

.editor-form #segment-table .segment-row-index {
    font-weight: 700;
    color: #0f172a;
}

.editor-form #segment-table .form-control {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.58);
    color: #0f172a;
}

.editor-form #segment-table .form-control:focus {
    border-color: rgba(37, 99, 235, 0.72);
    box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.18);
    color: #0f172a;
    background: #ffffff;
}

.editor-form #segment-table .form-control::placeholder {
    color: rgba(71, 85, 105, 0.78);
}

.segment-weight-visual {
    position: relative;
    display: flex;
    align-items: center;
    height: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
}

.segment-weight-bar {
    position: absolute;
    inset: 0.16rem 0.16rem 0.16rem auto;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.34);
    transition: width 0.25s ease, background 0.25s ease;
}

.segment-weight-value {
    position: relative;
    margin-inline-start: 0.72rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #dbeafe;
    text-shadow: 0 0 8px rgba(2, 6, 23, 0.65);
}

.chance-summary {
    border: 1px dashed rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.58);
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
    color: var(--text-muted);
}

.chance-summary[data-valid="true"] {
    border-color: rgba(34, 197, 94, 0.55);
    color: #dcfce7;
}

.chance-summary[data-valid="false"] {
    border-color: rgba(244, 63, 94, 0.6);
    color: #fecdd3;
}

.form-actions,
.segment-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.segment-header-row {
    margin-bottom: 0.8rem;
}

.form-actions {
    margin-top: 1rem;
}

.editor-form .table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.editor-form #segment-table {
    min-width: 920px;
}

.kpi-card {
    text-align: center;
}

.kpi-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.kpi-card strong {
    font-size: 1.9rem;
    font-weight: 700;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-filter h2 {
    margin-bottom: 1rem;
}

.quick-range {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.report-filter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1rem;
}

.filter-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.report-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1rem;
}

.dashboard-kpi-strip,
.dashboard-summary-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-kpi-strip {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.dashboard-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-analytics-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-kpi-card,
.dashboard-summary-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        radial-gradient(circle at 16% 14%, rgba(56, 189, 248, 0.08), transparent 48%),
        linear-gradient(160deg, rgba(10, 20, 48, 0.88), rgba(13, 37, 82, 0.72));
}

.dashboard-kpi-card strong {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.15;
}

.dashboard-summary-card {
    text-align: right;
}

.dashboard-summary-label {
    display: block;
    color: #cbd5e1;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
}

.dashboard-summary-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.3rem;
}

.dashboard-collapsible {
    overflow: hidden;
}

.dashboard-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
}

.dashboard-collapsible-summary::-webkit-details-marker {
    display: none;
}

.dashboard-collapsible-summary h2,
.dashboard-collapsible-summary h3 {
    margin-bottom: 0.25rem;
}

.dashboard-collapsible-summary p {
    margin: 0;
}

.dashboard-collapsible-meta {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    background: rgba(15, 23, 42, 0.46);
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-collapsible-body {
    margin-top: 1rem;
}

.chart-card-wide {
    grid-column: 1 / -1;
}

.dashboard-list-card h3,
.dashboard-funnel-card h3 {
    margin-bottom: 0.9rem;
}

.dashboard-funnel-strip {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dashboard-funnel-step {
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 0.9rem;
    padding: 0.85rem 0.9rem;
    background: rgba(15, 23, 42, 0.34);
    text-align: center;
}

.dashboard-funnel-step span {
    display: block;
    color: #cbd5e1;
    font-size: 0.84rem;
    margin-bottom: 0.35rem;
}

.dashboard-funnel-step strong {
    font-size: 1.4rem;
    color: #f8fbff;
}

.admin-kpis {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-kpi-card {
    --kpi-accent: #38bdf8;
    position: relative;
    overflow: hidden;
    min-height: 126px;
    padding: 1.05rem 1rem 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background:
        radial-gradient(circle at 18% 16%, rgba(56, 189, 248, 0.13), transparent 48%),
        linear-gradient(160deg, rgba(10, 20, 48, 0.92), rgba(13, 37, 82, 0.74));
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.26), inset 0 0 0 1px rgba(148, 163, 184, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-kpi-card::after {
    content: "";
    position: absolute;
    inset-inline: 1rem;
    bottom: 0.62rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--kpi-accent), transparent);
    opacity: 0.88;
}

.admin-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.42);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.34), inset 0 0 0 1px rgba(125, 211, 252, 0.2);
}

.admin-kpi-card span {
    color: #cbd5e1;
    font-size: 0.96rem;
}

.admin-kpi-card strong {
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.05;
    margin-top: 0.4rem;
    letter-spacing: 0.02em;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-kpi-card.tone-users {
    --kpi-accent: #38bdf8;
}

.admin-kpi-card.tone-wheels {
    --kpi-accent: #818cf8;
}

.admin-kpi-card.tone-published {
    --kpi-accent: #34d399;
}

.admin-kpi-card.tone-active {
    --kpi-accent: #22c55e;
}

.admin-kpi-card.tone-spins {
    --kpi-accent: #f59e0b;
}

.admin-dashboard-page .admin-section {
    border-color: rgba(148, 163, 184, 0.24);
    background:
        radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.09), transparent 40%),
        linear-gradient(160deg, rgba(11, 20, 48, 0.9), rgba(13, 33, 74, 0.78));
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.3), inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.admin-dashboard-page .admin-section h2 {
    font-size: clamp(1.12rem, 2.2vw, 1.4rem);
    margin-bottom: 0.95rem;
    color: #e2e8f0;
}

.admin-dashboard-page .admin-section h3 {
    color: #dbeafe;
}

.admin-collapsible {
    overflow: hidden;
}

.admin-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
}

.admin-collapsible-summary::-webkit-details-marker {
    display: none;
}

.admin-collapsible-summary h2,
.admin-collapsible-summary h3 {
    margin-bottom: 0.25rem;
}

.admin-collapsible-summary p {
    margin: 0;
}

.admin-collapsible-meta {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    background: rgba(15, 23, 42, 0.46);
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-collapsible-body {
    margin-top: 1rem;
}

/* Unified disclosure affordance for clickable open/close sections */
.admin-collapsible-summary,
.dashboard-collapsible-summary,
.wheel-card-details-block > summary,
.wheel-card-subdetails > summary,
.wheel-preview-block > summary,
.editor-note-group > summary,
.editor-live-preview > summary,
.editor-form-group > summary,
.editor-picker-card > summary,
.admin-user-mobile-more > summary {
    position: relative;
    padding-inline-end: 2rem;
}

.admin-collapsible-summary::after,
.dashboard-collapsible-summary::after,
.wheel-card-details-block > summary::after,
.wheel-card-subdetails > summary::after,
.wheel-preview-block > summary::after,
.editor-note-group > summary::after,
.editor-live-preview > summary::after,
.editor-form-group > summary::after,
.editor-picker-card > summary::after,
.admin-user-mobile-more > summary::after {
    content: "▾";
    position: absolute;
    inset-inline-end: 0.75rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transform-origin: center;
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    background: rgba(15, 23, 42, 0.4);
    color: #e2e8f0;
    font-size: 0.75rem;
    line-height: 1;
    transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

details[open] > .admin-collapsible-summary::after,
details[open] > .dashboard-collapsible-summary::after,
details[open] > summary::after {
    transform: translateY(-50%) rotate(180deg);
    background: rgba(14, 165, 233, 0.22);
    border-color: rgba(56, 189, 248, 0.56);
}

.admin-dashboard-page .notification-settings-grid > .content-card,
.admin-dashboard-page .notification-test-grid > .content-card {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(160deg, rgba(8, 15, 36, 0.76), rgba(15, 30, 67, 0.64));
}

.admin-dashboard-page .notification-test-grid > .content-card {
    position: relative;
    overflow: hidden;
}

.admin-dashboard-page .notification-test-grid > .content-card::after {
    content: "";
    position: absolute;
    inset-inline: 1rem;
    top: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.9), transparent);
}

.admin-dashboard-page .form-control,
.admin-dashboard-page .form-select {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.36);
    color: #f8fafc;
}

.admin-dashboard-page .form-control::placeholder {
    color: rgba(226, 232, 240, 0.72);
}

.admin-dashboard-page .form-control:focus,
.admin-dashboard-page .form-select:focus {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.22);
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
}

.admin-dashboard-page .admin-data-table {
    margin-bottom: 0;
}

.admin-dashboard-page .admin-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

.admin-dashboard-page .admin-data-table tbody tr:nth-child(odd) {
    background: rgba(241, 245, 249, 0.96);
}

.admin-dashboard-page .admin-data-table tbody tr:hover {
    background: rgba(226, 232, 240, 0.96);
}

.admin-dashboard-page .admin-data-table tbody td {
    color: #0f172a;
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(148, 163, 184, 0.28);
}

.admin-dashboard-page .admin-data-table tbody > tr:not(.user-manage-row) .muted,
.admin-dashboard-page .admin-data-table tbody > tr:not(.user-manage-row) .text-muted,
.admin-dashboard-page .admin-data-table .table-empty-row td {
    color: #475569 !important;
}

.admin-dashboard-page .admin-data-table .form-control,
.admin-dashboard-page .admin-data-table .form-control.form-control-sm {
    background: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.52) !important;
    color: #0f172a !important;
}

.admin-dashboard-page .admin-data-table .form-control::placeholder {
    color: rgba(71, 85, 105, 0.72) !important;
}

.admin-dashboard-page .admin-data-table .form-control:focus {
    background: #ffffff !important;
    border-color: rgba(59, 130, 246, 0.72) !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.16) !important;
    color: #0f172a !important;
}

.admin-dashboard-page .admin-data-table .form-check-label {
    color: #0f172a;
}

.admin-dashboard-page .admin-data-table .btn-outline-primary {
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.8);
}

.admin-dashboard-page .admin-data-table .btn-outline-secondary {
    color: #334155;
    border-color: rgba(100, 116, 139, 0.72);
}

.admin-dashboard-page .admin-data-table .btn-outline-warning {
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.75);
}

.admin-dashboard-page .admin-data-table tbody td .badge-status,
.admin-dashboard-page .admin-data-table tbody td .badge-priority {
    text-shadow: none !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

/* Light table context: force high-contrast support badges */
.admin-dashboard-page .admin-data-table tbody td .badge-status.open {
    --badge-bg: rgba(22, 163, 74, 0.18);
    --badge-fg: #14532d;
    --badge-border: rgba(22, 163, 74, 0.38);
}

.admin-dashboard-page .admin-data-table tbody td .badge-status.in-progress {
    --badge-bg: rgba(37, 99, 235, 0.16);
    --badge-fg: #1e3a8a;
    --badge-border: rgba(37, 99, 235, 0.34);
}

.admin-dashboard-page .admin-data-table tbody td .badge-status.pending {
    --badge-bg: rgba(217, 119, 6, 0.18);
    --badge-fg: #7c2d12;
    --badge-border: rgba(217, 119, 6, 0.34);
}

.admin-dashboard-page .admin-data-table tbody td .badge-status.resolved {
    --badge-bg: rgba(13, 148, 136, 0.18);
    --badge-fg: #134e4a;
    --badge-border: rgba(13, 148, 136, 0.34);
}

.admin-dashboard-page .admin-data-table tbody td .badge-status.closed {
    --badge-bg: rgba(100, 116, 139, 0.2);
    --badge-fg: #334155;
    --badge-border: rgba(100, 116, 139, 0.34);
}

.admin-dashboard-page .admin-data-table tbody td .badge-priority.urgent {
    --badge-bg: rgba(220, 38, 38, 0.2);
    --badge-fg: #7f1d1d;
    --badge-border: rgba(220, 38, 38, 0.38);
}

.admin-dashboard-page .admin-data-table tbody td .badge-priority.high {
    --badge-bg: rgba(234, 88, 12, 0.2);
    --badge-fg: #7c2d12;
    --badge-border: rgba(234, 88, 12, 0.38);
}

.admin-dashboard-page .admin-data-table tbody td .badge-priority.medium {
    --badge-bg: rgba(37, 99, 235, 0.18);
    --badge-fg: #1e3a8a;
    --badge-border: rgba(37, 99, 235, 0.34);
}

.admin-dashboard-page .admin-data-table tbody td .badge-priority.low {
    --badge-bg: rgba(71, 85, 105, 0.2);
    --badge-fg: #1e293b;
    --badge-border: rgba(71, 85, 105, 0.34);
}

.admin-dashboard-page .table-responsive {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.86rem;
    overflow: auto;
}

.admin-dashboard-page .user-admin-form .btn {
    width: 100%;
}

.admin-dashboard-page .panel-topbar p {
    max-width: 72ch;
}

.admin-users-section {
    --admin-users-light-row: rgba(248, 250, 252, 0.98);
    --admin-users-light-row-alt: rgba(241, 245, 249, 0.98);
    --admin-users-hover-row: rgba(219, 234, 254, 0.96);
    --admin-users-hover-border: rgba(59, 130, 246, 0.28);
    --admin-users-panel-bg: linear-gradient(180deg, rgba(10, 23, 54, 0.96), rgba(22, 41, 84, 0.94));
    --admin-users-panel-border: rgba(96, 165, 250, 0.26);
    --admin-users-panel-text: #edf5ff;
    --admin-users-panel-muted: #c8daf7;
    --admin-users-panel-heading: #f8fbff;
    --admin-users-panel-accent: #7dd3fc;
}

.admin-users-section h2 {
    margin-bottom: 0.9rem;
}

.admin-users-section .table-responsive {
    border-radius: 1rem;
    border-color: rgba(96, 165, 250, 0.2);
    background: rgba(9, 18, 43, 0.22);
}

.admin-users-section .admin-user-filters .form-control,
.admin-users-section .admin-user-filters .form-select {
    background: rgba(15, 23, 42, 0.76);
    border-color: rgba(148, 163, 184, 0.32);
    color: #f8fbff;
}

.admin-users-section .admin-user-filters .form-control::placeholder {
    color: rgba(226, 232, 240, 0.78);
}

.admin-users-section .admin-user-filters .btn {
    min-height: 2.5rem;
    font-weight: 700;
}

.admin-users-section .admin-data-table tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.38);
}

.admin-users-section .admin-data-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.24);
}

.admin-users-section .admin-data-table tbody > tr:not(.user-manage-row):hover > td,
.admin-users-section .admin-data-table tbody > tr:not(.user-manage-row):focus-within > td {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(125, 211, 252, 0.22);
    color: #e2e8f0;
}

.admin-users-section .admin-data-table tbody > tr:not(.user-manage-row):hover .tag,
.admin-users-section .admin-data-table tbody > tr:not(.user-manage-row):focus-within .tag {
    filter: none;
}

.admin-users-section .admin-user-email {
    font-weight: 700;
    color: #e2e8f0;
    word-break: break-word;
}

.admin-users-section .admin-user-mobile-head {
    display: none;
}

.admin-users-section .admin-user-email-desktop {
    display: inline;
}

.admin-users-section .admin-user-actions-cell {
    min-width: 240px;
}

.admin-users-mobile-only,
.admin-users-mobile-only-row {
    display: none !important;
}

.admin-users-desktop-only {
    display: inline-flex !important;
}

.admin-users-desktop-only-row {
    display: table-row !important;
}

.admin-users-section .admin-actions {
    align-items: stretch;
}

.admin-users-section .admin-actions .btn {
    min-height: 2.25rem;
    font-weight: 700;
}

.admin-users-section .admin-user-index-cell,
.admin-users-section .admin-user-metric-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.admin-users-section .admin-user-role-cell,
.admin-users-section .admin-user-status-cell {
    white-space: normal;
}

.admin-users-section .admin-data-table .btn-outline-primary,
.admin-users-section .admin-data-table .btn-outline-info,
.admin-users-section .admin-data-table .btn-outline-light,
.admin-users-section .admin-data-table .btn-outline-warning {
    background: rgba(255, 255, 255, 0.92);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-users-section .admin-data-table .btn-outline-primary:hover,
.admin-users-section .admin-data-table .btn-outline-primary:focus-visible {
    background: #1d4ed8;
    color: #eff6ff;
    border-color: #1d4ed8;
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.24);
    transform: translateY(-1px);
}

.admin-users-section .admin-data-table .btn-outline-info:hover,
.admin-users-section .admin-data-table .btn-outline-info:focus-visible {
    background: #0369a1;
    color: #f0f9ff;
    border-color: #0369a1;
    box-shadow: 0 6px 18px rgba(3, 105, 161, 0.22);
    transform: translateY(-1px);
}

.admin-users-section .admin-data-table .btn-outline-light:hover,
.admin-users-section .admin-data-table .btn-outline-light:focus-visible {
    background: #334155;
    color: #f8fafc;
    border-color: #334155;
    box-shadow: 0 6px 18px rgba(51, 65, 85, 0.22);
    transform: translateY(-1px);
}

.admin-users-section .admin-data-table .btn-outline-warning:hover,
.admin-users-section .admin-data-table .btn-outline-warning:focus-visible {
    background: #b45309;
    color: #fff7ed;
    border-color: #b45309;
    box-shadow: 0 6px 18px rgba(180, 83, 9, 0.22);
    transform: translateY(-1px);
}

.admin-users-section .admin-data-table .btn-user-tickets {
    color: #0f172a;
    border-color: #475569;
    background: rgba(248, 250, 252, 0.98);
}

.admin-users-section .admin-data-table .btn-user-tickets:hover,
.admin-users-section .admin-data-table .btn-user-tickets:focus-visible {
    background: #0f172a;
    color: #f8fafc;
    border-color: #0f172a;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.24);
}

.admin-users-section .user-manage-row td {
    background: transparent !important;
}

.admin-users-section .user-manage-panel {
    padding: 0.9rem 0.95rem 1rem;
    border-top: 1px solid rgba(125, 211, 252, 0.22);
    background: linear-gradient(180deg, rgba(9, 20, 49, 0.86), rgba(8, 18, 45, 0.92));
}

.admin-user-manage-modal .modal-content {
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(8, 17, 40, 0.98), rgba(10, 23, 54, 0.97));
    color: #edf5ff;
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.42);
    direction: rtl;
    text-align: right;
}

.admin-user-manage-modal .modal-header {
    align-items: start;
    border-bottom-color: rgba(125, 211, 252, 0.18);
    padding: 1rem 1rem 0.8rem;
}

.admin-user-manage-modal .modal-body {
    padding: 0.9rem 1rem 1rem;
}

.admin-user-manage-modal .modal-body .user-manage-grid {
    grid-template-columns: 1fr;
}

.admin-user-manage-modal .modal-body .user-manage-card {
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.24);
}

.admin-user-manage-modal .user-manage-card,
.admin-user-manage-modal .user-manage-card h4,
.admin-user-manage-modal .user-manage-card p,
.admin-user-manage-modal .user-manage-card .form-text,
.admin-user-manage-modal .user-manage-card .alert,
.admin-user-manage-modal .user-manage-card .form-check-label,
.admin-user-manage-modal .password-policy-checklist,
.admin-user-manage-modal .password-policy-checklist li {
    text-align: right;
}

.admin-user-manage-modal .user-manage-card .form-control,
.admin-user-manage-modal .user-manage-card .form-control.form-control-sm,
.admin-user-manage-modal .user-manage-card input[type="password"],
.admin-user-manage-modal .user-manage-card input[type="text"] {
    text-align: right;
    direction: rtl;
}

.admin-user-manage-modal .btn:focus-visible,
.admin-user-manage-modal .form-control:focus-visible,
.admin-user-manage-modal .form-check-input:focus-visible,
.admin-user-manage-modal .btn-close:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 2px;
}

.admin-user-manage-modal .btn-close {
    margin: 0;
    filter: invert(1) grayscale(100%) brightness(180%);
    opacity: 0.9;
}

.admin-user-manage-modal-email {
    color: #c8daf7;
    font-size: 0.84rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.admin-user-mobile-more {
    width: 100%;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.42);
}

.admin-user-mobile-more > summary {
    cursor: pointer;
    list-style: none;
    padding: 0.72rem 0.8rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: #334155;
}

.admin-user-mobile-more > summary::-webkit-details-marker {
    display: none;
}

.admin-user-mobile-more-menu {
    display: grid;
    gap: 0.5rem;
    padding: 0 0.8rem 0.8rem;
}

.admin-users-section .user-manage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 1rem;
}

.admin-users-section .user-manage-card {
    border: 1px solid var(--admin-users-panel-border);
    border-radius: 1rem;
    padding: 1rem;
    background: var(--admin-users-panel-bg);
    color: var(--admin-users-panel-text);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.22);
}

.admin-users-section .user-manage-card h4 {
    font-size: 1rem;
    margin-bottom: 0.65rem;
    color: var(--admin-users-panel-heading);
}

.admin-users-section .credit-summary-stack {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.admin-users-section .credit-summary-label {
    font-size: 0.72rem;
    color: #075985;
    background: rgba(186, 230, 253, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 999px;
    padding: 0.14rem 0.52rem;
    line-height: 1.3;
    font-weight: 700;
}

.admin-users-section .user-manage-card .small.text-muted,
.admin-users-section .user-manage-card .text-muted,
.admin-users-section .user-manage-card .form-check-label,
.admin-users-section .user-manage-card .form-text {
    color: var(--admin-users-panel-muted) !important;
    opacity: 1 !important;
}

.admin-users-section .user-manage-card .alert {
    border-radius: 0.85rem;
    font-weight: 600;
}

.admin-users-section .user-manage-card .alert-warning {
    background: rgba(124, 45, 18, 0.38);
    color: #ffedd5;
    border-color: rgba(251, 146, 60, 0.42);
}

.admin-users-section .user-manage-card .form-control,
.admin-users-section .user-manage-card .form-control.form-control-sm {
    background: rgba(7, 16, 36, 0.94) !important;
    border-color: rgba(125, 211, 252, 0.34) !important;
    color: #f8fbff !important;
}

.admin-users-section .user-manage-card .form-control::placeholder {
    color: rgba(224, 236, 255, 0.72) !important;
}

.admin-users-section .user-manage-card .form-control:focus {
    border-color: rgba(56, 189, 248, 0.9) !important;
    box-shadow: 0 0 0 0.18rem rgba(56, 189, 248, 0.2) !important;
    background: rgba(6, 14, 31, 0.98) !important;
}

.admin-users-section .user-manage-card input[type="datetime-local"] {
    color-scheme: dark;
}

.admin-users-section .user-manage-card .form-check-input {
    border-color: rgba(148, 163, 184, 0.4);
    background-color: rgba(15, 23, 42, 0.9);
}

.admin-users-section .user-manage-card .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.admin-users-section .user-manage-card .btn-outline-primary,
.admin-users-section .user-manage-card .btn-outline-warning {
    background: transparent;
}

.admin-users-section .user-manage-card .btn-outline-primary {
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.65);
}

.admin-users-section .user-manage-card .btn-outline-primary:hover,
.admin-users-section .user-manage-card .btn-outline-primary:focus-visible {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(14, 165, 233, 0.84));
    color: #ffffff;
    border-color: transparent;
}

.admin-users-section .user-manage-card .btn-outline-warning {
    color: #ffedd5;
    border-color: rgba(251, 146, 60, 0.7);
}

.admin-users-section .user-manage-card .btn-outline-warning:hover,
.admin-users-section .user-manage-card .btn-outline-warning:focus-visible {
    background: linear-gradient(135deg, rgba(194, 65, 12, 0.96), rgba(249, 115, 22, 0.82));
    color: #ffffff;
    border-color: transparent;
}

.report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.notification-settings-grid,
.notification-test-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-message-card {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.auth-message-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.auth-message-inline-note {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-message-card .alert {
    margin-top: 1rem;
    text-align: start;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #f8fafc;
}

.auth-message-card .alert.alert-danger {
    border-color: rgba(248, 113, 113, 0.32);
}

.auth-message-card .alert.alert-success {
    border-color: rgba(74, 222, 128, 0.32);
}

.auth-card .alert {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #f8fafc;
}

.auth-card .alert.alert-info,
.auth-card .alert.alert-primary {
    border-color: rgba(96, 165, 250, 0.32);
}

.auth-card .alert.alert-danger {
    border-color: rgba(248, 113, 113, 0.32);
}

.auth-card .alert.alert-success {
    border-color: rgba(74, 222, 128, 0.32);
}

.password-policy-checklist {
    margin: 0.7rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.4rem;
}

.password-policy-checklist li {
    position: relative;
    padding-right: 1.55rem;
    color: #dbe7fb;
    font-size: 0.92rem;
    line-height: 1.65;
    transition: color 0.18s ease;
}

.password-policy-checklist li::before {
    content: "•";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1rem;
    color: rgba(148, 163, 184, 0.82);
    transition: color 0.18s ease, transform 0.18s ease;
}

.password-policy-checklist li.is-valid {
    color: #86efac;
}

.password-policy-checklist li.is-valid::before {
    content: "✓";
    color: #4ade80;
    transform: scale(1.05);
}

.password-policy-checklist li.is-invalid {
    color: #fda4af;
}

.password-policy-checklist li.is-invalid::before {
    content: "×";
    color: #fb7185;
}

.password-policy-checklist li.is-pending {
    color: #00d0e0;
}

.password-policy-checklist-compact li {
    font-size: 0.84rem;
}

.chart-card {
    min-height: 340px;
    min-width: 0;
    overflow: hidden;
}

.chart-card h3 {
    margin-bottom: 0.8rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}

.chart-card canvas {
    width: 100% !important;
    height: 250px !important;
}

.table {
    color: var(--text-main);
}

/* Standard responsive table behavior: keep readability, allow horizontal scroll */
.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    width: max-content;
    min-width: 100%;
}

.table > :not(caption) > * > * {
    border-color: rgba(148, 163, 184, 0.2);
}

.table thead th {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: rgba(148, 163, 184, 0.34);
    white-space: nowrap;
}

.auto-contrast-surface[data-surface-tone="light"] .table thead th {
    color: #1e293b;
    background: rgba(241, 245, 249, 0.96);
    border-bottom-color: rgba(15, 23, 42, 0.18);
}

.table thead th.sortable-header {
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    position: relative;
    padding-inline-start: 1.15rem;
}

.table thead th.sortable-header::after {
    content: "↕";
    opacity: 0.45;
    position: absolute;
    inset-inline-start: 0.2rem;
    top: 50%;
    transform: translateY(-52%);
    font-size: 0.78rem;
    line-height: 1;
}

.table thead th.sortable-header[data-sort-dir="asc"]::after {
    content: "↑";
    opacity: 0.95;
}

.table thead th.sortable-header[data-sort-dir="desc"]::after {
    content: "↓";
    opacity: 0.95;
}

/* Global unified table theme across panels */
.table.table-admin-unified {
    margin-bottom: 0;
}

.table.table-admin-unified[data-table-tone="light"] thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(15, 23, 42, 0.96);
    color: #7be9ff;
    border-bottom-color: rgba(148, 163, 184, 0.36);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.table.table-admin-unified[data-table-tone="light"] tbody tr:nth-child(odd) td {
    background: rgba(241, 245, 249, 0.96);
}

.table.table-admin-unified[data-table-tone="light"] tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.96);
}

.table.table-admin-unified[data-table-tone="light"] tbody tr:hover td {
    background: rgba(226, 232, 240, 0.97);
}

.table.table-admin-unified[data-table-tone="light"] tbody td {
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.28);
}

.table.table-admin-unified[data-table-tone="dark"] thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(7, 16, 40, 0.97);
    color: #6fe9ff;
    border-bottom-color: rgba(96, 165, 250, 0.3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.table.table-admin-unified[data-table-tone="dark"] tbody tr:nth-child(odd) td {
    background: rgba(10, 23, 54, 0.9);
}

.table.table-admin-unified[data-table-tone="dark"] tbody tr:nth-child(even) td {
    background: rgba(13, 28, 64, 0.9);
}

.table.table-admin-unified[data-table-tone="dark"] tbody tr:hover td {
    background: rgba(19, 45, 96, 0.96);
}

.table.table-admin-unified[data-table-tone="dark"] tbody td {
    color: #e5eeff;
    border-color: rgba(96, 165, 250, 0.2);
}

.table.table-admin-unified:not([data-table-tone]) thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(7, 16, 40, 0.97);
    color: #6fe9ff;
    border-bottom-color: rgba(96, 165, 250, 0.3);
}

.table.table-admin-unified:not([data-table-tone]) tbody tr:nth-child(odd) td {
    background: rgba(10, 23, 54, 0.9);
}

.table.table-admin-unified:not([data-table-tone]) tbody tr:nth-child(even) td {
    background: rgba(13, 28, 64, 0.9);
}

.table.table-admin-unified:not([data-table-tone]) tbody td {
    color: #e5eeff;
    border-color: rgba(96, 165, 250, 0.2);
}

.table.table-admin-unified .text-muted,
.table.table-admin-unified .muted,
.table.table-admin-unified .small.muted {
    color: #475569 !important;
}

.table.table-admin-unified .table-empty-row td {
    color: #475569 !important;
    background: rgba(241, 245, 249, 0.96);
}

.table-uniform-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.46);
}

.table-uniform-title {
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 700;
}

.table-uniform-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.62);
    background: rgba(15, 23, 42, 0.6);
    color: #f8fafc;
    padding: 0.2rem 0.62rem;
    font-size: 0.8rem;
    font-weight: 700;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}

html[dir="rtl"] .table-uniform-meta {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .table-uniform-title,
html[dir="rtl"] .table-uniform-chip {
    direction: rtl;
    text-align: right;
}

.cell-wrap {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 160px;
    line-height: 1.45;
}

.table-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.table-context-item {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.5rem 0.65rem;
}

.table-context-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.table-context-item strong {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.table-pagination {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.table-pagination-size,
.table-pagination-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.table-pagination-size label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.table-pagination-size select {
    min-width: 86px;
}

.table-pagination-info {
    font-size: 0.83rem;
    color: var(--text-muted);
    min-width: 120px;
    text-align: center;
}

.table.table-mobile-ready tbody td {
    vertical-align: top;
}

.alert {
    border-radius: 0.8rem;
}

#app-ui-confirm-modal .modal-content {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(160deg, rgba(8, 14, 36, 0.98), rgba(15, 23, 42, 0.96));
    color: #e2e8f0;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.42);
}

#app-ui-confirm-modal .modal-header,
#app-ui-confirm-modal .modal-footer {
    border-color: rgba(148, 163, 184, 0.22);
}

#app-ui-confirm-modal .modal-title {
    color: #eaf2ff;
    font-weight: 800;
}

#app-ui-confirm-modal .modal-body p {
    color: #dbe7fb;
}

#app-ui-confirm-modal [data-ui-confirm-cancel] {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(15, 23, 42, 0.52);
}

#app-ui-confirm-modal [data-ui-confirm-cancel]:hover,
#app-ui-confirm-modal [data-ui-confirm-cancel]:focus-visible {
    color: #f8fafc;
    border-color: rgba(125, 211, 252, 0.62);
    background: rgba(30, 41, 59, 0.88);
}

.status-modal .modal-content {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(160deg, rgba(8, 14, 36, 0.98), rgba(15, 23, 42, 0.96));
    color: #e2e8f0;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.42);
}

.status-modal .modal-header,
.status-modal .modal-footer {
    border-color: rgba(148, 163, 184, 0.22);
}

.status-modal .modal-title {
    font-weight: 800;
}

.status-modal.status-modal-success .modal-title {
    color: #86efac;
}

.status-modal.status-modal-warning .modal-title {
    color: #facc15;
}

.status-modal.status-modal-danger .modal-title,
.status-modal.status-modal-error .modal-title {
    color: #fda4af;
}

.account-manage-shell {
    border-color: rgba(148, 163, 184, 0.24);
    background:
        radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.1), transparent 42%),
        linear-gradient(160deg, rgba(8, 16, 40, 0.9), rgba(15, 23, 42, 0.82));
}

.account-manage-nav-panel {
    position: sticky;
    top: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.62);
    padding: 0.9rem 0.75rem;
}

.account-manage-nav-panel h2 {
    margin-bottom: 0.65rem;
    font-size: 1rem;
    color: #dbeafe;
}

.account-manage-nav .nav-item + .nav-item {
    margin-top: 0.35rem;
}

.account-manage-link {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.62rem;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.3);
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.account-manage-link:hover {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.46);
    background: rgba(30, 64, 175, 0.32);
}

.account-manage-link.active {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.72);
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.account-manage-content {
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 0.85rem;
    background: rgba(2, 6, 23, 0.32);
    padding: 1rem;
}

.account-manage-content h3 {
    margin-bottom: 0.9rem;
}

.account-manage-content form {
    max-width: 760px;
}

.account-manage-content .row > .col-md-6,
.account-manage-content .row > .col-md-8,
.account-manage-content .row > .col-md-4 {
    flex: 0 0 100%;
    max-width: 760px;
}

.account-manage-content .form-control,
.account-manage-content .form-select {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.35);
    color: #f8fafc;
}

.account-manage-content .form-control::placeholder {
    color: rgba(226, 232, 240, 0.62);
}
.form-control::placeholder {
    color: rgba(71, 85, 105, 0.78);
    font-style: normal;
    text-overflow: ellipsis;
}

textarea.form-control::placeholder,
input.form-control::placeholder {
    color: rgba(71, 85, 105, 0.78);
    font-style: normal;
    text-overflow: ellipsis;
}

.form-control,
.form-select,
textarea,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
    line-height: 1.5;
}

.form-control.form-control-sm,
.form-select.form-select-sm,
textarea.form-control-sm,
input.form-control-sm:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
    min-height: calc(1.5em + 0.75rem + 2px);
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

/* Light-surface contrast: dark text + darker muted/placeholder */
.bg-light,
.bg-white,
.card.bg-light,
.card.bg-white,
.table-light,
.pricing-section,
.home-pricing-card,
.pricing-card,
.account-manage-content .auth-qr-code {
    color: #0f172a;
}

.bg-light .text-muted,
.bg-white .text-muted,
.card.bg-light .text-muted,
.card.bg-white .text-muted,
.table-light .text-muted,
.pricing-section .text-muted,
.home-pricing-card .text-muted,
.pricing-card .text-muted {
    color: var(--text-subtle-dark) !important;
}

.bg-light .text-secondary,
.bg-white .text-secondary,
.card.bg-light .text-secondary,
.card.bg-white .text-secondary,
.table-light .text-secondary,
.pricing-section .text-secondary,
.home-pricing-card .text-secondary,
.pricing-card .text-secondary {
    color: var(--text-secondary-dark) !important;
}

.bg-light .form-control::placeholder,
.bg-white .form-control::placeholder,
.card.bg-light .form-control::placeholder,
.card.bg-white .form-control::placeholder,
.table-light .form-control::placeholder,
.pricing-section .form-control::placeholder,
.home-pricing-card .form-control::placeholder,
.pricing-card .form-control::placeholder {
    color: rgba(71, 85, 105, 0.72);
}

/* Dark-surface contrast: lighter placeholder/muted text */
.content-card .form-control::placeholder,
.panel-shell .form-control::placeholder,
.auth-card .form-control::placeholder,
.auth-brand-panel .form-control::placeholder,
.admin-dashboard-page .form-control::placeholder,
.account-manage-content .form-control::placeholder {
    color: rgba(226, 232, 240, 0.72);
}

.content-card .text-muted,
.panel-shell .text-muted,
.auth-card .text-muted,
.auth-brand-panel .text-muted,
.admin-dashboard-page .text-muted,
.account-manage-content .text-muted {
    color: var(--text-muted-strong) !important;
}

.content-card .form-text,
.panel-shell .form-text,
.auth-card .form-text,
.auth-brand-panel .form-text,
.admin-dashboard-page .form-text,
.account-manage-content .form-text {
    color: #dbe7fb !important;
}

.content-card .text-secondary,
.panel-shell .text-secondary,
.auth-card .text-secondary,
.auth-brand-panel .text-secondary,
.admin-dashboard-page .text-secondary,
.account-manage-content .text-secondary,
.support-card .text-secondary,
.ticket-item .text-secondary,
.response-form .text-secondary {
    color: #dce9ff !important;
}

.content-card .text-light-emphasis,
.panel-shell .text-light-emphasis,
.auth-card .text-light-emphasis,
.auth-brand-panel .text-light-emphasis,
.admin-dashboard-page .text-light-emphasis,
.account-manage-content .text-light-emphasis,
.support-card .text-light-emphasis,
.ticket-item .text-light-emphasis,
.response-form .text-light-emphasis {
    color: #dce6f7 !important;
}

.content-card .text-white-50,
.panel-shell .text-white-50,
.auth-card .text-white-50,
.auth-brand-panel .text-white-50,
.admin-dashboard-page .text-white-50,
.account-manage-content .text-white-50,
.support-card .text-white-50,
.ticket-item .text-white-50,
.response-form .text-white-50 {
    color: #d5e2f8 !important;
}

.content-card .small.text-muted,
.panel-shell .small.text-muted,
.auth-card .small.text-muted,
.auth-brand-panel .small.text-muted,
.admin-dashboard-page .small.text-muted,
.account-manage-content .small.text-muted,
.support-card .small.text-muted,
.ticket-item .small.text-muted,
.response-form .small.text-muted {
    color: #d3e0f4 !important;
}

.content-card label,
.panel-shell label,
.auth-card label,
.auth-brand-panel label,
.admin-dashboard-page label,
.account-manage-content label,
.support-card label,
.ticket-item label,
.response-form label {
    color: #edf4ff;
}

.account-manage-content .form-control:focus,
.account-manage-content .form-select:focus
{
    border-color: rgba(56, 189, 248, 0.82);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.2);
    background: rgba(15, 23, 42, 0.74);
    color: #ffffff;
}

.account-manage-content .form-floating > label {
    color: rgba(226, 232, 240, 0.78);
}

/* Prevent floating-label overlap with placeholder text in all textbox forms */
.form-floating > .form-control::placeholder {
    color: transparent !important;
}

.form-floating > .form-control:focus::placeholder {
    color: transparent !important;
}

.form-floating > textarea.form-control::placeholder {
    color: transparent !important;
}

.account-manage-content .auth-qr-code {
    margin-top: 0.65rem;
    margin-bottom: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 236px;
    min-height: 236px;
    padding: 8px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.22);
}

.account-manage-content .auth-qr-code img,
.account-manage-content .auth-qr-code canvas {
    display: block;
    max-width: 220px;
    max-height: 220px;
}

.account-manage-content .account-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
    margin-inline-start: 0.25rem;
    text-decoration: none;
    font-weight: 600;
}

.account-manage-content .alert .account-inline-action {
    margin-top: 0.5rem;
}

.account-manage-content .alert {
    max-width: 760px;
}

.account-manage-form-wrap {
    max-width: 760px;
}

.account-manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.account-manage-subcard {
    padding: 1.15rem 1.2rem;
}

.account-manage-rich-content {
    max-width: 920px;
}

.account-manage-table {
    min-width: 520px;
}

.account-verified-badge {
    color: #86efac;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(74, 222, 128, 0.28);
    font-weight: 800;
}

.recovery-code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-top: 0.4rem;
    max-width: 760px;
}

.recovery-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(15, 23, 42, 0.75);
    color: #e0f2fe;
    font-size: 1rem;
    font-weight: 700;
    direction: ltr;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.content-card h2,
.content-card h3 {
    margin-bottom: 0.6rem;
}

@media (max-width: 992px) {
    .hero-grid,
    .theme-cards,
    .feature-grid,
    .report-grid,
    .report-filter-grid,
    .report-kpi-grid,
    .notification-settings-grid,
    .notification-test-grid {
        grid-template-columns: 1fr;
    }

    html[dir="rtl"] .hero-copy-panel,
    html[dir="rtl"] .hero-preview-panel {
        grid-area: auto;
        align-self: auto;
    }

    .panel-topbar,
    .form-actions,
    .segment-header-row,
    .filter-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Prevent oversized title block height on mobile when panel-topbar becomes column */
    .panel-topbar > :has(h1, h2, h3) {
        flex: 0 1 auto;
        width: 100%;
    }

    .panel-topbar > :not(:has(h1, h2, h3)):not(.btn):not(button):not(a) {
        width: 100%;
        justify-content: flex-start;
    }

    .wheel-card-head {
        flex-direction: column;
    }

    .auth-login-layout {
        grid-template-columns: 1fr;
    }

    .auth-login-page {
        min-height: auto;
        align-items: stretch;
    }

    .chance-preset-tools {
        width: 100%;
    }

    .segment-weight-visual-cell {
        min-width: 160px;
    }

    .brand-logo-current-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-hero {
        padding: 2.4rem 0 1.6rem;
    }

    .landing-hero h1 {
        font-size: clamp(1.7rem, 7vw, 2.25rem);
    }

    .landing-hero p {
        font-size: 1rem;
        line-height: 1.8;
    }

    .hero-actions-wrap {
        justify-items: stretch;
        width: 100%;
    }

    .hero-actions-primary .btn,
    .hero-actions-secondary .btn {
        min-width: 0;
    }

    .preview-panel pre {
        font-size: 0.84rem;
    }

    .account-manage-nav-panel {
        position: static;
    }

    .topbar .navbar > .container {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .topbar .navbar-collapse {
        width: 100%;
        padding-top: 0.9rem;
        gap: 0.85rem;
    }

    .topbar .navbar-collapse.show,
    .topbar .navbar-collapse.collapsing {
        max-height: calc(100dvh - 5.5rem);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-inline-end: 0.2rem;
        padding-bottom: max(0.9rem, env(safe-area-inset-bottom));
    }

    .topbar .navbar-nav,
    .topbar-login-slot,
    .topbar-login-slot .navbar-nav,
    .topbar .nav-item,
    .topbar-login-slot .nav-item,
    .auth-nav {
        width: 100%;
    }

    .topbar-primary-nav,
    .topbar-user-nav,
    .auth-nav {
        gap: 0.55rem;
        align-items: stretch !important;
    }

    /* Keep important controls reachable while long menus scroll */
    .topbar-user-nav {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--topbar-bg);
        padding-block: 0.25rem;
    }

    .topbar .nav-link,
    .topbar-link,
    .profile-chip {
        width: 100%;
        max-width: none;
    }

    .topbar-link,
    .profile-chip {
        justify-content: space-between;
    }

    .profile-chip-name {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }

    .topbar .dropdown-toggle::after {
        margin-inline-start: auto;
    }

    .topbar .dropdown-menu {
        position: static !important;
        inset: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 100%;
        margin-top: 0.55rem;
    }

    .auth-user-dropdown {
        min-width: 0;
    }

    .public-link-text {
        min-width: 0;
        flex-basis: 100%;
    }

    .wheel-preview-frame {
        min-height: 560px;
    }

    .account-manage-content form,
    .account-manage-form-wrap,
    .account-manage-content .alert {
        max-width: 100%;
    }

    .account-manage-content .input-group {
        flex-wrap: wrap;
    }

    .account-manage-content .input-group > .form-control,
    .account-manage-content .input-group > .form-floating,
    .account-manage-content .input-group > .input-group-text {
        width: 100%;
        border-radius: 0.85rem !important;
    }

    .account-manage-content .account-inline-action {
        width: 100%;
        margin-inline-start: 0;
    }

    .dashboard-page .theme-note {
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .topbar .container {
        padding-inline: 0.8rem;
    }

    .brand {
        font-size: 1.05rem;
        white-space: normal;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .topbar .navbar-collapse {
        margin-top: 0.7rem;
    }

    .topbar-credit-meta {
        white-space: normal;
        font-size: 0.64rem;
    }

    html[dir="rtl"] .topbar .navbar-nav {
        align-items: flex-start;
    }

    .wheel-cards {
        grid-template-columns: 1fr;
    }

    .content-card,
    .theme-card,
    .feature-card {
        padding: 0.82rem 0.88rem;
        border-radius: 0.85rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .kpi-card strong {
        font-size: 1.52rem;
    }

    .public-link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .public-link-text,
    .public-link-row .btn,
    .wheel-actions .btn,
    .admin-actions .btn {
        width: 100%;
    }

    .wheel-actions form,
    .admin-actions form {
        width: 100%;
    }

    .qr-panel {
        width: 100%;
        justify-content: center;
    }

    .auth-card,
    .auth-brand-panel {
        padding: 0.95rem;
    }

    .topbar .nav-link,
    .topbar-link,
    .profile-chip {
        padding-inline: 0.78rem !important;
    }

    .table-responsive {
        border-radius: 0.65rem;
    }

    .footer-row {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .footer-brand-block,
    .creator-credit,
    .footer-company-block {
        justify-content: center;
        text-align: center;
        align-items: center;
    }

    .creator-credit {
        flex-wrap: wrap;
        white-space: normal;
    }

    .wheel-preview-frame {
        min-height: 480px;
    }
}

@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "copy"
            "preview" !important;
        gap: 1rem;
    }

    .hero-copy-panel,
    .hero-preview-panel {
        grid-area: auto !important;
        align-self: stretch;
    }

    .landing-hero p {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .admin-dashboard-page .admin-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-dashboard-page .admin-kpi-card {
        min-height: 112px;
        padding: 0.85rem 0.8rem 1rem;
    }

    .admin-dashboard-page .admin-kpi-card strong {
        font-size: clamp(1.7rem, 8vw, 2.2rem);
    }

    .admin-dashboard-page .notification-settings-grid,
    .admin-dashboard-page .notification-test-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-page .filter-actions .btn {
        width: 100%;
    }

    .dashboard-page .report-filter-grid > div,
    .admin-dashboard-page .report-filter-grid > div {
        padding: 0.52rem;
    }

    .dashboard-page .wheel-card,
    .admin-dashboard-page .content-card {
        border-radius: 0.86rem;
    }

    .admin-dashboard-page .panel-topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-dashboard-page .panel-topbar-actions .btn {
        flex: 1 1 220px;
    }

    .dashboard-page .wheel-card-head {
        gap: 0.6rem;
    }

    .dashboard-page .wheel-actions,
    .admin-dashboard-page .admin-actions {
        width: 100%;
        gap: 0.42rem;
    }

    .dashboard-page .wheel-actions form,
    .admin-dashboard-page .admin-actions form,
    .dashboard-page .wheel-actions .btn,
    .admin-dashboard-page .admin-actions .btn {
        width: 100%;
    }

    .table-responsive {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .table.table-mobile-scroll {
        width: max-content;
        min-width: 100%;
    }

    .table.table-mobile-scroll th,
    .table.table-mobile-scroll td {
        white-space: nowrap;
    }

    .table.table-mobile-scroll td.cell-wrap {
        white-space: normal !important;
        min-width: 180px;
    }

    .admin-dashboard-page .user-admin-form {
        min-width: 0;
        width: 100%;
    }

    .admin-dashboard-page .user-admin-form .btn,
    .admin-dashboard-page .user-admin-form .form-control {
        width: 100%;
    }

    .admin-users-section .admin-user-filters > div {
        width: 100%;
    }

    .admin-users-section .admin-user-filters .col-md-2.d-flex {
        flex-direction: column;
    }

    .admin-users-section .user-manage-grid {
        grid-template-columns: 1fr;
    }

    .admin-users-section .user-manage-panel {
        padding: 0.85rem 0.7rem 0.95rem;
    }

    .editor-form .form-actions {
        position: sticky;
        bottom: calc(0.55rem + env(safe-area-inset-bottom));
        z-index: 8;
        padding: 0.65rem;
        border-radius: 0.82rem;
        border: 1px solid rgba(148, 163, 184, 0.28);
        background: rgba(7, 13, 33, 0.92);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        box-shadow: 0 10px 22px rgba(2, 6, 23, 0.28);
    }

    .editor-form .form-actions .btn {
        width: 100%;
    }

    .table-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pagination-size,
    .table-pagination-nav {
        justify-content: space-between;
    }

    .account-manage-actions .btn,
    .account-manage-actions button,
    .account-manage-actions a {
        width: 100%;
    }

    .wheel-scale-input-wrap {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .wheel-scale-input-wrap .form-control,
    .wheel-scale-value {
        width: 100%;
        max-width: none;
    }

    .date-preset-tools,
    .chance-preset-tools {
        display: flex;
        width: 100%;
        align-items: stretch;
    }

    .date-preset-tools .btn,
    .chance-preset-tools .btn {
        flex: 1 1 100%;
    }

    .segment-header-row {
        align-items: stretch;
    }

    .segment-header-row .btn {
        width: 100%;
    }

    .theme-media-box {
        padding: 0.82rem;
    }

    .theme-media-box .brand-logo-current-preview,
    .theme-media-box .brand-logo-current-preview img,
    .theme-media-box .brand-logo-current-preview code {
        max-width: 100%;
    }
}

/* =========================================
   Global Theme Transition
   ========================================= */
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition:
        background-color 220ms ease,
        color 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        fill 220ms ease,
        stroke 220ms ease !important;
}

@media (max-width: 991.98px) {
    .admin-user-manage-modal .modal-content,
    .admin-user-manage-modal .modal-header,
    .admin-user-manage-modal .modal-body,
    .admin-user-manage-modal .modal-footer {
        direction: rtl;
        text-align: right;
    }

    .admin-user-manage-modal .user-manage-card,
    .admin-user-manage-modal .user-manage-card h4,
    .admin-user-manage-modal .user-manage-card p,
    .admin-user-manage-modal .user-manage-card .form-text,
    .admin-user-manage-modal .user-manage-card .alert,
    .admin-user-manage-modal .user-manage-card .form-check-label,
    .admin-user-manage-modal .password-policy-checklist,
    .admin-user-manage-modal .password-policy-checklist li {
        text-align: right !important;
    }

    .admin-user-manage-modal .user-manage-card .form-check {
        padding-right: 1.6rem;
        padding-left: 0;
    }

    .admin-user-manage-modal .user-manage-card .form-check .form-check-input {
        float: right;
        margin-right: -1.6rem;
        margin-left: 0;
    }

    .admin-user-manage-modal .password-policy-checklist li {
        padding-left: 0;
    }

    .admin-user-manage-modal .modal-dialog {
        margin: 0.5rem;
    }

    .admin-user-manage-modal .modal-content {
        max-height: calc(100dvh - 1rem);
    }

    .admin-user-manage-modal .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-user-manage-modal .user-manage-card .form-control,
    .admin-user-manage-modal .user-manage-card .form-control.form-control-sm {
        font-size: 16px;
    }

    .admin-users-mobile-only {
        display: inline-flex !important;
    }

    .admin-users-mobile-only-row {
        display: table-row !important;
    }

    .admin-users-desktop-only {
        display: none !important;
    }

    .admin-users-desktop-only-row {
        display: none !important;
    }

    .admin-dashboard-page .admin-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .admin-dashboard-page .admin-kpi-card {
        min-height: 104px;
        padding: 0.78rem 0.72rem 0.92rem;
    }

    .admin-dashboard-page .admin-kpi-card span {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .admin-dashboard-page .admin-kpi-card strong {
        font-size: clamp(1.5rem, 8vw, 2rem);
        margin-top: 0.28rem;
    }

    .admin-dashboard-page .panel-topbar-actions .btn {
        width: 100%;
        flex-basis: 100%;
    }

    .admin-users-section .table-responsive {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .admin-users-section .admin-users-table {
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 0.75rem;
    }

    .admin-users-section .admin-users-table thead {
        display: none;
    }

    .admin-users-section .admin-users-table tbody {
        display: block;
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) {
        display: block;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 1rem;
        overflow: hidden;
        box-shadow: 0 12px 26px rgba(2, 6, 23, 0.18);
        background: rgba(248, 250, 252, 0.98);
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.85rem;
        width: 100%;
        white-space: normal;
        padding: 0.72rem 0.85rem;
        border-bottom: 1px solid rgba(203, 213, 225, 0.7);
        text-align: left;
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td.admin-user-index-cell,
    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td.admin-user-role-cell,
    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td.admin-user-status-cell {
        display: none;
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td:last-child {
        border-bottom: 0;
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        max-width: 42%;
        color: #475569;
        font-weight: 800;
        text-align: right;
        line-height: 1.45;
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td.admin-user-email-cell::before {
        display: none;
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td.admin-user-credit-cell::before {
        flex-basis: 34%;
        max-width: 34%;
    }

    .admin-users-section .admin-users-table tbody > tr:not(.user-manage-row) > td > * {
        margin-inline-start: auto;
    }

    .admin-users-section .admin-user-mobile-head {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: start;
        gap: 0.7rem;
        width: 100%;
    }

    .admin-users-section .admin-user-mobile-rank {
        min-width: 2.2rem;
        height: 2.2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
        color: #eff6ff;
        font-size: 0.85rem;
        font-weight: 800;
        box-shadow: 0 10px 18px rgba(29, 78, 216, 0.24);
    }

    .admin-users-section .admin-user-mobile-meta {
        display: grid;
        gap: 0.45rem;
        min-width: 0;
    }

    .admin-users-section .admin-user-mobile-email {
        display: block;
        color: #0f172a;
        font-size: 0.98rem;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    .admin-users-section .admin-user-mobile-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .admin-users-section .admin-user-email-desktop {
        display: none;
    }

    .admin-users-section .admin-users-table .admin-user-email {
        max-width: 100%;
        align-items: stretch;
        padding: 0.82rem 0.85rem 0.7rem;
        background: linear-gradient(180deg, rgba(219, 234, 254, 0.92), rgba(239, 246, 255, 0.8));
    }

    .admin-users-section .admin-users-table .admin-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-users-section .admin-users-table .admin-actions .btn {
        width: 100%;
        min-height: 2.7rem;
    }

    .admin-users-section .admin-users-table .credit-summary-stack {
        justify-content: flex-end;
        max-width: 56%;
    }

    .admin-users-section .admin-users-table .admin-user-credit-cell,
    .admin-users-section .admin-users-table .admin-user-metric-cell {
        align-items: center;
    }

    .admin-users-section .admin-users-table .admin-user-credit-cell > *,
    .admin-users-section .admin-users-table .admin-user-metric-cell > * {
        margin-inline-start: auto;
    }

    .admin-users-section .admin-user-actions-cell {
        min-width: 0;
        padding-top: 0.82rem !important;
        background: rgba(255, 255, 255, 0.6);
    }

    .dashboard-page .wheel-card-details-block > summary,
    .dashboard-page .wheel-card-subdetails > summary {
        padding: 0.7rem 0.75rem;
    }

    .dashboard-page .wheel-card-details-body {
        padding: 0 0.72rem 0.72rem;
    }

    .admin-users-section .user-manage-row {
        display: block;
    }

    .admin-users-section .user-manage-row td {
        display: block;
        padding: 0.2rem 0 0.9rem !important;
    }

    .admin-users-section .user-manage-panel {
        margin-top: -0.2rem;
        border-top: 0;
        border-radius: 0 0 1rem 1rem;
        box-shadow: 0 12px 22px rgba(2, 6, 23, 0.16);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pricing-section-surface :is(.home-pricing-card, .pricing-card),
    .pricing-section-surface .pricing-badge,
    .pricing-section-surface .plan-feature-icon {
        animation: none !important;
        transition: none !important;
    }

    .admin-user-manage-modal .modal-content,
    .admin-user-manage-modal .user-manage-card,
    .admin-users-section .admin-data-table .btn-outline-primary,
    .admin-users-section .admin-data-table .btn-outline-info,
    .admin-users-section .admin-data-table .btn-outline-light,
    .admin-users-section .admin-data-table .btn-outline-warning {
        transition: none !important;
    }
}

@media (max-width: 576px) {
    .admin-dashboard-page .admin-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .admin-dashboard-page .admin-kpi-card {
        min-height: 104px;
        padding: 0.78rem 0.72rem 0.92rem;
    }

    .admin-dashboard-page .admin-kpi-card span {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .admin-dashboard-page .admin-kpi-card strong {
        font-size: clamp(1.5rem, 8vw, 2rem);
        margin-top: 0.28rem;
    }

    .admin-dashboard-page .panel-topbar-actions .btn {
        width: 100%;
        flex-basis: 100%;
    }

    .dashboard-page .wheel-card-details-block > summary,
    .dashboard-page .wheel-card-subdetails > summary {
        padding: 0.7rem 0.75rem;
    }

    .dashboard-page .wheel-card-details-body {
        padding: 0 0.72rem 0.72rem;
    }

    .chart-card {
        min-height: 280px;
    }

    .chart-card canvas {
        height: 210px !important;
    }
}

/* =========================================
   Unified UI Standards (Admin/Account/Dashboard)
   ========================================= */
:root {
    --ui-control-bg: rgba(15, 23, 46, 0.9);
    --ui-control-bg-focus: rgba(18, 31, 62, 0.96);
    --ui-control-border: rgba(148, 163, 184, 0.28);
    --ui-control-border-focus: rgba(56, 189, 248, 0.56);
    --ui-control-text: #f8fbff;
    --ui-control-placeholder: #9fb2d3;
    --ui-badge-text: #ecf4ff;
    --ui-badge-border: rgba(148, 163, 184, 0.28);
    --blog-editor-shell-bg: linear-gradient(165deg, rgba(10, 18, 44, 0.92), rgba(9, 25, 56, 0.86));
    --blog-editor-shell-border: rgba(125, 211, 252, 0.2);
    --blog-editor-shell-shadow: 0 12px 30px rgba(2, 8, 23, 0.34);
    --blog-editor-toolbar-bg: rgba(15, 23, 42, 0.52);
    --blog-editor-toolbar-border: rgba(148, 163, 184, 0.18);
    --blog-editor-toolbar-text: #f8fbff;
    --blog-editor-surface-bg: rgba(15, 23, 46, 0.9);
    --blog-editor-surface-bg-focus: rgba(18, 31, 62, 0.96);
    --blog-editor-surface-text: #f8fbff;
    --blog-editor-surface-border: rgba(148, 163, 184, 0.28);
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) .form-control,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) .form-select,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) textarea,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) select {
    background: var(--ui-control-bg);
    color: var(--ui-control-text);
    border-color: var(--ui-control-border);
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) select option {
    background-color: #0f172a;
    color: #e2e8f0;
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) select option:disabled {
    color: #94a3b8;
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) .form-control:focus,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) .form-select:focus,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):focus,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) textarea:focus,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) select:focus {
    background: var(--ui-control-bg-focus);
    color: var(--ui-control-text);
    border-color: var(--ui-control-border-focus);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) .form-control::placeholder,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input::placeholder,
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page, .response-form, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) textarea::placeholder {
    color: var(--ui-control-placeholder) !important;
    opacity: 1;
}

/* File input readability (all dark panels + shared forms) */
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) input[type="file"],
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) .form-control[type="file"] {
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    background: rgba(15, 23, 46, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) input[type="file"]::file-selector-button,
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) .form-control[type="file"]::file-selector-button {
    background: #f8fafc !important;
    color: #0b1220 !important;
    -webkit-text-fill-color: #0b1220 !important;
    border: 1px solid #94a3b8 !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    filter: none !important;
}

:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) input[type="file"]::-webkit-file-upload-button,
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) .form-control[type="file"]::-webkit-file-upload-button {
    background: #f8fafc !important;
    color: #0b1220 !important;
    -webkit-text-fill-color: #0b1220 !important;
    border: 1px solid #94a3b8 !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    filter: none !important;
}

/* Support panels also contain file inputs in reply forms */
:is(.admin-support-page, .support-page) input[type="file"],
:is(.admin-support-page, .support-page) .form-control[type="file"] {
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    background: rgba(15, 23, 46, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
}

:is(.admin-support-page, .support-page) input[type="file"]::file-selector-button,
:is(.admin-support-page, .support-page) .form-control[type="file"]::file-selector-button,
:is(.admin-support-page, .support-page) input[type="file"]::-webkit-file-upload-button,
:is(.admin-support-page, .support-page) .form-control[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, #2563eb, #06b6d4) !important;
    color: #f8fbff !important;
    -webkit-text-fill-color: #f8fbff !important;
    border: 1px solid rgba(56, 189, 248, 0.85) !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    filter: none !important;
}

:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) .form-text,
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) small,
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel, .response-form) .text-muted {
    color: #cbd5e1 !important;
    opacity: 1 !important;
}

/* Date/datetime controls: enforce high-contrast calendar icon on dark panels */
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input[type="date"],
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input[type="datetime-local"] {
    color-scheme: dark;
}

:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input[type="date"]::-webkit-calendar-picker-indicator,
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0.95;
    filter: invert(90%) sepia(10%) saturate(420%) hue-rotate(175deg) brightness(116%);
    cursor: pointer;
}

:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input[type="date"]::-webkit-calendar-picker-indicator:hover,
:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(98%) sepia(7%) saturate(760%) hue-rotate(166deg) brightness(124%);
}

/* Light cards keep native light icon for better contrast */
:is(.bg-light, .bg-white, .card.bg-light, .card.bg-white, .table-light) input[type="date"],
:is(.bg-light, .bg-white, .card.bg-light, .card.bg-white, .table-light) input[type="datetime-local"] {
    color-scheme: light;
}

:is(.admin-dashboard-page, .dashboard-page, .account-manage-content, .editor-form, .auth-card, .auth-brand-panel) .badge {
    color: var(--ui-badge-text);
    border-color: var(--ui-badge-border);
}

/* High-contrast ticket tables (admin + user support pages) */
:is(.admin-support-page, .support-page) .table-support tbody td {
    color: #e2e8f0 !important;
}

:is(.admin-support-page, .support-page) .table-support tbody td .text-muted,
:is(.admin-support-page, .support-page) .table-support tbody td .muted {
    color: #cbd5e1 !important;
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-status,
:is(.admin-support-page, .support-page) .table-support tbody td .badge-priority {
    text-shadow: none !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-status.open {
    --badge-bg: rgba(22, 163, 74, 0.22);
    --badge-fg: #bbf7d0;
    --badge-border: rgba(22, 163, 74, 0.42);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-status.in-progress {
    --badge-bg: rgba(37, 99, 235, 0.24);
    --badge-fg: #bfdbfe;
    --badge-border: rgba(59, 130, 246, 0.44);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-status.pending {
    --badge-bg: rgba(245, 158, 11, 0.24);
    --badge-fg: #fde68a;
    --badge-border: rgba(245, 158, 11, 0.44);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-status.resolved {
    --badge-bg: rgba(14, 116, 144, 0.24);
    --badge-fg: #a5f3fc;
    --badge-border: rgba(34, 211, 238, 0.42);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-status.closed {
    --badge-bg: rgba(71, 85, 105, 0.3);
    --badge-fg: #e2e8f0;
    --badge-border: rgba(148, 163, 184, 0.38);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-priority.urgent {
    --badge-bg: rgba(220, 38, 38, 0.28);
    --badge-fg: #fecaca;
    --badge-border: rgba(248, 113, 113, 0.44);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-priority.high {
    --badge-bg: rgba(234, 88, 12, 0.28);
    --badge-fg: #fed7aa;
    --badge-border: rgba(251, 146, 60, 0.44);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-priority.medium {
    --badge-bg: rgba(37, 99, 235, 0.24);
    --badge-fg: #bfdbfe;
    --badge-border: rgba(59, 130, 246, 0.42);
}

:is(.admin-support-page, .support-page) .table-support tbody td .badge-priority.low {
    --badge-bg: rgba(100, 116, 139, 0.28);
    --badge-fg: #e2e8f0;
    --badge-border: rgba(148, 163, 184, 0.36);
}

.inline-action-form {
    display: inline-block;
}

/* Shared pricing/home utilities */
.home-pricing-shortcut {
    background: linear-gradient(120deg, rgba(9, 20, 50, 0.88) 0%, rgba(12, 47, 92, 0.82) 55%, rgba(3, 105, 161, 0.8) 100%);
    border-color: rgba(125, 211, 252, 0.35) !important;
}

html[dir="rtl"] .home-pricing-shortcut {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .home-pricing-shortcut-copy {
    text-align: right;
}

html[dir="rtl"] .home-pricing-shortcut-action {
    margin-left: 0;
    margin-right: auto;
}

.pricing-section-surface {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.pricing-section-surface :is(.home-pricing-card, .pricing-card) {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.pricing-section-surface :is(.home-pricing-card, .pricing-card)::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.12) 48%, transparent 70%);
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
}

.pricing-section-surface :is(.home-pricing-card, .pricing-card):hover {
    transform: translateY(-4px);
}

.pricing-section-surface :is(.home-pricing-card, .pricing-card):hover::before {
    opacity: 1;
    animation: pricing-card-sheen 1.15s ease;
}

.pricing-section-surface :is(.home-pricing-card, .pricing-card) .card-body {
    position: relative;
    z-index: 1;
}

.pricing-section-surface .pricing-badge {
    animation: pricing-badge-breathe 4.4s ease-in-out infinite;
}

.pricing-section-surface .plan-feature-icon {
    animation: pricing-icon-pulse 4.8s ease-in-out infinite;
}

@keyframes pricing-card-sheen {
    from {
        transform: translateX(-120%);
    }
    to {
        transform: translateX(120%);
    }
}

@keyframes pricing-badge-breathe {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
}

@keyframes pricing-icon-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

.section-title-tight {
    letter-spacing: -1px;
}

.section-subtitle-wide {
    max-width: 600px;
}

.pricing-main-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

.pricing-section-title {
    font-size: 2rem;
}

.pricing-page-subtitle {
    color: #d8e4fb;
}

.pricing-plan-head {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.original-price-strike {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 1.2rem;
    display: block;
    margin-bottom: -5px;
    font-weight: 500;
}

.pricing-price-discount {
    color: #ef4444;
}

.topbar-pricing-link {
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    font-size: 0.98rem !important;
}

.topbar-pricing-link.topbar-link-active {
    color: #fef08a !important;
}

.topbar .dropdown-menu.dropdown-menu-dark {
    background: linear-gradient(180deg, rgba(9, 19, 40, 0.98), rgba(6, 14, 31, 0.98));
    border: 1px solid rgba(96, 165, 250, 0.24);
    box-shadow: 0 14px 34px rgba(2, 8, 23, 0.45);
    min-width: 16.5rem;
    max-width: min(92vw, 21rem);
    overflow: hidden;
}

.topbar .dropdown-menu.dropdown-menu-dark :is(.dropdown-item, .dropdown-header) {
    box-sizing: border-box;
    max-width: calc(100% - 0.9rem);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.topbar .dropdown-menu.dropdown-menu-dark .dropdown-item {
    color: rgba(226, 232, 240, 0.94);
    border-radius: 0.65rem;
    margin: 0.12rem 0.45rem;
    padding: 0.48rem 0.7rem;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    border: 1px solid transparent;
}

.topbar .dropdown-menu.dropdown-menu-dark .dropdown-item:hover,
.topbar .dropdown-menu.dropdown-menu-dark .dropdown-item:focus-visible {
    color: #f8fafc;
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(96, 165, 250, 0.28);
}

.topbar .dropdown-menu.dropdown-menu-dark .dropdown-item.active,
.topbar .dropdown-menu.dropdown-menu-dark .dropdown-item:active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.38), rgba(29, 78, 216, 0.32));
    border-color: rgba(125, 211, 252, 0.46);
}

.topbar .dropdown-menu.dropdown-menu-dark .dropdown-header {
    color: rgba(186, 230, 253, 0.94);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.topbar .dropdown-menu.dropdown-menu-dark .dropdown-divider {
    border-top-color: rgba(148, 163, 184, 0.2);
    margin: 0.45rem 0.65rem;
}

.topbar-admin-dropdown .dropdown-header {
    color: rgba(251, 191, 36, 0.9) !important;
}

/* Dark theme unification for panels across dashboard/support/account areas */
:is(.dashboard-page, .admin-dashboard-page, .support-page, .admin-support-page, .account-manage-shell) :is(.content-card, .support-card, .ticket-item, .account-manage-nav-panel, .account-manage-subcard, .admin-section) {
    background:
        radial-gradient(circle at 12% 10%, rgba(56, 189, 248, 0.08), transparent 44%),
        linear-gradient(165deg, rgba(10, 18, 44, 0.92), rgba(9, 25, 56, 0.86));
    border: 1px solid rgba(125, 211, 252, 0.2);
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.34);
}

:is(.dashboard-page, .admin-dashboard-page, .support-page, .admin-support-page, .account-manage-shell) :is(.content-card, .support-card, .ticket-item, .account-manage-nav-panel, .account-manage-subcard):hover {
    border-color: rgba(125, 211, 252, 0.36);
    box-shadow: 0 16px 34px rgba(2, 8, 23, 0.42);
}

.panel-topbar {
    background: rgba(15, 23, 42, 0.44);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.95rem;
    padding: 0.72rem 0.9rem;
}

.panel-topbar h1,
.panel-topbar h2,
.panel-topbar h3 {
    color: #f8fbff;
}

.topbar-pwa-install-btn {
    white-space: nowrap;
}

.pwa-install-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1035;
    border-radius: 999px;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
    padding-inline: 1rem;
    min-height: 3rem;
}

html[dir="rtl"] .pwa-install-fab {
    right: auto;
    left: 1rem;
}

.pwa-install-fab.d-none {
    display: none !important;
}

@media (min-width: 992px) {
    .pwa-install-fab {
        display: none !important;
    }
}

.pwa-promo-row {
    min-width: 0;
}

.pwa-promo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(125, 211, 252, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #7dd3fc;
    font-size: 1.1rem;
}

.pwa-promo-icon-brand {
    background:
        radial-gradient(circle at 30% 25%, rgba(125, 211, 252, 0.22), transparent 34%),
        linear-gradient(160deg, rgba(59, 130, 246, 0.24), rgba(15, 23, 42, 0.84));
    border-color: rgba(125, 211, 252, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.pwa-promo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    background: rgba(15, 23, 42, 0.55);
    color: #7dd3fc;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.pwa-promo-title {
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 0.1rem;
}

.pwa-promo-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(219, 234, 254, 0.84) !important;
}

.topbar-pwa-status-badge {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    align-self: center;
}

.topbar-pwa-installed-badge {
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.95), rgba(15, 23, 42, 0.95)) !important;
    border: 1px solid rgba(125, 211, 252, 0.22) !important;
    color: #dbeafe !important;
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.28);
}

.pwa-splash-card {
    width: min(92vw, 380px);
    border-radius: 24px;
    padding: 1.5rem 1.25rem;
    background:
        radial-gradient(circle at top, rgba(56, 189, 248, 0.14), transparent 35%),
        linear-gradient(165deg, rgba(8, 18, 40, 0.98), rgba(15, 31, 70, 0.96));
    border: 1px solid rgba(125, 211, 252, 0.28);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: #eff6ff;
    transform: translateY(0);
    animation: pwa-splash-enter 260ms ease-out;
}

.pwa-splash-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(125, 211, 252, 0.28);
    color: #7dd3fc;
    font-size: 1.35rem;
}

.pwa-splash-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #7dd3fc;
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
}

.pwa-splash-stepper {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.pwa-splash-step {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    transition: transform 160ms ease, background-color 160ms ease, width 160ms ease;
}

.pwa-splash-step.is-active {
    width: 28px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    transform: scale(1.02);
}

.pwa-splash-stage {
    border-radius: 18px;
    padding: 1rem 0.95rem;
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.18) inset;
}

.pwa-splash-stage-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(125, 211, 252, 0.16);
    color: #7dd3fc;
    font-size: 0.76rem;
    margin-bottom: 0.75rem;
}

.pwa-splash-title {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    line-height: 1.45;
}

.pwa-splash-text {
    margin: 0;
    color: rgba(219, 234, 254, 0.86);
    font-size: 0.95rem;
    line-height: 1.8;
}

.pwa-splash-bullets {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    text-align: right;
}

.pwa-splash-bullets li {
    position: relative;
    padding-right: 1.1rem;
    margin-bottom: 0.45rem;
    color: rgba(219, 234, 254, 0.9);
    font-size: 0.91rem;
}

.pwa-splash-bullets li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.9rem;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: #7dd3fc;
}

@media (max-width: 576px) {
    .pwa-splash-card {
        width: min(94vw, 380px);
        padding: 1.25rem 1rem;
    }
}

@keyframes pwa-banner-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pwa-splash-enter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pwa-promo-panel {
    animation: pwa-banner-enter 240ms ease-out;
    backdrop-filter: blur(12px);
}

body > .pwa-ios-banner {
    position: fixed;
    inset-inline: 1rem;
    bottom: 5.4rem;
    z-index: 1054;
    display: none;
    border-radius: 18px;
    padding: 0.85rem 0.9rem;
    background: linear-gradient(160deg, rgba(5, 12, 24, 0.98), rgba(11, 28, 52, 0.98) 55%, rgba(8, 19, 40, 0.98));
    color: #eff6ff;
    border: 1px solid rgba(125, 211, 252, 0.22);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    transition: opacity 0.24s ease, transform 0.24s cubic-bezier(.2,.8,.2,1), box-shadow 0.24s ease;
}

body > .pwa-ios-banner.is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pwa-ios-banner-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pwa-ios-banner-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(125, 211, 252, 0.24);
    color: #7dd3fc;
    font-size: 1rem;
}

.pwa-ios-banner-body {
    min-width: 0;
    flex: 1 1 auto;
}

.pwa-ios-banner-title {
    font-size: 0.98rem;
    line-height: 1.4;
}

.pwa-ios-banner-text {
    color: rgba(219, 234, 254, 0.84);
    line-height: 1.5;
}

.pwa-ios-banner-actions {
    display: flex;
    gap: 0.4rem;
    flex: 0 0 auto;
}

@media (max-width: 576px) {
    #pwa-promo-panel {
        inset-inline: 0.75rem;
        bottom: 0.75rem;
        width: auto !important;
        padding: 0.75rem 0.8rem !important;
    }

    .pwa-promo-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    body > .pwa-ios-banner {
        inset-inline: 0.75rem;
        bottom: 5.1rem;
        padding: 0.75rem 0.8rem;
    }

    .pwa-ios-banner-inner {
        align-items: flex-start;
    }

    .pwa-ios-banner-actions {
        flex-direction: column;
    }
}

.blog-post-card {
    background:
        radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.12), transparent 42%),
        linear-gradient(165deg, rgba(10, 18, 44, 0.92), rgba(9, 25, 56, 0.86));
    border: 1px solid rgba(125, 211, 252, 0.2) !important;
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.34);
}

.blog-post-card .card-body h2,
.blog-post-card .card-body p,
.blog-post-card .card-body .text-secondary,
.blog-post-card .card-body .text-muted {
    color: #e6eeff !important;
}

.blog-post-card .badge.text-bg-light {
    color: #dbeafe !important;
    background: rgba(59, 130, 246, 0.22) !important;
    border: 1px solid rgba(96, 165, 250, 0.34);
}

.payment-shield-icon {
    font-size: 3rem;
}

.notifications-page .notification-item.is-unread {
    border-color: rgba(56, 189, 248, 0.45) !important;
    box-shadow:
        0 10px 28px rgba(2, 6, 23, 0.32),
        0 0 0 1px rgba(56, 189, 248, 0.2) inset !important;
}

.notifications-page .notification-item.is-read {
    opacity: 0.92;
}

.notifications-page .text-muted {
    color: #d7e4f8 !important;
}

.notifications-page .text-light {
    color: #eef5ff !important;
}

.theme-builder-layout {
    display: grid;
    gap: 1rem;
}

.theme-builder-layout-advanced {
    --tb-text: #eaf2ff;
    --tb-muted: #bfd2f0;
    --tb-surface: rgba(10, 22, 54, 0.88);
    --tb-surface-2: rgba(13, 28, 66, 0.92);
    --tb-border: rgba(125, 211, 252, 0.34);
    --tb-focus: rgba(56, 189, 248, 0.6);
}

.theme-builder-section {
    background: linear-gradient(165deg, rgba(8, 16, 40, 0.82), rgba(15, 27, 68, 0.66));
    border: 1px solid rgba(95, 155, 255, 0.18);
    border-radius: 1.15rem;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.18);
}

.theme-builder-section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.theme-builder-section-head h3 {
    margin: 0;
    font-size: 1.02rem;
}

.theme-builder-section-head p {
    margin: 0;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.92rem;
}

.theme-builder-layout-advanced .theme-builder-tabs-wrap {
    border: 1px solid var(--tb-border);
    border-radius: 0.95rem;
    background: linear-gradient(155deg, rgba(8, 18, 46, 0.86), rgba(12, 24, 58, 0.8));
    padding: 0.55rem;
}

.theme-builder-layout-advanced .theme-builder-tabs {
    gap: 0.45rem;
}

.theme-builder-layout-advanced .theme-builder-tabs .nav-link {
    color: var(--tb-text);
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.64);
    font-weight: 700;
}

.theme-builder-layout-advanced .theme-builder-tabs .nav-link:hover,
.theme-builder-layout-advanced .theme-builder-tabs .nav-link:focus-visible {
    color: #ffffff;
    border-color: var(--tb-focus);
    background: rgba(30, 64, 175, 0.42);
}

.theme-builder-layout-advanced .theme-builder-tabs .nav-link.active {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.85);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(6, 182, 212, 0.8));
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.3);
}

.theme-builder-layout-advanced .theme-builder-summary-strip {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.theme-builder-layout-advanced .theme-builder-tab-content {
    margin-top: 0.2rem;
}

.theme-builder-layout-advanced .accordion-item {
    border: 1px solid var(--tb-border);
    background: var(--tb-surface);
}

.theme-builder-layout-advanced .accordion-button {
    color: var(--tb-text);
    background: rgba(15, 23, 42, 0.82);
    font-weight: 700;
}

.theme-builder-layout-advanced .accordion-button:not(.collapsed) {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.6), rgba(6, 182, 212, 0.35));
    box-shadow: inset 0 -1px 0 rgba(56, 189, 248, 0.35);
}

.theme-builder-layout-advanced .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.22);
}

.theme-builder-layout-advanced .accordion-body {
    background: var(--tb-surface-2);
    color: var(--tb-text);
}

.theme-builder-layout-advanced .form-label,
.theme-builder-layout-advanced .form-check-label,
.theme-builder-layout-advanced .col-form-label {
    color: var(--tb-text);
    font-weight: 600;
}

.theme-builder-layout-advanced .form-text,
.theme-builder-layout-advanced small,
.theme-builder-layout-advanced .text-muted {
    color: var(--tb-muted) !important;
    opacity: 1 !important;
}

.theme-builder-layout-advanced .form-control,
.theme-builder-layout-advanced .form-select,
.theme-builder-layout-advanced textarea,
.theme-builder-layout-advanced input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) {
    background: rgba(15, 23, 42, 0.9);
    color: #f8fbff;
    border-color: rgba(148, 163, 184, 0.38);
}

.theme-builder-layout-advanced .form-control::placeholder,
.theme-builder-layout-advanced input::placeholder,
.theme-builder-layout-advanced textarea::placeholder {
    color: #b7cae8 !important;
    opacity: 1 !important;
}

.theme-builder-layout-advanced .form-control:focus,
.theme-builder-layout-advanced .form-select:focus,
.theme-builder-layout-advanced textarea:focus,
.theme-builder-layout-advanced input:focus {
    border-color: var(--tb-focus);
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.18);
}

.theme-builder-layout-advanced input[type="file"]::file-selector-button,
.theme-builder-layout-advanced .form-control[type="file"]::file-selector-button,
.theme-builder-layout-advanced input[type="file"]::-webkit-file-upload-button,
.theme-builder-layout-advanced .form-control[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, #2563eb, #06b6d4) !important;
    color: #f8fbff !important;
    border: 1px solid rgba(56, 189, 248, 0.85) !important;
    font-weight: 700 !important;
}

.theme-builder-layout-advanced .theme-builder-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 0.9rem;
}

.theme-builder-layout-advanced .theme-builder-preview-pane {
    border: 1px solid var(--tb-border);
    border-radius: 0.9rem;
    padding: 0.7rem;
    background: rgba(8, 18, 46, 0.7);
}

.theme-builder-layout-advanced .theme-builder-preview-pane-head {
    font-size: 0.84rem;
    font-weight: 800;
    color: #dbeafe;
    margin-bottom: 0.55rem;
}

.theme-builder-layout-advanced [data-theme-preview] .editor-preview-title,
.theme-builder-layout-advanced [data-theme-preview] .editor-preview-description,
.theme-builder-layout-advanced [data-theme-preview] .editor-preview-brand-name,
.theme-builder-layout-advanced [data-theme-preview] .editor-preview-promo,
.theme-builder-layout-advanced [data-theme-preview] .editor-preview-verify {
    text-shadow: 0 1px 1px rgba(2, 6, 23, 0.38);
}

.theme-builder-layout-advanced [data-theme-preview].editor-tone-dark .editor-preview-title,
.theme-builder-layout-advanced [data-theme-preview].editor-tone-dark .editor-preview-description,
.theme-builder-layout-advanced [data-theme-preview].editor-tone-dark .editor-preview-brand-name,
.theme-builder-layout-advanced [data-theme-preview].editor-tone-dark .editor-preview-promo,
.theme-builder-layout-advanced [data-theme-preview].editor-tone-dark .editor-preview-verify {
    color: #0f172a !important;
    text-shadow: none;
}

@media (max-width: 1200px) {
    .theme-builder-layout-advanced .theme-builder-preview-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .theme-builder-layout-advanced .theme-builder-preview-grid {
        grid-template-columns: 1fr;
    }
}

.theme-palette-presets,
.theme-builder-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.theme-palette-presets {
    margin-bottom: 1rem;
}

.theme-palette-preset {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
    border-radius: 999px;
    padding: 0.42rem 0.82rem;
    font-size: 0.84rem;
    transition: 0.2s ease;
}

.theme-palette-preset:hover,
.theme-palette-preset.is-active {
    border-color: rgba(56, 189, 248, 0.56);
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.4), rgba(6, 182, 212, 0.24));
    color: #f8fbff;
}

.theme-builder-value-note,
.theme-builder-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.95rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.42);
    color: #dbeafe;
    font-size: 0.82rem;
}

.theme-builder-value-note {
    margin-top: 0.45rem;
}

.theme-range-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.editor-widget-preview.bg-aurora {
    --editor-pattern:
        radial-gradient(circle at 14% 22%, rgba(34, 211, 238, 0.28), transparent 38%),
        radial-gradient(circle at 82% 20%, rgba(168, 85, 247, 0.24), transparent 42%),
        radial-gradient(circle at 50% 88%, rgba(34, 197, 94, 0.18), transparent 44%);
}

.editor-widget-preview.bg-spotlight {
    --editor-pattern:
        radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.18), transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.14), transparent 55%);
}

.editor-widget-preview.bg-confetti {
    --editor-pattern:
        radial-gradient(circle at 14% 18%, rgba(250, 204, 21, 0.18) 0 4px, transparent 5px),
        radial-gradient(circle at 84% 26%, rgba(244, 114, 182, 0.2) 0 4px, transparent 5px),
        radial-gradient(circle at 34% 74%, rgba(56, 189, 248, 0.16) 0 4px, transparent 5px),
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 60%);
}

.editor-widget-preview.bg-grid {
    --editor-pattern:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 22px 22px, 22px 22px;
}

.editor-widget-preview.bg-waves {
    --editor-pattern:
        repeating-radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0 6px, transparent 6px 22px),
        linear-gradient(165deg, rgba(255, 255, 255, 0.05), transparent 62%);
}

.editor-widget-preview.fx-pulse {
    animation: editor-pulse-soft 3.6s ease-in-out infinite;
}

.editor-widget-preview.fx-shimmer::after {
    background:
        linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.12) 42%, transparent 58%),
        var(--editor-pattern);
    animation: editor-shimmer 2.8s linear infinite;
}

.editor-widget-preview.fx-orbit::before {
    animation: editor-orbit 8.5s linear infinite;
}

.editor-widget-preview.fx-ripple::before {
    animation: editor-ripple-breathe 4.8s ease-in-out infinite;
    opacity: 0.92;
}

.editor-widget-preview.fx-tilt {
    animation: editor-tilt-sway 6.4s ease-in-out infinite;
    transform-origin: center top;
}

.editor-widget-preview.fx-prism::after {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255,255,255,0.18), rgba(255,255,255,0.02)),
        linear-gradient(90deg, rgba(244, 114, 182, 0.12), rgba(56, 189, 248, 0.12), rgba(250, 204, 21, 0.12)),
        var(--editor-pattern);
    animation: editor-prism-flow 5.2s linear infinite;
}

.editor-widget-preview.fx-drift::before {
    animation: editor-drift-float 8.6s ease-in-out infinite alternate;
}

.editor-widget-preview.fx-confetti::after {
    background:
        radial-gradient(circle at 16% 22%, rgba(250,204,21,.24) 0 2px, transparent 2.2px),
        radial-gradient(circle at 38% 72%, rgba(34,211,238,.22) 0 2px, transparent 2.2px),
        radial-gradient(circle at 68% 36%, rgba(244,114,182,.22) 0 2px, transparent 2.2px),
        radial-gradient(circle at 84% 74%, rgba(96,165,250,.2) 0 2px, transparent 2.2px),
        var(--editor-pattern);
    animation: editor-confetti-float 7.6s linear infinite;
}

.editor-widget-preview.fx-flare::before {
    background:
        radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--editor-accent) 40%, #ffffff 60%) 0%, transparent 18%),
        radial-gradient(circle at 84% 24%, color-mix(in srgb, var(--editor-secondary) 34%, #ffffff 66%) 0%, transparent 20%);
    animation: editor-flare-sweep 4.6s ease-in-out infinite;
}

.editor-widget-preview.fx-breath .editor-preview-stage {
    animation: editor-stage-breathe 3.4s ease-in-out infinite;
}

.editor-widget-preview.fx-stardust::after {
    background:
        radial-gradient(circle at 16% 12%, rgba(255,255,255,0.7) 0 1.4px, transparent 1.6px),
        radial-gradient(circle at 68% 24%, rgba(186,230,253,0.75) 0 1.8px, transparent 2px),
        radial-gradient(circle at 38% 74%, rgba(251,191,36,0.65) 0 1.6px, transparent 1.8px),
        radial-gradient(circle at 82% 68%, rgba(244,114,182,0.58) 0 1.6px, transparent 1.8px),
        var(--editor-pattern);
    animation: editor-stardust-drift 12s linear infinite;
}

.editor-widget-preview.fx-scanner .editor-preview-verify {
    position: relative;
    overflow: hidden;
}

.editor-widget-preview.fx-scanner .editor-preview-verify::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.26) 48%, transparent 100%);
    transform: translateY(-110%);
    animation: editor-scan-sweep 3.8s ease-in-out infinite;
    pointer-events: none;
}

.editor-widget-preview.card-elevated {
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, color-mix(in srgb, var(--editor-env-color) 84%, #ffffff 16%) 0%, transparent 48%),
        linear-gradient(165deg, color-mix(in srgb, var(--editor-env-color) 82%, #ffffff 18%), color-mix(in srgb, var(--editor-env-color) 95%, #000000 5%));
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.26), 0 4px 0 rgba(255, 255, 255, 0.05) inset;
}

.editor-widget-preview.card-frosted {
    --editor-surface-background:
        radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.08) 0%, transparent 48%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(20px) saturate(1.18);
    border-color: rgba(255, 255, 255, 0.32);
}

.editor-widget-preview.frame-metallic .editor-preview-wheel-disc {
    border-width: 6px;
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 7px rgba(15, 23, 42, 0.76), inset 0 0 0 13px rgba(226, 232, 240, 0.18), 0 12px 26px rgba(2, 6, 23, 0.34);
}

.editor-widget-preview.frame-bevel .editor-preview-wheel-disc {
    box-shadow: inset 10px 10px 18px rgba(255, 255, 255, 0.12), inset -14px -16px 22px rgba(2, 6, 23, 0.26), inset 0 0 0 6px rgba(15, 23, 42, 0.72), 0 10px 22px rgba(2, 6, 23, 0.34);
}

.editor-widget-preview.frame-halo .editor-preview-wheel-shell::before {
    inset: -16px;
    background: radial-gradient(circle, color-mix(in srgb, var(--editor-accent) 34%, transparent) 0%, transparent 72%);
    opacity: 0.95;
    filter: blur(14px);
}

.editor-widget-preview.frame-studded .editor-preview-wheel-shell::before {
    inset: -12px;
    background: repeating-conic-gradient(from 0deg, rgba(255,255,255,0.9) 0deg 4deg, transparent 4deg 14deg);
    opacity: 0.72;
    filter: none;
}

.editor-widget-preview.frame-inset .editor-preview-wheel-disc {
    box-shadow: inset 0 12px 18px rgba(255,255,255,0.1), inset 0 -18px 22px rgba(2, 6, 23, 0.32), inset 0 0 0 7px rgba(15, 23, 42, 0.74), 0 8px 18px rgba(2, 6, 23, 0.28);
}

.editor-widget-preview.pointer-gem .editor-preview-wheel-shell::after {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    z-index: 3;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), var(--editor-secondary));
    clip-path: polygon(50% 0%, 85% 18%, 100% 56%, 74% 100%, 26% 100%, 0% 56%, 15% 18%);
}

.editor-widget-preview.pointer-bolt .editor-preview-wheel-shell::after {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 28px;
    z-index: 3;
    background: linear-gradient(180deg, color-mix(in srgb, var(--editor-accent) 20%, #ffffff 80%), var(--editor-secondary));
    clip-path: polygon(38% 0%, 100% 0%, 62% 42%, 100% 42%, 26% 100%, 44% 58%, 0% 58%);
}

.editor-widget-preview.btn-pill .editor-preview-button {
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--editor-accent), var(--editor-secondary)) !important;
    border: 0 !important;
}

.editor-widget-preview.btn-outline .editor-preview-button {
    background: transparent !important;
    border: 2px solid color-mix(in srgb, var(--editor-accent) 58%, #ffffff 22%) !important;
    color: var(--editor-text-color) !important;
}

@keyframes editor-pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.012); }
}

@keyframes editor-shimmer {
    0% { background-position: -260px 0, center; }
    100% { background-position: 260px 0, center; }
}

@keyframes editor-orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes editor-ripple-breathe {
    0%, 100% { transform: scale(1); opacity: .62; }
    50% { transform: scale(1.06); opacity: .9; }
}

@keyframes editor-tilt-sway {
    0%, 100% { transform: perspective(900px) rotateX(0deg) rotateY(0deg); }
    25% { transform: perspective(900px) rotateX(0.8deg) rotateY(-1deg); }
    75% { transform: perspective(900px) rotateX(-0.8deg) rotateY(1deg); }
}

@keyframes editor-prism-flow {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 220px 0, 100% 0, 0 0; }
}

@keyframes editor-drift-float {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-10px, 8px, 0) scale(1.08); }
}

@keyframes editor-confetti-float {
    0% { transform: translateY(0); }
    100% { transform: translateY(8px); }
}

@keyframes editor-flare-sweep {
    0%, 100% { opacity: 0.28; transform: translate3d(0, 0, 0) scale(1); }
    50% { opacity: 0.6; transform: translate3d(10px, -6px, 0) scale(1.08); }
}

@keyframes editor-stage-breathe {
    0%, 100% { transform: scale(1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
    50% { transform: scale(1.018); box-shadow: 0 14px 34px rgba(2, 6, 23, 0.2), inset 0 1px 0 rgba(255,255,255,0.08); }
}

@keyframes editor-stardust-drift {
    0% { transform: translate3d(0, 0, 0); opacity: 0.24; }
    50% { transform: translate3d(10px, -8px, 0); opacity: 0.52; }
    100% { transform: translate3d(0, 0, 0); opacity: 0.24; }
}

@keyframes editor-scan-sweep {
    0% { transform: translateY(-110%); opacity: 0; }
    14% { opacity: 0.65; }
    56% { opacity: 0.65; }
    100% { transform: translateY(130%); opacity: 0; }
}

@keyframes editor-button-breathe {
    0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 10px 18px color-mix(in srgb, var(--editor-accent) 26%, transparent) !important; }
    50% { transform: translateY(-1px) scale(1.02); box-shadow: 0 14px 26px color-mix(in srgb, var(--editor-accent) 34%, transparent) !important; }
}

@media (max-width: 991.98px) {
    .editor-preview-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Unified Responsive Tables (Admin/Dashboard/Support)
   ========================================================= */
:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page) .table-responsive {
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(7, 16, 40, 0.92), rgba(10, 21, 50, 0.86));
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.36);
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page) .table-responsive > .table {
    margin-bottom: 0;
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page) .table-responsive > .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(7, 16, 40, 0.97) !important;
    color: #6fe9ff !important;
    border-bottom-color: rgba(96, 165, 250, 0.3) !important;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page) .table-responsive > .table tbody tr:nth-child(odd) > * {
    background: rgba(10, 23, 54, 0.9);
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page) .table-responsive > .table tbody tr:nth-child(even) > * {
    background: rgba(13, 28, 64, 0.9);
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page) .table-responsive > .table tbody tr:hover > * {
    background: rgba(19, 45, 96, 0.96) !important;
}

:is(.admin-dashboard-page, .dashboard-page, .admin-support-page, .support-page) .table-responsive > .table tbody td {
    color: #e5eeff !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Ticket page improvements */
.admin-support-page .table-support tbody tr:hover > * {
    background: rgba(27, 63, 126, 0.98) !important;
}

.admin-support-page .table-support tbody td .btn-outline-light {
    color: #eaf3ff !important;
    border-color: rgba(125, 211, 252, 0.58) !important;
    background: rgba(14, 28, 64, 0.78) !important;
}

.admin-support-page .table-support tbody td .btn-outline-light:hover,
.admin-support-page .table-support tbody td .btn-outline-light:focus-visible {
    color: #ffffff !important;
    border-color: rgba(103, 232, 249, 0.85) !important;
    background: rgba(8, 145, 178, 0.34) !important;
}

.admin-support-page .table-support tbody td .btn-outline-info {
    color: #9be8ff !important;
    border-color: rgba(56, 189, 248, 0.66) !important;
    background: rgba(12, 36, 76, 0.68) !important;
}

.admin-support-page .table-support tbody td .btn-outline-info:hover,
.admin-support-page .table-support tbody td .btn-outline-info:focus-visible {
    color: #ffffff !important;
    border-color: rgba(56, 189, 248, 0.9) !important;
    background: rgba(14, 165, 233, 0.34) !important;
}

@media (max-width: 768px) {
    .admin-support-page .table-has-sticky-action .sticky-action-cell {
        position: sticky;
        inset-inline-end: 0;
        z-index: 4;
        background: rgba(10, 28, 64, 0.98) !important;
        box-shadow: -10px 0 18px rgba(2, 6, 23, 0.42);
    }
}
.footer-version-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted-strong);
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: nowrap;
    unicode-bidi: plaintext;
}

.footer-version-link:hover,
.footer-version-link:focus-visible {
    color: #ffffff;
    text-decoration: underline;
}
