/* OccultPay Design System - Theme CSS */
:root {
    font-size: 95%;
    --ap-ink: #08060C;
    --ap-paper: #F5F3FF;
    --ap-button-light: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%);
    --ap-button-dark: linear-gradient(135deg, #1C1526 0%, #14101C 100%);
    --brand-primary: #A855F7;
    --brand-secondary: #7C3AED;
    --brand-neon: #C084FC;
    --brand-hover: #9333EA;
    --brand-highlight: #C084FC;
    --bg-main: #08060C;
    --bg-secondary: #0F0B15;
    --card-bg: #14101C;
    --card-raised: #1C1526;
    --border-color: #2D203D;
    --text-primary: #F5F3FF;
    --text-secondary: #A49BB3;
    --status-success: #22C55E;
    --status-warning: #F59E0B;
    --status-error: #EF4444;
}

:is(a, button, [role="button"], input, select, textarea):focus-visible {
    outline: 2px solid #A855F7;
    outline-offset: 2px;
}

/* Botões primários OccultPay */
:is(a, button, [role="button"]).bg-neon,
.editorial-home a.violet-button,
.editorial-home a.white-pulse-btn,
.brand-action-button,
button[style*="background: var(--brand-primary)"],
button[style*="background-color: var(--brand-primary)"],
a[style*="background: var(--brand-primary)"],
a[style*="background-color: var(--brand-primary)"] {
    background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%) !important;
    border: 1px solid rgba(192, 132, 252, 0.35) !important;
    color: #F5F3FF !important;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, border-color .18s ease;
}

:is(a, button, [role="button"]).bg-neon:hover,
.editorial-home a.violet-button:hover,
.editorial-home a.white-pulse-btn:hover,
.brand-action-button:hover,
button[style*="background: var(--brand-primary)"]:hover,
button[style*="background-color: var(--brand-primary)"]:hover,
a[style*="background: var(--brand-primary)"]:hover,
a[style*="background-color: var(--brand-primary)"]:hover {
    background: linear-gradient(135deg, #9333EA 0%, #6D28D9 100%) !important;
    border-color: rgba(192, 132, 252, 0.6) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
    transform: translateY(-1px);
}

.editorial-home a.quiet-button {
    background: #14101C;
    border: 1px solid #2D203D;
    color: #F5F3FF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all .2s ease;
}

.editorial-home a.quiet-button:hover {
    background: #1C1526;
    border-color: #7C3AED;
    color: #FFFFFF;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.25);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {

    :is(a, button, [role="button"]).bg-neon,
    html:not([data-landing-motion="on"]) .editorial-home :is(a.violet-button, a.white-pulse-btn, a.quiet-button) {
        animation: none !important;
        transition: none;
        transform: none;
    }
}

.ap-panel-banner,
.ap-rewards-banner {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #2D203D;
    border-radius: 1rem;
    background: #14101C;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 28px rgba(0, 0, 0, 0.45);
}

.ap-panel-banner-media {
    display: flex;
    align-items: center;
    min-height: clamp(142px, 14vw, 186px);
    position: relative;
}

.ap-panel-banner picture,
.ap-rewards-banner>img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.ap-panel-banner picture img,
.ap-rewards-banner>img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ap-panel-banner::after,
.ap-rewards-banner::after {
    position: absolute;
    content: "";
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, #08060Cf5 0%, #08060Cdc 28%, #08060C60 53%, transparent 74%);
}

.ap-panel-banner-copy,
.ap-rewards-banner-copy {
    color: #F5F3FF;
    padding: 1.4rem clamp(1rem, 4vw, 4rem);
}

.ap-panel-banner-copy h2 {
    font-size: clamp(1.25rem, 2.55vw, 2.5rem);
    line-height: 1.12;
    letter-spacing: -.04em;
    font-weight: 800;
    color: #F5F3FF;
}

.ap-panel-banner-copy p {
    margin-top: .45rem;
    color: #A49BB3;
    font-size: clamp(.8rem, 1.3vw, 1rem);
}

.ap-rewards-banner-copy {
    position: relative;
    padding-block: 1.75rem;
}

.ap-rewards-banner-copy :is(h1, h1 span) {
    color: #F5F3FF !important;
}

.ap-rewards-banner-copy p {
    color: #A49BB3 !important;
}

html[data-theme="black"] .dashboard-shell {
    color-scheme: dark;
}

html[data-theme="black"] .dashboard-shell :is(.dash-card, .dashboard-card, .ap-panel-banner) {
    border-color: #2D203D !important;
    background-color: #14101C !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.45) !important;
}

/* Inputs, tabelas, dropdowns e modais no tema obsidian OccultPay */
html[data-theme="black"] :is(.user-content, .ap-admin-shell, .ap-access) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not(.ap-raw-input),
    select:not(.ap-raw-select),
    textarea) {
    background-color: #0F0B15;
    border-color: #2D203D;
    color: #F5F3FF;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

html[data-theme="black"] :is(.user-content, .ap-admin-shell, .ap-access) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not(.ap-raw-input),
    select:not(.ap-raw-select),
    textarea)::placeholder {
    color: #807491;
}

html[data-theme="black"] :is(.user-content, .ap-admin-shell, .ap-access) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea):focus {
    border-color: #A855F7 !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.16) !important;
    outline: none;
}

html[data-theme="black"] :is(.user-content, .ap-admin-shell) table thead th {
    background-color: #0F0B15;
    color: #A49BB3;
    border-bottom-color: #2D203D;
    font-weight: 600;
    letter-spacing: 0.02em;
}

html[data-theme="black"] :is(.user-content, .ap-admin-shell) table tbody tr {
    border-color: #2D203D;
    transition: background-color .14s ease;
}

html[data-theme="black"] :is(.user-content, .ap-admin-shell) table tbody tr:hover {
    background-color: rgba(28, 21, 38, 0.65);
}

/* Shimmer / loading states refinados */
@keyframes occult-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.occult-skeleton {
    background: linear-gradient(90deg, #14101C 25%, #1C1526 50%, #14101C 75%);
    background-size: 200% 100%;
    animation: occult-shimmer 1.6s infinite linear;
}

/* Scrollbar fintech minimalista */
html[data-theme="black"] ::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

html[data-theme="black"] ::-webkit-scrollbar-track {
    background: #08060C;
}

html[data-theme="black"] ::-webkit-scrollbar-thumb {
    background: #2D203D;
    border-radius: 999px;
}

html[data-theme="black"] ::-webkit-scrollbar-thumb:hover {
    background: #7C3AED;
}

.ap-chrome-card {
    isolation: isolate;
    border: 1px solid #2D203D !important;
    background:
        radial-gradient(ellipse at 0 0, rgba(168, 85, 247, 0.12), transparent 56%) padding-box,
        linear-gradient(145deg, #1C1526, #14101C 64%, #0F0B15) padding-box,
        linear-gradient(138deg, #A855F7 0%, #7C3AED 25%, #2D203D 65%, #14101C 100%) border-box !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.08) !important;
    color: #F5F3FF !important;
    font-variant-numeric: tabular-nums;
}

.ap-chrome-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: repeating-linear-gradient(115deg, #A855F7 0 1px, transparent 1px 6px);
    opacity: .018;
    pointer-events: none;
}

.ap-chrome-card :is(.text-gray-300, .text-gray-400) {
    color: #A49BB3 !important;
}

.ap-chrome-card .text-gray-100,
.ap-chrome-value {
    color: #F5F3FF !important;
}

.ap-chrome-badge {
    color: #C084FC !important;
    border: 1px solid #7C3AED !important;
    background: rgba(168, 85, 247, 0.15) !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.25) !important;
}

.ap-chrome-track {
    background: #08060C !important;
    border: 1px solid #2D203D !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.ap-chrome-fill {
    background: linear-gradient(90deg, #7C3AED 0%, #A855F7 50%, #C084FC 100%) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45) !important;
}

html[data-theme="black"] .dashboard-shell :is(.dashboard-panel, .dashboard-action, .dashboard-secondary-card) {
    background: #14101C !important;
    border-color: #2D203D !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 20px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="black"] .dashboard-shell .dashboard-action:hover {
    border-color: #7C3AED !important;
    background: #1C1526 !important;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15) !important;
}

html[data-theme="black"] .dashboard-shell .dashboard-icon {
    color: #C084FC !important;
    background: linear-gradient(148deg, #2D203D, #1C1526 50%, #14101C) !important;
    border: 1px solid rgba(124, 58, 237, 0.4) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Harmonização do Painel Administrativo no padrão OccultPay Dark Fintech */
html[data-theme="black"] .ap-admin-shell {
    background-color: #08060C !important;
    color: #F5F3FF !important;
}

html[data-theme="black"] .ap-admin-shell aside,
html[data-theme="black"] .ap-admin-shell header {
    background-color: #0F0B15 !important;
    border-color: #2D203D !important;
}

html[data-theme="black"] .ap-admin-shell main {
    background-color: transparent !important;
}

html[data-theme="black"] .ap-admin-shell .ap-panel-banner {
    border-color: #2D203D !important;
    background-color: #14101C !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.bg-white, .bg-slate-50, .bg-gray-50) {
    background-color: #14101C !important;
}

html[data-theme="black"] .ap-admin-shell :is(.bg-slate-100, .bg-gray-100, .bg-slate-200) {
    background-color: #1C1526 !important;
}

html[data-theme="black"] .ap-admin-shell :is(.border-slate-100, .border-slate-200, .border-slate-300, .border-gray-100, .border-gray-200, .border-gray-300) {
    border-color: #2D203D !important;
}

html[data-theme="black"] .ap-admin-shell :is(.text-slate-900, .text-slate-800, .text-gray-900, .text-gray-800) {
    color: #F5F3FF !important;
}

html[data-theme="black"] .ap-admin-shell :is(.text-slate-700, .text-slate-600, .text-slate-500, .text-slate-400, .text-gray-700, .text-gray-600, .text-gray-500, .text-gray-400) {
    color: #A49BB3 !important;
}

html[data-theme="black"] .ap-admin-shell :is(.bg-blue-50, .bg-indigo-50) {
    background-color: rgba(168, 85, 247, 0.14) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.text-blue-600, .text-blue-700, .text-indigo-600, .text-indigo-700) {
    color: #C084FC !important;
}

html[data-theme="black"] .ap-admin-shell :is(.bg-blue-600, .bg-blue-700, .bg-indigo-600) {
    background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%) !important;
    color: #F5F3FF !important;
}

html[data-theme="black"] .ap-admin-shell :is(.hover\:bg-slate-50, .hover\:bg-slate-100, .hover\:bg-gray-50, .hover\:bg-gray-100):hover {
    background-color: #1C1526 !important;
}

html[data-theme="black"] .ap-admin-shell .hover\:bg-blue-700:hover {
    background: linear-gradient(135deg, #9333EA 0%, #6D28D9 100%) !important;
}

html[data-theme="black"] .ap-admin-shell .hover\:text-slate-900:hover {
    color: #F5F3FF !important;
}

/* Páginas de acesso, documentação e cobrança pública */
html[data-theme="black"] body.ap-access {
    background-color: #08060C !important;
    color: #F5F3FF !important;
}

body.ap-api-doc {
    background: #08060C;
    color: #F5F3FF;
}

.ap-api-doc :is(.bg-white, .bg-slate-50, .bg-slate-100) {
    background-color: #14101C !important;
}

.ap-api-doc :is(.border-slate-100, .border-slate-200, .border-slate-800) {
    border-color: #2D203D !important;
}

.ap-api-doc :is(.text-slate-900, .text-slate-800, .text-slate-700) {
    color: #F5F3FF !important;
}

.ap-api-doc :is(.text-slate-600, .text-slate-500, .text-slate-400) {
    color: #A49BB3 !important;
}

.ap-api-doc .hover\:bg-slate-100:hover {
    background-color: #1C1526 !important;
}

.ap-api-doc :is(.bg-blue-600, .bg-blue-500) {
    background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%) !important;
    color: #F5F3FF !important;
}

.ap-api-doc :is(.text-blue-600, .text-blue-500) {
    color: #C084FC !important;
}

.ap-api-doc .bg-blue-50 {
    background-color: rgba(168, 85, 247, 0.14) !important;
}

.ap-public-payment .site-header {
    background: linear-gradient(155deg, #1C1526, #08060C) !important;
}

.ap-public-payment .btn-submit:not(:disabled):not(.btn-gpay-disabled) {
    background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%) !important;
    color: #F5F3FF !important;
    border: 1px solid rgba(192, 132, 252, 0.4) !important;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35) !important;
}

/* Sidebar Client */
.ap-client-sidebar :is(.ap-sidebar-surface, .ap-sidebar-brand) {
    background: #0F0B15 !important;
    border-color: #2D203D !important;
}

.ap-client-sidebar .sidebar-menu-scroll :is(a, button) {
    color: #C4BCD6 !important;
    transition: all .15s ease;
}

.ap-client-sidebar .sidebar-menu-scroll :is(a, button):hover {
    color: #F5F3FF !important;
    background: #1C1526 !important;
}

.ap-client-sidebar .sidebar-menu-scroll :is(a, button):is(.text-neon, [class*="text-neon"], .bg-neon\/10) {
    background: rgba(168, 85, 247, 0.16) !important;
    color: #C084FC !important;
    border-left: 3px solid #A855F7 !important;
}

.ap-client-sidebar input[type="text"] {
    background: #14101C !important;
    border-color: #2D203D !important;
    color: #F5F3FF !important;
}

.ap-client-sidebar input[type="text"]::placeholder {
    color: #A49BB3 !important;
}

/* Fallback seguro para superfícies antigas do painel do cliente */
html[data-theme="black"] .user-content :is(.bg-\[\#0c0c0c\], .bg-\[\#141414\], .bg-\[\#111\], .bg-\[\#101010\]) {
    background-color: #14101C !important;
}

html[data-theme="black"] .user-content :is(.border-\[\#1f1f1f\], .border-\[\#252525\], .border-\[\#292929\], .border-\[\#343434\]) {
    border-color: #2D203D !important;
}

html[data-theme="black"] .ap-admin-shell .shadow-sm,
html[data-theme="black"] .ap-admin-shell .shadow-xl {
    --tw-shadow-color: rgba(0, 0, 0, 0.55) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.bg-purple-50, .bg-violet-50) {
    background-color: rgba(168, 85, 247, 0.14) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.bg-emerald-50, .bg-green-50) {
    background-color: rgba(34, 197, 94, 0.14) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.bg-amber-50, .bg-orange-50, .bg-yellow-50) {
    background-color: rgba(245, 158, 11, 0.14) !important;
}

html[data-theme="black"] .ap-admin-shell .bg-red-50 {
    background-color: rgba(239, 68, 68, 0.14) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.border-red-200, .border-red-300) {
    border-color: rgba(239, 68, 68, 0.35) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.border-amber-200, .border-amber-300) {
    border-color: rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.border-emerald-200, .border-green-200) {
    border-color: rgba(34, 197, 94, 0.35) !important;
}

html[data-theme="black"] .ap-admin-shell :is(.text-red-700, .text-red-800, .text-red-900) {
    color: #FCA5A5 !important;
}

html[data-theme="black"] .ap-admin-shell :is(.text-amber-700, .text-amber-800) {
    color: #FCD34D !important;
}

html[data-theme="black"] .ap-admin-shell :is(.text-emerald-700, .text-emerald-800) {
    color: #4ADE80 !important;
}

html[data-theme="black"] .ap-admin-shell :is(.text-purple-600, .text-purple-700) {
    color: #C084FC !important;
}

html[data-theme="black"] .ap-admin-shell .apexcharts-tooltip,
html[data-theme="black"] .ap-admin-shell .apexcharts-tooltip-title {
    background: #14101C !important;
    border-color: #2D203D !important;
    color: #F5F3FF !important;
}

html[data-theme="black"] .ap-admin-shell .apexcharts-text {
    fill: #A49BB3 !important;
}

html[data-theme="black"] .ap-admin-shell .apexcharts-gridline {
    stroke: #2D203D !important;
}