/* Shared component geometry; existing theme variables supply colors. Screen only. */
@media screen {
html:root{--x86-radius:10px;--x86-gap:16px;--x86-font:"Segoe UI",Arial,Helvetica,sans-serif}
html:root body,html:root body :is(button,input,select,textarea,summary,table,h1,h2,h3,label,.button){font-family:var(--x86-font)!important}
html:root[data-theme] body :is(button,.button,summary){font-size:14px!important;line-height:1.35!important;min-height:36px!important;padding:8px 12px!important;border-radius:7px!important;letter-spacing:normal!important;box-shadow:none!important}
html:root[data-theme] body :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){font-size:14px!important;min-height:38px!important;padding:8px 10px!important;border-radius:7px!important;max-width:100%;box-sizing:border-box}
html:root[data-theme] body :is(.panel,.cards>article,.card){border-radius:var(--x86-radius)!important;box-shadow:none!important;border:1px solid var(--border)!important}
html:root[data-theme] body :is(.panel,.cards>article){padding:18px!important}
html:root[data-theme] body h1{font-size:26px!important;line-height:1.2!important;letter-spacing:-.4px!important}
html:root[data-theme] body h2{font-size:19px!important;line-height:1.3!important}
html:root[data-theme] body table:not(.g82-sheet) :is(th,td){font-size:14px!important;padding:10px 12px!important;line-height:1.4!important;vertical-align:middle;word-break:normal}
html:root[data-theme] body :is(.status,.badge,.p75-badge){display:inline-flex;align-items:center;padding:4px 8px!important;font-size:12px!important;line-height:1.3;border-radius:5px!important}
html:root[data-theme=corporativo],html:root[data-theme=corporativo] body{--accent:#ffd21c!important;--on-accent:#20252b!important;--erp-on-accent:#20252b!important;--main:#ffd21c!important;--on:#20252b!important;--link:#675000!important}
html:root[data-theme=oscuro],html:root[data-theme=oscuro] body{--bg:#191b1e!important;--panel:#25282c!important;--text:#f4f5f7!important;--muted:#bfc5ce!important;--border:#515965!important;--accent:#ffd21c!important;--on-accent:#191b1e!important;--erp-on-accent:#191b1e!important;--green:#99dbaf!important}
html:root[data-theme] body :is(button,.button):not(.ghost):not(.danger):not(.ghost-link):not(.danger-link):not(.secondary){color:var(--text)}
html:root[data-theme] body :is(button.primary,.button.primary,button[type=submit]){background:var(--accent)!important;color:var(--erp-on-accent,var(--on-accent,#15191d))!important;border-color:var(--accent)!important}
html:root body .x86-icon{width:22px;height:22px;min-width:22px;display:inline-block;vertical-align:middle;flex-shrink:0;margin-right:10px}
html:root body .x86-billing{border:1px solid var(--accent,var(--main))!important;border-left:4px solid var(--accent,var(--main))!important;padding:12px 16px!important;background:var(--erp-soft,var(--soft,#f8f9fb))!important;grid-column:1/-1}
html:root body .x86-billing>summary{font-weight:700!important;padding:4px!important;min-height:36px!important;color:var(--text,var(--ink))}
html:root body .x86-money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
html:root body .x86-assignment{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px;border:1px solid var(--border,var(--line));border-radius:10px}
.x86-assignment h3{grid-column:1/-1}.x86-portal-shortcut{border-left:3px solid var(--accent)!important}
html:root body .x86-movements td{height:auto!important;min-height:0!important}.x86-movements td:nth-child(4){min-width:200px}
/* Portal defaults reproduce approved light workspace with charcoal navigation. */
html[data-portal-theme]{--main:#ffd21c;--on:#20252b;--bg:#f5f6f8;--ink:#20252b;--muted:#5e6979;--line:#dce1e8;--panel:#fff;--soft:#fff5cc;--nav-bg:#20252b;--nav-ink:#f4f5f7}
html[data-portal-theme=dark]{--bg:#191b1e;--panel:#25282c;--ink:#f4f5f7;--muted:#c0c5cc;--line:#606873;--soft:#393425}
html[data-portal-theme] body a:not(.button){color:var(--ink)}
html[data-portal-theme] .p75-shell{max-width:none;min-height:100vh}
html[data-portal-theme] .p75-head{height:76px;padding:16px 28px;border-bottom:1px solid var(--line)}
html[data-portal-theme] .p75-layout{grid-template-columns:230px minmax(0,1fr);min-height:calc(100vh - 76px)}
html[data-portal-theme] .p75-layout>nav{background:var(--nav-bg);padding:24px 12px;gap:8px}
html[data-portal-theme] .p75-layout>nav a{color:var(--nav-ink);font-size:15px;border-radius:7px;justify-content:flex-start;min-height:48px}
html[data-portal-theme] .p75-layout>nav a[aria-current=page]{color:#ffd21c;background:#393629;border-left:3px solid #ffd21c}
html[data-portal-theme] .p75-content{padding:28px;max-width:1500px;width:100%}
html[data-portal-theme] .p75-scope{margin:0 0 18px;gap:12px}.p75-scope label{max-width:340px;font-size:12px}
html[data-portal-theme] .p75-panel{border:1px solid var(--line);border-radius:10px;box-shadow:none;padding:20px}
html[data-portal-theme] :is(button,.button){font-size:14px;min-height:40px;padding:9px 14px;border-radius:7px}
html[data-portal-theme] :is(input,select,textarea){font-size:16px;border-radius:7px;min-height:42px}
html[data-portal-theme] .primary{background:var(--main);color:var(--on);font-weight:600;border-color:var(--main)}
.x86-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}.x86-stats article{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:20px;display:flex;align-items:center;gap:8px}.x86-stats strong{font-size:22px;display:block;font-variant-numeric:tabular-nums}
.x86-credit{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:16px;align-items:start;margin:18px 0}.x86-credit>.p75-panel{margin:0;min-width:0}.x86-credit .table-wrap{overflow-x:auto}.x86-quota{width:100%;border-collapse:collapse;font-size:14px}.x86-quota th{background:var(--bg);color:var(--muted);font-weight:500;text-align:left}.x86-quota :is(th,td){padding:12px 8px;border-bottom:1px solid var(--line);height:auto!important}.x86-quota th:first-child{width:36px}.x86-quota input[type=checkbox]{accent-color:var(--main);width:20px;height:20px;margin:0}.x86-paid{color:var(--muted)}.x86-overdue{background:color-mix(in srgb,var(--bad) 8%,var(--panel))}.x86-pay-summary strong{display:block;font-size:26px;font-variant-numeric:tabular-nums}.x86-pay-summary .button{display:flex;margin:10px 0}.x86-pay-footer{padding:16px 0;border-top:1px solid var(--line);display:grid;gap:12px}.x86-pay-footer button{width:100%}.x86-credit .p75-badge{padding:4px 8px;border-radius:5px;font-size:12px}.x86-credit .approved{background:#e2f7e7;color:#146335}.x86-credit .pending{background:#fff3c7;color:#755400}.x86-credit .late{background:#ffe3e7;color:#9a2038}
.x86-contract{display:grid;grid-template-columns:1.5fr 1fr;gap:18px;align-items:start}.x86-contract .p75-panel{margin:0 0 16px}
/* Public checkout charcoal and yellow; provider hosted controls retain branding. */
html[data-payment-theme=carbon]{background:#191b1e;color:#f4f5f7;color-scheme:dark}
html[data-payment-theme=carbon] body{background:#191b1e!important;color:#f4f5f7!important}
html[data-payment-theme=carbon] :is(main,.card,.wrap,.checkout,.payment-card){background:#25282c!important;color:#f4f5f7!important;border-color:#606873!important;border-radius:12px!important}
html[data-payment-theme=carbon] :is(input,select,textarea,details,.note,.hint,.notice,.summary,.secure,.security-note,.fx,.amount-preview,.payment-info){background:#30343a!important;color:#f4f5f7!important;border-color:#606873!important}
html[data-payment-theme=carbon] :is(h1,h2,h3,label,summary){color:#f4f5f7!important}
html[data-payment-theme=carbon] :is(small,p){color:#c0c5cc}
html[data-payment-theme=carbon] input:focus,html[data-payment-theme=carbon] select:focus{outline:2px solid #ffd21c;outline-offset:2px}
@media(max-width:900px){html:root[data-theme] body :is(button,.button,summary){min-height:44px!important}html:root[data-theme] body :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px!important;min-height:44px!important}.x86-assignment,.x86-contract{grid-template-columns:1fr}html[data-portal-theme] .p75-layout{display:block}html[data-portal-theme] .p75-layout>nav{display:flex;flex-direction:row;flex-wrap:nowrap;overflow:auto;padding:8px;gap:4px}html[data-portal-theme] .p75-layout>nav a{flex:0 0 auto;font-size:12px;min-height:44px}html[data-portal-theme] .p75-content{padding:16px}html[data-portal-theme] .p75-head{padding:12px 16px;height:auto}.x86-stats{gap:8px;margin:16px 0}.x86-stats article{padding:12px;display:block}.x86-stats strong{font-size:16px}.x86-stats .x86-icon{display:none}.x86-credit{grid-template-columns:1fr}.x86-credit .p75-panel{padding:14px}.x86-quota{font-size:12px}.x86-quota :is(th,td){padding:10px 5px}.x86-quota small{font-size:10px}.x86-quota td:last-child{font-size:12px}.x86-pay-footer{position:sticky;bottom:0;background:var(--panel);z-index:2;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:12px 0}.x86-pay-footer strong{font-size:21px}.x86-pay-footer button{max-width:170px}.x86-pay-summary{padding-bottom:env(safe-area-inset-bottom)!important}}
@media(prefers-color-scheme:dark){html[data-portal-theme=auto]{--bg:#191b1e;--panel:#25282c;--ink:#f4f5f7;--muted:#c0c5cc;--line:#606873;--soft:#393425}}
}

@media screen{#portal360 .w76-section>details[open]{border:1px solid var(--border);border-radius:10px;padding:16px;margin:16px 0}#portal360 label{display:block;font-weight:600}#portal360 input:not([type=checkbox]),#portal360 select{display:block;width:100%;box-sizing:border-box;margin-top:6px}#portal360 .w76-section>form.w76-grid{align-items:start}#portal360 .actions{display:flex;gap:10px;flex-wrap:wrap}#portal360 p{font-size:14px;max-width:75ch}#portal360 form>h3{grid-column:1/-1}#portal360 .x86-assignment{margin:18px 0}#portal360 .w76-section>details>label{margin:12px 0}}

@media screen{html[data-portal-theme] .p75-layout>nav a{background:transparent!important;color:var(--nav-ink)!important}html[data-portal-theme] .p75-layout>nav a[aria-current=page]{background:#393629!important;color:#ffd21c!important}.x86-quota :is(tr,th,td){min-height:0!important}.x86-pay-footer button:disabled{opacity:.5;cursor:not-allowed}}
@media screen{html:root[data-theme] body button.ps72-resize{width:6px!important;min-width:6px!important;max-width:6px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;min-height:22px!important}html:root[data-theme] body button.ps54-sort{padding:4px 6px!important;background:transparent!important;border:0!important;min-height:28px!important}html:root[data-theme] body :is(.close,.modal-close,.dialog-close){width:36px!important;min-width:36px!important;max-width:44px!important;padding:4px!important}}

/* Center client content within the space beside its navigation. */
html[data-portal-theme] .p75-layout>.p75-content{margin-inline:auto}

/* Accessible accent roles: yellow fills and readable foreground links are independent. */
@media screen{
html:root[data-theme=corporativo],html:root[data-theme=corporativo] body{--link:#715500!important;--erp-link:#715500!important;--erp-accent-ink:#715500!important;--erp76-on-accent:#20252b!important}
html:root[data-theme=oscuro],html:root[data-theme=oscuro] body{--link:#ffe071!important;--erp-link:#ffe071!important;--erp-accent-ink:#ffe071!important;--erp76-on-accent:#20252b!important}
html:root[data-theme] body a:not(.button):not(.primary):not(.secondary):not(.badge):not(.danger):not(.danger-link):not(.success):not(.active):not([aria-current]):not([role=button]):not(nav a):not(#erp-sidebar a):not(.sidebar a):not(.m87-sidebar a){color:var(--erp-link,var(--link,var(--text)))!important;text-decoration-color:currentColor}
html:root[data-theme] body :is(button.ghost,button.secondary,.button.ghost,.button.secondary,.smart-create-trigger){color:var(--text)!important}
html:root[data-theme] body :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--erp-link,var(--link,var(--text)))!important;outline-offset:3px}
html:root[data-theme=corporativo] body :is(button.primary,.button.primary,button[type=submit]),html:root[data-theme=oscuro] body :is(button.primary,.button.primary,button[type=submit]){color:#20252b!important}
html[data-portal-theme] body :is(.primary,button[type=submit].primary){color:#20252b!important}
html[data-checkin89] .fixed-pay-link{color:#20252b!important;background:var(--accent)!important}
}
