/* Low-specificity component defaults let inline field customizations keep their priority. */
/* Only the module canvas is decorated. Controls and document content stay opaque. */
html:is([data-brand-backdrop],[data-theme-preview]) body,
html:is([data-brand-backdrop],[data-theme-preview]) body :is(.sys-dashboard-studio,.sysdash-grid,.workspace-content,.workflow-admin-main,.app-shell,#sysimpleAIBuilder,.doc-builder-page .app){
 background-color:var(--adm-bg,var(--sysdash-bg,#f3f5f7))!important;
 background-image:var(--brand-pattern-image,none)!important;
 background-size:var(--brand-pattern-size,auto)!important;
 background-position:0 0!important;
 background-attachment:scroll!important;
}
html:is([data-brand-backdrop],[data-theme-preview]) body[data-theme] #studio-home.studio-hero{background:transparent!important}
html:is([data-brand-backdrop],[data-theme-preview]) body .studio-hero::before,
html:is([data-brand-backdrop],[data-theme-preview]) body .studio-hero::after{display:none!important}
@media print{html:is([data-brand-backdrop],[data-theme-preview]) body,html:is([data-brand-backdrop],[data-theme-preview]) body :is(.sys-dashboard-studio,.sysdash-grid,.workspace-content,.workflow-admin-main,.app-shell,#sysimpleAIBuilder,.doc-builder-page .app){background-image:none!important}}
html:is([data-brand-active],[data-theme-preview]) body{font-size:var(--brand-fontSize)}
html:is([data-brand-active],[data-theme-preview]) body #studio-home{--module-accent:var(--adm-primary);--module-soft:var(--adm-primary-soft);font-family:var(--brand-font);}
html:is([data-brand-active],[data-theme-preview]) body #studio-home [data-home-module]{--module-accent:var(--adm-primary);--module-soft:var(--adm-primary-soft);}
html:is([data-brand-active],[data-theme-preview]) body .sys-ai-panel{
 --sys-ai-primary:var(--adm-primary);--sys-ai-surface:var(--adm-panel);
 --sys-ai-panel-bg:var(--adm-bg);--sys-ai-text:var(--adm-text);
 --sys-ai-muted:var(--adm-text-dim);--sys-ai-border:var(--adm-border);
 --sys-ai-user:var(--adm-primary);--sys-ai-assistant:var(--adm-panel);
 font-family:var(--brand-font);
}
html:is([data-brand-active],[data-theme-preview]) body .sys-ai-panel .sys-ai-message.is-user .sys-ai-bubble,
html:is([data-brand-active],[data-theme-preview]) body .sys-ai-panel .sys-ai-form button{color:var(--brand-primary-text)}
html:is([data-brand-active],[data-theme-preview]) body .sys-ai-panel .sys-ai-context pre{background:var(--adm-surface-2);color:var(--adm-text)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.form-control,.input-control,input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea):not([data-brand-control],[data-brand-control] *){font-size:var(--brand-fontSize);min-height:var(--brand-fieldHeight);border-radius:var(--brand-radius);background-color:var(--adm-input-bg);color:var(--adm-text);border-color:var(--adm-border)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.btn,button):not([data-brand-control],[data-brand-control] *){border-radius:var(--brand-buttonRadius,var(--brand-radius));min-height:var(--brand-fieldHeight)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.btn-primary,.primary):not([data-brand-control],[data-brand-control] *){background:var(--adm-primary);border-color:var(--adm-primary);color:var(--brand-primary-text)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(label,.field-label,.form-question>legend):not([data-brand-control],[data-brand-control] *){font-size:var(--brand-labelSize)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.surface-panel,.form-paper,.box,.panel):not([data-brand-control],[data-brand-control] *){border-radius:var(--brand-panelRadius,var(--brand-radius));background-color:var(--adm-panel);color:var(--adm-text);border-color:var(--adm-border)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.form-group,.form-question):not([data-brand-control],[data-brand-control] *){margin-bottom:var(--brand-spacing)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.form-paper h1,.box-title):not([data-brand-control],[data-brand-control] *){font-size:var(--brand-titleSize)}
html:is([data-brand-active],[data-theme-preview]) .form-paper{background:var(--adm-panel);color:var(--adm-text)}
html:is([data-brand-active],[data-theme-preview]) .form-question :is(input,select,textarea){background-color:var(--adm-input-bg);color:var(--adm-text);border-color:var(--adm-border);font-size:var(--brand-fontSize);border-radius:var(--brand-radius)}
html:is([data-brand-active],[data-theme-preview]) :is(.form-help,.form-intro,.form-question small){color:var(--adm-text-dim)}
.brand-client-logo{max-height:32px;max-width:150px;object-fit:contain}
/* Shared header across modules, including the intranet shell and its light-theme reset. */
@layer sysimple-actions {
 html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.primary,.btn-primary,.btn--primary,.sys-btn-primary){--action-fg:var(--brand-primary-text)}
 html:is([data-brand-header],[data-theme-preview]) body[data-theme] :is(header.sys-studio-header.topbar,.sys-studio-header,.app-topbar){background:var(--adm-header-bg)!important;color:var(--adm-header-text)!important;border-bottom-color:var(--adm-header-border)!important}
 html:is([data-brand-header],[data-theme-preview]) body[data-theme] .sys-studio-header :is(.sys-studio-title,.sys-studio-organization,.topbar-left,.topbar-center,.topbar-right){color:var(--adm-header-text)!important}
 html:is([data-brand-header],[data-theme-preview]) body[data-theme] .sys-studio-header :is(.sys-studio-subtitle,.sys-studio-module-name){color:var(--adm-header-muted)!important}
}
.brand-public-identity{display:flex;align-items:center;gap:12px;margin-bottom:var(--brand-spacing,14px)}
html:is([data-brand-active],[data-theme-preview]) body .public-page-root{--site-radius:var(--brand-radius)!important;--site-font:var(--brand-font)!important}
html:is([data-brand-active],[data-theme-preview]) body[data-brand-target="forms"] .page-design .form-paper{background:var(--adm-panel)!important;color:var(--adm-text)!important}
html:is([data-brand-active],[data-theme-preview]) body[data-brand-target="forms"] .page-design .form-paper h1{color:var(--adm-text)!important;font-size:var(--brand-titleSize)}
html:is([data-brand-active],[data-theme-preview]) body[data-brand-target="forms"] .page-design .form-paper :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:var(--adm-input-bg)!important;color:var(--adm-text)!important;border-color:var(--adm-border)!important;min-height:var(--brand-fieldHeight)}
html:is([data-brand-active],[data-theme-preview]) body[data-brand-target="forms"] .page-design .form-paper button[type=submit]{background:var(--adm-primary)!important;color:var(--brand-primary-text)!important;border-color:var(--adm-primary)!important;min-height:var(--brand-fieldHeight)}



/* Only explicitly opted-in controls consume organization component styling.
   Scope boundaries prevent a themed box from implicitly opting in its children. */
@scope (:is(html:is([data-brand-active],[data-theme-preview]),[data-brand-scope]) [data-brand-control="theme"]) to ([data-brand-control]) {
 :scope{font-family:var(--brand-font);font-size:var(--brand-fontSize);margin-bottom:var(--brand-spacing)}
 :is(input:not([type=checkbox]):not([type=radio]),select,textarea,.form-control){font-family:var(--brand-font);font-size:var(--brand-fontSize);min-height:var(--brand-fieldHeight);background:var(--adm-input-bg);color:var(--adm-text);border:var(--brand-borderWidth) solid var(--adm-border);border-radius:var(--brand-radius)}
 label{font-family:var(--brand-font);font-size:var(--brand-labelSize);color:var(--adm-text)}
 :is(button,.btn){font-family:var(--brand-font);font-size:var(--brand-fontSize);min-height:var(--brand-buttonHeight);border:var(--brand-borderWidth) solid var(--adm-border);border-radius:var(--brand-buttonRadius,var(--brand-radius));background:var(--brand-buttonBackground);color:var(--brand-buttonText)}
 :is(button,.btn):hover:not(:disabled){background:var(--brand-buttonHover)}
 .box{background:var(--brand-boxBackground);color:var(--brand-boxText);border:var(--brand-borderWidth) solid var(--adm-border);border-radius:var(--brand-panelRadius,var(--brand-radius))}
 .box-header{background:var(--brand-boxHeader);color:var(--brand-boxText);font-family:var(--brand-font);font-size:var(--brand-titleSize);padding:var(--brand-boxPadding)}
 .box-body{padding:var(--brand-boxPadding)}
 [class*="runtime-container-layout"]{background:var(--brand-layoutBackground);padding:var(--brand-layoutGap)}
 .runtime-container-body{gap:var(--brand-layoutGap)}
 :is(.nav-tabs a,[role=tab]){background:var(--brand-tabBackground);color:var(--adm-text)}
 :is(.nav-tabs .active a,[role=tab][aria-selected=true]){background:var(--brand-tabActive);color:var(--brand-tabText)}
 th{background:var(--brand-tableHeader);color:var(--adm-text)}
 tbody tr:nth-child(even){background:var(--brand-tableStripe)}
}
/* Base module components share the palette; semantic action colors keep their meaning. */
html:is([data-brand-active],[data-theme-preview]) :is(.btn-primary,.primary):not([data-brand-control] *){background-color:var(--brand-buttonBackground);color:var(--brand-buttonText);min-height:var(--brand-buttonHeight)}
html:is([data-brand-active],[data-theme-preview]) :is(.btn-primary,.primary):hover:not(:disabled):not([data-brand-control] *){background-color:var(--brand-buttonHover)}

@layer sysimple-actions {
/* Runtime action defaults use important declarations; override only the selected control. */
:is(html:is([data-brand-active],[data-theme-preview]),[data-brand-scope]) #runtime-fields [data-brand-control="theme"]>.runtime-form-button,
[data-brand-scope] [data-brand-control="theme"]>.runtime-form-button{
 font-family:var(--brand-font);font-size:var(--brand-fontSize);min-height:var(--brand-buttonHeight)!important;border-radius:var(--brand-buttonRadius,var(--brand-radius));border-width:var(--brand-borderWidth)!important;
}
:is(html:is([data-brand-active],[data-theme-preview]),[data-brand-scope]) #runtime-fields [data-brand-control="theme"]>.runtime-form-button:not(.btn-danger,.btn-warning,.btn-success),
[data-brand-scope] [data-brand-control="theme"]>.runtime-form-button:not(.btn-danger,.btn-warning,.btn-success){background:var(--brand-buttonBackground)!important;color:var(--brand-buttonText)!important;border-color:var(--adm-border)!important}
:is(html:is([data-brand-active],[data-theme-preview]),[data-brand-scope]) #runtime-fields [data-brand-control="theme"]>.runtime-form-button:hover:not(:disabled,.btn-danger,.btn-warning,.btn-success),
[data-brand-scope] [data-brand-control="theme"]>.runtime-form-button:hover:not(:disabled,.btn-danger,.btn-warning,.btn-success){background:var(--brand-buttonHover)!important}

}
/* Match the runtime's component specificity without changing a preserved child. */
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.box{background:var(--brand-boxBackground);color:var(--brand-boxText);border:var(--brand-borderWidth) solid var(--adm-border);border-radius:var(--brand-panelRadius,var(--brand-radius))}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.box>.box-header{background:var(--brand-boxHeader);color:var(--brand-boxText);font-size:var(--brand-titleSize);padding:var(--brand-boxPadding)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.box>.box-body{padding:var(--brand-boxPadding)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>[class*="runtime-container-layout"]{background:var(--brand-layoutBackground);padding:var(--brand-layoutGap)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.runtime-container>.runtime-container-body{gap:var(--brand-layoutGap)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>label{font-family:var(--brand-font);font-size:var(--brand-labelSize);color:var(--adm-text)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>:is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea),:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.input-group>:is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){font-family:var(--brand-font);font-size:var(--brand-fontSize);min-height:var(--brand-fieldHeight);border-radius:var(--brand-radius);border-width:var(--brand-borderWidth);background:var(--adm-input-bg);color:var(--adm-text)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.runtime-container>.runtime-tabs>[role=tab]{background:var(--brand-tabBackground);color:var(--adm-text);border-radius:var(--brand-radius)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.runtime-container>.runtime-tabs>[role=tab][aria-selected=true]{background:var(--brand-tabActive);color:var(--brand-tabText)}

:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"].has-error .form-control{border-color:#dd4b39}

/* Shared content panels; individual field appearance retains its own contract. */
html:is([data-brand-active],[data-theme-preview]) :is(.surface-panel,.panel):not([data-brand-control],[data-brand-control] *){
 background-color:var(--brand-contentBackground);color:var(--brand-contentText);border-color:var(--brand-contentBorder);
}
html:is([data-brand-active],[data-theme-preview]) :is(.surface-panel,.panel)>:is(.panel-heading,.panel-header){
 background-color:var(--brand-contentHeader);color:var(--brand-contentText);border-color:var(--brand-contentBorder);
}

/* Theme-owned action palette; never decorate navigation in the shared header. */
@layer sysimple-actions {
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-primary,.primary,.sys-btn-primary):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]){--action-bg:var(--brand-buttonBackground);--action-fg:var(--brand-buttonText);--action-border:var(--brand-buttonBackground);background:var(--brand-buttonBackground)!important;color:var(--brand-buttonText)!important;border:1px solid var(--brand-buttonBackground)!important;min-height:var(--brand-buttonHeight)!important;border-radius:var(--brand-buttonRadius,var(--brand-radius))!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-primary,.primary,.sys-btn-primary):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]):hover:not(:disabled):not([aria-disabled="true"]){background:var(--brand-buttonHover)!important;color:var(--brand-buttonText)!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-primary,.primary,.sys-btn-primary):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]):is(:disabled,[aria-disabled="true"]){opacity:.48!important;cursor:not-allowed!important;box-shadow:none!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-default,.btn-secondary,.secondary,.sys-btn-neutral,.sysdash-icon-btn,.sys-grid-icon-action,.icon-btn,.btn,.button,[data-brand-action="control"]):not(.primary,.btn-primary,.btn-success,.success,.btn-danger,.btn--danger,.danger,.sys-btn-primary,.sys-btn-success,.sys-btn-danger,.sysdash-primary-btn,.btn-warning,.warning,.warn,.sys-btn-warning,[data-brand-action="add"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]){--action-bg:var(--brand-actionControlBackground);--action-fg:var(--brand-actionControlText);--action-border:var(--brand-actionControlBorder);background:var(--brand-actionControlBackground)!important;color:var(--brand-actionControlText)!important;border:1px solid var(--brand-actionControlBorder)!important;min-height:var(--brand-buttonHeight)!important;border-radius:var(--brand-buttonRadius,var(--brand-radius))!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-default,.btn-secondary,.secondary,.sys-btn-neutral,.sysdash-icon-btn,.sys-grid-icon-action,.icon-btn,.btn,.button,[data-brand-action="control"]):not(.primary,.btn-primary,.btn-success,.success,.btn-danger,.btn--danger,.danger,.sys-btn-primary,.sys-btn-success,.sys-btn-danger,.sysdash-primary-btn,.btn-warning,.warning,.warn,.sys-btn-warning,[data-brand-action="add"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]):hover:not(:disabled):not([aria-disabled="true"]){background:var(--brand-actionControlHover)!important;color:var(--brand-actionControlText)!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-default,.btn-secondary,.secondary,.sys-btn-neutral,.sysdash-icon-btn,.sys-grid-icon-action,.icon-btn,.btn,.button,[data-brand-action="control"]):not(.primary,.btn-primary,.btn-success,.success,.btn-danger,.btn--danger,.danger,.sys-btn-primary,.sys-btn-success,.sys-btn-danger,.sysdash-primary-btn,.btn-warning,.warning,.warn,.sys-btn-warning,[data-brand-action="add"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]):is(:disabled,[aria-disabled="true"]){opacity:.48!important;cursor:not-allowed!important;box-shadow:none!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-success,.success,.sys-btn-success,.sysdash-primary-btn,[data-brand-action="add"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]){--action-bg:var(--brand-actionAddBackground);--action-fg:var(--brand-actionAddText);--action-border:var(--brand-actionAddBorder);background:var(--brand-actionAddBackground)!important;color:var(--brand-actionAddText)!important;border:1px solid var(--brand-actionAddBorder)!important;min-height:var(--brand-buttonHeight)!important;border-radius:var(--brand-buttonRadius,var(--brand-radius))!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-success,.success,.sys-btn-success,.sysdash-primary-btn,[data-brand-action="add"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]):hover:not(:disabled):not([aria-disabled="true"]){background:var(--brand-actionAddHover)!important;color:var(--brand-actionAddText)!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-success,.success,.sys-btn-success,.sysdash-primary-btn,[data-brand-action="add"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):not([data-brand-action="edit"],[data-brand-action="delete"],[data-brand-action="cancel"]):is(:disabled,[aria-disabled="true"]){opacity:.48!important;cursor:not-allowed!important;box-shadow:none!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is([data-brand-action="edit"],[data-grid-action="Edit"],.sys-grid-preview-edit):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *){--action-bg:var(--brand-actionEditBackground);--action-fg:var(--brand-actionEditText);--action-border:var(--brand-actionEditBorder);background:var(--brand-actionEditBackground)!important;color:var(--brand-actionEditText)!important;border:1px solid var(--brand-actionEditBorder)!important;min-height:var(--brand-buttonHeight)!important;border-radius:var(--brand-buttonRadius,var(--brand-radius))!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is([data-brand-action="edit"],[data-grid-action="Edit"],.sys-grid-preview-edit):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):hover:not(:disabled):not([aria-disabled="true"]){background:var(--brand-actionEditHover)!important;color:var(--brand-actionEditText)!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is([data-brand-action="edit"],[data-grid-action="Edit"],.sys-grid-preview-edit):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):is(:disabled,[aria-disabled="true"]){opacity:.48!important;cursor:not-allowed!important;box-shadow:none!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-danger,.btn--danger,.danger,.sys-btn-danger,[data-brand-action="delete"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *){--action-bg:var(--brand-actionDeleteBackground);--action-fg:var(--brand-actionDeleteText);--action-border:var(--brand-actionDeleteBorder);background:var(--brand-actionDeleteBackground)!important;color:var(--brand-actionDeleteText)!important;border:1px solid var(--brand-actionDeleteBorder)!important;min-height:var(--brand-buttonHeight)!important;border-radius:var(--brand-buttonRadius,var(--brand-radius))!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-danger,.btn--danger,.danger,.sys-btn-danger,[data-brand-action="delete"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):hover:not(:disabled):not([aria-disabled="true"]){background:var(--brand-actionDeleteHover)!important;color:var(--brand-actionDeleteText)!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is(.btn-danger,.btn--danger,.danger,.sys-btn-danger,[data-brand-action="delete"]):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):is(:disabled,[aria-disabled="true"]){opacity:.48!important;cursor:not-allowed!important;box-shadow:none!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is([data-brand-action="cancel"],.sysimple-dialog-close,.sys-grid-preview-close):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *){--action-bg:var(--brand-actionCancelBackground);--action-fg:var(--brand-actionCancelText);--action-border:var(--brand-actionCancelBorder);background:var(--brand-actionCancelBackground)!important;color:var(--brand-actionCancelText)!important;border:1px solid var(--brand-actionCancelBorder)!important;min-height:var(--brand-buttonHeight)!important;border-radius:var(--brand-buttonRadius,var(--brand-radius))!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is([data-brand-action="cancel"],.sysimple-dialog-close,.sys-grid-preview-close):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):hover:not(:disabled):not([aria-disabled="true"]){background:var(--brand-actionCancelHover)!important;color:var(--brand-actionCancelText)!important;}
html:is([data-brand-active],[data-theme-preview]) body :is(button,input,a):not([data-standard-action]):is([data-brand-action="cancel"],.sysimple-dialog-close,.sys-grid-preview-close):not(.sys-studio-header *):not([data-brand-control],[data-brand-control] *):is(:disabled,[aria-disabled="true"]){opacity:.48!important;cursor:not-allowed!important;box-shadow:none!important;}
}

html:is([data-brand-active],[data-theme-preview]) :is(.sys-dynamic-view,.sys-grid-scroll,.sysdash-table-scroll) thead th{
 background:var(--brand-tableHeader);color:var(--brand-tableHeaderText);border-color:var(--brand-tableBorder);
}
html:is([data-brand-active],[data-theme-preview]) :is(.sys-grid-scroll,.sysdash-table-scroll) :is(td,th){border-color:var(--brand-tableBorder)}
html:is([data-brand-active],[data-theme-preview]) :is(.sys-grid-scroll,.sysdash-table-scroll):is(:not([data-grid-layout]),[data-grid-layout="table"]) tbody tr:nth-child(even):not([aria-selected="true"])>td:not([data-tone]):not([data-state-color]){background-color:var(--brand-tableStripe)}
html:is([data-brand-active],[data-theme-preview]) :is(.sys-grid-scroll,.sysdash-table-scroll):is(:not([data-grid-layout]),[data-grid-layout="table"]) tbody tr:hover:not([aria-selected="true"])>td:not([data-tone]):not([data-state-color]){background-color:var(--brand-tableHover)}

/* Shared drawers use the active organization palette rather than legacy skin colors. */
html:is([data-brand-active],[data-theme-preview]) body .sys-chat-panel {
 --sys-chat-primary:var(--adm-primary);--sys-chat-primary-hover:var(--adm-primary);
 --sys-chat-panel-bg:var(--adm-bg);--sys-chat-surface:var(--adm-panel);--sys-chat-surface-alt:var(--adm-surface-2);
 --sys-chat-sidebar-bg:var(--adm-panel);--sys-chat-conversation-bg:var(--adm-bg);
 --sys-chat-border:var(--adm-border);--sys-chat-text:var(--adm-text);--sys-chat-muted:var(--adm-text-dim);
 --sys-chat-subtle:var(--adm-surface-2);--sys-chat-hover:var(--adm-primary-soft);--sys-chat-active:var(--adm-primary-soft);
 --sys-chat-own-bg:var(--adm-primary);--sys-chat-own-text:var(--brand-primary-text);
 --sys-chat-other-bg:var(--adm-panel);--sys-chat-header-bg:var(--adm-surface-2);
 --sys-chat-header-text:var(--adm-text);--sys-chat-header-muted:var(--adm-text-dim);font-family:var(--brand-font);
}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorites-panel{background:var(--adm-bg);color:var(--adm-text);border-color:var(--adm-border);font-family:var(--brand-font)}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorites-panel-header{background:var(--adm-surface-2);border-color:var(--adm-border);padding:14px}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorite-item{background:var(--adm-panel);border-color:var(--adm-border);box-shadow:none;margin:0;border-width:0 0 1px}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorite-item:is(:hover,.is-current){background:var(--adm-surface-2);border-left:3px solid var(--adm-primary);box-shadow:none}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorite-link{padding:10px 12px}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorites-panel :is(.sys-favorite-summary,.sys-favorite-meta,.sys-favorites-panel-subtitle){color:var(--adm-text-dim)!important}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorite-record{background:var(--adm-primary-soft);color:var(--adm-primary)}
html:is([data-brand-active],[data-theme-preview]) body .sys-favorites-search-wrap input{width:100%}
html:is([data-brand-active],[data-theme-preview]) body .sys-ai-panel .sys-ai-avatar{color:var(--brand-primary-text)}
@layer sysimple-actions {
 html:is([data-brand-active],[data-theme-preview]) body :is(.sys-favorites-panel,.sys-chat-panel,.sys-ai-panel) :is(button,input,textarea,.sys-favorite-item,.sys-favorite-record,.sys-chat-room,.sys-chat-message,.sys-chat-message-bubble,.sys-ai-bubble){border-radius:0!important}
 html:is([data-brand-active],[data-theme-preview]) body .sys-favorites-panel :is(button,input){border-color:var(--adm-border)!important}
 html:is([data-brand-active],[data-theme-preview]) body #sysChatPanel .sys-chat-sidebar-view-tabs button[aria-selected="true"]{background:var(--adm-primary)!important;color:var(--brand-primary-text)!important;box-shadow:none!important;border-color:var(--adm-primary)!important}
 html:is([data-brand-active],[data-theme-preview]) body :is(#secure-mail,#external-mail).sm-app .sm-primary:not([type=submit]){color:var(--brand-primary-text)!important}
 html:is([data-brand-active],[data-theme-preview]) body :is(#secure-mail,#external-mail).sm-app .sm-primary [data-sm-icon]{color:inherit!important}
}
/* Mail palettes must follow named themes even when the base skin defines literal colors. */
html:is([data-brand-active],[data-theme-preview]) body :is(#secure-mail,#external-mail).sm-app {
 --sm-bg:var(--adm-bg);--sm-panel:var(--adm-panel);--sm-secondary:var(--adm-surface-2);
 --sm-line:var(--adm-border);--sm-text:var(--adm-text);--sm-muted:var(--adm-text-dim);
 --sm-blue:var(--adm-primary);--sm-soft:var(--adm-primary-soft);
}
/* Borderless themes use elevation for containers, while fields retain their affordance. */
@layer sysimple-actions {
 html:is([data-brand-active],[data-theme-preview])[data-brand-soft] body :is(.surface-panel,.panel,.studio-card,.hc-tile,.sysdash-panel,.sysdash-widget,.sysdash-card,.acc-card,.sys-ai-panel,.sys-public-config-card,.sys-popup-shell):not([data-brand-control],[data-brand-control] *) {
  border-width:0!important; border-radius:var(--brand-radius)!important;
  background-color:var(--brand-contentBackground)!important;box-shadow:var(--brand-panel-shadow)!important;
 }
 html:is([data-brand-active],[data-theme-preview])[data-brand-soft] body :is(.surface-panel,.panel,.sysdash-panel,.sysdash-widget,.sys-popup-shell)>:is(.panel-heading,.panel-header,.sysdash-widget-header,.sys-popup-header) {
  border-bottom:0!important;background:var(--brand-contentBackground)!important;
 }
 :is(html:is([data-brand-active],[data-theme-preview])[data-brand-soft] #runtime-fields,[data-brand-scope][data-brand-soft]) [data-brand-control="theme"]>.box {border:0!important;box-shadow:var(--brand-panel-shadow);}
 :is(html:is([data-brand-active],[data-theme-preview])[data-brand-soft] #runtime-fields,[data-brand-scope][data-brand-soft]) [data-brand-control="theme"] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {border-width:1px;}
}

:is(html[data-brand-active] body,[data-brand-scope]) :is(.surface-panel,.form-paper,.box,.panel):not([data-brand-control],[data-brand-control] *){border-radius:var(--brand-panelRadius,var(--brand-radius));box-shadow:var(--brand-panel-shadow)}
:is(html[data-brand-active] body,[data-brand-scope]) :is(button,.btn):not(:disabled,[aria-disabled="true"]):not([data-brand-control],[data-brand-control] *){box-shadow:var(--brand-button-shadow)}

/* Container rhythm shared by module panels and explicitly themed dynamic boxes. */
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.surface-panel,.form-paper,.panel,.studio-card,.acc-card,.sysdash-panel,.sysdash-widget):not([data-brand-control],[data-brand-control] *){margin-block:var(--brand-containerMargin,0px);border-radius:var(--brand-panelRadius,var(--brand-radius));box-shadow:var(--brand-panel-shadow)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.surface-panel,.form-paper,.studio-card,.acc-card):not([data-brand-control],[data-brand-control] *),:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.panel-body,.sysdash-panel-body,.sysdash-widget-body):not([data-brand-control],[data-brand-control] *){padding:var(--brand-containerPadding,var(--brand-boxPadding))}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>.box{margin-block:var(--brand-containerMargin,0px);box-shadow:var(--brand-panel-shadow)}
:is(html:is([data-brand-active],[data-theme-preview]) #runtime-fields,[data-brand-scope]) [data-brand-control="theme"]>[class*="runtime-container-layout"]{padding:var(--brand-containerPadding,var(--brand-layoutGap));margin-block:var(--brand-containerMargin,0px);border-radius:var(--brand-panelRadius,var(--brand-radius));box-shadow:var(--brand-panel-shadow)}

/* One and the branding specimen share the same content surface contract. */
@layer sysimple-actions {
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.brand-content-panel,.surface-panel,.panel,.studio-card,.acc-card,.sysdash-panel,.sysdash-widget,.runtime-agenda):not([data-brand-control="preserve"],[data-brand-control="preserve"] *){background-color:var(--brand-contentBackground)!important;background-image:none!important;color:var(--brand-contentText);border:var(--brand-borderWidth) solid var(--brand-contentBorder);border-top-width:calc(var(--brand-borderWidth) * 3);border-top-color:var(--brand-contentAccent);border-radius:var(--brand-panelRadius,var(--brand-radius))!important;box-shadow:var(--brand-panel-shadow)!important;margin-block:var(--brand-containerMargin,0px)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.brand-content-panel,.surface-panel,.panel,.studio-card,.acc-card,.sysdash-panel,.sysdash-widget,.runtime-agenda):not([data-brand-control="preserve"],[data-brand-control="preserve"] *)>:is(.brand-content-heading,.panel-heading,.panel-header,.sysdash-widget-header){background:var(--brand-contentHeader);color:var(--brand-contentText);padding:var(--brand-containerPadding,var(--brand-boxPadding))}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) :is(.brand-content-panel,.surface-panel,.panel,.studio-card,.acc-card,.sysdash-panel,.sysdash-widget,.runtime-agenda):not([data-brand-control="preserve"],[data-brand-control="preserve"] *)>:is(.brand-content-body,.panel-body,.sysdash-panel-body,.sysdash-widget-body){padding:var(--brand-containerPadding,var(--brand-boxPadding))}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) .runtime-agenda:not([data-brand-control="preserve"],[data-brand-control="preserve"] *){--sysdash-surface:var(--brand-contentBackground);--sysdash-surface-2:var(--adm-surface-2);--sysdash-text:var(--brand-contentText);--sysdash-line:var(--brand-contentBorder);padding:var(--brand-containerPadding,var(--brand-boxPadding))}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) .runtime-agenda:not([data-brand-control="preserve"],[data-brand-control="preserve"] *) .sys-calendar-main{background:var(--brand-contentBackground);color:var(--brand-contentText)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) .brand-box-sample{background:var(--brand-boxBackground);color:var(--brand-boxText);border:var(--brand-borderWidth) solid var(--adm-border);border-radius:var(--brand-panelRadius,var(--brand-radius));box-shadow:var(--brand-panel-shadow);margin-block:var(--brand-containerMargin)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) .brand-box-sample>.sample-box-title{background:var(--brand-boxHeader);padding:var(--brand-boxPadding)}
:is(html:is([data-brand-active],[data-theme-preview]) body,[data-brand-scope]) .brand-box-sample>.sample-box-body{padding:var(--brand-boxPadding)}

}
@layer sysimple-actions {
html:is([data-brand-active],[data-theme-preview]) body .sys-dashboard-studio.runtime-agenda:not([data-brand-control="preserve"] *){--sysdash-surface:var(--brand-contentBackground)!important;--sysdash-text:var(--brand-contentText)!important;--sysdash-line:var(--brand-contentBorder)!important}
}
