@layer protecta-black-theme {
/* Shared black appearance. Applied only after the user selects Grafite. */
html[data-protecta-theme="grafite"]{
 --protecta-canvas:#000;--protecta-surface:#000;--protecta-ink:#f2f3f5;--protecta-muted:#b8bdc7;--protecta-line:#34373d;--protecta-shadow:none;
 --sm-canvas:#000;--sm-surface:#000;--sm-ink:#f2f3f5;--sm-muted:#b8bdc7;--sm-border:#34373d;
 --mc-canvas:#000;--mc-card:#000;--mc-ink:#f2f3f5;--mc-muted:#b8bdc7;--mc-line:#34373d;
 background:#000!important;color:#f2f3f5;color-scheme:dark;
}
/* Structural layers are black, including nested frames around editable fields. */
html[data-protecta-theme="grafite"] :is(body,main,aside,section,article,dialog,form,fieldset,header,footer,nav,table,thead,tbody,tr,td,th),
html[data-protecta-theme="grafite"] div:is([class*="workspace"],[class*="content"],[class*="container"],[class*="panel"],[class*="card"],[class*="window"],[class*="modal"],[class*="dialog"],[class*="sheet"],[class*="form"],[class*="field"],[class*="filter"],[class*="summary"],[class*="table"],[class*="toolbar"],[class*="section"],[class*="group"],[class*="box"],[class*="shell"],[class*="layout"],[class*="body"],[class*="total"],[class*="metric"],[class*="row"],[class*="column"],[class*="list"],[class*="grid"],[class*="split"],[class*="detail"],[class*="notice"]),
html[data-protecta-theme="grafite"] :is(.settings-choice,.settings-density-options>button,.settings-back-home,.settings-reset,.settings-access,.settings-local-note,.workspace-module-grid>a,.workspace-module-coming,.sysmobile-nav-group,.repair-summary-card,.repair-summary-profit){
 background-color:#000!important;background-image:none!important;color:#f2f3f5!important;border-color:#34373d!important;box-shadow:none!important;
}
html[data-protecta-theme="grafite"] :is(h1,h2,h3,h4,h5,h6,label,legend,strong,th,td,dt,dd){color:#f2f3f5!important}
html[data-protecta-theme="grafite"] :is(p,small,.muted,.sf-muted,.sysmobile-muted){color:#b8bdc7!important}
/* Fields keep a subtle contrast against the black wrappers. */
html[data-protecta-theme="grafite"] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea,[contenteditable="true"]){background-color:#18191c!important;color:#f2f3f5!important;border-color:#4b5059!important;color-scheme:dark}
html[data-protecta-theme="grafite"] :is(input,textarea)::placeholder{color:#a8aeb9!important;opacity:1}
html[data-protecta-theme="grafite"] :is(input,select,textarea):focus-visible{outline:2px solid #ff7a18!important;outline-offset:2px;border-color:#ff7a18!important}
html[data-protecta-theme="grafite"] :is(input[type=checkbox],input[type=radio]){accent-color:#ff7a18}
html[data-protecta-theme="grafite"] :is(option,optgroup){background:#18191c;color:#f2f3f5}
html[data-protecta-theme="grafite"] :is(button,a)[aria-current="page"],html[data-protecta-theme="grafite"] :is(.workspace-sidebar nav>a.active,.sysmobile-nav-group button.active,.sysmobile-nav-group a.active){background:#f87915!important;color:#fff!important}
html[data-protecta-theme="grafite"] :is(.workspace-sidebar nav>a.active,.sysmobile-nav-group button.active,.sysmobile-nav-group a.active) :is(span,strong,small){color:#fff!important}
html[data-protecta-theme="grafite"] :is(.repair-summary-profit>strong,.repair-summary-profit .repair-summary-heading){color:#7cdaa3!important}
/* Preserve paper/PDF readability when printing from a dark screen. */

html[data-protecta-theme="grafite"] :is(.settings-choice.selected,.settings-choice[aria-pressed="true"],.settings-density-options>button.selected){border-color:#ff7a18!important}
html[data-protecta-theme="grafite"] :is(button[class*="card"],a[class*="card"],label:has(> input):not(.op-switch),label:has(> select),label:has(> textarea),.ops-module-icon,.ops-category-icon,.settings-seller-icon){background-color:#000!important;background-image:none!important;border-color:#34373d!important;color:#f2f3f5!important;box-shadow:none!important}
html[data-protecta-theme="grafite"] button[class*="card"]:hover{border-color:#ff7a18!important}
@media print{html[data-protecta-theme="grafite"]{color-scheme:light}html[data-protecta-theme="grafite"] :is(body,main,aside,section,article,dialog,form,fieldset,header,footer,nav,div,table,thead,tbody,tr,td,th){background:#fff!important;color:#111!important;box-shadow:none!important}html[data-protecta-theme="grafite"] :is(h1,h2,h3,h4,h5,h6,label,legend,strong,th,td,p,small,span){color:#111!important}}

/* Layered important rules outrank module-specific dark/blue text overrides. */
@media screen {
 html[data-protecta-theme="grafite"]{
  --protecta-ink:#fff!important;--protecta-muted:#fff!important;
  --sm-ink:#fff!important;--sm-muted:#fff!important;
  --mc-ink:#fff!important;--mc-muted:#fff!important;
 }
 html[data-protecta-theme="grafite"] body :is(div,main,aside,section,article,header,footer,nav,dialog,form,fieldset,legend,h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,i,u,s,label,a,button,input,textarea,select,option,optgroup,table,thead,tbody,tfoot,tr,th,td,caption,dl,dt,dd,ul,ol,li,details,summary,output,code,pre,time,mark,[contenteditable="true"]){
  color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 html[data-protecta-theme="grafite"] button:where(:not([class*="primary"]):not([class*="save"]):not([class*="submit"]):not([class*="danger"]):not([class*="active"]):not([class*="selected"]):not([role="switch"]):not([type="submit"])){background-color:#18191c!important;border-color:#4b5059!important}
 html[data-protecta-theme="grafite"] button:disabled{background-color:#26282c!important;border-color:#4b5059!important;opacity:1!important;color:#fff!important}
 html[data-protecta-theme="grafite"] :is(input,textarea)::placeholder{color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important}
 html[data-protecta-theme="grafite"] svg :is(text,tspan){fill:#fff!important}
 html[data-protecta-theme="grafite"] :is([class*="badge"],[class*="status-pill"],[class*="status-tag"],mark){background-color:#18191c!important;color:#fff!important}
}
@media print {
 html[data-protecta-theme="grafite"] :is(input,select,textarea){background:#fff!important;color:#111!important;-webkit-text-fill-color:#111!important}
}

}
