/* ── Global Dark Mode ─ html.dark VEYA body.dark ile aktif ── */

html.dark, html.dark body, body.dark {
  background: #1c1c1e !important;
  color: #e5e5e7 !important;
}

/* Üst bar / Brand */
html.dark .top-bar,
html.dark .order-header,
html.dark .header,
html.dark header,
body.dark .top-bar,
body.dark .order-header,
body.dark .header,
body.dark header { background: #2c2c2e !important; color: #f5f5f7 !important; border-bottom-color: #38383a !important; }

/* Genel metin */
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6,
body.dark h1, body.dark h2, body.dark h3, body.dark h4, body.dark h5, body.dark h6 { color: #f5f5f7 !important; }
html.dark p, html.dark span, html.dark div, html.dark label, html.dark li,
body.dark p, body.dark span, body.dark div, body.dark label, body.dark li { color: inherit; }
html.dark .text-muted, html.dark small,
body.dark .text-muted, body.dark small { color: #98989d !important; }
html.dark a, body.dark a { color: #60a5fa !important; }
html.dark a:hover, body.dark a:hover { color: #93c5fd !important; }

/* Form */
html.dark .form-control, html.dark .form-select,
html.dark input, html.dark textarea, html.dark select,
body.dark .form-control, body.dark .form-select,
body.dark input, body.dark textarea, body.dark select {
  background: #2c2c2e !important;
  color: #e5e5e7 !important;
  border-color: #38383a !important;
}
html.dark .form-control:focus, body.dark .form-control:focus,
html.dark .form-select:focus, body.dark .form-select:focus,
html.dark input:focus, body.dark input:focus,
html.dark textarea:focus, body.dark textarea:focus,
html.dark select:focus, body.dark select:focus {
  background: #2c2c2e !important;
  border-color: #6e6e73 !important;
  box-shadow: 0 0 0 3px rgba(110,110,115,.18) !important;
}
html.dark ::placeholder, body.dark ::placeholder { color: #6e6e73 !important; }
html.dark .form-label, body.dark .form-label { color: #e5e5e7 !important; }
html.dark .input-group-text, body.dark .input-group-text {
  background: #3a3a3c !important;
  color: #d1d5db !important;
  border-color: #38383a !important;
}

/* Kartlar / Modal */
html.dark .card, html.dark .modal-content, html.dark .sf-card, html.dark .o-card, html.dark .panel, html.dark .box, html.dark .item, html.dark .summary,
body.dark .card, body.dark .modal-content, body.dark .sf-card, body.dark .o-card, body.dark .panel, body.dark .box, body.dark .item, body.dark .summary {
  background: #2c2c2e !important;
  color: #e5e5e7 !important;
  border-color: #38383a !important;
}
html.dark .sf-card-header, html.dark .o-card-header, html.dark .card-header, html.dark .modal-header,
body.dark .sf-card-header, body.dark .o-card-header, body.dark .card-header, body.dark .modal-header {
  background: #232325 !important; color: #f5f5f7 !important; border-bottom-color: #38383a !important;
}
html.dark .card-footer, html.dark .modal-footer,
body.dark .card-footer, body.dark .modal-footer { background: #232325 !important; border-top-color: #38383a !important; }

/* Bootstrap btn */
html.dark .btn-primary, body.dark .btn-primary { background: #48484a !important; border-color: #5a5a5d !important; color: #f5f5f7 !important; }
html.dark .btn-primary:hover, body.dark .btn-primary:hover { background: #5a5a5d !important; }
html.dark .btn-success, body.dark .btn-success { background: #3a4a3f !important; border-color: #4a5a4f !important; color: #f5f5f7 !important; }
html.dark .btn-danger, body.dark .btn-danger { background: #4a3a3a !important; border-color: #5a4a4a !important; color: #fca5a5 !important; }
html.dark .btn-secondary, body.dark .btn-secondary { background: #3a3a3c !important; border-color: #48484a !important; color: #e5e5e7 !important; }
html.dark .btn-outline-secondary, body.dark .btn-outline-secondary { color: #e5e5e7 !important; border-color: #38383a !important; }
html.dark .btn-outline-secondary:hover, body.dark .btn-outline-secondary:hover { background: #3a3a3c !important; color: #f5f5f7 !important; }
html.dark .btn-outline-primary, body.dark .btn-outline-primary { color: #60a5fa !important; border-color: #1e3a5f !important; }
html.dark .btn-outline-dark, body.dark .btn-outline-dark { color: #e5e5e7 !important; border-color: #38383a !important; }
html.dark .btn-light, body.dark .btn-light { background: #3a3a3c !important; color: #e5e5e7 !important; border-color: #38383a !important; }
html.dark .btn-close, body.dark .btn-close { filter: invert(1); }

/* Bootstrap utility renkleri */
html.dark .bg-light, html.dark .table-light, html.dark .bg-white,
body.dark .bg-light, body.dark .table-light, body.dark .bg-white { background: #2c2c2e !important; color: #e5e5e7 !important; }
html.dark .bg-secondary, body.dark .bg-secondary { background: #3a3a3c !important; color: #e5e5e7 !important; }
html.dark .bg-success, html.dark .bg-warning, html.dark .bg-danger, html.dark .bg-info, html.dark .bg-primary,
body.dark .bg-success, body.dark .bg-warning, body.dark .bg-danger, body.dark .bg-info, body.dark .bg-primary { background: #3a3a3c !important; color: #d1d5db !important; }
html.dark .badge.bg-light, html.dark .badge.bg-success, html.dark .badge.bg-warning, html.dark .badge.bg-danger, html.dark .badge.bg-info, html.dark .badge.bg-primary, html.dark .badge.bg-secondary,
body.dark .badge.bg-light, body.dark .badge.bg-success, body.dark .badge.bg-warning, body.dark .badge.bg-danger, body.dark .badge.bg-info, body.dark .badge.bg-primary, body.dark .badge.bg-secondary { background: #3a3a3c !important; color: #d1d5db !important; }
html.dark .badge.bg-dark, body.dark .badge.bg-dark { background: #48484a !important; color: #f5f5f7 !important; }

/* Tablolar (Bootstrap 5 --bs-table-* değişkenleri dahil) */
html.dark .table, body.dark .table {
  --bs-table-bg: #2c2c2e !important;
  --bs-table-color: #e5e5e7 !important;
  --bs-table-border-color: #38383a !important;
  --bs-table-striped-bg: #2a2a2c !important;
  --bs-table-striped-color: #e5e5e7 !important;
  --bs-table-hover-bg: #3a3a3c !important;
  --bs-table-hover-color: #f5f5f7 !important;
  --bs-table-active-bg: #3a3a3c !important;
  --bs-table-active-color: #f5f5f7 !important;
  background-color: #2c2c2e !important;
  color: #e5e5e7 !important;
}
html.dark .table > :not(caption) > * > *,
body.dark .table > :not(caption) > * > * {
  background-color: var(--bs-table-bg) !important;
  color: var(--bs-table-color) !important;
  border-bottom-color: #38383a !important;
  box-shadow: none !important;
}
html.dark .table > thead.table-light > tr > th,
html.dark .table-light > th, html.dark .table-light > td,
body.dark .table > thead.table-light > tr > th,
body.dark .table-light > th, body.dark .table-light > td {
  background-color: #232325 !important;
  color: #98989d !important;
  border-bottom-color: #38383a !important;
}
html.dark .table tbody tr:hover > *, body.dark .table tbody tr:hover > * { background-color: #3a3a3c !important; }
html.dark .table tbody tr:nth-child(even) > *, body.dark .table tbody tr:nth-child(even) > * { background-color: #2a2a2c !important; }
html.dark .table-responsive, body.dark .table-responsive { background-color: #2c2c2e !important; }

/* Alert */
html.dark .alert, body.dark .alert { background: #2c2c2e !important; color: #e5e5e7 !important; border-color: #38383a !important; }
html.dark .alert-danger, body.dark .alert-danger { background: #3a1f1f !important; color: #fca5a5 !important; border-color: #5a2d2d !important; }
html.dark .alert-success, body.dark .alert-success { background: #1f3a2a !important; color: #86efac !important; border-color: #2d5a3f !important; }
html.dark .alert-warning, body.dark .alert-warning { background: #3a2f1f !important; color: #fcd34d !important; border-color: #5a4a2d !important; }

/* Yeni Sipariş — müşteri arama dropdown'ı (siparis-form.ejs) */
html.dark #cust-ac-drop, body.dark #cust-ac-drop {
  background: #2c2c2e !important; border-color: #48484a !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
}
html.dark #cust-ac-drop > div, body.dark #cust-ac-drop > div { border-bottom-color: #38383a !important; }
html.dark #cust-ac-drop *, body.dark #cust-ac-drop * { color: #e5e5e7 !important; }
html.dark #cust-ac-drop strong, body.dark #cust-ac-drop strong { color: #f5f5f7 !important; }
html.dark #cust-ac-drop i.fa-user-circle, body.dark #cust-ac-drop i.fa-user-circle { color: #93c5fd !important; }
html.dark #cust-ac-drop i.fa-map-marker-alt,
html.dark #cust-ac-drop i.fa-phone,
html.dark #cust-ac-drop i.fa-home,
body.dark #cust-ac-drop i.fa-map-marker-alt,
body.dark #cust-ac-drop i.fa-phone,
body.dark #cust-ac-drop i.fa-home { color: #98989d !important; }
html.dark #cust-ac-drop > div:hover, body.dark #cust-ac-drop > div:hover { background: #3a3a3c !important; }

/* Müşteri sipariş formu (order.ejs) — products-table ve diğer öğeler */
html.dark .products-table th, body.dark .products-table th {
  background: #232325 !important; color: #98989d !important;
  border-bottom-color: #38383a !important;
}
html.dark .products-table td, body.dark .products-table td {
  background: #2c2c2e !important; color: #e5e5e7 !important;
  border-bottom-color: #38383a !important;
}
html.dark .products-table tr:hover td, body.dark .products-table tr:hover td { background: #3a3a3c !important; }
html.dark .prod-thumb, body.dark .prod-thumb,
html.dark .prod-thumb-placeholder, body.dark .prod-thumb-placeholder {
  background: #232325 !important; color: #6e6e73 !important;
}
html.dark .pay-paid, body.dark .pay-paid { background: #1f3a2a !important; color: #86efac !important; }
html.dark .pay-partial, body.dark .pay-partial { background: #3a2f1f !important; color: #fcd34d !important; }
html.dark .pay-unpaid, body.dark .pay-unpaid { background: #3a1f1f !important; color: #fca5a5 !important; }
html.dark .totals-grand, body.dark .totals-grand { background: #232325 !important; color: #f5f5f7 !important; }
html.dark .totals-table td, body.dark .totals-table td { color: #e5e5e7 !important; border-color: #38383a !important; }
html.dark .btn-act, body.dark .btn-act { background: #2c2c2e !important; color: #e5e5e7 !important; border-color: #48484a !important; }
html.dark .btn-act:hover, body.dark .btn-act:hover { background: #3a3a3c !important; color: #f5f5f7 !important; }
html.dark .btn-wa, body.dark .btn-wa { background: #1f3a2a !important; color: #86efac !important; border-color: #2d5a3f !important; }
html.dark .btn-wa:hover, body.dark .btn-wa:hover { background: #2d5a3f !important; color: #bbf7d0 !important; }
html.dark .wa-dd-menu, body.dark .wa-dd-menu { background: #2c2c2e !important; border-color: #48484a !important; box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important; }
html.dark .wa-dd-item, body.dark .wa-dd-item { color: #e5e5e7 !important; }
html.dark .wa-dd-item:hover, body.dark .wa-dd-item:hover { background: #3a3a3c !important; }
html.dark .wa-dd-divider, body.dark .wa-dd-divider { background: #38383a !important; }
html.dark .pmc-name, body.dark .pmc-name { color: #f5f5f7 !important; }
html.dark .pmc-cat, html.dark .pmc-label, body.dark .pmc-cat, body.dark .pmc-label { color: #98989d !important; }
html.dark .pmc-total, body.dark .pmc-total { color: #f5f5f7 !important; border-color: #38383a !important; }

/* Müşteri sipariş formu chip'leri (order.ejs Baskı sütunu) */
html.dark .badge-tag, body.dark .badge-tag { color: #e5e5e7 !important; border-color: #48484a !important; }
html.dark .badge-color, body.dark .badge-color { background: #3a3a3c !important; color: #f5f5f7 !important; }
html.dark .badge-dir, body.dark .badge-dir { background: #1e2a3a !important; color: #93c5fd !important; }
html.dark .badge-size, body.dark .badge-size { background: #3a3a3c !important; color: #e5e5e7 !important; }

/* Sipariş formu özel */
html.dark .basket-row, body.dark .basket-row { background: #232325 !important; border-color: #38383a !important; color: #e5e5e7 !important; }
html.dark .basket-prod-name, body.dark .basket-prod-name { color: #f5f5f7 !important; }
html.dark .summary-table td, body.dark .summary-table td { color: #e5e5e7 !important; }
html.dark .product-dropdown, body.dark .product-dropdown { background: #2c2c2e !important; border-color: #38383a !important; }
html.dark .pd-item, body.dark .pd-item { color: #e5e5e7 !important; border-bottom-color: #38383a !important; }
html.dark .pd-item:hover, body.dark .pd-item:hover { background: #3a3a3c !important; }
html.dark .logo-preview-box, body.dark .logo-preview-box { background: #232325 !important; border-color: #48484a !important; }
html.dark .wa-paste-area, body.dark .wa-paste-area { background: #232325 !important; border-color: #38383a !important; }
html.dark .wa-paste-area textarea, body.dark .wa-paste-area textarea { background: #2c2c2e !important; border-color: #38383a !important; color: #e5e5e7 !important; }
html.dark .basket-empty, body.dark .basket-empty { color: #6e6e73 !important; }

/* Müşteri sipariş sayfası (order.ejs) özel */
html.dark .pmc-card, body.dark .pmc-card,
html.dark .product-mobile-card, body.dark .product-mobile-card { background: #232325 !important; border-color: #38383a !important; }
html.dark .notes-card, body.dark .notes-card { background: #3a2f1f !important; color: #fcd34d !important; border-color: #5a4a2d !important; }
html.dark .totals-grand, body.dark .totals-grand { background: #232325 !important; }
html.dark .kargo-info, body.dark .kargo-info { background: #232325 !important; border-color: #38383a !important; color: #e5e5e7 !important; }

/* Inline style ile yazılmış açık arka planları gri'ye çevir */
html.dark *[style*="background"]:not(img):not(.cust-avatar):not(.fab-main),
body.dark *[style*="background"]:not(img):not(.cust-avatar):not(.fab-main) {
  background-color: #2c2c2e !important;
  background-image: none !important;
}

/* Border'lar tek koyu gri */
html.dark *, body.dark *,
html.dark *::before, body.dark *::before,
html.dark *::after, body.dark *::after { border-color: #38383a !important; }
html.dark hr, body.dark hr { border-color: #38383a !important; background-color: transparent !important; }

/* Selection */
html.dark ::selection, body.dark ::selection { background: #48484a !important; color: #f5f5f7 !important; }
html.dark ::-moz-selection, body.dark ::-moz-selection { background: #48484a !important; color: #f5f5f7 !important; }

/* Scrollbar */
html.dark ::-webkit-scrollbar, body.dark ::-webkit-scrollbar { background: #1c1c1e; }
html.dark ::-webkit-scrollbar-thumb, body.dark ::-webkit-scrollbar-thumb { background: #48484a; border-radius: 4px; }

/* Code */
html.dark code, html.dark pre,
body.dark code, body.dark pre { background: #3a3a3c !important; color: #f59e0b !important; }
