/* =====================================================================
   datafy_skin.css — aparência do frontend Ecompag igual ao datafy/HostPanel
   Fundo claro, topo escuro, sidebar branca compacta, cards com borda,
   modais centralizados no desktop e folha de baixo pra cima no celular.
   Só aparência: nenhum comportamento do sistema é alterado.
   A cor principal continua vindo do banco (config.primary_color).
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Lato:wght@400;700;900&display=swap');

:root, html[data-theme-mode] {
  /* ── tokens do datafy ── */
  --primary: var(--color-primary, #EF4444);
  --on-primary: #FFFFFF;
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --text: #0E1016;
  --muted: #6A7080;
  --border: #E2E4EA;
  --header: #0E1016;
  --on-header: #FFFFFF;
  --success: #15A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 6px;
  --primary-hover: color-mix(in srgb, var(--primary) 86%, #000);
  --primary-soft: color-mix(in srgb, var(--primary) 9%, var(--surface));
  --primary-line: color-mix(in srgb, var(--primary) 30%, var(--surface));
  --text-2: color-mix(in srgb, var(--text) 78%, var(--surface));
  --hover: color-mix(in srgb, var(--text) 4%, var(--surface));
  --sel: color-mix(in srgb, var(--text) 7%, var(--surface));
  --header-2: color-mix(in srgb, var(--on-header) 10%, var(--header));
  --header-line: color-mix(in srgb, var(--on-header) 14%, var(--header));
  --header-muted: color-mix(in srgb, var(--on-header) 62%, var(--header));
  --shadow: 0 1px 2px rgba(12, 14, 20, .04), 0 8px 24px rgba(12, 14, 20, .06);
  --h-top: 64px;
  --w-side: 252px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-panel: 'Lato', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* ── variáveis do tema antigo (escuro) apontando pro claro ── */
  --color-background: #F3F4F7; --color-background-rgb: 243, 244, 247;
  --color-surface: #FFFFFF;
  --frontend-page-background: #F3F4F7;
  --body-bg: #F3F4F7; --body-bg-rgb: 243, 244, 247; --default-body-bg-color: #F3F4F7;
  --color-quaternary: #0E1016; --color-quaternary-rgb: 14, 16, 22;
  --custom-white: #FFFFFF; --default-text-color: #0E1016; --text-muted: #6A7080;
  --default-border: #E2E4EA; --input-border: #E2E4EA; --form-control-bg: #FFFFFF;
  --menu-bg: #FFFFFF; --menu-bg-color: #FFFFFF; --menu-prime-color: #0E1016; --menu-border-color: #E2E4EA;
  --header-bg: #0E1016; --header-prime-color: #FFFFFF; --header-border-color: transparent;
  --frontend-card-background: #FFFFFF; --frontend-modal-background: #FFFFFF; --frontend-field-background: #FFFFFF;
  --frontend-field-color: #FFFFFF; --frontend-menu-color: #FFFFFF; --frontend-header-color: #0E1016; --frontend-card-color: #FFFFFF;
  --frontend-modal-color: #FFFFFF; --frontend-overlay-background: var(--overlay-bg, rgba(8, 9, 12, .55));
  --light-rgb: 247, 248, 250; --dark-rgb: 14, 16, 22; --gray-1: #F7F8FA; --gray-2: #EEF0F3; --gray-3: #E2E4EA;
  --bs-body-bg: #F3F4F7; --bs-body-color: #0E1016; --bs-border-color: #E2E4EA; --bs-emphasis-color: #0E1016;
  --bs-secondary-color: #6A7080; --bs-tertiary-bg: #F7F8FA; --bs-secondary-bg: #EEF0F3; --bs-heading-color: #0E1016;
  --bs-link-color: var(--primary); --bs-link-hover-color: var(--primary-hover);
  --frontend-bg-000000: #F3F4F7; --frontend-bg-000000-rgb: 243, 244, 247;
  --frontend-bg-1a1a1a: #FFFFFF; --frontend-bg-1a1a1a-rgb: 255, 255, 255;
  --frontend-bg-2a2a2a: #F7F8FA; --frontend-bg-2a2a2a-rgb: 247, 248, 250;
  --frontend-bg-f59e0b: #F59E0B; --frontend-bg-f59e0b-rgb: 245, 158, 11;
  --frontend-bg-fbbf24: #FBBF24; --frontend-bg-fbbf24-rgb: 251, 191, 36;
  --frontend-bg-0ea5e9: #0EA5E9; --frontend-bg-0ea5e9-rgb: 14, 165, 233;
  --frontend-bg-38bdf8: #38BDF8; --frontend-bg-38bdf8-rgb: 56, 189, 248;
  --frontend-bg-4a4a4a: #EEF0F3; --frontend-bg-4a4a4a-rgb: 238, 240, 243;
  --frontend-bg-5a5a5a: #E2E4EA; --frontend-bg-5a5a5a-rgb: 226, 228, 234;
  --frontend-bg-059669: #D4F7EC; --frontend-bg-059669-rgb: 212, 247, 236;
  --frontend-bg-d97706: #D97706; --frontend-bg-d97706-rgb: 217, 119, 6;
  --frontend-bg-6b7280: #E2E4EA; --frontend-bg-6b7280-rgb: 226, 228, 234;
  --frontend-bg-374151: #E1E4EA; --frontend-bg-374151-rgb: 225, 228, 234;
  --frontend-bg-ffffff: #0E1016; --frontend-bg-ffffff-rgb: 14, 16, 22;
  --frontend-bg-3a3a3a: #EEF0F3; --frontend-bg-3a3a3a-rgb: 238, 240, 243;
  --frontend-bg-3b82f6: #3B82F6; --frontend-bg-3b82f6-rgb: 59, 130, 246;
  --frontend-bg-b91c1c: #B91C1C; --frontend-bg-b91c1c-rgb: 185, 28, 28;
  --frontend-bg-f2f2f2: #0E1016; --frontend-bg-f2f2f2-rgb: 14, 16, 22;
  --frontend-bg-111111: #FFFFFF; --frontend-bg-111111-rgb: 255, 255, 255;
  --frontend-bg-f0f0f0: #0E1016; --frontend-bg-f0f0f0-rgb: 14, 16, 22;
  --frontend-bg-fef2f2: #0E1016; --frontend-bg-fef2f2-rgb: 14, 16, 22;
  --frontend-bg-fafafa: #0E1016; --frontend-bg-fafafa-rgb: 14, 16, 22;
  --frontend-bg-f0fdf4: #0E1016; --frontend-bg-f0fdf4-rgb: 14, 16, 22;
  --frontend-bg-fca5a5: #FCA5A5; --frontend-bg-fca5a5-rgb: 252, 165, 165;
  --frontend-bg-f87171: #F87171; --frontend-bg-f87171-rgb: 248, 113, 113;
  --frontend-bg-151515: #FFFFFF; --frontend-bg-151515-rgb: 255, 255, 255;
  --frontend-bg-1c1c1c: #FFFFFF; --frontend-bg-1c1c1c-rgb: 255, 255, 255;
  --frontend-bg-0e0e0e: #F3F4F7; --frontend-bg-0e0e0e-rgb: 243, 244, 247;
  --frontend-bg-0f0f0f: #F3F4F7; --frontend-bg-0f0f0f-rgb: 243, 244, 247;
  --frontend-bg-080808: #F3F4F7; --frontend-bg-080808-rgb: 243, 244, 247;
  --frontend-bg-242424: #F7F8FA; --frontend-bg-242424-rgb: 247, 248, 250;
  --frontend-bg-202020: #F7F8FA; --frontend-bg-202020-rgb: 247, 248, 250;
  --frontend-bg-0d0d0d: #F3F4F7; --frontend-bg-0d0d0d-rgb: 243, 244, 247;
  --frontend-bg-0a0a0a: #F3F4F7; --frontend-bg-0a0a0a-rgb: 243, 244, 247;
  --frontend-bg-b0b0b0: #6A7080; --frontend-bg-b0b0b0-rgb: 106, 112, 128;
  --frontend-bg-f8f8f8: #0E1016; --frontend-bg-f8f8f8-rgb: 14, 16, 22;
  --frontend-bg-999999: #6A7080; --frontend-bg-999999-rgb: 106, 112, 128;
  --frontend-bg-e5e5e5: #3A3D45; --frontend-bg-e5e5e5-rgb: 58, 61, 69;
  --frontend-bg-222222: #F7F8FA; --frontend-bg-222222-rgb: 247, 248, 250;
  --frontend-bg-333333: #EEF0F3; --frontend-bg-333333-rgb: 238, 240, 243;
  --frontend-bg-10b981: #10B981; --frontend-bg-10b981-rgb: 16, 185, 129;
  --frontend-bg-161616: #FFFFFF; --frontend-bg-161616-rgb: 255, 255, 255;
  --frontend-bg-141414: #FFFFFF; --frontend-bg-141414-rgb: 255, 255, 255;
  --frontend-bg-7f1d1d: #F6D5D5; --frontend-bg-7f1d1d-rgb: 246, 213, 213;
  --frontend-bg-181818: #FFFFFF; --frontend-bg-181818-rgb: 255, 255, 255;
  --frontend-bg-1e1e1e: #FFFFFF; --frontend-bg-1e1e1e-rgb: 255, 255, 255;
  --frontend-bg-646464: #E2E4EA; --frontend-bg-646464-rgb: 226, 228, 234;
  --frontend-bg-444444: #EEF0F3; --frontend-bg-444444-rgb: 238, 240, 243;
  --frontend-bg-048255: #D4F7EB; --frontend-bg-048255-rgb: 212, 247, 235;
  --frontend-bg-e08e00: #E08E00; --frontend-bg-e08e00-rgb: 224, 142, 0;
  --frontend-bg-252525: #F7F8FA; --frontend-bg-252525-rgb: 247, 248, 250;
  --frontend-bg-121212: #FFFFFF; --frontend-bg-121212-rgb: 255, 255, 255;
  --frontend-bg-171717: #FFFFFF; --frontend-bg-171717-rgb: 255, 255, 255;
  --frontend-bg-667eea: #667EEA; --frontend-bg-667eea-rgb: 102, 126, 234;
  --frontend-bg-764ba2: #764BA2; --frontend-bg-764ba2-rgb: 118, 75, 162;
  --frontend-bg-2563eb: #2563EB; --frontend-bg-2563eb-rgb: 37, 99, 235;
  --frontend-bg-d1fae5: #D1FAE5; --frontend-bg-d1fae5-rgb: 209, 250, 229;
  --frontend-bg-fee2e2: #FEE2E2; --frontend-bg-fee2e2-rgb: 254, 226, 226;
  --frontend-bg-2d1f0a: #FBF5EC; --frontend-bg-2d1f0a-rgb: 251, 245, 236;
  --frontend-bg-2d0a0a: #FBECEC; --frontend-bg-2d0a0a-rgb: 251, 236, 236;
  --frontend-bg-0a2d0a: #ECFBEC; --frontend-bg-0a2d0a-rgb: 236, 251, 236;
  --frontend-bg-28a745: #28A745; --frontend-bg-28a745-rgb: 40, 167, 69;
  --frontend-bg-0c0c0c: #F3F4F7; --frontend-bg-0c0c0c-rgb: 243, 244, 247;
  --frontend-bg-090909: #F3F4F7; --frontend-bg-090909-rgb: 243, 244, 247;
  --frontend-bg-282828: #F7F8FA; --frontend-bg-282828-rgb: 247, 248, 250;
  --frontend-bg-3b0909: #FCEBEB; --frontend-bg-3b0909-rgb: 252, 235, 235;
  --frontend-bg-ff4d4d: #FF4D4D; --frontend-bg-ff4d4d-rgb: 255, 77, 77;
  --frontend-bg-ff7676: #FF7676; --frontend-bg-ff7676-rgb: 255, 118, 118;
  --frontend-bg-19e0b5: #19E0B5; --frontend-bg-19e0b5-rgb: 25, 224, 181;
  --frontend-bg-0a0a0c: #F3F4F7; --frontend-bg-0a0a0c-rgb: 243, 244, 247;
  --frontend-bg-eeeeee: #0E1016; --frontend-bg-eeeeee-rgb: 14, 16, 22;
  --frontend-bg-7066e0: #7066E0; --frontend-bg-7066e0-rgb: 112, 102, 224;
  --frontend-bg-dc3741: #DC3741; --frontend-bg-dc3741-rgb: 220, 55, 65;
  --frontend-bg-6e7881: #E2E4EA; --frontend-bg-6e7881-rgb: 226, 228, 234;
  --frontend-bg-f27474: #F27474; --frontend-bg-f27474-rgb: 242, 116, 116;
  --frontend-bg-2778c4: #2778C4; --frontend-bg-2778c4-rgb: 39, 120, 196;
  --frontend-bg-add8e6: #ADD8E6; --frontend-bg-add8e6-rgb: 173, 216, 230;
  --frontend-bg-a5dc86: #A5DC86; --frontend-bg-a5dc86-rgb: 165, 220, 134;
  --frontend-bg-2d2d2d: #F7F8FA; --frontend-bg-2d2d2d-rgb: 247, 248, 250;
}

/* ── base ── */
html { background: var(--bg) !important; color-scheme: light; }
html body, body {
  background: var(--frontend-page-background, var(--bg)) !important; background-attachment: fixed !important;
  color: var(--text);
  font-family: var(--font-panel);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
#loader { background: var(--bg) !important; }
h1, h2, h3, h4, h5, h6 { color: var(--text); letter-spacing: -.01em; }
a { color: inherit; }
.text-muted, .text-secondary { color: var(--muted) !important; }
.text-white:not(.btn):not(.badge) { color: var(--text) !important; }
.bg-dark:not(.badge) { background: var(--surface) !important; }
.border, .border-top, .border-bottom, .border-start, .border-end { border-color: var(--border) !important; }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }
* { scrollbar-color: color-mix(in srgb, var(--text) 18%, transparent) transparent; }

/* =====================================================================
   TOPO (escuro, igual ao datafy)
   ===================================================================== */
html body .app-header {
  background: var(--header-fill, var(--header)) !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  height: var(--h-top) !important;
  color: var(--on-header);
  backdrop-filter: none !important;
}
.app-header .main-header-container { height: var(--h-top); padding-left: 28px; padding-right: 28px; }
.app-header .header-content-right { gap: 10px; align-items: center; }
.app-header .header-element { display: flex; align-items: center; }
.app-header .header-link:not(.goal-progress-widget) {
  width: 40px; height: 40px; padding: 0 !important; border-radius: 50% !important;
  display: grid !important; place-items: center;
  background: color-mix(in srgb, var(--on-header) 8%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--on-header) 18%, transparent) !important;
  color: var(--on-header) !important;
  transition: background .15s, border-color .15s;
}
.app-header .header-link:not(.goal-progress-widget):hover,
.app-header .show > .header-link:not(.goal-progress-widget) {
  background: color-mix(in srgb, var(--on-header) 16%, transparent) !important;
  border-color: color-mix(in srgb, var(--on-header) 32%, transparent) !important;
}
.app-header .header-link-icon, .app-header .header-link i, .app-header .header-link svg { color: var(--on-header) !important; fill: none; font-size: 18px; }
.app-header .header-link.dropdown-toggle::after { display: none; }
.app-header .sidemenu-toggle .header-link { background: transparent !important; border-color: transparent !important; border-radius: 8px !important; }
.app-header .sidemenu-toggle .header-link:hover { background: color-mix(in srgb, var(--on-header) 12%, transparent) !important; }
.app-header .animated-arrow span, .app-header .animated-arrow span::before, .app-header .animated-arrow span::after { background: var(--on-header) !important; }
.app-header .header-icon-badge { background: var(--danger) !important; color: #fff !important; border: 2px solid var(--header); font-size: 10px; min-width: 18px; height: 18px; line-height: 14px; top: -4px !important; right: -4px !important; }
/* meta (barra de progresso) */
.app-header .goal-progress-widget { background: transparent !important; border: 0 !important; color: var(--on-header) !important; }
.app-header .goal-label-text { color: var(--on-header) !important; }
.app-header .goal-label-value { color: var(--header-muted) !important; }
.app-header .goal-progress-bar-wrapper { background: var(--header-2) !important; border-color: transparent !important; }
.app-header .goal-progress-bar-fill { background: var(--primary) !important; box-shadow: none !important; }
/* logos no topo (só aparecem quando o template mostra) */
.app-header .header-logo img { max-height: 30px; }

/* menus que descem do topo: brancos e flutuantes (umenu-float do datafy) */
html body .app-header .dropdown-menu, html body .main-header-dropdown, html body .notif-pop {
  background: var(--surface) !important; color: var(--text) !important;
  border: 1px solid var(--border) !important; border-radius: 18px !important;
  box-shadow: 0 16px 48px rgba(12, 14, 20, .16) !important; padding: 6px 0;
  overflow: hidden;
}
.app-header .dropdown-item, .main-header-dropdown .dropdown-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px !important;
  font-size: 14px; font-weight: 400; color: var(--text) !important; background: none;
}
.app-header .dropdown-item i { color: var(--muted) !important; opacity: 1 !important; }
.app-header .dropdown-item:hover, .app-header .dropdown-item:focus { background: var(--hover) !important; color: var(--text) !important; }
.app-header .dropdown-item[href*="logout"], .app-header .dropdown-item[href*="logout"] i { color: var(--danger) !important; }
.notif-pop .notif-pop-arrow { display: none !important; }
.notif-pop .notif-pop-head { padding: 14px 16px !important; border-bottom: 1px solid var(--border) !important; background: var(--surface) !important; }
.notif-pop .notif-pop-title { color: var(--text) !important; font-weight: 700; font-size: 14px; }
.notif-pop .notif-pop-new { background: var(--primary-soft) !important; color: var(--primary) !important; border-radius: 999px; }
.notif-pop .notif-item { border-color: var(--border) !important; background: var(--surface) !important; }
.notif-pop .notif-item:hover { background: var(--hover) !important; }
.notif-pop .notif-item-icon { background: var(--primary-soft) !important; color: var(--primary) !important; border-color: transparent !important; }
.notif-pop .notif-item-top strong { color: var(--text) !important; }
.notif-pop .notif-item-top time, .notif-pop .notif-item p { color: var(--muted) !important; }
.notif-pop .notif-pop-all { border-top: 1px solid var(--border) !important; color: var(--primary) !important; background: var(--surface) !important; font-weight: 600; }

/* =====================================================================
   SIDEBAR (branca, compacta, item ativo cinza — igual ao datafy)
   ===================================================================== */
html body .app-sidebar {
  background: var(--sidebar-fill, var(--surface)) !important;
  border-right: 1px solid var(--border) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
  width: var(--w-side) !important;
}
html body .app-sidebar::before, html body .app-sidebar::after { display: none !important; }
.app-sidebar .main-sidebar-header {
  background: var(--surface) !important;
  height: var(--h-top) !important;
  border-bottom: 1px solid var(--border) !important;
  border-right: 0 !important;
  width: var(--w-side) !important;
  padding: 0 22px !important;
  justify-content: flex-start !important;
  display: flex; align-items: center;
}
.app-sidebar .main-sidebar-header .header-logo img { max-height: 32px; width: auto; }
.app-sidebar .main-sidebar { padding: 12px 0 16px !important; background: transparent !important; }
.app-sidebar .main-menu > .slide { margin: 0 !important; padding: 0 !important; }
.app-sidebar .slide__category, .app-sidebar .main-menu .slide__category {
  margin: 10px 10px 2px !important; height: 28px; padding: 0 10px !important;
  display: flex; align-items: center;
  font-size: 12.5px !important; font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--muted) !important; opacity: 1 !important;
}
.app-sidebar .slide__category .category-name, .app-sidebar .slide__category span { color: var(--muted) !important; font-size: 12.5px !important; text-transform: none !important; letter-spacing: 0 !important; }
html body .app-sidebar .side-menu__item {
  display: flex !important; align-items: center; gap: 11px;
  height: 36px; margin: 0 10px 1px !important; padding: 0 10px !important;
  font-size: 14px !important; font-weight: 400 !important; letter-spacing: 0 !important;
  color: var(--text) !important; background: transparent !important;
  border: 0 !important; border-radius: 8px !important; box-shadow: none !important;
  transition: background .12s;
}
html body .app-sidebar .side-menu__item:hover { background: var(--hover) !important; color: var(--text) !important; }
html body .app-sidebar .side-menu__item.active, html body .app-sidebar .slide.active > .side-menu__item,
html body .app-sidebar .side-menu__item.active:hover {
  background: var(--sel) !important; color: var(--text) !important; font-weight: 500 !important;
}
.app-sidebar .side-menu__item::before, .app-sidebar .side-menu__item::after { display: none !important; }
.app-sidebar .side-menu__icon, .app-sidebar .side-menu__item i, .app-sidebar .side-menu__item svg:not(.side-menu__angle) {
  width: 18px !important; height: 18px !important; font-size: 18px !important; line-height: 18px;
  color: var(--muted) !important; fill: none; stroke-width: 1.6;
  margin: 0 !important; flex: none; background: none !important; box-shadow: none !important;
}
.app-sidebar .side-menu__item.active .side-menu__icon, .app-sidebar .side-menu__item.active i,
.app-sidebar .side-menu__item:hover .side-menu__icon, .app-sidebar .side-menu__item:hover i { color: var(--text) !important; }
.app-sidebar .side-menu__label { color: inherit !important; font-size: 14px !important; font-weight: inherit !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar .side-menu__angle { color: var(--muted) !important; margin-left: auto; font-size: 14px; width: auto !important; }
.app-sidebar .slide-menu { background: transparent !important; padding: 2px 0 4px !important; }
.app-sidebar .slide-menu .side-menu__item { height: 34px; padding-left: 39px !important; font-size: 13.5px !important; color: var(--text-2) !important; }
.app-sidebar .slide-menu .side-menu__item::before { display: none !important; }
.app-sidebar .badge { border-radius: 999px !important; background: var(--danger) !important; color: #fff !important; font-size: 11px; font-weight: 700; transform: scale(.9); }
.app-sidebar .simplebar-scrollbar::before { background: color-mix(in srgb, var(--text) 25%, transparent) !important; }

/* largura do conteúdo acompanha a sidebar (desktop) */
@media (min-width: 992px) {
  html[data-nav-layout="vertical"] .app-header { padding-inline-start: var(--w-side) !important; }
  html[data-nav-layout="vertical"] .app-content, html[data-nav-layout="vertical"] .main-content { margin-inline-start: var(--w-side) !important; }
  html[data-toggled="close"] .app-sidebar .main-sidebar-header .header-logo .toggle-logo { display: none !important; }
}
/* gaveta no celular (igual ao datafy: desliza da esquerda, sombra e fundo escurecido) */
@media (max-width: 991.98px) {
  html body .app-sidebar { width: min(84vw, 320px) !important; box-shadow: none; transition: transform .22s ease, left .22s ease !important; }
  html[data-toggled="open"] body .app-sidebar { box-shadow: 0 0 40px rgb(0 0 0 / .25) !important; }
  .app-sidebar .main-sidebar-header { width: 100% !important; height: 68px !important; }
  html body .app-sidebar .side-menu__item { height: 44px; font-size: 15px !important; margin: 0 10px 2px !important; }
  #responsive-overlay { background: rgb(0 0 0 / .45) !important; backdrop-filter: none !important; }
  .app-header .main-header-container { padding-left: 12px; padding-right: 12px; }
}

/* =====================================================================
   CONTEÚDO
   ===================================================================== */
.main-content, .app-content { background: transparent !important; }
.main-content > .container-fluid, .app-content > .container-fluid { padding-top: 28px; }
.page-header-breadcrumb, .page-header { color: var(--text); }
.page-title, .page-header h1, .page-header-breadcrumb h1 { font-size: 26px !important; font-weight: 700 !important; color: var(--text) !important; letter-spacing: -.02em; }
.breadcrumb-item, .breadcrumb-item a { color: var(--muted) !important; }
hr { border-color: var(--border); opacity: 1; }

/* cards (borda fina, cantos do banco, sem brilho) */
html body .card, html body .card.custom-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
  color: var(--text);
}
.card .card-header, .card-header {
  background: var(--surface) !important; border-bottom: 1px solid var(--border) !important;
  padding: 18px 24px !important; color: var(--text) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}
.card .card-title, .card-header .card-title { font-size: 15px !important; font-weight: 700 !important; color: var(--text) !important; text-transform: none !important; letter-spacing: 0 !important; }
.card .card-body { padding: 24px; }
.card .card-footer { background: color-mix(in srgb, var(--bg) 50%, var(--surface)) !important; border-top: 1px solid var(--border) !important; }

/* =====================================================================
   BOTÕES
   ===================================================================== */
.btn {
  border-radius: var(--radius) !important;
  font-weight: 600; font-size: 14px;
  box-shadow: none !important;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn-primary, .btn-danger, .btn-wave.btn-primary {
  background: var(--primary) !important; border-color: var(--primary) !important; color: var(--on-primary) !important;
}
.btn-primary:hover, .btn-danger:hover { background: var(--primary-hover) !important; border-color: var(--primary-hover) !important; }
.btn-secondary, .btn-light, .btn-outline-light, .btn-outline-secondary, .btn-outline-dark, .btn-dark {
  background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important;
}
.btn-secondary:hover, .btn-light:hover, .btn-outline-light:hover, .btn-outline-secondary:hover, .btn-outline-dark:hover, .btn-dark:hover { border-color: var(--text) !important; }
.btn-outline-primary, .btn-outline-danger { background: var(--surface) !important; border: 1px solid var(--primary-line) !important; color: var(--primary) !important; }
.btn-outline-primary:hover, .btn-outline-danger:hover { background: var(--primary-soft) !important; }
.btn-success { background: var(--success) !important; border-color: var(--success) !important; color: #fff !important; }
.btn-warning { background: var(--warning) !important; border-color: var(--warning) !important; color: #fff !important; }
.btn-close { filter: none !important; opacity: .55; }
.btn-close:hover { opacity: 1; }

/* =====================================================================
   CAMPOS
   ===================================================================== */
html body .form-control, html body .form-select, html body input.form-control, html body textarea.form-control {
  background-color: var(--field-bg, var(--surface)) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  min-height: 44px;
  font-size: 15px;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s;
}
html body .form-control:focus, html body .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: inset 0 0 0 1px var(--primary) !important;
  background-color: var(--field-bg, var(--surface)) !important;
}
.form-control::placeholder { color: color-mix(in srgb, var(--muted) 75%, var(--surface)) !important; }
.form-control[readonly], .form-control:disabled { background-color: var(--bg) !important; }
.form-label, label.form-label { font-size: 13px; font-weight: 600; color: var(--text-2) !important; margin-bottom: 6px; }
.input-group-text { background: var(--bg) !important; border-color: var(--border) !important; color: var(--muted) !important; }
.form-check-input { background-color: var(--surface); border-color: color-mix(in srgb, var(--text) 25%, var(--surface)); }
.form-check-input:checked { background-color: var(--primary) !important; border-color: var(--primary) !important; }
.form-switch .form-check-input:checked { background-color: var(--primary) !important; }

/* =====================================================================
   TABELAS
   ===================================================================== */
.table { color: var(--text) !important; --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border); --bs-table-hover-bg: var(--hover); --bs-table-striped-bg: color-mix(in srgb, var(--bg) 45%, var(--surface)); }
.table > thead > tr > th, .table thead th {
  text-align: left; font-size: 12px !important; font-weight: 700 !important; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted) !important; padding: 12px 24px !important;
  border-bottom: 1px solid var(--border) !important;
  background: color-mix(in srgb, var(--bg) 60%, var(--surface)) !important;
}
.table > tbody > tr > td, .table td { padding: 15px 24px !important; border-bottom: 1px solid var(--border) !important; font-size: 14px; background: transparent !important; color: var(--text); }
.table > tbody > tr:last-child > td { border-bottom: 0 !important; }
.table-hover > tbody > tr:hover > * { background: var(--hover) !important; }
@media (max-width: 640px) { .table > thead > tr > th, .table > tbody > tr > td { padding-left: 16px !important; padding-right: 16px !important; } }

/* etiquetas: pílula suave com bolinha (badge do painel datafy) */
.badge.bg-success, .badge.bg-success-transparent, .badge-success { background: color-mix(in srgb, var(--success) 13%, var(--surface)) !important; color: color-mix(in srgb, var(--success) 78%, var(--text)) !important; }
.badge.bg-warning, .badge.bg-warning-transparent, .badge-warning { background: color-mix(in srgb, var(--warning) 15%, var(--surface)) !important; color: color-mix(in srgb, var(--warning) 72%, var(--text)) !important; }
.badge.bg-danger, .badge.bg-danger-transparent, .badge-danger { background: color-mix(in srgb, var(--danger) 12%, var(--surface)) !important; color: color-mix(in srgb, var(--danger) 80%, var(--text)) !important; }
.badge.bg-primary, .badge.bg-primary-transparent { background: var(--primary-soft) !important; color: var(--primary) !important; }
.badge.bg-secondary, .badge.bg-light, .badge.bg-dark, .badge.bg-info { background: color-mix(in srgb, var(--muted) 13%, var(--surface)) !important; color: color-mix(in srgb, var(--muted) 80%, var(--text)) !important; }
.badge:not(.header-icon-badge):not(.rounded-circle) { border-radius: 999px; font-weight: 600; letter-spacing: 0; }

/* avisos */
.alert { border-radius: var(--radius-lg) !important; border: 1px solid var(--border); color: var(--text); }
.alert-warning { background: color-mix(in srgb, var(--warning) 8%, var(--surface)) !important; border-color: color-mix(in srgb, var(--warning) 30%, var(--surface)) !important; color: var(--text) !important; }
.alert-danger { background: color-mix(in srgb, var(--danger) 7%, var(--surface)) !important; border-color: color-mix(in srgb, var(--danger) 28%, var(--surface)) !important; color: var(--text) !important; }
.alert-success { background: color-mix(in srgb, var(--success) 8%, var(--surface)) !important; border-color: color-mix(in srgb, var(--success) 28%, var(--surface)) !important; color: var(--text) !important; }
.alert-info, .alert-primary { background: var(--primary-soft) !important; border-color: var(--primary-line) !important; color: var(--text) !important; }

/* abas e filtros (estilo "tint" do datafy) */
.nav-tabs, .nav-pills { border-bottom: 0 !important; gap: 4px; }
.nav-tabs .nav-link, .nav-pills .nav-link {
  height: 36px; padding: 0 16px !important; display: inline-flex; align-items: center;
  font-weight: 600; font-size: 14px; color: var(--muted) !important;
  border: 0 !important; border-radius: 8px !important; background: transparent !important;
}
.nav-tabs .nav-link:hover, .nav-pills .nav-link:hover { background: var(--hover) !important; color: var(--text) !important; }
.nav-tabs .nav-link.active, .nav-pills .nav-link.active {
  background: color-mix(in srgb, var(--primary) 20%, var(--surface)) !important;
  color: color-mix(in srgb, var(--primary) 85%, var(--text)) !important;
}
.pagination .page-link { border-color: var(--border) !important; color: var(--text) !important; background: var(--surface) !important; }
.pagination .page-item.active .page-link { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.progress { background: var(--bg) !important; border-radius: 999px; }
.progress-bar { background: var(--primary); }
.list-group-item { background: var(--surface) !important; border-color: var(--border) !important; color: var(--text) !important; }
.dropdown-menu { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 12px !important; box-shadow: 0 16px 48px rgba(12, 14, 20, .14) !important; color: var(--text) !important; }
.dropdown-item { color: var(--text) !important; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--hover) !important; }
.tooltip-inner { background: var(--text); color: var(--surface); }

/* =====================================================================
   MODAIS
   Desktop: centralizado, sobe 10px com fade (modalIn).
   Celular (até 640px): folha que sobe de baixo (sheetUp), alça no topo,
   arrastar pra baixo fecha, sem foco automático no teclado.
   ===================================================================== */
@keyframes ecpFadeIn { from { opacity: 0; } }
@keyframes ecpModalIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes ecpSheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ecpSheetDown { to { transform: translateY(100%); } }
@keyframes ecpFadeOut { to { opacity: 0; } }

/* — Bootstrap — */
html body .modal-backdrop { background: rgb(var(--overlay-rgb, 8, 9, 12)) !important; }
html body .modal-backdrop.show { opacity: .55 !important; }
html body .modal-content {
  background: var(--modal-fill, var(--surface)) !important; color: var(--text) !important;
  border: 0 !important; border-radius: var(--radius-lg) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3) !important;
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px !important; border-bottom: 1px solid var(--border) !important;
  background: var(--surface) !important; color: var(--text) !important;
}
.modal-header .modal-title, .modal-title { font-size: 17px !important; font-weight: 700 !important; color: var(--text) !important; }
.modal-body { padding: 22px !important; color: var(--text); background: var(--surface); }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px !important; border-top: 1px solid var(--border) !important;
  background: color-mix(in srgb, var(--bg) 50%, var(--surface)) !important;
}
.modal-footer > * { margin: 0 !important; }
.modal-dialog { max-width: 520px; }
.modal-dialog.modal-lg { max-width: 800px; } .modal-dialog.modal-xl { max-width: 1100px; } .modal-dialog.modal-sm { max-width: 380px; }
.modal.fade .modal-dialog { transform: translateY(10px) !important; transition: transform .2s ease-out !important; }
.modal.fade.show .modal-dialog { transform: none !important; }
.modal.fade { transition: opacity .15s linear !important; }

@media (max-width: 640px) {
  html body .modal .modal-dialog, html body .modal .modal-dialog.modal-dialog-centered {
    margin: 0 !important; max-width: none !important; width: 100% !important;
    min-height: 100% !important; display: flex !important; align-items: flex-end !important;
    position: absolute; left: 0; right: 0; bottom: 0; top: 0;
  }
  html body .modal .modal-content {
    width: 100%; max-height: min(92vh, calc(100% - 24px)); overflow: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, .28) !important;
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: contain; will-change: transform; backface-visibility: hidden;
  }
  html body .modal .modal-header { position: sticky; top: 0; z-index: 2; touch-action: none; padding-top: 22px !important; }
  html body .modal .modal-header::before {
    content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px;
    background: var(--border); border-radius: 999px;
  }
  .modal.fade .modal-dialog { transform: translateY(100%) !important; transition: transform .28s cubic-bezier(.2, .8, .2, 1) !important; }
  .modal.fade.show .modal-dialog { transform: none !important; }
  .modal.fade:not(.show) .modal-dialog { transition-duration: .22s !important; }
  .modal.fade { transition: opacity .22s linear !important; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer > .btn { flex: 1 1 auto; }
}

/* — modais próprios das páginas (mesma aparência) — */
:is(.cr-modal-overlay, .modal-overlay, .inf-modal-overlay, .terms-modal-overlay, .slidermodal, .ct-modal-backdrop, .lo-backdrop, #popupOverlay, .mp-search-backdrop) {
  background: var(--overlay-bg, rgba(8, 9, 12, .55)) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
:is(.cr-modal-box, .modal-box, .inf-modal, .terms-modal, .slidermodal-card, .ct-modal, .cl-modal-box, .sa-modal, .af-transfer-dialog, .lo-panel) {
  background: var(--modal-fill, var(--surface)) !important; color: var(--text) !important;
  border: 0 !important; border-radius: var(--radius-lg) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3) !important;
}
:is(.cr-modal-head, .ct-modal-header, .cl-modal-head, .slidermodal-head, .lo-head) { color: var(--text) !important; }
:is(.cr-modal-head, .ct-modal-header, .slidermodal-head) { border-bottom: 1px solid var(--border); }
:is(.cr-modal-desc, .cl-modal-desc) { color: var(--muted) !important; }
:is(.cr-modal-actions, .ct-modal-foot, .cl-modal-actions, .modal-btns, .lo-actions) { gap: 10px; }
.af-transfer-dialog::backdrop { background: var(--overlay-bg, rgba(8, 9, 12, .55)); }
/* animação única dos modais (a do datafy): some com as animações antigas das páginas (zoom, escala, cair de cima) */
html body .modal .modal-content, html body .modal .modal-dialog > * { animation: none !important; }
.ecp-modal-ov { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transform: none !important; }
.ecp-modal-ov:not(.ecp-anim-back) { animation: none !important; }
.ecp-modal-box { transition: none !important; scale: none !important; }
.ecp-modal-box:not(.ecp-anim-modal) { animation: none !important; }
.ecp-modal-box.ecp-center {
  position: fixed !important; inset: 0 !important; margin: auto !important;
  width: calc(100% - 32px) !important; max-width: 520px !important; height: fit-content !important;
  max-height: 90vh; overflow: auto; border-radius: var(--radius-lg) !important;
}
html body .ecp-anim-modal { animation: ecpModalIn .2s ease-out !important; }
html body .ecp-anim-back { animation: ecpFadeIn .15s ease-out !important; }
/* SweetAlert (alertas em modal; toasts ficam como estão) */
html body .swal2-popup:not(.swal2-toast) { border-radius: var(--radius-lg) !important; background: var(--surface) !important; color: var(--text) !important; box-shadow: 0 20px 60px rgba(0, 0, 0, .3) !important; }
html body .swal2-popup.swal2-show:not(.swal2-toast) { animation: ecpModalIn .2s ease-out !important; }
html body .swal2-popup.swal2-hide:not(.swal2-toast) { animation: ecpFadeOut .15s forwards !important; }
html body .swal2-container.swal2-backdrop-show { background: var(--overlay-bg, rgba(8, 9, 12, .55)) !important; }
html body .swal2-icon { animation: none !important; } html body .swal2-icon * { animation: none !important; }
@media (max-width: 640px) {
  :is(.cr-modal-overlay, .modal-overlay, .inf-modal-overlay, .terms-modal-overlay, .ct-modal-backdrop) {
    align-items: flex-end !important; justify-content: center !important; padding: 0 !important;
  }
  :is(.cr-modal-box, .modal-box, .inf-modal, .terms-modal, .ct-modal, .cl-modal-box) {
    width: 100% !important; max-width: none !important; margin: 0 !important;
    max-height: min(92vh, calc(100% - 24px)); overflow: auto; overscroll-behavior: contain;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, .28) !important;
    padding-bottom: max(env(safe-area-inset-bottom), var(--ecp-sheet-pb, 0px));
    position: relative; transform: none;
  }
  .ct-modal-backdrop .ct-modal { transform: none !important; }
  :is(.cr-modal-box, .modal-box, .inf-modal, .terms-modal, .ct-modal, .cl-modal-box, .lo-panel)::before {
    content: ''; display: block; width: 40px; height: 4px; margin: -6px auto 12px; background: var(--border); border-radius: 999px;
  }
  .af-transfer-dialog { margin: auto 0 0 !important; width: 100% !important; max-width: none !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }
  /* qualquer modal detectado vira folha de baixo pra cima */
  .ecp-modal-box, .ecp-modal-box.ecp-center {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; inset: auto 0 0 0 !important;
    width: 100% !important; max-width: none !important; height: auto !important; margin: 0 !important;
    max-height: 92vh !important; overflow: auto !important; overscroll-behavior: contain;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, .28) !important;
    padding-bottom: max(env(safe-area-inset-bottom), var(--ecp-sheet-pb, 0px), 16px) !important;
  }
  .ecp-modal-box::before { content: ''; display: block; width: 40px; height: 4px; margin: -6px auto 12px; background: var(--border); border-radius: 999px; }
  .ecp-modal-box:is(.cr-modal-box, .modal-box, .inf-modal, .terms-modal, .ct-modal, .cl-modal-box)::before { margin: -6px auto 12px; }
  html body dialog[open] { margin: auto 0 0 !important; width: 100% !important; max-width: none !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; max-height: 92vh; }
  html body .ecp-anim-modal { animation: ecpSheetUp .28s cubic-bezier(.2, .8, .2, 1) !important; }
  html body .swal2-popup.swal2-show:not(.swal2-toast) { animation: ecpSheetUp .28s cubic-bezier(.2, .8, .2, 1) !important; }
  html body .swal2-container:has(.swal2-popup:not(.swal2-toast)) { align-items: flex-end !important; padding: 0 !important; }
  html body .swal2-popup:not(.swal2-toast) { width: 100% !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; margin: 0 !important; }
  .ecp-closing-modal { animation: ecpSheetDown .22s forwards !important; }
  .ecp-closing-back { animation: ecpFadeOut .22s forwards !important; }
}
/* folha que já era de baixo (liquidante) ganha o acabamento do datafy */
.gw-bottom-sheet { background: var(--surface) !important; color: var(--text) !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; box-shadow: 0 -12px 48px rgba(0, 0, 0, .28) !important; border: 0 !important; }
.gw-bs-overlay { background: var(--overlay-bg, rgba(8, 9, 12, .55)) !important; backdrop-filter: none !important; }

@media (prefers-reduced-motion: reduce) {
  html body .modal.fade .modal-dialog, html body .ecp-anim-modal, html body .ecp-closing-modal { transition: none !important; animation: none !important; }
}

/* =====================================================================
   TELAS DE ENTRADA (login, cadastro, esqueci senha) — igual ao datafy:
   fonte do site (Inter), campos de 44px, botão cheio na cor principal.
   ===================================================================== */
body.ecp-auth, body.ecp-auth button, body.ecp-auth input { font-family: var(--font); }

/* =====================================================================
   Ajustes por página
   ===================================================================== */
/* Início: card de saldo com capa (imagem/vídeo) mantém texto branco por cima, como os banners do datafy */
.dashboard-has-cover .card-kpi-label, .dashboard-has-cover .card-kpi-value, .dashboard-has-cover .card-kpi-value *,
.dashboard-has-cover .btn-refresh-balance, .dashboard-has-cover .card-kpi-icon { color: #fff !important; text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.dashboard-has-cover .card-kpi-icon, .dashboard-has-cover .btn-refresh-balance { background: rgba(255, 255, 255, .14) !important; border-color: rgba(255, 255, 255, .28) !important; }
.dashboard-has-cover { border: 0 !important; overflow: hidden; }
#btnTogglePrivacy { width: 36px; height: 36px; border-radius: 50% !important; border: 1px solid var(--border) !important; background: var(--surface) !important; color: var(--text) !important; opacity: 1 !important; justify-content: center; }
#btnTogglePrivacy:hover { border-color: var(--primary) !important; color: var(--primary) !important; }

/* Confirmação de "Sair" (topo): no datafy é modal centralizado (desktop) / folha de baixo (celular) */
html body .lo-panel {
  top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important; margin: auto !important;
  height: fit-content; width: calc(100% - 40px) !important; max-width: 420px !important;
  border: 0 !important; border-radius: var(--radius-lg) !important;
  padding: 22px !important; background: var(--surface) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3) !important;
  opacity: 0; transform: translateY(10px) !important;
  transition: opacity .2s ease-out, transform .2s ease-out, visibility 0s linear .2s !important;
}
html body .lo-panel.show { opacity: 1; transform: none !important; transition: opacity .2s ease-out, transform .2s ease-out !important; }
.lo-panel .lo-handle { display: none !important; }
.lo-panel .lo-title { color: var(--text) !important; font-size: 17px !important; font-weight: 700; }
.lo-panel .lo-ic { background: var(--primary-soft) !important; color: var(--primary) !important; border: 0 !important; border-radius: 10px !important; }
.lo-panel .lo-btn { height: 44px; border-radius: var(--radius) !important; font-weight: 600; font-size: 14px; }
.lo-panel .lo-cancel { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
.lo-panel .lo-yes { background: var(--primary) !important; border: 0 !important; color: #fff !important; }
.lo-backdrop { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
@media (max-width: 640px) {
  html body .lo-panel {
    top: auto !important; width: 100% !important; max-width: none !important; margin: 0 !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, .28) !important;
    opacity: 1; transform: translateY(100%) !important;
    transition: transform .22s ease, visibility 0s linear .22s !important;
  }
  html body .lo-panel.show { transform: none !important; transition: transform .28s cubic-bezier(.2, .8, .2, 1) !important; }
  html body .lo-panel::before { margin: -6px auto 14px; }
}

/* Sidebar no celular: fechada fica totalmente fora da tela; aberta desliza (gaveta do datafy) */
@media (max-width: 991.98px) {
  /* gaveta do celular: fechada some inteira (sem tira na esquerda), aberta entra da esquerda */
  html:not([data-toggled="open"]) body .app-sidebar.app-sidebar {
    left: 0 !important; transform: translate3d(-100%, 0, 0) !important; visibility: hidden !important; box-shadow: none !important;
  }
  html[data-toggled="open"] body .app-sidebar.app-sidebar {
    left: 0 !important; transform: none !important; visibility: visible !important;
  }
  /* gaveta por cima de tudo (inclusive do topo), da altura da tela, com o logo dentro dela — igual ao datafy */
  html body .app-sidebar.app-sidebar {
    position: fixed !important; top: 0 !important; bottom: 0 !important; height: 100% !important; height: 100dvh !important;
    width: min(70vw, 280px) !important; z-index: 1105 !important; display: flex !important; flex-direction: column !important;
  }
  html body .app-sidebar.app-sidebar .main-sidebar-header {
    position: relative !important; top: auto !important; left: auto !important; inset: auto !important;
    width: 100% !important; flex: none; height: 64px !important; padding: 0 60px 0 18px !important;
    display: flex !important; align-items: center !important; justify-content: flex-start !important;
    border-bottom: 1px solid var(--border) !important; background: var(--surface) !important; z-index: 2;
  }
  html body .app-sidebar.app-sidebar .main-sidebar {
    margin-top: 0 !important; padding-top: 8px !important; flex: 1 1 auto; height: auto !important; min-height: 0;
    overflow-y: auto !important; overscroll-behavior: contain;
  }
  html body .app-sidebar.app-sidebar .main-menu-container { margin-top: 0 !important; padding-top: 0 !important; }
  html body #responsive-overlay { position: fixed !important; inset: 0 !important; z-index: 1104 !important; background: rgb(0 0 0 / .45) !important; }
  /* botão X redondo no canto da gaveta */
  .ecp-side-x {
    position: fixed; z-index: 1106; top: 12px; left: calc(min(70vw, 280px) - 52px);
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 0; cursor: pointer;
    opacity: 0; pointer-events: none; transform: scale(.8); transition: opacity .2s, transform .2s;
  }
  .ecp-side-x svg { width: 18px; height: 18px; }
  html[data-toggled="open"] .ecp-side-x { opacity: 1; pointer-events: auto; transform: none; }
  html body .app-sidebar.app-sidebar { transition: transform .25s cubic-bezier(.2, .8, .2, 1), visibility .25s !important; }
  html:not([data-toggled="open"]) body #responsive-overlay { display: none !important; }
}
@media (min-width: 992px) { .ecp-side-x { display: none !important; }
}

/* ── menu lateral real (sidebar.php não passa pelo conversor): textos sempre escuros ── */
html body .app-sidebar.app-sidebar :is(.side-menu__item, .side-menu__label, .side-menu__angle, a, span, i) {
  -webkit-text-fill-color: currentColor !important; text-shadow: none !important; opacity: 1;
}
html body .app-sidebar.app-sidebar .side-menu__item,
html body .app-sidebar.app-sidebar .side-menu__item :is(.side-menu__label, span:not(.badge)) { color: var(--text) !important; }
html body .app-sidebar.app-sidebar :is(.side-menu__item.active, .slide.active > .side-menu__item, .side-menu__item:hover),
html body .app-sidebar.app-sidebar :is(.side-menu__item.active, .slide.active > .side-menu__item) :is(.side-menu__label, span:not(.badge), i, svg) {
  color: var(--text) !important; background-image: none !important;
}
html body .app-sidebar.app-sidebar .slide-menu :is(a, a span:not(.badge), .side-menu__item, .side-menu__label) {
  color: var(--text-2) !important; visibility: visible !important; opacity: 1 !important;
}
html body .app-sidebar.app-sidebar .slide-menu :is(a.active, .side-menu__item.active, .slide.active > a) { color: var(--text) !important; font-weight: 600 !important; }
html body .app-sidebar.app-sidebar :is(.slide__category, .slide__category span, .category-name) { color: var(--muted) !important; }

/* ── saque rápido (dialog) e qualquer <dialog>: fundo claro, textos visíveis, sem desfoque ── */
html body #qw-dialog {
  --qw-muted: rgba(14, 16, 22, .58) !important; --default-text-color: #0E1016;
  color: var(--text) !important; background: var(--surface) !important; border: 0 !important; border-radius: var(--radius-lg) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3) !important;
}
html body #qw-dialog :is(.qw-head, .qw-destination, .qw-close, .qw-totals, .qw-total) { border-color: var(--border) !important; }
html body #qw-dialog .qw-destination { background: var(--bg) !important; }
html body #qw-dialog h2 { color: var(--text) !important; }
html body #qw-dialog[open]:not(.ecp-anim-modal) { animation: ecpModalIn .2s ease-out !important; }
html body dialog::backdrop { background: var(--overlay-bg, rgba(8, 9, 12, .55)) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
@media (max-width: 640px) {
  html body #qw-dialog[open]:not(.ecp-anim-modal) { animation: ecpSheetUp .28s cubic-bezier(.2, .8, .2, 1) !important; }
  html body #qw-dialog { width: 100% !important; max-height: 92vh !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }
}
html body #qw-dialog :is(dt, label, small, .qw-eyebrow, .qw-money-label, .qw-fine, #qw-key) { color: var(--muted) !important; }
html body #qw-dialog :is(dd, strong, #qw-name, .qw-total dt, .qw-total dd) { color: var(--text) !important; }

/* itens que foram pro menu do perfil saem do menu lateral */
html body .app-sidebar .ecp-moved { display: none !important; }

/* ── menu do perfil (umenu-float do datafy) ── */
.header-element:has(> #mainHeaderProfile) { position: relative; }
html body .app-header .header-profile-dropdown.dropdown-menu {
  position: absolute !important; inset: calc(100% + 10px) 0 auto auto !important; transform: none !important;
  width: min(300px, calc(100vw - 24px)) !important; min-width: 0 !important; margin: 0 !important;
  padding: 6px 0 !important; border-radius: 18px !important; overflow: hidden !important;
  box-shadow: 0 18px 44px -12px rgb(0 0 0 / .28) !important; list-style: none;
}
html body .app-header .header-profile-dropdown::before { display: none !important; }
html body .app-header .header-profile-dropdown.show { animation: umenuIn .14s ease-out; }
@keyframes umenuIn { from { opacity: 0; transform: translateY(-4px); } }
.header-profile-dropdown .umenu-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px 14px; border-bottom: 1px solid var(--border); }
.header-profile-dropdown .umenu-head .grow { min-width: 0; flex: 1; }
.header-profile-dropdown .umenu-head .nm { font-size: 16px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-profile-dropdown .umenu-head .em { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.header-profile-dropdown .ubal { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text) !important; text-decoration: none; font-size: 13px; }
.header-profile-dropdown .ubal-ic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; }
.header-profile-dropdown .ubal b { font-weight: 700; }
.header-profile-dropdown .umenu-list { padding: 6px 0; }
html body .app-header .header-profile-dropdown .dropdown-item {
  display: flex !important; align-items: center; gap: 12px; width: 100%; height: auto !important;
  padding: 12px 18px !important; font-size: 15px !important; font-weight: 400 !important; border-radius: 0 !important;
  color: var(--text) !important; background: none !important;
}
html body .app-header .header-profile-dropdown .dropdown-item[hidden] { display: none !important; }
html body .app-header .header-profile-dropdown .dropdown-item:hover { background: var(--hover) !important; }
.header-profile-dropdown .um-ic { width: 18px; height: 18px; flex: none; color: var(--text-2); }
.header-profile-dropdown .umenu-foot { border-top: 1px solid var(--border); }
html body .app-header .header-profile-dropdown .dropdown-item.danger, .header-profile-dropdown .danger .um-ic { color: var(--danger) !important; }
.app-header .show > #mainHeaderProfile, .app-header #mainHeaderProfile[aria-expanded="true"] { border-color: color-mix(in srgb, var(--on-header) 32%, transparent) !important; }

/* barra fixa Sacar / Conta Pix some enquanto um modal, a gaveta ou o saque estão abertos (não fica por cima do comprovante) */
#qw-tabbar { transition: transform .22s ease, opacity .22s ease !important; }
body:is(.modal-open, .txs-open, .lo-open, .ecp-modal-on) #qw-tabbar,
html[data-toggled="open"] #qw-tabbar,
body:has(dialog[open]) #qw-tabbar,
body:has(#popupOverlay.active) #qw-tabbar,
body:has(.swal2-container.swal2-backdrop-show) #qw-tabbar {
  opacity: 0 !important; pointer-events: none !important; transform: translateY(120%) !important;
}

/* ── topo igual ao datafy: 64px, botões redondos de 40px, ícones de traço 20px ── */
html body header.app-header.app-header { height: 64px !important; min-height: 64px !important; max-height: 64px; }
html body header.app-header .main-header-container { height: 64px !important; padding: 0 28px !important; display: flex !important; align-items: center !important; }
html body header.app-header .header-content-left, html body header.app-header .header-content-right { height: 64px; display: flex !important; align-items: center !important; margin: 0 !important; padding: 0 !important; }
html body header.app-header .header-content-right { gap: 10px !important; margin-left: auto !important; list-style: none; }
html body header.app-header .header-element { margin: 0 !important; padding: 0 !important; height: auto !important; }
html body header.app-header .header-link:not(.goal-progress-widget) { width: 40px !important; height: 40px !important; min-width: 40px; margin: 0 !important; line-height: 1 !important; }
html body header.app-header .hdr-ic { width: 20px !important; height: 20px !important; color: var(--on-header) !important; stroke: currentColor !important; fill: none !important; display: block; }
html body header.app-header .animated-arrow { padding: 0 !important; margin: 0 !important; position: relative; display: grid !important; place-items: center; }
html body header.app-header .animated-arrow > span { display: none !important; }
html body header.app-header .sidemenu-toggle { margin: 0 0 0 6px !important; padding: 0 !important; }
html body header.app-header .header-icon-badge { position: absolute !important; top: -3px !important; right: -3px !important; transform: none !important; }
html body header.app-header .goal-progress-widget { width: auto !important; height: 40px !important; padding: 0 6px !important; display: flex !important; align-items: center; }
html body header.app-header .goal-progress-container { width: 180px; min-width: 0; }
html body header.app-header .goal-label { display: flex !important; justify-content: space-between !important; gap: 10px; }
@media (max-width: 991.98px) {
  html body header.app-header .main-header-container { padding: 0 12px !important; }
  html body header.app-header .horizontal-logo, html body header.app-header .header-content-left > .header-element:first-child { display: none !important; }
  html body header.app-header .sidemenu-toggle { margin: 0 0 0 -4px !important; }
  html body header.app-header .goal-progress-container { width: 116px !important; }
  html body header.app-header .goal-label { font-size: 11px !important; }
}
@media (max-width: 360px) { html body header.app-header .goal-progress-widget { display: none !important; } }

/* =====================================================================
   RELATÓRIOS — campo de período/busca sem contorno interno
   (o flatpickr cria um input com .form-control e o tema pintava borda,
   fundo e foco nele; aqui só a caixa externa existe)
   ===================================================================== */
html body .rl-date-in input, html body .rl-date-in input.form-control,
html body .rl-date-in input:focus, html body .rl-date-in input.form-control:focus,
html body .rl-date-in input:hover, html body .rl-date-in input.active,
html body .rl-search input, html body .rl-search input.form-control,
html body .rl-search input:focus, html body .rl-search input.form-control:focus {
  border: 0 !important; outline: 0 !important; box-shadow: none !important;
  background: transparent !important; background-color: transparent !important;
  min-height: 0 !important; height: 100% !important; border-radius: 0 !important;
  -webkit-tap-highlight-color: transparent;
}
html body .rl-date-in input, html body .rl-date-in input.form-control { padding: 0 !important; }
html body .rl-search input, html body .rl-search input.form-control { padding-top: 0 !important; padding-bottom: 0 !important; }
html body .rl-date-in, html body .rl-date-in:focus-within,
html body .rl-search, html body .rl-search:focus-within { box-shadow: none !important; outline: 0 !important; }
html body .rl-date-in, html body .rl-date-in:focus-within { border-color: var(--border) !important; }
html body .cl-date-input, html body .cl-date-input:focus, html body .cl-date-input.active,
html body .cl-date-wrap input.form-control, html body .cl-date-wrap input.form-control:focus {
  box-shadow: none !important; outline: 0 !important; border-color: var(--border) !important;
}
/* botão de limpar: sem cor "presa" depois do toque no celular */
html body .rl-icon-btn, html body .cl-date-clear { -webkit-tap-highlight-color: transparent; outline: 0 !important; }
@media (hover: none) {
  html body .rl-icon-btn:hover, html body .cl-date-clear:hover {
    border-color: var(--border) !important; background: var(--surface) !important; color: var(--muted) !important;
  }
}

/* Sem spinner de página (igual ao datafy): o loader.svg não aparece nem no primeiro carregamento */
html body #loader { display: none !important; }

/* ── setinha apontando pro ícone (perfil e notificações) ── */
html body .app-header .header-profile-dropdown.dropdown-menu,
html body .notif-pop { overflow: visible !important; }
html body .app-header .header-profile-dropdown.dropdown-menu::before {
  content: '' !important; display: block !important; position: absolute; top: -7px; right: 13px; left: auto;
  width: 14px; height: 14px; background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg); border-radius: 3px 0 0 0; z-index: 2; pointer-events: none;
}
html body .notif-pop .notif-pop-arrow {
  display: block !important; z-index: 2; background: var(--surface) !important;
  border-left: 1px solid var(--border) !important; border-top: 1px solid var(--border) !important;
}
/* sem o overflow:hidden, os cantos arredondados ficam por conta das bordas internas */
html body .notif-pop .notif-pop-head { border-radius: 18px 18px 0 0; position: relative; z-index: 1; }
html body .notif-pop .notif-pop-all { border-radius: 0 0 18px 18px; }
html body .notif-pop .notif-pop-list { background: var(--surface); }
html body .notif-pop .notif-pop-list:last-child { border-radius: 0 0 18px 18px; }
.header-profile-dropdown .umenu-foot { border-radius: 0 0 18px 18px; overflow: hidden; }

/* campo de valor (Sacar/Transferir/Cripto): foco igual aos outros campos (borda na cor primária, sem brilho em volta) */
html body .pp-shell .pp-amount:focus-within { border-color: var(--primary) !important; box-shadow: inset 0 0 0 1px var(--primary) !important; }

/* modais do #modalConteudo: sem contorno colorido em volta (o spa.php pintava borda na cor primária) */
html body #modalConteudo .modal-content.db-themed-modal, html body .modal .modal-content.db-themed-modal { border: 0 !important; }

/* ── header igual em todas as páginas: a fonte não herda mais da página (umas usavam Inter, outras Lato) ── */
html body header.app-header, html body header.app-header :is(div, span, a, strong, b, small, p, label, button, li, time, h1, h2, h3, h4, h5, h6),
html body .header-profile-dropdown, html body .header-profile-dropdown :is(div, span, a, strong, b, small, p, button, li),
html body .notif-pop, html body .notif-pop :is(div, span, a, strong, b, small, p, time, button) {
  font-family: var(--font-panel) !important;
}
html body header.app-header .goal-label-text { font-size: 11px !important; font-weight: 700 !important; letter-spacing: .06em !important; }
html body header.app-header .goal-label-value { font-size: 11px !important; font-weight: 500 !important; letter-spacing: 0 !important; }

/* ── saque rápido: botão secundário com fundo + animação clara de envio (carteira → banco) ── */
html body #qw-dialog .qw-secondary { background: var(--bg) !important; border: 1px solid var(--border) !important; color: var(--text) !important; font-weight: 600 !important; }
html body #qw-dialog .qw-secondary:hover { border-color: var(--text) !important; }
#qw-dialog .qw-flow { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 240px; max-width: 100%; height: 120px; margin: 4px auto 18px; padding: 0 18px; border-radius: 16px; background: var(--primary-soft); }
#qw-dialog .qw-flow[hidden] { display: none; }
#qw-dialog .qw-flow-node { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); color: var(--primary); box-shadow: 0 6px 18px rgba(12, 14, 20, .08); }
#qw-dialog .qw-flow-node > svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#qw-dialog .qw-flow-to { animation: qwFlowPulse 2.2s ease-in-out infinite; }
#qw-dialog .qw-flow-track { position: relative; flex: 1; height: 2px; background-image: linear-gradient(90deg, color-mix(in srgb, var(--primary) 45%, transparent) 50%, transparent 0); background-size: 8px 2px; }
#qw-dialog .qw-flow-coin { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--on-primary); font: 700 9px/1 var(--font-panel); font-style: normal; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 40%, transparent); animation: qwFlowCoin 2.2s cubic-bezier(.5, 0, .3, 1) infinite; }
#qw-dialog .qw-flow-ok { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--success); color: #fff; opacity: 0; transform: scale(.4); animation: qwFlowOk 2.2s ease-out infinite; }
#qw-dialog .qw-flow-ok svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes qwFlowCoin { 0% { left: 0; opacity: 0; transform: scale(.6); } 12% { opacity: 1; transform: scale(1); } 70% { left: 100%; opacity: 1; transform: scale(1); } 80%, 100% { left: 100%; opacity: 0; transform: scale(.6); } }
@keyframes qwFlowOk { 0%, 70% { opacity: 0; transform: scale(.4); } 78% { opacity: 1; transform: scale(1.15); } 86%, 94% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes qwFlowPulse { 0%, 68% { transform: none; } 76% { transform: scale(1.06); } 86%, 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { #qw-dialog .qw-flow-coin { animation: none; left: 50%; } #qw-dialog .qw-flow-ok, #qw-dialog .qw-flow-to { animation: none; } }

/* ── menu lateral: rolagem nativa, do tamanho exato do menu ──
   o SimpleBar calculava uma altura falsa (até 10x o menu) e a lista sumia ao rolar, deixando um vão branco */
html body #sidebar-scroll .simplebar-placeholder { display: none !important; height: 0 !important; }
html body #sidebar-scroll .simplebar-mask, html body #sidebar-scroll .simplebar-offset { position: static !important; overflow: visible !important; inset: auto !important; }
html body #sidebar-scroll .simplebar-content-wrapper { overflow: visible !important; height: auto !important; max-height: none !important; }
html body #sidebar-scroll .simplebar-wrapper { height: auto !important; }
html body #sidebar-scroll .simplebar-track { display: none !important; }
html body #sidebar-scroll { overflow-y: auto !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* =====================================================================
   iOS (iPhone/iPad — Safari e app instalado): header grudado no topo
   - background-attachment:fixed não funciona no iOS e faz o header fixo "pular"
   - viewport-fit=cover (ligado no header.php) + área segura: o header cobre até a
     borda de cima, sem deixar conteúdo aparecendo por cima dele
   Fora do iOS nada muda (env() = 0 e o @supports só existe no Safari do iOS).
   ===================================================================== */
@supports (-webkit-touch-callout: none) {
  html body, body { background-attachment: scroll !important; }
  html body header.app-header.app-header {
    top: 0 !important;
    box-sizing: border-box !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    height: calc(64px + env(safe-area-inset-top, 0px)) !important;
    min-height: calc(64px + env(safe-area-inset-top, 0px)) !important;
    max-height: calc(64px + env(safe-area-inset-top, 0px)) !important;
  }
  @media (min-width: 992px) {
    html body .app-content { margin-block-start: calc(4.25rem + env(safe-area-inset-top, 0px)) !important; }
  }
  @media (max-width: 991.98px) {
    html body .main-content { padding-block-start: calc(4.25rem + env(safe-area-inset-top, 0px)) !important; }
    html body .app-sidebar { padding-top: env(safe-area-inset-top, 0px) !important; }
  }
}
