/* Sepetkâr arayüzü: başlık, menü, tema ve Hesapla ekranı.
   main.css'ten sonra yüklenir. Renkler değişkendir; koyu tema [data-theme="dark"] ile gelir. */

:root {
  --sk-bg: #f7f4f1;
  --sk-surface: #ffffff;
  --sk-surface-2: #fbf8f5;
  --sk-line: #ebe4dc;
  --sk-fg: #231c16;
  --sk-muted: #776b60;
  --sk-accent: #c25404; /* beyaz yazı ve beyaz zemin üstünde 4,6:1 (WCAG AA); logo turuncusu SVG'de kalır */
  --sk-accent-soft: #fdecdf;
  --sk-on-accent: #ffffff;
  --sk-good: #16803c;
  --sk-good-soft: #e3f5e9;
  --sk-bad: #c62828;
  --sk-bad-soft: #fde7e7;
  --sk-warn: #a15c00;
  --sk-warn-soft: #fff3df;
  --sk-focus: #c2540455;
  --sk-shadow: 0 1px 2px #2a1d1008, 0 8px 24px #2a1d100d;
  --sk-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sk-r: 14px;
  --sk-max: 1240px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --sk-bg: #171310;
  --sk-surface: #211b17;
  --sk-surface-2: #2a231e;
  --sk-line: #3a3029;
  --sk-fg: #f3ece5;
  --sk-muted: #b3a597;
  --sk-accent: #ff8a3d;
  --sk-accent-soft: #3b2616;
  --sk-on-accent: #1b120b;
  --sk-good: #4cc477;
  --sk-good-soft: #15301f;
  --sk-bad: #ff6b6b;
  --sk-bad-soft: #3a1a1a;
  --sk-warn: #f0b04f;
  --sk-warn-soft: #3a2a12;
  --sk-focus: #ff8a3d66;
  --sk-shadow: 0 1px 2px #0006, 0 8px 24px #0005;

  /* main.css değişkenleri: eski ekranlar da koyu temaya uyar */
  --bg: var(--sk-bg);
  --panel: var(--sk-surface);
  --text: var(--sk-fg);
  --muted: var(--sk-muted);
  --input-bg: var(--sk-surface-2);
  --input-border: var(--sk-line);
  --box-bg: var(--sk-surface-2);
  --box-text: var(--sk-fg);
  --card-border: var(--sk-line);
  --chip-bg: var(--sk-surface-2);
  --chip-border: var(--sk-line);
  --toolbar-bg: var(--sk-surface-2);
  --shadow: var(--sk-shadow);
}

/* Hesapla: pazaryeri seçimi kartın en üstünde */
.h-mp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--sk-line); }
.h-mp-l { font-size: 12px; font-weight: 700; color: var(--sk-muted); text-transform: uppercase; letter-spacing: .06em; }
.h-mp .sk-mp { flex-wrap: wrap; }

/* ---------- Sayfa ---------- */
body {
  background: var(--sk-bg) !important;
  background-image: none !important;
  color: var(--sk-fg);
  font-family: var(--sk-font);
  font-weight: 400;
}

.nav-tab[hidden],
#legacyCalc[hidden],
.feedback-button[hidden],
.sk-header [hidden],
#hesapla [hidden],
.h-bar[hidden] {
  display: none !important;
}

body .mobile-tab-switch { display: none !important; }

:focus-visible { outline: 3px solid var(--sk-focus); outline-offset: 2px; }

/* ---------- Başlık ve menü ---------- */
.sk-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--sk-surface);
  border-bottom: 1px solid var(--sk-line);
  margin-bottom: 18px;
}
.sk-header-in {
  max-width: var(--sk-max);
  margin: 0 auto;
  padding: 10px max(16px, env(safe-area-inset-left, 0px)) 10px max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
}
.sk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sk-accent);
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  font-size: 16px;
}
.sk-brand img { width: 32px; height: 32px; display: block; }

.sk-header .nav-tabs.sk-nav {
  display: flex !important;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.sk-header .nav-tabs.sk-nav::-webkit-scrollbar { display: none; }
.sk-header .sk-nav .nav-tab {
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font: 600 15px/1.2 var(--sk-font);
  color: var(--sk-muted);
  box-shadow: none;
  flex-shrink: 0;
}
.sk-header .sk-nav .nav-tab:hover { color: var(--sk-fg); background: var(--sk-surface-2); }
.sk-header .sk-nav .nav-tab.active { background: var(--sk-accent-soft); color: var(--sk-accent); }

.sk-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sk-mp, .sk-theme {
  display: flex;
  background: var(--sk-surface-2);
  border: 1px solid var(--sk-line);
  border-radius: 12px;
  padding: 3px;
}
.sk-mp-btn, .sk-theme button {
  border: 0;
  background: none;
  padding: 6px 11px;
  border-radius: 9px;
  font: 600 13px/1.2 var(--sk-font);
  color: var(--sk-muted);
  cursor: pointer;
}
.sk-mp-btn.active, .sk-theme button[aria-pressed="true"] {
  background: var(--sk-surface);
  color: var(--sk-fg);
  box-shadow: var(--sk-shadow);
}
.sk-header .user-menu-wrap { position: relative; }
.sk-header .user-menu-btn {
  background: var(--sk-surface-2);
  border: 1px solid var(--sk-line);
  color: var(--sk-fg);
}
.sk-header .user-menu-dropdown { right: 0; left: auto; }
/* Kullanıcı menüsü tema renkleriyle: main.css'teki sabit renkler koyu temada okunmuyordu; avatar pazaryerine göre renk değiştirmez */
.sk-header .user-menu-avatar { background: var(--sk-accent); color: var(--sk-on-accent); }
.sk-header .user-menu-dropdown { background: var(--sk-surface); border-color: var(--sk-line); box-shadow: var(--sk-shadow), 0 16px 40px #0000001f; }
.sk-header .user-menu-header { border-color: var(--sk-line); }
.sk-header .user-menu-full-name, .sk-header .user-menu-item { color: var(--sk-fg); }
.sk-header .user-menu-code { color: var(--sk-muted); }
.sk-header .user-menu-item:hover { background: var(--sk-surface-2); }
.sk-header .user-menu-item-danger { color: var(--sk-bad); }
.sk-header .user-menu-item-danger:hover { background: var(--sk-bad-soft); }

/* ---------- Alt bilgi (her sekmede) ---------- */
body > .footer {
  max-width: var(--sk-max);
  margin: 24px auto 0;
  padding: 16px max(16px, env(safe-area-inset-left, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px));
  color: var(--sk-muted);
  font-size: 12.5px;
  text-align: center;
}

/* ---------- Hesapla ---------- */
.h-wrap {
  max-width: var(--sk-max);
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left, 0px)) 0 max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 20px;
  align-items: start;
  font-size: 15px;
  line-height: 1.45;
  color: var(--sk-fg);
}
.h-wrap button, .h-wrap input, .h-wrap select { font-family: var(--sk-font); color: inherit; }
.h-card { background: var(--sk-surface); border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-shadow); }
.h-form { padding: 20px; display: grid; gap: 16px; min-width: 0; }
.h-form-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.h-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.h-mult { gap: 4px; }
.h-mult .h-chip { padding: 3px 9px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.h-bbox-h { gap: 10px; }
.h-form h2 { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-muted); font-weight: 700; }
.h-link { border: 0; background: none; color: var(--sk-accent); font-weight: 700; cursor: pointer; padding: 4px; font-size: 13px; }

.h-search { position: relative; }
.h-search input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1px solid var(--sk-line);
  background: var(--sk-surface-2);
  font-size: 15px;
  color: var(--sk-fg);
}
.h-search input:focus { outline: none; border-color: var(--sk-accent); box-shadow: 0 0 0 3px var(--sk-focus); }
.h-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sk-muted); pointer-events: none; }
.h-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25;
  background: var(--sk-surface); border: 1px solid var(--sk-line); border-radius: 12px; box-shadow: var(--sk-shadow);
  padding: 6px; max-height: 340px; overflow-y: auto;
}
.h-list button {
  display: flex; justify-content: space-between; gap: 12px; width: 100%;
  border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--sk-fg);
}
.h-list button:hover, .h-list button.h-active { background: var(--sk-accent-soft); }
.h-list small { color: var(--sk-muted); white-space: nowrap; }
.h-listmsg { padding: 8px 10px; }

.h-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.h-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.h-span2 { grid-column: 1 / -1; }
.h-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.h-field label, .h-label { font-size: 13px; font-weight: 600; color: var(--sk-muted); }
.h-inp {
  display: flex; align-items: center; min-width: 0;
  border: 1px solid var(--sk-line); border-radius: 12px; background: var(--sk-surface); overflow: hidden;
}
.h-inp:focus-within { border-color: var(--sk-accent); box-shadow: 0 0 0 3px var(--sk-focus); }
.h-inp input {
  flex: 1; min-width: 0; border: 0; background: none; padding: 12px 14px;
  font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; color: var(--sk-fg);
}
.h-inp input::placeholder { color: var(--sk-muted); font-weight: 500; }
.h-unit { padding: 0 14px; color: var(--sk-muted); font-weight: 600; }
.h-inp select {
  border: 0; border-left: 1px solid var(--sk-line); background: var(--sk-surface-2);
  padding: 0 10px; align-self: stretch; font-weight: 700; cursor: pointer; color: var(--sk-fg);
}
.h-small .h-inp input { font-size: 15px; padding: 10px 12px; }
.h-hint { font-size: 12.5px; color: var(--sk-muted); }
.h-fx { width: 84px; padding: 4px 6px; border: 1px solid var(--sk-line); border-radius: 6px; background: var(--sk-surface); color: var(--sk-fg); }

.h-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.h-chip {
  border: 1px solid var(--sk-line); background: var(--sk-surface); color: var(--sk-fg);
  padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.h-chip[aria-pressed="true"] { border-color: var(--sk-accent); background: var(--sk-accent-soft); color: var(--sk-accent); }

.h-qty { display: flex; align-items: center; gap: 6px; }
.h-qty button {
  width: 40px; height: 44px; border-radius: 10px; border: 1px solid var(--sk-line);
  background: var(--sk-surface-2); font-size: 18px; cursor: pointer; color: var(--sk-fg);
}
.h-qty output { min-width: 32px; text-align: center; font-size: 18px; font-weight: 700; }

.h-ship {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px dashed var(--sk-line); background: var(--sk-surface-2); border-radius: 12px; padding: 11px 14px; cursor: pointer; color: var(--sk-fg);
}
.h-ship:hover:not(:disabled) { border-color: var(--sk-accent); }
.h-ship:disabled { cursor: default; }
.h-ship:disabled .h-ship-e { display: none; }
.h-ship-t { flex: 1; min-width: 0; display: grid; }
.h-ship-t span { font-size: 12.5px; color: var(--sk-muted); }
.h-ship-e { color: var(--sk-accent); font-weight: 700; font-size: 13px; }
.h-shipbox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; border: 1px solid var(--sk-line); border-radius: 12px; }
.h-shipbox select { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--sk-line); background: var(--sk-surface); color: var(--sk-fg); }
.h-shipbox .h-hint { margin: 0; }

.h-more { border-top: 1px solid var(--sk-line); padding-top: 14px; }
.h-more summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h-more summary::-webkit-details-marker { display: none; }
.h-more summary::before {
  content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 6px; background: var(--sk-accent-soft); color: var(--sk-accent); font-weight: 800;
}
.h-more[open] summary::before { content: "−"; }
.h-more summary span { font-weight: 500; color: var(--sk-muted); font-size: 13px; }
.h-morebody { display: grid; gap: 14px; padding-top: 14px; }
.h-wrap .h-check { display: flex !important; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; color: var(--sk-fg); margin: 0; cursor: pointer; }
.h-wrap .h-check input { width: 18px !important; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--sk-accent); }
.h-wrap .h-hint label { display: inline; font-size: inherit; font-weight: 600; color: inherit; }
.h-addb { border: 1px dashed var(--sk-accent); color: var(--sk-accent); background: none; border-radius: 12px; padding: 10px; font-weight: 700; cursor: pointer; }
.h-bbox { border: 1px solid var(--sk-line); border-radius: 12px; padding: 12px; display: grid; gap: 12px; }
.h-bbox-h { display: flex; justify-content: space-between; align-items: center; }
.h-tablewrap { overflow-x: auto; }
.h-cmptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.h-cmptable th, .h-cmptable td { padding: 7px 6px; text-align: right; border-bottom: 1px solid var(--sk-line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-cmptable th:first-child, .h-cmptable td:first-child { text-align: left; }
.h-cmptable th { color: var(--sk-muted); font-weight: 600; font-size: 12px; }
.h-cmptable tr.h-me td { font-weight: 800; }

/* Sonuç paneli */
.h-result { position: sticky; top: 84px; overflow: hidden; min-width: 0; }
.h-empty { padding: 28px 20px; display: grid; gap: 4px; color: var(--sk-muted); }
.h-empty b { color: var(--sk-fg); font-size: 16px; }
.h-error { padding: 20px; color: var(--sk-bad); font-weight: 600; }
.h-hero { padding: 20px 20px 16px; }
.h-lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--sk-muted); display: flex; justify-content: space-between; }
.h-big { font-size: 44px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.h-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.h-pill { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.is-good .h-big, .h-bar.is-good .h-bar-n { color: var(--sk-good); }
.is-good .h-pill { background: var(--sk-good-soft); color: var(--sk-good); }
.is-bad .h-big, .h-bar.is-bad .h-bar-n { color: var(--sk-bad); }
.is-bad .h-pill { background: var(--sk-bad-soft); color: var(--sk-bad); }
.is-flat .h-big, .h-bar.is-flat .h-bar-n { color: var(--sk-warn); }
.is-flat .h-pill { background: var(--sk-warn-soft); color: var(--sk-warn); }
.h-meter { height: 6px; border-radius: 99px; background: var(--sk-surface-2); margin-top: 14px; overflow: hidden; }
.h-meter i { display: block; height: 100%; border-radius: 99px; background: currentColor; }
.is-good .h-meter { color: var(--sk-good); }
.is-bad .h-meter { color: var(--sk-bad); }
.is-flat .h-meter { color: var(--sk-warn); }

.h-rows { border-top: 1px solid var(--sk-line); }
.h-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; width: 100%;
  padding: 9px 20px; border: 0; border-bottom: 1px solid var(--sk-line); background: none; text-align: left; cursor: pointer; color: var(--sk-fg);
}
.h-row:hover { background: var(--sk-surface-2); }
.h-k { display: flex; gap: 6px; align-items: center; }
.h-k::after { content: "ⓘ"; color: var(--sk-muted); font-size: 12px; }
.h-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.h-row-info .h-v { color: var(--sk-muted); }
.h-f { grid-column: 1 / -1; font-size: 12.5px; color: var(--sk-muted); display: none; }
.h-row[aria-expanded="true"] .h-f { display: block; }
.h-src {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px;
  border-radius: 5px; background: var(--sk-surface-2); color: var(--sk-muted); border: 1px solid var(--sk-line);
}
.h-ins { padding: 14px 20px 18px; display: grid; gap: 10px; }
.h-ins:empty { display: none; }
#h-insights { display: grid; gap: 10px; }
#h-insights:empty { display: none; }
.h-box { border-radius: 12px; padding: 11px 13px; background: var(--sk-surface-2); border: 1px solid var(--sk-line); display: grid; gap: 6px; }
.h-box-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; }
.h-box-h span:last-child { font-variant-numeric: tabular-nums; }
.h-box p { margin: 0; font-size: 13px; color: var(--sk-muted); }
.h-box-warn { background: var(--sk-warn-soft); border-color: transparent; }
.h-box-warn p { color: var(--sk-fg); }
.h-apply { justify-self: start; border: 0; background: var(--sk-accent); color: var(--sk-on-accent); font-weight: 700; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.h-foot { font-size: 12px; color: var(--sk-muted); padding: 0 20px 16px; }

/* Telefon: alttaki sabit kâr çubuğu */
.h-bar { display: none; }
@media (max-width: 920px) {
  .sk-header-in { gap: 10px 12px; }
  .sk-header .nav-tabs.sk-nav { order: 3; width: 100%; }
  .sk-tools { margin-left: auto; }
  .h-wrap { grid-template-columns: minmax(0, 1fr); }
  .h-result { position: static; }
  .h-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; width: 100%;
    align-items: center; gap: 12px; border: 0; text-align: left; cursor: pointer; color: var(--sk-fg);
    background: var(--sk-surface); border-top: 1px solid var(--sk-line); box-shadow: 0 -8px 24px #0000001a;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    font-family: var(--sk-font);
  }
  .h-bar > span:first-child { display: grid; }
  .h-bar-l { font-size: 12px; font-weight: 700; color: var(--sk-muted); text-transform: uppercase; letter-spacing: .08em; }
  .h-bar-n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .h-bar-go { margin-left: auto; color: var(--sk-accent); font-weight: 700; font-size: 13px; }
  .h-bar.is-good .h-pill { background: var(--sk-good-soft); color: var(--sk-good); }
  .h-bar.is-bad .h-pill { background: var(--sk-bad-soft); color: var(--sk-bad); }
  .h-bar.is-flat .h-pill { background: var(--sk-warn-soft); color: var(--sk-warn); }
}
@media (max-width: 560px) {
  /* Telefon: 1. satır logo + tema + kullanıcı, 2. satır mağaza seçici, 3. satır menü */
  .sk-tools { display: contents; }
  .sk-brand { order: 0; margin-right: auto; }
  .sk-theme { order: 1; flex: none; }
  .sk-header .user-menu-wrap { order: 2; flex: none; width: auto !important; }
  .sk-header .user-menu-btn { width: auto !important; }
  .sk-header .nav-tabs.sk-nav { order: 4; width: 100%; justify-content: space-between; }
  .sk-header .sk-nav .nav-tab { padding: 8px 10px; font-size: 14px; }
  .h-mp .sk-mp { width: 100%; }
  .sk-mp-btn { flex: 1; padding: 8px 4px; }
  .sk-tw { display: none; }
  .sk-header .user-menu-name { display: none; }
  .sk-header .user-menu-dropdown { right: 0 !important; left: auto !important; transform: none !important; width: min(calc(100vw - 32px), 320px) !important; }
  .h-grid2 { grid-template-columns: minmax(0, 1fr); }
  .h-big { font-size: 38px; }
}
@media (prefers-reduced-motion: no-preference) {
  .h-big, .h-bar-n { transition: color .2s; }
  .h-meter i { transition: width .25s; }
}

/* ---------- Ayarlar: entegrasyon bölümü aynı sayfada ---------- */
.sk-integration { margin-top: 24px; }

/* ---------- Ürünler tablosu: sütunlar ekrana sığsın, ürün adı kaybolmasın ---------- */
@media (min-width: 921px) {
  .products-table th:nth-child(1), .products-table td:nth-child(1) { width: 11%; }
  .products-table th:nth-child(2), .products-table td:nth-child(2) { width: 11%; }
  .products-table th:nth-child(3), .products-table td:nth-child(3) { width: 6%; }
  .products-table th:nth-child(4), .products-table td:nth-child(4) { width: 24%; }
  .products-table th:nth-child(5), .products-table td:nth-child(5) { width: 8%; }
  .products-table th:nth-child(6), .products-table td:nth-child(6) { width: 8%; }
  .products-table th:nth-child(7), .products-table td:nth-child(7) { width: 8%; }
  .products-table th:nth-child(8), .products-table td:nth-child(8) { width: 7%; }
  .products-table th:nth-child(9), .products-table td:nth-child(9) { width: 8%; }
  .products-table th:nth-child(10), .products-table td:nth-child(10) { width: 9%; }
}

/* ---------- Eski ekranlar için koyu tema uyarlamaları ---------- */
:root[data-theme="dark"] body,
:root[data-theme="dark"] .container,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] label { color: var(--sk-fg); }

:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background-color: var(--sk-surface-2) !important;
  color: var(--sk-fg) !important;
  border-color: var(--sk-line) !important;
}
:root[data-theme="dark"] table,
:root[data-theme="dark"] th,
:root[data-theme="dark"] td { color: var(--sk-fg); border-color: var(--sk-line) !important; }
:root[data-theme="dark"] th { background: var(--sk-surface-2) !important; }
:root[data-theme="dark"] tr { background: transparent !important; }
:root[data-theme="dark"] .modal-card,
:root[data-theme="dark"] .login-modal,
:root[data-theme="dark"] .feedback-modal,
:root[data-theme="dark"] .user-menu-dropdown,
:root[data-theme="dark"] .accordion-item,
:root[data-theme="dark"] .accordion-body,
:root[data-theme="dark"] .settings-form,
:root[data-theme="dark"] .settings-section-divider {
  background: var(--sk-surface) !important;
  color: var(--sk-fg) !important;
  border-color: var(--sk-line) !important;
}

:root[data-theme="dark"] .h-wrap .h-inp input,
:root[data-theme="dark"] .h-wrap .h-inp select { background-color: transparent !important; border-color: transparent !important; }
:root[data-theme="dark"] .h-wrap .h-inp select { border-left-color: var(--sk-line) !important; background-color: var(--sk-surface-2) !important; }
:root[data-theme="dark"] .h-wrap .h-inp { background: var(--sk-surface-2); }
:root[data-theme="dark"] .settings-infinity-box,
:root[data-theme="dark"] .filter-badge,
:root[data-theme="dark"] .accordion-header,
:root[data-theme="dark"] input:disabled,
:root[data-theme="dark"] input[readonly] {
  background: var(--sk-surface-2) !important;
  color: var(--sk-fg) !important;
  border-color: var(--sk-line) !important;
}
:root[data-theme="dark"] .filter-badge span { color: var(--sk-fg) !important; }

/* Ayarlar > Trendyol API: bağlı mağaza ve başka mağazanın kayıtları (js/magaza.js) */
.store-info { margin-top: 10px; font-size: 13px; color: var(--sk-fg); }
.store-info:empty { display: none; }
.store-info.store-warn { padding: 10px; border-radius: 8px; background: var(--sk-warn-soft); color: var(--sk-warn); }
.store-info.store-warn > div:not(.store-info-head) { margin-top: 6px; }
.store-info-head { display: flex; align-items: center; gap: 10px; }
.store-logo { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--sk-line); background: var(--sk-surface); }
.store-hint { margin-top: 4px; font-size: 12px; color: var(--sk-muted); }
.store-part { display: grid; gap: 6px; margin-top: 10px; }
.store-part strong { color: var(--sk-fg); }
.store-list { max-height: 260px; overflow: auto; border: 1px solid var(--sk-line); border-radius: 8px; }
.store-list table { width: 100%; border-collapse: collapse; font-size: 12px; }
.store-list th,
.store-list td { padding: 5px 8px; border-bottom: 1px solid var(--sk-line); text-align: left; }
.store-list td { overflow-wrap: anywhere; }
.store-list th { position: sticky; top: 0; white-space: nowrap; background: var(--sk-surface-2); }

/* Hesabımı sil penceresi (js/hesapSil.js) */
.hesap-sil-metin { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--sk-fg); }
.hesap-sil-onay { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--sk-fg); cursor: pointer; }
/* main.css her input'a tam genişlik veriyor; onay kutusu kendi boyunda kalsın */
.hesap-sil-onay input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; flex: 0 0 auto; }
#deleteAccountStatus { margin-top: 10px; color: var(--sk-good); }
#deleteAccountStatus.hesap-sil-hata { color: var(--sk-bad); }
#deleteAccountStatus:empty { display: none; }
#deleteAccountSubmit:disabled { opacity: .5; cursor: not-allowed; }

/* Davet bağlantıları penceresi (js/davet.js) */
#invitesModal .modal-card { max-width: 720px; }
.davet-metin { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--sk-fg); }
.davet-form { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: end; }
.davet-form .form-group { margin: 0; }
.davet-form input { width: 100%; }
#inviteCreate { margin-top: 10px; }
.davet-sonuc { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--sk-good-soft); }
.davet-link-satir { display: flex; gap: 8px; align-items: center; }
.davet-link-satir input { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; }
.davet-link-satir button { flex: 0 0 auto; }
.davet-durum { margin-top: 10px; font-size: 13px; color: var(--sk-good); }
.davet-durum.davet-hata { color: var(--sk-bad); }
.davet-durum:empty { display: none; }
.davet-baslik { margin: 18px 0 8px; font-size: 14px; color: var(--sk-fg); }
.davet-liste-kutu { max-height: 280px; overflow: auto; border: 1px solid var(--sk-line); border-radius: 8px; }
.davet-liste { width: 100%; border-collapse: collapse; font-size: 13px; }
.davet-liste th, .davet-liste td { padding: 7px 8px; border-bottom: 1px solid var(--sk-line); text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.davet-liste th { position: sticky; top: 0; background: var(--sk-surface-2, var(--sk-surface)); white-space: nowrap; }
.davet-liste tr.davet-kullanildi td, .davet-liste tr.davet-suresi-doldu td { color: var(--sk-muted); }
.davet-bos { color: var(--sk-muted); text-align: center !important; }
.davet-sil { padding: 4px 10px; border: 1px solid var(--sk-line); border-radius: 6px; background: var(--sk-surface); color: var(--sk-bad); cursor: pointer; font-size: 12px; }
@media (max-width: 640px) {
  .davet-form { grid-template-columns: 1fr 1fr; }
  .davet-form .davet-not { grid-column: 1 / -1; }
  .davet-liste th:nth-child(3), .davet-liste td:nth-child(3) { display: none; }
}

/* Yönetici özeti (js/yonetici.js) */
#adminOverviewModal .modal-card.yonetici-kart { max-width: 1120px; width: calc(100% - 24px); }
.yonetici-ozet { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.yonetici-sayi { padding: 10px 12px; border: 1px solid var(--sk-line); border-radius: 10px; background: var(--sk-surface); }
.yonetici-sayi strong { display: block; font-size: 22px; color: var(--sk-fg); }
.yonetici-sayi span { font-size: 12px; color: var(--sk-muted); }
.yonetici-not { margin: 8px 0; font-size: 13px; color: var(--sk-muted); }
.yonetici-durum { margin: 6px 0; font-size: 13px; color: var(--sk-good); }
.yonetici-durum.yonetici-hata { color: var(--sk-bad); }
.yonetici-durum:empty { display: none; }
.yonetici-baslik-satir { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.yonetici-baslik { margin: 16px 0 6px; font-size: 14px; color: var(--sk-fg); }
.yonetici-baslik-satir .yonetici-baslik { margin: 0; }
#adminUserSearch { width: 260px; max-width: 55%; margin: 0; padding: 7px 10px; font-size: 13px; }
.yonetici-tablo-kutu { overflow: auto; max-height: 420px; border: 1px solid var(--sk-line); border-radius: 8px; margin-top: 6px; }
.yonetici-tablo { width: 100%; border-collapse: collapse; font-size: 13px; }
.yonetici-tablo th, .yonetici-tablo td { padding: 8px; border-bottom: 1px solid var(--sk-line); text-align: left; vertical-align: top; color: var(--sk-fg); }
.yonetici-tablo th { position: sticky; top: 0; z-index: 1; background: var(--sk-surface-2, var(--sk-surface)); white-space: nowrap; font-size: 12px; }
.yonetici-tablo td { min-width: 110px; }
.yonetici-tablo td:nth-child(4) { min-width: 240px; }
.yonetici-ad { font-weight: 600; }
.yonetici-kucuk { font-size: 12px; color: var(--sk-muted); overflow-wrap: anywhere; }
.yonetici-sayi-hucre { text-align: right !important; font-variant-numeric: tabular-nums; min-width: 70px !important; }
.yonetici-bos { text-align: center !important; color: var(--sk-muted) !important; }
.yonetici-magaza + .yonetici-magaza { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--sk-line); }
.yonetici-magaza-ad { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; overflow-wrap: anywhere; }
.yonetici-pazar { flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: var(--sk-accent-soft); color: var(--sk-accent); }
.yonetici-pasif { opacity: .6; }
.yonetici-hata-metin { font-size: 12px; color: var(--sk-bad); overflow-wrap: anywhere; }
.yonetici-etiket { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.yonetici-etiket-yesil { background: var(--sk-good-soft); color: var(--sk-good); }
.yonetici-etiket-sari { background: var(--sk-warn-soft); color: var(--sk-warn); }
.yonetici-etiket-kirmizi { background: var(--sk-bad-soft); color: var(--sk-bad); }
.yonetici-etiket-gri { background: var(--sk-line); color: var(--sk-muted); }
.yonetici-islem { white-space: nowrap; }
.yonetici-islem .yonetici-dugme + .yonetici-dugme { margin-left: 6px; }
.yonetici-dugme { padding: 4px 10px; border: 1px solid var(--sk-line); border-radius: 6px; background: var(--sk-surface); color: var(--sk-fg); cursor: pointer; font-size: 12px; }
.yonetici-dugme-sil { color: var(--sk-bad); }
.yonetici-yedek { display: grid; gap: 6px; font-size: 13px; color: var(--sk-fg); }
.yonetici-yedek-durum { white-space: normal; border-radius: 8px; padding: 6px 10px; justify-self: start; }
.yonetici-yedek-yer { overflow-wrap: anywhere; }
.yonetici-yedek .yonetici-dugme { justify-self: start; }
.yonetici-ac-kapa summary { cursor: pointer; color: var(--sk-muted); font-size: 12px; }
.yonetici-kayit { display: grid; gap: 4px; margin-top: 6px; max-height: 220px; overflow: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.yonetici-ozet-metin { margin: 6px 0 0; padding: 10px 12px; border: 1px solid var(--sk-line); border-radius: 8px; background: var(--sk-surface-2, var(--sk-surface)); color: var(--sk-fg); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.yonetici-geri { display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.yonetici-geri-oge { padding: 8px 10px; border: 1px solid var(--sk-line); border-radius: 8px; background: var(--sk-surface); }
.yonetici-okunmamis { border-left: 3px solid var(--sk-accent); }
.yonetici-geri-ust { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.yonetici-geri-metin { margin-top: 4px; font-size: 13px; color: var(--sk-fg); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .yonetici-ozet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yonetici-baslik-satir { flex-wrap: wrap; }
  #adminUserSearch { width: 100%; max-width: none; }
}

/* Tahmin ile Trendyol'un kestiği (js/dogrulama.js, PLAN G16) */
.dg-sonuc { margin-top: 8px; font-size: 13px; color: var(--sk-fg); }
.dg-sonuc:empty { display: none; }
.dg-ozet { margin: 6px 0; font-weight: 600; }
.dg-iyi { color: var(--sk-good); }
.dg-kotu { color: var(--sk-bad); }
.dg-tablo-kutu { overflow: auto; max-height: 360px; border: 1px solid var(--sk-line); border-radius: 8px; margin: 8px 0; }
.dg-tablo { width: 100%; border-collapse: collapse; font-size: 12px; }
.dg-tablo th, .dg-tablo td { padding: 6px 8px; border-bottom: 1px solid var(--sk-line); text-align: left; vertical-align: top; }
.dg-tablo th { position: sticky; top: 0; background: var(--sk-surface-2, var(--sk-surface)); font-size: 11px; }
.dg-tablo td { font-variant-numeric: tabular-nums; }
.dg-fark { color: var(--sk-bad); font-size: 11px; }

/* Kayıttan sonraki karşılama notu (js/hosgeldin.js) */
.sk-hosgeldin {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: -6px auto 16px; max-width: var(--sk-max); width: calc(100% - 32px); box-sizing: border-box;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--sk-good); background: var(--sk-good-soft);
  color: var(--sk-fg); font-size: 14px; line-height: 1.5;
}
.sk-hosgeldin-metin { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.sk-hosgeldin-metin span { overflow-wrap: anywhere; }
.sk-hosgeldin-kod { font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sk-hosgeldin .btn-secondary { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; }

/* Gecici sifre ve yeni sifre belirleme (PLAN Y1, client/js/sifre.js). Giris ekraninin ve bildirim penceresinin ustunde acilir. */
.modal-overlay.sifre-ust { z-index: 10001; }
.sifre-metin { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--sk-fg); }
.sifre-kutu { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 12px 14px; border: 1px dashed var(--sk-line, #d9cfc4); border-radius: 12px; background: var(--sk-soft, rgba(0, 0, 0, .03)); }
.sifre-kutu code { flex: 1 1 auto; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 20px; font-weight: 600; letter-spacing: .06em; color: var(--sk-fg); user-select: all; overflow-wrap: anywhere; }
.sifre-liste { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--sk-fg); }
.sifre-liste li + li { margin-top: 4px; }
#setPasswordStatus.sifre-hata { color: var(--sk-bad); }
