/* Shared theme components, used by every page and all editable design templates. */
:root{--brand-header:var(--brand-surface);--brand-input:var(--brand-surface);--brand-input-border:var(--brand-border);--brand-button:var(--brand-primary);--brand-button-hover:var(--brand-primary-dark);--brand-on-button:var(--brand-on-primary);--brand-on-button-hover:var(--brand-on-primary-dark)}
body.v031 :is(.operator-topbar,.portal-topbar,.public-topbar,.topbar){background:var(--brand-header);color:var(--brand-text)}
body.v031 :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea){background:var(--brand-input);color:var(--brand-text);border-color:var(--brand-input-border)}
body.v031 .button,body:is(.portal-3313,.admin-3312) .button{background:var(--brand-button);color:var(--brand-on-button);border-color:var(--brand-button)}
body.v031 .button:hover:not(:disabled),body:is(.portal-3313,.admin-3312) .button:hover:not(:disabled){background:var(--brand-button-hover);color:var(--brand-on-button-hover);border-color:var(--brand-button-hover)}
body.v031 .button:is(.secondary,.button-ghost,.ghost,.outline,.button-outline){background:var(--brand-surface);color:var(--brand-link);border-color:var(--brand-border)}
body.v031 .button:is(.secondary,.button-ghost,.ghost,.outline,.button-outline):hover:not(:disabled){background:var(--brand-active);color:var(--brand-text);border-color:var(--brand-border)}
body.v031 .button:is(.danger,.danger-button){background:var(--status-danger);color:var(--status-on-danger);border-color:var(--status-danger)}
body.v031 .button:is(.danger,.danger-button):hover:not(:disabled){background:var(--status-danger);color:var(--status-on-danger);border-color:var(--status-danger);filter:brightness(.94)}
body.v031 .button:is(:disabled,[aria-disabled=true]){background:var(--brand-background);color:var(--brand-text-muted);border-color:var(--brand-border)}
body.v031 :is(.card,.content-card,.operator-card,.out-card,.storage-card,.dashboard-panel,.portal-kpi,dialog,.notification-popover){background-color:var(--brand-surface);color:var(--brand-text);border-color:var(--brand-border)}
body.v031 :is(table,th,td,pre,code){color:var(--brand-text);border-color:var(--brand-border)}
body.v031 :is(th,pre,code){background-color:var(--brand-background)}
body.v031 :is(.chart-legend,.chart-grid text,.chart-labels text){color:var(--brand-text-muted);fill:var(--brand-text-muted)}
body.v031 :is(.tooltip,.help-tooltip,.field-help){background:var(--brand-surface);color:var(--brand-text);border-color:var(--brand-border)}
body.v031 :is(.avatar,.account-avatar){background:var(--brand-primary);color:var(--brand-on-primary)}
body.v031 .empty-favorites-hide336 summary{color:var(--brand-link)}
body.v031 .empty-favorites-hide336 form{color:var(--brand-text-muted)}
body.v031 .empty-favorites-hide336 button{color:var(--brand-text);border-color:var(--brand-border)}
.catalog-layout336{grid-template-columns:minmax(245px,320px) minmax(0,1fr);gap:20px;align-items:start}
.catalog-list336,.catalog-detail336{min-width:0;overflow-wrap:anywhere}
.catalog-list-head336{display:flex;flex-wrap:wrap;gap:10px;align-items:center;min-height:48px}
.catalog-list-head336 h2{font-size:18px;line-height:1.3;flex:1 1 140px}
.catalog-list-head336 .button{flex:none;white-space:nowrap}
.catalog-item336{display:grid;gap:7px;min-width:0;padding:14px;background:var(--brand-surface);border:1px solid var(--brand-border);border-radius:9px;text-decoration:none}
.catalog-item336.selected{border-color:var(--brand-primary);background:var(--brand-active)}
.catalog-item336 :is(strong,small,span,p){overflow-wrap:anywhere;min-width:0;margin:0}
.catalog-item336 small{color:var(--brand-text-muted);line-height:1.5}
.catalog-fields336,.storage-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.catalog-fields336 .field,.storage-form label{min-width:0;align-self:start}
.catalog-fields336 .field:has(textarea){grid-column:1/-1}
.catalog-fields336 .checkbox-field{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:8px;min-height:42px}
.catalog-fields336 .checkbox-field input{width:18px;height:18px;margin-top:2px}
.catalog-detail-head336{display:flex;align-items:start;flex-wrap:wrap;gap:12px}
.catalog-detail-head336 h2{font-size:22px;line-height:1.3;overflow-wrap:anywhere}
.catalog-object-actions336{gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-bottom:12px}
.sticky-actions336{position:sticky;bottom:12px;z-index:5;display:flex;gap:14px;align-items:center;padding:14px;background:var(--brand-surface);border:1px solid var(--brand-border);border-radius:10px;color:var(--brand-text-muted)}
.theme-list341{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}
.theme-picker{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin-bottom:18px}
.theme-picker label{flex:1 1 230px;max-width:440px}
.theme-picker select{display:block;width:100%;margin-top:7px}
#theme-editor341 .brand-color-row{display:grid;grid-template-columns:minmax(130px,1fr) 40px minmax(85px,110px) minmax(100px,130px) 25px;gap:10px;align-items:center}
#theme-editor341 .brand-color-row input{width:100%;min-width:0}
#theme-editor341 .brand-color-row small{display:block;color:var(--brand-text-muted)}
.color-swatch341{height:24px;width:24px;border:1px solid var(--brand-border);border-radius:5px}
.theme-preview341{background:var(--brand-background);color:var(--brand-text);border:1px solid var(--brand-border);border-radius:10px;overflow:hidden;display:grid;grid-template-columns:150px minmax(0,1fr)}
.theme-preview341 header{grid-column:1/-1;background:var(--brand-header);padding:18px;color:var(--brand-text);border-bottom:1px solid var(--brand-border)}
.theme-preview341 nav{background:var(--brand-sidebar);padding:18px;color:var(--brand-text)}
.theme-preview341 main{padding:22px;min-width:0}
.theme-preview341 article{background:var(--brand-surface);color:var(--brand-text);border:1px solid var(--brand-border);padding:18px;border-radius:9px}
.theme-preview341 small{display:block;color:var(--brand-text-muted);margin-top:14px}
.theme-preview341 label{display:block;margin-bottom:10px}
.theme-preview341[data-mode=login] nav{display:none}
.theme-preview341[data-mode=login] main{grid-column:1/-1;max-width:460px;width:100%;margin:auto}
.theme-preview341 button.preview-button341{background:var(--brand-button);color:var(--brand-on-button);border:1px solid var(--brand-button);padding:10px 14px;border-radius:6px;margin-right:12px}
.theme-preview341 button.preview-button341:hover{background:var(--brand-button-hover);color:var(--brand-on-button-hover)}
.theme-preview341 a{color:var(--brand-link)}
.quota-kpis341{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.quota-kpis341 article{padding:16px;border:1px solid var(--brand-border);border-radius:10px;background:var(--brand-background);display:grid;gap:8px;align-content:start;min-width:0}
.quota-kpis341 h3{font-size:14px;margin:0}.quota-kpis341 strong{font-size:22px;font-variant-numeric:tabular-nums}.quota-kpis341 small{color:var(--brand-text-muted);line-height:1.5}
.quota-kpis341 progress,.quota-summary progress{width:100%;accent-color:var(--brand-accent)}
.stored-file341{display:block;color:var(--brand-text-muted);margin:5px 0}
@media(max-width:1150px){.catalog-layout336{grid-template-columns:245px minmax(0,1fr)}.catalog-fields336,.storage-form{grid-template-columns:minmax(0,1fr)}#theme-editor341 .brand-color-row{grid-template-columns:40px minmax(85px,1fr) minmax(100px,1fr) 25px}#theme-editor341 .brand-color-row>div:first-child{grid-column:1/-1}}
@media(max-width:850px){.catalog-layout336{grid-template-columns:minmax(0,1fr)}.catalog-list336{max-height:330px;overflow:auto}.catalog-fields336,.storage-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.catalog-fields336,.storage-form{grid-template-columns:minmax(0,1fr)}.theme-preview341{grid-template-columns:1fr}.theme-preview341 nav{display:none}.theme-preview341 main{padding:12px}.sticky-actions336{bottom:0;flex-wrap:wrap}.quota-kpis341{grid-template-columns:minmax(0,1fr)}}
