/* HControl Center WEB — R4.1 corrective design system, 16-10-2026.
   Layer AFTER R3 and R4. Visual only. NO display:none on protected features,
   no app data, events, JS, backend, updates or routes modified.
   The 3-ID :not guard is required to override the legacy canonical !important
   typography system; all selectors are scoped to actual audited components.
*/
:root { --hc41-red:#E23B33; --hc41-red-hover:#C6322C; --hc41-ink:#172C45; --hc41-muted:#52667F;
 --hc41-line:#C8D4E2; --hc41-line-light:#DCE4EC; --hc41-soft:#F6F8FB;
 --hc41-radius:10px; --hc41-panel-radius:14px; --hc41-height:40px; }
/* ONE common font and visual baseline. Scoped to ERP administration areas only. */
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view,#account-overlay) :is(button,input,select,textarea),
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view,#account-overlay) :is(.r26-table,.article-catalog-table,.stock-table) {
 font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;letter-spacing:normal!important;
}
/* Fundamental issue confirmed by screenshots: these 3 actions have .btn-secondary,
   NOT .btn-primary. Target REAL attributes, not a guessed button class. */
body.authenticated #admin-service-view :is([data-r26-new-kit],[data-r26-new-approval],[data-r26-new-goal]):not(#hc41-a#hc41-b#hc41-c) {
 display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:40px!important;
 padding:9px 15px!important;border:1px solid var(--hc41-red)!important;border-radius:10px!important;
 color:#FFF!important;-webkit-text-fill-color:#FFF!important;background:var(--hc41-red)!important;
 font-size:13px!important;font-weight:600!important;line-height:1.3!important;white-space:normal!important;
 box-shadow:none!important;text-decoration:none!important;
}
body.authenticated #admin-service-view :is([data-r26-new-kit],[data-r26-new-approval],[data-r26-new-goal]):not(#hc41-a#hc41-b#hc41-c) :is(span,strong,small,i) {
 color:#FFF!important;-webkit-text-fill-color:#FFF!important;
}
body.authenticated #admin-service-view :is([data-r26-new-kit],[data-r26-new-approval],[data-r26-new-goal]):hover:not(:disabled) {
 background:var(--hc41-red-hover)!important;border-color:var(--hc41-red-hover)!important;color:#FFF!important;
}
/* Other real red buttons in admin UI, including data/admin actions with legacy classes. */
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view,#account-overlay)
 :is(button.btn-primary,.btn-danger-soft,button.btn-danger,button.danger):not(#hc41-a#hc41-b#hc41-c) {
 border-radius:var(--hc41-radius)!important;min-height:var(--hc41-height)!important;
 font-size:13px!important;font-weight:600!important;line-height:1.3!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view,#account-overlay)
 :is(button.btn-primary,.btn-danger-soft,button.btn-danger,button.danger):not(#hc41-a#hc41-b#hc41-c):not(:disabled){
 color:#FFF!important;-webkit-text-fill-color:#FFF!important;
}
/* Preserve semantic red/danger backgrounds, do NOT turn secondary actions red. */
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view)
 :is(button.btn-secondary,button.btn-ghost):not([data-r26-new-kit]):not([data-r26-new-approval]):not([data-r26-new-goal]):not(#hc41-a#hc41-b#hc41-c):not(:disabled),
body.authenticated #admin-service-view :is(.r34-warehouse-tools button,.r26-table button):not(#hc41-a#hc41-b#hc41-c):not(:disabled) {
 display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:40px!important;
 padding:9px 13px!important;border:1px solid var(--hc41-line)!important;border-radius:var(--hc41-radius)!important;
 background:#FFF!important;color:var(--hc41-ink)!important;-webkit-text-fill-color:var(--hc41-ink)!important;
 font-size:13px!important;font-weight:600!important;line-height:1.3!important;box-shadow:none!important;
}
body.authenticated #admin-service-view :is(.r26-row-actions button,.r26-table button):not(#hc41-a#hc41-b#hc41-c) {
 min-height:32px!important;padding:6px 10px!important;border-radius:8px!important;
 font-size:12px!important;font-weight:600!important;
}
/* All active navigation tabs keep text white instead of inheriting dark nav. */
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view)
 :is(.m718-intel-tabs,.module-subnav,.r26-subnav,.article-subnav,.settings-subnav,.purchase-subnav)
 button.active:not(#hc41-a#hc41-b#hc41-c) {
 color:#FFF!important;-webkit-text-fill-color:#FFF!important;background:var(--hc41-red)!important;
 border-radius:9px!important;font-weight:600!important;
}
/* Layout of Intelligence cards. Keep section headings visible even when a group is moved by JS. */
body.authenticated #admin-service-view [data-r26-panel="intelligence"] :is(.r26-grid-2,.m718-intel-group){min-width:0!important}
body.authenticated #admin-service-view [data-r26-panel="intelligence"] .r26-card:not(#hc41-a#hc41-b#hc41-c) {
 border:1px solid var(--hc41-line-light)!important;border-radius:var(--hc41-panel-radius)!important;
 padding:16px!important;background:#FFF!important;min-width:0!important;
}
body.authenticated #admin-service-view [data-r26-panel="intelligence"] .r26-card>header:not(#hc41-a#hc41-b#hc41-c) {
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 flex-wrap:wrap!important;gap:12px!important;min-height:40px!important;margin:0 0 12px!important;
}
body.authenticated #admin-service-view [data-r26-panel="intelligence"] .r26-card>header h3:not(#hc41-a#hc41-b#hc41-c){
 display:block!important;margin:0!important;font-size:16px!important;font-weight:650!important;color:var(--hc41-ink)!important;line-height:1.3!important;
}
body.authenticated #admin-service-view [data-r26-panel="intelligence"] :is(.r26-empty,.r26-list>.r26-empty):not(#hc41-a#hc41-b#hc41-c){
 padding:18px 14px!important;min-height:54px!important;border:1px dashed var(--hc41-line-light)!important;
 border-radius:10px!important;background:#FAFCFE!important;font-size:12px!important;line-height:1.5!important;color:var(--hc41-muted)!important;
}
/* One component geometry for catalog, stock, warehouse, purchasing and settings. */
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view,#account-overlay)
 :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),select,textarea):not(#hc41-a#hc41-b#hc41-c){
 box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
 border:1px solid var(--hc41-line)!important;border-radius:var(--hc41-radius)!important;
 background-color:#FFF!important;color:var(--hc41-ink)!important;
 font-size:13px!important;font-weight:500!important;line-height:1.35!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view,#account-overlay)
 :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),select):not(#hc41-a#hc41-b#hc41-c){
 min-height:40px!important;padding:8px 11px!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view,#account-overlay)
 :is(input,select,textarea,button):focus-visible{outline:2px solid var(--hc41-red)!important;outline-offset:2px!important}
/* Inline editable cells were dark square native fields. */
body.authenticated #admin-articles-view :is(.article-catalog-table,.stock-table) :is(input:not([type="checkbox"]),select):not(#hc41-a#hc41-b#hc41-c),
body.authenticated #admin-service-view .r26-table :is(input:not([type="checkbox"]),select):not(#hc41-a#hc41-b#hc41-c){
 min-height:34px!important;padding:6px 9px!important;border-radius:8px!important;
 border:1px solid var(--hc41-line)!important;background:#FFF!important;
 width:auto!important;max-width:100%!important;font-size:12px!important;font-weight:500!important;
}
/* All major data tables share typography, geometry and row rhythm. */
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) :is(.r26-table,.article-catalog-table,.stock-table):not(#hc41-a#hc41-b#hc41-c){
 border-collapse:collapse!important;border-spacing:0!important;width:100%!important;
 font-size:13px!important;color:var(--hc41-ink)!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) :is(.r26-table,.article-catalog-table,.stock-table) th:not(#hc41-a#hc41-b#hc41-c){
 background:var(--hc41-soft)!important;color:var(--hc41-ink)!important;
 font-size:12px!important;font-weight:650!important;line-height:1.3!important;
 padding:12px 11px!important;text-transform:uppercase!important;letter-spacing:.015em!important;
 border-bottom:1px solid var(--hc41-line-light)!important;text-align:left!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) :is(.r26-table,.article-catalog-table,.stock-table) td:not(#hc41-a#hc41-b#hc41-c){
 padding:11px!important;border-bottom:1px solid #E6EBF1!important;
 font-size:13px!important;font-weight:400!important;line-height:1.4!important;
 color:var(--hc41-ink)!important;vertical-align:middle!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) :is(.r26-table,.article-catalog-table,.stock-table) td strong:not(#hc41-a#hc41-b#hc41-c){
 font-size:13px!important;font-weight:600!important;color:var(--hc41-ink)!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) :is(.r26-table-wrap,.article-catalog-table-wrap,.stock-table-wrap):not(#hc41-a#hc41-b#hc41-c){
 max-width:100%!important;min-width:0!important;overflow-x:auto!important;
 border:1px solid var(--hc41-line-light)!important;border-radius:12px!important;
}
/* Catalog header and stock/warehouse info bars align with one shared hierarchy. */
body.authenticated #admin-articles-view .article-catalog-browser-head:not(#hc41-a#hc41-b#hc41-c) {
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:16px!important;padding:16px!important;border:1px solid var(--hc41-line-light)!important;
 border-radius:var(--hc41-panel-radius)!important;background:#FFF!important;
}
body.authenticated #admin-articles-view .article-catalog-browser-head h2:not(#hc41-a#hc41-b#hc41-c),
body.authenticated #admin-service-view :is(.r26-toolbar h2,.r26-card h3):not(#hc41-a#hc41-b#hc41-c) {
 font-size:17px!important;font-weight:650!important;line-height:1.3!important;letter-spacing:-.01em!important;
}
body.authenticated #admin-articles-view .article-catalog-browser-head :is(p,.eyebrow):not(#hc41-a#hc41-b#hc41-c){
 font-size:12px!important;line-height:1.45!important;
}
body.authenticated #admin-service-view .r26-stock-value:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;
 padding:12px 14px!important;border:1px solid var(--hc41-line-light)!important;border-radius:12px!important;
 background:var(--hc41-soft)!important;gap:8px!important;
}
body.authenticated #admin-service-view .r26-stock-value :is(span,strong):not(#hc41-a#hc41-b#hc41-c){
 font-size:12px!important;line-height:1.4!important;
}
/* Saved views in a SINGLE functional toolbar on wide screens. */
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) .productivity-toolbar:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;flex-flow:row wrap!important;align-items:center!important;gap:10px!important;
 background:#FFF!important;border:1px solid var(--hc41-line-light)!important;
 border-radius:12px!important;padding:10px!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) .productivity-view-controls:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;flex:1 1 400px!important;align-items:center!important;justify-content:flex-start!important;
 gap:8px!important;flex-wrap:wrap!important;width:auto!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) .productivity-toolbar >button:not(#hc41-a#hc41-b#hc41-c){
 flex:0 0 auto!important;width:auto!important;margin-left:auto!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) .productivity-view-controls select:not(#hc41-a#hc41-b#hc41-c){
 min-width:160px!important;flex:0 1 190px!important;
}
body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) :is(.article-catalog-summary,.orders-pagination,.article-catalog-pagination,.r34-warehouse-tools) {
 font-size:12px!important;color:var(--hc41-muted)!important;
}
body.authenticated #admin-service-view .r34-warehouse-tools:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;
}
body.authenticated #admin-service-view .r34-warehouse-tools input:not(#hc41-a#hc41-b#hc41-c){flex:1 1 260px!important;min-width:0!important;width:auto!important}
body.authenticated #admin-service-view .r34-warehouse-tools span:not(#hc41-a#hc41-b#hc41-c){font-size:12px!important;white-space:nowrap!important}
/* Settings > Updates: checkbox stays TOGETHER with text. */
body.authenticated #admin-settings-view #enterprise-update-settings-card .enterprise-check:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;flex-direction:row!important;align-items:flex-start!important;justify-content:flex-start!important;
 gap:10px!important;min-width:0!important;width:100%!important;
}
body.authenticated #admin-settings-view #enterprise-update-settings-card .enterprise-check input[type="checkbox"]:not(#hc41-a#hc41-b#hc41-c){
 flex:0 0 18px!important;width:18px!important;height:18px!important;min-width:18px!important;
 min-height:18px!important;margin:2px 0 0!important;accent-color:var(--hc41-red)!important;
}
body.authenticated #admin-settings-view #enterprise-update-settings-card .enterprise-check>span:not(#hc41-a#hc41-b#hc41-c){
 flex:1 1 auto!important;display:block!important;min-width:0!important;max-width:100%!important;
 overflow-wrap:break-word!important;white-space:normal!important;line-height:1.45!important;font-size:13px!important;
}
body.authenticated #admin-settings-view #enterprise-update-settings-card .enterprise-inline-actions:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:10px!important;
}
/* File chooser: style REAL ::file-selector-button, retaining keyboard and native file input behavior. */
body.authenticated #admin-settings-view :is(#ent-update-file,#admin-backup-restore-file,#admin-recovery-key-file):not(#hc41-a#hc41-b#hc41-c){
 display:inline-block!important;box-sizing:border-box!important;width:min(100%,340px)!important;max-width:100%!important;
 min-height:40px!important;padding:5px!important;border:1px solid var(--hc41-line)!important;
 border-radius:10px!important;background:#FFF!important;color:var(--hc41-muted)!important;
 font-size:12px!important;font-weight:500!important;text-overflow:ellipsis!important;
}
body.authenticated #admin-settings-view :is(#ent-update-file,#admin-backup-restore-file,#admin-recovery-key-file)::file-selector-button {
 cursor:pointer!important;margin-right:10px!important;min-height:30px!important;
 border:1px solid var(--hc41-line)!important;border-radius:7px!important;
 background:var(--hc41-soft)!important;color:var(--hc41-ink)!important;
 font:600 12px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
 padding:6px 10px!important;
}
body.authenticated #admin-settings-view #admin-backup-settings-card .backup-actions:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;
 justify-content:flex-start!important;gap:10px!important;margin:12px 0!important;
 border-bottom:1px solid var(--hc41-line-light)!important;padding:0 0 14px!important;
}
body.authenticated #admin-settings-view #admin-backup-settings-card .backup-restore-file:not(#hc41-a#hc41-b#hc41-c){
 display:flex!important;align-items:center!important;flex:1 1 245px!important;gap:9px!important;
 min-width:0!important;max-width:100%!important;
}
body.authenticated #admin-settings-view #admin-backup-settings-card .backup-restore-file>span:not(#hc41-a#hc41-b#hc41-c){
 white-space:nowrap!important;font-size:12px!important;font-weight:600!important;
}
body.authenticated #admin-settings-view #admin-backup-settings-card .backup-actions>button:not(#hc41-a#hc41-b#hc41-c){
 width:auto!important;max-width:100%!important;min-height:40px!important;
}
body.authenticated #admin-settings-view #admin-backup-settings-card .backup-actions>button.btn-danger-soft:not(#hc41-a#hc41-b#hc41-c){
 background:var(--hc41-red)!important;border:1px solid var(--hc41-red)!important;color:#FFF!important;
 -webkit-text-fill-color:#FFF!important;
}
/* Profile overlay: header closure RIGHT, scrollable content, readable note and bottom padding. */
body.authenticated #account-overlay .account-panel:not(#hc41-a#hc41-b#hc41-c){
 box-sizing:border-box!important;width:min(100%,680px)!important;max-height:min(92dvh,860px)!important;
 padding:20px!important;overflow-y:auto!important;overflow-x:hidden!important;
 scroll-padding-bottom:24px!important;border-radius:16px!important;
}
body.authenticated #account-overlay .account-panel>header:not(#hc41-a#hc41-b#hc41-c){
 display:grid!important;grid-template-columns:minmax(0,1fr) 40px!important;align-items:center!important;
 justify-content:stretch!important;gap:12px!important;margin:0 0 18px!important;
 padding:0 0 13px!important;width:100%!important;max-width:100%!important;
 border-bottom:1px solid var(--hc41-line-light)!important;
}
body.authenticated #account-overlay .account-panel>header>#account-close:not(#hc41-a#hc41-b#hc41-c){
 display:grid!important;place-items:center!important;position:static!important;transform:none!important;
 inset:auto!important;justify-self:end!important;align-self:center!important;
 min-width:40px!important;width:40px!important;height:40px!important;min-height:40px!important;
 margin:0!important;padding:0!important;border-radius:9px!important;
 border:1px solid var(--hc41-line)!important;background:#FFF!important;color:var(--hc41-ink)!important;
}
body.authenticated #account-overlay .profile-section-title:not(#hc41-a#hc41-b#hc41-c){
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(170px,.7fr)!important;
 gap:20px!important;align-items:start!important;min-width:0!important;
}
body.authenticated #account-overlay .profile-section-title .profile-lock-note:not(#hc41-a#hc41-b#hc41-c){
 max-width:100%!important;min-width:0!important;text-align:right!important;
 font-size:11px!important;line-height:1.45!important;white-space:normal!important;
 overflow-wrap:normal!important;
}
body.authenticated #account-overlay .profile-edit-form>button[type="submit"]:not(#hc41-a#hc41-b#hc41-c){
 margin-bottom:22px!important;
}
/* Long forms and settings panels must not be forced into unusable fixed widths. */
body.authenticated :is(#admin-articles-view,#admin-service-view,#admin-settings-view) :is(.settings-extra-card,.r26-card,.article-catalog-browser){min-width:0!important}
@media(max-width:850px){
 body.authenticated #admin-service-view [data-r26-panel="intelligence"] .r26-grid-2{grid-template-columns:minmax(0,1fr)!important}
 body.authenticated #admin-settings-view #admin-backup-settings-card .backup-actions>button{flex:0 1 auto!important}
}
@media(max-width:620px){
 body.authenticated #account-overlay .account-panel:not(#hc41-a#hc41-b#hc41-c){padding:14px!important;max-height:95dvh!important;width:100%!important}
 body.authenticated #account-overlay .profile-section-title:not(#hc41-a#hc41-b#hc41-c){grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
 body.authenticated #account-overlay .profile-section-title .profile-lock-note:not(#hc41-a#hc41-b#hc41-c){text-align:left!important}
 body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view) .productivity-toolbar>button{margin-left:0!important}
 body.authenticated #admin-settings-view #admin-backup-settings-card .backup-restore-file:not(#hc41-a#hc41-b#hc41-c){flex:1 1 100%!important;flex-wrap:wrap!important}
 body.authenticated #admin-settings-view #admin-backup-settings-card .backup-actions>button:not(#hc41-a#hc41-b#hc41-c){flex:1 1 160px!important}
 body.authenticated :is(#admin-service-view,#admin-articles-view,#admin-purchases-view,#admin-settings-view) :is(button,select,input:not([type="checkbox"]):not([type="radio"])) {min-height:44px!important}
}
/* Catalog price/quantity cells: compact inputs rather than near-full-column fields. */
body.authenticated #admin-articles-view .article-catalog-table td :is(input:not([type="checkbox"]),select):not(#hc41-a#hc41-b#hc41-c){
 width:min(100%,110px)!important;min-width:72px!important;max-width:110px!important;
}
