/* Modo claro da área real: ativado por <html data-theme="light"> (chave ao lado de "Dados reais").
   Sobrepõe as superfícies escuras do visual Obsidian; o amarelo continua como cor de destaque. */
html[data-theme=light]{--purple:#c9a100;--soft:rgba(201,161,0,.1);--text:#1f2127;--muted:#6b7080;--line:rgba(17,20,28,.1);--bg:#f3f4f7;color-scheme:light}
html[data-theme=light] body{background:radial-gradient(ellipse at 80% 0%,#f7e7a055,transparent 45%),radial-gradient(ellipse at 15% 65%,#dfe4ee88,transparent 50%),#f3f4f7;color:var(--text)}
html[data-theme=light] header{background:rgba(255,255,255,.78);border-bottom-color:rgba(17,20,28,.08)}
html[data-theme=light] .brand{color:#1f2127}
html[data-theme=light] .brand>span:last-child{color:#7a7d86}
html[data-theme=light] .header-right .avatar{background:linear-gradient(145deg,#ffffff,#e7e8ec);color:#2a2c33;border-color:rgba(17,20,28,.12)}
html[data-theme=light] #logout{color:#2a2c33}
html[data-theme=light] aside,html[data-theme=light] aside.expanded{background:rgba(255,255,255,.82);border-color:rgba(17,20,28,.08)}
html[data-theme=light] aside button{color:#6b7080}
html[data-theme=light] aside small{color:#8a8e99}
html[data-theme=light] .crumb{background:rgba(255,255,255,.7);border-bottom-color:rgba(17,20,28,.06);color:#6b7080}
html[data-theme=light] .crumb i{color:#b5b8c0}
html[data-theme=light] .subtitle,html[data-theme=light] .period,html[data-theme=light] .note,html[data-theme=light] .hint,html[data-theme=light] .count,html[data-theme=light] .footer{color:#6b7080}
html[data-theme=light] .card{background:linear-gradient(140deg,#ffffffee,#ffffffc8);border-color:rgba(17,20,28,.08);box-shadow:inset 0 1px 0 #fff,0 10px 26px rgba(17,20,28,.06)}
html[data-theme=light] .card:hover{border-color:rgba(17,20,28,.14)}
html[data-theme=light] .metric:first-child{background:radial-gradient(ellipse at 95% 0%,#fff7c365,transparent 65%),linear-gradient(125deg,#f9df69,#dcb92e);border-color:#e9cf5c;color:#25220d}
html[data-theme=light] .metric:first-child span,html[data-theme=light] .metric:first-child small{color:#605423}
html[data-theme=light] .metric:first-child .bubble{color:#493d0c;background:#fff5;border-color:#fff4}
html[data-theme=light] .metric span{color:#5b5f6b}
html[data-theme=light] .metric small{color:#7a7e8a}
html[data-theme=light] .bubble{background:linear-gradient(140deg,#fbf6dd,#f6f0cf);color:#9a7a00;border-color:rgba(201,161,0,.25)}
html[data-theme=light] .source{border-color:rgba(17,20,28,.07)}
html[data-theme=light] .source span{color:#2a2c33}
html[data-theme=light] .source small{color:#7a7e8a}
html[data-theme=light] .source .bubble{background:#f6f3e6;color:#8a7000}
html[data-theme=light] .pending{background:rgba(17,20,28,.05);color:#5b5f6b;border-color:rgba(17,20,28,.08)}
html[data-theme=light] .link,html[data-theme=light] .back{color:#9a7a00}
html[data-theme=light] .banner{background:#fff8d8;border-color:#f0dc8a;color:#6d5a10}
html[data-theme=light] input,html[data-theme=light] select,html[data-theme=light] textarea{background:#fff;border-color:rgba(17,20,28,.14);color:#1f2127;box-shadow:inset 0 1px 2px rgba(17,20,28,.05)}
html[data-theme=light] input::placeholder{color:#9a9ea9}
html[data-theme=light] option{background:#fff;color:#1f2127}
html[data-theme=light] th{color:#6b7080;border-color:rgba(17,20,28,.08)}
html[data-theme=light] td{color:#3a3d46;border-color:rgba(17,20,28,.06)}
html[data-theme=light] tbody tr:hover{background:rgba(201,161,0,.06)}
html[data-theme=light] .person strong{color:#1f2127}
html[data-theme=light] .person small{color:#6b7080}
html[data-theme=light] .person .avatar{background:linear-gradient(140deg,#f7ecc0,#efe0a0);color:#5a4a10;border-color:rgba(201,161,0,.3)}
html[data-theme=light] .high{background:#fff3c4;color:#8a6a00;border-color:#f0dc8a}
html[data-theme=light] .medium{background:rgba(17,20,28,.05);color:#4a4e59;border-color:rgba(17,20,28,.08)}
html[data-theme=light] .low{background:#e3f5ea;color:#2f7a4f;border-color:#bfe5cd}
html[data-theme=light] .quote{background:#fff8d8;color:#3a3d46}
html[data-theme=light] .chart{background:repeating-linear-gradient(to top,transparent 0,transparent 49px,rgba(17,20,28,.06) 50px)}
html[data-theme=light] .bar-group label,html[data-theme=light] .legend{color:#6b7080}
html[data-theme=light] .secondary{background:#fff;color:#2a2c33;border-color:rgba(17,20,28,.12)}
html[data-theme=light] #toast{background:rgba(255,255,255,.96);color:#1f2127;border-color:rgba(17,20,28,.1);box-shadow:0 15px 45px rgba(17,20,28,.18)}
html[data-theme=light] .login h1{color:#1f2127}
html[data-theme=light] #error,html[data-theme=light] .ag-err{color:#b45309}
/* Calendário, modais e avisos */
html[data-theme=light] .ag-btn,html[data-theme=light] .ag-seg,html[data-theme=light] .ag-filters select,html[data-theme=light] .ag-filters input{background:#fff;color:var(--text);border-color:rgba(17,20,28,.12)}
html[data-theme=light] .ag-btn:hover{background:#f4f5f8}
html[data-theme=light] .ag-cell{background:#fff}
html[data-theme=light] .ag-cell:hover{background:#fafaf6}
html[data-theme=light] .ag-chip{background:#fff3c4;color:#6d5a10}
html[data-theme=light] .ag-chip.late{background:#fde2df;color:#a8342a}
html[data-theme=light] .ag-body p{color:#3a3d46}
html[data-theme=light] .ag-col{background:#fff}
html[data-theme=light] .ag-check{border-color:rgba(17,20,28,.3)}
html[data-theme=light] .ag-minigrid button.has{background:#fff3c4;color:#6d5a10}
html[data-theme=light] .ag-overlay,html[data-theme=light] .ld-overlay{background:rgba(30,32,40,.28)}
html[data-theme=light] .ag-modal,html[data-theme=light] .ld-drawer{background:linear-gradient(180deg,#ffffff,#f6f7fa);border-color:rgba(17,20,28,.1);color:var(--text);box-shadow:0 20px 60px rgba(17,20,28,.2)}
html[data-theme=light] .ag-modal input,html[data-theme=light] .ag-modal select,html[data-theme=light] .ag-modal textarea,html[data-theme=light] .tr-slug{background:#fff;border-color:rgba(17,20,28,.14)}
html[data-theme=light] .ag-x{background:rgba(17,20,28,.07)}
html[data-theme=light] .ag-banner{background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(248,248,250,.97));border-color:rgba(17,20,28,.1);color:#1f2127;box-shadow:0 18px 50px rgba(17,20,28,.2)}
html[data-theme=light] .ag-btext p{color:#3a3d46}
html[data-theme=light] .ag-banner .ag-x{background:rgba(17,20,28,.08);color:#1f2127}
/* Pacientes, rastreamento, leads, financeiro */
html[data-theme=light] .pt-pill.green{background:#e3f5ea;color:#2f7a4f;border-color:#bfe5cd}
html[data-theme=light] .pt-pill.amber{background:#fff3c4;color:#8a6a00;border-color:#f0dc8a}
html[data-theme=light] .pt-pill.red{background:#fde2df;color:#a8342a;border-color:#f6c2bc}
html[data-theme=light] .pt-pill.blue{background:#e4edff;color:#2a5bb8;border-color:#c5d6fb}
html[data-theme=light] .pt-pill.gray{background:rgba(17,20,28,.05)}
html[data-theme=light] .pt-field,html[data-theme=light] .ld-names div,html[data-theme=light] .pt-note,html[data-theme=light] .ap-item,html[data-theme=light] .ld-thumb{background:#fff}
html[data-theme=light] .pt-ev p{color:#3a3d46}
html[data-theme=light] .pt-tabs button:hover,html[data-theme=light] .ap-item:hover{background:#f4f5f8}
html[data-theme=light] .pt-green{color:#2f7a4f}
html[data-theme=light] .pt-amber{color:#8a6a00}
html[data-theme=light] .pt-red,html[data-theme=light] .metric.fin-alert strong{color:#c0392b}
html[data-theme=light] .ld-meta{color:#1d4f9e;background:#e4edff;border-color:#c5d6fb}
html[data-theme=light] .ld-eye{background:#fff}
html[data-theme=light] .ld-eye:hover{color:#8a6a00;background:#fff3c4}
html[data-theme=light] tr.fin-late td{background:#fff5f4}
html[data-theme=light] .pw-eye:hover{color:#8a6a00;background:rgba(17,20,28,.05)}

/* Chave de tema (ao lado de "Dados reais") */
.theme-switch{display:inline-flex;align-items:center;gap:2px;padding:3px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);cursor:pointer}
.theme-switch span{display:grid;place-items:center;width:28px;height:24px;border-radius:999px;color:#91949f;transition:background .2s,color .2s}
.theme-switch span.on{background:linear-gradient(180deg,#f8e070,#e5b923);color:#241b00;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}
html[data-theme=light] .theme-switch{background:#fff;border-color:rgba(17,20,28,.12)}
html[data-theme=light] .theme-switch span{color:#6b7080}
html[data-theme=light] .theme-switch span.on{color:#241b00}
