/* BetBrabo V3: BetFusion-inspired professional affiliate dashboard. V3 only. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{
  --bbv3-bg:#ffffff;
  --bbv3-surface:#ffffff;
  --bbv3-page:#f7f9fc;
  --bbv3-text:#0f1b2a;
  --bbv3-muted:#5c6f83;
  --bbv3-soft:#8b99a8;
  --bbv3-border:#dde5ec;
  --bbv3-border-soft:#eef2f6;
  --bbv3-green:#00a957;
  --bbv3-green-2:#2dbb78;
  --bbv3-green-soft:#eaf8f1;
  --bbv3-blue:#0879a5;
  --bbv3-blue-strong:#233fbd;
  --bbv3-orange:#c77700;
  --bbv3-red:#ff6b4a;
  --bbv3-red-soft:#ffe1d8;
  --bbv3-shadow:0 8px 24px rgba(15,23,42,.045);
  --bbv3-shadow-lg:0 16px 44px rgba(15,23,42,.075);
  --green:var(--bbv3-green) !important;
  --red:#ef4444 !important;
  --gold:var(--bbv3-green) !important;
  --primary-gold:var(--bbv3-green) !important;
  --primary:var(--bbv3-green) !important;
  --dark-bg:var(--bbv3-page) !important;
  --card-bg:var(--bbv3-surface) !important;
  --border-color:var(--bbv3-border) !important;
  --text-primary:var(--bbv3-text) !important;
  --text-secondary:var(--bbv3-muted) !important;
  --text-muted:var(--bbv3-soft) !important;
  --bg:var(--bbv3-page) !important;
  --card:var(--bbv3-surface) !important;
  --border:var(--bbv3-border) !important;
  --text:var(--bbv3-text) !important;
}
*{box-sizing:border-box}
html[data-bb-v3]{background:var(--bbv3-page) !important;color-scheme:light;}
html[data-bb-v3] body{
  margin:0 !important; min-height:100vh !important;
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif !important;
  color:var(--bbv3-text) !important;
  background:linear-gradient(180deg,#fff 0%,#f7f9fc 56%,#f3f6fa 100%) !important;
  letter-spacing:-.01em;
}
html[data-bb-v3] body::before{content:none !important;}
html[data-bb-v3] a{color:var(--bbv3-green) !important;}
html[data-bb-v3] .bb-v3-preview-banner{
  position:static !important;top:auto !important;z-index:auto !important;
  display:flex !important;justify-content:center !important;align-items:center !important;gap:10px !important;
  background:#fff !important;color:var(--bbv3-muted) !important;border:0 !important;border-bottom:1px solid var(--bbv3-border-soft) !important;
  box-shadow:none !important;padding:9px 14px !important;font:800 11px/1.2 'Inter',system-ui,sans-serif !important;
  letter-spacing:.14em !important;text-transform:uppercase !important;text-align:center !important;
}
html[data-bb-v3] .bb-v3-preview-banner::before{content:'V3';background:var(--bbv3-green-soft);color:var(--bbv3-green);border-radius:999px;padding:3px 8px;letter-spacing:.08em;}
html[data-bb-v3] #login-screen{
  min-height:calc(100vh - 38px) !important;display:grid !important;place-items:center !important;padding:32px 16px !important;
  background:linear-gradient(135deg,#f7fbff 0%,#eaf8f1 100%) !important;
}
html[data-bb-v3] #login-screen[style*="display: none"]{display:none !important;}
html[data-bb-v3] .login-box{
  width:min(440px,calc(100vw - 28px)) !important;padding:34px !important;border-radius:18px !important;text-align:left !important;
  background:#fff !important;border:1px solid var(--bbv3-border) !important;box-shadow:var(--bbv3-shadow-lg) !important;position:relative;overflow:hidden;
}
html[data-bb-v3] .login-box::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,var(--bbv3-green),var(--bbv3-blue));}
html[data-bb-v3] .login-box h1{font-size:32px !important;line-height:1.08 !important;margin:0 0 6px !important;color:var(--bbv3-text) !important;font-weight:800 !important;letter-spacing:-.9px !important;}
html[data-bb-v3] .login-box .brand-gold{color:var(--bbv3-green) !important;}
html[data-bb-v3] .subtitle, html[data-bb-v3] .login-box p{color:var(--bbv3-muted) !important;}
html[data-bb-v3] label, html[data-bb-v3] .label, html[data-bb-v3] .stat-label{
  color:var(--bbv3-muted) !important;font-size:11px !important;font-weight:800 !important;letter-spacing:.10em !important;text-transform:uppercase !important;
}
html[data-bb-v3] input, html[data-bb-v3] select, html[data-bb-v3] textarea, html[data-bb-v3] .date-input{
  background:#fff !important;color:var(--bbv3-text) !important;border:1px solid #d4dce5 !important;border-radius:8px !important;box-shadow:none !important;outline:none !important;
}
html[data-bb-v3] input::placeholder{color:var(--bbv3-soft) !important;}
html[data-bb-v3] input:focus, html[data-bb-v3] textarea:focus, html[data-bb-v3] select:focus{border-color:var(--bbv3-green) !important;box-shadow:0 0 0 4px rgba(0,169,87,.10) !important;}
html[data-bb-v3] button, html[data-bb-v3] .btn, html[data-bb-v3] .btn-sm, html[data-bb-v3] .btn-gold, html[data-bb-v3] .btn-apply, html[data-bb-v3] .btn-copy{
  border:1px solid var(--bbv3-green) !important;border-radius:8px !important;background:var(--bbv3-green) !important;color:#fff !important;
  box-shadow:none !important;font-weight:800 !important;transition:transform .15s ease,filter .15s ease,background .15s ease !important;
}
html[data-bb-v3] button:hover, html[data-bb-v3] .btn:hover{transform:translateY(-1px);filter:brightness(.98);}
html[data-bb-v3] .btn-logout, html[data-bb-v3] .close-btn, html[data-bb-v3] .postback-filter, html[data-bb-v3] .player-filter, html[data-bb-v3] .player-period-filter{
  background:#fff !important;color:var(--bbv3-muted) !important;border:1px solid var(--bbv3-border) !important;box-shadow:none !important;
}
html[data-bb-v3] .postback-filter.active, html[data-bb-v3] .player-filter.active, html[data-bb-v3] .player-period-filter.active, html[data-bb-v3] .portal-nav-item.active{
  background:var(--bbv3-green-soft) !important;color:var(--bbv3-green) !important;border-color:rgba(0,169,87,.20) !important;
}
html[data-bb-v3] #dashboard, html[data-bb-v3] .container{max-width:1440px !important;margin:0 auto !important;padding:0 24px 42px !important;}
html[data-bb-v3="painel"] #dashboard, html[data-bb-v3="painel"] .container{max-width:none !important;width:100% !important;margin:0 !important;padding:0 24px 42px !important;}
html[data-bb-v3] .header{
  position:static !important;margin:18px 0 22px !important;padding:20px 24px !important;border-radius:0 !important;background:#fff !important;
  border:0 !important;border-bottom:1px solid var(--bbv3-border-soft) !important;box-shadow:none !important;color:var(--bbv3-text) !important;
}
html[data-bb-v3] .header h1, html[data-bb-v3] header h1, html[data-bb-v3] .header-brand{
  color:var(--bbv3-text) !important;font-size:30px !important;font-weight:800 !important;letter-spacing:-.9px !important;
}
html[data-bb-v3] .header-welcome, html[data-bb-v3] .muted, html[data-bb-v3] .sub, html[data-bb-v3] .stat-sub{color:var(--bbv3-muted) !important;}
html[data-bb-v3] .badge, html[data-bb-v3] .admin-badge{background:#f8fafc !important;border:1px solid var(--bbv3-border) !important;color:var(--bbv3-muted) !important;border-radius:999px !important;}
html[data-bb-v3] .badge-gold, html[data-bb-v3] .active{background:var(--bbv3-green-soft) !important;color:var(--bbv3-green) !important;border-color:rgba(0,169,87,.22) !important;}
html[data-bb-v3] .portal-layout{max-width:1440px;margin:22px auto 0;padding:0 24px 42px;display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;align-items:start;}
html[data-bb-v3="portal"] #dashboard{max-width:none !important;width:100% !important;margin:0 !important;padding:0 16px 42px !important;}
html[data-bb-v3="portal"] .portal-layout{max-width:none !important;width:100% !important;margin:22px 0 0 !important;padding:0 !important;grid-template-columns:220px minmax(0,1fr);gap:16px;}
html[data-bb-v3="painel"] .painel-layout{max-width:none;width:100%;margin:22px 0 0;padding:0 24px 42px;grid-template-columns:280px minmax(0,1fr);}
html[data-bb-v3] .portal-sidebar{
  position:sticky;top:22px;display:grid;gap:6px;background:#fff !important;border:1px solid var(--bbv3-border-soft) !important;border-radius:0 !important;
  padding:18px 14px !important;box-shadow:none !important;min-height:calc(100vh - 62px);
}
html[data-bb-v3] .portal-sidebar-title{color:var(--bbv3-soft) !important;font-size:11px !important;font-weight:900 !important;letter-spacing:.14em !important;text-transform:uppercase !important;padding:14px 12px 7px !important;}
html[data-bb-v3] .portal-nav-item{width:100%;display:grid !important;grid-template-columns:30px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;text-align:left;border:1px solid transparent !important;background:transparent !important;color:var(--bbv3-muted) !important;box-shadow:none !important;padding:12px 12px !important;border-radius:8px !important;}
html[data-bb-v3] .portal-nav-item span{grid-row:1/3;font-size:18px;color:inherit;}
html[data-bb-v3] .portal-nav-item strong{font-size:14px;color:inherit;font-weight:700;}
html[data-bb-v3] .portal-nav-item small{font-size:11px;color:var(--bbv3-soft);}
html[data-bb-v3] .portal-nav-item.portal-manager-button{margin-top:8px;border-color:rgba(37,211,102,.42)!important;background:rgba(37,211,102,.10)!important;color:#167c3a!important;}
html[data-bb-v3] .portal-nav-item.portal-manager-button small{color:#398b58;}
html[data-bb-v3] .portal-nav-item.portal-manager-button:hover{border-color:#25d366!important;background:rgba(37,211,102,.18)!important;}
html[data-bb-v3] .portal-workspace, html[data-bb-v3] .painel-workspace{min-width:0;display:block;}
html[data-bb-v3] .portal-area, html[data-bb-v3] .painel-area{display:none;min-width:0;}
html[data-bb-v3] .portal-area.active, html[data-bb-v3] .painel-area.active{display:block;}
html[data-bb-v3] .area-heading{
  display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:0 0 20px;padding:22px 24px;border:1px solid var(--bbv3-border) !important;border-radius:16px !important;background:#fff !important;box-shadow:var(--bbv3-shadow) !important;
}
html[data-bb-v3] .area-heading .eyebrow, html[data-bb-v3] .painel-header .eyebrow{display:block;color:var(--bbv3-green) !important;font-size:11px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;margin-bottom:5px;}
html[data-bb-v3] .area-heading h2{margin:0;color:var(--bbv3-text) !important;font-size:24px;font-weight:800;letter-spacing:-.7px;}
html[data-bb-v3] .area-heading p, html[data-bb-v3] .portal-area-lead{margin:4px 0 0;color:var(--bbv3-muted) !important;font-size:13px;}
html[data-bb-v3] .stats-grid, html[data-bb-v3] .quick-grid{display:grid !important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr)) !important;gap:18px !important;}
html[data-bb-v3] .stat-card, html[data-bb-v3] .card, html[data-bb-v3] .section, html[data-bb-v3] .recent-activity, html[data-bb-v3] .postbacks-section, html[data-bb-v3] .modal, html[data-bb-v3] .header-top-strip, html[data-bb-v3] .referral-section{
  background:#fff !important;border:1px solid var(--bbv3-border) !important;border-radius:16px !important;box-shadow:var(--bbv3-shadow) !important;color:var(--bbv3-text) !important;
}
html[data-bb-v3] .stat-card{min-height:150px !important;padding:22px !important;position:relative;overflow:hidden;}
html[data-bb-v3] .stat-card::after{content:"";position:absolute;right:22px;bottom:20px;width:56px;height:42px;background:linear-gradient(90deg,transparent 0 9%,var(--bbv3-green-2) 9% 20%,transparent 20% 29%,var(--bbv3-green-2) 29% 42%,transparent 42% 51%,var(--bbv3-green-2) 51% 66%,transparent 66% 75%,var(--bbv3-green-2) 75% 92%,transparent 92%);opacity:.8;border-radius:4px;}
html[data-bb-v3] .stat-value, html[data-bb-v3] .value{color:var(--bbv3-text) !important;font-size:30px !important;font-weight:800 !important;letter-spacing:-1px !important;line-height:1.08 !important;}
html[data-bb-v3] table, html[data-bb-v3] .table, html[data-bb-v3] .postbacks-table{background:#fff !important;border:1px solid var(--bbv3-border) !important;border-radius:16px !important;overflow:hidden !important;border-collapse:separate !important;border-spacing:0 !important;box-shadow:var(--bbv3-shadow) !important;}
html[data-bb-v3] th{background:#f8fafc !important;color:var(--bbv3-muted) !important;font-size:11px !important;text-transform:uppercase !important;letter-spacing:.08em !important;font-weight:800 !important;border-color:var(--bbv3-border-soft) !important;}
html[data-bb-v3] td{border-color:var(--bbv3-border-soft) !important;color:var(--bbv3-text) !important;background:#fff !important;}
html[data-bb-v3] tr:hover td{background:#fbfdff !important;}
html[data-bb-v3] .money-positive{color:var(--bbv3-green) !important;}
html[data-bb-v3] .money-negative{color:#ef4444 !important;}
html[data-bb-v3] .money-neutral{color:var(--bbv3-muted) !important;}
html[data-bb-v3] .telegram-channel-bar{background:#61ace2 !important;color:#fff !important;border-radius:12px !important;box-shadow:var(--bbv3-shadow) !important;}
html[data-bb-v3] code, html[data-bb-v3] .top-url, html[data-bb-v3] .referral-url{background:#f8fafc !important;border:1px solid var(--bbv3-border) !important;color:var(--bbv3-text) !important;border-radius:8px !important;}
html[data-bb-v3] .footer{color:var(--bbv3-muted) !important;border-top:1px solid var(--bbv3-border-soft) !important;margin-top:28px !important;}
@media (max-width:900px){
  html[data-bb-v3] .portal-layout, html[data-bb-v3="painel"] .painel-layout{grid-template-columns:1fr;padding:0 12px 32px;}
  html[data-bb-v3] .portal-sidebar{position:static;min-height:0;display:flex;overflow-x:auto;border-radius:16px !important;}
  html[data-bb-v3] .portal-sidebar-title{display:none;}
  html[data-bb-v3] .portal-nav-item{min-width:160px;}
  html[data-bb-v3] #dashboard, html[data-bb-v3] .container{padding:0 12px 32px !important;}
  html[data-bb-v3] .area-heading{display:block;padding:18px;}
}


html[data-bb-v3] .v3-module-card{background:#fff;border:1px solid var(--bbv3-border-soft);border-radius:16px;padding:18px;box-shadow:var(--bbv3-shadow);margin:14px 0 18px;}
html[data-bb-v3] .v3-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;}
html[data-bb-v3] .v3-card-head h3{margin:0;color:var(--bbv3-text);font-size:16px;}
html[data-bb-v3] .v3-muted{color:var(--bbv3-muted);font-size:12px;}
html[data-bb-v3] .v3-formula-grid,html[data-bb-v3] .v3-finance-summary,html[data-bb-v3] .v3-comparison-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;}
html[data-bb-v3] .v3-formula-grid>div,html[data-bb-v3] .v3-finance-summary>div,html[data-bb-v3] .v3-comparison-card{border:1px solid var(--bbv3-border-soft);border-radius:14px;padding:14px;background:#f8fbfd;}
html[data-bb-v3] .v3-formula-grid span,html[data-bb-v3] .v3-finance-summary span,html[data-bb-v3] .v3-comparison-card span{display:block;color:var(--bbv3-muted);font-size:12px;margin-bottom:6px;}
html[data-bb-v3] .v3-formula-grid strong,html[data-bb-v3] .v3-finance-summary strong,html[data-bb-v3] .v3-comparison-card strong{font-size:20px;color:var(--bbv3-text);}
html[data-bb-v3] .v3-formula-result{border-color:rgba(0,169,87,.35)!important;background:var(--bbv3-green-soft)!important;}
html[data-bb-v3] .v3-metric-table{width:100%;border-collapse:collapse;font-size:13px;}
html[data-bb-v3] .v3-metric-table th{background:#f4f8fb;color:var(--bbv3-muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;text-align:left;padding:10px;border-bottom:1px solid var(--bbv3-border);white-space:nowrap;}
html[data-bb-v3] .v3-metric-table td{padding:11px 10px;border-bottom:1px solid var(--bbv3-border-soft);color:var(--bbv3-text);white-space:nowrap;}
html[data-bb-v3] .v3-chart{display:flex;gap:10px;align-items:flex-end;overflow-x:auto;min-height:210px;padding:12px 4px;}
html[data-bb-v3] .v3-chart-day{min-width:92px;text-align:center;color:var(--bbv3-muted);font-size:11px;}
html[data-bb-v3] .v3-chart-bars{height:128px;display:flex;align-items:flex-end;justify-content:center;margin-bottom:8px;}
html[data-bb-v3] .v3-chart-bars span{display:block;width:22px;border-radius:8px 8px 2px 2px;background:var(--bbv3-green);}
html[data-bb-v3] .v3-chart-bars .bar-negative{background:var(--red,#ef4444);}
html[data-bb-v3] .v3-chart-day strong{display:block;color:var(--bbv3-text);font-size:12px;}
html[data-bb-v3] .v3-chart-day em{display:block;font-style:normal;font-size:10px;line-height:1.3;}
html[data-bb-v3] .v3-agreement-item,html[data-bb-v3] .v3-inbox-item{border:1px solid var(--bbv3-border-soft);border-radius:14px;padding:14px;margin:10px 0;background:#f8fbfd;}
html[data-bb-v3] .v3-agreement-item span,html[data-bb-v3] .v3-inbox-item small{display:block;color:var(--bbv3-muted);font-size:12px;}
html[data-bb-v3] .v3-agreement-item strong,html[data-bb-v3] .v3-inbox-item strong{display:block;color:var(--bbv3-text);font-size:16px;margin:3px 0;}
html[data-bb-v3] .v3-inbox-item.success{border-left:4px solid var(--bbv3-green);} html[data-bb-v3] .v3-inbox-item.warning{border-left:4px solid var(--bbv3-orange);} html[data-bb-v3] .v3-inbox-item.info{border-left:4px solid var(--bbv3-blue);}
html[data-bb-v3] .v3-empty{padding:18px;color:var(--bbv3-muted);text-align:center;}


/* V3 mobile hamburger/off-canvas menu inspired by BetFusion */
html[data-bb-v3] .v3-mobile-menu-toggle{display:none;align-items:center;gap:10px;margin:12px 12px 0;padding:11px 14px;border:1px solid var(--bbv3-border-soft);border-radius:14px;background:#fff;color:var(--bbv3-text);font-weight:800;box-shadow:var(--bbv3-shadow);}
html[data-bb-v3] .v3-hamburger-lines{display:grid;gap:4px;width:18px;}
html[data-bb-v3] .v3-hamburger-lines i{display:block;height:2px;border-radius:99px;background:var(--bbv3-text);}
html[data-bb-v3] .v3-mobile-menu-backdrop{display:none;position:fixed;inset:0;background:rgba(15,27,42,.58);z-index:998;backdrop-filter:blur(1px);}
html[data-bb-v3].v3-mobile-menu-open .v3-mobile-menu-backdrop{display:block;}
html[data-bb-v3].v3-mobile-menu-open body{overflow:hidden;}
@media (max-width:900px){
  html[data-bb-v3] .v3-mobile-menu-toggle{display:inline-flex;position:sticky;top:10px;z-index:997;}
  html[data-bb-v3] .portal-layout, html[data-bb-v3="painel"] .painel-layout{grid-template-columns:1fr!important;padding:0 12px 32px!important;margin-top:10px!important;}
  html[data-bb-v3] .portal-sidebar{position:fixed!important;top:0!important;left:0!important;bottom:0!important;width:min(82vw,340px)!important;max-width:340px!important;min-height:100vh!important;overflow-y:auto!important;overflow-x:hidden!important;display:grid!important;align-content:start!important;border-radius:0!important;border:0!important;border-right:1px solid var(--bbv3-border-soft)!important;padding:24px 14px 96px!important;box-shadow:18px 0 40px rgba(15,23,42,.18)!important;z-index:999!important;transform:translateX(-105%)!important;transition:transform .22s ease!important;}
  html[data-bb-v3].v3-mobile-menu-open .portal-sidebar{transform:translateX(0)!important;}
  html[data-bb-v3] .portal-sidebar-title{display:block!important;padding:4px 12px 18px!important;}
  html[data-bb-v3] .portal-nav-item{min-width:0!important;width:100%!important;}
}


/* V3 portal mobile fixed top bar: hamburger first, BetBrabo + affiliate greeting + current tab */
html[data-bb-v3] .v3-mobile-topbar{display:none;}
@media (max-width:900px){
  html[data-bb-v3] body{padding-top:0!important;}
  html[data-bb-v3] .telegram-channel-bar{display:none!important;}
  html[data-bb-v3] .v3-mobile-topbar{display:flex;position:sticky;top:0;z-index:997;align-items:center;gap:12px;width:100%;padding:10px 12px;background:#fff;border-bottom:1px solid var(--bbv3-border-soft);box-shadow:0 8px 24px rgba(15,23,42,.08);}
  html[data-bb-v3] .v3-mobile-topbar .v3-mobile-menu-toggle{display:inline-flex;position:static!important;margin:0!important;width:48px;height:48px;padding:5px 0 4px!important;align-items:center;justify-content:center;flex-direction:column;gap:2px;border-radius:12px;flex:0 0 auto;}
  html[data-bb-v3] .v3-mobile-topbar .v3-mobile-menu-toggle .v3-hamburger-lines{width:18px;gap:3px;}
  html[data-bb-v3] .v3-mobile-topbar .v3-mobile-menu-label{display:block;font-size:10px;line-height:1;font-weight:900;letter-spacing:.01em;color:var(--bbv3-text);}
  html[data-bb-v3] .v3-mobile-topbar-title{min-width:0;display:grid;line-height:1.15;flex:1 1 auto;}
  html[data-bb-v3] .v3-mobile-current-area{margin-left:auto;font-size:18px;font-weight:900;color:var(--bbv3-text);white-space:nowrap;text-align:right;}
  html[data-bb-v3] .v3-mobile-topbar-title strong{font-size:16px;color:var(--bbv3-text);font-weight:900;letter-spacing:-.02em;}
  html[data-bb-v3] .v3-mobile-topbar-title span{font-size:12px;color:var(--bbv3-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100vw - 80px);}
  html[data-bb-v3] #dashboard>.header{margin-top:10px!important;}
  html[data-bb-v3] #dashboard>.v3-mobile-menu-toggle{display:none!important;}
}

html[data-bb-v3] .v3-today-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px;margin-bottom:20px;}
html[data-bb-v3] .v3-today-card.highlight{border-color:rgba(0,169,87,.35)!important;background:linear-gradient(180deg,#fff 0%,var(--bbv3-green-soft) 100%)!important;}
@media (max-width:900px){html[data-bb-v3] .v3-today-grid{grid-template-columns:1fr 1fr;gap:10px;}html[data-bb-v3] .v3-today-card{min-height:118px!important;padding:16px!important;}html[data-bb-v3] .v3-today-card .value{font-size:22px!important;}}
@media (max-width:420px){html[data-bb-v3] .v3-today-grid{grid-template-columns:1fr;}}


/* V3 Hoje cleanup: no decorative bars, no duplicate mobile filter/header */
html[data-bb-v3] .stat-card::after{display:none!important;content:none!important;}
html[data-bb-v3] .v3-today-card .sub{display:none!important;}
@media (max-width:900px){html[data-bb-v3] #dashboard>.header{display:none!important;} html[data-bb-v3] .v3-mobile-topbar{margin-bottom:12px;}}

html[data-bb-v3] .v3-withdraw-button{display:inline-flex;align-items:center;justify-content:center;margin-top:14px;padding:10px 14px;border-radius:10px;background:var(--bbv3-green);color:#fff!important;text-decoration:none;font-weight:800;font-size:13px;box-shadow:0 8px 18px rgba(0,169,87,.18);}
html[data-bb-v3] .v3-withdraw-button:hover{filter:brightness(.96);}


/* V3 overview period filters and compact mobile cards */
html[data-bb-v3] .v3-period-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px;}
html[data-bb-v3] .v3-period-filter{border:1px solid var(--bbv3-border);background:#fff;color:var(--bbv3-muted);border-radius:999px;padding:9px 14px;font-size:13px;font-weight:800;cursor:pointer;}
html[data-bb-v3] .v3-period-filter.active{background:var(--bbv3-green-soft);border-color:rgba(0,169,87,.26);color:var(--bbv3-green);}
@media (max-width:900px){
  html[data-bb-v3] #area-overview .stats-grid, html[data-bb-v3] #area-overview .quick-grid{grid-template-columns:1fr 1fr!important;gap:10px!important;}
  html[data-bb-v3] #area-overview .stat-card{min-height:118px!important;padding:16px!important;}
  html[data-bb-v3] #area-overview .stat-card .value, html[data-bb-v3] #area-overview .stat-card .stat-value{font-size:22px!important;}
  html[data-bb-v3] .v3-period-filters{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
  html[data-bb-v3] .v3-period-filter{padding:9px 6px;font-size:12px;}
}
@media (max-width:420px){html[data-bb-v3] #area-overview .stats-grid, html[data-bb-v3] #area-overview .quick-grid{grid-template-columns:1fr 1fr!important;}}


/* V3 cleanup: remove legacy blue Telegram/loading backgrounds and custom date filter */
html[data-bb-v3] .loading-overlay{background:#fff!important;color:var(--bbv3-muted)!important;}
html[data-bb-v3] .telegram-channel-bar{display:none!important;background:#fff!important;}
html[data-bb-v3] .v3-custom-period-filter{display:grid;grid-template-columns:repeat(2,minmax(0,180px)) auto;gap:10px;align-items:end;margin:0 0 18px;}
html[data-bb-v3] .v3-custom-period-filter label{display:grid;gap:5px;color:var(--bbv3-muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;}
html[data-bb-v3] .v3-custom-period-filter input{height:40px;border:1px solid var(--bbv3-border);border-radius:10px;background:#fff;color:var(--bbv3-text);padding:0 10px;font-weight:700;}
html[data-bb-v3] .v3-period-apply{height:40px;border:1px solid var(--bbv3-green);border-radius:10px;background:var(--bbv3-green);color:#fff;font-weight:900;padding:0 14px;}
@media (max-width:900px){html[data-bb-v3] .v3-custom-period-filter{grid-template-columns:1fr 1fr;}.v3-custom-period-filter .v3-period-apply,html[data-bb-v3] .v3-period-apply{grid-column:1/-1;width:100%;}}


/* BetFusion/Data Studio-style daily performance table */
html[data-bb-v3] .daily-performance-shell {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  color: #111827;
}

html[data-bb-v3] .daily-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html[data-bb-v3] .daily-betfusion-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
  color: #111827;
  background: #fff;
}

html[data-bb-v3] .daily-betfusion-table th {
  text-align: right;
  color: #4b5563;
  font-weight: 800;
  padding: 12px 10px;
  border-bottom: 1px solid #d1d5db;
  background: #fff;
  white-space: nowrap;
}

html[data-bb-v3] .daily-betfusion-table th:first-child,
html[data-bb-v3] .daily-date-cell {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

html[data-bb-v3] .daily-betfusion-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

html[data-bb-v3] .daily-total-row td {
  border-bottom: 2px solid #d1d5db;
  font-weight: 900;
  background: #fafafa;
}

html[data-bb-v3] .daily-total-row .daily-date-cell {
  background: #fafafa;
}

html[data-bb-v3] .daily-metric-cell {
  position: relative;
  min-width: 108px;
  text-align: right;
  overflow: hidden;
}

html[data-bb-v3] .daily-metric-cell strong {
  position: relative;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}

html[data-bb-v3] .daily-metric-bar {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  border-radius: 4px;
  background: rgba(236, 72, 153, 0.18);
  z-index: 1;
}

html[data-bb-v3] .daily-metric-cell.money-cell .daily-metric-bar {
  background: rgba(59, 130, 246, 0.14);
}

html[data-bb-v3] .daily-direct-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

html[data-bb-v3] .daily-direct-table th {
  padding-left: 6px;
  padding-right: 6px;
  white-space: normal;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

html[data-bb-v3] .daily-direct-table td {
  padding-left: 6px;
  padding-right: 6px;
}

html[data-bb-v3] .daily-direct-table .daily-metric-cell,
html[data-bb-v3] .daily-direct-table .daily-spend-cell {
  min-width: 0;
}

html[data-bb-v3] .daily-direct-table th:first-child { width: 78px; }
html[data-bb-v3] .daily-direct-table th:nth-child(2) { width: 116px; }

html[data-bb-v3] .daily-spend-cell {
  min-width: 132px;
  text-align: right;
}

html[data-bb-v3] .daily-spend-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #64748b;
  font-weight: 800;
}

html[data-bb-v3] .daily-spend-input {
  width: 76px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  text-align: right;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

html[data-bb-v3] .daily-spend-input:focus {
  color: #047857;
}

html[data-bb-v3] .daily-spend-input-wrap:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

html[data-bb-v3] .daily-spend-input.is-saving {
  opacity: .55;
}

html[data-bb-v3] .daily-spend-input.is-error {
  color: #b91c1c;
}

html[data-bb-v3] .daily-spend-status {
  display: block;
  min-height: 12px;
  margin-top: 2px;
  color: #64748b;
  font-size: 9px;
}

html[data-bb-v3] .daily-metric-cell.cost-cell .daily-metric-bar {
  background: rgba(245, 158, 11, 0.16);
}

html[data-bb-v3] .daily-metric-cell.profit-cell strong {
  color: #047857;
}

html[data-bb-v3] .daily-metric-cell.profit-cell .daily-metric-bar {
  background: rgba(16, 185, 129, 0.18);
}

html[data-bb-v3] .daily-metric-cell.loss-cell strong {
  color: #b91c1c;
}

html[data-bb-v3] .daily-metric-cell.loss-cell .daily-metric-bar {
  background: rgba(239, 68, 68, 0.16);
}

@media (max-width: 720px) {
  html[data-bb-v3] .daily-performance-shell {
    margin-left: -0.2rem;
    margin-right: -0.2rem;
  }
  html[data-bb-v3] .daily-betfusion-table {
    min-width: 880px;
    font-size: 11px;
  }
  html[data-bb-v3] .daily-betfusion-table th,
  html[data-bb-v3] .daily-betfusion-table td {
    padding: 8px 8px;
  }
}


/* V3 admin mobile: metrics first, no title/filter wall above the fold */
@media (max-width:900px){
  html[data-bb-v3="painel"] .bb-v3-preview-banner{display:none!important;}
  html[data-bb-v3="painel"] .v3-mobile-menu-toggle{display:flex!important;position:sticky!important;top:0!important;z-index:997!important;width:100%!important;margin:0!important;border-radius:0!important;border-width:0 0 1px 0!important;padding:10px 12px!important;background:#fff!important;box-shadow:0 8px 24px rgba(15,23,42,.08)!important;}
  html[data-bb-v3="painel"] .v3-mobile-menu-toggle span:last-child{font-size:14px!important;font-weight:900!important;}
  html[data-bb-v3="painel"] .painel-layout{margin-top:8px!important;padding:0 10px 28px!important;}
  html[data-bb-v3="painel"] .painel-workspace{display:block!important;}
  html[data-bb-v3="painel"] .painel-header{display:none!important;}
  html[data-bb-v3="painel"] #painel-area-overview.active{display:flex;flex-direction:column;}
  html[data-bb-v3="painel"] #painel-area-overview .area-heading{display:none!important;}
  html[data-bb-v3="painel"] #statsGrid{order:1;grid-template-columns:1fr 1fr!important;gap:10px!important;margin:0 0 10px!important;}
  html[data-bb-v3="painel"] .painel-control-section{order:2;margin:0 0 10px!important;padding:10px!important;border-radius:12px!important;box-shadow:none!important;}
  html[data-bb-v3="painel"] .painel-control-section .controls{display:block!important;}
  html[data-bb-v3="painel"] .painel-control-section .date-picker{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:8px!important;align-items:center!important;}
  html[data-bb-v3="painel"] .painel-control-section .date-picker label,
  html[data-bb-v3="painel"] .painel-control-section .date-picker input{display:none!important;}
  html[data-bb-v3="painel"] .painel-control-section .date-picker .btn{width:100%!important;min-height:36px!important;padding:8px 6px!important;font-size:11px!important;border-radius:9px!important;white-space:normal!important;}
  html[data-bb-v3="painel"] .painel-control-section .toggle-container{display:none!important;}
  html[data-bb-v3="painel"] .stat-card{min-height:92px!important;padding:13px!important;border-radius:12px!important;}
  html[data-bb-v3="painel"] .stat-card .stat-label{font-size:10px!important;letter-spacing:.05em!important;line-height:1.1!important;}
  html[data-bb-v3="painel"] .stat-card .stat-value,
  html[data-bb-v3="painel"] .stat-card .value{font-size:20px!important;line-height:1.08!important;}
  html[data-bb-v3="painel"] .stat-card .stat-sub{display:none!important;}
  html[data-bb-v3="painel"] #loadingIndicator{order:0;margin:8px!important;font-size:12px!important;}
}
@media (max-width:900px){
  html[data-bb-v3="painel"] #statsGrid{order:1;}
  html[data-bb-v3="painel"] .painel-control-section{order:2;}
}

html[data-bb-v3] .players-period-filters{margin:0;}
html[data-bb-v3] .players-custom-period-filter{margin:0;}
html[data-bb-v3] .player-toolbar{display:grid;gap:12px;margin:0 0 14px;}
html[data-bb-v3] .player-filter-group{display:flex;gap:8px;flex-wrap:wrap;}

html[data-bb-v3] .players-period-toggle{justify-self:start;border:1px solid var(--bbv3-border)!important;background:#fff!important;color:var(--bbv3-green)!important;border-radius:999px!important;padding:9px 14px!important;font-size:13px!important;font-weight:900!important;}
html[data-bb-v3] .players-custom-period-filter[hidden]{display:none!important;}
@media (max-width:900px){html[data-bb-v3] #area-jogadores .card{padding-top:14px!important;} html[data-bb-v3] .players-period-toggle{width:100%;}}


/* Coupon dashboard mobile hardening: prevent page-level horizontal overflow and render dense tables as cards. */
html[data-bb-v3="painel"] #painel-area-cupons,
html[data-bb-v3="painel"] #couponDashboard,
html[data-bb-v3="painel"] #couponDashboard * {
  max-width: 100%;
}
html[data-bb-v3="painel"] #couponDashboard code,
html[data-bb-v3="painel"] #couponDashboard select,
html[data-bb-v3="painel"] #couponDashboard button,
html[data-bb-v3="painel"] #couponDashboard td,
html[data-bb-v3="painel"] #couponDashboard div {
  overflow-wrap: anywhere;
}
@media (max-width:900px){
  html[data-bb-v3="painel"],
  html[data-bb-v3="painel"] body {
    width:100% !important;
    max-width:100vw !important;
    overflow-x:hidden !important;
  }
  html[data-bb-v3="painel"] .painel-layout {
    width:100% !important;
    max-width:100vw !important;
    overflow-x:hidden !important;
  }
  html[data-bb-v3="painel"] #painel-area-cupons .area-heading {
    margin-bottom:10px !important;
    padding:14px !important;
    border-radius:14px !important;
  }
  html[data-bb-v3="painel"] #painel-area-cupons .area-heading h2 {
    font-size:20px !important;
  }
  html[data-bb-v3="painel"] #couponDashboard {
    padding:12px !important;
    border-radius:14px !important;
    margin-bottom:14px !important;
    overflow:hidden !important;
  }
  html[data-bb-v3="painel"] #couponDashboard > h2 {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:4px !important;
    font-size:18px !important;
    margin-bottom:12px !important;
  }
  html[data-bb-v3="painel"] #couponStatus {
    font-size:11px !important;
    line-height:1.35 !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-panel-grid {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:12px !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-kpis {
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    margin-bottom:10px !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-kpi {
    padding:10px !important;
    border-radius:10px !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-kpi .stat-label {
    font-size:9px !important;
    line-height:1.15 !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-kpi .stat-value {
    font-size:19px !important;
    line-height:1.1 !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-kpi .stat-sub {
    display:block !important;
    font-size:10px !important;
    line-height:1.25 !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-table-wrap {
    width:100% !important;
    max-width:100% !important;
    overflow-x:visible !important;
    overflow-y:visible !important;
    max-height:none !important;
    border:0 !important;
    border-radius:0 !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table {
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    border:0 !important;
    box-shadow:none !important;
    background:transparent !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table thead {
    display:none !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table tbody,
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table tr,
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table td {
    display:block !important;
    width:100% !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table tr {
    margin:0 0 10px !important;
    border:1px solid var(--bbv3-border) !important;
    border-radius:12px !important;
    overflow:hidden !important;
    background:#fff !important;
    box-shadow:0 6px 18px rgba(15,23,42,.045) !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table td {
    display:grid !important;
    grid-template-columns:92px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:start !important;
    padding:9px 10px !important;
    border-bottom:1px solid var(--bbv3-border-soft) !important;
    white-space:normal !important;
    font-size:12px !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table td:last-child {
    border-bottom:0 !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table td::before {
    color:var(--bbv3-muted) !important;
    font-size:10px !important;
    line-height:1.25 !important;
    font-weight:900 !important;
    letter-spacing:.08em !important;
    text-transform:uppercase !important;
  }
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(1)::before{content:'Cupom';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(2)::before{content:'Afiliado';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(3)::before{content:'Link';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(4)::before{content:'Tentativas';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(5)::before{content:'Sucesso';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(6)::before{content:'Jogadores';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(7)::before{content:'Dep. 5h';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(8)::before{content:'GGR';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(9)::before{content:'Falhas';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(10)::before{content:'Reward';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(1)::before{content:'Recebido';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(2)::before{content:'Evento';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(3)::before{content:'Cupom';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(4)::before{content:'Jogador';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(5)::before{content:'Afiliado';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(6)::before{content:'Valor';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(7)::before{content:'Status';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(8)::before{content:'Provider';}
  html[data-bb-v3="painel"] #couponDashboard .coupon-event-table td:nth-child(9)::before{content:'IDs';}
  html[data-bb-v3="painel"] #couponDashboard select {
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    font-size:12px !important;
  }
  html[data-bb-v3="painel"] #couponDashboard button {
    max-width:100% !important;
    white-space:normal !important;
  }
  html[data-bb-v3="painel"] #couponDashboard code {
    white-space:normal !important;
    word-break:break-word !important;
  }
}
@media (max-width:380px){
  html[data-bb-v3="painel"] #couponDashboard .coupon-kpis{grid-template-columns:1fr !important;}
  html[data-bb-v3="painel"] #couponDashboard .coupon-mobile-table td{grid-template-columns:78px minmax(0,1fr) !important;}
}

/* Coupon mobile polish: URL text should not create ugly multi-line chunks under the copy button. */
@media (max-width:900px){
  html[data-bb-v3="painel"] #couponDashboard .coupon-code-table td:nth-child(3) div {
    display:block !important;
    max-width:100% !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    overflow-wrap:normal !important;
  }
}


/* V3 /painel Afiliados: compact mobile-first period filters. */
html[data-bb-v3="painel"] .affiliate-filter-compact{padding:14px!important;}
html[data-bb-v3="painel"] .affiliate-quick-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
html[data-bb-v3="painel"] .affiliate-period-btn{border:1px solid var(--bbv3-border)!important;background:#fff!important;color:var(--bbv3-muted)!important;border-radius:999px!important;padding:11px 16px!important;font-size:14px!important;font-weight:900!important;cursor:pointer;}
html[data-bb-v3="painel"] .affiliate-period-btn.active{background:var(--bbv3-green-soft)!important;color:var(--bbv3-green)!important;border-color:rgba(0,169,87,.28)!important;}
html[data-bb-v3="painel"] .affiliate-period-btn.custom{margin-left:auto;}
html[data-bb-v3="painel"] .affiliate-custom-period{margin-top:12px;padding:12px;border:1px solid var(--bbv3-border-soft);border-radius:12px;background:#f8fbfd;}
html[data-bb-v3="painel"] .affiliate-custom-period[hidden]{display:none!important;}
html[data-bb-v3="painel"] .affiliate-custom-date-picker{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr) auto;gap:8px!important;align-items:center!important;}
@media (max-width:900px){
  html[data-bb-v3="painel"] .affiliate-filter-compact{padding:10px!important;margin-bottom:10px!important;border-radius:12px!important;box-shadow:none!important;}
  html[data-bb-v3="painel"] .affiliate-quick-filters{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px!important;}
  html[data-bb-v3="painel"] .affiliate-period-btn{width:100%!important;min-height:42px!important;padding:9px 6px!important;font-size:12px!important;border-radius:11px!important;line-height:1.1!important;white-space:nowrap!important;}
  html[data-bb-v3="painel"] .affiliate-period-btn.custom{margin-left:0;}
  html[data-bb-v3="painel"] .affiliate-custom-date-picker{grid-template-columns:1fr 1fr!important;gap:8px!important;}
  html[data-bb-v3="painel"] .affiliate-custom-date-picker label{display:none!important;}
  html[data-bb-v3="painel"] .affiliate-custom-date-picker button{grid-column:1/-1;width:100%!important;min-height:38px!important;}
}


/* Gráfico diário: o período customizado precisa continuar visível no mobile. */
@media (max-width: 768px) {
  html[data-bb-v3="painel"] .painel-control-section .daily-performance-date-picker {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }
  html[data-bb-v3="painel"] .painel-control-section .daily-performance-date-picker label {
    display: block !important;
    grid-column: span 1 !important;
    margin: 0 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
  }
  html[data-bb-v3="painel"] .painel-control-section .daily-performance-date-picker input[type="date"] {
    display: block !important;
    grid-column: span 3 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    box-sizing: border-box !important;
    padding: 7px 6px !important;
    font-size: 12px !important;
    color-scheme: light !important;
  }
  html[data-bb-v3="painel"] .painel-control-section .daily-performance-date-picker .btn {
    grid-column: span 2 !important;
  }
}
