/* ============================================================
   Identidade Med-Review (R1) no CRM — tema claro e escuro
   Fonte das cores/fontes: grupomedreview.com.br/r1/extensive-c/
   Roxo #b152e0 · violeta #8e4dff · pêssego #fbceb0 · lima #b4f82d · amarelo #ffc83d
   Fontes: Urbanist (títulos) e Ubuntu Sans (texto)
   Para voltar ao visual antigo: tirar a linha do identidade-medreview.css no index.html
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@500;600;700;800&family=Ubuntu+Sans:wght@400;500;600;700&display=swap');

:root{
  --mr-primary:#b152e0; --mr-secondary:#8e4dff; --mr-peach:#fbceb0; --mr-lime:#b4f82d; --mr-yellow:#ffc83d;
  --font:'Ubuntu Sans',-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-display:'Urbanist','Ubuntu Sans',system-ui,sans-serif;
  --tiffany:var(--mr-primary); --tiffany-bg:rgba(177,82,224,.14);
  --terra:var(--mr-peach); --terra-bg:rgba(251,206,176,.22);
}

/* ---------- tema claro: bege do Claude ---------- */
html[data-theme="light"]{
  color-scheme:light;
  --cream:#faf9f5; --cream-2:#f1efe7; --card:#ffffff;
  --ink:#141413; --ink-soft:#6b6a63; --line:#e8e6dc;
  --tiffany-d:#8a2fbf; --tiffany-bg:rgba(177,82,224,.12);
  --amber:#ffa400; --amber-bg:#ffe9d0;
  --terra:#e9906a; --terra-bg:#fdeadf;
  --green:#19b865; --green-bg:#dcfce7; --red:#e5302a; --red-bg:#fdeaea;
  --shadow:0 1px 2px rgba(60,50,30,.04),0 4px 14px rgba(60,50,30,.05);
  --shadow-lg:0 2px 6px rgba(60,50,30,.08),0 18px 50px rgba(60,50,30,.15);
}
html[data-theme="light"] body{background:var(--cream);background-image:none}
html[data-theme="light"] .sidebar{background:#f4f2ea;border-right:1px solid var(--line)}
html[data-theme="light"] #nav a:hover{background:rgba(20,20,19,.06)}
html[data-theme="light"] #nav a.active{background:var(--card);color:#4c1d95;box-shadow:inset 3px 0 0 var(--mr-primary),var(--shadow)}
html[data-theme="light"] .btn{background:rgba(20,20,19,.06);color:var(--ink)}
html[data-theme="light"] .btn:hover{background:rgba(20,20,19,.11)}
html[data-theme="light"] .btn-amber{background:var(--mr-yellow);color:#241a00}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#ffffff;border-color:#ddd9cb}
html[data-theme="light"] input:focus,html[data-theme="light"] select:focus,html[data-theme="light"] textarea:focus{border-color:var(--mr-primary);box-shadow:0 0 0 4px rgba(177,82,224,.16)}
html[data-theme="light"] .kpi::before{background:linear-gradient(90deg,var(--mr-primary),var(--mr-secondary))}
html[data-theme="light"] .btn-primary{box-shadow:0 6px 16px rgba(142,77,255,.25)}

/* ---------- vale para os dois temas ---------- */
.brand-name,.page-head h1,.kpi .v{font-family:var(--font-display)}
.page-head h1{font-weight:700!important;letter-spacing:-.02em}
.sec-label{color:var(--tiffany-d)}
.btn-primary{background:linear-gradient(135deg,var(--mr-primary),var(--mr-secondary));color:#fff}
.btn-primary:hover{filter:brightness(1.08)}
.nav-dono{background:linear-gradient(135deg,#8e4dff,#b152e0)!important;box-shadow:0 4px 16px rgba(142,77,255,.32)}
.chat-fab{background:linear-gradient(135deg,#b152e0,#8e4dff)}
.bubble.out{background:linear-gradient(135deg,#8e4dff,#b152e0)!important;color:#fff!important}
::selection{background:rgba(177,82,224,.4);color:inherit}

/* melhorias de acabamento */
.kpi{position:relative;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}
.kpi::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,var(--mr-primary),var(--mr-secondary) 60%,transparent)}
.kpi:hover,.card:hover{transform:translateY(-1px);box-shadow:var(--shadow-lg)}
.card{border-radius:20px}
#nav a{border-radius:12px;transition:background .15s,color .15s,transform .05s}
.btn{transition:background .15s,filter .15s,transform .08s,box-shadow .15s}
.btn:active{transform:scale(.97)}
body,.sidebar,.card,.kpi,input,select,textarea{transition:background-color .25s ease,border-color .25s ease,color .25s ease}

/* gráficos: verde = lucro, amarelo/laranja = gasto, vermelho = prejuízo */
.bar-mes .bar,.pd-bar{background:linear-gradient(180deg,#b78bff,#7b3fe4)}
.bar-mes .bar.bar-hoje{background:linear-gradient(180deg,#f0c9ff,#c77df0)}
.pd-bar-cyan{background:linear-gradient(180deg,#86efac,#16a34a)}
.dseg-lucro{background:#20d070}
.dseg-gasto{background:#ffa400}
.dseg-imposto{background:#ff7a1a}
.dseg-fisico{background:#c9a26b}
.dseg-prejuizo{background:#e5302a}
.rp-bar>div{background:linear-gradient(90deg,var(--mr-primary),var(--mr-secondary))}
html[data-theme="light"]{--green:#16a34a;--green-bg:#dcfce7}

/* botão de tema */
#theme-toggle{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 10px;padding:9px 12px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);font-size:13px;font-weight:600;cursor:pointer}
#theme-toggle:hover{border-color:var(--mr-primary)}

.theme-fab{position:fixed;right:24px;bottom:86px;z-index:60;width:46px;height:46px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink);font-size:20px;line-height:1;cursor:pointer;box-shadow:var(--shadow-lg);display:grid;place-items:center;transition:transform .15s,border-color .15s}
.theme-fab:hover{transform:scale(1.08);border-color:var(--mr-primary)}

html[data-theme] .kpi.amber .v{color:#ffa400!important}

/* cartões de números: cada um com a cor do seu assunto (nada de roxo) */
html[data-theme] .kpi::before{background:linear-gradient(90deg,var(--kc,#d97757),color-mix(in srgb,var(--kc,#d97757) 22%,transparent))}
.kpi-grid .kpi:nth-child(1){--kc:#3b82f6}
.kpi-grid .kpi:nth-child(2){--kc:#ffa400}
.kpi-grid .kpi:nth-child(3){--kc:#ff7a1a}
.kpi-grid .kpi:nth-child(4){--kc:#b45309}
.kpi-grid .kpi:nth-child(5){--kc:#20d070}
.kpi-grid .kpi:nth-child(6){--kc:#14b8a6}
.kpi-grid .kpi:nth-child(7){--kc:#64748b}

/* ---------- tema escuro ---------- */
html[data-theme="dark"]{
  color-scheme:dark;
  --mr-bg:#1f1e1d; --mr-card:#2a2927; --mr-fg:#ece9e0; --mr-soft:#a3a095;
  --cream:var(--mr-bg); --cream-2:#302e2b; --card:var(--mr-card);
  --ink:var(--mr-fg); --ink-soft:var(--mr-soft); --line:rgba(255,255,255,.09);
  --tiffany-d:#cf8cf0; --tiffany-bg:rgba(177,82,224,.16);
  --amber:var(--mr-yellow); --amber-bg:rgba(255,200,61,.14);
  --terra:var(--mr-peach); --terra-bg:rgba(251,206,176,.13);
  --green:#2ee57c; --green-bg:rgba(46,229,124,.12);
  --red:#ff4d45; --red-bg:rgba(255,77,69,.14);
  --shadow:0 1px 2px rgba(0,0,0,.35),0 6px 18px rgba(0,0,0,.25);
  --shadow-lg:0 2px 6px rgba(0,0,0,.5),0 18px 50px rgba(0,0,0,.5);
}
html[data-theme="dark"] body{background:var(--mr-bg);background-image:none}
html[data-theme="dark"] .sidebar{background:#252422}
html[data-theme="dark"] #nav a{color:var(--mr-fg)}
html[data-theme="dark"] #nav a:hover{background:rgba(255,255,255,.06)}
html[data-theme="dark"] #nav a.active{background:linear-gradient(90deg,rgba(177,82,224,.28),rgba(142,77,255,.10));color:#fff;box-shadow:inset 3px 0 0 var(--mr-primary)}
html[data-theme="dark"] .btn{background:rgba(255,255,255,.07);color:var(--mr-fg)}
html[data-theme="dark"] .btn:hover{background:rgba(255,255,255,.12)}
html[data-theme="dark"] .btn-primary{background:linear-gradient(135deg,var(--mr-primary),var(--mr-secondary));color:#fff;box-shadow:0 6px 18px rgba(142,77,255,.35)}
html[data-theme="dark"] .btn-amber{background:var(--mr-yellow);color:#120c08}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#6f6c7d}
html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{border-color:var(--mr-primary);box-shadow:0 0 0 4px rgba(177,82,224,.22)}
html[data-theme="dark"] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a98a8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")}
html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=range]){background-color:#232220!important;color:var(--mr-fg)!important;border-color:rgba(255,255,255,.12)}
html[data-theme="dark"] .drawer{background:var(--mr-bg)}
html[data-theme="dark"] .drawer-head{background:rgba(31,30,29,.88)}
html[data-theme="dark"] .drawer-backdrop{background:rgba(0,0,0,.6)}
html[data-theme="dark"] thead th{color:var(--mr-soft)}
html[data-theme="dark"] tbody tr:hover td,html[data-theme="dark"] tr:hover>td{background:rgba(255,255,255,.05)!important;color:var(--mr-fg)!important}
html[data-theme="dark"] .brand-mark{filter:brightness(0) invert(1)}
html[data-theme="dark"] .mtopbar{background:var(--card);color:var(--mr-fg)}
html[data-theme="dark"] .mtopbar .mt-brand,html[data-theme="dark"] .mt-burger{color:var(--mr-fg)}
html[data-theme="dark"] .atend-list,html[data-theme="dark"] .chat-head,html[data-theme="dark"] .chat-body,html[data-theme="dark"] .ficha-chat-body,html[data-theme="dark"] .atend-conv{background:var(--card)!important;color:var(--mr-fg)}
html[data-theme="dark"] .atend-conv:hover,html[data-theme="dark"] .atend-conv.ativa{background:#34322e!important}
html[data-theme="dark"] .atend-conv *{color:inherit}
html[data-theme="dark"] .card,html[data-theme="dark"] .kpi,html[data-theme="dark"] .kcard,html[data-theme="dark"] .kcol{color:var(--mr-fg)}
html[data-theme="dark"] .vend-filter select,html[data-theme="dark"] #filtro-vendedor-wrap select{background-color:#232220!important;color:var(--mr-fg)!important}
html[data-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:8px}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:transparent}
/* ---------- tema escuro: cores fixas do CSS antigo ---------- */
html[data-theme="dark"] #nav a.active{background:var(--card)}
html[data-theme="dark"] .vend-filter select{background:var(--card)}
html[data-theme="dark"] .kpi.accent{background:var(--card)}
html[data-theme="dark"] .fin-adendo{background:color-mix(in srgb, #fff4e0 16%, #2a2927);border:1px solid var(--line);color:color-mix(in srgb, #8a5a12 45%, #ffffff)}
html[data-theme="dark"] .vs-arw:hover:not(:disabled){background:var(--card)}
html[data-theme="dark"] .rk-row.top{background:var(--card)}
html[data-theme="dark"] .t-eduzz{background:color-mix(in srgb, #efe6ff 16%, #2a2927);color:color-mix(in srgb, #6C2BD9 45%, #ffffff)}
html[data-theme="dark"] .t-hot{background:color-mix(in srgb, #ffe9dd 16%, #2a2927);color:color-mix(in srgb, #d6531f 45%, #ffffff)}
html[data-theme="dark"] .t-assiny{background:color-mix(in srgb, #e3f7f4 16%, #2a2927);color:color-mix(in srgb, #1F2A44 45%, #ffffff)}
html[data-theme="dark"] .t-br{background:color-mix(in srgb, #e7f7ee 16%, #2a2927);color:color-mix(in srgb, #1c8a5a 45%, #ffffff)}
html[data-theme="dark"] .t-intl{background:color-mix(in srgb, #e6f0fb 16%, #2a2927);color:color-mix(in srgb, #1f6fd6 45%, #ffffff)}
html[data-theme="dark"] .t-caju{background:color-mix(in srgb, #fff1d6 16%, #2a2927);color:color-mix(in srgb, #a86a12 45%, #ffffff)}
html[data-theme="dark"] .t-fis{background:color-mix(in srgb, #f0ece6 16%, #2a2927);color:color-mix(in srgb, #7a6a55 45%, #ffffff)}
html[data-theme="dark"] .kpi.amber .v{color:color-mix(in srgb, #C77F12 45%, #ffffff)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--card)}
html[data-theme="dark"] tbody tr:hover{background:var(--card)}
html[data-theme="dark"] .chip.negociando{color:color-mix(in srgb, #9b6c1a 45%, #ffffff)}
html[data-theme="dark"] .chip.conexao{color:color-mix(in srgb, #9b6c1a 45%, #ffffff)}
html[data-theme="dark"] .chip.sem_whatsapp{background:color-mix(in srgb, #EDE7DD 16%, #2a2927);color:color-mix(in srgb, #8a7a5c 45%, #ffffff)}
html[data-theme="dark"] .chip.eduzz{background:color-mix(in srgb, #EAE6F7 16%, #2a2927);color:color-mix(in srgb, #6B4FBB 45%, #ffffff)}
html[data-theme="dark"] .chip.quente{background:color-mix(in srgb, #FBE3DC 16%, #2a2927);color:color-mix(in srgb, #C8401F 45%, #ffffff)}
html[data-theme="dark"] .chip.morno{color:color-mix(in srgb, #9b6c1a 45%, #ffffff)}
html[data-theme="dark"] .chip.frio{background:color-mix(in srgb, #E1EEF7 16%, #2a2927);color:color-mix(in srgb, #2B6CA8 45%, #ffffff)}
html[data-theme="dark"] .flx-draft-aviso{background:color-mix(in srgb, #FDF6E3 16%, #2a2927);color:color-mix(in srgb, #8a6d1f 45%, #ffffff)}
html[data-theme="dark"] .flx-draft-aviso a{color:color-mix(in srgb, #8a6d1f 45%, #ffffff)}
html[data-theme="dark"] .subabs a.on{color:var(--tiffany-d,color-mix(in srgb, #2A9D8F 45%, #ffffff))}
html[data-theme="dark"] .flx-status{background:var(--card)}
html[data-theme="dark"] .flx-status.on{background:var(--card)}
html[data-theme="dark"] .flx-card{background:var(--card)}
html[data-theme="dark"] .d7-k.ok{background:var(--card);border-color:var(--line)}
html[data-theme="dark"] .vd-busca:focus{background:var(--card)}
html[data-theme="dark"] .flx-trilha.on{background:var(--card)}
html[data-theme="dark"] .flxm-node.fim{background:color-mix(in srgb, #e8f8ef 16%, #2a2927)}
html[data-theme="dark"] .flxm-badge.rec{background:color-mix(in srgb, #e8f8ef 16%, #2a2927)}
html[data-theme="dark"] .rec-selo.direto{background:color-mix(in srgb, #DFF5EE 16%, #2a2927);color:color-mix(in srgb, #12735F 45%, #ffffff)}
html[data-theme="dark"] .rec-selo.indireto{color:color-mix(in srgb, #8a7f6a 45%, #ffffff)}
html[data-theme="dark"] .rec-cross{background:color-mix(in srgb, #FDF0DC 16%, #2a2927);color:color-mix(in srgb, #9A6412 45%, #ffffff)}
html[data-theme="dark"] .rec-utm.ok{background:color-mix(in srgb, #DFF5EE 16%, #2a2927);color:color-mix(in srgb, #12735F 45%, #ffffff)}
html[data-theme="dark"] .rec-utm.ruim{background:color-mix(in srgb, #FBE3E3 16%, #2a2927);color:color-mix(in srgb, #9B2C2C 45%, #ffffff)}
html[data-theme="dark"] .cfg-screen .muted{color:color-mix(in srgb, #33333a 45%, #ffffff)}
html[data-theme="dark"] .cfg-screen p{color:color-mix(in srgb, #33333a 45%, #ffffff)}
html[data-theme="dark"] .chip.sit-em_aberto{color:color-mix(in srgb, #9b6c1a 45%, #ffffff)}
html[data-theme="dark"] .chip.sit-recusada{background:color-mix(in srgb, #FBE3DC 16%, #2a2927);color:color-mix(in srgb, #C8401F 45%, #ffffff)}
html[data-theme="dark"] .chip.sit-abandonada{background:color-mix(in srgb, #EAE6F7 16%, #2a2927);color:color-mix(in srgb, #6B4FBB 45%, #ffffff)}
html[data-theme="dark"] .chip.sit-expirada{background:color-mix(in srgb, #EDE7DD 16%, #2a2927);color:color-mix(in srgb, #8a7a5c 45%, #ffffff)}
html[data-theme="dark"] .ctx-bar select{background:var(--card)}
html[data-theme="dark"] .atend{background:var(--card)}
html[data-theme="dark"] .atend-conv:hover{background:var(--card)}
html[data-theme="dark"] .atend-conv.ativa{background:var(--card)}
html[data-theme="dark"] .bubble.in{background:var(--card)}
html[data-theme="dark"] .chat-input{background:var(--card)}
html[data-theme="dark"] .pd-xaxis{color:color-mix(in srgb, #64748b 45%, #ffffff)}
html[data-theme="dark"] .pd-prod-row:first-child .pd-prod-pos{color:var(--ink)}
html[data-theme="dark"] .pd-prod-rec small{color:color-mix(in srgb, #64748b 45%, #ffffff)}
html[data-theme="dark"] .kcol-head .cnt{background:var(--card)}
html[data-theme="dark"] .kcard{background:var(--card)}
html[data-theme="dark"] .kcol-head .cnt{background:var(--card)}
html[data-theme="dark"] .ctx-bar{background:var(--card)}
html[data-theme="dark"] .pdia-fis{color:color-mix(in srgb, #7C5CBF 45%, #ffffff)}
html[data-theme="dark"] .atend-conv.naolido{background:var(--card)}
html[data-theme="dark"] .afchip{background:var(--card)}
html[data-theme="dark"] .chat-janela.ok{background:color-mix(in srgb, #eafaf3 16%, #2a2927);color:color-mix(in srgb, #1c8a5a 45%, #ffffff)}
html[data-theme="dark"] .chat-janela.alerta{background:color-mix(in srgb, #fff4e0 16%, #2a2927);color:color-mix(in srgb, #a86a12 45%, #ffffff)}
html[data-theme="dark"] .chat-janela.fechada{background:color-mix(in srgb, #fdeceb 16%, #2a2927);color:color-mix(in srgb, #c0392b 45%, #ffffff)}
html[data-theme="dark"] .qr-pop{background:var(--card)}
html[data-theme="dark"] .tagchip{color:var(--tiffany-d,color-mix(in srgb, #0aa 45%, #ffffff))}
html[data-theme="dark"] #tags-panel{background:var(--cream-2,var(--card))}
html[data-theme="dark"] .tags-busca{background:var(--card)}
html[data-theme="dark"] .lb-val.neg{color:var(--coral,color-mix(in srgb, #e05252 45%, #ffffff))}
html[data-theme="dark"] .plat-pill{background:var(--cream-2,var(--card))}
html[data-theme="dark"] .rd-select{background:var(--card)}
html[data-theme="dark"] .rd-busca{background:var(--card)}
html[data-theme="dark"] .rd-kpi.morno b{color:color-mix(in srgb, #C77F12 45%, #ffffff)}
html[data-theme="dark"] .rd-kpi.frio b{color:color-mix(in srgb, #5b8db8 45%, #ffffff)}
html[data-theme="dark"] .t-frio .rd-score{background:color-mix(in srgb, #eaf2f9 16%, #2a2927)}
html[data-theme="dark"] .rd-msg{background:var(--card)}

/* ---------- gráficos mais bonitos (os dois temas) ---------- */
.dbars{gap:0;padding:10px 4px 0;background-image:linear-gradient(var(--line) 1px,transparent 1px);background-size:100% 25%;background-position:left bottom;background-repeat:repeat-y}
.dbar-col{justify-content:center;padding:0 5px;box-sizing:border-box}
.dbar-stack{max-width:58px;margin:0 auto;border-radius:11px 11px 3px 3px;box-shadow:0 10px 24px -12px rgba(120,80,30,.45)}
.dbar-col:hover .dbar-stack{filter:brightness(1.07) saturate(1.1);box-shadow:0 14px 30px -8px rgba(142,77,255,.7)}
.dseg+.dseg{border-top:2px solid var(--card)}
.dseg{box-sizing:border-box}
.dbar-tip{background:#262523!important;color:#fff!important;border:1px solid rgba(255,255,255,.14);border-radius:14px;box-shadow:0 18px 40px rgba(0,0,0,.45);padding:11px 14px}
.dchart-x{padding:0 8px;margin-top:8px}
.bar-mes .bar,.pd-bar{border-radius:9px 9px 3px 3px;box-shadow:0 8px 20px -10px rgba(142,77,255,.6)}
.pd-bar-cyan{border-radius:6px 6px 2px 2px}
.pd-bars{background-image:linear-gradient(var(--line) 1px,transparent 1px);background-size:100% 25%;background-position:left bottom}
.ddonut circle{stroke-width:15}
.ddonut svg{filter:drop-shadow(0 8px 18px rgba(60,50,30,.18))}
.ddonut-c .n{font-weight:800;font-size:34px}
.dleg{padding:7px 8px;border-radius:10px;transition:background .15s}
.dleg:hover{background:var(--tiffany-bg)}
.dleg span{width:11px;height:11px;border-radius:4px;flex:0 0 11px}
html[data-theme="dark"] .dseg-lucro{box-shadow:0 0 18px rgba(74,222,128,.22)}
html[data-theme="dark"] .dbar-stack{box-shadow:0 12px 28px -12px rgba(0,0,0,.6)}

/* gráfico de linhas suaves (lucro e gasto) */
.dbars-wrap{position:relative;margin-top:6px}
.dline-chart .dbars{position:relative;z-index:2;background-image:linear-gradient(var(--line) 1px,transparent 1px);background-size:100% 25%;background-position:left bottom;background-repeat:repeat-y;padding:10px 0 0}
.dline-chart .dbar-col{padding:0;border-radius:10px;transition:background .15s}
.dline-chart .dbar-col:hover{background:rgba(120,110,80,.10)}
.dlines{position:absolute;left:0;right:0;top:10px;bottom:0;z-index:1;pointer-events:none}
.dlines svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.dlines path{vector-effect:non-scaling-stroke}
.dlines path.dl-lucro,.dlines path.dl-gasto{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.dlines path.dl-lucro{stroke:#20d070}
.dlines path.dl-gasto{stroke:#ffa400}
.dl-dot{position:absolute;width:10px;height:10px;border-radius:50%;transform:translate(-50%,50%);border:2.5px solid var(--card)}
.dl-dot.dl-lucro{background:#20d070}
.dl-dot.dl-gasto{background:#ffa400}
.dl-dot.dl-neg{background:#e5302a}

/* gráfico mais alto, modo barras, linha do zero e aviso de prejuízo */
.dbars-wrap .dbars{height:330px}
.dlines path.dl-neg{fill:none;stroke:#e5302a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.dbr{position:absolute;display:block;transition:filter .15s}
.dbr-lucro{background:linear-gradient(180deg,#20d070,#16a34a);border-radius:7px 7px 2px 2px}
.dbr-gasto{background:linear-gradient(180deg,#fde68a,#f2a900);border-radius:7px 7px 2px 2px}
.dbr-neg{background:linear-gradient(180deg,#dc2626,#fb7185);border-radius:2px 2px 7px 7px}
.dzero{position:absolute;left:0;right:0;height:0;border-top:1.5px dashed rgba(239,68,68,.65);z-index:1}
.dzero span{position:absolute;right:4px;top:-18px;font-size:10px;font-family:var(--font-mono);color:#e5302a;background:var(--card);padding:0 6px;border-radius:6px}
.dneg-zone{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,rgba(239,68,68,.10),rgba(239,68,68,.02));pointer-events:none}
.dchart-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:6px 0 4px}
.dstatus-wrap{display:flex;gap:8px;flex-wrap:wrap}
.dstatus{font-size:12.5px;padding:6px 12px;border-radius:999px;font-weight:500}
.dstatus.ok{background:rgba(52,211,153,.14);color:#16a34a}
.dstatus.bad{background:rgba(239,68,68,.15);color:#dc2626}
html[data-theme="dark"] .dstatus.ok{color:#6ee7b7}
html[data-theme="dark"] .dstatus.bad{color:#fca5a5}
.dtoggle{display:inline-flex;padding:3px;border-radius:12px;border:1px solid var(--line);background:var(--cream-2)}
.dtoggle button{border:0;background:transparent;color:var(--ink-soft);padding:6px 12px;border-radius:9px;font-size:12.5px;font-weight:600;cursor:pointer;font-family:inherit}
.dtoggle button.on{background:linear-gradient(135deg,var(--mr-primary),var(--mr-secondary));color:#fff}
.dl-lossx{color:#e5302a!important;font-weight:700}
.dline-chart .dbar-tip{bottom:auto!important;top:12px}
.dline-chart .dbar-col:first-child .dbar-tip{left:0!important;transform:none!important}
.dline-chart .dbar-col:last-child .dbar-tip{left:auto!important;right:0!important;transform:none!important}

/* barras empilhadas */
.dmodo-barras .dbar-col{padding:0 7px;align-items:flex-end;box-sizing:border-box}
.dmodo-barras .dbar-stack{max-width:64px;width:100%;margin:0 auto;border-radius:12px 12px 4px 4px;box-shadow:0 12px 26px -12px rgba(249,115,22,.55)}
.dmodo-barras .dbar-col:hover .dbar-stack{filter:brightness(1.06) saturate(1.08)}

/* sem sombra nos gráficos e barras mais juntas */
.dbar-stack,.dmodo-barras .dbar-stack,.dbar-col:hover .dbar-stack,.bar-mes .bar,.pd-bar,.dbr,
html[data-theme="dark"] .dbar-stack,html[data-theme="dark"] .dseg-lucro{box-shadow:none!important}
.ddonut svg{filter:none!important}
.dmodo-barras .dbar-col{padding:0 3px}
.dmodo-barras .dbar-stack{max-width:none}
.dl-dot{box-shadow:none}

/* prejuízo abaixo da linha do zero nas barras */
.dmodo-barras .dbar-col{position:relative}
.dmodo-barras .dbar-abs{position:absolute;left:3px;right:3px;width:auto;max-width:none;margin:0}
.dbar-neg{position:absolute;left:3px;right:3px;background:#e5302a;border-radius:2px 2px 12px 12px}

