/* Scoped to CRM's existing standalone editors; navigation and data remain page-owned. */
@layer crm-admin-ui {
body.crm-admin-ui:is([data-crm-route="org_edit.html"],[data-crm-route="contact_edit.html"],[data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"],[data-crm-route="subscription_edit.html"]) { --bg:var(--ui-bg); --fg:var(--ui-text); --mut:var(--ui-muted); --card:var(--ui-panel); --border:var(--ui-line); --line:var(--ui-line); --primary:#176c70; }
body.crm-admin-ui:is([data-crm-route="org_edit.html"],[data-crm-route="contact_edit.html"],[data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"],[data-crm-route="subscription_edit.html"]) main :is(h1,h2,h3,h4,label,legend) { color:var(--ui-text) !important; }
body.crm-admin-ui:is([data-crm-route="org_edit.html"],[data-crm-route="contact_edit.html"],[data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"],[data-crm-route="subscription_edit.html"]) main :is(.card,.stat-card,.event-item,.quick-item,.info-box:not(.warning),.checkbox-label) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui:is([data-crm-route="contact_edit.html"],[data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"]) main h3::before { background:#176c70 !important; }
body.crm-admin-ui:is([data-crm-route="org_edit.html"],[data-crm-route="contact_edit.html"],[data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"],[data-crm-route="subscription_edit.html"]) main :is(input,select,textarea):focus { border-color:#176c70 !important; box-shadow:0 0 0 2px #176c7040 !important; }
body.crm-admin-ui:is([data-crm-route="contact_edit.html"],[data-crm-route="event_endpoint_edit.html"]) :is(.editor-help,main small,main .mut.small) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .hardware-item { background:var(--ui-panel) !important; border-color:var(--ui-input-line) !important; }
body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .hardware-item.bound { background:#183b3b !important; border-color:#76b8b4 !important; }
html.theme-light body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .hardware-item.bound { background:#e5f2ef !important; border-color:#176c70 !important; }
body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .hardware-item .hardware-title { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .hardware-item .hardware-meta { color:var(--ui-muted) !important; }
html.theme-light body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .hardware-item .hardware-meta { color:#505b60 !important; }
body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .hardware-item .badge-bound { background:#176c70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="contact_edit.html"] main details[open] { border-color:#176c70 !important; }
body.crm-admin-ui[data-crm-route="contact_edit.html"] main .checkbox-label:hover { border-color:#176c70 !important; }
body.crm-admin-ui[data-crm-route="subscription_edit.html"] .b-paused { background:#176c70 !important; color:#fff !important; }
@media (max-width:700px) {
 body.crm-admin-ui:is([data-crm-route="contact_edit.html"],[data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"]) main { padding:12px !important; }
 body.crm-admin-ui:is([data-crm-route="contact_edit.html"],[data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"]) main .card { padding:16px !important; }
 body.crm-admin-ui:is([data-crm-route="hardware_edit.html"],[data-crm-route="event_endpoint_edit.html"]) main .form-row { grid-template-columns:minmax(0,1fr) !important; }
}
}
