/*! Ai Premium Hub v139 — shared Day/Night palette and matched theme control */
html{color-scheme:light;}
html[data-aph-theme=dark]{color-scheme:dark;--surface:#111216;--ink:#eeedf1;--muted:#b4aeb9;--border:#3e3945;--glass-ink:#eeedf1;--glass-surface:#1d1e24;--glass-border:#3e3945;--glass-shadow:none;--night-bg:#111216;--night-panel:#1d1e24;--night-raised:#282730;--night-border:#3e3945;--night-ink:#eeedf1;--night-muted:#ccc6d0;--text-secondary:var(--night-muted);--text-placeholder:#c4bdc9;--night-accent:#ff91aa;--night-tint:#3c2531;}

/* Same visual size as neighbouring social icons; expanded 44px touch target. */
.theme-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;padding:0;border:1px solid #4d4650;border-radius:var(--control-radius,999px);background:#242127;color:#f6edf2;line-height:1;box-shadow:none;cursor:pointer;}
.theme-toggle::before{content:"";position:absolute;inset:-2px;border-radius:inherit;}
.theme-toggle .ui-icon{display:block;width:20px;height:20px;}
.theme-toggle .theme-sun{display:none;}
html[data-aph-theme=dark] .theme-toggle .theme-moon{display:none;}
html[data-aph-theme=dark] .theme-toggle .theme-sun{display:block;}
.theme-toggle:hover{background:#37313b;border-color:#9e7185;color:#ffb1c2;}
.theme-toggle:focus-visible{outline:2px solid #ff91aa;outline-offset:3px;}
.admin-body .theme-toggle{background:#f8f5f7;border-color:#ded8df;color:#55414d;}
.admin-login-brand{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.admin-body .admin-login-brand .admin-brand{margin-bottom:0;min-width:0;}
@media(max-width:700px){
 .store-header .theme-toggle{flex-basis:34px;width:34px;height:34px;}
 .store-header .theme-toggle::before{inset:-5px;}
 .store-header .theme-toggle .ui-icon{width:19px;height:19px;}
}
@media(max-width:380px){
 .store-header{column-gap:8px;}
 .store-header .brand{font-size:15px;gap:5px;}
 .store-header .brand img{width:28px;height:28px;margin-right:0;}
 .store-header .header-socials{gap:6px;}
 .admin-body .admin-topbar{column-gap:6px;}
 .admin-body .admin-topbar h1{font-size:15px;}
 .admin-body .admin-avatar{display:none;}
}

/* Page/surface groups are scoped to theme; artwork and the black brand chrome keep their colours. */
html[data-aph-theme=dark] .admin-body .admin-login{background:var(--night-bg);}
html[data-aph-theme=dark] body{background:var(--night-bg);color:var(--night-ink);--ink:var(--night-ink);--muted:var(--night-muted);--line:var(--night-border);--admin-border:var(--night-border);}
html[data-aph-theme=dark] :is(.customer-profile-card,.account-box,.policy-wrap,.customer-account,.other-service,.gallery-section,.empty-state,.product-card,.product-info,.product-image,.description-tab,.checkout-panel,.checkout-signup,.sales-proof-card,.search-suggestions,.action-dialog,.quick-payment-dialog,.package-modal,.form-editor-dialog,.admin-body .admin-card,.admin-body .metric,.admin-body .admin-login-card,.admin-body .admin-topbar,.admin-body .admin-quick-actions a,.catalog-summary>div,.admin-body .row-more-actions,.admin-body .content-empty){background:var(--night-panel);color:var(--night-ink);border-color:var(--night-border);box-shadow:none;}
html[data-aph-theme=dark] :is(.product-card .price,.product-info .selected-package,.description-facts,.quantity-stepper,.payment-glass-card,.reference-payment .quick-payment-number,.quick-payment-number,.payment-method-logo,.admin-body .policy-preview,.admin-body .activity-detail pre,.admin-body .package-editor,.admin-body .content-thumb){background:var(--night-raised);color:var(--night-ink);border-color:var(--night-border);box-shadow:none;}
html[data-aph-theme=dark] .reference-payment:before{background:none;}
html[data-aph-theme=dark] :is(.admin-body .admin-card-header,.customer-account .table-wrap,.admin-body .table-wrap){background:transparent;border-color:var(--night-border);}
html[data-aph-theme=dark] :is(.package-modal>.form-actions,.form-editor-dialog .form-actions,.package-modal-header){background:var(--night-panel);border-color:var(--night-border);}

/* Strong/secondary copy, including the task editors moved into dialogs. */
html[data-aph-theme=dark] :is(.admin-body .detail-list dd,.profile-summary dd,.customer-profile-card h2,.customer-orders h2,.checkout-heading h1,.recovery-box h1,.recovery-box label,.admin-body .admin-login-card .admin-brand,.clients-section h2,.section-title,.card-copy h3,.product-card .card-copy h3,.product-info h1,.product-info .variant-group legend,.policy-wrap h1,.customer-account h1,.description-content h3,.description-content h4,.action-dialog h2,.admin-body .admin-topbar h1,.admin-body .admin-heading h2,.admin-body .admin-login-card h1,.admin-body .metric strong,.catalog-summary strong,.package-editor h3,.admin-empty strong,.payment-brand,.payment-number,.checkout-panel h2){color:var(--night-ink);}
html[data-aph-theme=dark] :is(.admin-login-card>p,.admin-body .detail-list dt,.profile-summary dt,.product-card .price-currency,.checkout-heading>span:not(.status),.clients-section p,.catalog-heading p,.breadcrumb,.plan-description,.description-tab,.policy-copy,.account-box p,.terms-check,.product-info .selected-package p,.product-info .quantity-field,.product-info .quantity-field>label,.checkout-fields label,.checkout-fields small,.checkout-item small,.checkout-help,.checkout-privacy,.checkout-signup p,.guest-continue,.order-line span,.order-line small,.payment-description,.payment-extra-instructions,.payment-card-top .payment-currency,.action-dialog p,.admin-body .muted,.admin-body .admin-heading p,.admin-body .admin-footer-note,.admin-body .admin-form label,.admin-body .admin-form small,.admin-body .admin-card-header small,.admin-body .metric p,.admin-body .metric small,.admin-body .admin-quick-actions a small,.admin-body .admin-empty,.catalog-summary small,.catalog-pagination,.admin-body .data-table td small,.admin-body .product-mobile-meta,.admin-body .package-total,.admin-body .admin-table--packages td[data-label=Stock],.admin-body .catalog-search-message,.admin-body .content-upload-help,.admin-body .product-details-editor>summary small,.admin-body .admin-section-editor>summary small,.admin-body .purchased-options dt,.search-suggestions-status,.review-grid figcaption,.other-service p,.gallery-section>p,.empty-state p,.recovery-steps li,.recovery-box small,.back-to-login,.sales-proof-heading p,.sales-proof-card p,.sales-proof-empty p,.checkout-methods small,.admin-topbar-right>a){color:var(--night-muted);}
html[data-aph-theme=dark] :is(.price,.detail-price,.product-info .detail-price,.selected-package strong,.description-tab h2,.policy-copy a,.terms-check a,.forgot-link,.checkout-help a,.checkout-privacy a,.checkout-terms a,.checkout-total strong,.reference-payment h2 span,.payment-card-top small,.payment-card-top strong,.reference-payment .quick-payment-number span,.quick-payment-number span,.admin-body .data-table td a:not(.button):not(.action-button),.admin-body .admin-card-header>a,.admin-eyebrow,.admin-body .activity-detail summary,.search-suggestions-all,.auth-eyebrow,.recovery-steps li.current,.recovery-actions .text-button,.sales-proof-heading .eyebrow,.sales-proof-card small,.customer-account .data-table td a,.checkout-heading>p,.checkout-fields label>span,.payment-method-logo){color:var(--night-accent);}
html[data-aph-theme=dark] :is(.section-title:before,.section-title:after){background:#805064;}

/* Inputs retain native dark select/autofill behavior. Specificity covers the existing form rules. */
html[data-aph-theme=dark] :is(.account-box input:not([type=checkbox]):not([type=hidden]),.profile-form input,.product-info .quantity-field input,.checkout-fields input,.quick-payment-panel input,.quick-payment-panel select,.admin-body .admin-form input:not([type=checkbox]):not([type=hidden]),.admin-body .admin-form textarea,.admin-body .admin-form select,.admin-body .admin-filter input,.admin-body .admin-filter select,[data-package-select]){background:var(--night-bg);color:var(--night-ink);border-color:var(--night-border);box-shadow:none;}
html[data-aph-theme=dark] .store-header .header-search{background:var(--night-panel);border-color:#69606d;box-shadow:none;}
html[data-aph-theme=dark] .header-search input{color:var(--night-ink);}
html[data-aph-theme=dark] :is(.admin-body .admin-form input,.admin-body .admin-form textarea,.admin-body .admin-form select,.account-box input,.profile-form input,.checkout-fields input,.quick-payment-panel input,.quick-payment-panel select,[data-package-select]):focus{border-color:var(--night-accent);outline:2px solid #ff91aa66;outline-offset:1px;box-shadow:none;}
/* Match the existing important overrides only where they already apply. */
html[data-aph-theme=dark] .admin-body .payment-admin-grid .admin-card{background:var(--night-panel)!important;}
html[data-aph-theme=dark] .admin-body .admin-form input[type=file]{background:var(--night-bg)!important;}
html[data-aph-theme=dark] .admin-form input::file-selector-button{background:var(--night-tint);color:var(--night-accent);}
html[data-aph-theme=dark] input:is([type=checkbox],[type=radio]){accent-color:#d64b71;}
html[data-aph-theme=dark] .account-box .password-toggle{background:transparent;color:var(--night-accent);}

/* Quiet actions and selected/unavailable controls stay distinct. */
html[data-aph-theme=dark] :is(.button.secondary,.admin-body .button.secondary,.action-button,.admin-body .action-button,.admin-body .description-format-toolbar button,.action-dialog-back,.action-dialog-close,.quantity-stepper button,.reference-payment [data-payment-close],.quick-payment-panel [data-payment-close],.product-info .variant-option span,.checkout-methods label){background:var(--night-raised);color:var(--night-ink);border-color:var(--night-border);box-shadow:none;}
html[data-aph-theme=dark] :is(.button.secondary,.admin-body .button.secondary,.action-button,.admin-body .action-button,.admin-body .description-format-toolbar button):hover{background:#3b303f;color:#fff;border-color:#a06c84;}
html[data-aph-theme=dark] :is(.product-info .variant-option input:checked+span,.checkout-methods label:has(input:checked),.admin-body .product-edit-action,.action-dialog-icon,.metric-icon,.admin-quick-actions a>.ui-icon:first-child,.reference-payment .quick-payment-number button,.quick-payment-number button,.admin-body .admin-avatar){background:var(--night-tint);color:var(--night-accent);border-color:#9a5873;box-shadow:none;}
html[data-aph-theme=dark] .product-info .variant-option input:checked+span{box-shadow:0 0 0 1px #e07899;}
html[data-aph-theme=dark] .product-info .variant-option input:disabled+span{background:#25252b;color:#96909c;border-color:#49434e;box-shadow:none;}
html[data-aph-theme=dark] :is(.account-tabs button,.card-cta,.product-card .card-cta,.order-cancel-button){color:var(--night-muted);border-color:var(--night-border);}
html[data-aph-theme=dark] :is(.account-tabs button.active,.account-tabs .button.secondary.active){color:var(--night-accent);border-color:var(--night-accent);}
html[data-aph-theme=dark] .admin-body .theme-toggle{background:var(--night-raised);color:var(--night-ink);border-color:#69606d;}
html[data-aph-theme=dark] .theme-toggle:hover{background:#3b303f;color:#ffb1c2;border-color:#a06c84;}

/* Tables, borders, dropdowns and status colours. */
html[data-aph-theme=dark] :is(.admin-body .data-table th,.customer-account .data-table th){background:var(--night-raised);color:var(--night-muted);}
html[data-aph-theme=dark] .data-table td{color:var(--night-ink);border-color:var(--night-border);}
html[data-aph-theme=dark] :is(.data-table tbody tr:hover,.search-suggestion:hover,.search-suggestion[aria-selected=true]){background:var(--night-raised);color:var(--night-ink);}
html[data-aph-theme=dark] :is(.data-table tr,.data-table td:before,.admin-card-header,.description-tab h2,.description-fact+.description-fact,.account-tabs,.checkout-item,.checkout-total,.search-suggestions-all,.admin-body .content-row-tools,.admin-body .product-details-editor[open]>.admin-card-body,.admin-body .admin-section-editor[open]>.admin-card-body,.payment-disclosure[open]>summary,.warranty-label){border-color:var(--night-border);}
html[data-aph-theme=dark] .admin-body .data-table td:before{color:var(--night-muted);}
html[data-aph-theme=dark] .notice{background:#302331;color:#ffd1df;border-color:#68455a;box-shadow:none;}
html[data-aph-theme=dark] :is(.notice.error,.action-button.action-danger,.payment-submit-error){background:#3d222c;color:#ffabbf;border-color:#854457;}
html[data-aph-theme=dark] .admin-content .danger-action{background:#3d222c!important;color:#ffabbf!important;border-color:#854457!important;}
html[data-aph-theme=dark] :is(.product-card .stock-badge.is-unavailable,.status,.admin-alert,.demo-strip){background:#382e1f;color:#f3cf8b;border-color:#685538;}
html[data-aph-theme=dark] :is(.product-card .stock-badge:not(.is-unavailable),.status.paid,.status.delivered,.admin-body .content-visibility.is-visible,.admin-body .payment-enabled.is-visible){background:#1d392f;color:#9fe3bc;}
html[data-aph-theme=dark] :is(.status.cancelled,.status.refund_recorded,.admin-body .content-visibility.is-hidden,.admin-body .payment-enabled.is-hidden){background:#34303b;color:#d4cbdc;}
html[data-aph-theme=dark] .product-info .selected-package .package-availability{color:#9fe3bc;}
html[data-aph-theme=dark] .warranty-label{background:var(--night-raised);color:#ffabbf;}
html[data-aph-theme=dark] .warranty-label.with-warranty{color:#9fe3bc;}

/* Categories, search and floating navigation. */
html[data-aph-theme=dark] :is(.collection-strip a.glass-nav-button,.store-categories a.glass-nav-button){background:var(--night-panel);color:var(--night-ink);border-color:var(--night-border);box-shadow:none;}
html[data-aph-theme=dark] .collection-strip span{color:var(--night-muted)!important;border-color:var(--night-border);}
html[data-aph-theme=dark] :is(.collection-strip.glass-dock,.mobile-bottom.glass-dock){background:var(--night-panel);border-color:var(--night-border);box-shadow:0 4px 20px #0004;}
html[data-aph-theme=dark] .glass-dock>[data-dock-indicator]{background:var(--night-tint);border-color:#9a5873;box-shadow:none;}
html[data-aph-theme=dark] .glass-dock>.glass-nav-button{background:transparent;color:var(--night-muted);border-color:transparent;box-shadow:none;}
html[data-aph-theme=dark] .glass-dock>.glass-nav-button:hover{background:transparent;color:var(--night-accent);border-color:transparent;box-shadow:none;}
html[data-aph-theme=dark] :is(.glass-dock>.glass-nav-button.is-dock-active,.mobile-bottom a.is-active,.mobile-bottom a:last-child){color:var(--night-accent);}
html[data-aph-theme=dark] .description-content li::marker{color:var(--night-accent);}
html[data-aph-theme=dark] .search-suggestions-all{border-color:var(--night-border);}

html[data-aph-theme=dark] .admin-login-card .admin-brand img:is([src$="logo-transparent.png"],[src$="logo-header.webp"]){filter:url(#aph-logo-on-dark);}

/* Only the fallback HTML banner changes palette; uploaded artwork has no filters. */
html[data-aph-theme=dark] :is(.banner-slider,.banner-track .banner-slide>img){background:#16171c;border-color:var(--night-border);box-shadow:none;}
html[data-aph-theme=dark] :is(.signature-hero,.signature-support){background:radial-gradient(ellipse at 95% 0%,#55334455,transparent 65%),linear-gradient(130deg,#1d1e24,#28212b);color:var(--night-ink);}
html[data-aph-theme=dark] .signature-copy h1{color:var(--night-ink);}
html[data-aph-theme=dark] :is(.signature-copy h1 em,.signature-wordmark strong,.signature-support .signature-wordmark strong){color:var(--night-accent);}
html[data-aph-theme=dark] :is(.signature-copy p,.signature-kicker,.signature-wordmark>span){color:var(--night-muted);}
html[data-aph-theme=dark] .signature-tags span{background:var(--night-raised);color:var(--night-muted);border-color:var(--night-border);box-shadow:none;}
html[data-aph-theme=dark] :is(.review-grid figure,.sales-proof-card>.sales-proof-image){background:var(--night-panel);border-color:var(--night-border);box-shadow:none;}
