/* Shared component states; colors belong to theme-tokens.css. */
html[data-theme],html[data-theme] body{background:var(--canvas);color:var(--text)}
html[data-theme] :is(input,textarea,select){color-scheme:inherit;accent-color:var(--accent)}
html[data-theme] ::placeholder{color:var(--text-muted);opacity:1}
html[data-theme] :is(a,button,input,textarea,select,summary,[tabindex]):focus-visible{outline:3px solid var(--focus);outline-offset:3px}
html[data-theme] :is(h1,h2,h3,h4,h5,h6){color:var(--text)}
html[data-theme] :is(.eyebrow,.eyebrow.dark,.kicker,.metrics b){color:var(--success)}
html[data-theme] .process-grid b{color:var(--warning)}
html[data-theme] a{color:var(--link)}
html[data-theme] .app-icon{filter:invert(1)}
html[data-theme=light] .app-icon{filter:none}
html[data-theme] :is(.site-header .brand-logo,.brand-logo-footer){background:transparent;border-radius:0;filter:none}
html[data-theme] .site-header .brand-logo{padding:4px 10px}
html[data-theme] :is(.button,.nav-cta,.round-link){background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
html[data-theme] :is(.button,.nav-cta,.round-link):hover{background:var(--accent-hover);color:var(--on-accent)}
html[data-theme] :is(.button,.nav-cta,.round-link) :is(span,.app-icon){color:inherit}
html[data-theme] :is(.button,.nav-cta,.round-link,.floating) .app-icon{filter:invert(1)}
html[data-theme] :is(.button-secondary,.button-light,.pdf-secondary){background:var(--surface-alt);color:var(--link);border:1px solid var(--border)}
html[data-theme] :is(.button-secondary,.button-light,.pdf-secondary):hover{background:var(--surface-hover);color:var(--text)}
html[data-theme=light] :is(.button-secondary,.button-light,.pdf-secondary) .app-icon{filter:none}
html[data-theme] :is(.floating.phone,.floating.whatsapp){color:var(--on-accent);background:var(--accent)}
html[data-theme] .floating.whatsapp,html[data-theme] .whatsapp-dialog .button{background:#087b4b;color:#fff}
html[data-theme] .site-header .menu a.nav-cta{color:var(--on-accent)}
html[data-theme] :is(.site-header .menu a:not(.nav-cta),.app-dock .app-nav-link){color:var(--text)}
html[data-theme] :is(.app-nav-link[aria-current=page],.admin-tabs .is-active){background:var(--surface-hover);color:var(--link)}
html[data-theme] .gallery-page-button[aria-current],html[data-theme] .media-admin-pagination a.is-active{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
html[data-theme] :is(.gallery-tile>span,.gallery-tile figcaption){background:var(--surface);color:var(--text)}
html[data-theme] .lightbox button{background:var(--surface-alt);color:var(--text);border-color:var(--border)}
html[data-theme] .lightbox button:hover{background:var(--surface-hover)}
html[data-theme] #gallery-modal .lightbox-reading-info small{color:var(--text-muted)}
html[data-theme] :is(dialog,.lightbox,.pdf-crop-dialog)::backdrop{background:var(--backdrop);backdrop-filter:blur(5px)}
html[data-theme] .category-backdrop{background:var(--backdrop)}
html[data-theme] :is(.admin-error,.pdf-status.is-error,.image-upload-feedback.is-error){color:var(--danger);border-color:var(--danger);background:var(--danger-bg)}
html[data-theme] .admin-notice{color:var(--success);border-color:var(--success);background:var(--success-bg)}
html[data-theme] .admin-error:before{background:var(--danger);color:var(--canvas)}
html[data-theme] .admin-notice:before{background:var(--success);color:var(--canvas)}
html[data-theme] .media-delete-button{background:var(--danger-bg)!important;color:var(--danger)!important;border-color:var(--danger)!important}
html[data-theme] .admin-delete-link{color:var(--danger)}
html[data-theme] :is(.admin-form,.media-admin-toolbar,.visibility-controls) :is(input,select,textarea){background:var(--field);color:var(--text);border-color:var(--border)}
html[data-theme] :is(input[type=checkbox],input[type=radio]){accent-color:var(--accent)}
html[data-theme] input::file-selector-button{background:var(--surface-hover);color:var(--text);border-color:var(--border)}
html[data-theme] :is(.rich-editor-surface,.admin-form label,.admin-helper,.status-pill){color:var(--text)}
html[data-theme] .admin-header{background:var(--canvas)}
html[data-theme] .admin-body .admin-header .app-nav-link{color:var(--link)}
html[data-theme] .admin-upload-overlay{background:var(--overlay);color:var(--text)}
html[data-theme] progress{accent-color:var(--accent);color:var(--accent);background:var(--surface-alt)}
html[data-theme] progress::-webkit-progress-bar{background:var(--surface-alt)}
html[data-theme] progress::-webkit-progress-value{background:var(--accent)}
html[data-theme] progress::-moz-progress-bar{background:var(--accent)}
.appearance-form{max-width:none}.appearance-form .theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.appearance-form input[type=radio]{width:20px!important;height:20px;flex:none}.appearance-form .admin-check{display:flex;gap:12px;align-items:center;padding:12px 0}.appearance-form fieldset{min-width:0}.appearance-form .theme-help{font-weight:400;color:var(--text-muted);font-size:14px}.appearance-form>.button{justify-self:start}
html[data-theme],html[data-theme] *{scrollbar-color:var(--scroll-thumb) var(--scroll-track);scrollbar-width:thin}
html[data-theme]::-webkit-scrollbar,html[data-theme] *::-webkit-scrollbar{width:10px;height:10px}
html[data-theme]::-webkit-scrollbar-track,html[data-theme] *::-webkit-scrollbar-track{background:var(--scroll-track)}
html[data-theme]::-webkit-scrollbar-thumb,html[data-theme] *::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border:2px solid var(--scroll-track);border-radius:8px}
html[data-theme]::-webkit-scrollbar-thumb:hover,html[data-theme] *::-webkit-scrollbar-thumb:hover{background:var(--scroll-hover)}
@media(max-width:800px){.appearance-form .theme-options{grid-template-columns:1fr}html[data-theme] .has-admin-nav .admin-header nav{background:var(--surface);border-color:var(--border)}}
