/* Global Scarlet presentation. No behavior or financial rules. */
body.afxc-modern.afxc-modern .afxc-operations-list-button,body.afxc-modern.afxc-modern .afxc-deposit-page-button,body.afxc-modern.afxc-modern .afxc-connect-button,body.afxc-modern.afxc-modern .afxc-account-danger-button,body.afxc-modern.afxc-modern .afxc-withdrawal-button,body.afxc-modern.afxc-modern .afxc-account-passkey-button,body.afxc-modern.afxc-modern .afxc-connect-back-button,body.afxc-modern.afxc-modern .afxc-history-button,body.afxc-modern.afxc-modern .afxc-page-button,body.afxc-modern.afxc-modern .afxc-core-button,body.afxc-modern.afxc-modern .afxc-account-button,body.afxc-modern.afxc-modern .afxc-bonus-button,body.afxc-modern.afxc-modern .afxc-account-primary-button,body.afxc-modern.afxc-modern .afxc-devices-button,body.afxc-modern.afxc-modern .afxc-plan-button,body.afxc-modern.afxc-modern .afxc-operations-button,body.afxc-modern.afxc-modern .afxc-ref-button,body.afxc-modern.afxc-modern .afxc-account-security-button{border-radius:999px!important;min-height:42px;font-size:13px!important;font-weight:500!important;letter-spacing:0!important;box-shadow:none!important;}
body.afxc-modern.afxc-modern .afxc-operations-list-button.is-primary,body.afxc-modern.afxc-modern .afxc-deposit-page-button.is-primary,body.afxc-modern.afxc-modern .afxc-connect-button.is-primary,body.afxc-modern.afxc-modern .afxc-account-danger-button.is-primary,body.afxc-modern.afxc-modern .afxc-withdrawal-button.is-primary,body.afxc-modern.afxc-modern .afxc-account-passkey-button.is-primary,body.afxc-modern.afxc-modern .afxc-connect-back-button.is-primary,body.afxc-modern.afxc-modern .afxc-history-button.is-primary,body.afxc-modern.afxc-modern .afxc-page-button.is-primary,body.afxc-modern.afxc-modern .afxc-core-button.is-primary,body.afxc-modern.afxc-modern .afxc-account-button.is-primary,body.afxc-modern.afxc-modern .afxc-bonus-button.is-primary,body.afxc-modern.afxc-modern .afxc-account-primary-button.is-primary,body.afxc-modern.afxc-modern .afxc-devices-button.is-primary,body.afxc-modern.afxc-modern .afxc-plan-button.is-primary,body.afxc-modern.afxc-modern .afxc-operations-button.is-primary,body.afxc-modern.afxc-modern .afxc-ref-button.is-primary,body.afxc-modern.afxc-modern .afxc-account-security-button.is-primary,body.afxc-modern.afxc-modern .afxc-account-primary-button{background:#191b20!important;color:#fff!important;border-color:#191b20!important;}
body.afxc-modern.afxc-modern .afxc-card,body.afxc-modern.afxc-modern .afxc-account-wallet-card,body.afxc-modern.afxc-modern .afxc-referral-program-card,body.afxc-modern.afxc-modern .afxc-funding-card,body.afxc-modern.afxc-modern .afxc-calculator-card,body.afxc-modern.afxc-modern .afxc-bonus-overview-card,body.afxc-modern.afxc-modern .afxc-account-support-card,body.afxc-modern.afxc-modern .afxc-account-session-card,body.afxc-modern.afxc-modern .afxc-account-card,body.afxc-modern.afxc-modern .afxc-devices-table-card,body.afxc-modern.afxc-modern .afxc-risk-impact-card,body.afxc-modern.afxc-modern .afxc-chart-card,body.afxc-modern.afxc-modern .afxc-devices-security-card,body.afxc-modern.afxc-modern .afxc-devices-count-card,body.afxc-modern.afxc-modern .afxc-referral-stat-card,body.afxc-modern.afxc-modern .afxc-deposit-request-card,body.afxc-modern.afxc-modern .afxc-referral-table-card,body.afxc-modern.afxc-modern .afxc-account-identity-card,body.afxc-modern.afxc-modern .afxc-referral-tree-card,body.afxc-modern.afxc-modern .afxc-mobile-review-card,body.afxc-modern.afxc-modern .afxc-bonus-table-card,body.afxc-modern.afxc-modern .afxc-account-status-card,body.afxc-modern.afxc-modern .afxc-referral-link-card,body.afxc-modern.afxc-modern .afxc-mobile-history-card,body.afxc-modern.afxc-modern .afxc-kpi-card,body.afxc-modern.afxc-modern .afxc-referral-card,body.afxc-modern.afxc-modern .afxc-renewal-card,body.afxc-modern.afxc-modern .afxc-table-card,body.afxc-modern.afxc-modern .afxc-bonus-level-card,body.afxc-modern.afxc-modern .afxc-risk-framework-card,body.afxc-modern.afxc-modern .afxc-history-card,body.afxc-modern.afxc-modern .afxc-operations-list-overview-card,body.afxc-modern.afxc-modern .afxc-details-card,body.afxc-modern.afxc-modern .afxc-withdrawal-wallet-card,body.afxc-modern.afxc-modern .afxc-plans-card,body.afxc-modern.afxc-modern .afxc-risk-metrics-card,body.afxc-modern.afxc-modern .afxc-operations-list-card,body.afxc-modern.afxc-modern .afxc-history-overview-card,body.afxc-modern.afxc-modern .afxc-withdrawal-form-card,body.afxc-modern.afxc-modern .afxc-flow-card,body.afxc-modern.afxc-modern .afxc-tracker-card,body.afxc-modern.afxc-modern .afxc-total-card,body.afxc-modern.afxc-modern .afxc-plan-card,body.afxc-modern.afxc-modern .afxc-withdrawal-balance-card,body.afxc-modern.afxc-modern .afxc-risk-main-card,body.afxc-modern.afxc-modern .afxc-connect-device-card,body.afxc-modern.afxc-modern .afxc-operations-rule-card,body.afxc-modern.afxc-modern .afxc-core-card,body.afxc-modern.afxc-modern .afxc-core-link-card,body.afxc-modern.afxc-modern .afxc-ann-admin-card,body.afxc-modern.afxc-modern .afxc-connect-footer-card{border-radius:24px!important;box-shadow:0 6px 26px rgba(27,60,112,.045)!important;}
body.afxc-modern.afxc-modern h1,body.afxc-modern.afxc-modern .page-title-box .page-title{font-size:clamp(28px,3vw,40px)!important;font-weight:400!important;letter-spacing:-.045em!important;line-height:1.18!important;}
body.afxc-modern.afxc-modern .afxc-operations-list-subtitle,body.afxc-modern.afxc-modern .afxc-account-subtitle,body.afxc-modern.afxc-modern .afxc-risk-subtitle,body.afxc-modern.afxc-modern .afxc-devices-subtitle,body.afxc-modern.afxc-modern .afxc-panel-subtitle,body.afxc-modern.afxc-modern .afxc-history-subtitle,body.afxc-modern.afxc-modern .afxc-planes-subtitle,body.afxc-modern.afxc-modern .afxc-core-subtitle,body.afxc-modern.afxc-modern .afxc-workspace-subtitle,body.afxc-modern.afxc-modern .afxc-referrals-subtitle,body.afxc-modern.afxc-modern .afxc-bonus-subtitle{font-size:14px!important;line-height:1.65!important;font-weight:400!important;}
body.afxc-modern.afxc-modern .card-title,body.afxc-modern.afxc-modern .header-title{font-weight:500!important;letter-spacing:-.025em!important;text-transform:none!important;}
body.afxc-modern.afxc-modern .nav-pills .nav-link,body.afxc-modern.afxc-modern .nav-tabs .nav-link{border-radius:999px!important;font-weight:500!important;font-size:13px!important;}
body.afxc-modern.afxc-modern .nav-pills .nav-link.active{background:#191b20!important;color:#fff!important;}
body.afxc-modern.afxc-modern .dataTables_wrapper .dt-buttons{display:flex!important;flex-wrap:wrap;gap:8px;margin-bottom:12px;}
body.afxc-modern.afxc-modern .dataTables_wrapper .dt-buttons .dt-button,body.afxc-modern.afxc-modern .dataTables_wrapper .dt-buttons .btn{flex:0 0 auto!important;width:auto!important;min-height:36px!important;padding:8px 14px!important;border-radius:999px!important;font-size:12px!important;}
body.afxc-modern.afxc-modern .dataTables_wrapper .dataTables_filter input,body.afxc-modern.afxc-modern .dataTables_wrapper .dataTables_length select{border-radius:14px!important;border:1px solid var(--afxc-border)!important;background:var(--afxc-surface)!important;color:var(--afxc-text)!important;min-height:38px;}
body.afxc-modern.afxc-modern .dataTables_wrapper,body.afxc-modern.afxc-modern .table{font-size:13px;}
body.afxc-modern.afxc-modern .progress{border-radius:999px!important;box-shadow:none!important;}
body.afxc-modern.afxc-modern .progress-bar{border-radius:inherit;}
body.afxc-modern.afxc-modern .modal-content,body.afxc-modern.afxc-modern .swal2-popup{border-radius:24px!important;}
body.afxc-modern.afxc-modern .form-control,body.afxc-modern.afxc-modern .form-select{box-shadow:none;}
body.afxc-modern.afxc-modern .btn:focus-visible,body.afxc-modern.afxc-modern a:focus-visible,body.afxc-modern.afxc-modern button:focus-visible{outline:2px solid #0866ff!important;outline-offset:3px;}
@media(max-width:767.98px){body.afxc-modern.afxc-modern .content-page .container-fluid{padding-left:16px;padding-right:16px}body.afxc-modern.afxc-modern .dataTables_wrapper .dataTables_filter input{max-width:100%;font-size:16px!important}body.afxc-modern.afxc-modern .modal-dialog{margin:12px}body.afxc-modern.afxc-modern .table-responsive{-webkit-overflow-scrolling:touch}body.afxc-modern.afxc-modern .content-page h1{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){body.afxc-modern.afxc-modern .btn,body.afxc-modern.afxc-modern .nav-link{transition:none!important}}
body[data-afxc-scarlet="standalone"]{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;background:radial-gradient(ellipse at 80% 5%,#dcecff 0,transparent 55%),#f3f5fa!important;color:#191d27;}
body[data-afxc-scarlet="standalone"] h1{font-weight:400!important;letter-spacing:-.045em;font-size:clamp(28px,4vw,40px);}
body[data-afxc-scarlet="standalone"] .security-card,body[data-afxc-scarlet="standalone"] .auth-card,body[data-afxc-scarlet="standalone"] .card{border-radius:24px!important;box-shadow:0 8px 32px rgba(31,65,115,.06)!important;}
body[data-afxc-scarlet="standalone"] .primary-btn,body[data-afxc-scarlet="standalone"] .primary-action{border-radius:999px!important;background:#191b20!important;color:#fff!important;border-color:#191b20!important;}
body[data-afxc-scarlet="standalone"] .form-control{border-radius:14px!important;min-height:44px;}
body[data-afxc-scarlet="standalone"] .passkey-item{border-radius:16px!important;}
body[data-afxc-scarlet="standalone"] a:focus-visible,body[data-afxc-scarlet="standalone"] button:focus-visible{outline:2px solid #0866ff;outline-offset:3px;}
@media(max-width:767px){body[data-afxc-scarlet="standalone"] .form-control{font-size:16px!important;}body[data-afxc-scarlet="standalone"] .security-shell{padding:16px!important;}}
@media screen{body[data-afxc-scarlet="legal"]{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;line-height:1.7!important;margin:0!important;padding:clamp(20px,5vw,64px)!important;background:#f3f5fa!important;color:#191d27!important;}body[data-afxc-scarlet="legal"] h1{font-weight:400!important;letter-spacing:-.04em;}body[data-afxc-scarlet="legal"] table{background:#fff;border-radius:16px;}body[data-afxc-scarlet="legal"] .content-page{margin-left:0!important;}}

body.afxc-modern.afxc-modern h1.afxc-planes-title,body.afxc-modern.afxc-modern h1.afxc-connect-device-title,body.afxc-modern.afxc-modern h1.afxc-devices-title,body.afxc-modern.afxc-modern h1.afxc-core-title,body.afxc-modern.afxc-modern h1.afxc-withdrawal-title,body.afxc-modern.afxc-modern h1.afxc-referrals-title,body.afxc-modern.afxc-modern h1.afxc-account-title,body.afxc-modern.afxc-modern h1.afxc-panel-title,body.afxc-modern.afxc-modern h1.afxc-history-title,body.afxc-modern.afxc-modern h1.afxc-bonus-title,body.afxc-modern.afxc-modern h1.afxc-operations-list-title,body.afxc-modern.afxc-modern h1.afxc-workspace-title,body.afxc-modern.afxc-modern h1.afxc-risk-title{font-size:clamp(28px,3vw,40px)!important;font-weight:400!important;letter-spacing:-.045em!important;}
body[data-afxc-scarlet="standalone"] .security-hero{background:linear-gradient(115deg,#0757ed,#278bff)!important;}
body[data-afxc-scarlet="standalone"] .security-hero h1,body[data-afxc-scarlet="standalone"] .security-hero .hero-icon{color:#fff!important;}
body[data-afxc-scarlet="standalone"] .security-hero p{color:rgba(255,255,255,.88)!important;}
body.afxc-modern.afxc-modern[data-layout-color="dark"] .nav-pills .nav-link.active{background:#f0f3fa!important;color:#191d27!important;}

body.afxc-modern.afxc-modern .content-page .acx-btn-primary,body.afxc-modern.afxc-modern .content-page .afxc-ann-btn-primary,body.afxc-modern.afxc-modern .content-page .afxc-btn-primary,body.afxc-modern.afxc-modern .content-page .av-btn-primary,body.afxc-modern.afxc-modern .content-page .ava-btn-primary,body.afxc-modern.afxc-modern .content-page .btn-afxc-primary,body.afxc-modern.afxc-modern .content-page .btn-outline-primary,body.afxc-modern.afxc-modern .content-page .btn-primary,body.afxc-modern.afxc-modern .content-page .btn-tech-primary,body.afxc-modern.afxc-modern .content-page .payments-btn-primary,body.afxc-modern.afxc-modern .content-page .users-btn-primary,body.afxc-modern.afxc-modern .content-page .withdraw-btn--primary{background:#191b20!important;border-color:#191b20!important;color:#fff!important;border-radius:999px!important;font-weight:500!important;}
body.afxc-modern.afxc-modern .content-page h1[class]{font-weight:400!important;font-size:clamp(28px,3vw,40px)!important;letter-spacing:-.045em!important;}
body.afxc-modern.afxc-modern .content-page .users-metric__value{font-weight:300!important;}
body.afxc-modern.afxc-modern .content-page .users-toolbar__title{font-weight:500!important;}
body.afxc-modern.afxc-modern .content-page .users-btn{border-radius:999px!important;font-size:13px!important;font-weight:500!important;}

/* Popups plugins append directly to the document body. */
body.afxc-modern[data-layout-color=dark] .swal2-popup {
    color: #edf3ff;
    background: #1b2230;
    border: 1px solid #3c4960;
}
body.afxc-modern[data-layout-color=dark] .swal2-popup :is(.swal2-title, .swal2-html-container, .swal2-content, .swal2-close) {
    color: inherit;
}
body.afxc-modern[data-layout-color=dark] .swal2-popup :is(.swal2-input, .swal2-textarea, .swal2-select) {
    color: #edf3ff;
    background-color: #222b3b;
    border-color: #65758e;
}
body.afxc-modern[data-layout-color=dark] .swal2-popup .swal2-validation-message {
    color: #ffbac1;
    background: #392533;
}
body.afxc-modern[data-layout-color=dark] .swal2-popup .swal2-footer {
    border-color: #3c4960;
    color: #b9c6dc;
}

@media (prefers-color-scheme: dark) {
    body[data-afxc-scarlet="standalone"] {
        color-scheme: dark;
        --text: #edf3ff;
        --muted: #b5c2d6;
        --line: #3c4960;
        --surface: #1b2230;
        --bg: #111620;
        color: var(--text);
    }
    body[data-afxc-scarlet="standalone"] :is(.security-card, .passkey-item, .auth-box) {
        background: var(--surface) !important;
        border-color: var(--line) !important;
    }
    body[data-afxc-scarlet="standalone"] :is(.auth-shell, .auth-form-wrapper) {
        background: var(--bg);
    }
    body[data-afxc-scarlet="standalone"] :is(.auth-title, .form-label, .auth-control, .security-body label, .back-link) {
        color: var(--text);
    }
    body[data-afxc-scarlet="standalone"] :is(.auth-subtitle, .auth-legal, .passkey-divider, .empty) {
        color: var(--muted);
    }
    body[data-afxc-scarlet="standalone"] :is(.auth-kicker, .auth-legal a, .back-link) {
        color: #a1c1ff;
    }
    body[data-afxc-scarlet="standalone"] :is(.notice, .passkey-item__icon, .btn-passkey) {
        color: #c7ddff;
        background: #263756;
        border-color: #52698d;
    }
    body[data-afxc-scarlet="standalone"] :is(.auth-control, .security-body input) {
        background: #222b3b;
        border-color: #65758e;
    }
    body[data-afxc-scarlet="standalone"] input::placeholder {
        color: var(--muted);
        opacity: 1;
    }
    body[data-afxc-scarlet="standalone"] .revoke-btn {
        color: #ffbac1;
        background: #392533;
        border-color: #87505c;
    }
    body[data-afxc-scarlet="standalone"] :is(.primary-btn, .btn-auth) {
        background: #2453b2 !important;
        border: 1px solid #658cea !important;
    }
}

/* Conciliation and account contrast in the system dark appearance. */
body.afxc-modern[data-layout-color=dark] .conc .conc-stat {
    border-color: #43536b;
}
body.afxc-modern[data-layout-color=dark] .conc .conc-controls .btn-outline-secondary {
    color: #ced9ec;
    border-color: #65758e;
}
body.afxc-modern[data-layout-color=dark] .conc .conc-controls .btn-outline-secondary:hover {
    color: #edf3ff;
    background: #27364d;
}
body.afxc-modern[data-layout-color=dark] .conc table tbody th[scope="row"] {
    color: #edf3ff;
    background: #202a3a;
    border-color: #384457;
}
body.afxc-modern[data-layout-color=dark] :is(.afxc-account-kicker, .afxc-account-card-badge, .afxc-account-card-icon, .afxc-account-status-icon) {
    color: #a1c1ff;
}
body.afxc-modern[data-layout-color=dark] .afxc-account-status-card.is-success .afxc-account-status-icon {
    color: #86e4b9;
}
body.sc-admin[data-layout-color=dark] .afxc-workspace .afxc-tab.active,
body.sc-admin[data-layout-color=dark] .afxc-workspace .afxc-tab-count,
body.sc-admin[data-layout-color=dark] .afxc-hero .afxc-eyebrow {
    color: #a1c1ff !important;
}

/* Dark passkey page contrast. */
@media (prefers-color-scheme: dark) {
    body[data-afxc-scarlet="standalone"]:has(.security-shell) {
        background: radial-gradient(ellipse at 90% 0%, #1c2e4a, transparent 44%), #111620 !important;
    }
    body[data-afxc-scarlet="standalone"] .security-body .section-title {
        color: var(--text);
    }
    body[data-afxc-scarlet="standalone"] .security-hero {
        background: linear-gradient(115deg, #172e60, #234b92) !important;
    }
    body[data-afxc-scarlet="standalone"] .security-hero .eyebrow {
        color: #c7ddff;
    }
}

/* Warning badges in the dark theme. */
body.afxc-modern[data-layout-color=dark] .badge.bg-warning {
    color: #ffdb9a !important;
    background-color: #44351f !important;
}
