html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
.table td, .table th { vertical-align: middle; }
.sayi { text-align: right; white-space: nowrap; }
.kritik { color: #b02a37; font-weight: 600; }
.kart-ozet .display-6 { font-size: 1.8rem; }
pre.wa-mesaj { white-space: pre-wrap; font-family: inherit; margin: 0; }

/* Stok listesi: küçük resim, üzerine gelince büyük hali */
td.kucuk-resim { width: 48px; position: relative; padding: 2px 4px; }
td.kucuk-resim img, td.kucuk-resim .bos { width: 40px; height: 40px; object-fit: contain; border: 1px solid #dee2e6; border-radius: 4px; background: #fff; display: block; }
td.kucuk-resim .bos { background: #f8f9fa; }
td.kucuk-resim img.buyuk { display: none; position: absolute; left: 50px; top: -100px; width: 260px; height: 260px; z-index: 30; box-shadow: 0 6px 24px rgba(0,0,0,.25); pointer-events: none; }
td.kucuk-resim:hover img.buyuk { display: block; }

/* Fatura yazdırma: menü ve işlem butonları kâğıda çıkmaz */
@media print {
  header, .yazdirma-gizle, .alert { display: none !important; }
  .row > .col-lg-8 { flex: 0 0 100%; max-width: 100%; }
  body { margin-bottom: 0; }
}

/* Stok resmi: webde görsel arama sonuçları */
.web-gorseller { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 420px; overflow: auto; }
.web-gorsel { padding: 2px; border: 2px solid #dee2e6; border-radius: 6px; background: #fff; aspect-ratio: 1; }
.web-gorsel img { width: 100%; height: 100%; object-fit: contain; display: block; }
.web-gorsel:hover { border-color: #86b7fe; }
.web-gorsel.secili { border-color: #198754; box-shadow: 0 0 0 2px #19875455; }

/* Kurum logosu: menüde beyaz kutu içinde (koyu menüde saydam/siyah logolar da görünsün) */
.menu-logo { height: 30px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px 4px; }
.fatura-logo { max-height: 70px; max-width: 220px; object-fit: contain; }

/* ---- Tema (Sabitler → Tema): <html data-tema="..." data-bs-theme="light|dark"> ---- */
[data-tema="mavi"]     { --tema: #0d6efd; --tema-rgb: 13,110,253;  --tema-koyu: #0a58ca; --tema-menu: #212529;  --tema-acik-rgb: 110,168,254; }
[data-tema="lacivert"] { --tema: #1d3a6e; --tema-rgb: 29,58,110;   --tema-koyu: #142a52; --tema-menu: #13284d;  --tema-acik-rgb: 140,170,220; }
[data-tema="yesil"]    { --tema: #198754; --tema-rgb: 25,135,84;   --tema-koyu: #146c43; --tema-menu: #0f3d27;  --tema-acik-rgb: 117,183,152; }
[data-tema="turkuaz"]  { --tema: #0c8599; --tema-rgb: 12,133,153;  --tema-koyu: #096a7a; --tema-menu: #0b3f49;  --tema-acik-rgb: 102,200,214; }
[data-tema="mor"]      { --tema: #6f42c1; --tema-rgb: 111,66,193;  --tema-koyu: #59359a; --tema-menu: #33204f;  --tema-acik-rgb: 176,148,230; }
[data-tema="kirmizi"]  { --tema: #b02a37; --tema-rgb: 176,42,55;   --tema-koyu: #8c222c; --tema-menu: #4a1218;  --tema-acik-rgb: 234,134,143; }
[data-tema="turuncu"]  { --tema: #d9480f; --tema-rgb: 217,72,15;   --tema-koyu: #ae3a0c; --tema-menu: #4d1d06;  --tema-acik-rgb: 244,160,120; }
[data-tema="gri"]      { --tema: #495057; --tema-rgb: 73,80,87;    --tema-koyu: #343a40; --tema-menu: #212529;  --tema-acik-rgb: 173,181,189; }
[data-tema][data-bs-theme="dark"] { --tema-menu: #0d1117; }

[data-tema] {
  --bs-primary: var(--tema); --bs-primary-rgb: var(--tema-rgb);
  --bs-link-color: var(--tema); --bs-link-color-rgb: var(--tema-rgb); --bs-link-hover-color: var(--tema-koyu); --bs-link-hover-color-rgb: var(--tema-rgb);
}
/* Koyu modda bağlantılar okunaklı olsun: tema renginin açık tonu (--tema-acik-rgb) */
[data-tema][data-bs-theme="dark"] { --bs-link-color-rgb: var(--tema-acik-rgb); --bs-link-color: rgb(var(--tema-acik-rgb)); --bs-link-hover-color: #fff; --bs-link-hover-color-rgb: 255,255,255; }
[data-tema] .btn-primary {
  --bs-btn-bg: var(--tema); --bs-btn-border-color: var(--tema);
  --bs-btn-hover-bg: var(--tema-koyu); --bs-btn-hover-border-color: var(--tema-koyu);
  --bs-btn-active-bg: var(--tema-koyu); --bs-btn-active-border-color: var(--tema-koyu);
  --bs-btn-disabled-bg: var(--tema); --bs-btn-disabled-border-color: var(--tema);
}
[data-tema] .btn-outline-primary {
  --bs-btn-color: var(--tema); --bs-btn-border-color: var(--tema);
  --bs-btn-hover-bg: var(--tema); --bs-btn-hover-border-color: var(--tema);
  --bs-btn-active-bg: var(--tema-koyu); --bs-btn-active-border-color: var(--tema-koyu);
}
[data-tema][data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #e9ecef; }
[data-tema] .pagination { --bs-pagination-active-bg: var(--tema); --bs-pagination-active-border-color: var(--tema); --bs-pagination-color: var(--tema); }
[data-tema] .form-check-input:checked { background-color: var(--tema); border-color: var(--tema); }
[data-tema] .form-control:focus, [data-tema] .form-select:focus { border-color: rgba(var(--tema-rgb), .6); box-shadow: 0 0 0 .2rem rgba(var(--tema-rgb), .25); }
.navbar-tema { background-color: var(--tema-menu, #212529); }
[data-bs-theme="dark"] .odeme-sayfasi, [data-bs-theme="dark"] body { background-color: #0d1117; }
.odeme-sayfasi { background-color: #f3f4f6; }
[data-bs-theme="dark"] td.kucuk-resim img, [data-bs-theme="dark"] .web-gorsel { background: #fff; }

/* Kampanya önizlemesi: WhatsApp mesaj balonu */
.wa-onizleme-zemin { background: #efeae2; border-radius: 0 0 .375rem .375rem; }
[data-bs-theme="dark"] .wa-onizleme-zemin { background: #0b141a; }
.wa-balon { background: #fff; color: #111b21; border-radius: 8px; padding: 6px 8px 8px; max-width: 340px; box-shadow: 0 1px .5px rgba(0,0,0,.13); font-size: .92rem; line-height: 1.35; word-wrap: break-word; }
[data-bs-theme="dark"] .wa-balon { background: #202c33; color: #e9edef; }
.wa-balon img { width: 100%; border-radius: 6px; margin-bottom: 6px; display: block; }
