/* V30 FINAL • Ouvir & Sorrir • Design System vibrante e sem dados demonstrativos.
   Override somente visual: não mexe em políticas, faturamento, pacientes ou emissão fiscal. */
:root{--v30-navy:#071d4b;--v30-deep:#092e6b;--v30-blue:#0869fa;--v30-cyan:#00bde9;--v30-teal:#00af99;--v30-purple:#853cf3;--v30-pink:#ef417a;--v30-orange:#ff9c12;--v30-ink:#102c54;--v30-soft:#ebf4ff;--v30-border:#c8ddf3;--v30-ring:#1492f6}
body:not(.patient-mode){background:radial-gradient(ellipse at 94% 4%,#bde9ff 0,transparent 35%),radial-gradient(ellipse at 7% 86%,#cef5f1 0,transparent 42%),linear-gradient(140deg,#eaf3ff,#f5faff 52%,#e9f4ff)!important;color:var(--v30-ink);font-size:15px}
body:not(.patient-mode) .sidebar{background:linear-gradient(154deg,#051633 0%,#07346c 55%,#052c5a 100%)!important;border-right:1px solid #70caff33!important;box-shadow:8px 0 35px #062b6930!important}
body:not(.patient-mode) .sidebar:before{content:"";position:absolute;pointer-events:none;inset:0;background:radial-gradient(circle at 100% 12%,#00ccff18,transparent 37%),radial-gradient(circle at 0% 84%,#a22efc1b,transparent 40%)}
body:not(.patient-mode) .sidebar>*{position:relative}
body:not(.patient-mode) .sidebar .os-nav-category{color:#78e5ee!important;font-size:12px!important;font-weight:900;letter-spacing:.14em;padding-top:20px!important}
body:not(.patient-mode) .sidebar .nav{padding-bottom:20px}
body:not(.patient-mode) .sidebar .nav-item{min-height:49px!important;font-size:14px!important;line-height:1.35;padding:12px 14px!important;border-radius:14px;margin:3px 7px!important;color:#e0efff!important;gap:10px;transition:background .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease}
body:not(.patient-mode) .sidebar .nav-item .nav-icon{color:#92d8fc!important;font-size:22px;min-width:25px}
body:not(.patient-mode) .sidebar .nav-item.active{background:linear-gradient(105deg,#0869ff,#08c3d5)!important;box-shadow:0 8px 22px #001b4a66,inset 0 1px #ffffff42!important;border:1px solid #ffffff20!important;color:#fff!important;transform:translateX(1px)}
body:not(.patient-mode) .sidebar .nav-item.active .nav-icon{color:#fff!important}
body:not(.patient-mode) .sidebar .nav-item:hover:not(.active){background:#4bc7ff23!important;color:#fff!important}
body:not(.patient-mode) .sidebar .fiscal-new-badge{color:#d0faff;background:#07a9c62e;border:1px solid #17c8f05c;font-size:9px}
body:not(.patient-mode) .sidebar .privacy-note,body:not(.patient-mode) .sidebar .profile-chip{background:#d9edff10;border:1px solid #a8d8ff22;border-radius:16px}
body:not(.patient-mode) .topbar{background:linear-gradient(110deg,#fffffff8,#edf7ffed)!important;border-bottom:1px solid #bed8ef!important;box-shadow:0 6px 20px #0c4f8720!important;min-height:70px}
body:not(.patient-mode) .topbar .breadcrumb{font-size:14px;color:#44658b}
body:not(.patient-mode) .topbar .breadcrumb b{color:#083d83;font-size:15px;font-weight:900}
body:not(.patient-mode) .topbar .os-global-trigger,body:not(.patient-mode) .topbar .os-fiscal-shortcut{border:1px solid #afd8f4;background:#ebf7ff;color:#115c9a;box-shadow:0 2px 10px #0f74bc0c}
body:not(.patient-mode) .content{max-width:1840px;margin:auto;padding:26px clamp(14px,2.2vw,38px) 84px!important;min-width:0}
/* Cabeçalho próprio para cada aba; sem números fictícios no banner. */
body:not(.patient-mode) .content>.welcome-row{position:relative;isolation:isolate;overflow:hidden;min-height:156px;padding:28px clamp(22px,3vw,43px)!important;margin-bottom:20px;border-radius:24px;background:radial-gradient(ellipse at 79% -55%,#77ccff82 0%,transparent 62%),linear-gradient(105deg,#05295d 0%,#076ad9 66%,#06c7cf 100%)!important;border:1px solid #6bcbff7c!important;box-shadow:0 18px 35px #0a5bbd25!important;color:#fff}
body:not(.patient-mode) .content>.welcome-row:after{content:"";position:absolute;z-index:-1;right:-60px;top:-100px;width:min(40vw,390px);height:390px;border:60px solid #ffffff16;border-radius:50%;transform:rotate(19deg)}
body:not(.patient-mode) .content>.welcome-row .eyebrow{color:#affaff!important;letter-spacing:.17em;font-size:11px!important;font-weight:900}
body:not(.patient-mode) .content>.welcome-row .page-title{font-size:clamp(31px,3vw,49px)!important;line-height:1.12;color:#fff!important;letter-spacing:-.035em;margin:6px 0}
body:not(.patient-mode) .content>.welcome-row .page-subtitle{color:#e1f5ff!important;font-size:16px!important;line-height:1.5;max-width:720px}
body:not(.patient-mode) .content>.welcome-row .button{position:relative;z-index:1;background:#fff!important;color:#0451b9!important;box-shadow:0 7px 18px #001f5840!important;border:0!important;font-size:15px!important;padding-inline:19px}
/* Cada conjunto de páginas ganha um acento próprio, mas conserva a identidade do painel. */
body:not(.patient-mode):has(.nav-item[data-view="pacientes"].active) .content>.welcome-row{background:radial-gradient(ellipse at 87% 0%,#7ec9ff9c,transparent 52%),linear-gradient(105deg,#142d81,#4b59ea 68%,#a447f2 100%)!important}
body:not(.patient-mode):has(.nav-item[data-view="agenda"].active) .content>.welcome-row{background:radial-gradient(circle at 93% 5%,#bdf5e58c,transparent 45%),linear-gradient(112deg,#064483,#078cd9 55%,#00bfb3 100%)!important}
body:not(.patient-mode):has(.nav-item[data-view="financeiro"].active) .content>.welcome-row{background:linear-gradient(110deg,#083e75,#097cbe 54%,#01b997)!important}
body:not(.patient-mode):has(.nav-item[data-view="ligacoes"].active) .content>.welcome-row,body:not(.patient-mode):has(.nav-item[data-view="contatos"].active) .content>.welcome-row{background:linear-gradient(110deg,#07316d,#2165e4 56%,#943bea)!important}
body:not(.patient-mode):has(.nav-item[data-view="estoque"].active) .content>.welcome-row,body:not(.patient-mode):has(.nav-item[data-view="pilhas"].active) .content>.welcome-row{background:linear-gradient(110deg,#054b77,#008cb3 48%,#00ba9b)!important}
body:not(.patient-mode):has(.nav-item[data-view="relatorios"].active) .content>.welcome-row{background:linear-gradient(110deg,#092e79,#6352de 66%,#d147c9)!important}
body:not(.patient-mode):has(.nav-item[data-view="usuarios"].active) .content>.welcome-row{background:linear-gradient(108deg,#08285d,#316fbc 66%,#009e9f)!important}
/* Cards de indicadores com seis cores sem sobrecarregar áreas de formulário. */
body:not(.patient-mode) .content .stats-grid{gap:13px}
body:not(.patient-mode) .content .stat-card{position:relative;isolation:isolate;overflow:hidden;min-width:0;min-height:147px;background:linear-gradient(130deg,#096cf1,#0799f7)!important;color:#fff!important;border:0!important;border-radius:21px!important;padding:20px 20px!important;box-shadow:0 12px 24px #064d9a26!important}
body:not(.patient-mode) .content .stat-card:nth-child(6n+2){background:linear-gradient(128deg,#009c82,#04cdb7)!important}
body:not(.patient-mode) .content .stat-card:nth-child(6n+3){background:linear-gradient(125deg,#6634d7,#a15afa)!important}
body:not(.patient-mode) .content .stat-card:nth-child(6n+4){background:linear-gradient(128deg,#f0a100,#ff7e1e)!important}
body:not(.patient-mode) .content .stat-card:nth-child(6n+5){background:linear-gradient(128deg,#ef426f,#fa6380)!important}
body:not(.patient-mode) .content .stat-card:nth-child(6n+6){background:linear-gradient(128deg,#00a1cd,#15cddd)!important}
body:not(.patient-mode) .content .stat-card:after{content:"";position:absolute;z-index:-1;right:-32px;bottom:-42px;width:146px;height:146px;border:25px solid #ffffff16;border-radius:50%}
body:not(.patient-mode) .content .stat-card .stat-label,body:not(.patient-mode) .content .stat-card .stat-value,body:not(.patient-mode) .content .stat-card .stat-foot,body:not(.patient-mode) .content .stat-card .stat-icon,body:not(.patient-mode) .content .stat-card b,body:not(.patient-mode) .content .stat-card span{color:#fff!important}
body:not(.patient-mode) .content .stat-card .stat-label{font-size:13px!important;font-weight:800}
body:not(.patient-mode) .content .stat-card .stat-value{font-size:clamp(25px,2.1vw,35px)!important;font-weight:900;letter-spacing:-.035em;overflow-wrap:anywhere}
body:not(.patient-mode) .content .stat-card .stat-foot{font-size:12px!important;opacity:.92}
body:not(.patient-mode) .content .stat-card .stat-icon{background:#ffffff2c;border:1px solid #ffffff3a;display:grid;place-items:center;width:43px;height:43px;border-radius:13px}
/* Conteúdo, tabelas, botões e controles em todas as abas. */
body:not(.patient-mode) .content .panel,body:not(.patient-mode) .content .report-card,body:not(.patient-mode) .content .battery-card{background:#fff!important;border:1px solid #ccdef0!important;border-radius:21px!important;box-shadow:0 10px 25px #082d6620!important;min-width:0}
body:not(.patient-mode) .content .panel-head{border-bottom-color:#e0ebf7}
body:not(.patient-mode) .content .panel-title{font-size:clamp(18px,1.55vw,24px)!important;color:#103a75!important;font-weight:900}
body:not(.patient-mode) .content .panel-note,body:not(.patient-mode) .content .report-card p{font-size:14px!important;line-height:1.6;color:#4c6e91!important}
body:not(.patient-mode) .content .button{font-size:14px!important;font-weight:800;min-height:45px;border-radius:12px;transition:transform .13s ease,box-shadow .13s ease,background .13s ease}
body:not(.patient-mode) .content .button.primary{background:linear-gradient(105deg,#0566ef,#06ade3)!important;color:white!important;border-color:transparent!important;box-shadow:0 6px 16px #0a77da2a}
body:not(.patient-mode) .content .button.secondary{background:#f0f7ff!important;color:#1156a0!important;border:1px solid #bfd9f2!important}
body:not(.patient-mode) .content .button:not(:disabled):hover{transform:translateY(-1px);box-shadow:0 9px 21px #082d6333}
body:not(.patient-mode) .content .field,body:not(.patient-mode) .content input:not([type=checkbox]):not([type=radio]),body:not(.patient-mode) .content select,body:not(.patient-mode) .content textarea{min-height:43px;font-size:15px;border-color:#bfd4ec;border-radius:11px;color:#102e57}
body:not(.patient-mode) .content input:focus-visible,body:not(.patient-mode) .content select:focus-visible,body:not(.patient-mode) .content textarea:focus-visible,body:not(.patient-mode) .content button:focus-visible{outline:3px solid #17bff3!important;outline-offset:2px!important}
body:not(.patient-mode) .content .data-table th{background:#ecf5ff!important;color:#16529b!important;font-size:12px!important;letter-spacing:.02em}
body:not(.patient-mode) .content .data-table td{font-size:13px!important;color:#234d79!important;padding-top:13px;padding-bottom:13px}
body:not(.patient-mode) .content .data-table tbody tr:hover{background:#eaf6ff}
body:not(.patient-mode) .content .pill.success{background:#dcfaed;color:#007557}body:not(.patient-mode) .content .pill.warning{background:#fff0c5;color:#8b5700}body:not(.patient-mode) .content .pill.danger{background:#ffe0ea;color:#b71640}
body:not(.patient-mode) .content .subtabs{border-bottom:1px solid #d2e3f4;gap:5px}
body:not(.patient-mode) .content .subtab{font-size:13px;min-height:43px;border-radius:10px 10px 0 0;color:#47678e}
body:not(.patient-mode) .content .subtab.active{color:#075fe2;border-bottom:3px solid #086bff;background:#e8f3ff}
body:not(.patient-mode) .content .quick-action{border-radius:17px;background:linear-gradient(140deg,#f1f7ff,#e1efff);border:1px solid #c8dff8}
body:not(.patient-mode) .content .quick-action:hover{border-color:#69afff;background:#e3f2ff}
body:not(.patient-mode) .content .calendar-cell.today{background:#e5f9ff}
body:not(.patient-mode) .content .chart-bar{background:linear-gradient(180deg,#3bc5fe,#105bea);border-radius:8px 8px 2px 2px}
body:not(.patient-mode) .content .notice{border:1px solid #d8eaf9;background:#f0f8ff;color:#315b81;font-size:13px}
body:not(.patient-mode) .content .empty-state{font-size:14px;line-height:1.55}
body:not(.patient-mode) .content .archive-sync-info,body:not(.patient-mode) .content .archive-sync-grid>div{border-radius:15px}
/* Importar arquivos: painéis vivos sem misturar históricos ao saldo. */
body:not(.patient-mode) .ic-hero{background:radial-gradient(circle at 88% 5%,#9bf2f382,transparent 35%),linear-gradient(110deg,#092e69,#066cdd 58%,#09c5bf)!important;box-shadow:0 12px 33px #095aa139;border-radius:23px;border:1px solid #6ecbff66}
body:not(.patient-mode) .ic .ic-panel{border:1px solid #d3e3f5;border-radius:22px;box-shadow:0 10px 25px #0e468a12}
body:not(.patient-mode) .ic-merge-kpi{border:1px solid #ffffff49;border-radius:20px;box-shadow:0 10px 23px #072d6e31}
body:not(.patient-mode) .ic-merge-kpi.blue{background:linear-gradient(125deg,#075ee9,#0cacf2)}
body:not(.patient-mode) .ic-merge-kpi.green{background:linear-gradient(120deg,#007e7b,#00cbb2)}
body:not(.patient-mode) .ic-merge-kpi.purple{background:linear-gradient(120deg,#6534c9,#a259ee)}
body:not(.patient-mode) .ic-merge-kpi.orange{background:linear-gradient(125deg,#ea8300,#ffb328)}
body:not(.patient-mode) .ic-route-btn{border-color:#bcd8f3;background:linear-gradient(145deg,#fff,#ecf6ff);border-radius:17px;min-height:107px;transition:background .12s ease,transform .12s ease}
body:not(.patient-mode) .ic-route-btn:hover{transform:translateY(-2px);border-color:#149cf7;background:#e0f2ff}
/* Financeiro, fiscal e orçamento continuam com estados originais. */
body:not(.patient-mode) .f26-app .f26-stat{box-shadow:0 10px 22px #0b42852f}
body:not(.patient-mode) .f26-app .f26-panel{border-radius:20px;border-color:#cbdff4}
body:not(.patient-mode) .f26-app .f26-banner{background:linear-gradient(112deg,#092855,#136dd6 63%,#02bec3)!important}
body:not(.patient-mode) #osFiscalA1 .fh-hero{background:linear-gradient(112deg,#061d56,#0d73d6 62%,#0bc1b1)}
/* Login: não exibir visual administrativo sobre tela do paciente. */
body:not(.patient-mode) .modal{border-radius:23px;box-shadow:0 26px 84px #07234d55}
body:not(.patient-mode) .modal-head{background:linear-gradient(125deg,#ecf7ff,#fff);border-bottom:1px solid #d2e5f6}
body:not(.patient-mode) .modal-head h2{color:#0e3f80;font-size:clamp(20px,2.4vw,27px)}
body:not(.patient-mode) .modal-actions{background:#f5faff}
body:not(.patient-mode) .mobile-bottom-nav button{min-height:65px}
body:not(.patient-mode) .mobile-bottom-nav button.active{color:#0869ee}
/* Acessibilidade: teclado, toque, alto contraste e movimento reduzido. */
button:disabled{cursor:not-allowed;opacity:.62}
@media (max-width:1020px){body:not(.patient-mode) .content{padding:20px 16px 108px!important}body:not(.patient-mode) .content .stats-grid{gap:10px}body:not(.patient-mode) .content .stat-card{min-height:129px;padding:16px!important}}
@media (max-width:760px){body:not(.patient-mode) .content{padding:16px 12px 112px!important}body:not(.patient-mode) .content>.welcome-row{min-height:135px;padding:20px 18px!important;border-radius:19px;gap:10px}body:not(.patient-mode) .content>.welcome-row .page-title{font-size:29px!important}body:not(.patient-mode) .content>.welcome-row .page-subtitle{font-size:14px!important}body:not(.patient-mode) .content .stat-card{min-height:128px!important;padding:14px!important;border-radius:16px!important}body:not(.patient-mode) .content .stat-card .stat-value{font-size:25px!important}body:not(.patient-mode) .content .stat-card .stat-icon{height:32px;width:32px}body:not(.patient-mode) .content .panel{padding:16px!important;border-radius:17px!important}body:not(.patient-mode) .content .data-table tr{border:1px solid #d4e6f7;border-radius:14px}body:not(.patient-mode) .ic-merge-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}body:not(.patient-mode) .ic-route-grid{grid-template-columns:1fr!important}body:not(.patient-mode) .ic-route-btn{min-height:74px}}
@media (max-width:390px){body:not(.patient-mode) .content .stat-card .stat-value{font-size:22px!important}body:not(.patient-mode) .content .stat-card .stat-label{font-size:11px!important}body:not(.patient-mode) .ic-merge-kpi strong{font-size:25px}}
@media(prefers-reduced-motion:reduce){body:not(.patient-mode) .content .button,body:not(.patient-mode) .sidebar .nav-item,body:not(.patient-mode) .ic-route-btn{transition:none!important}body:not(.patient-mode) .content .button:hover,body:not(.patient-mode) .ic-route-btn:hover{transform:none!important}}
