/* ================================================
   Gündüz / Gece modu — BayiGram (data-theme="dark")
   style.css sonrası yüklenir
   ================================================ */

[data-theme="dark"] {
  color-scheme: dark;
}

/* —— Tema anahtarı butonu (üst çubuk / header) —— */
.sp-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.sp-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.24);
}
.sp-theme-toggle:active {
  transform: scale(0.96);
}
.sp-theme-toggle .sp-theme-icon-dark,
.sp-theme-toggle .sp-theme-icon-light {
  font-size: 13px;
  line-height: 1;
}
.sp-theme-toggle .sp-theme-icon-light {
  display: none;
}
[data-theme="dark"] .sp-theme-toggle .sp-theme-icon-dark {
  display: none;
}
[data-theme="dark"] .sp-theme-toggle .sp-theme-icon-light {
  display: inline-block;
}

/* Header içindeki toggle (açık zemin) */
#sp-header .sp-theme-toggle {
  background: rgba(61, 90, 241, 0.1);
  color: var(--primary);
}
#sp-header .sp-theme-toggle:hover {
  background: rgba(61, 90, 241, 0.18);
}
[data-theme="dark"] #sp-header .sp-theme-toggle {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}
[data-theme="dark"] #sp-header .sp-theme-toggle:hover {
  background: rgba(148, 163, 184, 0.28);
}

/* —— Genel gövde ve tipografi —— */
[data-theme="dark"] body {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] {
  --text: #e2e8f0;
  --muted: #94a3b8;
  --services-bg: #1e293b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -1px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.22);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.45), 0 10px 10px -5px rgba(0, 0, 0, 0.28);
}

/* Üst ince bar */
[data-theme="dark"] #sp-topbar {
  background: #1e3a5f !important;
}

/* Mobil fırsat şeridi */
[data-theme="dark"] #sp-mobile-dealbar{
  --sp-head-bar-bg:#1e293b;
  --sp-head-bar-text:#cbd5e1;
  background:#303d73!important;
}
[data-theme="dark"] .sp-mdeals-ticker{background:transparent!important;}
[data-theme="dark"] .sp-order-strip{background:#303d73!important;}
[data-theme="dark"] .sp-order-strip__overlay{background:rgba(255,255,255,.1)!important;}
[data-theme="dark"] .sp-mdeals-tabs,
[data-theme="dark"] .sp-mdeals-tabs--desktop{
  background:var(--sp-head-bar-bg)!important;
  border-top-color:rgba(148,163,184,.25)!important;
}
[data-theme="dark"] .sp-mdeals-tab{
  color:var(--sp-head-bar-text)!important;
}
[data-theme="dark"] .sp-mdeals-tab:hover{
  color:#e2e8f0!important;
}
[data-theme="dark"] #sp-mobile-dealbar .sp-mdeals-tabs--mobile{
  background:#1e293b!important;
  border-top-color:#334155!important;
}
[data-theme="dark"] .sp-mdeals-tab-rule{
  background:rgba(148,163,184,.28)!important;
}
[data-theme="dark"] .sp-mdeals-tab--accent{
  color:#93c5fd!important;
}
[data-theme="dark"] .sp-mdeals-mail{
  color:#cbd5e1!important;
}
[data-theme="dark"] .sp-mdeals-ico-plain--wa,
[data-theme="dark"] .sp-mdeals-ico-plain--tg{color:#5f6376!important;}
[data-theme="dark"] .sp-mdeals-linkpair__it{
  color:#94a3b8!important;
}
[data-theme="dark"] .sp-mdeals-linkpair__it:hover{
  color:#e2e8f0!important;
}
[data-theme="dark"] .sp-mdeals-linkpair__it--accent{
  color:#93c5fd!important;
}
[data-theme="dark"] .sp-mdeals-theme-sun,
[data-theme="dark"] .sp-mdeals-theme-moon{
  color:#64748b!important;
}

/* Ana header */
[data-theme="dark"] #sp-header {
  background: #1e293b !important;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] #sp-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .sp-nav ul li > a {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .sp-nav ul li > a:hover,
[data-theme="dark"] .sp-nav ul li.has-dropdown:hover > a {
  color: #93c5fd !important;
}

[data-theme="dark"] .sp-dropdown,
[data-theme="dark"] .sp-mega-menu {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: var(--shadow-xl) !important;
}
[data-theme="dark"] .sp-dropdown a,
[data-theme="dark"] .sp-mega-menu a {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .sp-dropdown a:hover {
  background: rgba(61, 90, 241, 0.15) !important;
}

[data-theme="dark"] .sp-mega-pcard {
  background: #0f172a !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .sp-mega-sosyal-head,
[data-theme="dark"] .sp-mega-ufbar {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .sp-drawer {
  background: #1e293b !important;
}
[data-theme="dark"] .sp-drawer-link {
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .sp-drawer-link:hover {
  background: #334155 !important;
  color: #fff !important;
}

[data-theme="dark"] .sp-icon-btn {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .sp-hdr-bell {
  color: #cbd5e1 !important;
}

/* Hero / ana bölümler */
[data-theme="dark"] #sp-hero,
[data-theme="dark"] section[class*="sp-"],
[data-theme="dark"] .sp-section {
  background-color: #0f172a !important;
}

[data-theme="dark"] #sp-why {
  background: #0f172a !important;
}
[data-theme="dark"] .sp-why-card,
[data-theme="dark"] .sp-pkg-card,
[data-theme="dark"] .sp-blog-card,
[data-theme="dark"] .sp-card,
[data-theme="dark"] .sp-faq-item,
[data-theme="dark"] .sp-auth-card,
[data-theme="dark"] .sp-auth-field,
[data-theme="dark"] .sp-auth-phone-row,
[data-theme="dark"] .sp-auth-feat {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .sp-pkg-card .sp-pkg-name,
[data-theme="dark"] .sp-pkg-card .sp-pkg-desc,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #f1f5f9 !important;
}
[data-theme="dark"] .sp-pkg-features li,
[data-theme="dark"] p,
[data-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}

[data-theme="dark"] #sp-statsbar {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%) !important;
}
[data-theme="dark"] .sp-stat-item span {
  color: #94a3b8 !important;
}
[data-theme="dark"] .sp-stat-item strong {
  color: #f1f5f9 !important;
}

[data-theme="dark"] #sp-article-content {
  background: #0f172a !important;
}
[data-theme="dark"] #sp-article-content .container,
[data-theme="dark"] .sp-article-inner {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .sp-footer-top,
[data-theme="dark"] footer,
[data-theme="dark"] #sp-footer {
  background: #020617 !important;
}

[data-theme="dark"] .sp-sorgu-result {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
  color: #94a3b8 !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(61, 90, 241, 0.25) !important;
}

[data-theme="dark"] .table {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .table thead th {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .table td {
  border-color: #334155 !important;
}

[data-theme="dark"] #sp-mobile-bottomnav {
  background: #1e293b !important;
  border-top-color: #334155 !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .sp-mbn-link {
  color: #94a3b8 !important;
}
[data-theme="dark"] .sp-mbn-link:hover {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .sp-mbn-item-label {
  color: inherit !important;
}

[data-theme="dark"] .modal-content {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .modal-header {
  border-bottom-color: #334155 !important;
}
[data-theme="dark"] .modal-footer {
  border-top-color: #334155 !important;
}

[data-theme="dark"] .alert {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .list-group-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

/* Bootstrap yardımcıları */
[data-theme="dark"] .bg-white {
  background-color: #1e293b !important;
}
[data-theme="dark"] .bg-light {
  background-color: #0f172a !important;
}
[data-theme="dark"] .border,
[data-theme="dark"] .border-bottom {
  border-color: #334155 !important;
}
[data-theme="dark"] .text-dark {
  color: #e2e8f0 !important;
}

/* ================================================
   Yönetim paneli (AdminLTE)
   ================================================ */
html[data-theme="dark"] body.layout-fixed .wrapper .content-wrapper {
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .main-header.navbar-light {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
}
html[data-theme="dark"] .main-header .nav-link {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .main-header .navbar-nav .nav-link:hover {
  color: #fff !important;
}

html[data-theme="dark"] .main-sidebar {
  background: #020617 !important;
}
html[data-theme="dark"] .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
html[data-theme="dark"] .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
  color: #fff !important;
}

html[data-theme="dark"] .card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .card-header {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .table th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .table td {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .form-control {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .modal-content {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .dropdown-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .dropdown-item {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .dropdown-item:hover {
  background: #334155 !important;
  color: #fff !important;
}

html[data-theme="dark"] .main-footer,
html[data-theme="dark"] .sp-admin-footer {
  background: #020617 !important;
  border-top-color: #334155 !important;
  color: #94a3b8 !important;
}

html[data-theme="dark"] .sp-admin-nav-icon-btn:hover {
  background: rgba(61, 90, 241, 0.15) !important;
}

html[data-theme="dark"] .sp-admin-order-notify-hd {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  border-bottom-color: #334155 !important;
}
html[data-theme="dark"] .sp-admin-order-notify-hd-title {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .sp-order-notify-item {
  border-bottom-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .sp-order-notify-item:hover {
  background: #0f172a !important;
}

html[data-theme="dark"] .sp-admin-toast {
  background: #1e293b !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
  border: 1px solid #334155 !important;
}
html[data-theme="dark"] .sp-admin-toast__body {
  color: #e2e8f0 !important;
}

/* Admin üst çubuk tema düğmesi */
html[data-theme="dark"] .main-header .sp-theme-toggle {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #e2e8f0 !important;
}
