/* Controle compartilhado de tema */
[data-theme-toggle]{position:relative;display:inline-grid;place-items:center;flex:0 0 auto;width:42px;height:42px;padding:0;border:1px solid var(--line,#dedfd9);border-radius:50%;background:var(--surface,var(--white,#fff));color:var(--ink,#111312);font:700 20px/1 system-ui;cursor:pointer;transition:transform .2s,border-color .2s,background .2s,color .2s}
[data-theme-toggle]:hover{transform:translateY(-2px);border-color:var(--red,var(--teal,#ef3434))}
[data-theme-toggle]:focus-visible{outline:3px solid rgba(239,52,52,.25);outline-offset:2px}
[data-theme-icon]{display:block;transform:translateY(-1px)}
.login-theme-toggle{position:absolute;right:18px;top:18px}.login-card{position:relative}
.return-theme-toggle{position:fixed;right:22px;top:22px;z-index:10}

html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0a100e;
  --cream:#0a100e;
  --surface:#121a18;
  --ink:#f3f6f4;
  --muted:#a3ada8;
  --line:#2d3935;
  --paper:#0a100e;
  --white:#121a18;
  --night:#070b0a;
  --night-2:#101715;
  --shadow:0 24px 70px rgba(0,0,0,.38);
}
html[data-theme="dark"] body{background-color:var(--bg);color:var(--ink)}
html[data-theme="dark"] img{color-scheme:normal}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:#0d1513!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#73807a}
html[data-theme="dark"] option{background:#101815;color:var(--ink)}

/* Loja */
html[data-theme="dark"] .header{background:rgba(10,16,14,.9);border-bottom-color:rgba(45,57,53,.85)}
html[data-theme="dark"] .header .brand__logo,
html[data-theme="dark"] .account-header .account-logo img{filter:drop-shadow(0 5px 12px rgba(0,0,0,.42))}
html[data-theme="dark"] .nav{color:#cbd4cf}
html[data-theme="dark"] .nav a:hover{color:#fff}
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .cart-button,
html[data-theme="dark"] .filter-pill,
html[data-theme="dark"] .catalog-toolbar select,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .trust-item,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .checkout__form,
html[data-theme="dark"] .checkout__summary,
html[data-theme="dark"] .payment-provider-card,
html[data-theme="dark"] .store-error{background-color:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .catalog-section,
html[data-theme="dark"] .promo-banners,
html[data-theme="dark"] .trust-strip{background:var(--bg)}
html[data-theme="dark"] .category-card:hover,
html[data-theme="dark"] .product-card:hover{border-color:#4b5b55;box-shadow:0 20px 55px rgba(0,0,0,.32)}
html[data-theme="dark"] .filter-pill.active{background:var(--ink);color:#0b110f}
html[data-theme="dark"] .drawer__header,
html[data-theme="dark"] .drawer__footer,
html[data-theme="dark"] .cart-item,
html[data-theme="dark"] .checkout-mini-item,
html[data-theme="dark"] .checkout__totals,
html[data-theme="dark"] .form-section{border-color:var(--line)}
html[data-theme="dark"] .product-card__media,
html[data-theme="dark"] .product-gallery__main,
html[data-theme="dark"] .product-gallery__thumbs button,
html[data-theme="dark"] .cart-item__image,
html[data-theme="dark"] .checkout-mini-item__img{background:#17201d}
html[data-theme="dark"] .close-button,
html[data-theme="dark"] .cart-item__qty button,
html[data-theme="dark"] .cep-search-button{background:#1b2622;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .search-suggestions button{background:#1b2622;color:#f3f6f4;border-color:#394640}
html[data-theme="dark"] .search-suggestions button:hover{background:#26342f;border-color:#65756e}
html[data-theme="dark"] .toast{background:#1b2622;color:#f3f6f4;border:1px solid #43514b;box-shadow:0 15px 35px rgba(0,0,0,.5)}
html[data-theme="dark"] .checkout__notice,
html[data-theme="dark"] .checkout__review-notice,
html[data-theme="dark"] .checkout-issue__message{background:#2c2412;color:#f4d995;border-color:#55441e}
html[data-theme="dark"] .product-import-box,
html[data-theme="dark"] .import-checkout-notice,
html[data-theme="dark"] .import-acceptance{background:#29220f;color:#f2d78d;border-color:#6a5621}
html[data-theme="dark"] .field input:disabled,
html[data-theme="dark"] .field input[readonly]{background:#18201d!important;color:#94a09b!important}
html[data-theme="dark"] .newsletter__form{background:#121a18;border-color:var(--line)}
html[data-theme="dark"] .newsletter__form input{background:transparent!important}
html[data-theme="dark"] .footer{border-top-color:#27322f}

/* Conta do cliente */
html[data-theme="dark"] .account-header{background:rgba(10,16,14,.92);border-bottom-color:var(--line)}
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .account-nav,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .loading-card,
html[data-theme="dark"] .empty-card,
html[data-theme="dark"] .address-card,
html[data-theme="dark"] .order-modal__card,
html[data-theme="dark"] .admin-account-card{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .auth-tabs{background:#0c1311}
html[data-theme="dark"] .auth-tabs button.active{background:#202b27;color:var(--ink)}
html[data-theme="dark"] .account-nav button{color:#e1e7e3}
html[data-theme="dark"] .account-nav button.active{background:#d9ff67;color:#111312;box-shadow:0 8px 22px rgba(217,255,103,.12)}
html[data-theme="dark"] .account-favorite-count{background:#28332f;color:#dce4df}
html[data-theme="dark"] .account-nav button.active .account-favorite-count{background:#ef3434;color:#fff}
html[data-theme="dark"] .favorite-account-card{background:#121a18;border-color:var(--line)}
html[data-theme="dark"] .favorite-account-card__media{background:#0d1513}
html[data-theme="dark"] .favorite-account-card__info button{background:#18211e;color:#ff8e86;border-color:var(--line)}
html[data-theme="dark"] .password-row{border-color:var(--line)}
html[data-theme="dark"] .password-row button,
html[data-theme="dark"] .order-card button,
html[data-theme="dark"] .address-card__actions button,
html[data-theme="dark"] .outline-account-button,
html[data-theme="dark"] .address-cep-row button,
html[data-theme="dark"] .admin-account-card__actions a,
html[data-theme="dark"] .admin-account-card__actions button{background:#18211e;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .profile-card input[readonly]{background:#18201d!important;color:#93a09a!important}
html[data-theme="dark"] .order-item{background:#18211e}
html[data-theme="dark"] .detail-grid>div{border-color:var(--line)}
html[data-theme="dark"] .account-cancel-order{background:#241817;color:#efaaa3;border-color:#70433f}
html[data-theme="dark"] .account-cancel-order:hover{background:#321c1a}

/* Painel administrativo */
html[data-theme="dark"] .login-screen{background:radial-gradient(circle at 15% 20%,rgba(32,130,141,.2),transparent 34%),radial-gradient(circle at 85% 85%,rgba(155,112,30,.16),transparent 34%),#080d0c}
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .inventory-summary>div,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .content-publish-bar,
html[data-theme="dark"] .editor-card{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .topbar{background:rgba(14,22,19,.94)}
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .row-actions button,
html[data-theme="dark"] .repeat-actions button,
html[data-theme="dark"] .banner-editor__actions button,
html[data-theme="dark"] .revision-row button,
html[data-theme="dark"] .hero-image-upload>span{background:#18221f;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .table-card th{background:#0d1513;color:var(--muted);border-color:var(--line)}
html[data-theme="dark"] .table-card td,
html[data-theme="dark"] .recent-order,
html[data-theme="dark"] .low-stock-row{border-color:var(--line)}
html[data-theme="dark"] .upload-field,
html[data-theme="dark"] .repeat-row,
html[data-theme="dark"] .banner-editor,
html[data-theme="dark"] .empty-editor,
html[data-theme="dark"] .hero-image-editor,
html[data-theme="dark"] .customer-card,
html[data-theme="dark"] .order-summary-grid>div,
html[data-theme="dark"] .stock-product-name{background:#0e1714;border-color:var(--line)}
html[data-theme="dark"] .banner-editor__media,
html[data-theme="dark"] .hero-image-editor__preview,
html[data-theme="dark"] .image-preview{background:#18231f;border-color:var(--line)}
html[data-theme="dark"] .detail-box p{color:#bbc5c0}
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .menu-toggle{background:#1c2723;color:var(--ink)}

/* Retorno do pagamento */
html[data-theme="dark"] body:has(.return-card){background:radial-gradient(circle at 20% 10%,#10271c,transparent 34%),#080e0c}
html[data-theme="dark"] .return-card{background:var(--surface);border-color:var(--line);box-shadow:0 28px 80px rgba(0,0,0,.4)}
html[data-theme="dark"] .return-card .brand img{filter:drop-shadow(0 5px 12px rgba(0,0,0,.42))}
html[data-theme="dark"] .order-box{background:#0d1513}
html[data-theme="dark"] .notice{background:#29220f;color:#f1d894;border-color:#615022}
html[data-theme="dark"] .actions a:not(.primary){color:var(--ink);border-color:var(--line)}

/* Realce consistente para todos os controles clicáveis */
button:not(:disabled),
a[class*="button"],
.sidebar-bottom a,
.actions a{
  transition-property:transform,filter,box-shadow,background-color,border-color,color;
  transition-duration:.18s;
  transition-timing-function:ease;
}
@media(hover:hover){
  button:not(:disabled):hover,
  a[class*="button"]:hover,
  .sidebar-bottom a:hover,
  .actions a:hover{
    filter:brightness(1.1);
    box-shadow:0 0 0 2px rgba(239,52,52,.5),0 10px 26px rgba(16,20,18,.2);
  }
  html[data-theme="dark"] button:not(:disabled):hover,
  html[data-theme="dark"] a[class*="button"]:hover,
  html[data-theme="dark"] .sidebar-bottom a:hover,
  html[data-theme="dark"] .actions a:hover{
    filter:brightness(1.16);
    box-shadow:0 0 0 2px rgba(217,255,103,.72),0 12px 30px rgba(0,0,0,.42);
  }
}
button:focus-visible,
a[class*="button"]:focus-visible,
.sidebar-bottom a:focus-visible,
.actions a:focus-visible{outline:3px solid rgba(239,52,52,.55);outline-offset:3px}
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a[class*="button"]:focus-visible,
html[data-theme="dark"] .sidebar-bottom a:focus-visible,
html[data-theme="dark"] .actions a:focus-visible{outline-color:rgba(217,255,103,.78)}

@media(max-width:580px){
  [data-theme-toggle]{width:39px;height:39px;font-size:18px}
  .return-theme-toggle{right:12px;top:12px}
}
@media(max-width:520px){
  .header__inner{gap:8px}
  .header .brand__logo{width:42px;height:auto}
}
@media(max-width:420px){
  .header__inner{gap:6px}
  .header__actions{gap:4px}
  .header .brand__logo{width:38px;height:auto}
  .header .account-button,
  .header [data-theme-toggle]{width:36px;height:36px}
  .header .cart-button{height:38px;padding:0 8px;gap:5px}
  .header .mobile-menu{padding:5px}
}

/* Ajustes de contraste para componentes que usam --ink como texto e fundo */
html[data-theme="dark"] .newsletter{background:#101715;color:#f3f6f4}
html[data-theme="dark"] .newsletter h2{color:#f3f6f4}
html[data-theme="dark"] .newsletter p{color:#aeb8b3}
html[data-theme="dark"] .newsletter__form{background:#18221f;box-shadow:0 14px 34px rgba(0,0,0,.28)}
html[data-theme="dark"] .newsletter__form input{color:#f3f6f4!important}
html[data-theme="dark"] .newsletter__form .button--dark{background:var(--red);color:#fff}
html[data-theme="dark"] .button--light{background:#fff;color:#111312}
html[data-theme="dark"] .button--dark{background:#1b2622;color:#f3f6f4;border:1px solid #43514b}
html[data-theme="dark"] .button--outline{background:#17211e;color:#f3f6f4;border-color:#394640}
html[data-theme="dark"] .hero__badge{color:#111312}
html[data-theme="dark"] .add-button{background:var(--red);color:#fff}
html[data-theme="dark"] .add-button:hover{background:#ff4b4b}
html[data-theme="dark"] .favorite-button{background:#f4f5f1;color:#26312e}
html[data-theme="dark"] .favorite-button.active{color:var(--red)}
html[data-theme="dark"] .product-badge:not(.product-badge--gold):not(.product-badge--red){background:#27312e;color:#fff}
html[data-theme="dark"] .category-card--sealed{background:#171b1a;color:#fff}
html[data-theme="dark"] .category-card--single{background:#4d411d;color:#fff4c7}
html[data-theme="dark"] .category-card--graded{background:#302b4b;color:#eeeaff}
html[data-theme="dark"] .category-card--accessories{background:#183b34;color:#dcfff7}
html[data-theme="dark"] .category-card::after{background:rgba(255,255,255,.09)}
.category-card.category-card--with-image{
  background-image:linear-gradient(180deg,rgba(5,10,8,.16) 0%,rgba(5,10,8,.48) 48%,rgba(5,10,8,.9) 100%),var(--category-card-image)!important;
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.2)!important;
  text-shadow:0 2px 12px rgba(0,0,0,.72);
}
.category-card.category-card--with-image::after{display:none}
.category-card.category-card--with-image>.category-card__number,
.category-card.category-card--with-image>b{position:relative;z-index:2}
.category-card.category-card--with-image>b{position:absolute}

/* Produto aberto */
html[data-theme="dark"] .product-modal__media{background:#0d1513;border-right:1px solid var(--line)}
html[data-theme="dark"] .product-modal__info{background:#121a18}
html[data-theme="dark"] .product-details div{background:#18221f;border:1px solid var(--line)}
html[data-theme="dark"] .product-details strong{color:#f3f6f4}
html[data-theme="dark"] .product-modal__pix{color:#66d8a2}

/* Painel e login administrativo completos */
html[data-theme="dark"] .admin-app,
html[data-theme="dark"] .admin-main,
html[data-theme="dark"] .content{background:#0a100e}
html[data-theme="dark"] .sidebar{background:#081310;border-right:1px solid #25332e}
html[data-theme="dark"] .sidebar nav button:hover,
html[data-theme="dark"] .sidebar nav button.active,
html[data-theme="dark"] .sidebar-bottom a:hover,
html[data-theme="dark"] .sidebar-bottom button:hover{background:#18302a}
html[data-theme="dark"] .login-card{background:rgba(18,26,24,.98);border-color:#35433e;box-shadow:0 28px 90px rgba(0,0,0,.5)}
html[data-theme="dark"] .login-card .secondary.full{background:#18221f;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .password-field button{background:#18221f;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .table-card tbody tr{background:#121a18}
html[data-theme="dark"] .table-card tbody tr:hover{background:#17231f}
html[data-theme="dark"] .status-pill.active,
html[data-theme="dark"] .status-pill.approved,
html[data-theme="dark"] .status-pill.completed,
html[data-theme="dark"] .status-pill.new{background:#173126;color:#7de0ae}
html[data-theme="dark"] .status-pill.pending,
html[data-theme="dark"] .status-pill.awaiting_payment{background:#3a3118;color:#f6db84}
html[data-theme="dark"] .status-pill.processing,
html[data-theme="dark"] .status-pill.paid{background:#172a3b;color:#9fc9ef}
html[data-theme="dark"] .status-pill.shipped{background:#272b4b;color:#c0c7ff}
html[data-theme="dark"] .status-pill.cancelled,
html[data-theme="dark"] .status-pill.out,
html[data-theme="dark"] .status-pill.expired,
html[data-theme="dark"] .status-pill.failed,
html[data-theme="dark"] .status-pill.refunded,
html[data-theme="dark"] .status-pill.reversed{background:#3a201e;color:#ffb3aa}
html[data-theme="dark"] .low-stock-row>b{background:#3a2419;color:#f4b184}
html[data-theme="dark"] .order-position{background:#16302c;color:#84d8d0}
html[data-theme="dark"] .row-actions .danger-action{background:#2f1b1a;color:#f0aaa3}
html[data-theme="dark"] .row-actions .success-action{background:#173126;color:#7de0ae}
html[data-theme="dark"] .import-order-fields{background:#2a2416;border-color:#66552b}
html[data-theme="dark"] .shipping-status{background:#151d1a;color:#c3cbc7;border-color:#34423d}
html[data-theme="dark"] .shipping-status.is-loading{background:#2c2412;color:#f4d995}
html[data-theme="dark"] .shipping-status.is-error{background:#321d1b;color:#ffb4aa}
html[data-theme="dark"] .shipping-status.is-success{background:#123022;color:#9de7bd}
