:root{--ink:#243b3a;--muted:#5e716e;--emerald:#08775f;--blue:#3566ad;--purple:#7655ad;--orange:#b76520;--rose:#b64455}
body{color:var(--ink);background:radial-gradient(ellipse at 5% 4%,#e2f3eb 0,transparent 38%),radial-gradient(ellipse at 95% 18%,#eee6fa 0,transparent 34%),#f7f5ee}
header{border-bottom-color:#d6e5dc}.brand .app-logo{background:linear-gradient(135deg,#139174,#065d4b);box-shadow:0 4px 12px #08775f24}.eyebrow{color:var(--emerald)}h1{color:#174c41}p.subtitle{color:var(--muted)}header small,label{color:#526861}.hint,footer{color:#66756d}.row{color:#596f66}.row.total{color:#135f4c}.card{background:#fffefa;border-color:#dce6df;border-top:4px solid #71b8a0;box-shadow:0 8px 28px #26463b08}h2 span{background:#e0f2e9;color:#146d54}
input,select{background:#f5f8f5;border-color:#d4e2da;color:#263e38}input::placeholder{color:#74867d;opacity:1}input:focus,select:focus{border-color:#22886d;outline:3px solid #d6eee4;outline-offset:1px}
.primary{background:linear-gradient(110deg,#10846a,#065c4a);box-shadow:0 5px 14px #08775f22}.primary:hover{background:linear-gradient(110deg,#0c745d,#044b3d)}.secondary{background:#eaf3ee;border-color:#cedfd5;color:#235e49}.secondary:hover{background:#dcece2}.tabs{border-color:#d9e4dd;background:#ffffff65;border-radius:10px 10px 0 0}.tabs button{color:#5e7169}.tabs button.active{background:#0b7962;color:white}.tabs [data-mode="bundle"].active{background:var(--purple)}.tabs [data-mode="monthly"].active{background:var(--blue)}
#calculator .layout>.card:first-child{border-top-color:#6093cd}#calculator .layout>.card:first-child h2 span{background:#e5effc;color:#3566ad}#calculator .layout>.card:nth-child(2){border-top-color:#30a282}.bottom>.card:nth-child(odd){border-top-color:#dfaa62}.bottom>.card:nth-child(even){border-top-color:#a789cf}
.stat{padding:12px 10px;border-radius:10px;background:#eaf4f0}.stat small{color:#466958}.stat strong{color:#14644e}.stat:nth-child(2){background:#fff1e1}.stat:nth-child(2) small{color:#78542d}.stat:nth-child(2) strong{color:#965119}.stat:nth-child(3){background:#fbeaec}.stat:nth-child(3) small{color:#805460}.stat:nth-child(3) strong{color:#a43b50}.profit{background:linear-gradient(110deg,#d8f2e6,#eaf7df);border:1px solid #bce0cc}.profit small{color:#286644}.profit strong{color:#096748}.badge{color:#285f45;border-color:#a8cdb6;background:#ffffff65}.profit.loss{background:#fdebee;border-color:#efc4cc}.profit.loss small,.profit.loss strong,.profit.loss .badge{color:#a52f47}.profit.loss .badge{border-color:#e4b0bd}
#catalog .card{border-top-color:#d7a347}#catalog .card h2{color:#79521e}#transactions .card{border-top-color:#6295cd}#showSale.active{background:#277b68}#showExpense.active{background:#b44b60}#dashboard .card{border-top-color:#8a75c5}#dashboard h2{color:#674a9b}#dashboard .secondary{background:#eee8f8;border-color:#d8ccef;color:#644896}#dashboard .secondary:hover{background:#e3d9f3}#saved{border-top-color:#5c9bbb}#history{border-top-color:#d3a067}#settings{border-top-color:#8d86bf}#settings h2{color:#615591}
.business-warning{color:#b13946}.movement-sale{border-left:3px solid #40a486;padding-left:14px}.movement-expense{border-left:3px solid #d5798c;padding-left:14px}.movement-stock{border-left:3px solid #d7a347;padding-left:14px}.volume strong,.adjust strong{color:#1f765e}.toast{background:#125f4c}
nav{background:#fffef7f5;border-top-color:#d9e5dc;box-shadow:0 -3px 18px #26463b06}nav button{color:#63766d;border-radius:10px}nav button.active{background:#e1f1e9;color:#08775f}nav button[data-page="catalog"].active{background:#fff0d7;color:#895d19}nav button[data-page="transactions"].active{background:#e4effb;color:#3566ad}nav button[data-page="dashboard"].active,nav button[data-page="settings"].active{background:#efe7f9;color:#7655ad}nav button[data-page="history"].active{background:#fff0e1;color:#985d25}
@media screen and (max-width:700px){.stat{padding:10px 7px}.stat small{font-size:13px}.stat strong{font-size:19px}.card{box-shadow:0 5px 18px #26463b06}}
@media print{body{background:white}.card{border-top:1px solid #ccc;box-shadow:none}.stat,.profit,.profit.loss{background:white!important;color:#111}.stat strong,.profit strong,.profit small{color:#111}}
:root{--ring-track:#e9ece1;--ring-good:#16856f;--ring-loss:#c84958}
.header-tools{display:flex;align-items:center;gap:16px}.theme-toggle{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;font-size:23px;flex:none;border-radius:50%}
@media screen{
 :root[data-theme="dark"]{color-scheme:dark;--ink:#e4eee9;--muted:#b0c3b9;--ring-track:#34453c;--ring-good:#41c5a0;--ring-loss:#ed8499}
 [data-theme="dark"] body{background:radial-gradient(ellipse at 5% 4%,#18352b 0,transparent 38%),radial-gradient(ellipse at 95% 18%,#29243d 0,transparent 34%),#101b17;color:#e4eee9}
 [data-theme="dark"] header{border-bottom-color:#35463c}[data-theme="dark"] h1{color:#a4e6ca}[data-theme="dark"] .eyebrow{color:#77d4af}
 [data-theme="dark"] label,[data-theme="dark"] header small,[data-theme="dark"] .row,[data-theme="dark"] .volume,[data-theme="dark"] .saveditem p,[data-theme="dark"] .business-item p{color:#b4c7bc}
 [data-theme="dark"] .hint,[data-theme="dark"] footer,[data-theme="dark"] .empty,[data-theme="dark"] .ring small{color:#a5bab0}
 [data-theme="dark"] .card{background:#1b2822;border-right-color:#35463c;border-left-color:#35463c;border-bottom-color:#35463c;box-shadow:0 8px 28px #00000025}
 [data-theme="dark"] input,[data-theme="dark"] select{background:#121f19;border-color:#455b4e;color:#e5eee8}[data-theme="dark"] input::placeholder{color:#9caf9f}
 [data-theme="dark"] input:focus,[data-theme="dark"] select:focus{border-color:#54bd92;outline-color:#285b47}
 [data-theme="dark"] h2 span{background:#264939;color:#9ce0bd}[data-theme="dark"] #calculator .layout>.card:first-child h2 span{background:#243c54;color:#a5caff}
 [data-theme="dark"] .secondary{background:#273e30;border-color:#49614e;color:#bde4ca}[data-theme="dark"] .secondary:hover{background:#34513e}
 [data-theme="dark"] .tabs{background:#1b282280;border-color:#3b4b40}[data-theme="dark"] .tabs button{color:#bfd0c5}[data-theme="dark"] .tabs button.active{color:#fff}
 [data-theme="dark"] .stat{background:#203d30}[data-theme="dark"] .stat small{color:#b1d4be}[data-theme="dark"] .stat strong{color:#8fe0b7}
 [data-theme="dark"] .stat:nth-child(2){background:#423220}[data-theme="dark"] .stat:nth-child(2) small{color:#e5c39c}[data-theme="dark"] .stat:nth-child(2) strong{color:#ffd096}
 [data-theme="dark"] .stat:nth-child(3){background:#432933}[data-theme="dark"] .stat:nth-child(3) small{color:#dfb4c3}[data-theme="dark"] .stat:nth-child(3) strong{color:#ffa8bb}
 [data-theme="dark"] .profit{background:linear-gradient(110deg,#204534,#263c27);border-color:#3b7053}[data-theme="dark"] .profit small{color:#b3debd}[data-theme="dark"] .profit strong{color:#91efb4}
 [data-theme="dark"] .badge{background:#192b2080;border-color:#5b8066;color:#c0dec8}[data-theme="dark"] .profit.loss{background:#422631;border-color:#83505f}[data-theme="dark"] .profit.loss small,[data-theme="dark"] .profit.loss strong,[data-theme="dark"] .profit.loss .badge{color:#ffb2c5}[data-theme="dark"] .profit.loss .badge{border-color:#a5657a}
 [data-theme="dark"] .ring>div{background:#1b2822}[data-theme="dark"] .row.total{color:#b2e4c9;border-top-color:#425c4b}
 [data-theme="dark"] #catalog .card h2{color:#edc17c}[data-theme="dark"] #dashboard h2,[data-theme="dark"] #settings h2{color:#cbb1f0}
 [data-theme="dark"] #dashboard .secondary{background:#362b4c;border-color:#645180;color:#d6c0f5}[data-theme="dark"] #dashboard .secondary:hover{background:#493a62}
 [data-theme="dark"] .business-warning{color:#ff9fb0}[data-theme="dark"] .volume strong,[data-theme="dark"] .adjust strong{color:#9be0bd}
 [data-theme="dark"] .business-item,[data-theme="dark"] .saveditem,[data-theme="dark"] .volume{border-bottom-color:#394f40}
 [data-theme="dark"] nav{background:#16231dec;border-top-color:#3d5142;box-shadow:0 -3px 18px #00000030}[data-theme="dark"] nav button{color:#b0c5b7}
 [data-theme="dark"] nav button.active{background:#254735;color:#a2e9bd}[data-theme="dark"] nav button[data-page="catalog"].active{background:#453821;color:#f2cf91}[data-theme="dark"] nav button[data-page="transactions"].active{background:#253d55;color:#b0d5ff}[data-theme="dark"] nav button[data-page="dashboard"].active,[data-theme="dark"] nav button[data-page="settings"].active{background:#3b2e51;color:#dbbdfb}[data-theme="dark"] nav button[data-page="history"].active{background:#493521;color:#efc18d}
}
/* Desktop workspace: sidebar and wider content without changing mobile navigation. */
@media screen and (min-width:1100px){
 header{position:sticky;top:0;z-index:4;max-width:none;height:88px;padding:20px 32px;background:#fafbf5ed;backdrop-filter:blur(16px)}
 [data-theme="dark"] header{background:#142019ed}
 .brand{font-size:25px}.header-tools{gap:28px}header small{font-size:14px}
 .shell{max-width:1480px;margin:0 auto 0 232px;padding:38px clamp(28px,3vw,60px) 60px}
 .shell>h1{font-size:52px;letter-spacing:-2px;margin-top:12px}.shell>.subtitle{font-size:16px;margin-bottom:32px}
 nav{top:88px;bottom:0;left:0;right:auto;width:232px;flex-direction:column;justify-content:flex-start;gap:8px;padding:30px 18px;border-top:0;border-right:1px solid #d9e5dc;overflow-y:auto;overflow-x:hidden;z-index:3;box-shadow:4px 0 24px #26463b04}
 [data-theme="dark"] nav{border-right-color:#3d5142;box-shadow:4px 0 24px #00000015}
 nav::before{content:var(--workspace-label,'ESPAÇO DE TRABALHO');font-size:10px;letter-spacing:1.8px;color:#647b6b;padding:0 12px 16px}
 [data-theme="dark"] nav::before{color:#a6bfae}
 nav button{display:flex;align-items:center;gap:14px;text-align:left;justify-content:flex-start;flex:0 0 auto;min-width:0;min-height:52px;padding:14px 15px;font-size:14px;border-radius:12px}
 nav span{display:inline-block;width:24px;font-size:23px;margin:0;text-align:center}
 nav button:hover{background:#eaf0e8}[data-theme="dark"] nav button:hover{background:#23372a}
 nav button.active{font-weight:600}
 .layout{grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);align-items:start;gap:26px}
 #calculator .layout>.card:nth-child(2){position:sticky;top:112px}
 .card{padding:28px;border-radius:18px;min-width:0}
 .fields{gap:22px 18px}.fields input,.fields select{min-height:50px}
 .bottom{gap:26px;margin-top:26px}.bottom .card{height:100%}
 #catalog{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.15fr);gap:26px;align-items:start}
 #catalog>.card:first-child{grid-column:1;grid-row:1}
 #catalog>#productList{grid-column:2;grid-row:1 / span 2;min-height:280px}
 #catalog>.card:last-child{grid-column:1;grid-row:2}
 #catalog>.card{margin-top:0!important}
 #transactions{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.15fr);gap:26px;align-items:start}
 #transactions>.tabs{grid-column:1/-1;margin-bottom:0;justify-self:start}
 #transactions>.card{margin-top:0!important}
 #transactionList{max-height:calc(100vh - 240px);overflow-y:auto;padding-right:8px}
 #dashboard>.card>.actions{align-items:center}
 #dashboard>.card>.actions>h2{flex:1 1 auto}
 #dashboard .actions .business-actions{width:auto;flex-wrap:wrap;justify-content:flex-end}
 #dashboard .actions .business-actions button{flex:0 0 auto;min-height:44px}
 #dashboard>.card>.fields{max-width:540px}
 #dashboard .stats{gap:20px;margin-top:28px!important}
 #dashboard .stat{padding:20px}.stat strong{font-size:26px}
 #dashboard .profit{padding:24px 28px}#dashboard .profit strong{font-size:42px}
 #dashboard .bottom{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)}
 #settings>label{max-width:540px}#settings>p{max-width:85ch}
 .business-item{gap:20px;padding-top:20px;padding-bottom:20px;flex-wrap:wrap}.business-actions{flex-shrink:0}
 .business-item>div:first-child{min-width:0;flex:1 1 180px;overflow-wrap:anywhere}
 .saveditem{padding:22px 0}.toast{bottom:30px;left:calc(50% + 116px)}
}
@media screen and (min-width:1600px){
 .shell{padding-top:46px}.layout{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}
 .card{padding:32px}.breakdown{grid-template-columns:150px minmax(0,1fr);gap:28px}
 .ring{width:144px;height:144px}.ring>div{width:116px;height:116px}
}
/* Solid neutral dark palette. */
@media screen{
 :root[data-theme="dark"]{--ink:#efeff2;--muted:#b7b7c1;--ring-track:#37373f}
 [data-theme="dark"] body{background:#0c0c0e;color:#efeff2}
 [data-theme="dark"] header,[data-theme="dark"] nav{background:#111113;border-color:#323238;backdrop-filter:none}
 [data-theme="dark"] h1{color:#f1f1f4}
 [data-theme="dark"] .card{background:#18181c;border-left-color:#33333b;border-right-color:#33333b;border-bottom-color:#33333b}
 [data-theme="dark"] input,[data-theme="dark"] select{background:#101013;border-color:#41414a;color:#efeff2}
 [data-theme="dark"] label,[data-theme="dark"] header small,[data-theme="dark"] .row,[data-theme="dark"] .volume,[data-theme="dark"] .saveditem p,[data-theme="dark"] .business-item p{color:#c0c0ca}
 [data-theme="dark"] .hint,[data-theme="dark"] footer,[data-theme="dark"] .empty,[data-theme="dark"] .ring small{color:#ababba}
 [data-theme="dark"] .brand .app-logo,[data-theme="dark"] .primary{background:#08775f;box-shadow:none}
 [data-theme="dark"] .primary:hover{background:#09694f}
 [data-theme="dark"] .secondary,[data-theme="dark"] #dashboard .secondary{background:#26262d;border-color:#46464f;color:#e0e0e8}
 [data-theme="dark"] .secondary:hover,[data-theme="dark"] #dashboard .secondary:hover{background:#33333b}
 [data-theme="dark"] .tabs{background:#18181c;border-color:#3a3a43}
 [data-theme="dark"] .stat,[data-theme="dark"] .stat:nth-child(2),[data-theme="dark"] .stat:nth-child(3){background:#222228}
 [data-theme="dark"] .stat small,[data-theme="dark"] .stat:nth-child(2) small,[data-theme="dark"] .stat:nth-child(3) small{color:#c1c1cb}
 [data-theme="dark"] .profit{background:#202024;border-color:#466454}
 [data-theme="dark"] .profit.loss{background:#252125;border-color:#805060}
 [data-theme="dark"] .badge{background:#25252b;border-color:#555560;color:#d3d3dd}
 [data-theme="dark"] .ring>div{background:#18181c}
 [data-theme="dark"] .row.total,[data-theme="dark"] .business-item,[data-theme="dark"] .saveditem,[data-theme="dark"] .volume{border-color:#3a3a43}
 [data-theme="dark"] nav button{color:#bebecb}
 [data-theme="dark"] nav button:hover{background:#232329}
 [data-theme="dark"] nav button.active,[data-theme="dark"] nav button[data-page="catalog"].active,[data-theme="dark"] nav button[data-page="transactions"].active,[data-theme="dark"] nav button[data-page="dashboard"].active,[data-theme="dark"] nav button[data-page="settings"].active,[data-theme="dark"] nav button[data-page="history"].active{background:#292930}
}

.language-control{margin:0}.language-control select{margin:0;width:110px;min-height:44px;padding:9px 10px;font-size:13px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media screen and (max-width:700px){header{gap:12px;flex-wrap:wrap}.header-tools{gap:8px}.brand{font-size:18px}.language-control select{width:96px}}

.language-control{display:flex;align-items:center;gap:2px;color:#63736a}.language-control button{border:0;background:transparent;color:#64746b;font-size:13px;font-weight:500;min-width:40px;min-height:44px;padding:8px 6px;border-radius:7px}.language-control button[aria-pressed="true"]{color:#08775f;font-weight:700;background:#e3f0e8}.language-control button:hover{background:#eaf0e8}@media screen{[data-theme="dark"] .language-control{color:#777783}[data-theme="dark"] .language-control button{color:#b5b5c2}[data-theme="dark"] .language-control button[aria-pressed="true"]{background:#292930;color:#a2e9bd}[data-theme="dark"] .language-control button:hover{background:#232329}}

.stat strong{white-space:normal;overflow-wrap:anywhere;line-height:1.25}.ring small{text-align:center;line-height:1.3}
