:root {
    --bg: #f4f8ff;
    --bg-soft: #f8fbff;
    --surface: #ffffff;
    --surface-blue: #eff6ff;
    --surface-blue-strong: #dbeafe;
    --line: #bfdbfe;
    --line-strong: #93c5fd;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #60a5fa;
    --text: #0f172a;
    --soft: #334155;
    --muted: #475569;
    --muted-2: #64748b;
    --success: #15803d;
    --danger: #dc2626;
    --warning: #d97706;
    --sidebar-width: 292px;
    --topbar-height: 86px;
    --radius: 14px;
    --shadow: 0 18px 45px rgba(37, 99, 235, 0.08);
}

/* Popup Setting redesigned tabs and cards */
.popup-setting-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.popup-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
}

.popup-hero-copy {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.popup-hero-icon,
.popup-section-icon,
.popup-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.popup-hero-icon,
.popup-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #123f73;
    background: #e8f1ff;
    border: 1px solid #dbeafe;
}

.popup-hero-icon svg,
.popup-section-icon svg,
.popup-tab-icon svg,
.popup-icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.popup-hero-card h2,
.popup-section-header h3 {
    margin: 0;
    color: #172554;
    font-size: 18px;
    font-weight: 700;
}

.popup-hero-card p,
.popup-section-header p,
.popup-preview-card p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.popup-site-toolbar {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.popup-site-toolbar .axg-form-field {
    min-width: 240px;
    margin: 0;
}

.popup-setting-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
    overflow-x: auto;
}

.popup-setting-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.popup-setting-tab:hover {
    background: #eff6ff;
    color: #123f73;
}

.popup-setting-tab.is-active {
    color: #ffffff;
    background: #123f73;
    box-shadow: 0 10px 22px rgba(18, 63, 115, .22);
}

.popup-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.popup-preview-card,
.popup-section-card {
    padding: 18px;
}

.popup-preview-box {
    margin-top: 14px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 16px;
    min-height: 220px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
}

.popup-preview-box.is-prize,
.popup-preview-box.prize {
    background: radial-gradient(circle at top, #fff7d1, #f8fbff 42%, #eef6ff);
}

.popup-preview-dialog {
    max-width: 380px;
    margin: 0 auto;
    border-radius: 20px;
    padding: 18px;
    text-align: center;
    border-width: var(--winner-popup-stroke-width, var(--welcome-popup-stroke-width, 0));
    border-style: var(--winner-popup-stroke-style, var(--welcome-popup-stroke-style, solid));
    border-color: var(--winner-popup-stroke-color, var(--welcome-popup-stroke-color, transparent));
    background: rgba(18, 18, 18, .96);
    color: #ffffff;
    box-shadow: none;
    box-sizing: border-box;
}

.popup-preview-dialog h4 {
    margin: 0 0 8px;
    color: #ffffff;
}

.popup-preview-dialog strong {
    display: block;
    margin: 10px 0;
    color: #ffffff;
    font-size: 26px;
}

.popup-preview-dialog small {
    display: block;
    color: rgba(255, 255, 255, .72) !important;
}

.popup-preview-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.popup-preview-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f4c542;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
}

.popup-section-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.popup-asset-remove {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    color: #475569;
    background: #f8fbff;
    font-size: 13px;
}

.popup-asset-remove small {
    display: block;
    color: #64748b !important;
    font-weight: 400 !important;
}

.popup-setting-actions {
    position: sticky;
    bottom: 12px;
    z-index: 8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: rgba(248, 251, 255, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}

.popup-icon-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 780px) {
    .popup-hero-card,
    .popup-site-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .popup-site-toolbar .axg-form-field {
        min-width: 0;
        width: 100%;
    }

    .popup-preview-grid {
        grid-template-columns: 1fr;
    }

    .popup-setting-actions {
        position: static;
        flex-direction: column;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 0%, rgba(96, 165, 250, 0.22), transparent 28rem),
        linear-gradient(135deg, var(--bg) 0%, var(--bg-soft) 58%, #eef6ff 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    appearance: none;
}

.admin-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    padding: 22px 16px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 12px 0 28px rgba(15, 23, 42, 0.06);
}

.main-panel {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.brand-block,
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-block {
    min-height: 68px;
    padding: 4px 6px 18px;
    border-bottom: 1px solid var(--line);
}

.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: linear-gradient(145deg, #2563eb, #60a5fa);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.brand-name {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
}

.brand-subtitle,
.topbar-kicker,
.eyebrow {
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.side-nav {
    margin-top: 18px;
    padding-bottom: 18px;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-group-toggle {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 6px 9px;
    background: transparent;
    color: var(--soft);
    cursor: pointer;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-group.open > .nav-group-toggle,
.nav-group-toggle:hover {
    border-color: var(--line);
    background: var(--surface-blue);
    color: var(--text);
}

.nav-single {
    grid-template-columns: 34px minmax(0, 1fr);
}

.nav-single.active {
    border-color: var(--line-strong);
    color: var(--blue-dark);
    background: #dbeafe;
    box-shadow: inset 3px 0 0 var(--blue);
}

.nav-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #ffffff;
}

.nav-icon::before,
.nav-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.nav-icon-dashboard::before {
    width: 15px;
    height: 15px;
    border: 2px solid var(--blue);
    border-radius: 5px;
    box-shadow: 7px 7px 0 -4px var(--blue);
}

.nav-icon-wheel::before {
    width: 16px;
    height: 16px;
    border: 2px solid var(--blue);
    border-radius: 50%;
}

.nav-icon-wheel::after {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--blue);
}

.nav-icon-ticket::before {
    width: 17px;
    height: 12px;
    border: 2px solid var(--blue);
    border-radius: 4px;
}

.nav-icon-report::before {
    width: 16px;
    height: 16px;
    border-left: 3px solid var(--blue);
    border-bottom: 3px solid var(--blue);
}

.nav-icon-report::after {
    width: 11px;
    height: 2px;
    background: var(--blue);
    transform: rotate(-35deg);
}

.nav-icon-settings::before {
    width: 16px;
    height: 16px;
    border: 2px solid var(--blue);
    border-radius: 50%;
}

.nav-icon-settings::after {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

.nav-chevron {
    position: relative;
    width: 22px;
    height: 22px;
}

.nav-chevron::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 7px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(-45deg);
    transition: transform 160ms ease, border-color 160ms ease;
}

.nav-group.open .nav-chevron::before {
    border-color: var(--blue);
    transform: rotate(45deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 180ms ease;
}

.nav-group.open .nav-submenu {
    max-height: 340px;
}

.nav-link {
    position: relative;
    min-height: 38px;
    display: flex;
    align-items: center;
    margin: 4px 0 4px 44px;
    padding: 9px 12px 9px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-link::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 50%;
    width: 10px;
    height: 1px;
    background: var(--line-strong);
}

.nav-link:hover {
    color: var(--blue-dark);
    background: var(--surface-blue);
}

.nav-link.active {
    border-color: var(--line-strong);
    color: var(--blue-dark);
    background: #dbeafe;
    box-shadow: inset 3px 0 0 var(--blue);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 28px 0;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.axg-page-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.axg-page-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.axg-page-icon {
    position: relative;
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 0;
}

.axg-page-icon::before {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.axg-page-icon-site::before,
.axg-page-icon-theme::before,
.axg-page-icon-segment::before {
    border-radius: 50%;
}

.axg-page-icon-theme::after,
.axg-page-icon-segment::after,
.axg-page-icon-wheel::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
}

.axg-page-icon-ticket::before,
.axg-page-icon-add-ticket::before,
.axg-page-icon-import::before,
.axg-page-icon-generate::before,
.axg-page-icon-prize::before {
    width: 17px;
    height: 12px;
    border-radius: 4px;
}

.axg-page-icon-link::before {
    width: 17px;
    height: 8px;
    border-radius: 999px;
    transform: rotate(-25deg);
}

.axg-page-icon-popup::before {
    width: 17px;
    height: 13px;
    border-radius: 4px;
}

.axg-page-icon-spin-report::before,
.axg-page-icon-claim-report::before,
.axg-page-icon-export::before,
.axg-page-icon-activity::before,
.axg-page-icon-history::before {
    border-radius: 3px;
}

.axg-page-icon-users::before,
.axg-page-icon-role::before,
.axg-page-icon-security::before,
.axg-page-icon-general::before,
.axg-page-icon-reset::before {
    border-radius: 50%;
}

.topbar h1,
.login-brand h1,
.dashboard-hero h2,
.placeholder-card h2 {
    margin: 0;
    color: var(--text);
    letter-spacing: 0;
}

.topbar h1 {
    margin-top: 0;
    font-size: 18px;
    line-height: 1.15;
}

.topbar-kicker,
.eyebrow {
    margin: 0 0 6px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-meta {
    min-width: 0;
    display: grid;
    justify-items: end;
    gap: 3px;
}

.admin-name {
    max-width: 180px;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-role {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 9px;
    color: var(--blue-dark);
    background: var(--surface-blue);
    font-size: 12px;
}

.logout-btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 9px 14px;
    color: #b91c1c;
    background: #ffffff;
    font-size: 14px;
    font-weight: 900;
    transition: background 160ms ease, border-color 160ms ease;
}

.logout-btn:hover {
    border-color: #fca5a5;
    background: #fef2f2;
}

.sidebar-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--blue);
}

.mobile-overlay {
    display: none;
}

.content-area {
    width: 100%;
    min-width: 0;
    flex: 1;
    padding: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted-2);
    font-size: 13px;
}

.breadcrumb span + span::before {
    content: "/";
    margin-right: 8px;
    color: var(--line-strong);
}

.breadcrumb span:last-child {
    color: var(--blue-dark);
    font-weight: 800;
}

.dashboard-hero,
.panel-card,
.stat-card,
.login-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 30px;
    margin-bottom: 18px;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    right: 28px;
    bottom: 0;
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--blue));
}

.dashboard-hero h2 {
    font-size: 30px;
    line-height: 1.15;
}

.dashboard-filter-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
}

.dashboard-filter-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.dashboard-filter-field label {
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-filter-brand {
    flex: 0 1 240px;
}

.dashboard-filter-select,
.dashboard-filter-date {
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 8px 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.dashboard-period-select {
    min-width: 160px;
}

.dashboard-filter-select:focus,
.dashboard-filter-date:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dashboard-filter-dates {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.dashboard-filter-dates[hidden] {
    display: none;
}

.dashboard-filter-apply {
    min-height: 38px;
    border: 1px solid #2563eb;
    border-radius: 999px;
    padding: 0 16px;
    color: #ffffff;
    background: #2563eb;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-filter-apply:hover {
    background: #1d4ed8;
}

.dashboard-filter-summary {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-hero p:last-child,
.placeholder-card p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.7;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    position: relative;
    min-height: 138px;
    overflow: hidden;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -32px;
    bottom: -52px;
    width: 122px;
    height: 122px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-blue);
}

.stat-topline {
    width: max-content;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--blue-dark);
    background: var(--surface-blue);
    font-size: 12px;
    font-weight: 900;
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
}

.stat-card strong {
    position: relative;
    z-index: 1;
    color: var(--blue);
    font-size: 42px;
    line-height: 1;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.dashboard-main-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-quick-actions,
.dashboard-quick-status {
    margin-top: 16px;
}

.quick-action-grid,
.quick-status-grid,
.dashboard-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.quick-action-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.quick-action-grid .btn {
    justify-content: center;
    width: 100%;
    min-height: 44px;
    text-align: center;
}

.quick-status-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.quick-status-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 15px;
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-blue) 100%);
}

.quick-status-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    text-transform: uppercase;
}

.quick-status-card strong {
    color: var(--blue);
    font-size: 24px;
    line-height: 1;
}

.dashboard-report-grid {
    margin-top: 16px;
}

.dashboard-table-wrap {
    max-height: 430px;
}

.dashboard-table {
    min-width: 760px;
}

.dashboard-site-table {
    min-width: 900px;
}

.axg-dashboard-header {
    border-color: #d6e8ff;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96)),
        #ffffff;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.08);
}

.axg-dashboard-header::after {
    opacity: 0.28;
}

.axg-dashboard-header .eyebrow {
    color: #1d4ed8;
}

.axg-dashboard-header p:last-child {
    max-width: 520px;
    margin-bottom: 0;
    color: #475569;
    font-size: 14px;
}

.axg-dashboard-filter-card {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr) auto auto;
    align-items: end;
    gap: 16px;
    margin: 0 0 14px;
    border: 1px solid #d6e8ff;
    border-radius: 16px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.axg-dashboard-filter-card .dashboard-filter-field label {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.axg-dashboard-filter-card .dashboard-filter-select,
.axg-dashboard-filter-card .dashboard-filter-date {
    min-height: 40px;
    border-color: #cfe3ff;
    border-radius: 10px;
    background: #f8fbff;
}

.axg-dashboard-filter-card .dashboard-filter-select:focus,
.axg-dashboard-filter-card .dashboard-filter-date:focus {
    background: #ffffff;
}

.axg-dashboard-filter-card .dashboard-filter-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 10px;
}

.axg-dashboard-filter-card .dashboard-filter-dates[hidden] {
    display: none;
}

.axg-dashboard-filter-card .dashboard-filter-apply {
    min-height: 40px;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 900;
}

.dashboard-filter-summary {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 7px 12px;
    background: #f8fbff;
}

.axg-summary-grid {
    gap: 14px;
}

.axg-summary-card {
    display: grid;
    min-height: 122px;
    align-content: space-between;
    gap: 8px;
    border-color: #d6e8ff;
    border-radius: 16px;
    padding: 16px;
    background:
        linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.axg-summary-card::after {
    width: 92px;
    height: 92px;
    background: rgba(37, 99, 235, 0.07);
}

.axg-summary-card .stat-topline {
    width: fit-content;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 11px;
    font-weight: 900;
}

.axg-summary-card span {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.axg-summary-card strong {
    color: #0f172a;
    font-size: 32px;
    line-height: 1;
}

.axg-summary-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 13px;
    font-weight: 900;
}

.dashboard-quick-actions,
.dashboard-quick-status,
.dashboard-report-grid .panel-card {
    border-color: #d6e8ff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.dashboard-quick-actions .btn {
    min-height: 38px;
    border-radius: 10px;
}

.quick-status-card {
    border-color: #d6e8ff;
    border-radius: 14px;
    background: #f8fbff;
}

.quick-status-card strong {
    color: #0f172a;
}

.dashboard-table-wrap {
    border-color: #d6e8ff;
    border-radius: 14px;
}

.dashboard-table th,
.dashboard-site-table th {
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-table td,
.dashboard-site-table td {
    color: #334155;
    font-size: 13px;
}

.empty-state {
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    padding: 18px;
    color: #64748b;
    background: #f8fbff;
}

@media (max-width: 1100px) {
    .axg-dashboard-filter-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .axg-dashboard-filter-card {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .axg-dashboard-filter-card .dashboard-filter-dates {
        grid-template-columns: 1fr;
    }

    .axg-dashboard-filter-card .dashboard-filter-apply {
        width: 100%;
    }

    .dashboard-filter-summary {
        width: 100%;
        align-items: flex-start;
        border-radius: 12px;
    }

    .axg-summary-card {
        min-height: 112px;
    }

    .axg-summary-card strong {
        font-size: 28px;
    }
}

.export-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.export-report-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.export-card-description {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.export-filter-form {
    display: grid;
    gap: 16px;
    margin-top: auto;
}

.export-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.export-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.export-card-actions .btn {
    min-width: 148px;
    justify-content: center;
}

.reset-warning-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #fecaca;
    border-radius: 14px;
    margin-bottom: 16px;
    padding: 16px;
    color: #991b1b;
    background: #fef2f2;
    line-height: 1.6;
}

.reset-warning-card strong {
    flex: 0 0 auto;
    font-weight: 900;
}

.reset-summary-grid {
    margin-bottom: 16px;
}

.reset-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.reset-data-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reset-data-card-danger {
    border-color: #fecaca;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.reset-card-description {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.reset-data-form {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.reset-confirmation-hint {
    border: 1px dashed #fecaca;
    border-radius: 12px;
    padding: 10px 12px;
    color: #991b1b;
    background: #fff7f7;
    font-size: 13px;
    font-weight: 800;
}

.reset-confirmation-hint code {
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 3px 7px;
    color: #7f1d1d;
    background: #ffffff;
}

.role-access-layout,
.admin-users-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 16px;
}

.role-access-layout > *,
.admin-users-layout > * {
    min-width: 0;
}

.role-table,
.admin-users-table {
    min-width: 760px;
}

.role-form-grid,
.admin-user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-permission-card {
    margin-top: 16px;
}

.permission-form {
    display: grid;
    gap: 18px;
}

.permission-category-grid,
.permission-matrix {
    display: grid;
    gap: 18px;
}

.permission-matrix {
    grid-template-columns: 1fr;
}

.permission-category,
.permission-group {
    display: grid;
    gap: 12px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
}

.permission-category h4,
.permission-group-title {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.permission-check,
.permission-item {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #e0ecff;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    background: #f8fbff;
    font-size: 14px;
}

.permission-check input,
.permission-item input {
    flex: 0 0 auto;
}

.permission-check span,
.permission-label {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.permission-key-small {
    display: none;
}

.access-denied-card {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

.access-denied-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
}

.access-denied-card p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.access-denied-card .btn {
    width: max-content;
}

.panel-card {
    min-width: 0;
    padding: 24px;
}

.placeholder-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.description-card {
    max-width: 1040px;
    margin-bottom: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.placeholder-icon {
    display: none;
}

.placeholder-content {
    min-width: 0;
    width: 100%;
}

.description-card .placeholder-content > .eyebrow,
.description-card .placeholder-content > h2 {
    display: none;
}

.description-card .info-box {
    margin-top: 0;
}

.info-box {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    width: min(100%, 880px);
    margin-top: 16px;
    border: 1px dashed var(--blue-soft);
    border-radius: 16px;
    padding: 16px;
    background: var(--surface-blue);
}

.info-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.info-icon::before {
    content: "";
    width: 4px;
    height: 12px;
    border-radius: 3px;
    background: #ffffff;
}

.info-icon::after {
    content: "";
    position: absolute;
    top: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
}

.info-content {
    min-width: 0;
}

.info-content h3 {
    margin: 1px 0 10px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
}

.info-content ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.info-content li::marker {
    color: var(--blue);
}

.placeholder-note {
    width: max-content;
    max-width: 100%;
    margin-top: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 9px 11px;
    color: var(--blue-dark);
    background: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.section-heading span {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    color: var(--muted);
    background: var(--surface-blue);
    padding: 18px;
    text-align: center;
    line-height: 1.6;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-wrap {
    width: min(100%, 440px);
}

.login-card {
    padding: 30px;
}

.login-brand {
    margin-bottom: 28px;
}

.login-brand h1 {
    font-size: 24px;
}

.login-brand p {
    margin: 6px 0 0;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-form label {
    color: var(--soft);
    font-size: 14px;
    font-weight: 800;
}

.login-form input,
.site-form input,
.site-form select,
.site-form textarea,
.filter-bar input,
.filter-bar select,
.site-picker select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 12px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus,
.site-form input:focus,
.site-form select:focus,
.site-form textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-form button {
    min-height: 48px;
    border: 1px solid var(--blue);
    border-radius: 10px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
    margin-top: 8px;
}

.login-form button:hover {
    background: var(--blue-dark);
}

.alert-error,
.alert-success {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 12px;
}

.alert-error {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

.alert-success {
    border: 1px solid #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

.site-form-card {
    margin: 18px 0;
}

.site-form,
.filter-bar {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.site-form label,
.filter-bar label {
    display: grid;
    gap: 8px;
    color: var(--soft);
    font-size: 13px;
    font-weight: 800;
}

.site-form textarea {
    min-height: 118px;
    resize: vertical;
}

.site-picker {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.site-picker label {
    display: grid;
    gap: 8px;
    color: var(--soft);
    font-size: 13px;
    font-weight: 800;
}

.form-full {
    grid-column: 1 / -1;
}

.form-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.axg-page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0;
}

.axg-page-toolbar h3 {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 20px;
}

.axg-add-button {
    display: inline-flex;
    width: fit-content;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.axg-filter-card {
    margin: 18px 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.axg-filter-header {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    padding: 18px 20px;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.axg-filter-header strong {
    display: block;
    margin-top: 3px;
    font-size: 17px;
}

.axg-collapse-toggle {
    position: relative;
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
}

.axg-collapse-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #1d4ed8;
    border-bottom: 2px solid #1d4ed8;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform 0.2s ease;
}

.axg-filter-card.is-open .axg-collapse-toggle::before {
    transform: rotate(225deg) translate(-1px, -1px);
}

.axg-filter-body {
    border-top: 1px solid #e0edff;
    padding: 18px 20px 20px;
}

.axg-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 360px) auto;
    gap: 16px;
    align-items: end;
}

.axg-filter-field {
    display: grid;
    gap: 8px;
    color: var(--soft);
    font-size: 13px;
    font-weight: 800;
}

.axg-filter-field input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 12px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.axg-filter-field input[type="text"]:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.axg-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.axg-radio-row label {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 12px;
    color: #1e3a8a;
    background: #f8fbff;
    font-size: 13px;
    font-weight: 800;
}

.axg-radio-row input {
    margin: 0;
    accent-color: var(--blue);
}

.axg-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.axg-search-button {
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 14px;
}

.axg-site-form-panel[hidden],
.axg-filter-body[hidden] {
    display: none;
}

@media (max-width: 760px) {
    .axg-page-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .axg-add-button {
        width: fit-content;
        align-self: flex-end;
    }

    .axg-filter-grid {
        grid-template-columns: 1fr;
    }

    .axg-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .axg-page-toolbar {
        margin-top: 14px;
    }

    .axg-add-button,
    .axg-filter-actions .btn {
        width: 100%;
    }

    .axg-filter-header {
        padding: 16px;
    }

    .axg-filter-body {
        padding: 16px;
    }

    .axg-radio-row {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.settings-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.settings-section {
    width: 100%;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

.section-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 2px solid #bfdbfe;
    border-radius: 999px;
    color: #2563eb;
    font-size: 0;
}

.section-icon::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2563eb;
}

.settings-card {
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 34px;
}

.settings-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.settings-field-wide {
    grid-column: 1 / -1;
}

.settings-field label:first-child {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

.info-icon {
    display: inline-grid;
    width: 15px;
    height: 15px;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #64748b;
    background: #f8fafc;
    cursor: help;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 9px 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-field textarea {
    min-height: 92px;
    border-radius: 14px;
    resize: vertical;
    line-height: 1.5;
}

.settings-field input:focus,
.settings-field select:focus,
.settings-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.settings-field small {
    max-width: 58ch;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.switch-field {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.switch-slider {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.16);
    transition: background 0.18s ease;
}

.switch-slider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transition: transform 0.18s ease;
}

.switch-field input:checked + .switch-slider {
    background: #2563eb;
}

.switch-field input:checked + .switch-slider::after {
    transform: translateX(22px);
}

.switch-text {
    display: inline-flex;
    min-width: 38px;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 4px 9px;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 900;
}

.switch-text::before {
    content: attr(data-off);
}

.switch-field input:checked ~ .switch-text {
    border-color: #bbf7d0;
    color: #166534;
    background: #dcfce7;
}

.switch-field input:checked ~ .switch-text::before {
    content: attr(data-on);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 2px;
}

.filter-bar {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
    align-items: end;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: var(--surface-blue);
}

.btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 13px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-gold {
    border-color: var(--blue);
    color: #ffffff;
    background: var(--blue);
}

.btn-gold:hover {
    background: var(--blue-dark);
}

.btn-muted {
    border-color: var(--line-strong);
    color: var(--blue-dark);
    background: #ffffff;
}

.btn-muted:hover {
    background: var(--surface-blue);
}

.btn-edit {
    border-color: #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

.btn-edit:hover {
    background: #dbeafe;
}

.btn-soft {
    border-color: #fed7aa;
    color: #9a3412;
    background: #fff7ed;
}

.btn-danger {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}

.btn-success {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

.btn-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.table-heading {
    align-items: flex-start;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.data-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 13px 12px;
    text-align: left;
    vertical-align: top;
    color: var(--soft);
    font-size: 13px;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--text);
    background: var(--surface-blue-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.data-table tr:hover td {
    background: var(--surface-blue);
}

.data-table code {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 7px;
    color: var(--blue-dark);
    background: var(--surface-blue);
}

.table-link {
    color: var(--blue);
    font-weight: 800;
}

.table-empty {
    color: var(--muted);
    text-align: center;
}

.status-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 900;
}

.status-active {
    border: 1px solid #bbf7d0;
    color: #166534;
    background: #dcfce7;
}

.status-inactive {
    border: 1px solid #e5e7eb;
    color: #64748b;
    background: #f8fafc;
}

.status-visible {
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    background: #dbeafe;
}

.status-hidden {
    border: 1px solid #e5e7eb;
    color: #64748b;
    background: #f8fafc;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.table-actions form {
    margin: 0;
}

.muted-text {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.no-user-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 9px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 900;
}

.site-code-badge {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    align-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 3px 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 11px;
    font-weight: 900;
}

.spin-status-success {
    border: 1px solid #bbf7d0;
    color: #166534;
    background: #dcfce7;
}

.spin-status-failed {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

.spin-status-not-spun,
.claim-status-none {
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #f8fafc;
}

.report-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.spin-report-filter {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.spin-report-table {
    min-width: 1320px;
}

.spin-empty-state {
    display: grid;
    gap: 6px;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    padding: 22px;
    color: var(--muted);
    background: var(--surface-blue);
    text-align: center;
}

.spin-empty-state strong {
    color: var(--text);
    font-size: 16px;
}

.claim-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.claim-report-filter {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.claim-report-table {
    min-width: 1320px;
}

.claim-status-pending {
    border: 1px solid #fde68a;
    color: #92400e;
    background: #fffbeb;
}

.claim-status-approved {
    border: 1px solid #bbf7d0;
    color: #166534;
    background: #dcfce7;
}

.claim-status-rejected {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

.claim-empty-state {
    display: grid;
    gap: 6px;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    padding: 22px;
    color: var(--muted);
    background: var(--surface-blue);
    text-align: center;
}

.claim-empty-state strong {
    color: var(--text);
    font-size: 16px;
}

.claim-report-action-shell,
.claim-report-action-form,
.claim-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.claim-report-action-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.claim-report-action-btn:hover {
    transform: translateY(-1px);
}

.claim-report-action-btn svg {
    width: 15px;
    height: 15px;
}

.claim-report-action-approve {
    background: #16a34a;
    border-color: #16a34a;
}

.claim-report-action-reject {
    background: #dc2626;
    border-color: #dc2626;
}

.claim-report-action-note {
    background: #123f73;
    border-color: #123f73;
}

.claim-note-modal[hidden] {
    display: none;
}

.claim-note-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 20px;
}

.claim-note-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(2px);
}

.claim-note-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    padding: 20px;
}

.claim-note-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.claim-note-header h3 {
    margin: 3px 0 0;
    color: #172554;
    font-size: 20px;
    font-weight: 700;
}

.claim-note-close {
    width: 34px;
    height: 34px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.claim-note-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.claim-note-meta div {
    min-width: 0;
    border: 1px solid #e0ecff;
    border-radius: 12px;
    background: #f8fbff;
    padding: 10px 12px;
}

.claim-note-meta span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 3px;
}

.claim-note-meta strong {
    display: block;
    overflow: hidden;
    color: #111827;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.claim-note-modal-form {
    display: grid;
    gap: 8px;
}

.claim-note-modal-form textarea {
    width: 100%;
    min-height: 150px;
    border: 1px solid #bfd7fb;
    border-radius: 12px;
    padding: 11px 12px;
    color: #111827;
    background: #ffffff;
    resize: vertical;
}

.claim-note-form-help {
    color: #64748b;
    font-size: 12px;
}

.claim-note-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.claim-note-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .claim-note-dialog {
        padding: 16px;
        border-radius: 16px;
    }

    .claim-note-meta {
        grid-template-columns: 1fr;
    }
}

.activity-log-card {
    margin-top: 18px;
}

.activity-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(150px, 180px) minmax(150px, 180px) auto;
}

.activity-table {
    min-width: 980px;
}

.prize-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prize-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(180px, 240px) auto;
}

.prize-table {
    min-width: 1180px;
}

.segment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.segment-layout-info {
    grid-template-columns: minmax(0, 1fr);
}

.segment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segment-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 190px) minmax(170px, 230px) auto;
}

.segment-table {
    min-width: 1240px;
}

.segment-tabs {
    margin-top: 18px;
}

.segment-tab-intro {
    margin-bottom: 18px;
}

.button-site-card .section-heading,
.segment-layout .section-heading,
.segment-preview-card .section-heading,
.table-heading {
    align-items: center;
    gap: 14px;
}

.segment-action-primary,
.segment-btn-save,
.segment-btn-edit,
.segment-btn-delete {
    gap: 7px;
}

.segment-action-primary svg,
.segment-btn-save svg,
.segment-btn-edit svg,
.segment-btn-delete svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.segment-btn-save {
    border: 0;
}

.segment-btn-neutral {
    white-space: nowrap;
}

.segment-table th {
    background: #f8fafc;
}

.segment-table td {
    vertical-align: middle;
}

.segment-table .color-swatch {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.45);
}

.segment-table code {
    color: #475569;
    font-size: 12px;
}

.segment-table .table-actions {
    align-items: center;
    gap: 6px;
}

.segment-table .table-actions .btn {
    min-height: 32px;
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
}

.segment-preview-card {
    position: sticky;
    top: calc(var(--topbar-height) + 36px);
}

.segment-preview-wheel {
    position: relative;
    width: min(100%, 220px);
    aspect-ratio: 1;
    margin: 0 auto 18px;
    border: 10px solid #ffffff;
    border-radius: 50%;
    background: var(--segment-gradient);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.16);
}

.segment-preview-wheel::before {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 48px;
    height: 48px;
    border: 7px solid #ffffff;
    border-radius: 50%;
    background: var(--surface-blue-strong);
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.segment-preview-wheel span {
    position: absolute;
    left: 50%;
    top: -24px;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 28px solid var(--blue);
    transform: translateX(-50%);
}

.segment-preview-list {
    display: grid;
    gap: 10px;
}

.segment-preview-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: var(--surface-blue);
}

.segment-preview-item strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.segment-preview-item small {
    color: var(--muted);
    font-weight: 800;
}

.compact-empty {
    min-height: 110px;
}

.segment-info-notes {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.segment-info-note {
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    padding: 11px 12px;
    color: #475569;
    background: #eff6ff;
    font-size: 13px;
    line-height: 1.45;
}

.ticket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-code-field {
    min-width: 0;
}

.ticket-code-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.ticket-code-control .btn {
    min-height: 44px;
}

.ticket-recent-card {
    margin-top: 18px;
}

.generated-result-card {
    margin: 18px 0;
}

.generated-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.generated-summary div {
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--surface-blue);
}

.generated-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.generated-summary strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.copy-codes-box {
    width: 100%;
    min-height: 118px;
    margin-bottom: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
    color: var(--text);
    font-family: Consolas, Monaco, monospace;
    resize: vertical;
}

.ticket-table {
    min-width: 1120px;
}

.generated-ticket-table {
    min-width: 720px;
}

.import-ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
    gap: 18px;
    align-items: start;
}

.import-format-card,
.import-result-card {
    margin-top: 0;
}

.import-code-sample {
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    padding: 14px;
    background: #eff6ff;
    color: #1e3a8a;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-line;
}

.import-rules,
.import-error-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--soft);
    line-height: 1.7;
}

.import-rules code,
.import-error-list code {
    color: var(--blue-dark);
}

.import-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.import-result-grid h4 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 14px;
}

.import-code-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.import-code-list code {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 6px 10px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 900;
}

.ticket-list-card {
    margin-top: 18px;
}

.ticket-list-filter {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.ticket-list-table {
    min-width: 1480px;
}

.ticket-detail-card {
    margin: 18px 0;
}

.ticket-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ticket-detail-grid div {
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--surface-blue);
}

.ticket-detail-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ticket-detail-grid strong {
    color: var(--text);
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.pagination span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.btn.is-disabled {
    pointer-events: none;
    opacity: 0.55;
}

.ticket-status-unused {
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    background: #dbeafe;
}

.ticket-status-used {
    border: 1px solid #bbf7d0;
    color: #166534;
    background: #dcfce7;
}

.ticket-status-expired {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fee2e2;
}

.ticket-status-cancelled {
    border: 1px solid #fed7aa;
    color: #9a3412;
    background: #ffedd5;
}

.color-swatch {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 7px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--swatch-color);
    vertical-align: middle;
}

.segment-image-swatch {
    overflow: hidden;
    background: #f8fafc;
}

.segment-image-swatch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.button-site-card {
    margin: 18px 0;
}

.button-link-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.button-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-status-card {
    position: sticky;
    top: calc(var(--topbar-height) + 36px);
}

.link-checklist {
    display: grid;
    gap: 10px;
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--surface-blue);
    color: var(--soft);
}

.check-item strong {
    white-space: nowrap;
}

.check-item.is-set strong {
    color: var(--success);
}

.check-item.is-empty strong {
    color: var(--muted-2);
}

.button-preview-card {
    margin-bottom: 18px;
}

.preview-button-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.preview-button {
    display: grid;
    gap: 8px;
    min-height: 96px;
    align-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: var(--surface-blue);
    color: var(--text);
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.preview-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.preview-button span {
    font-weight: 900;
}

.preview-button small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-register {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.preview-login {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.preview-rtp {
    border-color: #fed7aa;
    background: #fff7ed;
}

.preview-whatsapp {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.preview-button.is-disabled {
    color: var(--muted-2);
    background: #f8fafc;
    opacity: 0.72;
}

.theme-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.theme-side {
    display: grid;
    gap: 16px;
}

.theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.color-field {
    min-width: 0;
}

.color-control {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.color-control input[type="color"] {
    width: 56px;
    min-width: 56px;
    height: 44px;
    padding: 4px;
    cursor: pointer;
}

.theme-preview-card,
.theme-status-card {
    min-width: 0;
}

.theme-background-section,
.theme-wheel-section {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    background: var(--surface-blue);
}

.compact-heading {
    margin-bottom: 0;
}

.current-background-preview {
    display: grid;
    gap: 8px;
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    padding: 12px;
    background: #ffffff;
}

.current-background-preview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.current-background-preview img {
    width: 100%;
    max-height: 220px;
    border-radius: 12px;
    object-fit: cover;
}

.upload-hint {
    display: grid;
    gap: 7px;
    margin-top: 8px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 10px 12px;
    color: #334155;
    background: rgba(239, 246, 255, 0.78);
    font-size: 12px;
    line-height: 1.45;
}

.upload-hint-title {
    color: #1e40af;
    font-size: 12px;
    font-weight: 900;
}

.upload-hint ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.upload-hint li {
    margin: 0;
}

.axg-asset-section {
    display: grid;
    gap: 18px;
}

.axg-asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.axg-asset-field {
    display: grid;
    gap: 12px;
    min-width: 0;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.axg-asset-form {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.axg-asset-label {
    display: block;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
}

.axg-asset-status {
    margin-top: 4px;
}

.axg-upload-box {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 5px 10px 5px 6px;
    color: #334155;
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.axg-upload-box:focus-within,
.axg-upload-box:hover {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.axg-upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.axg-upload-preview {
    display: grid;
    overflow: hidden;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
}

.axg-upload-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.axg-upload-placeholder {
    color: #2563eb;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.axg-upload-text {
    overflow: hidden;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.axg-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 5px 9px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 11px;
    font-weight: 900;
}

.axg-upload-help {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.axg-upload-current {
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.axg-audio-preview {
    display: block;
    width: 100%;
    max-width: 360px;
    height: 34px;
}

.axg-asset-actions,
.axg-asset-remove {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.content-area .axg-asset-section .axg-asset-actions,
.content-area .axg-asset-section .axg-asset-remove {
    grid-column: auto;
    justify-content: flex-start;
    margin-top: 2px;
}

.content-area .axg-asset-section .axg-asset-actions .btn,
.content-area .axg-asset-section .axg-asset-remove .btn {
    width: auto;
    min-height: 34px;
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.content-area .axg-asset-section .axg-asset-remove-form {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
}

.content-area .axg-asset-section .axg-asset-remove-btn {
    display: inline-flex;
    width: fit-content;
    min-width: 0;
    max-width: 100%;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.axg-asset-field select {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 9px 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    font-size: 14px;
}

@media (max-width: 900px) {
    .axg-asset-grid {
        grid-template-columns: 1fr;
    }
}

/* Global UI polish: primary actions and lighter text hierarchy. */
:root {
    --primary-action: #163d73;
    --primary-action-hover: #102f59;
    --primary-action-focus: rgba(22, 61, 115, 0.22);
    --text-strong: #172554;
    --text-body: #334155;
    --text-muted-soft: #64748b;
}

.btn,
.axg-btn-primary,
.axg-btn-secondary,
.axg-btn-danger,
.admin-form-btn,
.gs-save-btn,
.gs-reset-btn,
.export-btn-primary,
.dashboard-filter-apply {
    font-weight: 600 !important;
}

.btn-gold,
.dashboard-filter-apply,
.axg-btn-primary,
.admin-form-btn-primary,
.export-btn-primary,
.general-settings-page .gs-save-btn,
.content-area .role-form-grid button[type="submit"],
.login-form button {
    border-color: var(--primary-action) !important;
    color: #ffffff !important;
    background: var(--primary-action) !important;
    box-shadow: 0 6px 14px rgba(22, 61, 115, 0.12) !important;
}

.btn-gold:hover,
.dashboard-filter-apply:hover,
.axg-btn-primary:hover,
.admin-form-btn-primary:hover,
.export-btn-primary:hover,
.general-settings-page .gs-save-btn:hover,
.content-area .role-form-grid button[type="submit"]:hover,
.login-form button:hover {
    border-color: var(--primary-action-hover) !important;
    background: var(--primary-action-hover) !important;
}

.btn-gold:focus-visible,
.dashboard-filter-apply:focus-visible,
.axg-btn-primary:focus-visible,
.admin-form-btn-primary:focus-visible,
.export-btn-primary:focus-visible,
.general-settings-page .gs-save-btn:focus-visible,
.content-area .role-form-grid button[type="submit"]:focus-visible,
.login-form button:focus-visible {
    outline: 3px solid var(--primary-action-focus);
    outline-offset: 2px;
}

.btn:not(.btn-small),
.dashboard-filter-apply,
.axg-btn-primary,
.admin-form-btn,
.gs-save-btn,
.gs-reset-btn,
.export-btn-primary {
    min-height: 38px !important;
    border-radius: 10px !important;
    padding: 8px 15px !important;
    font-size: 13px !important;
}

.btn-small {
    font-weight: 600 !important;
}

.content-area h1,
.content-area h2,
.content-area h3,
.section-heading h3,
.axg-page-title {
    color: var(--text-strong) !important;
    font-weight: 650 !important;
}

.content-area p,
.content-area li,
.content-area td,
.content-area label,
.content-area small,
.form-help,
.form-help-inline,
.axg-form-help,
.settings-field small,
.gs-help,
.export-card-description,
.upload-hint,
.axg-upload-help,
.axg-upload-current,
.muted-text {
    color: var(--text-body);
    font-weight: 400 !important;
}

.site-form label,
.filter-bar label,
.site-picker label,
.settings-field label,
.gs-field label,
.axg-filter-field,
.dashboard-filter-field label,
.content-area .site-form label,
.content-area .filter-bar label,
.content-area .site-picker label,
.content-area .role-form-grid label {
    color: var(--text-body) !important;
    font-weight: 500 !important;
}

.eyebrow,
.stat-topline,
.quick-status-card span,
.data-table th,
.status-badge,
.site-code-badge,
.no-user-badge,
.axg-summary-card .stat-topline {
    font-weight: 600 !important;
}

.content-area .form-help,
.content-area .form-help-inline,
.content-area .site-form small,
.content-area .filter-bar small,
.axg-upload-help,
.settings-field small,
.gs-help {
    color: var(--text-muted-soft) !important;
}

.btn-muted,
.axg-btn-secondary,
.admin-form-btn-secondary,
.general-settings-page .gs-reset-btn {
    color: var(--text-strong) !important;
    font-weight: 500 !important;
}

.table-link {
    color: var(--primary-action) !important;
    font-weight: 600 !important;
}

.axg-page-icon,
.nav-icon {
    color: var(--primary-action);
}

.content-area .wheel-theme-actions {
    justify-content: flex-start;
    margin-top: 16px;
}

.content-area .wheel-theme-actions .btn.btn-small {
    width: auto;
    min-width: 0;
    min-height: 34px;
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 13px;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .axg-asset-field {
        padding: 14px;
    }

    .axg-upload-box {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 8px;
        padding-right: 8px;
    }

    .axg-upload-preview {
        width: 32px;
        height: 32px;
    }

    .axg-upload-icon {
        padding: 5px 7px;
        font-size: 10px;
    }
}

.form-help {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.form-help-inline {
    align-self: end;
    border: 1px dashed #93c5fd;
    border-radius: 10px;
    padding: 10px 12px;
    color: #1e40af;
    background: rgba(239, 246, 255, 0.74);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.divider-preview-box {
    display: grid;
    gap: 8px;
    border: 1px dashed #93c5fd;
    border-radius: 12px;
    padding: 12px;
    color: var(--soft);
    background: rgba(239, 246, 255, 0.74);
}

.divider-preview-box span {
    color: #1e40af;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.divider-preview-line {
    width: min(260px, 100%);
    height: var(--divider-preview-width, 2.5px);
    border-radius: 999px;
    background: var(--divider-preview-color, #7a4a08);
}

.divider-preview-line.is-off {
    opacity: 0.24;
    background: #94a3b8;
}

.divider-preview-box small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.custom-wheel-frame-preview {
    display: grid;
    gap: 10px;
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    padding: 14px;
    color: var(--soft);
    background: rgba(239, 246, 255, 0.74);
}

.custom-wheel-frame-preview > span {
    color: #1e40af;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.custom-wheel-frame-preview-stage {
    position: relative;
    width: min(220px, 100%);
    aspect-ratio: 1;
}

.custom-wheel-frame-preview-wheel {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: conic-gradient(#2563eb, #22c55e, #f59e0b, #ef4444, #8b5cf6, #2563eb);
}

.custom-wheel-frame-preview-stage img {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.custom-wheel-frame-preview small {
    overflow-wrap: anywhere;
}

.custom-wheel-frame-empty {
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    padding: 14px;
    color: #64748b;
    background: rgba(239, 246, 255, 0.74);
    font-size: 13px;
}

.custom-wheel-pointer-preview {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.custom-wheel-pointer-preview > span {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.custom-wheel-pointer-preview-stage {
    display: grid;
    width: 104px;
    height: 104px;
    place-items: center;
    border: 1px dashed #93c5fd;
    border-radius: 10px;
    background:
        linear-gradient(45deg, #eff6ff 25%, transparent 25%),
        linear-gradient(-45deg, #eff6ff 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eff6ff 75%),
        linear-gradient(-45deg, transparent 75%, #eff6ff 75%),
        #ffffff;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.custom-wheel-pointer-preview-stage img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.custom-wheel-pointer-preview small {
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: 12px;
}

.segment-text-preview-box {
    display: grid;
    gap: 8px;
    border: 1px dashed #93c5fd;
    border-radius: 12px;
    padding: 12px;
    color: var(--soft);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(250, 204, 21, 0.10)),
        #ffffff;
}

.segment-text-preview-box span {
    color: #1e40af;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.segment-text-preview-box strong {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.segment-text-preview-box small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.center-logo-preview {
    display: grid;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    border: 1px dashed #93c5fd;
    border-radius: 12px;
    padding: 12px;
    color: var(--soft);
    background: rgba(239, 246, 255, 0.74);
}

.center-logo-preview span {
    color: #1e40af;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.center-logo-preview img {
    width: 120px;
    height: 120px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #ffffff;
    object-fit: contain;
    padding: 10px;
}

.center-logo-preview small {
    max-width: min(520px, 100%);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.center-logo-empty {
    width: fit-content;
    max-width: 100%;
    border: 1px dashed #93c5fd;
    border-radius: 12px;
    padding: 12px 14px;
    color: #475569;
    background: rgba(239, 246, 255, 0.74);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.theme-reset-card {
    display: grid;
    gap: 16px;
}

.reset-notice {
    display: grid;
    gap: 8px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 14px;
    color: #334155;
    background: rgba(239, 246, 255, 0.78);
    line-height: 1.6;
}

.reset-notice p {
    margin: 0;
}

.reset-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.reset-checklist div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px;
    background: var(--surface-blue);
}

.reset-check-icon {
    grid-row: span 2;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2563eb;
}

.reset-check-icon::before {
    content: "";
    display: block;
    width: 7px;
    height: 12px;
    margin: 4px auto 0;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.reset-check-icon.is-paused {
    background: #94a3b8;
}

.reset-check-icon.is-paused::before {
    width: 10px;
    height: 2px;
    margin-top: 11px;
    border: 0;
    background: #ffffff;
    transform: none;
}

.reset-checklist strong {
    color: var(--text);
    font-size: 14px;
}

.reset-checklist small {
    color: var(--muted);
    font-weight: 700;
}

.current-logo-preview img {
    width: min(220px, 100%);
    max-height: 160px;
    object-fit: contain;
    background: #0f172a;
}

.remove-background-form {
    margin-top: 14px;
}

.theme-preview {
    position: relative;
    overflow: hidden;
    display: grid;
    justify-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    background: var(--preview-page-background);
    background-position: var(--preview-bg-position);
    background-size: var(--preview-bg-size);
    background-repeat: no-repeat;
    color: var(--preview-text);
    text-align: center;
}

.theme-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--preview-overlay);
    pointer-events: none;
}

.theme-preview > * {
    position: relative;
    z-index: 1;
}

.theme-preview.has-glow {
    box-shadow: 0 0 34px color-mix(in srgb, var(--preview-primary) 28%, transparent);
}

.mini-wheel {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--preview-wheel-size, 150px);
    height: var(--preview-wheel-size, 150px);
    border: 0;
    border-radius: 50%;
    padding: var(--preview-wheel-border-width, 8px);
    background:
        repeating-conic-gradient(from -2deg, rgba(255, 247, 194, 0.95) 0deg 5deg, rgba(180, 83, 9, 0.10) 5deg 15deg),
        var(--preview-frame-gradient, conic-gradient(from -30deg, #fff4b8, var(--preview-border), #b8860b, #fff4b8));
    box-shadow: var(--preview-wheel-shadow), var(--preview-wheel-glow);
}

.mini-wheel::before {
    content: "";
    position: absolute;
    inset: var(--preview-wheel-border-width, 8px);
    z-index: 0;
    border-radius: 50%;
    background:
        conic-gradient(
            color-mix(in srgb, var(--preview-primary) 72%, white) 0deg 60deg,
            var(--preview-secondary) 60deg 120deg,
            color-mix(in srgb, #ffffff 80%, var(--preview-border)) 120deg 180deg,
            var(--preview-primary) 180deg 240deg,
            color-mix(in srgb, var(--preview-secondary) 70%, white) 240deg 300deg,
            color-mix(in srgb, #ffffff 82%, var(--preview-primary)) 300deg 360deg
        );
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.20), inset 0 -18px 24px rgba(15, 23, 42, 0.18);
}

.mini-wheel::after {
    content: "";
    position: absolute;
    inset: var(--preview-wheel-border-width, 8px);
    z-index: 1;
    border-radius: 50%;
    background:
        repeating-conic-gradient(from -30deg, transparent 0deg 58deg, rgba(120, 53, 15, 0.62) 58deg 60deg),
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.45), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,.18), transparent 45%);
    pointer-events: none;
}

.preview-shine-off .mini-wheel::after,
.preview-mode-solid .mini-wheel::after {
    opacity: 0;
}

.preview-mode-solid .mini-wheel {
    background: var(--preview-border);
}

.preview-style-soft-luxury .mini-wheel {
    --preview-frame-gradient: conic-gradient(from -30deg, #ffffff, var(--preview-secondary), var(--preview-primary), #ffffff);
    --preview-center-gradient: radial-gradient(circle at 30% 25%, #ffffff, var(--preview-center-color), var(--preview-secondary));
}

.preview-style-neon-glow .mini-wheel {
    --preview-frame-gradient: conic-gradient(from -30deg, #ecfeff, var(--preview-secondary), var(--preview-primary), #f0abfc, #ecfeff);
    --preview-center-gradient: radial-gradient(circle at 30% 25%, #ecfeff, var(--preview-center-color), var(--preview-primary));
}

.preview-style-dark-premium .mini-wheel {
    --preview-frame-gradient: conic-gradient(from -30deg, #94a3b8, var(--preview-border), #020617, #475569, var(--preview-border));
    --preview-center-gradient: radial-gradient(circle at 30% 25%, #64748b, var(--preview-center-color), #020617);
}

.preview-style-gold-shine .mini-wheel {
    --preview-frame-gradient: conic-gradient(from -30deg, #fff4b8, var(--preview-border), #b8860b, #fff4b8);
    --preview-center-gradient: radial-gradient(circle at 30% 25%, #fff7c2, var(--preview-center-color), #8a6500);
}

.mini-wheel strong {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 5px solid var(--preview-border);
    border-radius: 50%;
    color: var(--preview-button-text);
    background: var(--preview-center-gradient, var(--preview-center-color));
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.mini-wheel strong span {
    overflow: hidden;
    padding: 0 4px;
    text-overflow: ellipsis;
}

.mini-center-logo {
    display: block;
    max-width: var(--preview-center-logo-size, 62%);
    max-height: var(--preview-center-logo-size, 62%);
    object-fit: contain;
}

.mini-wheel .mini-pointer {
    position: absolute;
    left: 50%;
    top: -17px;
    z-index: 4;
    width: 24px;
    height: 27px;
    border: 0;
    background: linear-gradient(135deg, #fff7c2, var(--preview-pointer-color), #8a6500);
    clip-path: polygon(50% 100%, 4% 0, 96% 0);
    filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.28));
    transform: translateX(-50%);
}

.mini-wheel em {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    color: var(--preview-button-text);
    font-size: var(--preview-label-size, 12px);
    font-style: normal;
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    transform-origin: center;
}

.mini-wheel em:nth-of-type(1) {
    transform: translate(-50%, -50%) rotate(25deg) translateY(-48px) rotate(90deg);
}

.mini-wheel em:nth-of-type(2) {
    transform: translate(-50%, -50%) rotate(145deg) translateY(-48px) rotate(90deg);
}

.mini-wheel em:nth-of-type(3) {
    transform: translate(-50%, -50%) rotate(265deg) translateY(-48px) rotate(90deg);
}

.theme-preview h4 {
    margin: 0;
    color: var(--preview-text);
    font-size: 20px;
}

.theme-preview p {
    margin: 0;
    color: var(--preview-text);
    opacity: 0.78;
    line-height: 1.6;
}

.theme-preview button {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--preview-button-text);
    background: var(--preview-button);
    font-weight: 900;
}

.theme-debug {
    margin-top: 16px;
    padding: 14px;
    border: 1px dashed rgba(37, 99, 235, 0.28);
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.72);
}

.theme-debug summary {
    cursor: pointer;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 800;
}

.theme-debug-grid {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.theme-debug-grid div {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    align-items: start;
}

.theme-debug-grid span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.theme-debug-grid code {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: normal;
}

.admin-wheel-preview {
    --admin-preview-glow: 0 0 20px rgba(250, 204, 21, 0.20);
}

.admin-wheel-preview.preview-gold-glow-off {
    --admin-preview-glow: none;
}

.admin-wheel-preview.preview-gold-glow-medium {
    --admin-preview-glow: 0 0 30px rgba(250, 204, 21, 0.34), 0 0 54px rgba(180, 83, 9, 0.16);
}

.admin-premium-wheel {
    position: relative;
    display: grid;
    place-items: center;
    width: min(220px, 78vw);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 14px;
    background:
        radial-gradient(circle at 34% 22%, rgba(255, 247, 194, 0.95), transparent 18%),
        conic-gradient(from -30deg, #fff7c2, #facc15, #b97918, #6b4a12, #f0c85e, #fff7c2);
    box-shadow: 0 14px 30px rgba(39, 24, 6, 0.20), var(--admin-preview-glow);
}

.admin-wheel-pointer {
    position: absolute;
    top: -4px;
    left: 50%;
    z-index: 8;
    width: 24px;
    height: 30px;
    background: linear-gradient(180deg, #fff7c2, #f0c85e 48%, #b47716);
    clip-path: polygon(50% 100%, 8% 0, 92% 0);
    filter: drop-shadow(0 4px 8px rgba(38, 21, 4, 0.32));
    transform: translateX(-50%);
}

.admin-wheel-disc {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1;
    border: 3px solid #6b4a12;
    border-radius: 50%;
    background:
        conic-gradient(
            #b71c1c 0deg 60deg,
            #e0b84f 60deg 120deg,
            #d8aa35 120deg 180deg,
            #f0c85e 180deg 240deg,
            #c9971e 240deg 300deg,
            #e7bd57 300deg 360deg
        );
    box-shadow: inset 0 0 0 2px rgba(255, 247, 194, 0.28), inset 0 -16px 24px rgba(58, 34, 7, 0.22);
}

.preview-highlight-off .admin-wheel-disc {
    background:
        conic-gradient(
            #e0b84f 0deg 60deg,
            #d8aa35 60deg 120deg,
            #f0c85e 120deg 180deg,
            #c9971e 180deg 240deg,
            #e7bd57 240deg 300deg,
            #b9831f 300deg 360deg
        );
}

.preview-segment-gold-orange .admin-wheel-disc {
    background:
        conic-gradient(#b71c1c 0deg 60deg, #f59e0b 60deg 120deg, #f0c85e 120deg 180deg, #d97706 180deg 240deg, #fbbf24 240deg 300deg, #b45309 300deg 360deg);
}

.preview-segment-bronze .admin-wheel-disc {
    background:
        conic-gradient(#b71c1c 0deg 60deg, #b9831f 60deg 120deg, #94610f 120deg 180deg, #c9971e 180deg 240deg, #7a5416 240deg 300deg, #d8aa35 300deg 360deg);
}

.admin-wheel-disc::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: repeating-conic-gradient(from -30deg, transparent 0deg 58deg, rgba(78, 47, 9, 0.76) 58deg 60deg);
    -webkit-mask: radial-gradient(farthest-side, transparent 0 22%, #000 24% 100%);
    mask: radial-gradient(farthest-side, transparent 0 22%, #000 24% 100%);
    pointer-events: none;
}

.preview-divider-off .admin-wheel-disc::before {
    display: none;
}

.admin-wheel-disc::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.22), transparent 28%);
}

.admin-wheel-segment {
    position: absolute;
    left: 50%;
    top: 50%;
    color: #3b2607;
    font-size: 11px;
    font-weight: 950;
    text-shadow: 0 1px 1px rgba(255, 247, 194, 0.48);
    transform-origin: center;
}

.admin-segment-one {
    color: #fff7c2;
    transform: translate(-50%, -50%) rotate(30deg) translateY(-58px) rotate(90deg);
}

.admin-segment-two {
    transform: translate(-50%, -50%) rotate(90deg) translateY(-58px) rotate(90deg);
}

.admin-segment-three {
    transform: translate(-50%, -50%) rotate(150deg) translateY(-58px) rotate(90deg);
}

.admin-segment-four {
    transform: translate(-50%, -50%) rotate(210deg) translateY(-58px) rotate(90deg);
}

.admin-segment-five {
    transform: translate(-50%, -50%) rotate(270deg) translateY(-58px) rotate(90deg);
}

.admin-segment-six {
    transform: translate(-50%, -50%) rotate(330deg) translateY(-58px) rotate(90deg);
}

.admin-wheel-center {
    position: absolute;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 64px;
    aspect-ratio: 1;
    border: 4px solid #fff7c2;
    border-radius: 50%;
    color: #ffffff;
    background: radial-gradient(circle at 32% 24%, #fff7c2, #b8860b 48%, #3b2607);
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.32), inset 0 -8px 16px rgba(39, 24, 6, 0.30);
    font-size: 11px;
    font-weight: 950;
    overflow: hidden;
}

.admin-wheel-center-logo {
    max-width: var(--preview-center-logo-size, 62%);
    max-height: var(--preview-center-logo-size, 62%);
    object-fit: contain;
}

.theme-preview .admin-premium-wheel {
    width: min(220px, 78vw);
    padding: 14px;
    background: var(--preview-border);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18), 0 0 28px color-mix(in srgb, var(--preview-primary) 18%, transparent);
}

.theme-preview.no-glow .admin-premium-wheel,
.theme-preview.no-glow .admin-wheel-pointer,
.theme-preview.no-glow .admin-wheel-center {
    box-shadow: none;
    filter: none;
}

.theme-preview .admin-wheel-pointer {
    width: var(--preview-pointer-size, 30px);
    height: calc(var(--preview-pointer-size, 30px) * 1.16);
    background: var(--preview-pointer-color);
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.28));
}

.theme-preview.preview-pointer-classic .admin-wheel-pointer {
    clip-path: polygon(50% 100%, 10% 0, 90% 0);
}

.theme-preview.preview-pointer-gold-pin .admin-wheel-pointer {
    border-radius: 999px 999px 12px 12px;
    clip-path: polygon(50% 100%, 8% 20%, 22% 0, 78% 0, 92% 20%);
}

.theme-preview.preview-pointer-triangle .admin-wheel-pointer {
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.theme-preview .admin-wheel-disc {
    overflow: visible;
    border-color: color-mix(in srgb, var(--preview-border) 60%, #111827);
    background:
        conic-gradient(
            color-mix(in srgb, var(--preview-primary) 78%, white) 0deg 60deg,
            var(--preview-secondary) 60deg 120deg,
            color-mix(in srgb, var(--preview-border) 78%, white) 120deg 180deg,
            var(--preview-primary) 180deg 240deg,
            color-mix(in srgb, var(--preview-secondary) 72%, white) 240deg 300deg,
            color-mix(in srgb, var(--preview-border) 88%, #111827) 300deg 360deg
        );
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--preview-border) 24%, transparent), inset 0 -16px 24px rgba(15, 23, 42, 0.18);
}

.theme-preview .admin-wheel-disc::before {
    background: repeating-conic-gradient(from -30deg, transparent 0deg 58deg, color-mix(in srgb, var(--preview-border) 58%, #111827) 58deg 60deg);
}

.theme-preview .admin-wheel-disc::after {
    background: radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.22), transparent 28%);
}

.theme-preview .admin-wheel-frame-image {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 5;
    width: var(--preview-frame-size, 106%);
    aspect-ratio: 1;
    object-fit: var(--preview-frame-fit, contain);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.theme-preview .admin-wheel-center {
    border-color: color-mix(in srgb, var(--preview-border) 58%, white);
    color: var(--preview-button-text);
    background: var(--preview-border);
    box-shadow: 0 0 14px color-mix(in srgb, var(--preview-border) 28%, transparent), inset 0 -8px 16px rgba(15, 23, 42, 0.18);
}

.theme-preview .admin-wheel-segment {
    color: var(--preview-button-text);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.36);
}

.theme-status-list {
    display: grid;
    gap: 10px;
}

.theme-status-list div {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--surface-blue);
}

.theme-status-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.theme-status-list strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-main-stats,
    .quick-action-grid,
    .quick-status-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .form-grid,
    .preview-button-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: min(86vw, 310px);
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .mobile-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(15, 23, 42, 0.42);
    }

    .main-panel {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .topbar {
        margin: 14px 16px 0;
        padding: 14px 16px;
    }

    .content-area {
        padding: 18px;
    }
}

.popup-settings-form {
    margin-top: 18px;
}

.popup-settings-form .color-control {
    grid-template-columns: 48px minmax(0, 1fr);
}

.popup-admin-preview {
    display: grid;
    min-height: 360px;
    place-items: center;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    padding: 20px;
    background: #eff6ff;
}

.popup-admin-preview-card {
    display: grid;
    width: min(420px, 100%);
    gap: 12px;
    border: var(--preview-border-width) solid var(--preview-border);
    border-radius: var(--preview-radius);
    padding: 26px;
    color: #0f172a;
    background: var(--preview-bg);
    text-align: center;
}

.popup-admin-preview-card.has-shadow {
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.popup-admin-preview-card h4,
.popup-admin-preview-card p {
    margin: 0;
}

.popup-admin-preview-card h4 {
    color: var(--preview-title);
    font-size: 32px;
}

.popup-admin-preview-card strong {
    color: var(--preview-prize);
    font-size: 26px;
}

.popup-admin-preview-card code {
    border: 1px solid var(--preview-border);
    border-radius: 999px;
    padding: 3px 9px;
}

.popup-admin-preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.popup-admin-preview-actions span {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--preview-border);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
}

.popup-preview-wa {
    border-color: var(--preview-wa-bg) !important;
    color: var(--preview-wa-text);
    background: var(--preview-wa-bg);
}

.popup-preview-close {
    color: var(--preview-close-text);
    background: var(--preview-close-bg);
}

@media (max-width: 600px) {
    .popup-admin-preview {
        min-height: 0;
        padding: 14px;
    }

    .popup-admin-preview-card {
        padding: 20px 14px;
    }

    .popup-admin-preview-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .axg-page-heading {
        width: 100%;
    }

    .axg-page-title {
        max-width: min(52vw, 320px);
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-user {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }

    .admin-meta {
        display: none;
    }

    .dashboard-panels,
    .dashboard-report-grid,
    .export-report-grid,
    .reset-data-grid,
    .role-access-layout,
    .admin-users-layout,
    .permission-category-grid,
    .permission-matrix,
    .stats-grid,
    .dashboard-main-stats,
    .form-grid,
    .prize-grid,
    .segment-layout,
    .segment-grid,
    .segment-filter,
    .ticket-grid,
    .ticket-list-filter,
    .ticket-detail-grid,
    .generated-summary,
    .import-ticket-layout,
    .import-result-grid,
    .button-link-layout,
    .button-link-grid,
    .theme-layout,
    .theme-grid,
    .settings-grid,
    .preview-button-grid,
    .site-picker,
    .prize-filter,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .export-form-grid {
        grid-template-columns: 1fr;
    }

    .role-form-grid,
    .admin-user-form {
        grid-template-columns: 1fr;
    }

    .quick-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-status-grid {
        grid-template-columns: 1fr;
    }

    .link-status-card {
        position: static;
    }

    .segment-preview-card {
        position: static;
    }

    .placeholder-card {
        flex-direction: column;
    }

    .info-box {
        grid-template-columns: 1fr;
    }

    .theme-debug-grid div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .reset-checklist {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .ticket-code-control {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-bar,
    .dashboard-filter-dates {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-filter-field,
    .dashboard-filter-brand,
    .dashboard-filter-select,
    .dashboard-filter-date,
    .dashboard-filter-apply {
        width: 100%;
        min-width: 0;
    }

    .dashboard-filter-brand {
        flex-basis: auto;
    }

    .settings-card {
        padding: 16px;
    }

    .settings-field-wide {
        grid-column: auto;
    }

    .settings-actions {
        justify-content: stretch;
    }

    .settings-actions .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .topbar h1 {
        font-size: 18px;
    }

    .topbar-kicker {
        font-size: 11px;
    }

    .dashboard-hero,
    .panel-card,
    .login-card {
        padding: 18px;
    }

    .dashboard-hero h2 {
        font-size: 24px;
    }

    .stat-card strong {
        font-size: 34px;
    }

    .logout-btn {
        min-height: 36px;
        padding: 8px 11px;
    }

    .quick-action-grid {
        grid-template-columns: 1fr;
    }

    .quick-status-card {
        padding: 13px;
    }

    .export-card-actions {
        justify-content: stretch;
    }

    .export-card-actions .btn {
        width: 100%;
    }

    .reset-warning-card {
        flex-direction: column;
    }

    .settings-page {
        gap: 18px;
    }

    .settings-card {
        padding: 14px;
    }

    .settings-actions {
        flex-direction: column-reverse;
    }
}

/* Shared admin form system */
.axg-form-stack {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 22px;
}

.axg-form-card {
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.axg-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e0ecff;
}

.axg-form-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 800;
}

.axg-form-header p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}

.axg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 32px;
}

.axg-form-grid.axg-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.axg-form-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.axg-form-field-full {
    grid-column: 1 / -1;
}

.axg-form-label {
    margin: 0;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}

.axg-form-control {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 9px 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea.axg-form-control {
    min-height: 88px;
    border-radius: 14px;
    resize: vertical;
    line-height: 1.45;
}

.axg-form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.axg-form-help {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.axg-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.axg-btn-primary,
.axg-btn-secondary,
.axg-btn-danger {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
}

.axg-btn-primary {
    color: #ffffff;
    background: #2563eb;
}

.axg-btn-primary:hover {
    background: #1d4ed8;
}

.axg-btn-secondary {
    border-color: #bfdbfe;
    color: #2563eb;
    background: #ffffff;
}

.axg-btn-danger {
    color: #ffffff;
    background: #dc2626;
}

.axg-btn-danger:hover {
    background: #b91c1c;
}

/* Compatibility layer for the existing admin forms and filters. */
.content-area .site-form-card,
.content-area .settings-card,
.content-area .gs-card,
.content-area .admin-form-card {
    border-color: #dbeafe;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.content-area .form-grid,
.content-area .settings-grid,
.content-area .gs-grid,
.content-area .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 32px;
}

.content-area .filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 20px 24px;
    border-color: #dbeafe;
    border-radius: 16px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.content-area .site-form label,
.content-area .filter-bar label,
.content-area .site-picker label,
.content-area .role-form-grid label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}

.content-area .site-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.content-area .site-form select,
.content-area .filter-bar input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.content-area .filter-bar select,
.content-area .site-picker select,
.content-area .role-form-grid input:not([type="hidden"]),
.content-area .role-form-grid select {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 9px 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    font-size: 14px;
}

.content-area .site-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 88px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 10px 14px;
    color: #0f172a;
    background: #ffffff;
    resize: vertical;
    line-height: 1.45;
}

.content-area .role-form-grid textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 88px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 10px 14px;
    color: #0f172a;
    background: #ffffff;
    resize: vertical;
    line-height: 1.45;
}

.content-area .site-form input:focus,
.content-area .site-form select:focus,
.content-area .site-form textarea:focus,
.content-area .filter-bar input:focus,
.content-area .filter-bar select:focus,
.content-area .site-picker select:focus,
.content-area .role-form-grid input:focus,
.content-area .role-form-grid select:focus,
.content-area .role-form-grid textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.content-area .form-help,
.content-area .form-help-inline,
.content-area .site-form small,
.content-area .filter-bar small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.content-area .form-actions,
.content-area .filter-actions,
.content-area .settings-actions,
.content-area .gs-actions,
.content-area .admin-form-actions {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.content-area .btn:not(.btn-small),
.content-area .admin-form-btn,
.content-area .gs-btn {
    min-height: 40px;
    border-radius: 999px;
    padding-right: 20px;
    padding-left: 20px;
}

.content-area .role-form-grid button[type="submit"] {
    border-color: #2563eb;
    color: #ffffff;
    background: #2563eb;
}

.content-area .role-form-grid button[type="submit"]:hover {
    background: #1d4ed8;
}

.content-area .reset-data-form input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 9px 14px;
    outline: none;
}

.content-area .reset-data-form input[type="text"]:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.wheel-theme-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 8px;
    background: #dfe7f3;
    overflow-x: auto;
    scrollbar-width: thin;
}

.wheel-theme-tab {
    display: inline-flex;
    flex: 1 0 180px;
    min-width: 180px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 18px;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

.wheel-theme-tab:hover {
    color: #123f73;
    background: rgba(255, 255, 255, 0.58);
}

.wheel-theme-tab.active {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.wheel-theme-tab-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.wheel-theme-tab-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wheel-theme-tab-intro {
    margin: 0 0 18px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px 18px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.wheel-theme-tab-intro h3 {
    margin: 0 0 5px;
    color: #172554;
    font-size: 18px;
    font-weight: 700;
}

.wheel-theme-tab-intro p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.wheel-theme-tabs ~ .site-form-card .axg-section-title-wrap small,
.wheel-theme-tabs ~ .site-form-card .form-actions.wheel-theme-actions,
.wheel-theme-tabs ~ .site-form-card .axg-asset-actions,
.wheel-theme-tabs ~ .site-form-card .axg-asset-remove {
    display: none !important;
}

.theme-remove-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.theme-remove-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #dc2626;
    flex: 0 0 auto;
}

.theme-tab-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.theme-btn-update,
.theme-btn-cancel {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 10px 18px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.theme-btn-update {
    border: 0;
    color: #ffffff;
    background: #16a34a;
}

.theme-btn-update:hover {
    background: #15803d;
}

.theme-btn-cancel {
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #ffffff;
}

.theme-btn-cancel:hover {
    color: #0f172a;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .axg-form-grid,
    .axg-form-grid.axg-form-grid-3,
    .content-area .form-grid,
    .content-area .settings-grid,
    .content-area .gs-grid,
    .content-area .admin-form-grid,
    .content-area .filter-bar {
        grid-template-columns: 1fr;
    }

    .axg-form-card {
        padding: 16px;
    }

    .axg-form-header {
        flex-direction: column;
    }

    .axg-form-actions,
    .content-area .form-actions,
    .content-area .filter-actions,
    .content-area .settings-actions,
    .content-area .gs-actions,
    .content-area .admin-form-actions {
        justify-content: stretch;
    }

    .axg-btn-primary,
    .axg-btn-secondary,
    .axg-btn-danger,
    .content-area .form-actions .btn,
    .content-area .filter-actions .btn,
    .content-area .filter-actions a,
    .content-area .settings-actions .btn,
    .content-area .gs-actions .gs-btn,
    .content-area .admin-form-actions .admin-form-btn {
        width: 100%;
    }

    .wheel-theme-tabs {
        border-radius: 22px;
        padding: 7px;
    }

    .wheel-theme-tab {
        flex-basis: 160px;
        min-width: 160px;
        padding: 11px 14px;
    }

    .theme-tab-actions {
        flex-direction: column;
    }

    .theme-btn-update,
    .theme-btn-cancel {
        width: 100%;
    }
}

/* Popup Setting final scoped overrides */
.popup-setting-page .popup-setting-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
    overflow-x: auto;
}

.popup-setting-page .popup-setting-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.popup-setting-page .popup-setting-tab.is-active {
    color: #ffffff;
    background: #123f73;
    box-shadow: 0 10px 22px rgba(18, 63, 115, .22);
}

.popup-setting-page .popup-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.popup-setting-page .popup-section-card,
.popup-setting-page .popup-preview-card {
    padding: 18px;
}

.popup-setting-page .popup-setting-actions {
    position: sticky;
    bottom: 12px;
    z-index: 8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: rgba(248, 251, 255, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}

@media (max-width: 780px) {
    .popup-setting-page .popup-preview-grid {
        grid-template-columns: 1fr;
    }

    .popup-setting-page .popup-setting-actions {
        position: static;
        flex-direction: column;
    }
}

/* Simple Popup Settings */
.simple-popup-settings {
    gap: 16px;
}

.simple-popup-hero {
    padding: 18px 20px;
}

.simple-popup-tabs {
    max-width: 520px;
}

.simple-popup-tabs .popup-setting-tab {
    flex: 1;
    justify-content: center;
}

.simple-section-card {
    border-radius: 16px;
}

.simple-popup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.simple-image-preview {
    min-height: 118px;
    border: 1px dashed #c7dcf7;
    border-radius: 14px;
    padding: 12px;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f8fbff;
}

.simple-image-preview img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 10px;
}

.simple-color-fields[hidden] {
    display: none !important;
}

.simple-claim-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.simple-claim-card {
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 14px;
    background: #f8fbff;
}

.simple-claim-card h4 {
    margin: 0 0 10px;
    color: #172554;
    font-size: 14px;
    font-weight: 700;
}

.simple-claim-card label {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.simple-claim-card label span {
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

.simple-popup-preview {
    margin-top: 16px;
}

.simple-popup-preview summary {
    width: fit-content;
    cursor: pointer;
    list-style: none;
}

.simple-popup-preview summary::-webkit-details-marker {
    display: none;
}

.simple-preview-dialog {
    margin: 14px 0 0;
}

.simple-preview-dialog[data-preview-type="welcome"] {
    border-width: var(--welcome-popup-stroke-width, 0);
    border-style: var(--welcome-popup-stroke-style, solid);
    border-color: var(--welcome-popup-stroke-color, transparent);
}

.simple-preview-dialog[data-preview-type="prize"] {
    border-width: var(--winner-popup-stroke-width, 0);
    border-style: var(--winner-popup-stroke-style, solid);
    border-color: var(--winner-popup-stroke-color, transparent);
}

.popup-stroke-card {
    grid-column: 1 / -1;
    margin-top: 16px;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    padding: 14px;
    background: #f8fbff;
}

.popup-stroke-card h4 {
    margin: 0 0 12px;
    color: #172554;
    font-size: 14px;
    font-weight: 700;
}

.axg-member-card-stroke-field {
    grid-column: 1 / -1;
}

.member-card-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 12px 14px;
    background: #f8fbff;
}

.member-card-setting-title {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.3;
}

.member-card-toggle-row small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.member-card-stroke-controls {
    min-width: 0;
}

.member-card-stroke-controls.is-disabled {
    opacity: 0.58;
}

.member-card-stroke-grid {
    grid-template-columns:
        minmax(180px, 220px)
        minmax(130px, 160px)
        minmax(150px, 180px)
        minmax(150px, 180px);
    align-items: end;
    justify-content: start;
    gap: 12px;
}

.member-card-stroke-grid label,
.member-card-stroke-grid .color-field {
    min-width: 0;
}

.member-card-stroke-grid label > span {
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.member-card-stroke-grid input[type="number"],
.member-card-stroke-grid input[type="text"],
.member-card-stroke-grid select {
    min-height: 44px;
    font-size: 13px;
    font-weight: 500;
}

.member-card-stroke-grid input[type="number"],
.member-card-stroke-grid select {
    width: 100%;
}

.member-card-stroke-grid .color-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-card-stroke-grid .color-control input[type="color"] {
    width: 46px;
    min-width: 46px;
    height: 44px;
}

.member-card-stroke-grid .color-control input[type="text"] {
    width: 112px;
    min-width: 0;
}

.theme-range-field {
    display: grid;
    grid-template-columns: minmax(84px, 1fr) 38px;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 0 10px;
    background: #ffffff;
}

.theme-range-field input[type="range"] {
    width: 100%;
}

.theme-range-field em {
    color: #475569;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    text-align: right;
}

.member-wheel-card-stroke-preview {
    display: grid;
    min-height: 92px;
    margin-top: 14px;
    place-items: center;
    border-width: var(--member-wheel-card-stroke-width, 0px);
    border-style: var(--member-wheel-card-stroke-style, solid);
    border-color: var(--member-wheel-card-stroke-color, transparent);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 226, 135, 0.14), transparent 34%),
        rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    box-sizing: border-box;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.member-wheel-card-stroke-preview.is-card-disabled {
    border-width: 0 !important;
    background: transparent;
    color: #475569;
    box-shadow: none;
}

@media (max-width: 960px) {
    .member-card-stroke-grid {
        grid-template-columns: repeat(2, minmax(150px, 220px));
    }
}

@media (max-width: 640px) {
    .member-card-toggle-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-card-stroke-grid {
        grid-template-columns: 1fr;
    }

    .member-card-stroke-grid .color-control input[type="text"] {
        width: 100%;
    }
}

.simple-preview-dialog h4 {
    color: var(--popup-title-color, #fff4c2);
}

.simple-preview-dialog p {
    color: var(--popup-subtitle-color, rgba(255, 255, 255, .82));
}

.simple-preview-dialog strong {
    color: var(--popup-prize-text-color, #ffd76a);
}

.simple-preview-dialog .popup-preview-button {
    color: var(--popup-whatsapp-text, #111827);
    background: var(--popup-whatsapp-bg, #f4c542);
}

.simple-popup-actions {
    align-items: center;
}

@media (max-width: 780px) {
    .simple-popup-grid,
    .simple-claim-grid {
        grid-template-columns: 1fr;
    }

    .simple-popup-tabs {
        max-width: none;
    }
}

.admin-wlb-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 140px;
}

.admin-wlb-all-badge {
    background: #eff6ff;
    color: #123f73;
    border-color: #bfdbfe;
}

.admin-wlb-more-badge {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.admin-wlb-access-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5edf8;
}

.admin-wlb-super-note {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #123f73;
    font-size: 13px;
    font-weight: 600;
}

.admin-wlb-checkbox-panel {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
}

.admin-wlb-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    max-height: 220px;
    overflow: auto;
    padding-top: 10px;
}

.admin-wlb-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
}

.admin-wlb-checkbox input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.admin-wlb-checkbox span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-wlb-check-all {
    background: #edf6ff;
    border-color: #bfdbfe;
    color: #123f73;
    font-weight: 700;
}

.admin-wlb-checkbox-panel.is-disabled {
    opacity: .56;
    pointer-events: none;
}

.center-cap-size-panel {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
}

.center-cap-size-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.center-cap-size-field {
    display: grid;
    gap: 6px;
    margin: 0;
}

.center-cap-size-field > span,
.center-cap-ratio-toggle span {
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.center-cap-number-wrap {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
}

.center-cap-number-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 9px 10px;
    color: #0f172a;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.center-cap-number-wrap em {
    padding: 0 10px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.center-cap-ratio-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #ffffff;
}

.center-cap-ratio-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #123f73;
}

.center-cap-size-help {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.center-cap-preview-shell {
    display: grid;
    place-items: center;
    width: 140px;
    height: 140px;
    border: 1px dashed #93c5fd;
    border-radius: 18px;
    background: #ffffff;
}

.center-cap-preview-limit {
    display: grid;
    width: 120px;
    height: 120px;
    place-items: center;
    border: 1px solid rgba(18, 63, 115, 0.22);
    border-radius: 50%;
    background: rgba(239, 246, 255, 0.76);
}

.center-cap-preview-limit img,
.center-cap-preview-limit span {
    display: block;
    width: var(--center-cap-preview-width, 120px);
    height: var(--center-cap-preview-height, auto);
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    color: #123f73;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.center-cap-preview-limit span {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dbeafe;
}

.center-cap-size-panel:not(.keep-ratio-off) .center-cap-preview-limit img,
.center-cap-size-panel:not(.keep-ratio-off) .center-cap-preview-limit span {
    height: auto;
}

.center-cap-size-panel.keep-ratio-off .center-cap-preview-limit img,
.center-cap-size-panel.keep-ratio-off .center-cap-preview-limit span {
    height: var(--center-cap-preview-height, 120px);
}

@media (max-width: 760px) {
    .center-cap-size-grid {
        grid-template-columns: 1fr;
    }

    .center-cap-preview-shell {
        width: 100%;
        max-width: 140px;
    }
}

.spin-report-action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.spin-report-delete-form {
    display: inline-flex;
    width: auto;
    margin: 0;
}

.spin-report-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0;
    color: #123f73;
    background: #eff6ff;
    text-decoration: none;
    cursor: pointer;
}

.spin-report-action-btn:hover {
    color: #ffffff;
    border-color: #123f73;
    background: #123f73;
}

.spin-report-action-delete {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

.spin-report-action-delete:hover {
    color: #ffffff;
    border-color: #dc2626;
    background: #dc2626;
}
