html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #65a6ff;
  --light: #142a3e;
  --gray: #adbed0;
  --text: #e3edf6;
  --shadow: 0 12px 34px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] body { color: var(--text); background: #0c1d2c; }
html[data-theme="dark"] .site-header { border-color: #263d52; background: rgba(12, 29, 44, .96); }
html[data-theme="dark"] .brand-name,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .service-card h2,
html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .feature-card h3,
html[data-theme="dark"] .article-card h3,
html[data-theme="dark"] .product-card-body h3,
html[data-theme="dark"] .product-price,
html[data-theme="dark"] .product-included-list strong,
html[data-theme="dark"] .service-benefit strong,
html[data-theme="dark"] .service-contact-card h2,
html[data-theme="dark"] .service-steps h3,
html[data-theme="dark"] .about-approach h3,
html[data-theme="dark"] .faq-item summary { color: #edf5fc; }
html[data-theme="dark"] .brand-tagline { color: #b4c5d5; }
html[data-theme="dark"] .nav-link { color: #dce7f1 !important; }
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active { color: #8ec2ff !important; background: #17344e; }
html[data-theme="dark"] .navbar-collapse { background: #0e2234; }
html[data-theme="dark"] .navbar-toggler-icon { border-color: #e1ebf4; }
html[data-theme="dark"] .navbar-toggler-icon::before { border-color: #e1ebf4; }
html[data-theme="dark"] .section-light { background: var(--light); }
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .future-card,
html[data-theme="dark"] .service-contact-card,
html[data-theme="dark"] .faq-item {
  border-color: #294157;
  background: #12283b;
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .product-filter-panel,
html[data-theme="dark"] .product-purchase-panel {
  border-color: #294157;
  background: #12283b;
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .portfolio-filter,
html[data-theme="dark"] .project-context-panel,
html[data-theme="dark"] .project-technology-list li,
html[data-theme="dark"] .blog-filter,
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .blog-toc {
  border-color: #294157;
  background: #12283b;
}
html[data-theme="dark"] .project-card-body { border-color: #294157; }
html[data-theme="dark"] .project-category {
  border-color: #35516b;
  color: #c5d7e8;
  background: #1a344b;
}
html[data-theme="dark"] .portfolio-filter label,
html[data-theme="dark"] .project-card-body h3,
html[data-theme="dark"] .project-context-panel h2,
html[data-theme="dark"] .project-feature h3,
html[data-theme="dark"] .project-technology-list li,
html[data-theme="dark"] .blog-filter label,
html[data-theme="dark"] .blog-card-body h2,
html[data-theme="dark"] .blog-card-body h3,
html[data-theme="dark"] .blog-toc h2,
html[data-theme="dark"] .blog-share strong,
html[data-theme="dark"] .blog-table th { color: #edf5fc; }
html[data-theme="dark"] .portfolio-filter .form-select {
  border-color: #38536c;
  color: #e3edf6;
  background-color: #0e2234;
}
html[data-theme="dark"] .project-detail-cover,
html[data-theme="dark"] .project-gallery-item { border-color: #294157; background-color: #0e2234; }
html[data-theme="dark"] .project-feature { border-color: #294157; }
html[data-theme="dark"] .blog-card-footer,
html[data-theme="dark"] .blog-share,
html[data-theme="dark"] .blog-table-wrap { border-color: #294157; }
html[data-theme="dark"] .blog-category,
html[data-theme="dark"] .blog-tag-list li {
  border-color: #35516b;
  color: #c5d7e8;
  background: #1a344b;
}
html[data-theme="dark"] .blog-filter .form-control,
html[data-theme="dark"] .blog-filter .form-select,
html[data-theme="dark"] .blog-filter .input-group-text {
  border-color: #38536c;
  color: #e3edf6;
  background: #0e2234;
}
html[data-theme="dark"] .blog-toc { background: #0e2234; }
html[data-theme="dark"] .blog-article-content h2,
html[data-theme="dark"] .blog-article-content h3,
html[data-theme="dark"] .blog-article-content h4 { color: #edf5fc; }
html[data-theme="dark"] .blog-article-content code { color: #91e5f2; background: #173a4a; }
html[data-theme="dark"] .blog-table th { background: #1a344b; }
html[data-theme="dark"] .blog-share a { border-color: #38536c; }
html[data-theme="dark"] .blog-pagination .page-link {
  border-color: #38536c;
  color: #dce7f1;
  background: #12283b;
}
html[data-theme="dark"] .blog-pagination .page-item.active .page-link {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}
html[data-theme="dark"] .blog-pagination .page-item.disabled .page-link {
  color: #71869a;
  background: #0e2234;
}
html[data-theme="dark"] .product-count,
html[data-theme="dark"] .product-category {
  border-color: #35516b;
  color: #c5d7e8;
  background: #1a344b;
}
html[data-theme="dark"] .product-card-footer,
html[data-theme="dark"] .product-included-list li { border-color: #294157; }
html[data-theme="dark"] .product-filter-panel label { color: #e3edf6; }
html[data-theme="dark"] .product-filter-panel .form-control,
html[data-theme="dark"] .product-filter-panel .form-select,
html[data-theme="dark"] .product-filter-panel .input-group-text {
  border-color: #38536c;
  color: #e3edf6;
  background: #0e2234;
}
html[data-theme="dark"] .product-filter-panel .form-control::placeholder { color: #91a8bd; }
html[data-theme="dark"] .product-detail-visual { border-color: #294157; }
html[data-theme="dark"] .icon-box { color: #80b8ff; background: linear-gradient(135deg, #1a3550, #173946); }
html[data-theme="dark"] .service-card .service-benefit { border-color: #294157; }
html[data-theme="dark"] .about-approach li { border-color: #294157; }
html[data-theme="dark"] .page-hero { background-color: #102a43; }
html[data-theme="dark"] .back-to-top { color: #fff; }

.theme-toggle {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #d5e0ea;
  border-radius: 12px;
  color: var(--navy);
  background: transparent;
  font-size: 1.12rem;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); background: #eef5ff; }
html[data-theme="dark"] .theme-toggle { border-color: #38536c; color: #f8d477; }
html[data-theme="dark"] .theme-toggle:hover { border-color: #f8d477; background: #1d3448; }

@media (max-width: 991.98px) {
  .nav-actions { flex-direction: row; }
  .nav-actions .theme-toggle { width: 46px; }
  .nav-actions .btn { flex: 1; }
}
