/* AgroLogix R12 Inversionista BODY exclusively; shell and other roles locked. */
body[data-r4-view="grazing"] #r3bRouteHost:has(>.g12i){height:var(--g12i-height,calc(100dvh - 158px));min-height:0;overflow:hidden;padding:0}
body[data-r4-view="grazing"] .g12i{--inv-navy:#08266f;--inv-green:#0a7547;--inv-border:#dbe6f0;box-sizing:border-box;display:grid;grid-template-rows:clamp(59px,8vh,74px) clamp(60px,8vh,72px) clamp(86px,11vh,99px) minmax(185px,1.13fr) minmax(190px,1fr) 14px;gap:7px;height:100%;min-height:0;overflow:hidden;padding:7px 12px 3px;background:#f4f8ff;font-family:inherit;color:#1f437f}
body[data-r4-view="grazing"] .g12i *{box-sizing:border-box}
body[data-r4-view="grazing"] .g12i :is(button,select){font-family:inherit}
body[data-r4-view="grazing"] .g12i button{cursor:pointer}
body[data-r4-view="grazing"] .g12i button:focus-visible,.g12i-dialog button:focus-visible{outline:2px solid #2786d8;outline-offset:2px}
body[data-r4-view="grazing"] .g12i-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #dce6ef;min-width:0}
body[data-r4-view="grazing"] .g12i-heading{display:flex;gap:12px;align-items:center;min-width:0}
body[data-r4-view="grazing"] .g12i-heading>.g12i-ico{width:43px;height:43px;flex:0 0 43px;object-fit:contain}
body[data-r4-view="grazing"] .g12i-heading>div{min-width:0}
body[data-r4-view="grazing"] .g12i-heading h1{font-size:clamp(21px,1.9vw,29px);color:var(--inv-navy);line-height:1.15;white-space:nowrap;margin:0;font-weight:800}
body[data-r4-view="grazing"] .g12i-heading p{margin:4px 0 0;font-size:clamp(10px,.8vw,13px);color:#55719b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-r4-view="grazing"] .g12i-outline{background:white;color:#087145;border:1px solid #0f8851;border-radius:6px;padding:8px 11px;font-size:12px;font-weight:700;white-space:nowrap}
body[data-r4-view="grazing"] .g12i-filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) auto;gap:7px;align-items:end;min-width:0;padding:0 0 2px}
body[data-r4-view="grazing"] .g12i-filters label{display:grid;gap:5px;color:var(--inv-navy);font-size:11px;font-weight:700;min-width:0}
body[data-r4-view="grazing"] .g12i-filters select{width:100%;height:35px;background:white;color:#244884;border:1px solid var(--inv-border);border-radius:6px;font-size:11px;padding:5px 5px;min-width:0;white-space:nowrap;text-overflow:ellipsis}
body[data-r4-view="grazing"] .g12i-filters>button{height:35px;padding:6px 9px;font-size:10px}
body[data-r4-view="grazing"] .g12i-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;min-width:0;min-height:0}
body[data-r4-view="grazing"] .g12i-kpi{display:grid;grid-template-columns:clamp(35px,3.4vw,54px) minmax(0,1fr) 11px;align-items:center;gap:7px;padding:8px 9px;background:white;border:1px solid var(--inv-border);border-radius:9px;text-align:left;min-width:0;overflow:hidden}
body[data-r4-view="grazing"] .g12i-kpi>.g12i-ico{width:100%;max-height:58px;object-fit:contain}
body[data-r4-view="grazing"] .g12i-kpi>span{min-width:0;display:grid;gap:3px}
body[data-r4-view="grazing"] .g12i-kpi small{font-size:clamp(10px,.7vw,12px);color:#17417a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-r4-view="grazing"] .g12i-kpi strong{font-size:clamp(19px,1.6vw,26px);color:var(--inv-navy);line-height:1.1;font-weight:800;white-space:nowrap}
body[data-r4-view="grazing"] .g12i-kpi em{font-style:normal;font-size:clamp(9px,.67vw,11px);color:#0b9b68;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-r4-view="grazing"] .g12i-kpi>b{font-size:19px;color:#276cd0}
body[data-r4-view="grazing"] .g12i-main{display:grid;grid-template-columns:minmax(0,1.44fr) minmax(0,1fr);gap:9px;min-height:0}
body[data-r4-view="grazing"] .g12i-bottom{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:9px;min-height:0}
body[data-r4-view="grazing"] .g12i-panel{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:8px;background:white;border:1px solid var(--inv-border);border-radius:8px;cursor:pointer}
body[data-r4-view="grazing"] .g12i-panel:hover{border-color:#a9d2c0}
body[data-r4-view="grazing"] .g12i-panel>header{display:flex;align-items:center;min-height:25px;margin-bottom:5px;gap:7px;flex:0 0 auto}
body[data-r4-view="grazing"] .g12i-panel>header>.g12i-ico{width:22px;height:22px;object-fit:contain;flex:0 0 22px}
body[data-r4-view="grazing"] .g12i-panel h2{font-size:clamp(12px,1vw,15px);color:var(--inv-navy);font-weight:800;margin:0;flex:1;min-width:0;line-height:1.2}
body[data-r4-view="grazing"] .g12i-panel header button{font-size:10px;padding:4px 8px;white-space:nowrap;border:1px solid #dce8f0;border-radius:6px;background:white;color:#087145;font-weight:700}
body[data-r4-view="grazing"] .g12i-table-viewport{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;flex:1;scrollbar-width:thin}
body[data-r4-view="grazing"] .g12i-table-viewport table{width:100%;max-width:100%;table-layout:fixed;border-collapse:collapse;font-size:clamp(9px,.7vw,11px)}
body[data-r4-view="grazing"] .g12i-table-viewport :is(td,th){padding:5px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
body[data-r4-view="grazing"] .g12i-table-viewport th{position:sticky;top:0;height:27px;background:#ebf3fa;text-align:left;color:#234982;font-size:9.5px;z-index:1}
body[data-r4-view="grazing"] .g12i-table-viewport td{height:27px;border-bottom:1px solid #edf1f6;color:#1c407a}
body[data-r4-view="grazing"] .g12i-table-viewport th:last-child,body[data-r4-view="grazing"] .g12i-table-viewport td:last-child{text-align:center}
body[data-r4-view="grazing"] .g12i-see{border:1px solid #087145;background:#087145;color:white;border-radius:5px;padding:4px 8px;font-size:10px;font-weight:700}
body[data-r4-view="grazing"] .g12i-pill{background:#ddf6e8;border-radius:4px;padding:4px 5px;color:#057a49;font-size:10px;font-weight:700}
body[data-r4-view="grazing"] .g12i-page{min-height:22px;display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:10px;color:#47689c;padding-top:3px;flex:0 0 auto}
body[data-r4-view="grazing"] .g12i-page>div{display:flex;align-items:center;gap:4px}
body[data-r4-view="grazing"] .g12i-page button{border:1px solid #dce7f0;background:white;border-radius:4px;color:#087145;padding:2px 7px}
body[data-r4-view="grazing"] .g12i-page button:disabled{opacity:.35;cursor:default}
body[data-r4-view="grazing"] .g12i-bars{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:end;gap:9px;flex:1;min-height:0;padding:8px 12px 0;border-bottom:1px solid #d8e5f1}
body[data-r4-view="grazing"] .g12i-bars>div{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;min-height:0}
body[data-r4-view="grazing"] .g12i-bars>div>span{background:linear-gradient(#50b789,#169d65);width:min(100%,38px);min-height:0;border-radius:3px 3px 0 0}
body[data-r4-view="grazing"] .g12i-bars small{font-size:10px;color:#4d6a94;height:19px;display:flex;align-items:center}
body[data-r4-view="grazing"] .g12i-chart-note{font-size:10px;color:#1e4785;padding:7px 0;flex:0 0 auto}
body[data-r4-view="grazing"] .g12i-unavailable{padding:20px 12px;font-size:12px;color:#637e9c;line-height:1.5;flex:1}
body[data-r4-view="grazing"] .g12i-donut-control{display:grid;grid-template-columns:minmax(106px,1fr) 1.3fr;align-items:center;gap:8px;background:white;border:0;text-align:left;flex:1;min-height:0;width:100%}
body[data-r4-view="grazing"] .g12i-donut{width:min(100%,160px);aspect-ratio:1/1;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#0dba74 0 var(--part),#ffca26 var(--part) 100%);justify-self:center}
body[data-r4-view="grazing"] .g12i-donut strong{width:66%;height:66%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#fff;border-radius:50%;font-size:clamp(17px,2vw,26px);color:var(--inv-navy);font-weight:800}
body[data-r4-view="grazing"] .g12i-donut small{font-size:10px;font-weight:400;white-space:nowrap}
body[data-r4-view="grazing"] .g12i-legend{display:grid;align-content:center;gap:8px;min-width:0;font-size:10px;color:#214887}
body[data-r4-view="grazing"] .g12i-legend>span{display:grid;grid-template-columns:10px minmax(0,1fr);align-items:center;gap:4px}
body[data-r4-view="grazing"] .g12i-legend :is(.green,.yellow){width:9px;height:9px;border-radius:50%}
body[data-r4-view="grazing"] .g12i-legend .green{background:#0dba74}
body[data-r4-view="grazing"] .g12i-legend .yellow{background:#ffca26}
body[data-r4-view="grazing"] .g12i-legend b{grid-column:2}
body[data-r4-view="grazing"] .g12i-legend>small{font-size:9px;color:#7890aa;line-height:1.2}
body[data-r4-view="grazing"] .g12i-foot{margin:0;font-size:9px;color:#5c78a2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.g12i-dialog{box-sizing:border-box;width:min(885px,calc(100vw - 38px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #d6e4ed;border-radius:11px;box-shadow:0 15px 55px #0a18354a;color:#1f417e;font:inherit}
.g12i-dialog::backdrop{background:#112b5066}
.g12i-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
.g12i-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 17px;border-bottom:1px solid #e0eaf3;flex:0 0 auto}
.g12i-dialog>header h2{font-size:19px;color:#08266f;margin:0}
.g12i-dialog .g12i-dialog-body{padding:14px 17px;overflow:auto;min-height:0;flex:1}
.g12i-dialog .g12i-dialog-body p{font-size:13px;margin:6px 0 14px}
.g12i-dialog h3{font-size:15px;margin:15px 0 6px}
.g12i-dialog button[data-close]{background:#fff;border:1px solid #087145;color:#087145;border-radius:6px;font-weight:700;padding:7px 11px;cursor:pointer}
.g12i-dialog>footer{padding:10px 17px;border-top:1px solid #e1ecf3;display:flex;justify-content:flex-end}
.g12i-dialog .g12i-modal-table{max-height:252px;overflow:auto}
.g12i-dialog .g12i-modal-table table{width:100%;border-collapse:collapse;font-size:12px}
.g12i-dialog .g12i-modal-table :is(td,th){padding:8px;border-bottom:1px solid #e6edf4;text-align:left}
.g12i-dialog .g12i-modal-table th{background:#eff5fb;color:#08266f;position:sticky;top:0}
.g12i-error,.g12i-loading{padding:28px;color:#123b75;font-size:14px}
.g12i-error button{border:1px solid #087145;border-radius:6px;color:white;background:#087145;padding:8px 13px}
@media(max-width:1350px){body[data-r4-view="grazing"] .g12i{gap:5px;padding:6px 8px 2px}body[data-r4-view="grazing"] .g12i-filters{gap:4px}body[data-r4-view="grazing"] .g12i-panel{padding:6px}body[data-r4-view="grazing"] .g12i-panel h2{font-size:12px}body[data-r4-view="grazing"] .g12i-table-viewport :is(td,th){font-size:9px;padding-left:2px;padding-right:2px}}
@media(max-height:760px){body[data-r4-view="grazing"] .g12i{grid-template-rows:56px 54px 77px minmax(165px,1.15fr) minmax(180px,1fr) 12px;gap:5px}body[data-r4-view="grazing"] .g12i-panel h2{font-size:12px}}

body[data-r4-view="grazing"] .g12i-heading-mark{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;background:#0a8b54;border-radius:7px}
body[data-r4-view="grazing"] .g12i-heading-mark img{width:32px;height:32px;object-fit:contain}
@media(max-width:1350px){body[data-r4-view="grazing"] .g12i{grid-template-rows:55px 53px 75px minmax(150px,1.15fr) minmax(170px,1fr) 10px}body[data-r4-view="grazing"] .g12i-table-viewport td{height:24px}body[data-r4-view="grazing"] .g12i-table-viewport th{height:24px}}

/* R12 Investor R2: selectors are scoped to the Investor body only. */
body[data-r4-view="grazing"] .g12i{--inv-border:#dbe5ed;background:#f7f9fc;gap:8px}
body[data-r4-view="grazing"] .g12i-toolbar{position:relative}
body[data-r4-view="grazing"] .g12i-heading h1{font-size:clamp(23px,1.8vw,29px)}
body[data-r4-view="grazing"] .g12i-heading p{font-size:clamp(10px,.86vw,13px)}
body[data-r4-view="grazing"] .g12i-export-wrap{position:relative;flex:0 0 auto}
body[data-r4-view="grazing"] .g12i-export-button{display:inline-flex;align-items:center;gap:7px;border-color:#d7e3eb;color:#123b6c;padding:8px 12px}
body[data-r4-view="grazing"] .g12i-export-menu{position:absolute;top:calc(100% + 4px);right:0;z-index:12;min-width:134px;background:white;box-shadow:0 8px 22px #18355f33;border:1px solid #d8e5ee;border-radius:6px;padding:5px}
body[data-r4-view="grazing"] .g12i-export-menu button{background:white;color:#0a7547;width:100%;padding:8px 10px;border:0;text-align:left;font-size:12px;font-weight:700}
body[data-r4-view="grazing"] .g12i-export-menu button:hover{background:#e9f7ee}
body[data-r4-view="grazing"] .g12i-selectwrap{display:flex;position:relative;min-width:0;height:36px;align-items:center}
body[data-r4-view="grazing"] .g12i-selectwrap>.g12i-ico{position:absolute;left:9px;z-index:1;width:19px;height:19px;object-fit:contain;pointer-events:none}
body[data-r4-view="grazing"] .g12i-selectwrap select{height:36px;padding-left:34px;padding-right:16px;font-size:clamp(9.5px,.71vw,11px);background:white}
body[data-r4-view="grazing"] .g12i-filters{gap:8px}
body[data-r4-view="grazing"] .g12i-kpi{border-radius:8px;padding:9px 10px;gap:9px}
body[data-r4-view="grazing"] .g12i-kpi .g12i-ico{max-height:57px}
body[data-r4-view="grazing"] .g12i-panel{border-radius:7px;padding:9px}
body[data-r4-view="grazing"] .g12i-panel>header{margin-bottom:7px}
body[data-r4-view="grazing"] .g12i-panel h2{font-size:clamp(12px,.99vw,15px)}
body[data-r4-view="grazing"] .g12i-panel>header select{flex:0 0 auto;max-width:139px;min-width:0;border:1px solid #dce6f0;border-radius:5px;background:white;color:#2f5180;font-size:10px;padding:4px 5px;cursor:pointer}
body[data-r4-view="grazing"] .g12i-table-viewport :is(td,th){padding:6px 4px}
body[data-r4-view="grazing"] .g12i-table-viewport tr:hover td{background:#f7fbfe}
body[data-r4-view="grazing"] .g12i-table-viewport th{background:#eff4f8}
body[data-r4-view="grazing"] .g12i-page button:not([disabled]):hover{background:#e4f4ea}
body[data-r4-view="grazing"] .g12i-chart-area{display:flex;flex:1;min-height:0;gap:5px;padding-top:5px}
body[data-r4-view="grazing"] .g12i-yaxis{width:45px;min-width:45px;display:flex;flex-direction:column;justify-content:space-between;font-size:9px;color:#577092;text-align:right;padding-bottom:19px}
body[data-r4-view="grazing"] .g12i-chart-grid{position:relative;flex:1;min-width:0;background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#e1e9f1 calc(25% - 1px),#e1e9f1 25%)}
body[data-r4-view="grazing"] .g12i-chart-grid .g12i-bars{height:100%;width:100%;padding:0 4px;gap:5px;border-bottom:none;align-items:stretch}
body[data-r4-view="grazing"] .g12i-chart-grid .g12i-bars>.g12i-bar-unit{height:100%;justify-content:flex-end;min-width:0}
body[data-r4-view="grazing"] .g12i-bar-space{width:100%;flex:1;min-height:0;display:flex;justify-content:center;align-items:end}
body[data-r4-view="grazing"] .g12i-bar-fill{display:block;background:linear-gradient(#49b88a,#119962);border-radius:2px 2px 0 0;min-width:10px;max-width:35px;width:65%}
body[data-r4-view="grazing"] .g12i-zero-mark{width:11px;height:3px;background:#53b890}
body[data-r4-view="grazing"] .g12i-empty-mark{width:11px;border-bottom:1px dashed #b3c5d5}
body[data-r4-view="grazing"] .g12i-chart-grid .g12i-bars small{height:19px;font-size:9px}
body[data-r4-view="grazing"] .g12i-cost-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:6px 4px 1px;gap:4px;border-top:1px solid #e3ecf3}
body[data-r4-view="grazing"] .g12i-cost-summary>div{min-width:0;border-right:1px solid #e6edf4;padding:0 4px}
body[data-r4-view="grazing"] .g12i-cost-summary>div:last-child{border-right:0}
body[data-r4-view="grazing"] .g12i-cost-summary small{display:block;color:#677c9b;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-r4-view="grazing"] .g12i-cost-summary strong{font-size:clamp(10px,.82vw,13px);color:#12376e;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-r4-view="grazing"] .g12i-cost-footnote{font-size:8px;color:#6d839c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:2px}
body[data-r4-view="grazing"] .g12i-donut-control{grid-template-columns:minmax(100px,.9fr) 1.4fr}
@media(max-width:1350px){body[data-r4-view="grazing"] .g12i{gap:5px}body[data-r4-view="grazing"] .g12i-filters{gap:4px}body[data-r4-view="grazing"] .g12i-selectwrap>.g12i-ico{left:5px;width:15px;height:15px}body[data-r4-view="grazing"] .g12i-selectwrap select{padding-left:23px;font-size:9px}body[data-r4-view="grazing"] .g12i-panel{padding:6px}body[data-r4-view="grazing"] .g12i-cost-footnote{font-size:7.5px}}

body[data-r4-view="grazing"] .g12i-chart-grid .g12i-bars>.g12i-bar-unit>.g12i-bar-space{background:transparent;width:100%;max-width:none;min-height:0;border-radius:0}

/* R12 Investor R3: scoped geometry/readability only; no business data or shell updates. */
body[data-r4-view="grazing"] .g12i-heading-mark img{filter:brightness(0) invert(1)}
body[data-r4-view="grazing"] .g12i-bottom .g12i-panel h2{font-size:clamp(10.5px,.78vw,12.5px);line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-r4-view="grazing"] .g12i-bottom .g12i-panel>header{gap:5px}
body[data-r4-view="grazing"] .g12i-bottom .g12i-panel header select{max-width:105px;font-size:9px}
body[data-r4-view="grazing"] .g12i-table-viewport table[data-grid="farms"] :is(th,td):nth-child(1),
body[data-r4-view="grazing"] .g12i-table-viewport table[data-grid="reviews"] :is(th,td):nth-child(1),
body[data-r4-view="grazing"] .g12i-table-viewport table[data-grid="supplements"] :is(th,td):nth-child(1){text-align:left}
body[data-r4-view="grazing"] .g12i-table-viewport table[data-grid="farms"] :is(th,td),
body[data-r4-view="grazing"] .g12i-table-viewport table[data-grid="reviews"] :is(th,td),
body[data-r4-view="grazing"] .g12i-table-viewport table[data-grid="supplements"] :is(th,td){font-size:clamp(9px,.68vw,10.5px);padding-left:4px;padding-right:4px}
