/* Tibile Dark Theme (v530) — پوشش کامل سایت مشتری */

html[data-tibile-theme="dark"]{
  --primary:#5b9bff;--primary-2:#3f7fe6;--accent:#38bdf8;
  --bg:#0b0f17;--surface:#141b26;--surface-2:#0f1520;--text:#e7edf5;--muted:#93a1b6;
  --border:#26303f;--border-strong:#33404f;--success:#22c55e;--danger:#f87171;
  --shadow:0 8px 28px rgba(0,0,0,.45);--shadow-lg:0 18px 55px rgba(0,0,0,.55);
}

/* پایه */
html[data-tibile-theme="dark"] body{background:var(--bg);color:var(--text)}
html[data-tibile-theme="dark"] ::selection{background:#1d3a63;color:#e7edf5}
html[data-tibile-theme="dark"] :focus-visible{outline-color:#3f7fe6}

/* دکمه‌ها */
html[data-tibile-theme="dark"] .btn-ghost{background:var(--surface);border-color:var(--border-strong);color:var(--text)}
html[data-tibile-theme="dark"] .btn-ghost:hover{background:var(--surface-2);border-color:#425065}
html[data-tibile-theme="dark"] .btn-secondary{background:#16233f;color:#8fb2ff;border-color:#233657}
html[data-tibile-theme="dark"] .btn-secondary:hover{background:#1b2c4d}

/* هدر و ناوبری */
html[data-tibile-theme="dark"] .site-header{background:rgba(11,15,23,.86);border-bottom-color:rgba(38,48,63,.9)}
html[data-tibile-theme="dark"] .nav-links a{color:#9aa7ba}
html[data-tibile-theme="dark"] .nav-links a:hover,html[data-tibile-theme="dark"] .nav-links a.active{color:var(--text)}
html[data-tibile-theme="dark"] .burger{background:var(--surface);border-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .mobile-nav{background:var(--bg)}
html[data-tibile-theme="dark"] .mobile-nav a{border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .cart-link{background:var(--surface);border-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .cart-count{border-color:var(--bg)}
html[data-tibile-theme="dark"] .bottom-nav{background:rgba(11,15,23,.94);border-top-color:var(--border)}
html[data-tibile-theme="dark"] .bottom-nav a{color:#8996aa}
html[data-tibile-theme="dark"] .bottom-nav a.active,html[data-tibile-theme="dark"] .bottom-nav a:hover{color:var(--primary)}

/* هیرو صفحه اصلی */
html[data-tibile-theme="dark"] .hero{background:linear-gradient(180deg,var(--bg) 0%,var(--surface-2) 100%);border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .hero:before{background:rgba(91,155,255,.12)}
html[data-tibile-theme="dark"] .flight-line{stroke:#2c3f5c}
html[data-tibile-theme="dark"] .eyebrow{background:var(--surface);border-color:var(--border);color:var(--muted)}
html[data-tibile-theme="dark"] .hero p{color:var(--muted)}
html[data-tibile-theme="dark"] .hero-search{background:var(--surface);border-color:var(--border-strong)}
html[data-tibile-theme="dark"] .hero-search input,html[data-tibile-theme="dark"] .catalog-search input{color:var(--text)}
html[data-tibile-theme="dark"] .hero-search input::placeholder,html[data-tibile-theme="dark"] .catalog-search input::placeholder{color:#5f6d82}
html[data-tibile-theme="dark"] .hero-stats span{color:var(--muted)}
html[data-tibile-theme="dark"] .home-v22-atmosphere{background:linear-gradient(180deg,var(--surface-2) 0%,var(--bg) 58%,var(--surface-2) 100%);border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .home-v22-pill{background:rgba(20,27,38,.85);border-color:var(--border)}

/* دسته‌بندی‌ها */
html[data-tibile-theme="dark"] .cat-card{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .cat-card:hover{border-color:#3a5686}
html[data-tibile-theme="dark"] .cat-icon{background:rgba(91,155,255,.15)}

/* کارت محصول */
html[data-tibile-theme="dark"] .p-card,html[data-tibile-theme="dark"] .product-card{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .p-card:hover,html[data-tibile-theme="dark"] .product-card:hover{border-color:#3a5686}
html[data-tibile-theme="dark"] .p-thumb,html[data-tibile-theme="dark"] .p-thumb.has-cover{background:var(--surface-2)}
html[data-tibile-theme="dark"] .product-image-fallback{background:linear-gradient(135deg,rgba(91,155,255,.12),var(--surface-2))}
html[data-tibile-theme="dark"] .p-icon{background:var(--surface-2)}
html[data-tibile-theme="dark"] .p-badge.out{background:var(--surface-2);color:var(--muted)}
html[data-tibile-theme="dark"] .p-cat,html[data-tibile-theme="dark"] .p-desc,html[data-tibile-theme="dark"] .p-short{color:var(--muted)}
html[data-tibile-theme="dark"] .p-price{color:var(--text)}
html[data-tibile-theme="dark"] .p-price-old{color:#5f6d82}
html[data-tibile-theme="dark"] .wishlist-btn{background:var(--surface);color:var(--muted);border-color:var(--border)}
html[data-tibile-theme="dark"] .wishlist-btn.active{color:#ff8fa3;border-color:#4a2733;background:#2a1820}

/* کاتالوگ / فیلترها */
html[data-tibile-theme="dark"] .page-hero{background:var(--bg);border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .catalog-search{background:var(--surface);border-color:var(--border-strong)}
html[data-tibile-theme="dark"] .catalog-result,html[data-tibile-theme="dark"] .search-clear{color:var(--muted)}
html[data-tibile-theme="dark"] .chip{background:var(--surface);border-color:var(--border);color:var(--muted)}
html[data-tibile-theme="dark"] .chip:hover{border-color:#3a5686;color:var(--primary)}
html[data-tibile-theme="dark"] .chip.active{background:rgba(91,155,255,.15);border-color:#3a5686;color:#a9c8ff}
html[data-tibile-theme="dark"] .empty-state{background:var(--surface);border-color:var(--border-strong)}
html[data-tibile-theme="dark"] .empty-icon{background:rgba(91,155,255,.15)}
html[data-tibile-theme="dark"] .advanced-filters{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .advanced-filters label{color:var(--muted)}
html[data-tibile-theme="dark"] .advanced-filters input[type=number],html[data-tibile-theme="dark"] .advanced-filters select{background:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .search-suggest:not([hidden]){background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .search-suggest a:hover,html[data-tibile-theme="dark"] .search-suggest a:focus{background:var(--surface-2)}
html[data-tibile-theme="dark"] .search-suggest img,html[data-tibile-theme="dark"] .search-suggest .suggest-icon{background:var(--surface-2)}

/* صفحه محصول */
html[data-tibile-theme="dark"] .breadcrumb{color:var(--muted)}
html[data-tibile-theme="dark"] .pd-gallery-main{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .pd-icon{background:rgba(91,155,255,.15)}
html[data-tibile-theme="dark"] .pd-meta{color:var(--muted)}
html[data-tibile-theme="dark"] .pd-price-box{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .pd-price-old,html[data-tibile-theme="dark"] .pd-price-note{color:var(--muted)}
html[data-tibile-theme="dark"] .pd-discount{background:#0f2a1c;color:#4ade80}
html[data-tibile-theme="dark"] .pd-features li{color:#aeb8c7}
html[data-tibile-theme="dark"] .pd-desc{color:#aeb8c7}
html[data-tibile-theme="dark"] .pd-note{color:var(--muted)}

/* چرا ما / مراحل / سوالات متداول / بلاگ */
html[data-tibile-theme="dark"] .why-card,html[data-tibile-theme="dark"] .step{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .why-icon{background:rgba(91,155,255,.15)}
html[data-tibile-theme="dark"] .faq-item{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .faq-q{background:var(--surface);color:var(--text)}
html[data-tibile-theme="dark"] .faq-q svg{color:var(--muted)}
html[data-tibile-theme="dark"] .blog-card{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .blog-thumb{background:linear-gradient(135deg,rgba(91,155,255,.12),var(--surface-2))}
html[data-tibile-theme="dark"] .cta-band{background:linear-gradient(135deg,rgba(91,155,255,.10),var(--surface));border-color:var(--border)}

/* فوتر */
html[data-tibile-theme="dark"] footer{background:var(--bg);border-top-color:var(--border)}
html[data-tibile-theme="dark"] .footer-grid li a,html[data-tibile-theme="dark"] .footer-brand p{color:var(--muted)}
html[data-tibile-theme="dark"] .footer-bottom{color:#5f6d82;border-top-color:var(--border)}

/* سبد خرید و پرداخت */
html[data-tibile-theme="dark"] .cart-list,html[data-tibile-theme="dark"] .checkout-summary,html[data-tibile-theme="dark"] .checkout-form{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .cart-item{border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .cart-item-img{background:var(--surface-2)}
html[data-tibile-theme="dark"] .cart-item-info p{color:var(--muted)}
html[data-tibile-theme="dark"] .cart-qty button{background:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .cart-remove{color:var(--muted)}
html[data-tibile-theme="dark"] .cart-summary-row{color:var(--muted)}
html[data-tibile-theme="dark"] .cart-summary-row.total{border-top-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .checkout-form input,html[data-tibile-theme="dark"] .checkout-form textarea{background:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .checkout-form input:focus,html[data-tibile-theme="dark"] .checkout-form textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(91,155,255,.15)}
html[data-tibile-theme="dark"] .form-message{background:#2a1516;color:#ff9b93}
html[data-tibile-theme="dark"] .form-message.success{background:#0f2a1c;color:#4ade80}
html[data-tibile-theme="dark"] .cart-loading,html[data-tibile-theme="dark"] .empty-cart{color:var(--muted)}
html[data-tibile-theme="dark"] .empty-cart h3{color:var(--text)}
html[data-tibile-theme="dark"] .checkout-success{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .checkout-success .success-icon{background:#0f2a1c;color:#4ade80}
html[data-tibile-theme="dark"] .checkout-success p{color:var(--muted)}
html[data-tibile-theme="dark"] .payment-result.error .success-icon{background:#2a1516;color:#ff6b6b}
html[data-tibile-theme="dark"] .inline-status select{background:var(--surface);border-color:var(--border);color:var(--text)}

/* حساب کاربری */
html[data-tibile-theme="dark"] .account-card,html[data-tibile-theme="dark"] .account-panel,html[data-tibile-theme="dark"] .account-sidebar,html[data-tibile-theme="dark"] .account-stats>div,html[data-tibile-theme="dark"] .wallet-hero{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .account-sidebar a{color:var(--muted)}
html[data-tibile-theme="dark"] .account-sidebar a.active,html[data-tibile-theme="dark"] .account-sidebar a:hover{background:rgba(91,155,255,.15);color:var(--primary)}
html[data-tibile-theme="dark"] .account-stats span,html[data-tibile-theme="dark"] .account-order small,html[data-tibile-theme="dark"] .account-order-meta span,html[data-tibile-theme="dark"] .wallet-hero span,html[data-tibile-theme="dark"] .wallet-hero small{color:var(--muted)}
html[data-tibile-theme="dark"] .account-order{border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .status-badge{background:rgba(91,155,255,.15);color:#a9c8ff}
html[data-tibile-theme="dark"] .account-order-meta>div{background:var(--surface-2)}
html[data-tibile-theme="dark"] .account-table th,html[data-tibile-theme="dark"] .account-table td{border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .wallet-hero{background:linear-gradient(135deg,var(--surface),var(--surface-2))}
html[data-tibile-theme="dark"] .account-welcome{background:linear-gradient(135deg,var(--surface),var(--surface-2));border-color:var(--border)}
html[data-tibile-theme="dark"] .account-tier{background:rgba(91,155,255,.15)}
html[data-tibile-theme="dark"] .account-tier span{color:var(--muted)}
html[data-tibile-theme="dark"] .account-quick-grid a{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .account-quick-grid span{color:var(--muted)}
html[data-tibile-theme="dark"] .tx-minus{color:#ff8a80}
html[data-tibile-theme="dark"] .tx-plus{color:#4ade80}
html[data-tibile-theme="dark"] .wallet-tx{border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .notification-item{border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .notification-item.unread{background:rgba(91,155,255,.10)}
html[data-tibile-theme="dark"] .notification-item p{color:#aeb8c7}
html[data-tibile-theme="dark"] .notification-item small{color:var(--muted)}
html[data-tibile-theme="dark"] .form-success{background:#0f2a1c;color:#4ade80;border-color:#1e4430}

/* پشتیبانی / چت / تیکت */
html[data-tibile-theme="dark"] .ticket-message{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .ticket-message.from-user{border-right-color:var(--border-strong)}
html[data-tibile-theme="dark"] .ticket-message-head small{color:var(--muted)}

/* نظرات و امتیازها */
html[data-tibile-theme="dark"] .review-item{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .review-item small{color:var(--muted)}
html[data-tibile-theme="dark"] .review-form{background:var(--surface-2);border-color:var(--border)}
html[data-tibile-theme="dark"] .review-form input,html[data-tibile-theme="dark"] .review-form textarea,html[data-tibile-theme="dark"] .review-form select{background:var(--surface);border-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .review-note{background:var(--surface-2);color:var(--muted)}

/* باشگاه مشتریان */
html[data-tibile-theme="dark"] .loyalty-hero{background:linear-gradient(135deg,var(--surface),var(--surface-2));border-color:var(--border)}
html[data-tibile-theme="dark"] .loyalty-hero small{color:var(--muted)}
html[data-tibile-theme="dark"] .loyalty-progress{background:var(--border)}

/* پرداخت متصل به حساب */
html[data-tibile-theme="dark"] .checkout-user-banner,html[data-tibile-theme="dark"] .checkout-login-hint{background:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-tibile-theme="dark"] .checkout-user-banner span{color:var(--muted)}
html[data-tibile-theme="dark"] .checkout-wallet-card{background:linear-gradient(135deg,var(--surface),var(--surface-2));border-color:var(--border)}
html[data-tibile-theme="dark"] .checkout-wallet-card span,html[data-tibile-theme="dark"] .checkout-wallet-card small{color:var(--muted)}

/* نوار تخفیف/شمارش معکوس */
html[data-tibile-theme="dark"] .campaign-countdown{background:var(--surface-2);border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .v40-urgency{background:var(--surface-2);border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .v230-langbar{background:var(--surface-2);border-bottom-color:var(--border)}
html[data-tibile-theme="dark"] .v230-hero{background:linear-gradient(135deg,var(--surface-2),var(--bg) 55%,var(--surface-2))}
html[data-tibile-theme="dark"] .v230-kicker{background:var(--surface);border-color:var(--border)}
html[data-tibile-theme="dark"] .v230-hero p,html[data-tibile-theme="dark"] .v230-breadcrumb,html[data-tibile-theme="dark"] .v230-lead{color:var(--muted)}
html[data-tibile-theme="dark"] .v230-home{background:var(--bg)}

/* دکمه تغییر تم */
.tibile-theme-toggle{position:fixed;left:16px;bottom:16px;z-index:9999;border:1px solid var(--border-strong,#cbd5e1);border-radius:999px;background:var(--surface,#fff);color:var(--text,#172033);padding:10px 13px;cursor:pointer;box-shadow:0 6px 20px rgba(20,35,65,.12);font-size:16px;line-height:1;transition:.18s ease}
.tibile-theme-toggle:hover{transform:translateY(-2px)}
html[data-tibile-theme="dark"] .tibile-theme-toggle{background:var(--surface);color:var(--text);border-color:var(--border-strong);box-shadow:0 6px 20px rgba(0,0,0,.4)}
@media(max-width:760px){.tibile-theme-toggle{bottom:78px}}
