/* Flux B2B istemci tasarımı: ortak stil (onaylı tasarım tuvalinden birebir; web uygulaması için tek değişiklik: gövde yüksekliği ve odak halkaları) */
:root {
  --ink: #1F2433;
  --muted: #6B7084;
  --line: #E2E5EC;
  --mist: #F5F6FA;
  --paper: #FFFFFF;
  --slate: #2A3042;
  --slate-2: #3D4356;
  --blue: #556EE6;
  --blue-d: #3F55D0;
  --green: #1E9E6F;
  --amber: #C98A1B;
  --red: #D64B4B;
  --accent: #556EE6;
  --accent-ink: #FFFFFF;
  --accent-soft: #EEF1FD;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Poppins, "Poppins Fallback", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--accent); }
a:hover { color: var(--ink); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }

/* Düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.94); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); border-color: var(--muted); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn:focus-visible, .input:focus-visible, .rail a:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Form */
.label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper); font: inherit; font-size: 14px; color: var(--ink);
}
.input::placeholder { color: #9A9EB0; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.help { font-size: 12px; color: var(--muted); }

/* Tablo */
.tbl-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFD;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFBFE; }
.num { text-align: right; }
.code { color: var(--muted); font-size: 12px; }
.qty { width: 72px; height: 36px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font: inherit; font-size: 13px; }

/* Stok durumu — renk + metin birlikte */
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock-ok { color: var(--green); }
.stock-low { color: var(--amber); }
.stock-out { color: var(--red); }

/* Web kabuğu: daraltılabilir sol şerit + içerik (onaylı tasarımdan web için genişletildi: şerit açıkken ikon+metin, kapalıyken yalnız ikon) */
.shell { display: flex; min-height: 100%; --rail-w: 224px; }
.shell.rail-collapsed { --rail-w: 68px; }
.rail {
  width: var(--rail-w); flex: 0 0 var(--rail-w); background: var(--slate); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; align-self: flex-start; transition: width .18s ease, flex-basis .18s ease; z-index: 25;
}
.rail-head {
  height: 68px; flex: 0 0 68px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); overflow: hidden;
}
.rail-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; height: 100%; }
.rail-logo:hover { color: #fff; }
.rail-logo svg { width: 28px; height: 28px; flex: 0 0 auto; }
.rail-wordmark { font-size: 20px; font-weight: 600; letter-spacing: -.6px; line-height: 1; }
.rail-toggle {
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #B9BDCC; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.rail-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.rail-toggle svg { width: 20px; height: 20px; }
.rail-links { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; flex: 1; }
.rail-links a {
  position: relative; display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; border-radius: 8px;
  color: #B9BDCC; font-size: 14px; font-weight: 500; text-decoration: none; line-height: 1; white-space: nowrap;
}
.rail-links a:hover { color: #fff; background: rgba(255,255,255,.05); }
.rail-links a.on { color: #fff; background: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 var(--accent); }
.rail svg { width: 22px; height: 22px; }
.rail-links svg { flex: 0 0 auto; }
.rail-links .spacer { flex: 1; }
.rail-label { overflow: hidden; text-overflow: ellipsis; }
.shell.rail-collapsed .rail-head { justify-content: center; padding: 0; }
.shell.rail-collapsed .rail-logo { display: none; }
.shell.rail-collapsed .rail-links a { justify-content: center; padding: 0; gap: 0; }
.shell.rail-collapsed .rail-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell.rail-collapsed .rail-links a:hover::after, .shell.rail-collapsed .rail-links a:focus-visible::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); z-index: 40; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; line-height: 1; padding: 8px 10px; border-radius: 6px; white-space: nowrap;
}
.main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; flex: 0 0 68px; background: var(--paper); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 24px; padding: 0 clamp(16px, 2.5vw, 40px); position: sticky; top: 0; z-index: 20;
}
.search { flex: 1; max-width: 520px; position: relative; }
.search .input { height: 40px; padding-left: 40px; background: var(--mist); border-color: transparent; }
.search svg { position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; color: var(--muted); }
.iconbtn {
  width: 40px; height: 40px; border-radius: 8px; border: 0; background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.iconbtn:hover { background: var(--mist); }
.iconbtn svg { width: 22px; height: 22px; }
.dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.content { padding: 28px clamp(16px, 2.5vw, 40px) 48px; width: 100%; }

/* Firma kimliği: monogram + ad, dikeyde ortalı, sağında ayırıcı çizgi */
.mono {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 17px; line-height: 1; flex: 0 0 auto;
}
.firm { display: flex; align-items: center; gap: 14px; min-width: 0; height: 44px; padding-right: 24px; border-right: 1px solid var(--line); }
.firm-text { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.firm .name { font-weight: 600; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.firm .sub { font-size: 12px; color: var(--muted); line-height: 1.25; }

/* Kampanya bandı (cms hero) */
.band {
  background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 32px 36px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; position: relative; overflow: hidden;
}
.band h2 { font-size: 26px; font-weight: 600; line-height: 1.2; max-width: 22ch; }
.band p { opacity: .85; margin-top: 8px; max-width: 48ch; }
.band .btn-primary { background: #fff; color: var(--ink); }
.band .btn-primary:hover { color: var(--ink); }
/* Editörün verdiği renkler (satır içi stil: --band-ink metin, --band-bg arka plan): düğme metin/arka plan renklerini ters çevirir, kontrast korunur. */
.band-custom .btn-primary, .band-custom .btn-primary:hover { background: var(--band-ink); color: var(--band-bg, var(--accent)); }
.band .strokes { position: absolute; right: -40px; top: -60px; width: 320px; height: 320px; opacity: .12; }

/* Hızlı işlemler — dikey çizgilerle ayrılmış tek satır */
.qa { display: flex; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.qa a {
  flex: 1 1 180px; display: flex; align-items: center; gap: 12px; padding: 16px 20px; text-decoration: none; color: var(--ink);
  border-right: 1px solid var(--line); min-width: 0;
}
.qa a:last-child { border-right: 0; }
.qa a:hover { background: #FAFBFE; }
.qa svg { width: 22px; height: 22px; color: var(--accent); flex: 0 0 auto; }
.qa .t { font-weight: 500; font-size: 14px; line-height: 1.2; }
.qa .d { font-size: 12px; color: var(--muted); line-height: 1.2; margin-top: 2px; }

/* Bölüm başlığı */
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.sec h3 { font-size: 16px; font-weight: 600; }
.sec a { font-size: 13px; text-decoration: none; }

/* Duyuru listesi */
.news { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.news div { display: flex; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: baseline; }
.news div:last-child { border-bottom: 0; }
.news time { font-size: 12px; color: var(--muted); flex: 0 0 76px; font-variant-numeric: tabular-nums; }

/* Android kabuğu */
.phone { width: 390px; height: 844px; background: var(--mist); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.phone .scroll { flex: 1; overflow: hidden; }
.tabbar { height: 72px; background: var(--paper); border-top: 1px solid var(--line); display: flex; padding: 6px 4px 10px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 500; text-decoration: none; border-radius: 10px; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--accent); }
.tab .badge { position: absolute; margin-left: 22px; margin-top: -26px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.apphead { background: var(--paper); border-bottom: 1px solid var(--line); padding: 14px 16px 12px; display: flex; align-items: center; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.row:last-child { border-bottom: 0; }
.row .t { font-size: 13px; font-weight: 500; line-height: 1.25; }
.row .d { font-size: 12px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.row .p { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--accent-soft); flex: 0 0 auto; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Telefon genişliği (web sayfaları): şerit üstte yatay, simge üstte metin altta (eski davranış) */
@media (max-width: 720px) {
  .shell, .shell.rail-collapsed { flex-direction: column; --rail-w: auto; }
  .rail { width: auto; flex: 0 0 auto; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; padding: 0 6px; transition: none; }
  .rail-head { display: none; }
  .rail-links { flex-direction: row; padding: 0; gap: 0; }
  .rail-links a, .shell.rail-collapsed .rail-links a { flex-direction: column; justify-content: center; height: auto; gap: 5px; padding: 10px 12px; min-width: 70px; font-size: 11px; border-radius: 0; }
  .rail-links a.on { box-shadow: inset 0 -3px 0 var(--accent); background: transparent; }
  .rail-links .spacer { display: none; }
  .shell.rail-collapsed .rail-label { position: static; width: auto; height: auto; overflow: hidden; clip: auto; white-space: nowrap; }
  .shell.rail-collapsed .rail-links a::after { display: none; }
  .topbar { padding: 0 16px; gap: 10px; position: static; }
  .firm { padding-right: 12px; }
  .firm .name { max-width: 150px; }
  .search { display: none; }
  .hide-sm { display: none !important; }
  .content { padding: 16px; }
  .band { padding: 22px; flex-direction: column; align-items: flex-start; }
  .band h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .stroke, .sweep { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .rail { transition: none; }
}
