/* R13 body-scoped CSS only. Do not style global shell. */
.r13p-root{--r13-green:#07814b;--r13-navy:#082c77;--r13-line:#d8e5ef;color:var(--r13-navy);background:#f4f9fe;font-family:inherit;padding:12px 14px 8px;box-sizing:border-box;width:100%;min-height:100%;display:flex;flex-direction:column;gap:9px;font-size:12px}
.r13p-root *{box-sizing:border-box}.r13p-header,.r13p-table-card>header{display:flex;align-items:center;justify-content:space-between;gap:14px}.r13p-header{border-bottom:1px solid var(--r13-line);padding-bottom:9px}.r13p-header h1{font-size:26px;margin:0;color:#09256b;font-weight:800;line-height:1.12}.r13p-header p{font-size:12px;color:#37709b;margin:4px 0 0}.r13p-outline{flex:none;border:1px solid #69bda0;background:#fff;border-radius:5px;padding:9px 13px;color:var(--r13-green);font-weight:700;cursor:pointer}.r13p-outline:hover{background:#e8faf1}.r13p-filters{display:flex;align-items:end;gap:8px}.r13p-filter{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;font-size:10px;font-weight:700;color:#0e3782}.r13p-filter select{width:100%;height:36px;border:1px solid var(--r13-line);border-radius:5px;color:#173b87;background:#fff;font-weight:600;font-size:11px;padding:0 7px}.r13p-filters>.r13p-outline{height:36px;padding:6px 10px;font-size:11px}.r13p-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.r13p-kpi{border:1px solid var(--r13-line);background:#fff;border-radius:7px;padding:10px 9px;display:flex;align-items:center;gap:9px;min-width:0;min-height:89px}.r13p-kpi-icon{font-size:27px;min-width:42px;height:44px;display:grid;place-items:center;border-radius:9px;color:#07884c;background:#e4f8ee}.r13p-kpi-main{display:flex;flex-direction:column;gap:3px;min-width:0}.r13p-kpi-main small{font-size:10px;color:#19418f}.r13p-kpi-main strong{font-size:19px;color:#081f78;white-space:nowrap}.r13p-kpi-main>span{color:#078849;font-size:10px;line-height:1.25}.r13p-charts{display:grid;grid-template-columns:1.26fr 1fr 1.08fr;gap:9px;min-height:0;flex:1 1 auto}.r13p-card{min-width:0;border:1px solid var(--r13-line);background:#fff;border-radius:7px;padding:10px 12px}.r13p-card h2{font-size:14px;color:#092d76;margin:0 0 7px;font-weight:800}.r13p-line{width:100%;max-height:173px}.r13p-footnote{font-size:9px;color:#6d8398;margin:3px 0 0}.r13p-empty{text-align:center;color:#67849e;font-size:12px;padding:40px 5px}.r13p-bars{display:flex;flex-direction:column;gap:10px;padding:6px}.r13p-bars button{display:grid;grid-template-columns:94px minmax(25px,1fr) 36px;gap:5px;align-items:center;background:transparent;border:0;color:#184088;font-size:11px;text-align:right;cursor:pointer}.r13p-bars button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.r13p-bars button i{display:block;background:linear-gradient(90deg,#067b48,#1ed489);height:17px;min-width:4px}.r13p-bars button i.negative{background:#db6d4b}.r13p-bars button b{text-align:left}.r13p-donut-layout{display:flex;align-items:center;justify-content:space-around;gap:12px;height:78%}.r13p-donut{width:min(180px,46%);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;flex:none}.r13p-donut>div{width:65%;height:65%;background:white;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center}.r13p-donut b{font-size:29px}.r13p-donut small{font-size:10px}.r13p-legend{display:flex;flex-direction:column;gap:13px;font-size:11px}.r13p-legend span{display:flex;align-items:center;gap:5px}.r13p-legend i{width:9px;height:9px;display:inline-block;border-radius:100%}.r13p-legend .a{background:#12b981}.r13p-legend .b{background:#ffbd24}.r13p-legend .c{background:#f45353}.r13p-tabs{display:flex;border:1px solid var(--r13-line);border-radius:6px;background:#eaf3fa;min-height:37px}.r13p-tabs button{flex:1;border:0;border-right:1px solid var(--r13-line);background:transparent;color:#234e8c;font-weight:600;font-size:11px;cursor:pointer}.r13p-tabs button.active{background:#d9f5e8;color:#056c46;border-bottom:3px solid #0b955a}.r13p-table-card{flex:1 1 auto;min-height:215px;max-height:300px;display:flex;flex-direction:column;gap:6px}.r13p-table-card>header h2{margin:0}.r13p-table-card .r13p-outline{font-size:10px;padding:4px 7px}.r13p-table-outer{flex:1;min-height:0;overflow:auto}.r13p-table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:10px;color:#143d7e}.r13p-table th{background:#eaf2f8;text-align:left;padding:7px 6px;font-weight:700;position:sticky;top:0}.r13p-table td{padding:6px;border-bottom:1px solid #e8eff6}.r13p-table td:last-child{text-align:center}.r13p-table td button{border:0;color:#0060c1;background:transparent;cursor:pointer}.r13p-table-bottom{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#5980a2}.r13p-table-bottom>div{display:flex;gap:8px;align-items:center}.r13p-table-bottom button{background:white;color:#007b49;border:1px solid var(--r13-line);border-radius:5px;padding:4px 9px;cursor:pointer}.r13p-table-bottom button:disabled{opacity:.3;cursor:default}.r13p-pill{font-size:9px;padding:4px 6px;border-radius:10px;white-space:nowrap}.r13p-pill.good{color:#06734c;background:#d7f6e6}.r13p-pill.warn{color:#955a01;background:#fff2d6}.r13p-disclaimer{font-size:9px;color:#71859d;margin:0}.r13p-message{margin:20px;background:#fff;border:1px solid #cce3f0;border-radius:8px;padding:30px}.r13p-error{color:#a93333}
@media(max-width:1250px){.r13p-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.r13p-charts{grid-template-columns:1fr 1fr}.r13p-charts .r13p-card:last-child{display:none}.r13p-filter select{font-size:10px}}@media(max-width:850px){.r13p-charts{grid-template-columns:1fr}.r13p-filters{flex-wrap:wrap}.r13p-filter{min-width:135px}.r13p-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.r13p-table-card{max-height:none}.r13p-charts .r13p-card:last-child{display:block}}

/* R13 Ganadero visual-contract correction: BODY ONLY, shell preserved. */
.r13p-root.r13p-role-rancher .r13p-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.r13p-root.r13p-role-rancher .r13p-tabs{display:none}
.r13p-heading{display:flex;align-items:center;gap:12px;min-width:0}
.r13p-heading-icon{width:43px;height:43px;display:grid;place-items:center;flex:none;border-radius:9px;color:#fff;background:#00814f}
.r13p-heading-icon svg{width:27px;height:27px}
.r13p-kpi-icon svg{width:27px;height:27px;stroke-width:2.1}
.r13p-card h2{display:flex;align-items:center;gap:7px;line-height:1.2}
.r13p-card h2 svg{width:17px;height:17px;color:#028955;flex:none}
.r13p-table-card h2 svg{width:17px;height:17px}
.r13p-table td:last-child svg{height:17px;width:17px;stroke-width:2}
.r13p-root.r13p-role-rancher .r13p-table-card{min-height:228px}
@media(max-width:1150px){.r13p-root.r13p-role-rancher .r13p-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px){.r13p-root.r13p-role-rancher .r13p-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* R13 Ganadero table fidelity pass — scoped to BODY, not shell / other roles. */
.r13p-root.r13p-role-rancher{gap:10px}
.r13p-role-rancher .r13p-charts{min-height:210px}
.r13p-role-rancher .r13p-table-card{min-height:247px;max-height:290px;gap:8px}
.r13p-role-rancher .r13p-table-card>header{min-height:24px}
.r13p-role-rancher .r13p-table-actions{display:flex;gap:7px;align-items:center}
.r13p-role-rancher .r13p-table-actions .r13p-outline{font-size:11px;padding:5px 9px}
.r13p-role-rancher .r13p-rancher-table{font-size:10px;table-layout:auto}
.r13p-role-rancher .r13p-rancher-table th{padding:6px 5px}
.r13p-role-rancher .r13p-rancher-table td{padding:5px}
.r13p-role-rancher .r13p-rancher-table .r13p-check-col{width:26px;min-width:26px;text-align:center}
.r13p-role-rancher .r13p-rancher-table input[type=checkbox]{height:14px;width:14px;accent-color:#087f4e;cursor:pointer;margin:0}
.r13p-role-rancher .r13p-rancher-table tr.r13p-selected{background:#ecfff5}
.r13p-role-rancher .r13p-rancher-table .r13p-detail-row td{background:#f1fbf7;color:#345c73;padding:8px 12px;white-space:normal;line-height:1.4;font-size:11px}
.r13p-role-rancher .r13p-detail-row strong{color:#0c376e}
.r13p-role-rancher .r13p-detail-row span{color:#757d8d}
.r13p-role-rancher .r13p-row-action button{display:inline-grid;place-items:center;min-width:24px;min-height:24px}
.r13p-role-rancher .r13p-row-action button[aria-expanded=true]{background:#e0f6ea;border-radius:5px}
.r13p-role-rancher .r13p-pagination{display:flex;align-items:center;gap:5px}
.r13p-role-rancher .r13p-pagination button{padding:5px 8px;min-width:24px;font-size:11px}
.r13p-role-rancher .r13p-pagination button.active{background:#007c4b;color:white;border-color:#007c4b}
.r13p-role-rancher .r13p-pagination-ellipsis{padding:0 2px}
@media(max-width:1150px){.r13p-role-rancher .r13p-table-outer{overflow-x:auto}}



/* R13 GANADERO R3 ICONOGRAPHY: canonical approved pictograms, BODY scope only.
   Static images taken from the approved 1672x941 Ganadero atlas, NOT runtime data.
   No changes to KPI/row actions, routing, RBAC, metrics, or global shell. */
.r13p-root.r13p-role-rancher .r13p-kpi .r13p-kpi-icon {
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
}
.r13p-root.r13p-role-rancher .r13p-kpi .r13p-kpi-icon svg { visibility:hidden; }
.r13p-root.r13p-role-rancher .r13p-kpi:nth-child(1) .r13p-kpi-icon { background-image:url("./r13p-icons/r13p-ganadero-kpi-cow.png"); }
.r13p-root.r13p-role-rancher .r13p-kpi:nth-child(2) .r13p-kpi-icon { background-image:url("./r13p-icons/r13p-ganadero-kpi-weight.png"); }
.r13p-root.r13p-role-rancher .r13p-kpi:nth-child(3) .r13p-kpi-icon { background-image:url("./r13p-icons/r13p-ganadero-kpi-trend.png"); }
.r13p-root.r13p-role-rancher .r13p-kpi:nth-child(4) .r13p-kpi-icon { background-image:url("./r13p-icons/r13p-ganadero-kpi-bars.png"); }
.r13p-root.r13p-role-rancher .r13p-kpi:nth-child(5) .r13p-kpi-icon { background-image:url("./r13p-icons/r13p-ganadero-kpi-coins.png"); }

/* Replace the unrelated outline cow and line chart icon on matching Ganadero headers only. */
.r13p-root.r13p-role-rancher .r13p-table-card>header h2>svg,
.r13p-root.r13p-role-rancher .r13p-charts>.r13p-card:nth-child(2) h2>svg {display:none;}
.r13p-root.r13p-role-rancher .r13p-table-card>header h2::before,
.r13p-root.r13p-role-rancher .r13p-charts>.r13p-card:nth-child(2) h2::before {
  content:"";display:inline-block;width:18px;height:18px;flex:none;
  background-repeat:no-repeat;background-position:center;background-size:contain;
}
.r13p-root.r13p-role-rancher .r13p-table-card>header h2::before {background-image:url("./r13p-icons/r13p-ganadero-glyph-cow.png");}
.r13p-root.r13p-role-rancher .r13p-charts>.r13p-card:nth-child(2) h2::before {background-image:url("./r13p-icons/r13p-ganadero-glyph-weight.png");}


/* R13 Ganadero R4: five actionable KPI modals. BODY-scoped, no global shell changes. */
.r13p-role-rancher .r13p-kpi-trigger{font:inherit;color:inherit;cursor:pointer;text-align:left;position:relative;min-width:0;padding-right:18px;transition:border-color .12s,box-shadow .12s}
.r13p-role-rancher .r13p-kpi-trigger:hover{border-color:#67c69c;box-shadow:0 1px 6px #0a6a3b20}
.r13p-role-rancher .r13p-kpi-trigger:focus-visible,.r13p-role-rancher .r13p-modal button:focus-visible{outline:3px solid #137ac0;outline-offset:2px}
.r13p-role-rancher .r13p-kpi-chevron{position:absolute;right:6px;top:50%;transform:translateY(-50%);font-size:21px;font-weight:800;color:#1675a3;line-height:1}
.r13p-role-rancher .r13p-modal-backdrop{position:fixed;inset:0;z-index:10050;background:#092d4188;display:flex;align-items:center;justify-content:center;padding:18px;overscroll-behavior:contain}
.r13p-role-rancher .r13p-modal{display:flex;flex-direction:column;width:min(600px,calc(100vw - 36px));max-height:calc(100vh - 36px);background:#fff;border:1px solid #c8e5dc;border-radius:13px;box-shadow:0 16px 54px #062a3550;overflow:hidden;color:#082f72;font-size:13px}
.r13p-role-rancher .r13p-modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px 12px;border-bottom:1px solid #dceaf3;gap:14px}
.r13p-role-rancher .r13p-modal-header h2{font-size:21px;line-height:1.25;margin:3px 0 0;color:#09286d;font-weight:800}
.r13p-role-rancher .r13p-modal-eyebrow{font-size:10px;color:#07814b;font-weight:800;letter-spacing:.06em}
.r13p-role-rancher .r13p-modal-close{flex:none;border:1px solid #d5e3ed;border-radius:7px;width:30px;height:30px;background:white;color:#264d76;cursor:pointer;font-size:22px;line-height:1}
.r13p-role-rancher .r13p-modal-body{overflow-y:auto;min-height:0;padding:16px 22px;overscroll-behavior:contain}
.r13p-role-rancher .r13p-modal-feature{border-radius:9px;background:#edfbf5;border:1px solid #d3f1e2;padding:14px 16px}
.r13p-role-rancher .r13p-modal-feature strong{display:block;font-size:30px;font-weight:800;color:#00774b}
.r13p-role-rancher .r13p-modal-feature p{font-size:12px;line-height:1.55;margin:6px 0 0;color:#315a72}
.r13p-role-rancher .r13p-modal-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:13px 0}
.r13p-role-rancher .r13p-modal-facts>div{border:1px solid #dce9f0;border-radius:8px;padding:12px 9px;min-width:0}
.r13p-role-rancher .r13p-modal-facts dt{font-size:11px;line-height:1.35;color:#587189}
.r13p-role-rancher .r13p-modal-facts dd{font-size:15px;font-weight:700;margin:6px 0 0;color:#10366c;overflow-wrap:anywhere}
.r13p-role-rancher .r13p-modal-scope{font-size:11px;color:#315e79;border-top:1px solid #e1edf2;padding-top:11px;margin:8px 0}
.r13p-role-rancher .r13p-modal-footnote{font-size:10px;color:#71869a;margin:8px 0 0}
.r13p-role-rancher .r13p-modal-footer{display:flex;justify-content:flex-end;align-items:center;gap:9px;padding:12px 22px;border-top:1px solid #dceaf3}
.r13p-role-rancher .r13p-modal-footer button{border-radius:6px;padding:9px 14px;cursor:pointer;font-size:12px;font-weight:700}
.r13p-role-rancher .r13p-modal-link{border:1px solid #3eaa81;background:#fff;color:#06794c}
.r13p-role-rancher .r13p-modal-done{border:1px solid #067b4b;background:#067b4b;color:#fff}
@media(max-width:580px){.r13p-role-rancher .r13p-modal-facts{grid-template-columns:1fr 1fr}.r13p-role-rancher .r13p-modal-header{padding:15px}.r13p-role-rancher .r13p-modal-body{padding:12px 15px}}


/* Ganadero R5: full-panel click target for pie chart, reusing approved R4 detail modal.
   Overlay does not reposition the donut or legend. Other roles remain static. */
.r13p-root.r13p-role-rancher .r13p-charts>.r13p-card:nth-child(3){position:relative}
.r13p-root.r13p-role-rancher .r13p-pie-card-hit{
  position:absolute;inset:0;display:block;width:100%;height:100%;padding:0;
  border:0;border-radius:7px;background:transparent;cursor:pointer;z-index:2;
}
.r13p-root.r13p-role-rancher .r13p-pie-card-hit>span{
  position:absolute;right:9px;top:8px;color:#1675a3;font-size:20px;
  line-height:1;font-weight:800;pointer-events:none;
}
.r13p-root.r13p-role-rancher .r13p-pie-card-hit:hover{box-shadow:inset 0 0 0 2px #67c69c}
.r13p-root.r13p-role-rancher .r13p-pie-card-hit:focus-visible{outline:3px solid #137ac0;outline-offset:-3px}

/* R13 Ganadero R6: existing animal detail route, BODY ONLY; no shell changes. */
.r13p-root.r13p-role-rancher .r13p-animal-link{color:#1453a5;text-decoration:underline;text-underline-offset:2px}
.r13p-root.r13p-role-rancher .r13p-animal-link:focus-visible,
.r13p-root.r13p-role-rancher .r13p-row-action button:focus-visible{outline:2px solid #087b52;outline-offset:1px;border-radius:4px}
.r13p-root.r13p-role-rancher .r13p-row-action{white-space:nowrap;min-width:60px}
.r13p-root.r13p-role-rancher .r13p-row-action .r13p-open-animal{font-size:22px;font-weight:700;color:#075ab4;line-height:1;min-width:22px;min-height:24px;vertical-align:middle}


/* AgroLogix R13 Ganadero R7 -- BODY geometry candidate only.
 * Narrow-scoped (r13p-role-rancher), only large, sufficiently tall desktops.
 * No global shell, modal logic, data, routing, or other-role changes.
 * Requires VISUAL REVIEW at identical viewport/zoom/DPR before VISUAL PASS.
 */
@media (min-width:1480px) and (min-height:840px) {
  .r13p-root.r13p-role-rancher {
    gap:10px;
    padding:13px 16px 9px;
  }
  .r13p-root.r13p-role-rancher .r13p-header {
    padding-bottom:11px;
  }
  .r13p-root.r13p-role-rancher .r13p-header h1 {
    font-size:28px;
  }
  .r13p-root.r13p-role-rancher .r13p-filters {
    gap:9px;
  }
  .r13p-root.r13p-role-rancher .r13p-filter select,
  .r13p-root.r13p-role-rancher .r13p-filters>.r13p-outline {
    height:39px;
  }
  .r13p-root.r13p-role-rancher .r13p-filter {
    font-size:11px;
  }
  .r13p-root.r13p-role-rancher .r13p-filter select {
    font-size:12px;
    padding-inline:10px;
  }
  .r13p-root.r13p-role-rancher .r13p-kpis {
    gap:9px;
  }
  .r13p-root.r13p-role-rancher .r13p-kpi {
    min-height:clamp(97px,11.4vh,110px);
    padding:11px 12px;
    gap:11px;
  }
  .r13p-root.r13p-role-rancher .r13p-kpi-icon {
    min-width:46px;
    height:46px;
  }
  .r13p-root.r13p-role-rancher .r13p-kpi-main small {
    font-size:11px;
  }
  .r13p-root.r13p-role-rancher .r13p-kpi-main strong {
    font-size:21px;
  }
  .r13p-root.r13p-role-rancher .r13p-kpi-main>span {
    font-size:10px;
  }
  .r13p-root.r13p-role-rancher .r13p-charts {
    min-height:clamp(235px,27vh,262px);
    gap:10px;
  }
  .r13p-root.r13p-role-rancher .r13p-card {
    padding:11px 12px;
  }
  .r13p-root.r13p-role-rancher .r13p-card h2 {
    font-size:15px;
  }
  .r13p-root.r13p-role-rancher .r13p-charts .r13p-donut {
    width:min(205px,48%);
  }
  .r13p-root.r13p-role-rancher .r13p-legend {
    font-size:12px;
  }
  .r13p-root.r13p-role-rancher .r13p-charts .r13p-empty {
    padding-top:clamp(48px,7.2vh,70px);
  }
  .r13p-root.r13p-role-rancher .r13p-table-card {
    min-height:clamp(268px,30.8vh,300px);
    max-height:clamp(293px,33.5vh,322px);
    gap:7px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table {
    font-size:11px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table th {
    padding:7px 6px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table td {
    padding:7px 6px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table thead tr {
    height:33px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table tbody tr:not(.r13p-detail-row) {
    height:33px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table th:last-child,
  .r13p-root.r13p-role-rancher .r13p-rancher-table td:last-child {
    min-width:75px;
    text-align:center;
  }
  .r13p-root.r13p-role-rancher .r13p-table-bottom {
    font-size:11px;
  }
  .r13p-root.r13p-role-rancher .r13p-pill {
    font-size:10px;
  }
}
@media (min-width:1480px) and (min-height:920px) {
  .r13p-root.r13p-role-rancher .r13p-header {margin-bottom:8px;}
  .r13p-root.r13p-role-rancher .r13p-filters {margin-bottom:15px;}
  .r13p-root.r13p-role-rancher .r13p-kpi {min-height:110px;}
}


/* AGX R13 Ganadero R8 — scoped viewport-fit correction after R7.
   Preserve 5 actual rows + pager; do not hide global scroll, do not touch SHELL. */
@media (min-width:1480px) and (min-height:840px) {
  .r13p-root.r13p-role-rancher {
    gap:8px;
    padding:10px 14px 7px;
  }
  .r13p-root.r13p-role-rancher .r13p-header {
    margin-bottom:0;
    padding-bottom:8px;
  }
  .r13p-root.r13p-role-rancher .r13p-filters {
    margin-bottom:0;
    gap:8px;
  }
  .r13p-root.r13p-role-rancher .r13p-kpi {
    min-height:96px;
    padding:9px 11px;
  }
  .r13p-root.r13p-role-rancher .r13p-charts {
    flex:0 0 auto;
    min-height:0;
    height:clamp(205px,25vh,250px);
  }
  .r13p-root.r13p-role-rancher .r13p-charts .r13p-donut {
    width:min(186px,46%);
  }
  .r13p-root.r13p-role-rancher .r13p-table-card {
    flex:0 0 auto;
    min-height:0;
    height:clamp(278px,30vh,306px);
    max-height:none;
    gap:6px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table th {
    padding:6px 5px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table td {
    padding:5px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table thead tr {
    height:30px;
  }
  .r13p-root.r13p-role-rancher .r13p-rancher-table tbody tr:not(.r13p-detail-row) {
    height:32px;
  }
  .r13p-root.r13p-role-rancher .r13p-table-outer {
    min-height:0;
    overflow-x:auto;
    overflow-y:auto;
  }
}


/* AgroLogix R13 R9 — ADMIN animal detail controls only; Ganadero, Inversionista and SHELL untouched. */
.r13p-root.r13p-role-admin .r13p-admin-animal-table td.r13p-admin-row-actions{white-space:nowrap;min-width:66px;text-align:center}
.r13p-root.r13p-role-admin .r13p-admin-row-actions button{display:inline-grid;place-items:center;min-width:23px;min-height:24px;padding:2px 3px;vertical-align:middle}
.r13p-root.r13p-role-admin .r13p-admin-row-actions .r13p-admin-open-animal{font-size:23px;font-weight:700;color:#075ab4;line-height:1}
.r13p-root.r13p-role-admin .r13p-admin-row-actions button[aria-expanded="true"]{background:#e0f6ea;border-radius:5px}
.r13p-root.r13p-role-admin .r13p-admin-detail-row td{background:#f1fbf7;color:#345c73;padding:8px 12px;white-space:normal;line-height:1.4;font-size:11px}
.r13p-root.r13p-role-admin .r13p-admin-detail-row strong{color:#0c376e}
.r13p-root.r13p-role-admin .r13p-admin-detail-row span{color:#757d8d}
.r13p-root.r13p-role-admin .r13p-admin-animal-link{color:#1453a5;text-decoration:underline;text-underline-offset:2px}
.r13p-root.r13p-role-admin .r13p-admin-animal-link:focus-visible,.r13p-root.r13p-role-admin .r13p-admin-row-actions button:focus-visible{outline:2px solid #087b52;outline-offset:1px;border-radius:4px}

/* R11 ADMIN ONLY: canonical KPI imagery and accessible read-only analytics overlays. */
.r13p-role-admin .r13p-kpi-trigger:focus-visible,.r13p-role-admin .r13p-modal button:focus-visible{outline:3px solid #137ac0;outline-offset:2px}
.r13p-role-admin .r13p-modal-backdrop{position:fixed;inset:0;z-index:10050;background:#092d4188;display:flex;align-items:center;justify-content:center;padding:18px;overscroll-behavior:contain}
.r13p-role-admin .r13p-modal{display:flex;flex-direction:column;width:min(600px,calc(100vw - 36px));max-height:calc(100vh - 36px);background:#fff;border:1px solid #c8e5dc;border-radius:13px;box-shadow:0 16px 54px #062a3550;overflow:hidden;color:#082f72;font-size:13px}
.r13p-role-admin .r13p-modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px 12px;border-bottom:1px solid #dceaf3;gap:14px}
.r13p-role-admin .r13p-modal-header h2{font-size:21px;line-height:1.25;margin:3px 0 0;color:#09286d;font-weight:800}
.r13p-role-admin .r13p-modal-eyebrow{font-size:10px;color:#07814b;font-weight:800;letter-spacing:.06em}
.r13p-role-admin .r13p-modal-close{flex:none;border:1px solid #d5e3ed;border-radius:7px;width:30px;height:30px;background:white;color:#264d76;cursor:pointer;font-size:22px;line-height:1}
.r13p-role-admin .r13p-modal-body{overflow-y:auto;min-height:0;padding:16px 22px;overscroll-behavior:contain}
.r13p-role-admin .r13p-modal-feature{border-radius:9px;background:#edfbf5;border:1px solid #d3f1e2;padding:14px 16px}
.r13p-role-admin .r13p-modal-feature strong{display:block;font-size:30px;font-weight:800;color:#00774b}
.r13p-role-admin .r13p-modal-feature p{font-size:12px;line-height:1.55;margin:6px 0 0;color:#315a72}
.r13p-role-admin .r13p-modal-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:13px 0}
.r13p-role-admin .r13p-modal-facts>div{border:1px solid #dce9f0;border-radius:8px;padding:12px 9px;min-width:0}
.r13p-role-admin .r13p-modal-facts dt{font-size:11px;line-height:1.35;color:#587189}
.r13p-role-admin .r13p-modal-facts dd{font-size:15px;font-weight:700;margin:6px 0 0;color:#10366c;overflow-wrap:anywhere}
.r13p-role-admin .r13p-modal-scope{font-size:11px;color:#315e79;border-top:1px solid #e1edf2;padding-top:11px;margin:8px 0}
.r13p-role-admin .r13p-modal-footnote{font-size:10px;color:#71869a;margin:8px 0 0}
.r13p-role-admin .r13p-modal-footer{display:flex;justify-content:flex-end;align-items:center;gap:9px;padding:12px 22px;border-top:1px solid #dceaf3}
.r13p-role-admin .r13p-modal-footer button{border-radius:6px;padding:9px 14px;cursor:pointer;font-size:12px;font-weight:700}
.r13p-role-admin .r13p-modal-link{border:1px solid #3eaa81;background:#fff;color:#06794c}
.r13p-role-admin .r13p-modal-done{border:1px solid #067b4b;background:#067b4b;color:#fff}

.r13p-root.r13p-role-admin .r13p-admin-kpi-trigger{font:inherit;text-align:left;color:inherit;cursor:pointer;position:relative;padding-right:19px;min-width:0;transition:border-color .12s,box-shadow .12s}
.r13p-root.r13p-role-admin .r13p-admin-kpi-trigger:hover,.r13p-root.r13p-role-admin .r13p-admin-chart:hover{border-color:#72c8a0;box-shadow:0 1px 7px #06794d25}
.r13p-root.r13p-role-admin .r13p-admin-kpi-trigger:focus-visible,.r13p-root.r13p-role-admin .r13p-admin-chart:focus-visible,.r13p-root.r13p-role-admin .r13p-modal button:focus-visible{outline:3px solid #1482ca;outline-offset:2px}
.r13p-root.r13p-role-admin .r13p-admin-kpi-chevron{position:absolute;right:5px;top:50%;transform:translateY(-50%);font-size:22px;font-weight:800;line-height:1;color:#0869b0}
.r13p-root.r13p-role-admin .r13p-admin-chart{position:relative;cursor:pointer;padding-right:19px}
.r13p-root.r13p-role-admin .r13p-admin-chart::after{content:'›';position:absolute;top:7px;right:10px;color:#0869b0;font-size:23px;font-weight:800;line-height:1;pointer-events:none}
.r13p-root.r13p-role-admin .r13p-kpi-icon{width:48px;min-width:48px;height:48px;padding:0;border:0;background-size:contain;background-position:center;background-repeat:no-repeat;background-color:transparent}
.r13p-root.r13p-role-admin .r13p-kpi-icon svg{visibility:hidden}
.r13p-root.r13p-role-admin .r13p-kpi:nth-child(1) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-cow.png")}
.r13p-root.r13p-role-admin .r13p-kpi:nth-child(2) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-weight.png")}
.r13p-root.r13p-role-admin .r13p-kpi:nth-child(3) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-trend.png")}
.r13p-root.r13p-role-admin .r13p-kpi:nth-child(4) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-bars.png")}
.r13p-root.r13p-role-admin .r13p-kpi:nth-child(5) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-coins.png")}
.r13p-root.r13p-role-admin .r13p-kpi:nth-child(6) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-coverage.png")}

@media(max-width:580px){.r13p-root.r13p-role-admin .r13p-modal-facts{grid-template-columns:1fr 1fr}.r13p-root.r13p-role-admin .r13p-modal-header{padding:15px}.r13p-root.r13p-role-admin .r13p-modal-body{padding:12px 15px}}


/* AgroLogix R13 INVESTOR I1: reuse approved icons and readonly popups, investor role only. */
.r13p-role-investor .r13p-kpi-trigger:focus-visible,.r13p-role-investor .r13p-modal button:focus-visible{outline:3px solid #137ac0;outline-offset:2px}
.r13p-role-investor .r13p-modal-backdrop{position:fixed;inset:0;z-index:10050;background:#092d4188;display:flex;align-items:center;justify-content:center;padding:18px;overscroll-behavior:contain}
.r13p-role-investor .r13p-modal{display:flex;flex-direction:column;width:min(600px,calc(100vw - 36px));max-height:calc(100vh - 36px);background:#fff;border:1px solid #c8e5dc;border-radius:13px;box-shadow:0 16px 54px #062a3550;overflow:hidden;color:#082f72;font-size:13px}
.r13p-role-investor .r13p-modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px 12px;border-bottom:1px solid #dceaf3;gap:14px}
.r13p-role-investor .r13p-modal-header h2{font-size:21px;line-height:1.25;margin:3px 0 0;color:#09286d;font-weight:800}
.r13p-role-investor .r13p-modal-eyebrow{font-size:10px;color:#07814b;font-weight:800;letter-spacing:.06em}
.r13p-role-investor .r13p-modal-close{flex:none;border:1px solid #d5e3ed;border-radius:7px;width:30px;height:30px;background:white;color:#264d76;cursor:pointer;font-size:22px;line-height:1}
.r13p-role-investor .r13p-modal-body{overflow-y:auto;min-height:0;padding:16px 22px;overscroll-behavior:contain}
.r13p-role-investor .r13p-modal-feature{border-radius:9px;background:#edfbf5;border:1px solid #d3f1e2;padding:14px 16px}
.r13p-role-investor .r13p-modal-feature strong{display:block;font-size:30px;font-weight:800;color:#00774b}
.r13p-role-investor .r13p-modal-feature p{font-size:12px;line-height:1.55;margin:6px 0 0;color:#315a72}
.r13p-role-investor .r13p-modal-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:13px 0}
.r13p-role-investor .r13p-modal-facts>div{border:1px solid #dce9f0;border-radius:8px;padding:12px 9px;min-width:0}
.r13p-role-investor .r13p-modal-facts dt{font-size:11px;line-height:1.35;color:#587189}
.r13p-role-investor .r13p-modal-facts dd{font-size:15px;font-weight:700;margin:6px 0 0;color:#10366c;overflow-wrap:anywhere}
.r13p-role-investor .r13p-modal-scope{font-size:11px;color:#315e79;border-top:1px solid #e1edf2;padding-top:11px;margin:8px 0}
.r13p-role-investor .r13p-modal-footnote{font-size:10px;color:#71869a;margin:8px 0 0}
.r13p-role-investor .r13p-modal-footer{display:flex;justify-content:flex-end;align-items:center;gap:9px;padding:12px 22px;border-top:1px solid #dceaf3}
.r13p-role-investor .r13p-modal-footer button{border-radius:6px;padding:9px 14px;cursor:pointer;font-size:12px;font-weight:700}
.r13p-role-investor .r13p-modal-link{border:1px solid #3eaa81;background:#fff;color:#06794c}
.r13p-role-investor .r13p-modal-done{border:1px solid #067b4b;background:#067b4b;color:#fff}

.r13p-root.r13p-role-investor .r13p-admin-kpi-trigger{font:inherit;text-align:left;color:inherit;cursor:pointer;position:relative;padding-right:19px;min-width:0;transition:border-color .12s,box-shadow .12s}
.r13p-root.r13p-role-investor .r13p-admin-kpi-trigger:hover,.r13p-root.r13p-role-investor .r13p-admin-chart:hover{border-color:#72c8a0;box-shadow:0 1px 7px #06794d25}
.r13p-root.r13p-role-investor .r13p-admin-kpi-trigger:focus-visible,.r13p-root.r13p-role-investor .r13p-admin-chart:focus-visible,.r13p-root.r13p-role-investor .r13p-modal button:focus-visible{outline:3px solid #1482ca;outline-offset:2px}
.r13p-root.r13p-role-investor .r13p-admin-kpi-chevron{position:absolute;right:5px;top:50%;transform:translateY(-50%);font-size:22px;font-weight:800;line-height:1;color:#0869b0}
.r13p-root.r13p-role-investor .r13p-admin-chart{position:relative;cursor:pointer;padding-right:19px}
.r13p-root.r13p-role-investor .r13p-admin-chart::after{content:'›';position:absolute;top:7px;right:10px;color:#0869b0;font-size:23px;font-weight:800;line-height:1;pointer-events:none}
.r13p-root.r13p-role-investor .r13p-kpi-icon{width:48px;min-width:48px;height:48px;padding:0;border:0;background-size:contain;background-position:center;background-repeat:no-repeat;background-color:transparent}
.r13p-root.r13p-role-investor .r13p-kpi-icon svg{visibility:hidden}
.r13p-root.r13p-role-investor .r13p-kpi:nth-child(1) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-cow.png")}
.r13p-root.r13p-role-investor .r13p-kpi:nth-child(2) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-weight.png")}
.r13p-root.r13p-role-investor .r13p-kpi:nth-child(3) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-trend.png")}
.r13p-root.r13p-role-investor .r13p-kpi:nth-child(4) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-bars.png")}
.r13p-root.r13p-role-investor .r13p-kpi:nth-child(5) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-coins.png")}
.r13p-root.r13p-role-investor .r13p-kpi:nth-child(6) .r13p-kpi-icon{background-image:url("./r13p-icons/r13p-admin-r11-coverage.png")}

@media(max-width:580px){.r13p-root.r13p-role-investor .r13p-modal-facts{grid-template-columns:1fr 1fr}.r13p-root.r13p-role-investor .r13p-modal-header{padding:15px}.r13p-root.r13p-role-investor .r13p-modal-body{padding:12px 15px}}



/* AGX R13 INVESTOR I2 - animal row actions ONLY. Does not change Admin/Ganadero. */
.r13p-root.r13p-role-investor .r13p-investor-animal-table td.r13p-investor-row-actions{white-space:nowrap;min-width:66px;text-align:center}
.r13p-root.r13p-role-investor .r13p-investor-row-actions button{display:inline-grid;place-items:center;min-width:23px;min-height:24px;padding:2px 3px;vertical-align:middle}
.r13p-root.r13p-role-investor .r13p-investor-row-actions .r13p-investor-open-animal{font-size:23px;font-weight:700;color:#075ab4;line-height:1}
.r13p-root.r13p-role-investor .r13p-investor-row-actions button[aria-expanded="true"]{background:#e0f6ea;border-radius:5px}
.r13p-root.r13p-role-investor .r13p-investor-detail-row td{background:#f1fbf7;color:#345c73;padding:8px 12px;white-space:normal;line-height:1.4;font-size:11px}
.r13p-root.r13p-role-investor .r13p-investor-detail-row strong{color:#0c376e}
.r13p-root.r13p-role-investor .r13p-investor-detail-row span{color:#757d8d}
.r13p-root.r13p-role-investor .r13p-investor-animal-link{color:#1453a5;text-decoration:underline;text-underline-offset:2px}
.r13p-root.r13p-role-investor .r13p-investor-animal-link:focus-visible,.r13p-root.r13p-role-investor .r13p-investor-row-actions button:focus-visible{outline:2px solid #087b52;outline-offset:1px;border-radius:4px}


/* R13 I4 Inversionista: chevron visible from initial grouped lot/farm/agreement view. */
.r13p-root.r13p-role-investor .r13p-investor-group-actions{display:inline-flex;align-items:center;justify-content:center;gap:2px;white-space:nowrap;min-width:52px}
.r13p-root.r13p-role-investor .r13p-investor-group-actions button{display:inline-grid;place-items:center;min-width:22px;min-height:24px;padding:2px 3px;vertical-align:middle}
.r13p-root.r13p-role-investor .r13p-investor-group-actions .r13p-investor-group-chevron{font-size:23px;font-weight:700;color:#075ab4;line-height:1}
.r13p-root.r13p-role-investor .r13p-investor-group-actions button:focus-visible{outline:2px solid #087b52;outline-offset:1px;border-radius:4px}

/* AgroLogix R13 I6A — Investor BODY precision only; no global / Ganadero / Admin selectors. */
.r13p-root.r13p-role-investor .r13p-investor-filter{position:relative}
.r13p-root.r13p-role-investor .r13p-investor-filter-icon{position:absolute;left:9px;bottom:8px;width:17px;height:17px;display:grid;place-items:center;color:#078e52;pointer-events:none;font-style:normal}
.r13p-root.r13p-role-investor .r13p-investor-filter-icon svg{width:17px;height:17px;stroke-width:2.1}
.r13p-root.r13p-role-investor .r13p-investor-filter select{padding-left:30px;min-width:0;text-overflow:ellipsis}
.r13p-root.r13p-role-investor .r13p-tabs button{display:flex;align-items:center;justify-content:center;gap:9px;min-width:0}
.r13p-root.r13p-role-investor .r13p-investor-tab-icon{display:inline-flex;align-items:center;color:#48698e;pointer-events:none}
.r13p-root.r13p-role-investor .r13p-investor-tab-icon svg{width:17px;height:17px;stroke-width:2.15}
.r13p-root.r13p-role-investor .r13p-tabs button.active .r13p-investor-tab-icon{color:#007a49}
.r13p-root.r13p-role-investor .r13p-investor-table-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;flex-wrap:wrap}
.r13p-root.r13p-role-investor .r13p-investor-view-label{border:1px solid #dae7f1;border-radius:5px;padding:5px 8px;color:#345b8b;background:#f6faff;font-weight:700;font-size:10px;white-space:nowrap}
.r13p-root.r13p-role-investor .r13p-investor-all{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:#07804c;border-color:#a4d7be}
.r13p-root.r13p-role-investor .r13p-investor-all svg{width:15px;height:15px}
.r13p-root.r13p-role-investor .r13p-investor-check-cell{width:25px;min-width:25px;text-align:center;padding:4px 2px}
.r13p-root.r13p-role-investor .r13p-investor-check-cell input{width:14px;height:14px;accent-color:#08844e;cursor:pointer;vertical-align:middle}
.r13p-root.r13p-role-investor .r13p-investor-row-selected>td{background:#eefbf5}
.r13p-root.r13p-role-investor .r13p-investor-check-cell input:focus-visible,
.r13p-root.r13p-role-investor .r13p-investor-table-toolbar button:focus-visible{outline:2px solid #037bba;outline-offset:2px}
@media(max-width:1350px){.r13p-root.r13p-role-investor .r13p-investor-table-toolbar{gap:3px}.r13p-root.r13p-role-investor .r13p-investor-filter-icon{left:5px}.r13p-root.r13p-role-investor .r13p-investor-filter select{padding-left:25px}}

/* AgroLogix R13 I6B — Investor grouped BODY precision ONLY. Export CSV contracts unchanged. */
.r13p-root.r13p-role-investor .r13p-investor-view-control{display:inline-flex;align-items:center;gap:4px;color:#345b8b;font-size:10px;font-weight:700;border:1px solid #dae7f1;border-radius:5px;padding:1px 4px 1px 7px;background:#f6faff;white-space:nowrap}
.r13p-root.r13p-role-investor .r13p-investor-view-control select{min-width:104px;max-width:170px;height:22px;background:transparent;color:#245389;border:0;font:inherit;cursor:pointer;outline-offset:1px}
.r13p-root.r13p-role-investor .r13p-investor-view-control:focus-within{outline:2px solid #087b52;outline-offset:1px}
.r13p-root.r13p-role-investor .r13p-investor-group-table{table-layout:fixed;width:100%;font-size:9px;white-space:normal}
.r13p-root.r13p-role-investor .r13p-investor-group-table th{line-height:1.16;overflow-wrap:normal;hyphens:auto;vertical-align:middle;padding:6px 3px}
.r13p-root.r13p-role-investor .r13p-investor-group-table td{line-height:1.16;vertical-align:middle;overflow-wrap:anywhere;padding:6px 3px}
.r13p-root.r13p-role-investor .r13p-investor-group-table th:first-child{width:27px}
.r13p-root.r13p-role-investor .r13p-investor-group-table th:nth-child(2){width:13%}
.r13p-root.r13p-role-investor .r13p-investor-group-table th:last-child{width:58px;text-align:center}
.r13p-root.r13p-role-investor .r13p-investor-group-table td:last-child{white-space:nowrap;text-align:center}
.r13p-root.r13p-role-investor .r13p-investor-group-table .r13p-investor-group-actions{min-width:0;gap:0}
@media(max-width:1250px){.r13p-root.r13p-role-investor .r13p-investor-group-table{min-width:1010px}.r13p-root.r13p-role-investor .r13p-investor-table-toolbar{flex-wrap:wrap}}
