*{box-sizing:border-box} :root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#182c35;background:#f3f6f8;font-size:16px;font-synthesis:none;--green:#103c32;--accent:#217159;--border:#dce4e8;--muted:#60717b}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button,a{cursor:pointer}a{color:inherit}button:focus-visible,a:focus-visible,input:focus,select:focus,textarea:focus{outline:3px solid #6da8e2;outline-offset:3px}input,select,textarea{min-height:44px;border:1px solid #c8d4da;border-radius:8px;padding:10px 12px;color:#172d36;background:#fff;max-width:100%}input[type=number]{font-variant-numeric:tabular-nums}textarea{width:100%;min-height:90px}label{font-size:.875rem;font-weight:600;color:#455963;display:flex;flex-direction:column;gap:7px}h1,h2,h3,p{margin:0}h1{font-size:1.8rem;letter-spacing:-.04em}h2{font-size:1.2rem;letter-spacing:-.02em}h3{font-size:1rem}small{font-size:.8rem;line-height:1.5}.sidebar{position:fixed;inset:0 auto 0 0;width:230px;background:var(--green);color:#fff;padding:32px 22px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:1.22rem;font-weight:650;line-height:1.1;margin:0 8px 48px}.brand small{display:block;font-size:.72rem;letter-spacing:.19em;font-weight:400;opacity:.6;margin-top:7px}.brand-icon{display:grid;place-items:center;width:42px;height:46px;border:1px solid #74978a;border-radius:10px;font-size:1.7rem}.sidebar nav{display:flex;flex-direction:column;gap:8px}.sidebar nav a{display:flex;align-items:center;gap:14px;padding:14px 12px;border-radius:8px;text-decoration:none;font-size:.875rem;color:#c9ddd6}.sidebar nav a span{font-size:.75rem;opacity:.5}.sidebar nav a.active{background:#285749;color:white}.sidebar-bottom{margin-top:auto;padding:20px 8px 0;font-size:.875rem;color:#c9ddd6;display:flex;flex-direction:column;gap:14px}.sidebar-bottom small{margin-top:10px;opacity:.7}.subtle{padding:0;text-align:left;background:none;border:0;color:inherit;font-size:.875rem;font-weight:400;min-height:24px}.workspace{margin-left:230px}.topbar{min-height:116px;border-bottom:1px solid var(--border);padding:26px 36px;display:flex;gap:20px;justify-content:space-between;align-items:center;background:#fff}.eyebrow{font-size:.72rem;letter-spacing:.14em;font-weight:700;color:var(--muted);margin-bottom:10px}.header-actions{display:flex;align-items:center;gap:22px}.header-actions>span{font-size:.8rem;color:var(--muted)}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--border);border-radius:8px;background:#fff;color:#213b45;font-weight:600;font-size:.875rem;text-decoration:none;white-space:normal}.button.primary{background:var(--green);color:#fff;border-color:var(--green)}.button:hover{filter:brightness(.96)}.button:disabled{opacity:.45;cursor:not-allowed}.file-label{cursor:pointer;flex-direction:row}.button.small{padding:8px 11px;min-height:36px;font-size:.8rem}.icon-button{border:0;background:none;font-size:1.6rem;min-width:44px;min-height:44px;color:#65757b}main{padding:28px 36px;max-width:1680px;margin:auto;min-height:70vh}.loading,.empty{padding:70px 30px;text-align:center;color:var(--muted)}.empty h2{color:var(--green);font-size:1.5rem;margin-bottom:16px}.empty p{max-width:500px;margin:0 auto 24px;line-height:1.7}.context{display:flex;justify-content:space-between;gap:20px;margin-bottom:25px;align-items:end}.context select{max-width:600px;min-width:240px}.context-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.context .actions,.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.muted{color:var(--muted);font-size:.875rem;line-height:1.6}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0 26px}.kpi{background:white;border:1px solid var(--border);border-radius:12px;padding:22px;min-width:0}.kpi .label{color:var(--muted);font-size:.85rem;margin-bottom:14px}.kpi strong{display:block;font-size:1.8rem;font-weight:650;letter-spacing:-.045em;font-variant-numeric:tabular-nums}.kpi strong span{font-weight:400;font-size:.875rem;letter-spacing:0;color:var(--muted);margin-left:6px}.kpi small{display:block;color:var(--muted);margin-top:8px}.kpi.emphasis{background:var(--green);color:#fff;border-color:var(--green)}.kpi.emphasis .label,.kpi.emphasis small,.kpi.emphasis strong span{color:#bad3c8}.workgrid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start}.panel{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden;margin-bottom:22px}.panel-head{padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid var(--border)}.panel-body{padding:24px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.fields-row{display:flex;gap:16px;align-items:end;flex-wrap:wrap}.fields-row label{flex:1;min-width:130px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:.875rem;font-variant-numeric:tabular-nums}th{padding:14px 14px;text-align:right;background:#f7f9fa;color:var(--muted);font-size:.75rem;font-weight:600;line-height:1.4}td{padding:15px 14px;border-bottom:1px solid #edf1f3;text-align:right;vertical-align:middle}th:first-child,td:first-child{text-align:left}td:first-child{min-width:170px}tr:last-child td{border-bottom:0}tfoot td{background:#eef5f2;font-weight:700;padding:18px 14px}.feed-name{display:block;font-weight:600;font-size:.9rem;line-height:1.45;color:#223a41}.feed-sub{font-size:.75rem;color:#73868e;display:block;margin-top:5px}.qty-input{width:83px;text-align:right;padding:9px;min-height:40px;background:#f5faf8;border-color:#c8d9d0}.feed-tools{display:flex;gap:5px;justify-content:end}.link-button{border:0;background:none;padding:7px 0;color:var(--accent);font-size:.82rem;font-weight:600;text-decoration:none}.stat-line{display:flex;gap:16px;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #eaf0f1;font-size:.875rem}.stat-line:last-child{border-bottom:0}.stat-line strong{font-weight:600;text-align:right;font-variant-numeric:tabular-nums}.section-note{border-top:1px solid var(--border);padding:15px 24px;color:var(--muted);font-size:.8rem;line-height:1.6}.error{color:#a23731;background:#fff0ed;padding:14px 18px;border-radius:8px;line-height:1.6;margin:16px 0;font-size:.875rem}.error:empty{display:none}.notice{background:#edf4fb;color:#36566f;padding:14px 18px;border-radius:8px;font-size:.875rem;line-height:1.6;margin-bottom:22px}.composition-bar{height:10px;display:flex;gap:3px;margin:8px 0 20px;border-radius:4px;overflow:hidden}.composition-bar span{min-width:2px}.dot-label{display:flex;align-items:center;gap:10px}.dot-label i{width:8px;height:8px;border-radius:2px;flex-shrink:0}.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.food-card{padding:22px;background:#fff;border:1px solid var(--border);border-radius:12px;display:flex;flex-direction:column;gap:18px}.food-card h3{line-height:1.5;min-height:48px}.food-card dl{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0}.food-card dt{font-size:.75rem;color:var(--muted);margin-bottom:6px}.food-card dd{font-size:.95rem;margin:0;font-weight:600}.food-card .actions{margin-top:auto}.search{min-width:260px;width:360px;max-width:100%}.report-page{max-width:1100px;margin:0 auto;background:white;border:1px solid var(--border);border-radius:12px;padding:34px}.report-title{display:flex;justify-content:space-between;align-items:start;gap:25px;border-bottom:3px solid var(--green);padding-bottom:24px;margin-bottom:22px}.report-title h2{font-size:1.7rem;margin:10px 0}.report-title .brand-icon{color:var(--green);flex-shrink:0}.report-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:24px 0}.report-meta strong{display:block;font-size:1rem;margin-top:4px}.report-page h3{margin:25px 0 14px}.report-page table{font-size:.8rem}.report-page th{font-size:.72rem}.report-page .report-foot{border-top:1px solid var(--border);margin-top:30px;padding-top:14px;font-size:.75rem;line-height:1.6;color:var(--muted)}footer{padding:10px 36px 30px;font-size:.75rem;line-height:1.6;color:var(--muted)}dialog{border:0;border-radius:16px;box-shadow:0 20px 120px #0c283744;padding:0;width:min(850px,calc(100vw - 30px));max-height:90vh;color:#1b333e}dialog::backdrop{background:#0d27376b;backdrop-filter:blur(2px)}.dialog-head{display:flex;justify-content:space-between;align-items:start;padding:25px 28px;border-bottom:1px solid var(--border)}#food-fields{padding:24px 28px}.dialog-actions{display:flex;justify-content:end;gap:12px;padding:20px 28px;border-top:1px solid var(--border);position:sticky;bottom:0;background:white}.dialog-actions+.error{margin:15px}details{border:1px solid var(--border);border-radius:9px;margin:16px 0;overflow:hidden}summary{padding:16px;font-size:.9rem;font-weight:600;cursor:pointer;background:#f7f9fa}details .form-grid{padding:18px}.input-hint{font-size:.75rem;color:var(--muted);font-weight:400;line-height:1.5}.unit-tag{font-weight:400;color:var(--muted)}#toast{position:fixed;bottom:25px;right:25px;padding:15px 22px;background:#163e33;color:white;border-radius:9px;box-shadow:0 8px 30px #0d283333;display:none;z-index:100;max-width:calc(100vw - 40px)}#print-report{display:none}.tabs-note{display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:#f7f9fa}.danger-text{color:#a23731}.positive{color:#217159}.screen-note{margin:16px 0 0}.subheading{margin:25px 0 15px}.table-footnote{font-size:.75rem;color:var(--muted);padding:15px 0;line-height:1.6}
@media(min-width:1500px){.workgrid{grid-template-columns:minmax(0,1fr) 340px}main{padding:34px 44px}.topbar{padding-left:44px;padding-right:44px}}
@media(max-width:1200px){.sidebar{width:195px;padding:30px 14px}.workspace{margin-left:195px}.workgrid{grid-template-columns:1fr}.secondary-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.library-grid{grid-template-columns:repeat(2,1fr)}main{padding:25px}.topbar{padding:22px 25px}.kpi{padding:18px}.kpi strong{font-size:1.5rem}}
@media(max-width:800px){.sidebar{width:100%;inset:auto 0 0;height:76px;padding:0 10px;background:var(--green);padding-bottom:env(safe-area-inset-bottom)}.brand,.sidebar-bottom{display:none}.sidebar nav{flex-direction:row;height:100%;justify-content:space-around;align-items:stretch}.sidebar nav a{flex:1;flex-direction:column;justify-content:center;gap:5px;padding:10px 4px;border-radius:0;font-size:.73rem;text-align:center}.sidebar nav a span{font-size:.7rem}.workspace{margin-left:0;padding-bottom:76px}.topbar{padding:20px;min-height:102px;align-items:center}.topbar h1{font-size:1.5rem}.header-actions>span{display:none}.header-actions{gap:0}.eyebrow{font-size:.65rem;letter-spacing:.12em}.button{padding:10px 13px}main{padding:18px}.context{align-items:stretch;flex-direction:column;gap:13px}.context select{width:100%;min-width:0;max-width:none}.context .actions{justify-content:flex-start}.kpis{grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}.kpi{padding:17px 15px}.kpi .label{font-size:.8rem;margin-bottom:10px}.kpi strong{font-size:1.5rem}.kpi strong span{font-size:.75rem}.panel-head,.panel-body{padding:18px}.form-grid{grid-template-columns:1fr 1fr}.secondary-grid{display:block}.library-grid{grid-template-columns:1fr}.report-page{padding:20px;border-radius:9px}.report-title h2{font-size:1.25rem}.report-meta{grid-template-columns:1fr 1fr}.report-page .table-wrap{margin:0 -10px}.report-page th,.report-page td{padding:10px 8px}.report-title .brand-icon{display:none}footer{padding:0 20px 25px}#toast{bottom:94px}.food-card h3{min-height:0}.search{width:100%;min-width:0}.feed-table thead{display:none}.feed-table tr{display:grid;grid-template-columns:repeat(3,1fr);padding:15px 18px;border-bottom:1px solid var(--border);gap:12px}.feed-table td{border:0;padding:0;text-align:left;font-size:.875rem;min-width:0}.feed-table td:first-child{grid-column:1/-1}.feed-table td::before{content:attr(data-label);display:block;font-size:.72rem;color:var(--muted);margin-bottom:6px}.feed-table td:first-child::before{display:none}.feed-table td.actions-cell{grid-column:1/-1}.feed-table tfoot tr{display:flex;justify-content:space-between;background:#edf5f1}.feed-tools{justify-content:start}.qty-input{width:100%;max-width:110px}.form-grid.two{grid-template-columns:1fr 1fr}.dialog-head{padding:20px}#food-fields{padding:18px}.dialog-actions{padding:18px}.context-title{align-items:stretch;flex-direction:column}.form-grid label{font-size:.85rem}details .form-grid{padding:15px}.panel-head h2{font-size:1.06rem}}
@media(max-width:420px){.form-grid,.form-grid.two{grid-template-columns:1fr}.header-actions .button{font-size:.8rem;padding:9px 12px}.kpi strong{font-size:1.4rem}.kpi strong span{display:block;margin:5px 0 0}.report-meta{grid-template-columns:1fr 1fr}.food-card .button.small{flex:1}.feed-table tr{gap:14px 8px}}
@media print{@page{size:A4 landscape;margin:12mm}body{background:white;color:#111;font-size:10pt}.sidebar,.workspace,dialog,#toast{display:none!important}#print-report{display:block!important}.report-page{border:0;padding:0;max-width:none}.report-title{margin-bottom:10px;padding-bottom:12px}.report-title h2{font-size:18pt}.report-meta{margin:12px 0}.report-meta strong{font-size:10pt}.report-page table{font-size:9pt}.report-page th{font-size:8pt}.report-page td,.report-page th{padding:8px}.report-page h3{font-size:11pt;margin-top:18px}.report-page .report-foot{margin-top:15px;font-size:8pt}.report-page .muted{font-size:9pt}.report-page .table-wrap{overflow:visible}tr{break-inside:avoid}thead{display:table-header-group}tfoot{display:table-row-group}.no-print{display:none!important}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

.brand{flex-direction:column;align-items:flex-start}.brand-logo{width:100px;height:100px;object-fit:contain;background:white;border-radius:12px}.report-logo{width:85px;height:85px;object-fit:contain}.report-title>div{flex:1}.account-bar{display:flex;justify-content:flex-end;align-items:center;gap:18px;padding:8px 36px;font-size:12px;color:#53665f;background:#fff}.locked>.sidebar,.locked>.workspace,.locked>#print-report{display:none!important}#auth-gate{min-height:100vh;display:grid;place-items:center;padding:24px;background:#eff3f1}.auth-card{width:min(100%,450px);padding:34px;background:#fff;border:1px solid #dce5df;border-radius:20px;box-shadow:0 24px 70px #103c3212}.auth-logo{width:150px;height:150px;object-fit:contain;display:block;margin:0 auto 20px}.auth-card h1{font-size:27px}.auth-card form{display:grid;gap:16px;margin-top:24px}.auth-card .button{width:100%}.auth-card p{line-height:1.55}#auth-message{color:#9d372e;font-size:14px;margin:0}.account-bar span{overflow-wrap:anywhere}#access-form{align-items:end}.report-title{align-items:center}@media(max-width:800px){.sidebar nav{grid-template-columns:repeat(5,1fr)}.account-bar{padding:8px 18px}.account-bar span{font-size:11px}}@media print{.report-logo{width:70px;height:70px}details>summary{display:none}.report-page tr{break-inside:avoid}}

.food-list{background:white;border:1px solid #dce5df;border-radius:12px;overflow:hidden}.food-list-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 20px;border-bottom:1px solid #edf1ed}.food-list-row:last-child{border:0}.food-list-name{background:none;border:0;text-align:left;font:inherit;font-weight:600;color:#153e33;cursor:pointer}.food-list-name:hover{text-decoration:underline}.food-list-row .actions{flex-wrap:nowrap}.client-list{display:grid;gap:10px;margin:20px 0}.client-item{display:flex;flex-direction:column;gap:6px;text-align:left;border:1px solid #dce5df;background:#fff;padding:15px;border-radius:10px;cursor:pointer}.client-item.selected{background:#e9f3ed;border-color:#50806a}.client-item small{color:#67786f}.context>label{max-width:280px}.fields-row{align-items:end}.report-page details{break-before:auto}@media(max-width:800px){.sidebar nav{display:flex;overflow-x:auto}.sidebar nav a{flex:0 0 90px}.food-list-row{padding:12px;gap:8px}.food-list-name{font-size:13px}.food-list-row .actions{gap:5px}.food-list-row .button{padding:8px;font-size:12px}.secondary-grid{grid-template-columns:1fr}}

#toast.show{display:block}.backup-actions{margin-bottom:22px}.panel-body>.form-grid+label{margin-top:20px}.panel-body>label+.actions{margin-top:20px}@media(max-width:800px){.report-title{flex-wrap:wrap}.report-title>div{min-width:160px}.report-title h2{overflow-wrap:anywhere}.context>label{max-width:none}}

/* Formulation and its calculation monitor remain visible together on wide screens. */
.formulation-grid{grid-template-columns:minmax(0,1fr) minmax(380px,430px);gap:20px}
.formulation-grid>*{min-width:0}.diet-editor .table-wrap{max-width:100%}.diet-editor th,.diet-editor td{padding:12px 10px}.diet-editor .feed-tools{gap:5px}.diet-editor .qty-input{width:82px}.diet-editor .feed-sub{font-size:.7rem}.diet-editor .panel-head{padding:20px}.diet-editor .panel-head h2{font-size:1.12rem}
.nutrition-monitor{position:sticky;top:18px;display:flex;flex-direction:column;max-height:calc(100dvh - 36px);box-shadow:0 6px 22px #103c3209}
.monitor-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:18px 18px 14px;background:#f3f8f5}.monitor-heading h2{font-size:1.08rem}.monitor-heading .eyebrow{margin-bottom:5px;font-size:.62rem}.monitor-status{font-size:.68rem;white-space:nowrap;color:var(--accent);padding:5px 7px;border:1px solid #cbded2;border-radius:20px}
.monitor-tabs{display:flex;gap:4px;flex-wrap:wrap;padding:10px 12px;background:#fff;border-bottom:1px solid var(--border);flex-shrink:0}.monitor-tabs button{border:0;border-radius:6px;background:#f0f4f2;color:#50645a;padding:10px;font-size:.75rem;font-weight:650;min-height:36px}.monitor-tabs button[aria-selected=true]{background:var(--green);color:#fff}.monitor-tabs button:hover{filter:brightness(.96)}
.monitor-content{overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;min-height:100px}.monitor-content[aria-busy=true]{opacity:.65}.monitor-section{padding:0 16px 14px}.monitor-section h3{font-size:.82rem;background:#eef4f0;color:#255542;padding:10px 12px;margin:14px -4px 4px;border-radius:6px}.monitor-stat{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:9px 0;border-bottom:1px solid #edf1ee;font-size:.77rem;line-height:1.4}.monitor-stat strong{text-align:right;font-size:.85rem;font-weight:650;font-variant-numeric:tabular-nums}.monitor-stat small{font-size:.69rem;font-weight:400;color:var(--muted)}.monitor-note{font-size:.71rem;line-height:1.55;color:var(--muted);margin-top:10px}.monitor-message{padding:22px;font-size:.85rem;line-height:1.6}.monitor-message.error{margin:14px}
.monitor-table{font-size:.74rem}.monitor-table th,.monitor-table td{padding:9px 5px;font-size:inherit}.monitor-table th:first-child,.monitor-table td:first-child{min-width:0}.monitor-table th[scope=row]{background:transparent;font-weight:600;color:#314b40}.monitor-table th small{display:block;font-size:.64rem;font-weight:400;white-space:nowrap}.monitor-total{background:#edf4ef}.monitor-total td{font-weight:700}.monitor-close,.monitor-launch{display:none}
@media(min-width:1100px) and (max-width:1450px){.workspace main{padding-left:22px;padding-right:22px}.formulation-grid{grid-template-columns:minmax(0,1fr) 390px;gap:16px}.diet-editor .feed-tools{flex-direction:column}.diet-editor .panel-head{padding:16px}.diet-editor th,.diet-editor td{padding:10px 7px}}
@media(max-width:1099px){.formulation-grid{grid-template-columns:minmax(0,1fr)}.monitor-launch{display:inline-flex;position:fixed;right:22px;bottom:22px;z-index:12;box-shadow:0 5px 24px #103c3240}.nutrition-monitor{display:none;position:fixed;top:auto;right:18px;bottom:18px;width:min(490px,calc(100vw - 36px));max-height:65dvh;margin:0;z-index:15;box-shadow:0 12px 70px #103c3240}.nutrition-monitor.is-open{display:flex}.monitor-close{display:block}.nutrition-monitor.is-open~.monitor-launch{display:none}.monitor-content{min-height:0}.monitor-heading{padding:12px 16px}.monitor-tabs{padding:8px 12px}.monitor-tabs button{min-height:36px;padding:8px 10px}}
@media(max-width:800px){.monitor-launch{bottom:calc(88px + env(safe-area-inset-bottom));right:16px}.nutrition-monitor{right:8px;bottom:calc(84px + env(safe-area-inset-bottom));width:calc(100vw - 16px);max-height:56dvh;border-radius:14px}.monitor-heading h2{font-size:1rem}.monitor-status{font-size:.62rem}.monitor-tabs button{font-size:.71rem}.monitor-section{padding-left:12px;padding-right:12px}.monitor-stat{font-size:.74rem}.monitor-table th,.monitor-table td{padding:8px 4px;font-size:.7rem}.diet-editor .qty-input{width:100%}.diet-editor th,.diet-editor td{padding:0}.diet-editor .feed-tools{flex-direction:row}.workspace footer{padding-bottom:82px}}

.monitor-launch[aria-expanded=true]{display:none}

/* Prazo de acesso por pessoa. */
.report-consumption .period-consumption{background:#edf4ef;font-weight:600}.report-consumption .total{font-weight:700}.report-consumption th[scope=row]{text-align:left}.report-consumption thead th:nth-last-child(-n+2){background:#e3eee7;color:#103c32}
.access-add-form{display:grid;grid-template-columns:minmax(200px,1fr) 150px auto;gap:16px;align-items:end}
.access-term-form{display:flex;align-items:end;gap:10px;margin-bottom:10px}
.access-term-form label{min-width:72px;max-width:90px;font-size:14px}
.access-table th:first-child{max-width:260px;overflow-wrap:anywhere}
.access-table td{min-width:120px;vertical-align:top}
.access-table td:last-child{min-width:220px}
@media(max-width:700px){.access-add-form{grid-template-columns:1fr}.access-add-form button{width:100%}}

/* Receitas de pré-mistura e ficha de pesagem. */
.sidebar{overflow-y:auto}.premix-workgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.premix-workgrid>*{min-width:0}.premix-editor .form-grid.two{grid-template-columns:1fr}.premix-editor .section-note{padding:14px 0}.premix-batch-field input{font-size:1.3rem;font-weight:700;background:#f3f8f5;border-color:#8bb29e}.premix-batch-field small{font-weight:400}.premix-add-row{display:flex;align-items:end;gap:10px}.premix-add-row label{flex:1;min-width:0}.premix-editor .actions{margin-top:18px}.premix-ingredients th,.premix-ingredients td{padding:12px 10px}.premix-ingredients th[scope=row]{background:transparent;color:#223a41;font-size:.85rem;overflow-wrap:anywhere}.premix-ingredients input{width:130px;max-width:none}.premix-row-tools{display:flex}.premix-row-tools .icon-button{min-width:32px;font-size:1.25rem}.icon-button:disabled{opacity:.3;cursor:default}.premix-sheet{background:#fff;color:#111;padding:26px;border:1px solid #dce4e8;border-radius:12px;overflow-wrap:anywhere}.premix-sheet-brand{display:flex;gap:14px;align-items:center;margin-bottom:18px}.premix-sheet-brand img{width:65px;height:65px;object-fit:contain}.premix-sheet-brand strong{font-size:.86rem}.premix-sheet-brand p{font-size:.73rem;line-height:1.5}.premix-sheet>h2{font-size:1.35rem;margin-bottom:12px}.premix-sheet>p{font-size:.85rem;line-height:1.5}.premix-batch-total{margin:18px 0;border:2px solid #222;padding:14px}.premix-batch-total span{display:block;font-size:.78rem;text-transform:uppercase;letter-spacing:.06em}.premix-batch-total strong{display:block;font-size:1.9rem;margin-top:5px;font-variant-numeric:tabular-nums}.premix-print-table th,.premix-print-table td{padding:12px 8px;color:#111;border:1px solid #bbb;min-width:0}.premix-print-table thead th{background:#ececec;font-size:.72rem}.premix-print-table th[scope=row]{text-align:left;background:#fff;font-size:.82rem}.premix-print-table td{font-size:.88rem;white-space:nowrap}.premix-print-table td:first-child{text-align:center}.premix-print-table .total{background:#ececec;font-weight:700}.premix-print-table .total th{text-align:left}.premix-sheet .premix-print-note{font-size:.72rem;margin-top:16px;line-height:1.5}.premix-print-notes{margin-top:20px;line-height:1.6}.premix-print-notes h3{margin-bottom:8px}.premix-signature{margin-top:26px;font-size:.8rem;line-height:2.5}.premix-source-list{display:grid;gap:8px;margin:18px 0}.premix-source-list label{display:flex;flex-direction:row;gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:8px}.premix-source-list input{min-height:24px;width:22px;height:22px;flex-shrink:0}.premix-source-list small{display:block;font-weight:400;color:var(--muted)}#premix-source-form .panel-body>p{line-height:1.6;margin-bottom:12px}#premix-source-dialog{max-width:650px}.diet-editor .panel-head{flex-wrap:wrap}
@media(max-width:1250px){.premix-workgrid{grid-template-columns:1fr}.premix-editor .form-grid.two{grid-template-columns:1fr 1fr}.premix-sheet{max-width:800px;margin:auto}}
@media(max-width:600px){.premix-editor .form-grid.two{grid-template-columns:1fr}.premix-sheet{padding:16px}.premix-print-table{min-width:470px}.premix-ingredients{min-width:490px}.premix-add-row{flex-wrap:wrap}.premix-add-row label{flex-basis:100%}.premix-sheet-brand strong{font-size:.78rem}.premix-batch-total strong{font-size:1.7rem}.premix-signature{line-height:1.9}.premix-signature p{margin-top:10px}}
@media print{
  @page premix{size:A4 portrait;margin:12mm}
  .premix-sheet{page:premix;border:0;border-radius:0;padding:0;max-width:none;font-size:11pt}
  .premix-sheet-brand img{width:23mm;height:23mm}.premix-sheet-brand strong{font-size:15pt}.premix-sheet-brand p{font-size:10pt}
  .premix-sheet>h2{font-size:19pt}.premix-sheet>p{font-size:11pt}.premix-batch-total strong{font-size:25pt}
  .premix-sheet .table-wrap{overflow:visible}.premix-print-table{min-width:0;width:100%}
  .premix-print-table th,.premix-print-table td{padding:3mm 2mm}.premix-print-table th[scope=row],.premix-print-table td{font-size:13pt}.premix-print-table thead th{font-size:10pt}
  .premix-sheet .premix-print-note{font-size:9pt}.premix-print-notes,.premix-signature{font-size:11pt}
  .premix-batch-total,.premix-signature{break-inside:avoid}.premix-print-notes h3{break-after:avoid}
}

/* Árvore de proprietários, fazendas e dietas. */
.tree,.tree ul{list-style:none;margin:0;padding:0}.tree{max-width:940px}.tree>li+li{margin-top:14px}
.tree ul{margin-left:22px;padding-left:22px}
.tree ul>li{--mid:38px;position:relative;padding-top:10px}
.tree ul>li::before{content:"";position:absolute;left:-22px;top:0;bottom:0;border-left:2px solid #c9d9d0}
.tree ul>li:last-child::before{bottom:auto;height:var(--mid)}
.tree ul>li::after{content:"";position:absolute;left:-22px;top:var(--mid);width:20px;border-top:2px solid #c9d9d0}
.tree ul>li.tree-tools{--mid:28px}.tree ul>li.tree-add{--mid:32px}.tree ul>li.tree-empty{--mid:22px}
.tree-toggle,.tree-leaf{display:flex;align-items:center;gap:10px;width:100%;border:1px solid var(--border);border-radius:10px;background:#fff;color:inherit;text-align:left}
.tree-toggle{min-height:56px;padding:10px 16px 10px 14px}
.tree-leaf{justify-content:space-between;padding:12px 14px;border-left:4px solid #8fb9a3;border-radius:8px}
.tree-toggle:hover,.tree-leaf:hover{background:#f5faf7}
.tree-toggle.selected{background:#e9f3ed;border-color:#50806a}
.tree>li>.tree-row .tree-toggle{background:#f3f8f5;border-color:#c9dbd0}.tree>li>.tree-row .tree-toggle:hover{background:#ebf4ee}.tree>li>.tree-row .tree-toggle strong{font-size:1.02rem}
.tree-label{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0;overflow-wrap:anywhere}.tree-label small{color:#67786f}
.tree-chevron{flex:none;width:8px;height:8px;margin:0 6px 0 4px;border:solid var(--accent);border-width:0 2px 2px 0;transform:rotate(-45deg);transition:transform .15s}
.tree-toggle[aria-expanded=true] .tree-chevron{transform:rotate(45deg)}
.tree-go{flex:none;font-size:.78rem;font-weight:650;color:var(--accent)}
.tree-tools{display:flex;flex-wrap:wrap;gap:8px}
.tree-empty{color:var(--muted);font-size:.85rem;line-height:1.5}
.tree-add form{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.tree-add input{flex:1;min-width:180px}
.tree-hint{margin-top:14px}.panel-head.tree-head{flex-wrap:wrap}
@media(max-width:800px){.tree ul{margin-left:20px;padding-left:14px}.tree ul>li::before{left:-14px}.tree ul>li::after{left:-14px;width:12px}.tree-toggle{padding:10px 12px}.tree-add input{min-width:0;flex-basis:100%}}
@media(max-width:600px){#client-form>label{flex:1 1 100%}}
@media(prefers-reduced-motion:reduce){.tree-chevron{transition:none}}

/* Local laboratory report review */
#lab-dialog{width:min(1100px,96vw);max-height:94dvh;padding:0;border:0;border-radius:16px}
#lab-dialog .panel-body{padding:24px}#lab-dialog h3{margin:22px 0 12px}
#lab-dialog .lab-table{min-width:680px;width:100%}.lab-table th:first-child{min-width:160px;text-align:left}.lab-table td:nth-child(3){min-width:280px}.lab-table select{width:100%;max-width:420px}.lab-table input{width:110px}.lab-table input[readonly]{background:#f0f4f1;color:#364d43}.lab-table small{display:block;max-width:420px;white-space:normal;margin-top:5px;color:#526560}
.lab-notice{padding:12px 15px;background:#fff7dc;border-left:3px solid #b98b30;border-radius:5px}.lab-summary{margin:16px 0;background:#edf4ef;padding:16px;border-radius:10px}.lab-text{white-space:pre-wrap;font-size:12px;max-height:300px;overflow:auto}.lab-confirm{display:flex;gap:12px;align-items:flex-start;margin:24px 0}.lab-confirm input{width:20px;min-width:20px;height:20px}.lab-origin{margin:14px 0;padding:12px;background:#edf4ef}.lab-origin ul{padding-left:24px}#lab-dialog [hidden]{display:none!important}
@media(max-width:600px){#lab-dialog .panel-body{padding:16px}#lab-dialog .dialog-head{padding:16px}#lab-dialog .dialog-actions{flex-wrap:wrap}#lab-dialog .dialog-actions button{flex:1}}

/* Planejamento e viabilidade vinculados à dieta em edição. */
.feedlot-editor .panel-body>.muted{margin-bottom:20px}.feedlot-editor .actions{margin-top:18px}.phase-editor{min-width:620px}.phase-editor input,.phase-editor select{width:100%}.phase-editor td:first-child{min-width:150px}.phase-editor td:nth-child(2){min-width:220px}.phase-editor td:nth-child(3){width:100px;min-width:90px}.phase-editor+.button{margin-top:16px}.feedlot-report{max-width:none}.feedlot-report .kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.feedlot-report .kpi strong{font-size:1.4rem}.report-consumption th[scope=row]{background:transparent}.premix-ingredients input[data-premix-dm]{width:95px}
@media(max-width:650px){.feedlot-report .kpis{grid-template-columns:1fr 1fr}.feedlot-report .kpi{padding:12px}.feedlot-report .kpi strong{font-size:1.2rem}}
@media print{.feedlot-report .kpis{grid-template-columns:repeat(3,1fr)}.feedlot-report .kpi{padding:10px;break-inside:avoid}.feedlot-report .kpi strong{font-size:14pt}.feedlot-report .report-title,.feedlot-report h3{break-after:avoid}.report-consumption th,.report-consumption td{padding:5px}.premix-print-table th[scope=row],.premix-print-table td{font-size:10pt}.premix-print-table thead th{font-size:9pt}.report-page{overflow-wrap:anywhere}}

.farm-context{display:grid;gap:10px;margin:0 0 20px;min-width:0}.farm-context label{display:grid;gap:5px;color:#e2ede8;font-size:12px;font-weight:600}.farm-context select{width:100%;min-width:0;max-width:100%;padding:9px 8px;border:1px solid #62857a;border-radius:8px;background:#fff;color:#173c32;font:inherit;font-size:13px}.farm-context select:disabled{opacity:.7}@media(max-width:800px){.farm-context{grid-template-columns:1fr 1fr;margin-bottom:12px}}
.sidebar>*{flex-shrink:0}
@media(max-width:800px){.sidebar{height:auto}.farm-context{padding:8px 0 0;margin-bottom:4px}.sidebar nav{min-height:70px}.workspace{padding-bottom:150px}.monitor-launch,.nutrition-monitor,#toast{bottom:calc(164px + env(safe-area-inset-bottom))}}
.farm-document-dialog{width:min(1100px,96vw);max-height:94dvh;border:0;border-radius:14px;padding:20px}.farm-document-dialog .report-page{max-width:none}.farm-document-dialog>.actions{margin:12px 0}@media print{.farm-document-dialog{display:none!important}}
.feed-order{display:flex;gap:2px}.feed-order .icon-button{font-size:1.15rem}.feed-order .icon-button:disabled{opacity:.25;cursor:default}
/* Controles compactos da dieta, sempre na mesma linha. */
.diet-editor td.feed-tools{display:table-cell;vertical-align:middle;width:1%;white-space:nowrap}
.diet-editor .feed-actions,.diet-editor .feed-order{display:flex;flex-direction:row;align-items:center;gap:2px;flex-wrap:nowrap}
.diet-editor .feed-actions .icon-button{min-width:30px;width:30px;min-height:32px;height:32px;padding:2px;font-size:1.1rem;line-height:1;border-radius:6px}
.diet-editor .feed-actions .icon-button:hover:not(:disabled){background:#e5eee9}
@media(min-width:801px){.diet-editor td{padding-top:7px;padding-bottom:7px;vertical-align:middle}.diet-editor .feed-name{padding:2px 0;line-height:1.25}.diet-editor .qty-input{min-height:36px;padding:6px 8px}.diet-editor .feed-sub{line-height:1.2}}
@media(max-width:800px){.diet-editor td.feed-tools{display:block;width:auto;grid-column:1/-1}.diet-editor .feed-actions{justify-content:flex-end}.diet-editor .feed-actions .icon-button{min-width:44px;width:44px;min-height:44px;height:44px}}

/* Formulação mineral e planejamento da adaptação. */
.mineral-summary{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:12px 16px;background:#f3f8f5;border:1px solid var(--border);border-radius:9px}.mineral-summary span{font-size:.75rem;color:var(--muted)}.mineral-summary strong{font-size:1.5rem;color:var(--green)}.mineral-summary small{line-height:1.45}.mineral-targets th,.mineral-targets td,.mineral-formula th,.mineral-formula td,.adaptation-days th,.adaptation-days td,.adaptation-totals th,.adaptation-totals td{padding:10px 8px}.mineral-formula input{width:120px}.mineral-formula th[scope=row],.mineral-targets th[scope=row]{text-align:left;background:transparent}.adaptation-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.adaptation-days td:first-child,.adaptation-days td:nth-child(2){text-align:center}.adaptation-days{min-width:760px}.adaptation-totals{min-width:680px}.adaptation-totals th:not(:first-child),.adaptation-totals td:not(:first-child){min-width:145px;white-space:nowrap}
@media(max-width:900px){.adaptation-kpis{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.adaptation-kpis{grid-template-columns:1fr}.mineral-formula{min-width:520px}.mineral-targets{min-width:620px}}

/* Leitura e edição das abas de mineral e adaptação. */
.mineral-summary{min-height:92px;padding:14px 18px;background:linear-gradient(135deg,#edf6f0,#f8fbf9);border-color:#bfd7ca;border-radius:12px}.mineral-summary span{font-weight:700;letter-spacing:.05em;text-transform:uppercase}.mineral-summary strong{font-size:1.7rem;line-height:1}.mineral-targets th,.mineral-targets td,.mineral-formula th,.mineral-formula td,.adaptation-days th,.adaptation-days td,.adaptation-totals th,.adaptation-totals td{padding:11px 10px}.mineral-targets thead th,.mineral-formula thead th,.adaptation-days thead th,.adaptation-totals thead th{background:#e7f0eb;color:#173c32}.mineral-targets tbody tr:hover,.mineral-formula tbody tr:hover,.adaptation-days tbody tr:hover{background:#f7faf8}.mineral-formula input{min-height:38px;padding:7px 9px}.mineral-formula input[data-mineral-cost]{background:#fff9e8;border-color:#dccb91}.mineral-targets .empty-state{text-align:center;padding:26px;color:var(--muted)}.mineral-targets small{display:block;color:var(--muted);font-weight:400}.adaptation-chart-wrap{width:100%;overflow-x:auto;padding:4px 0}.adaptation-chart{display:block;width:100%;min-width:650px;height:auto;background:linear-gradient(180deg,#fbfdfc,#f3f8f5);border:1px solid var(--border);border-radius:12px}.chart-grid{stroke:#d7e3dc;stroke-width:1}.chart-axis{stroke:#789087;stroke-width:1.4}.chart-line{fill:none;stroke:#1e7359;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.chart-point{fill:#fff;stroke:#1e7359;stroke-width:3;transition:r .15s ease}.chart-point:hover{r:7}.chart-label{fill:#536a61;font-size:12px}.chart-title{fill:#2e4d42;font-size:12px;font-weight:700}
@media(max-width:600px){.mineral-formula{min-width:600px}.adaptation-chart-wrap{margin-inline:-4px}.chart-point:hover{r:5}}
@media(prefers-reduced-motion:reduce){.chart-point{transition:none}}

/* Menu lateral com nomes legíveis e navegação organizada. */
.sidebar{position:fixed;inset:0 auto 0 0;width:280px;height:100dvh;padding:20px 16px;display:flex;flex-direction:column;gap:0;overflow-y:auto;scrollbar-width:thin}.sidebar>*{flex-shrink:0}.brand{display:flex;flex-direction:row;align-items:center;gap:12px;margin:0 4px 22px;font-size:1.1rem}.brand-logo{width:64px;height:64px;object-fit:contain;border-radius:12px}.brand small{margin-top:6px}.farm-context{display:grid;grid-template-columns:1fr;gap:10px;margin:0 0 18px;padding:0}.sidebar nav{display:flex;flex-direction:column;gap:5px;height:auto;min-height:0;overflow:visible;padding:0}.sidebar nav a{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex:none;gap:10px;min-height:44px;padding:11px 12px;font-size:.84rem;line-height:1.35;text-align:left;white-space:normal;border-radius:9px;border:1px solid transparent}.sidebar nav a span{flex:0 0 22px;font-size:.7rem;opacity:.6}.sidebar nav a:hover{background:#1c4b3e;color:#fff}.sidebar nav a.active{background:#2c604e;border-color:#628b77;color:#fff;box-shadow:inset 3px 0 #a9d675}.sidebar-bottom{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin-top:22px;padding:18px 4px 0;border-top:1px solid #376052;white-space:normal}.sidebar-bottom p{display:block;font-size:.73rem}.sidebar-bottom small{display:block;margin-top:2px;font-size:.7rem}.sidebar-bottom .subtle{padding:8px 10px;border:1px solid #587f72;border-radius:7px;text-align:left}.workspace{margin-left:280px}
@media(max-width:800px){.sidebar{position:relative;inset:auto;width:100%;height:auto;padding:16px}.brand{margin-bottom:16px}.farm-context{grid-template-columns:1fr 1fr}.sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.sidebar nav a{font-size:.8rem}.sidebar-bottom{margin-top:14px;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.sidebar-bottom small{display:none}.workspace{margin-left:0;padding-bottom:0}.workspace footer{padding-bottom:24px}.monitor-launch{bottom:22px}.nutrition-monitor,#toast{bottom:18px}}

/* Aplicativo de avaliação de partículas incorporado. */
.integrated-app{overflow:hidden;border:1px solid var(--border);border-radius:14px;background:#fff}.integrated-app iframe{display:block;width:100%;height:calc(100dvh - 260px);min-height:700px;border:0;background:#fff}@media(max-width:600px){.integrated-app iframe{height:calc(100dvh - 190px);min-height:650px}}

/* Identidade do menu lateral conforme referência Fazenda IA. */
.sidebar{background:#263e34;padding:20px 14px;color:#d8e5d8}.sidebar .brand{flex-direction:column;justify-content:center;align-items:center;margin:0 0 20px;padding:0 0 20px;border-bottom:1px solid #ffffff16}.sidebar .brand-logo{width:190px;height:114px;background:#fff;object-fit:contain;border-radius:14px}.sidebar .brand>span{display:none}.farm-context{padding:0 6px 18px;margin-bottom:10px;border-bottom:1px solid #ffffff16}.farm-context label{color:#abc5b9;font-size:.72rem;letter-spacing:.03em}.farm-context select{border-color:#587366;background:#304c40;color:#fff;border-radius:9px}.sidebar nav{gap:5px}.nav-group-title{font-size:.66rem;line-height:1.5;letter-spacing:.11em;font-weight:700;color:#a7c0b2;margin:18px 10px 6px}.nav-group-title:first-child{margin-top:4px}.sidebar nav a{position:relative;min-height:44px;margin-left:8px;padding:11px 24px 11px 12px;color:#d4e1d4;font-weight:600;border-radius:12px;border-left:2px solid #ffffff18}.sidebar nav a span{display:none}.sidebar nav a::after{content:'›';position:absolute;right:11px;top:50%;transform:translateY(-50%);color:#a9bfb0;font-size:1.15rem;font-weight:400}.sidebar nav a:hover{background:#355144}.sidebar nav a.active{background:#e4ecd5;color:#203f32;border-color:#e4ecd5;box-shadow:none}.sidebar nav a.active::after{color:#58735d}.sidebar-bottom{border-color:#ffffff16}.sidebar-bottom .subtle{border-color:#536c5e;color:#d4e1d4}.sidebar-bottom p,.sidebar-bottom small{color:#a7c0b2}@media(max-width:800px){.sidebar .brand-logo{width:160px;height:96px}.sidebar nav .nav-group-title{grid-column:1/-1}.sidebar nav a{margin-left:0}.sidebar .brand{margin-bottom:16px}}

/* Lateral compacta: identidade e contexto permanecem fixos no computador. */
@media(min-width:801px){
 .sidebar{width:270px;height:100vh;height:100dvh;padding:10px 12px;overflow:hidden;display:flex;flex-direction:column;font-family:Inter,"Segoe UI",Arial,sans-serif}
 .sidebar .brand{flex:none;margin:0 0 9px;padding:0 0 9px}
 .sidebar .brand-logo{width:146px;height:68px;border-radius:10px}
 .sidebar .farm-context{flex:none;gap:6px;padding:0 3px 9px;margin:0 0 5px}
 .sidebar .farm-context label{font-size:11px;gap:3px;letter-spacing:0}
 .sidebar .farm-context select{min-height:32px;height:32px;padding:4px 7px;font-family:inherit;font-size:12px;width:100%;text-overflow:ellipsis;color-scheme:dark}
 .sidebar nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;gap:2px;scrollbar-width:thin;overscroll-behavior:contain}
 .sidebar nav a{min-height:30px;margin-left:0;padding:5px 23px 5px 10px;font-size:12px;line-height:1.25;border-radius:8px}
 .sidebar nav .nav-group-title{font-size:9px;line-height:1.2;letter-spacing:.07em;margin:8px 8px 3px}
 .sidebar nav .nav-group-title:first-child{margin-top:3px}
 .sidebar-bottom{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:7px 0 0;padding:7px 0 0}
 .sidebar-bottom p{grid-column:1/-1;font-size:10px;line-height:1.2}
 .sidebar-bottom .subtle{min-height:28px;padding:5px 6px;font-size:10px;line-height:1.25;white-space:nowrap;justify-content:center;text-align:center}
 .sidebar-bottom small{grid-column:1/-1;font-size:9px;line-height:1.2;margin:0}
 .sidebar-bottom small br{display:none}
 .workspace{margin-left:270px}
}
@media(min-width:801px) and (max-height:760px){
 .sidebar{padding:7px 10px}
 .sidebar .brand{margin-bottom:5px;padding-bottom:5px}
 .sidebar .brand-logo{width:126px;height:46px;border-radius:8px}
 .sidebar .farm-context{gap:4px;padding-bottom:6px;margin-bottom:3px}
 .sidebar .farm-context label{font-size:10px;gap:2px}
 .sidebar .farm-context select{min-height:28px;height:28px;font-size:11px}
 .sidebar nav{gap:1px}
 .sidebar nav a{min-height:25px;padding:3px 22px 3px 9px;font-size:11.5px}
 .sidebar nav .nav-group-title{font-size:8px;margin:5px 7px 2px}
 .sidebar-bottom{margin-top:5px;padding-top:5px;gap:4px}
 .sidebar-bottom .subtle{min-height:25px;font-size:9px;padding:4px}
}

/* Gaveta lateral no celular, sem menu ocupando o topo da página. */
.mobile-menu-toggle,.mobile-menu-close,.mobile-menu-backdrop{display:none}
@media(max-width:800px){
 .sidebar{position:fixed;inset:0 auto 0 0;width:min(300px,86vw);height:100vh;height:100dvh;padding:12px 12px max(12px,env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:hidden;z-index:51;transform:translateX(-100%);visibility:hidden;transition:transform .2s ease,visibility .2s}
 .mobile-menu-open .sidebar{transform:translateX(0);visibility:visible}
 .sidebar .brand{flex:none;margin:0 30px 8px;padding:0 0 8px}
 .sidebar .brand-logo{width:142px;height:64px;border-radius:9px}
 .sidebar .farm-context{flex:none;grid-template-columns:1fr;gap:5px;padding:0 3px 8px;margin-bottom:5px}
 .sidebar .farm-context label{font-size:11px;gap:2px}
 .sidebar .farm-context select{min-height:32px;padding:5px 7px;font-size:12px}
 .sidebar nav{display:flex;flex:1 1 auto;flex-direction:column;justify-content:flex-start;align-items:stretch;min-height:0;height:auto;overflow-y:auto;gap:2px;padding:0;overscroll-behavior:contain}
 .sidebar nav a{flex:none;min-height:36px;margin:0;padding:8px 23px 8px 10px;font-size:12px;line-height:1.25;text-align:left}
 .sidebar nav .nav-group-title{font-size:9px;margin:8px 7px 3px;line-height:1.25}
 .sidebar-bottom{flex:none;display:grid;grid-template-columns:1fr 1fr;margin:6px 0 0;padding:6px 0 0;gap:4px}
 .sidebar-bottom p{grid-column:1/-1;font-size:10px}
 .sidebar-bottom .subtle{font-size:10px;min-height:32px;padding:5px;text-align:center}
 .sidebar-bottom small{display:none}
 .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;background:#edf3e6;color:#234c37;border:1px solid #c8d7c1;border-radius:9px;font-size:25px}
 .topbar{flex-wrap:wrap;gap:10px;padding:12px 16px;min-height:84px}
 .topbar>div:first-of-type{flex:1;min-width:0}.topbar h1{font-size:1.3rem}.topbar .header-actions{margin-left:auto;gap:6px}
 .mobile-menu-close{display:flex;position:absolute;right:8px;top:8px;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #668372;border-radius:9px;color:#fff;background:#304d40;font-size:28px}
 .mobile-menu-open .mobile-menu-backdrop{display:block;position:fixed;inset:0;border:0;background:#071c1299;z-index:50;width:100%;height:100%}
 body.mobile-menu-open{overflow:hidden}
 .workspace{margin-left:0;padding-bottom:0}
}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}

/* Ingredientes em linhas compactas, inclusive no celular. */
.diet-editor .feed-table{table-layout:auto}
.diet-editor .feed-table .feed-name{white-space:nowrap;line-height:1.2;padding:4px 0}
.diet-editor .feed-table .feed-sub{margin-top:1px;line-height:1.1}
.diet-editor .feed-table td{padding:4px 7px;vertical-align:middle}
@media(max-width:800px){
 .diet-editor .feed-table{display:table;min-width:600px;width:100%;font-size:11px}
 .diet-editor .feed-table thead{display:table-header-group}
 .diet-editor .feed-table tbody{display:table-row-group}
 .diet-editor .feed-table tr{display:table-row;padding:0;border:0}
 .diet-editor .feed-table th{padding:7px 5px;font-size:10px;white-space:nowrap}
 .diet-editor .feed-table td,.diet-editor .feed-table td.feed-tools{display:table-cell;padding:3px 5px;border-bottom:1px solid #e5ece8;text-align:right;font-size:11px;min-width:0;width:auto;vertical-align:middle}
 .diet-editor .feed-table td:first-child{text-align:left;min-width:150px;max-width:220px}
 .diet-editor .feed-table td::before{display:none}
 .diet-editor .feed-table .feed-name{font-size:12px;max-width:220px;overflow:hidden;text-overflow:ellipsis;min-height:24px}
 .diet-editor .feed-table .feed-sub{font-size:9px}
 .diet-editor .feed-table .qty-input{width:64px;max-width:64px;min-height:34px;height:34px;padding:5px;font-size:16px;border-radius:6px}
 .diet-editor .feed-table .feed-actions{justify-content:flex-end;gap:0}
 .diet-editor .feed-table .feed-order{gap:0}
 .diet-editor .feed-table .feed-actions .icon-button{width:30px;min-width:30px;height:36px;min-height:36px;padding:2px;font-size:18px}
 .diet-editor .table-wrap{overscroll-behavior-inline:contain;scrollbar-width:thin}
 .diet-editor .panel-head{padding:12px;gap:8px}
 .diet-editor .panel-head h2{font-size:1rem}
 .diet-editor .panel-head .actions{gap:5px}
 .diet-editor .panel-head .button.small{min-height:30px;padding:5px 7px;font-size:11px}
}

.context-title>label:has(#diet-name){flex-basis:100%;width:min(100%,600px)}.context-title #diet-name{width:100%;font-weight:600}

.np-history-list{display:grid;gap:8px}#np-history summary{cursor:pointer;flex-wrap:wrap}#np-history summary h2{font-size:1rem}#np-history .tree-leaf{font:inherit;cursor:pointer}#np-history .tree-label{white-space:normal}

#pick-food-dialog{width:min(640px,calc(100vw - 30px))}#pick-food-dialog .panel-body{padding:20px 28px}#pick-food-dialog .search{width:100%}#pick-food-msg:empty{display:none}#pick-food-msg{margin:14px 0 0}.pick-food-list{max-height:50vh;overflow:auto;margin-top:14px}.food-list-name{font-weight:600;text-align:left}@media(max-width:800px){#pick-food-dialog .panel-body{padding:16px}}

#update-now{white-space:nowrap}@media(max-width:800px){.topbar .header-actions{flex-wrap:wrap}#update-now{font-size:11px;min-height:34px;padding:6px 9px}}

#update-now{flex:none;width:40px;height:40px;min-height:40px;padding:0;font-size:26px;line-height:1}#update-now[aria-busy=true] span{animation:update-spin 1s linear infinite}@keyframes update-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){#update-now[aria-busy=true] span{animation:none}}@media(max-width:800px){#update-now{width:36px;height:36px;min-height:36px;padding:0;font-size:24px}.topbar .header-actions{flex-shrink:0}.topbar>div:first-of-type{min-width:100px}}

.confinement-curve{margin:22px 0;padding:16px;border:1px solid var(--border);border-radius:12px;background:#f9fcfa}.confinement-curve h3{margin-bottom:8px}.confinement-curve-svg{display:block;width:100%;min-width:580px;height:auto}.confinement-curve-legend{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.confinement-curve-legend span{padding:6px 10px;background:#edf4ef;border-radius:6px;font-size:12px}.confinement-curve .report-foot{margin-top:8px}@media print{.confinement-curve{break-inside:avoid}.confinement-curve-svg{min-width:0}.confinement-curve .table-wrap{overflow:visible}}

.intake-fields{display:flex;flex-direction:column;gap:18px;min-width:0}.intake-fields #intake{width:100%}.calculated-intake{display:block;width:100%;min-height:44px;padding:10px 12px;border:1px solid #aacdbd;border-radius:8px;background:#e8f3ed;color:#175640;font-weight:700;font-size:1rem;font-variant-numeric:tabular-nums}.intake-fields label{line-height:1.4}

@font-face{font-family:Bricolage Grotesque Variable;font-style:normal;font-display:swap;font-weight:200 800;src:url("./vendor/fonts/bricolage-grotesque-latin-opsz-normal-XV2ZJLIL.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Figtree;font-style:normal;font-display:swap;font-weight:400;src:url("./vendor/fonts/figtree-latin-400-normal-PORFSHKN.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Figtree;font-style:normal;font-display:swap;font-weight:600;src:url("./vendor/fonts/figtree-latin-600-normal-5C6Z7QEI.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Figtree;font-style:normal;font-display:swap;font-weight:700;src:url("./vendor/fonts/figtree-latin-700-normal-M33EANAW.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* Parceiros visual language. Screen-only: existing report and print layouts stay independent. */
@media screen {
 :root{--green:#0b2a1e;--accent:#1d6b38;--border:#d5dbcb;--muted:#56685c;--surface:#fff;--soft:#e0efd9;--shadow:0 1px 2px #14281906,0 8px 24px #14281909;font-family:Figtree,-apple-system,"Segoe UI",sans-serif;color:#0b2a1e;background:#f3f5ef}
 body{background:#f3f5ef;color:#0b2a1e;-webkit-font-smoothing:antialiased}
 h1,h2,h3{font-family:"Bricolage Grotesque Variable","Avenir Next",Figtree,sans-serif;color:#0b2a1e;letter-spacing:-.025em;font-weight:650}
 h1{font-size:1.9rem}h2{font-size:1.22rem}
 label{color:#56685c;font-weight:600}input,select,textarea{color:#0b2a1e;border-color:#d5dbcb;border-radius:10px;background:#fff;box-shadow:0 1px 2px #14281903}
 input::placeholder,textarea::placeholder{color:#7a877b}
 button:focus-visible,a:focus-visible,input:focus,select:focus,textarea:focus,summary:focus-visible{outline:3px solid #78a95a;outline-offset:3px}
 .eyebrow{color:#687b67;letter-spacing:.11em;font-size:.66rem}
 .button{border-radius:100px;border-color:#d5dbcb;color:#183b29;background:#fff;padding:10px 17px;box-shadow:0 1px 2px #14281905;transition:background-color .15s,border-color .15s,box-shadow .15s}
 .button.primary{background:#1d6b38;border-color:#1d6b38;color:#fff;box-shadow:0 3px 8px #1d6b3815}
 .button:hover:not(:disabled){filter:none;background:#f0f5eb;border-color:#a4b99a}.button.primary:hover:not(:disabled){background:#17562d;border-color:#17562d}
 .button.small{padding:7px 12px}.icon-button{color:#607661;border-radius:8px}.icon-button:hover:not(:disabled){background:#eaf1e4}
 .link-button,.food-list-name,.feed-name{color:#1d6b38}
 .sidebar{background:#fff;color:#56685c;border-right:1px solid #d5dbcb;font-family:Figtree,-apple-system,"Segoe UI",sans-serif;box-shadow:2px 0 14px #14281903}
 .sidebar .brand{border-color:#e4e8df}.sidebar .brand-logo{background:white;border-radius:12px}
 .sidebar .farm-context{border-color:#e4e8df}.sidebar .farm-context label{color:#647461}
 .sidebar .farm-context select{color:#183b29;background:#f5f7f1;border-color:#d5dbcb;color-scheme:light;border-radius:8px;font-weight:600}
 .sidebar nav a{border:1px solid transparent;color:#56685c;font-weight:600;gap:10px;line-height:1.3;padding-right:10px}
 .sidebar nav a::after{content:none}.sidebar nav a:hover{background:#f2f6ed;color:#1d6b38}
 .sidebar nav a.active{background:#e0efd9;border-color:#e0efd9;color:#1d6b38;box-shadow:none}
 .sidebar nav a .nav-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;opacity:1}
 .sidebar nav a .nav-icon svg{width:18px;height:18px}
 .sidebar nav a .nav-label{display:block;flex:1;opacity:1;font-size:inherit;min-width:0}
 .sidebar nav .nav-group-title{color:#788771;font-weight:700;letter-spacing:.09em}
 .sidebar-bottom{border-color:#e4e8df}.sidebar-bottom p,.sidebar-bottom small{color:#677960}
 .sidebar-bottom .subtle{border-color:#d5dbcb;color:#435d43;background:#f7f9f3;border-radius:7px}
 .sidebar-bottom .subtle:hover{background:#e0efd9}.sidebar-bottom #offline-status[data-ready=true]{color:#1d6b38}
 .sidebar-toggle,.sidebar-context-toggle{align-items:center;justify-content:center;gap:8px;min-height:32px;border:1px solid #d5dbcb;background:#fff;border-radius:10px;color:#56685c;font:inherit;font-size:12px}
 .sidebar-toggle{display:flex;width:100%;margin-top:8px;flex:none}.sidebar-toggle:hover,.sidebar-context-toggle:hover{background:#e0efd9}
 .sidebar-toggle svg,.sidebar-context-toggle svg{width:18px;height:18px;flex:none}.sidebar-context-toggle{display:none}
 .topbar{position:relative;min-height:92px;background:#f3f5ef;border-bottom:1px solid #d5dbcb;padding-top:18px;padding-bottom:18px;gap:16px}
 .topbar .eyebrow{margin-bottom:5px}.header-actions{gap:10px;flex-shrink:0}.header-actions>span{font-size:11px;max-width:110px;line-height:1.4}
 #update-now{border-radius:50%;background:transparent;border-color:#d5dbcb;color:#56685c}
 .account-menu{position:relative;flex:none;margin-left:6px;z-index:30}
 .account-trigger{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #a7bca0;border-radius:50%;padding:3px;background:#f3f5ef;color:#fff}
 .account-avatar{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;background:#1d6b38;color:#fff;font-size:14px;font-weight:700;letter-spacing:.02em}
 .account-trigger:hover,.account-trigger[aria-expanded=true]{border-color:#1d6b38;box-shadow:0 0 0 3px #e0efd9}
 .account-popover{position:absolute;right:0;top:calc(100% + 12px);width:290px;max-width:calc(100vw - 32px);background:#fff;border:1px solid #d5dbcb;border-radius:18px;box-shadow:0 6px 16px #1428190d,0 24px 60px #14281926;padding:20px;color:#0b2a1e}
 .account-popover[hidden]{display:none}.account-popover p{overflow-wrap:anywhere;line-height:1.5;font-size:14px}.account-popover strong{display:block;font-size:17px;margin-bottom:6px;font-family:"Bricolage Grotesque Variable",sans-serif}
 .account-popover .account-role{font-size:12px;} .account-popover small,.account-popover .account-role{color:#56685c;display:block;margin-top:4px}.account-popover #logout{background:none;border:0;font:inherit;cursor:pointer;display:flex;align-items:center;gap:10px;margin-top:16px;padding:12px 0 0;border-top:1px solid #e4e8df;width:100%;text-align:left;color:#a44e22;font-size:14px}.account-popover #logout svg{width:18px;height:18px}
 .panel,.food-list,.food-card,.integrated-app{border-color:#d5dbcb;border-radius:16px;box-shadow:var(--shadow)}
 .panel-head{background:#fff;border-color:#e4e8df}.panel-body{background:#fff}
 .context{padding:18px 20px;border:1px solid #d5dbcb;background:#fff;border-radius:16px;box-shadow:var(--shadow);gap:16px;margin-bottom:20px}
 .context-title{flex:1;min-width:0}.context .eyebrow{margin-bottom:0}.context select{border-radius:9px}.context .actions{gap:8px}
 .kpis{gap:14px;margin-top:18px;margin-bottom:22px}.kpi{border-color:#d5dbcb;border-radius:16px;box-shadow:var(--shadow);padding:20px}
 .kpi strong{font-family:"Bricolage Grotesque Variable",Figtree,sans-serif;font-size:2rem;letter-spacing:-.035em;font-weight:650;margin-top:7px}
 .kpi.emphasis{background:#1d6b38;border-color:#1d6b38;color:#fff;box-shadow:0 5px 18px #1d6b381a}
 .kpi.emphasis small,.kpi.emphasis .label{color:#e0efd9}.kpi small{line-height:1.5}
 .workspace table th{background:#f4f6ef;color:#56685c}.workspace table td{border-bottom-color:#e9ede3}
 .workspace tbody tr:hover{background:#f8faf5}.workspace .feed-table tbody tr:nth-child(even){background:#fafbf8}
 .diet-editor .feed-table .feed-sub{color:#6c7c67}.diet-editor .qty-input{background:#f6f9f2;border-color:#c7d7bc}
 .nutrition-monitor{box-shadow:var(--shadow)}.monitor-heading{background:#f5f8f0}.monitor-status{border-color:#cbddbf;color:#1d6b38;background:#fff}
 .monitor-tabs{border-color:#e4e8df;gap:5px}.monitor-tabs button{background:#f2f5ed;color:#56685c;border-radius:8px}.monitor-tabs button[aria-selected=true]{background:#1d6b38;color:#fff}
 .monitor-section h3{background:#eaf3e2;color:#285838;border-radius:8px}.monitor-stat{border-color:#edf0e7}
 .calculated-intake{background:#e0efd9;color:#1d6b38;border-color:#b7d3a7;border-radius:10px}
 .mineral-summary{background:#edf5e6;border-color:#c5d9b7;border-radius:14px}.mineral-summary strong{color:#1d6b38}
 details{border-radius:12px}summary{background:#f5f7f1;color:#33593b}.notice{background:#eef5e7;color:#33593b}
 .tree>li>.tree-row .tree-toggle,.tree-toggle.selected{background:#eef5e7;border-color:#cbdcbe}.tree-label small{color:#64765b}
 .food-list-row{border-color:#e9ede3}.food-list-row:hover{background:#f8faf5}
 dialog{border:1px solid #d5dbcb;border-radius:20px;color:#0b2a1e;box-shadow:0 24px 80px #14281933}dialog::backdrop{background:#0a140c73;backdrop-filter:blur(3px)}
 .dialog-head,.dialog-actions{border-color:#e4e8df}.dialog-head{background:#f8faf5}
 #auth-gate{background:#f3f5ef}.auth-card{border-color:#d5dbcb;box-shadow:0 8px 36px #14281910;border-radius:24px}.auth-card h1{font-size:1.8rem}
 .mobile-menu-toggle,.mobile-menu-close{background:#fff;border-color:#d5dbcb;color:#1d6b38;border-radius:10px}
 #toast{background:#0b2a1e;border-radius:12px}.workspace footer{color:#74816e}
}
@media screen and (min-width:801px){
 .sidebar nav a{min-height:32px;font-size:13px}.sidebar nav .nav-group-title{font-size:9px}
 .sidebar .farm-context label{font-size:12px}.sidebar .farm-context select{font-size:13px}
 .sidebar-collapsed .sidebar{width:76px;padding:12px 10px}
 .sidebar-collapsed .workspace{margin-left:76px}
 .sidebar-collapsed .sidebar .brand{padding-bottom:12px;margin-bottom:10px}.sidebar-collapsed .sidebar .brand-logo{width:52px;height:48px;border-radius:8px}
 .sidebar-collapsed .farm-context,.sidebar-collapsed .nav-group-title,.sidebar-collapsed .sidebar-bottom{display:none}
 .sidebar-collapsed .sidebar-context-toggle{display:flex;width:44px;min-height:40px;margin:0 auto 10px}
 .sidebar-collapsed .sidebar nav{gap:5px}.sidebar-collapsed .sidebar nav a{justify-content:center;min-height:40px;padding:8px;border-radius:12px}
 .sidebar-collapsed .sidebar nav a .nav-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .sidebar-collapsed .sidebar nav a .nav-icon,.sidebar-collapsed .sidebar nav a .nav-icon svg{width:20px;height:20px;flex-basis:20px}
 .sidebar-collapsed .sidebar-toggle{width:44px;height:36px;margin:10px auto 0}.sidebar-collapsed .sidebar-toggle .sidebar-toggle-label{display:none}.sidebar-collapsed .sidebar-toggle svg{transform:rotate(180deg)}
}
@media screen and (min-width:801px) and (max-height:900px){.sidebar nav a{min-height:26px;padding-top:3px;padding-bottom:3px;font-size:12px}.sidebar-toggle{min-height:28px;margin-top:5px}.sidebar-collapsed .sidebar nav{gap:2px}.sidebar-collapsed .sidebar nav a{min-height:33px}}
@media screen and (max-width:1100px) and (min-width:801px){.topbar{padding:18px 22px}.header-actions>span{display:none}.topbar h1{font-size:1.6rem}.header-actions{gap:7px}.topbar .button{padding:9px 12px}}
@media screen and (max-width:800px){
 .sidebar-toggle,.sidebar-context-toggle{display:none}.sidebar .farm-context select{font-size:16px;min-height:36px}.sidebar nav a{font-size:13px;min-height:36px}.sidebar .brand-logo{width:142px;height:64px}
 .topbar{padding:14px 16px;gap:10px;min-height:100px}.topbar>div:first-of-type{padding-right:52px;min-width:0}.topbar h1{font-size:1.4rem;line-height:1.15;overflow-wrap:anywhere}
 .topbar .header-actions{width:100%;justify-content:flex-end;gap:8px;margin:0;flex-wrap:wrap}.topbar .header-actions .button{min-height:36px;padding:8px 13px;font-size:13px}
 .topbar .header-actions #update-now{width:36px;padding:0;font-size:24px;margin-right:auto}
 .account-menu{position:absolute;right:16px;top:14px;margin:0}.account-popover{top:calc(100% + 10px)}
 .context{padding:16px;gap:14px}.context .actions .button{font-size:12px;padding:8px 11px;min-height:36px}
 .kpi{padding:16px}.kpi strong{font-size:1.75rem}.kpi small{font-size:12px}.panel-head h2{font-size:1.06rem}
 .nutrition-monitor{box-shadow:0 12px 60px #14281933}.monitor-launch{border-radius:100px}
}
@media screen and (prefers-reduced-motion:reduce){.button{transition:none}}
@media screen and (min-width:801px){
 .context{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.55fr);align-items:end;gap:12px 20px}
 .context-title{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:8px 14px}
 .context-title>.eyebrow,.context-title>.muted{grid-column:1/-1}.context-title>select{min-width:0;width:100%}.context-title>label:has(#diet-name){width:100%}
 .context>.actions{grid-column:1/-1;justify-content:flex-end}.context>label{max-width:none}
 .sidebar .brand-logo{width:146px;height:64px;object-fit:cover}
 .sidebar-collapsed .sidebar .brand-logo{width:52px;height:48px;object-fit:contain}
}
@media screen {
 .account-theme{margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
 .account-theme-label{display:block;font-size:12px;font-weight:600;color:var(--muted);margin-bottom:8px}
 .account-theme-options{display:flex;gap:6px}.account-theme-options button{flex:1;min-height:36px;padding:7px 8px;border:1px solid var(--border);border-radius:9px;background:#fff;color:#56685c;font-size:12px;font-weight:600}
 .account-theme-options button[aria-pressed=true]{background:#0b2a1e;color:#fff;border-color:#0b2a1e}
 :root[data-theme=dark]{color-scheme:dark;--green:#cfe4d3;--accent:#9bce91;--border:#35483c;--muted:#a5b5a5;--surface:#1b2a21;--soft:#304a30;--shadow:0 1px 2px #0002,0 8px 24px #0002;background:#111c16;color:#e4ece2}
 :root[data-theme=dark] body{background:#111c16;color:#e4ece2}
 :root[data-theme=dark] :is(h1,h2,h3){color:#e4ece2}
 :root[data-theme=dark] :is(label,.muted,.eyebrow,.feed-sub,.sidebar-bottom p,.sidebar-bottom small,.account-role){color:#a5b5a5}
 :root[data-theme=dark] :is(input,select,textarea){background:#152119;color:#e4ece2;border-color:#405342;color-scheme:dark}
 :root[data-theme=dark] input::placeholder,:root[data-theme=dark] textarea::placeholder{color:#839980}
 :root[data-theme=dark] :is(.sidebar,.panel,.panel-head,.panel-body,.food-card,.food-list,.context,.kpi,.account-popover,dialog,.dialog-actions,.auth-card,.integrated-app){background:#1b2a21;border-color:#35483c;color:#e4ece2}
 :root[data-theme=dark] :is(.topbar,#auth-gate){background:#111c16}
 :root[data-theme=dark] .sidebar :is(.brand,.farm-context,.sidebar-bottom){border-color:#35483c}
 :root[data-theme=dark] .sidebar .farm-context select{background:#233528;color:#e4ece2;border-color:#405342}
 :root[data-theme=dark] .sidebar nav a{color:#b2c3af}
 :root[data-theme=dark] .sidebar nav a.active{background:#304a30;color:#c5e9b9;border-color:#304a30}
 :root[data-theme=dark] .sidebar nav a:hover{background:#293f2c;color:#dcefd7}
 :root[data-theme=dark] .sidebar nav .nav-group-title{color:#8ca284}
 :root[data-theme=dark] :is(.sidebar-bottom .subtle,.sidebar-toggle,.sidebar-context-toggle,.mobile-menu-close,.mobile-menu-toggle){background:#1b2a21;color:#b2c3af;border-color:#405342}
 :root[data-theme=dark] .button{background:#233528;color:#dcead6;border-color:#405342}
 :root[data-theme=dark] .button.primary,:root[data-theme=dark] .kpi.emphasis{background:#286e3e;color:#fff;border-color:#3d8450}
 :root[data-theme=dark] .button:hover:not(:disabled){background:#304a30;border-color:#73966a}
 :root[data-theme=dark] .button.primary:hover:not(:disabled){background:#34834d}
 :root[data-theme=dark] :is(.link-button,.food-list-name,.feed-name,.tree-go){color:#b5dba8}
 :root[data-theme=dark] .workspace table th{background:#233528;color:#b2c3af}
 :root[data-theme=dark] .workspace table td{border-color:#304135}
 :root[data-theme=dark] .workspace tbody tr:hover,:root[data-theme=dark] .workspace .feed-table tbody tr:nth-child(even){background:#213326}
 :root[data-theme=dark] :is(.qty-input,.monitor-heading,.monitor-tabs,.dialog-head,summary,.tabs-note,.stat-line,.tree>li>.tree-row .tree-toggle,.tree-leaf){background:#233528;color:#dcead6;border-color:#405342}
 :root[data-theme=dark] .monitor-tabs button{background:#304433;color:#b9cdb2}
 :root[data-theme=dark] .monitor-tabs button[aria-selected=true]{background:#93bd75;color:#112417}
 :root[data-theme=dark] :is(.monitor-section h3,.monitor-total,.monitor-status,.calculated-intake,.mineral-summary,.notice,.lab-summary,.lab-origin){background:#304a30;color:#c5e9b9;border-color:#4d6c43}
 :root[data-theme=dark] .mineral-summary strong{color:#c5e9b9}
 :root[data-theme=dark] .mineral-formula input[data-mineral-cost]{background:#3c341c;color:#f4dda3;border-color:#75633a}
 :root[data-theme=dark] :is(.error,.danger-text){color:#ffb5a6}
 :root[data-theme=dark] .error{background:#482822}
 :root[data-theme=dark] .positive{color:#b1dc9b}
 :root[data-theme=dark] .food-list-row:hover{background:#233528}
 :root[data-theme=dark] .account-trigger{background:#18271c;border-color:#57734c}
 :root[data-theme=dark] .account-trigger[aria-expanded=true]{box-shadow:0 0 0 3px #304a30}
 :root[data-theme=dark] .account-popover #logout{color:#f3b185;border-color:#35483c}
 :root[data-theme=dark] .account-theme-options button{background:#233528;color:#b9cdb2;border-color:#405342}
 :root[data-theme=dark] .account-theme-options button[aria-pressed=true]{background:#c5e9b9;color:#112417;border-color:#c5e9b9}
 /* Documents keep a white paper preview even when the surrounding workspace is dark. */
 :root[data-theme=dark] :is(.report-page,.premix-sheet){color:#182c35;--green:#103c32;--accent:#217159;--border:#dce4e8;--muted:#60717b;color-scheme:light}
 :root[data-theme=dark] :is(.report-page,.premix-sheet) :is(h1,h2,h3){color:#103c32}
 :root[data-theme=dark] :is(.report-page,.premix-sheet) :is(th,td){background:transparent;color:#182c35;border-color:#dce4e8}
 :root[data-theme=dark] :is(.report-page,.premix-sheet) thead th{background:#edf3e8}
 :root[data-theme=dark] .adaptation-chart{background:#1b2a21}.chart-label{fill:var(--muted)}
 :root[data-theme=dark] .chart-title{fill:#c5e9b9}:root[data-theme=dark] .chart-grid{stroke:#35483c}
}
@media screen and (min-width:801px){.sidebar .brand-logo{height:84px}}
@media screen and (min-width:801px) and (max-height:900px){.sidebar .brand-logo{width:112px;height:68px}.sidebar-collapsed .sidebar .brand-logo{width:52px;height:48px}}

@media screen {
 :root[data-theme=dark] #update-now{color:#b2c3af;border-color:#405342}
 :root[data-theme=dark] .sidebar-bottom #offline-status[data-ready=true]{color:#b1dc9b}
}
@media screen and (min-width:801px) and (max-width:1000px){.context{grid-template-columns:minmax(0,1fr)}.context-title{grid-template-columns:minmax(0,1fr)}.context>.actions{justify-content:flex-start;flex-wrap:wrap}}

/* Decorative field contours and connected agriculture; never intercepts interaction. */
@media screen {
 .sidebar .sidebar-watermark{position:absolute;inset:auto 0 34px;z-index:0;width:100%;height:190px;overflow:hidden;pointer-events:none;user-select:none;color:#1d6b38;opacity:.10}
 .sidebar-watermark svg{display:block;width:100%;height:100%}
 .sidebar-watermark .watermark-circuits{stroke-width:2}
 .sidebar>:not(.sidebar-watermark){z-index:1}
 html[data-theme="dark"] .sidebar .sidebar-watermark{color:#7db52f;opacity:.18}
}
@media screen and (min-width:801px){.sidebar-collapsed .sidebar-watermark{display:none}}
@media print{.sidebar-watermark{display:none!important}}

@media screen and (min-width:801px) and (max-width:1100px){.workspace main>.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media screen {
 .account-preferences-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
 .account-preferences-heading .account-theme-label{margin:0}
 .account-change-password{border:0;background:transparent;padding:6px 0;color:#1d6b38;font:inherit;font-size:12px;font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
 #password-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0}
 #password-dialog .panel-body{padding:20px 28px}
 .password-account{color:var(--muted);font-size:13px;overflow-wrap:anywhere;margin:0 0 20px}
 .password-fields{display:grid;gap:16px}.password-fields[hidden],.password-verification[hidden]{display:none}
 .password-fields label{display:grid;gap:6px}.password-fields input{width:100%;min-height:44px;font-size:16px}
 #password-help{font-size:12px;margin:-9px 0 0}
 .password-verification{display:grid;gap:12px;border-top:1px solid var(--border);padding-top:16px;font-size:13px;line-height:1.5}
 #password-status{font-size:14px;line-height:1.5;margin:18px 0 0}#password-status:empty{display:none}
 .password-error{color:#a33422}.password-notice{color:#1d6b38}
 :root[data-theme=dark] .account-change-password,:root[data-theme=dark] .password-notice{color:#c5e9b9}
 :root[data-theme=dark] .password-error{color:#ffb5a6}
}
@media screen and (max-width:500px){#password-dialog .panel-body{padding:18px 20px}#password-dialog .dialog-actions{gap:8px;flex-wrap:wrap}#password-dialog .dialog-actions .button{padding:10px 14px;font-size:13px}}
@media print{#password-dialog{display:none!important}}
@media screen{#password-dialog [hidden]{display:none!important}}

@media screen {
 .auth-forgot,.auth-back{background:transparent;border:0;color:#1d6b38;font:inherit;font-size:14px;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:8px}
 .auth-back{display:block;margin:20px auto 0}.auth-forgot:disabled,.auth-back:disabled{opacity:.55;cursor:wait}
 .recovery-card form:empty{display:none}.recovery-card label{display:grid;gap:6px}.recovery-card input{width:100%;min-height:44px;font-size:16px}
 #recovery-message{font-size:14px;line-height:1.55;margin:0}#recovery-message:empty{display:none}
 .recovery-card h1:focus{outline:none}
 :root[data-theme=dark] .auth-forgot,:root[data-theme=dark] .auth-back{color:#c5e9b9}
}
