/* Oveja workspace: compact operational hierarchy, original components. */
:root{--paper:#f4f6f5;--sidebar:#fff;--line:#dce2df;--radius:6px;--shadow:0 1px 2px #1f352509}
.sidebar{width:212px;padding:18px 12px;background:var(--sidebar)}
.workspace{margin-left:212px}.topbar{height:56px;border-bottom:1px solid var(--line)}
.brand>span{font-size:26px}.sidebar .workspace-label{margin-top:18px}
.module-sidebar .module-tab,.module-area>summary{border-radius:4px;font-size:12px;min-height:40px}
.nav-icon{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.module-sidebar .module-tab.selected{background:#e9f0ec;color:var(--olive)}
body[data-workspace="suppliers"] #main{padding:22px 26px 32px}
body[data-workspace="suppliers"] #module-placeholder{padding:0}
body[data-workspace="suppliers"] #module-placeholder>.eyebrow,body[data-workspace="suppliers"] #module-placeholder>.module-subtitle{display:none}
body[data-workspace="suppliers"] #module-title{font-size:24px;font-weight:650;letter-spacing:-.45px;margin:0 0 14px;line-height:1.3}
body[data-workspace="suppliers"] .module-subtabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:0;border-bottom:1px solid var(--line);margin:0 0 16px;padding-bottom:0;scrollbar-width:thin}
body[data-workspace="suppliers"] .module-subtabs button{border:0;border-radius:0;background:transparent;color:var(--muted);white-space:nowrap;font-weight:500;padding:10px 9px;min-height:42px;border-bottom:2px solid transparent}
body[data-workspace="suppliers"] .module-subtabs button.selected{color:var(--olive);border-bottom-color:var(--olive);background:transparent;font-weight:700}
body[data-workspace="suppliers"] .ap-heading{align-items:center;margin:0 0 16px;gap:14px}
body[data-workspace="suppliers"] .ap-heading h2,body[data-workspace="suppliers"] .ap-heading .pc-eyebrow{display:none}
body[data-workspace="suppliers"] .ap-heading p{margin:0;color:var(--muted);font-size:13px;max-width:58ch}
body[data-workspace="suppliers"] .ap-actions{gap:6px}
body[data-workspace="suppliers"] .button{border-radius:5px;font-size:12px;min-height:36px;padding:8px 12px;box-shadow:none}
body[data-workspace="suppliers"] h3{font-size:15px;font-weight:650;letter-spacing:0}
body[data-workspace="suppliers"] .ap-stats{gap:0;border:1px solid var(--line);border-radius:6px;background:var(--surface);margin:16px 0;overflow:hidden}
body[data-workspace="suppliers"] .ap-stats article{border:0;border-radius:0;border-right:1px solid var(--line);padding:14px 18px}
body[data-workspace="suppliers"] .ap-stats article:last-child{border-right:0}
body[data-workspace="suppliers"] .ap-stats strong{font-size:24px;line-height:1.25;font-weight:650;margin-top:5px;font-variant-numeric:tabular-nums}
body[data-workspace="suppliers"] .ap-toolbar{margin:14px 0;padding:12px;background:#fff;border:1px solid var(--line);border-radius:6px;gap:12px}
body[data-workspace="suppliers"] .field{font-size:12px;gap:5px}
body[data-workspace="suppliers"] .field input,body[data-workspace="suppliers"] .field select{min-height:36px;border-radius:4px;font-size:13px;padding:7px 9px}
body[data-workspace="suppliers"] .ap-table-wrap{border-radius:5px}
body[data-workspace="suppliers"] .ap-table{font-size:13px}
body[data-workspace="suppliers"] .ap-table th,body[data-workspace="suppliers"] .ap-table td{padding:10px 12px;line-height:1.4}
body[data-workspace="suppliers"] .ap-table thead th{background:#f9faf9;text-transform:none;letter-spacing:0;font-size:12px;font-weight:600;color:#52605a;white-space:nowrap}
body[data-workspace="suppliers"] .ap-table tbody th{font-weight:550;min-width:130px}
body[data-workspace="suppliers"] .ap-table tr:last-child>*{border-bottom:0}
body[data-workspace="suppliers"] .ap-table tbody tr:hover{background:#f8fbf9}
body[data-workspace="suppliers"] .ap-table small{font-size:11px;margin-top:3px;line-height:1.4}
body[data-workspace="suppliers"] .ap-badge{font-size:11px;padding:3px 7px;border-radius:4px;font-weight:550}
body[data-workspace="suppliers"] .ap-card{border-radius:5px;padding:14px}
body[data-workspace="suppliers"] .ap-notice{font-size:12px;padding:9px 12px;border-radius:5px;line-height:1.5}
body[data-workspace="suppliers"] .ap-selection{font-size:12px;padding:10px 12px;background:#eef3f0;border:1px solid #d4e1d9;border-radius:5px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 16px}
body[data-workspace="suppliers"] .ap-selection .hint{flex-basis:100%;margin:0;font-size:11px}
body[data-workspace="suppliers"] .ap-selection .ap-actions{margin:0}
body[data-workspace="suppliers"] .ap-list-tools{font-size:12px}
.pc-panel-columns{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr);gap:20px;align-items:start}
.pc-panel-columns section>h3,.pc-section-heading{margin:18px 0 10px}
.pc-panel-columns section>h3:first-child{margin-top:0}
.pc-followups{min-width:0!important;table-layout:auto}
.pc-followups th{min-width:0!important}.pc-followups td:nth-child(2){width:70px;font-weight:650;font-variant-numeric:tabular-nums}
.pc-followups td:last-child{width:100px}.pc-followups .is-clear{color:var(--muted)}
.pc-list-links{margin:0;border:1px solid var(--line);border-radius:5px;background:white;padding:0;list-style:none}
.pc-list-links li+li{border-top:1px solid var(--line)}.pc-list-links li{padding:12px 14px;font-size:12px}
.pc-list-links strong{display:block;font-weight:600;margin-bottom:4px}.pc-list-links small{display:block;color:var(--muted);margin:4px 0}
.pc-list-links .button{padding:4px 0!important;background:none;border:none;color:var(--olive);min-height:28px!important;text-align:left}
.pc-compact-table{min-width:650px}.pc-compact-table td.num,.ap-table td.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.pc-table-note{font-size:12px;color:var(--muted);margin:9px 0 18px}.pc-reason{max-width:320px;font-size:12px}.pc-reason p{margin:6px 0}
.pc-section-disclosure{margin:18px 0;border-top:1px solid var(--line);padding-top:12px}.pc-section-disclosure>summary{font-size:14px;font-weight:600;cursor:pointer;margin-bottom:12px}
.pc-empty-row{padding:24px!important;text-align:center;color:var(--muted)}
.sd-name{color:var(--olive);padding:0;min-height:28px;text-decoration:none}.sd-name:hover{text-decoration:underline}
.sd-count{font-size:12px;color:var(--muted);margin:10px 0}.sd-detail-summary{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.sd-detail-summary .sd-fields{grid-template-columns:1fr;margin:0;gap:3px}
.sd-detail-summary dd{margin-bottom:12px}.sd-fields dt{color:var(--muted);font-size:12px}.sd-fields dd{font-size:13px}
dialog:has(#sd-detail){width:min(760px,92vw)}
dialog:has(#sd-detail) .modal-header{padding:18px 22px;border-bottom:1px solid var(--line)}
dialog:has(#sd-detail) .modal-header h2{font-size:20px;line-height:1.35;letter-spacing:-.3px}
dialog:has(#sd-detail) .modal-header .eyebrow{display:none}
dialog:has(#sd-detail) .modal-body{padding:0 22px 24px}
#sd-detail .ap-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin:16px 0}
#sd-detail .ap-stats article{padding:12px}#sd-detail .ap-stats strong{font-size:21px}
.sd-detail-tabs{display:flex;gap:0;overflow-x:auto;border-bottom:1px solid var(--line);margin:18px 0}
.sd-detail-tabs button{white-space:nowrap;border:0;border-bottom:2px solid transparent;padding:10px 12px;background:none;color:var(--muted);font-size:12px;min-height:42px}
.sd-detail-tabs button[aria-pressed=true]{color:var(--olive);border-bottom-color:var(--olive);font-weight:700}
.sd-pane h3{margin:18px 0 12px}.sd-pane h3:first-child{margin-top:0}.sd-pane .ap-table{min-width:480px}
.load-area{position:relative}.load-area--blocking{min-height:280px}
.load-state{font-size:13px;color:var(--muted);z-index:20}
.load-state--blocking{position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--paper) 92%,transparent);min-height:200px}
.load-state-content{display:flex;align-items:center;gap:12px;padding:18px 24px;text-align:center;max-width:min(420px,90%)}
.load-state--blocking .load-state-content{flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);min-width:180px;padding:26px}
.load-spinner{display:block;width:28px;height:28px;border:3px solid #d6e2db;border-top-color:var(--olive);border-radius:50%;animation:oveja-loading .8s linear infinite;flex-shrink:0}
.load-state--background{position:absolute;right:4px;top:0;pointer-events:none;background:#f4f6f5eb;border-radius:4px;z-index:21}
.load-state--background .load-state-content{padding:6px 10px;font-size:11px;gap:7px;max-width:none}.load-state--background .load-spinner{width:12px;height:12px;border-width:2px}
.load-state--error{position:relative;background:var(--danger-bg);border:1px solid #e4c7c3;border-radius:6px;margin:12px 0;color:var(--danger)}
.load-state--error .load-state-content{flex-direction:column;align-items:flex-start;text-align:left;max-width:none;gap:8px}
.load-state--empty-error{min-height:240px;display:grid;place-items:center}.load-state--empty-error .load-state-content{align-items:center;text-align:center;max-width:450px}
.modal-body:has(.load-state--blocking){min-height:280px}.modal-body .load-state--blocking{background:#fffffff2}
@keyframes oveja-loading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.load-spinner{animation:none;border-style:dashed}}
@media(max-width:1100px){.pc-panel-columns{grid-template-columns:1fr}.ap-heading{flex-wrap:wrap}}
@media(max-width:1000px){.workspace{margin-left:0}.sidebar{display:none}}
@media(max-width:640px){body[data-workspace="suppliers"] #main{padding:16px 12px 28px}body[data-workspace="suppliers"] #module-title{font-size:22px}body[data-workspace="suppliers"] .ap-heading{align-items:stretch}body[data-workspace="suppliers"] .button,body[data-workspace="suppliers"] .field input,body[data-workspace="suppliers"] .field select{min-height:44px}body[data-workspace="suppliers"] .ap-stats{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-workspace="suppliers"] .ap-stats article{padding:12px;border-bottom:1px solid var(--line)}body[data-workspace="suppliers"] .ap-stats article:nth-child(even){border-right:0}body[data-workspace="suppliers"] .ap-stats strong{font-size:22px}.pc-followups th,.pc-followups td{padding:9px 8px!important}.pc-followups td:last-child{width:74px}.pc-followups .button{padding:6px!important}.sd-detail-summary{grid-template-columns:1fr}.sd-detail-summary .sd-fields{grid-template-columns:minmax(100px,1fr) 1.4fr;gap:8px}.sd-detail-summary dd{margin-bottom:0}dialog:has(#sd-detail){width:100vw;max-width:100vw}dialog:has(#sd-detail) .modal-header{padding:16px}dialog:has(#sd-detail) .modal-body{padding:0 16px 22px}#sd-detail .ap-stats{grid-template-columns:1fr}#sd-detail .ap-stats article{display:flex;justify-content:space-between;align-items:center;border-right:0;padding:10px 12px}#sd-detail .ap-stats strong{margin:0;font-size:20px}.sd-detail-tabs button{padding:10px}.load-state-content{padding:16px;max-width:94%}}

body[data-workspace="suppliers"] .pc-followups .button{min-height:28px;padding:4px 6px;border:0;background:none;color:var(--olive);font-weight:550}.pc-followups td{padding-top:7px!important;padding-bottom:7px!important}

/* Keep the first workspace neutral until the authenticated board is ready. */
.boot-pending #tortas-workspace,.boot-pending #module-placeholder{display:none!important}

#main.load-area--blocking,#module-placeholder .load-area--blocking{min-height:clamp(280px,calc(100dvh - 240px),700px)}
@media(max-width:640px){body[data-workspace="suppliers"] .pc-followups .button{min-height:44px}}

.pc-followups th:nth-child(2),.pc-followups td:nth-child(2){width:72px;min-width:72px;text-align:center}

/* Approved coffee sheep: visual loading only; never extends request timing. */
.load-coffee{display:block;flex:none;width:144px;height:144px;background-image:url("/_assets/7d23aed9d30d6c3cc1d90bf5a15eb1bd28864a9de4564e0fe06af320b88c96aa-loading.png");background-size:300% 200%;background-repeat:no-repeat;background-position:0% 0%;animation:oveja-coffee-sip 3.6s step-end infinite;animation-delay:-.9s}
.load-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:260px;padding:18px;text-align:center;color:var(--muted);font-size:13px}
@keyframes oveja-coffee-sip{0%,18%{background-position:0% 0%}26%{background-position:50% 0%}35%{background-position:100% 0%}44%{background-position:0% 100%}62%{background-position:100% 0%}71%{background-position:50% 100%}80%,100%{background-position:100% 100%}}
@media(prefers-reduced-motion:reduce){.load-coffee{animation:none;background-position:0% 0%}}
@media(max-width:640px){.load-coffee{width:120px;height:120px}}
