/* Admin four modules: theme-responsive presentation only. No changes to app update logic. */
html.wl-theme-active .pwa-wrap,html.wl-theme-active .cs-wrap,html.wl-theme-active .tb-wrap,html.wl-theme-active .dv-shell{color:var(--wl-theme-fg)!important}
html.wl-theme-active :is(.pwa-panel,.cs-card,.tb-card,.dv-card,.dv-stats>div){background:var(--wl-theme-surface)!important;color:var(--wl-theme-on-surface)!important;border-color:var(--wl-theme-border)!important}
html.wl-theme-active :is(.pwa-panel,.cs-card,.tb-card,.dv-card) :is(h1,h2,h3,h4,label,strong){color:var(--wl-theme-on-surface)!important}
html.wl-theme-active :is(.pwa-wrap,.cs-wrap,.tb-wrap,.dv-shell) :is(input:not([type=color]),select,textarea){background:var(--wl-theme-surface)!important;color:var(--wl-theme-on-surface)!important;border-color:var(--wl-theme-border)!important}
html.wl-theme-active :is(.pwa-wrap,.cs-wrap,.tb-wrap,.dv-shell) :is(.pwa-btn,.cs-btn,.tb-btn,.dv-actions button,.dv-pages button){background:var(--wl-theme-surface)!important;color:var(--wl-theme-on-surface)!important;border-color:var(--wl-theme-border)!important;white-space:nowrap}
html.wl-theme-active :is(.pwa-wrap,.cs-wrap,.tb-wrap,.dv-shell) :is(.pwa-primary,.cs-primary,.tb-btn.primary,.dv-primary){background:var(--wl-theme-primary)!important;color:var(--wl-theme-on-primary)!important;border-color:var(--wl-theme-primary)!important}
html.wl-theme-active .tb-preset{background:var(--wl-theme-surface)!important;color:var(--wl-theme-on-surface)!important;border-color:var(--wl-theme-border)!important}
html.wl-theme-active .tb-preset.selected{border-color:var(--wl-theme-accent)!important;box-shadow:0 0 0 1px var(--wl-theme-accent)!important}
html.wl-theme-active #sidebar,html.wl-theme-active #sidebar .side-top,html.wl-theme-active #sidebar .side-footer,html.wl-theme-active #sidebar .side-scroll{background:var(--wl-theme-primary)!important;color:var(--wl-theme-on-primary)!important}
html.wl-theme-active #sidebar :is(.nav-btn,.nav-group,.crm-sidebar-title){color:var(--wl-theme-on-primary)!important}
html.wl-theme-active #sidebar .nav-btn.active{background:var(--wl-theme-selection)!important;color:var(--wl-theme-fg)!important;border-left-color:var(--wl-theme-accent)!important}
html.wl-theme-active #wlDeployNotice{background:var(--wl-theme-primary)!important;color:var(--wl-theme-on-primary)!important;border:1px solid var(--wl-theme-accent)!important;box-shadow:0 5px 20px rgba(0,0,0,.15)!important}
/* Shared responsive layout */
.pwa-wrap,.cs-wrap,.tb-wrap,.dv-shell{box-sizing:border-box;max-width:100%;overflow-wrap:anywhere}
.pwa-wrap{padding:12px 16px 28px}.pwa-grid{align-items:stretch}.pwa-panel{display:flex;flex-direction:column;gap:10px}.pwa-panel p{margin:0}.pwa-panel .pwa-btn{align-self:flex-start}.pwa-head h1{font-size:clamp(1.35rem,2.4vw,1.9rem)}
.cs-wrap,.tb-wrap,.dv-shell{padding:14px 16px 28px}.cs-head,.tb-head,.dv-top{flex-wrap:wrap}.cs-head h1,.tb-head h1,.dv-top h1{font-size:clamp(1.35rem,2.4vw,1.85rem)}
.tb-presets{grid-template-columns:repeat(5,minmax(0,1fr))}.tb-preset{overflow-wrap:anywhere}.tb-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.tb-columns>*{min-width:0}.tb-fields>*{min-width:0}
.dv-item strong{overflow-wrap:anywhere}.dv-filters>*{min-width:0}
@media(max-width:1100px){.tb-presets{grid-template-columns:repeat(3,minmax(0,1fr))}.tb-columns{grid-template-columns:1fr}}
@media(max-width:720px){.pwa-wrap,.cs-wrap,.tb-wrap,.dv-shell{padding:12px 10px 24px}.pwa-grid,.cs-grid,.tb-fields,.tb-columns{grid-template-columns:1fr!important}.tb-presets{grid-template-columns:repeat(2,minmax(0,1fr))}.pwa-panel,.cs-card,.tb-card,.dv-card{padding:14px}.pwa-head,.cs-head,.tb-head,.dv-top{align-items:flex-start;gap:10px}.pwa-head h1,.cs-head h1,.tb-head h1,.dv-top h1{font-size:1.35rem}.dv-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dv-filters{grid-template-columns:1fr}.dv-item{grid-template-columns:minmax(0,1fr) auto;gap:8px}.dv-item>div:nth-child(2){grid-column:1/-1;grid-row:2}.dv-item .dv-status{grid-column:2;grid-row:1}.dv-item .dv-actions{grid-column:1/-1;grid-row:3}.dv-request{grid-template-columns:1fr}.dv-pages{flex-wrap:wrap}.tb-actions{flex-wrap:wrap}.tb-preview{min-width:0;overflow:hidden}}
@media(max-width:390px){.tb-presets{grid-template-columns:1fr}.pwa-actions{display:grid;grid-template-columns:1fr 1fr}.pwa-actions .pwa-btn{width:100%;padding:9px 6px}.dv-stats{gap:8px}}
