/* =========================================================================
   Orenda Teklif — arayuz stilleri
   Masaustunde yogun (Excel benzeri) kullanim, mobilde dokunmatik uyumlu.
   ========================================================================= */

:root {
  --accent: #1d4ed8;
  --accent-dark: #1e40af;
  --accent-soft: #eff4ff;
  --bg: #eef2f7;
  --panel: #ffffff;
  --border: #dbe3ec;
  --border-strong: #c4d0de;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --info-soft: #e0f2fe;
  --row-h: 26px;
  --topbar-h: 60px;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .07);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body { overflow: hidden; }
.hidden { display: none !important; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #c7d2de; border-radius: 6px; border: 2px solid #f1f5f9; }
::-webkit-scrollbar-thumb:hover { background: #a8b8c8; }

/* ---------------------------------------------------------------- giris */
.login-screen {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: linear-gradient(140deg, #1e3a8a 0%, #1d4ed8 45%, #0ea5e9 100%);
  padding: 20px; z-index: 100;
}
.login-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 14px;
  padding: 30px 28px 22px; box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-bottom: 22px; }
.login-logo {
  width: 46px; height: 46px; border-radius: 11px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
}
.login-brand h1 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.login-brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.login-error {
  background: var(--danger-soft); color: var(--danger); padding: 8px 11px;
  border-radius: var(--radius); font-size: 12px; margin-bottom: 12px;
}
.login-remember { display: flex; margin: 2px 0 14px; padding: 4px 0; font-size: 13px; user-select: none; }
.login-remember input { width: 18px; height: 18px; accent-color: var(--accent); }
.login-remember small { color: var(--muted); font-size: 11.5px; }
.login-foot { text-align: center; margin-top: 16px; font-size: 11px; color: var(--muted-2); }

.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 11.5px; font-weight: 600; color: #475569; margin-bottom: 4px; }
.field input, .field select, .field textarea,
.inp {
  width: 100%; padding: 7px 9px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff; outline: none; transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 78, 216, .13);
}
.field textarea, textarea.inp { resize: vertical; min-height: 62px; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* ---------------------------------------------------------------- butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: #fff; color: var(--text); cursor: pointer; font-size: 12.5px; font-weight: 500;
  white-space: nowrap; transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: #f6f8fb; border-color: var(--muted-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; border-color: #991b1b; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #166534; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #eaeff5; }
.btn-sm { padding: 3px 8px; font-size: 11.5px; }
.btn-lg { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 4px 7px; }

/* ---------------------------------------------------------------- ust menu */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

.topbar {
  height: var(--topbar-h); flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc); border-bottom: 1px solid var(--border);
  padding: 0 10px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); position: relative; z-index: 40;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 4px; flex: 0 0 auto; text-decoration: none; border-radius: 8px; }
.topbar-brand:hover { text-decoration: none; opacity: .85; }
.topbar-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-logo { height: 38px; width: auto; display: block; }
.login-logo-img { height: 42px; width: auto; display: block; }
.brand-mark {
  width: 27px; height: 27px; border-radius: 7px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.brand-name { font-size: 16px; font-weight: 500; color: #334155; letter-spacing: -.2px; padding-left: 10px; border-left: 1px solid var(--border); line-height: 26px; }
.brand-name b { color: var(--accent); font-weight: 700; }

.menu-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; padding: 2px 8px; }

.topnav { display: flex; align-items: center; gap: 1px; flex: 1 1 auto; min-width: 0; }
.nav-item {
  display: inline-flex; align-items: center; gap: 4px; padding: 9px 13px; border-radius: var(--radius);
  color: #334155; font-size: 14px; font-weight: 500; border: none; background: none;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.nav-item:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item i { font-style: normal; font-size: 9px; opacity: .65; }
.nav-group { position: relative; }
.nav-menu {
  position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg);
  padding: 5px; z-index: 120; margin-top: 4px;
  /* Kapaliyken gorunmez ama tiklama hedefi olusturmaz */
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-4px); transition: opacity .12s, transform .12s;
}
.nav-menu-right { left: auto; right: 0; }
.nav-group.open > .nav-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
}
/* Fare ile calisan cihazlarda uzerine gelince de acilir (JS'e bagimli kalmaz) */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .nav-group:hover > .nav-menu {
    opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  }
  /* Butonla menu arasindaki bosluk fare kacisi yaratmasin */
  .nav-group::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 6px; }
}
.nav-parent { position: relative; z-index: 1; }
.nav-sub {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 5px;
  color: #334155; font-size: 12.5px; border: none; background: none; cursor: pointer; text-decoration: none;
}
.nav-sub:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.nav-sub.danger { color: var(--danger); }
.nav-sub.danger:hover { background: var(--danger-soft); }
.user-head { padding: 8px 10px 9px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.user-head strong { display: block; font-size: 13px; }
.user-head small { color: var(--muted); font-size: 11px; }

.topbar-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.rate-chip {
  display: flex; gap: 9px; font-size: 11.5px; color: #475569; background: #f1f5f9;
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 11px; white-space: nowrap;
}
.rate-chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.user-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
  border: none; font-size: 11.5px; font-weight: 700; cursor: pointer; letter-spacing: .3px;
}

/* ---------------------------------------------------------------- sayfa govdesi */
/* min-height:0 olmadan flex ogesi icerigine gore buyur ve overflow calismaz */
.view { flex: 1 1 auto; overflow: auto; min-height: 0; position: relative; }
.page { padding: 12px 14px 24px; max-width: 100%; }
.view.page-full { padding: 0; overflow: hidden; display: flex; flex-direction: column; }

.page-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.page-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.page-head .spacer { flex: 1 1 auto; }
.page-sub { color: var(--muted); font-size: 12px; margin: -6px 0 12px; }

.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.panel-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 13px;
}
.panel-head .spacer { flex: 1 1 auto; }
.panel-body { padding: 12px; }
.panel-body.tight { padding: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }

/* ---------------------------------------------------------------- kartlar */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px;
  box-shadow: var(--shadow);
}
.stat-card .label { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.stat-card .value { font-size: 21px; font-weight: 650; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-card .value small { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat-card .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat-card.accent { border-left: 3px solid var(--accent); }
.stat-card.ok { border-left: 3px solid var(--ok); }
.stat-card.warn { border-left: 3px solid var(--warn); }
.stat-card.danger { border-left: 3px solid var(--danger); }

/* ---------------------------------------------------------------- tablolar */
.table-wrap { overflow: auto; max-width: 100%; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.tbl th {
  position: sticky; top: 0; background: #f4f7fb; text-align: left; font-weight: 600; font-size: 11.5px;
  color: #475569; padding: 7px 9px; border-bottom: 1px solid var(--border); white-space: nowrap; z-index: 2;
}
table.tbl th.num, table.tbl td.num { text-align: right; }
table.tbl td { padding: 5px 9px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
table.tbl tbody tr:hover { background: #f8fafc; }
table.tbl tbody tr.selected { background: var(--accent-soft); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tfoot td { padding: 7px 9px; font-weight: 600; border-top: 2px solid var(--border); background: #f8fafc; }
.tbl-empty { padding: 34px 14px; text-align: center; color: var(--muted); }

.chip {
  display: inline-block; padding: 1px 8px; border-radius: 11px; font-size: 11px; font-weight: 600;
  background: #f1f5f9; color: #475569; white-space: nowrap;
}
.chip.draft { background: #f1f5f9; color: #475569; }
.chip.sent { background: var(--info-soft); color: #0369a1; }
.chip.revised { background: var(--warn-soft); color: var(--warn); }
.chip.won { background: var(--ok-soft); color: var(--ok); }
.chip.lost { background: var(--danger-soft); color: var(--danger); }
.chip.cancelled { background: #e2e8f0; color: #64748b; }

.toolbar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 8px 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px; margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.toolbar .inp, .toolbar select { width: auto; min-width: 130px; }
.search-inp { min-width: 220px !important; }

/* ---------------------------------------------------------------- teklif duzenleme + excel grid */
.qe { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.qe-head {
  flex: 0 0 auto; background: var(--panel); border-bottom: 1px solid var(--border); padding: 7px 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.qe-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.qe-title .no { font-family: var(--mono); font-size: 13px; color: var(--accent); }

.qe-meta {
  flex: 0 0 auto; background: #f8fafc; border-bottom: 1px solid var(--border); padding: 8px 12px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px 12px;
}
.qe-meta.collapsed { display: none; }
.mini-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-field > label { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.mini-field input, .mini-field select, .mini-field textarea {
  padding: 4px 7px; border: 1px solid var(--border-strong); border-radius: 5px; background: #fff;
  outline: none; font-size: 12.5px; width: 100%;
}
.mini-field input:focus, .mini-field select:focus, .mini-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 2px rgba(29, 78, 216, .12);
}

.qe-body { flex: 1 1 auto; display: flex; min-height: 0; }
.qe-grid-wrap { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.qe-side {
  flex: 0 0 262px; border-left: 1px solid var(--border); background: var(--panel);
  overflow: auto; padding: 10px;
}

.grid-toolbar {
  display: flex; align-items: center; gap: 5px; padding: 5px 8px; background: var(--panel);
  border-bottom: 1px solid var(--border); flex-wrap: wrap; flex: 0 0 auto;
}
.grid-scroll { flex: 1 1 auto; overflow: auto; background: #fff; position: relative; }

/* Excel benzeri dar hucreli tablo */
table.xl {
  border-collapse: separate; border-spacing: 0; font-size: 12px; width: max-content; min-width: 100%;
  table-layout: fixed;
}
table.xl th {
  position: sticky; top: 0; z-index: 3; background: #eef2f7; color: #475569; font-weight: 600;
  font-size: 11px; padding: 0 5px; height: 24px; text-align: center; white-space: nowrap;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border-strong);
  user-select: none;
}
table.xl td {
  height: var(--row-h); padding: 0; border-right: 1px solid #edf1f6; border-bottom: 1px solid #edf1f6;
  background: #fff; position: relative; overflow: hidden;
}
table.xl tr.row-item:hover td { background: #fafcff; }
table.xl tr.row-group td { background: #eef4ff; font-weight: 600; color: var(--accent-dark); }
table.xl tr.row-note td { background: #fffdf5; color: #713f12; font-style: italic; }
table.xl tr.row-spacer td { background: #f8fafc; height: 12px; }
table.xl tr.optional td { background: #fbfbfb; color: #64748b; }
table.xl tr.dragging { opacity: .45; }
table.xl tr.drop-target td { border-top: 2px solid var(--accent); }

.xl-cell {
  display: block; width: 100%; height: 100%; padding: 0 5px; line-height: var(--row-h);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: cell; outline: none;
}
.xl-cell.num { text-align: right; font-variant-numeric: tabular-nums; }
.xl-cell.center { text-align: center; }
.xl-cell.readonly { background: #f8fafc; color: #475569; cursor: default; }
.xl-cell.calc { background: #f7fafc; font-weight: 600; }

td.sel { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 2; }
td.in-range { background: rgba(29, 78, 216, .07) !important; }
td.editing { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 5; overflow: visible; }
.xl-input {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none; padding: 0 5px;
  font: inherit; background: #fff; outline: none; z-index: 6;
}
.xl-input.num { text-align: right; }

/* satir basi (numara + tutamac) */
td.rowhead {
  position: sticky; left: 0; z-index: 2; background: #f4f7fb; text-align: center; color: var(--muted);
  font-size: 10.5px; border-right: 1px solid var(--border-strong); cursor: grab; user-select: none;
}
th.rowhead { position: sticky; left: 0; z-index: 4; }
tr.row-selected td.rowhead { background: var(--accent); color: #fff; }

.cell-img {
  width: 22px; height: 22px; object-fit: cover; border-radius: 3px; border: 1px solid var(--border);
  display: block; margin: 2px auto; cursor: pointer; background: #f8fafc;
}
.cell-img-empty {
  width: 22px; height: 22px; border: 1px dashed var(--border-strong); border-radius: 3px; margin: 2px auto;
  display: grid; place-items: center; color: var(--muted-2); font-size: 11px; cursor: pointer;
}
.cell-img-empty:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ürün arama açılır listesi */
.ac-list {
  position: fixed; z-index: 300; background: #fff; border: 1px solid var(--border-strong);
  border-radius: 7px; box-shadow: var(--shadow-lg); max-height: 300px; overflow: auto; min-width: 380px;
}
.ac-item { padding: 6px 10px; cursor: pointer; border-bottom: 1px solid #f1f5f9; font-size: 12.5px; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: var(--accent-soft); }
.ac-item .code { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.ac-item .name { font-weight: 500; }
.ac-item .meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px; margin-top: 1px; }
.ac-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12px; }

/* toplam paneli */
.totals { font-size: 12.5px; }
.totals-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.totals-row.grand {
  border-top: 2px solid var(--border); margin-top: 5px; padding-top: 7px; font-size: 15px; font-weight: 700;
}
.totals-row.grand .v { color: var(--accent); }
.totals-row .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.totals-row.dim { color: var(--muted); font-size: 11.5px; }

.side-block { margin-bottom: 13px; }
.side-block h4 {
  margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
  font-weight: 700;
}

/* ---------------------------------------------------------------- teklif takibi */
.btn-xs { padding: 2px 7px; font-size: 11px; min-height: 24px; }
.outcome-box { border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 12px; border: 1px solid; }
.outcome-box.won { background: var(--ok-soft); border-color: #86efac; }
.outcome-box.lost { background: var(--danger-soft); border-color: #fca5a5; }
.outcome-title { font-weight: 700; margin-bottom: 4px; }
.outcome-box.won .outcome-title { color: var(--ok); }
.outcome-box.lost .outcome-title { color: var(--danger); }
.outcome-row { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.outcome-row span { color: #475569; }
.outcome-note { margin-top: 4px; color: #334155; white-space: pre-wrap; }
.chance-chips { display: flex; gap: 4px; }
.chance {
  flex: 1 1 0; min-height: 30px; border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; padding: 0;
}
.chance.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chance:disabled { opacity: .6; cursor: default; }
.act { border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; margin-bottom: 7px; background: #fbfcfe; font-size: 12px; }
.act-head { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.act-head .chip { font-size: 10px; padding: 1px 6px; }
.act-icon { font-size: 13px; }
.act-person { color: #475569; margin-top: 3px; }
.act-note { margin-top: 4px; white-space: pre-wrap; color: var(--text); line-height: 1.4; overflow-wrap: anywhere; }
.act-next {
  display: flex; align-items: center; gap: 6px; justify-content: space-between; margin-top: 5px; padding: 4px 6px;
  background: var(--accent-soft); color: var(--accent-dark); border-radius: 6px; font-weight: 500;
}
.act-next.late { background: var(--danger-soft); color: var(--danger); }
.act-next.done { background: #f1f5f9; color: var(--muted); text-decoration: line-through; }
.act-next.done .btn { text-decoration: none; }
.act-foot { display: flex; align-items: center; gap: 4px; margin-top: 5px; }
.seg { display: flex; gap: 4px; margin-top: 2px; }
.seg-btn {
  flex: 1 1 0; min-height: 36px; border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius);
  cursor: pointer; font-size: 13px; font-weight: 600; color: #475569;
}
.seg-btn.on.won { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.seg-btn.on.draft { background: #e2e8f0; border-color: #64748b; color: #334155; }
.seg-btn.on.lost { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.act-dialog-next { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 4px; }
.chip.followup { background: var(--accent-soft); color: var(--accent-dark); }
.chip.followup.late { background: var(--danger-soft); color: var(--danger); }

/* ---------------------------------------------------------------- modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .48); display: grid; place-items: center;
  z-index: 200; padding: 16px; overflow: auto;
}
.modal {
  background: #fff; border-radius: 11px; box-shadow: var(--shadow-lg); width: 100%; max-width: 540px;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column;
}
.modal.wide { max-width: 900px; }
.modal.xwide { max-width: 1200px; }
.modal-head {
  padding: 12px 15px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-body { padding: 14px 15px; overflow: auto; flex: 1 1 auto; }
.modal-foot {
  padding: 10px 15px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end;
  background: #f8fafc; border-radius: 0 0 11px 11px;
}
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; }

/* ---------------------------------------------------------------- toast + yukleyici */
.toast-host { position: fixed; bottom: 16px; right: 16px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #0f172a; color: #fff; padding: 9px 14px; border-radius: 7px; box-shadow: var(--shadow-lg);
  font-size: 12.5px; max-width: 400px; animation: toast-in .18s ease-out;
}
.toast.ok { background: #14532d; }
.toast.err { background: #7f1d1d; }
.toast.warn { background: #78350f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.loader { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 500; background: rgba(29, 78, 216, .15); }
.loader-bar { height: 100%; width: 30%; background: var(--accent); animation: load 1s infinite ease-in-out; }
@keyframes load { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

.spinner {
  width: 15px; height: 15px; border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- yetki matrisi */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.perm-group h4 { margin: 0 0 7px; font-size: 12px; color: var(--accent); }
.perm-item { display: flex; gap: 7px; align-items: flex-start; padding: 3px 0; font-size: 12px; }
.perm-item input { margin: 2px 0 0; }

.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; }
.check input { margin: 0; }

/* ---------------------------------------------------------------- ice aktarma sihirbazi */
.import-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.import-step {
  flex: 1; padding: 7px 10px; border-radius: 7px; background: #f1f5f9; color: var(--muted);
  font-size: 12px; font-weight: 600; text-align: center;
}
.import-step.active { background: var(--accent); color: #fff; }
.import-step.done { background: var(--ok-soft); color: var(--ok); }
.map-table td { padding: 4px 6px; }
.map-table select { min-width: 165px; }
.preview-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 7px; }
.preview-wrap table { font-size: 11.5px; }

.dropzone {
  border: 2px dashed var(--border-strong); border-radius: 11px; padding: 30px; text-align: center;
  color: var(--muted); cursor: pointer; transition: .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------------- basit grafik */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; padding: 6px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; }
.bar {
  width: 100%; max-width: 42px; background: linear-gradient(180deg, #3b82f6, var(--accent));
  border-radius: 3px 3px 0 0; min-height: 2px; position: relative;
}
.bar.won { background: linear-gradient(180deg, #22c55e, var(--ok)); }
.bar-label { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.bar-val { font-size: 9.5px; color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- mobil */
@media (max-width: 900px) {
  :root { --row-h: 32px; }
  body { font-size: 14px; }
  .menu-toggle { display: block; order: 3; margin-left: auto; }
  .topbar { flex-wrap: wrap; height: auto; padding: 6px 10px; }
  .topbar-right { order: 2; margin-left: auto; }
  .topnav {
    order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .2s;
  }
  .topnav.open { max-height: 75vh; overflow: auto; padding: 6px 0; }
  .nav-item { padding: 10px 12px; border-radius: 0; }
  /* yalniz ana menu acilir listeleri duz akar; sag ustteki kullanici menusu acilir kalir */
  .topnav .nav-menu { position: static; display: none; box-shadow: none; border: none; border-left: 2px solid var(--accent-soft); margin: 0 0 4px 12px; padding: 0; transform: none; }
  /* akordeon: dokunulan grup acilir, kapaliyken yer kaplamaz */
  .topnav .nav-group.open > .nav-menu { display: block; }
  .topnav .nav-group.open > .nav-parent i { transform: rotate(180deg); }
  .nav-sub { padding: 9px 12px; }
  .rate-chip { font-size: 10.5px; padding: 2px 8px; gap: 6px; }
  .brand-name { display: none; }
  .brand-logo { height: 32px; }
  .topbar-brand { padding-right: 6px; }
  .topbar-right { gap: 6px; }
  .user-btn { width: 34px; height: 34px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .qe-body { flex-direction: column; }
  .qe-side { flex: 0 0 auto; border-left: none; border-top: 1px solid var(--border); max-height: 45vh; }
  .qe-side.side-open { max-height: 78vh; }
  .modal .field-row { grid-template-columns: 1fr; gap: 0; }
  .btn-xs { min-height: 32px; padding: 4px 10px; font-size: 12px; }
  .chance { min-height: 38px; font-size: 13px; }
  .act { font-size: 13px; }
  .qe-meta { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .modal { max-width: 100%; }
  .search-inp { min-width: 150px !important; flex: 1 1 100%; }
  .page { padding: 10px; }
  table.xl { font-size: 13px; }
  .hide-sm { display: none !important; }
}

@media (min-width: 1600px) {
  .page { padding: 14px 20px 28px; }
}

@media print {
  .topbar, .toolbar, .qe-side, .grid-toolbar { display: none !important; }
  body, .view { overflow: visible; height: auto; }
}

/* cok dar telefonlar: logo + kur + kullanici + menu tek satira sigsin */
@media (max-width: 400px) {
  .brand-logo { height: 26px; }
  .topbar { padding: 6px 8px; }
  .topbar-right { gap: 4px; }
  .rate-chip { font-size: 10px; padding: 2px 6px; gap: 5px; }
  .menu-toggle { padding: 2px 4px; }
}

/* rapor: kayip sebebi cubugu */
.reason-bar { height: 4px; background: #f1f5f9; border-radius: 2px; margin-top: 3px; max-width: 220px; }
.reason-bar i { display: block; height: 100%; background: var(--danger); border-radius: 2px; opacity: .7; }
.neg { color: var(--danger); font-weight: 600; }

/* pano: takip edilecek gorusmeler */
.fu-list { display: flex; flex-direction: column; }
.fu-item { display: flex; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.fu-item:first-child { border-top: none; }
.fu-item:hover { background: var(--accent-soft); text-decoration: none; }
.fu-when { flex: 0 0 150px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.fu-main { flex: 1 1 auto; min-width: 0; }
.fu-action { font-weight: 500; }
.fu-sub { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .fu-item { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 12px; }
  .fu-when { flex: none; flex-direction: row; align-items: center; gap: 8px; }
}

/* sifre alani: uret / kopyala / goster */
.pw-wrap { display: flex; gap: 4px; align-items: stretch; }
.pw-wrap .inp { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pw-btn { flex: 0 0 auto; padding: 4px 9px; white-space: nowrap; }
@media (max-width: 900px) { .pw-btn { min-height: 38px; } }

/* modal icindeki yan yana onay kutulari birbirine yapismasin */
.modal-body .check { margin-right: 16px; }
/* telefonda bildirim ustte: alttaki modal dugmelerini (Kaydet) ortmesin */
@media (max-width: 600px) {
  .toast-host { top: 10px; bottom: auto; left: 10px; right: 10px; }
  .toast { max-width: none; }
}

/* musteri fiyat grubu etiketi */
.chip.pgroup { background: #ede9fe; color: #5b21b6; font-weight: 700; }
.group-info { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border); }

/* tablo hucresinde tek satir kisa aciklama (masaustu 380px, telefonda dar) */
.cell-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
@media (max-width: 600px) {
  .cell-desc { max-width: 150px; }
  table.tbl td, table.tbl th { padding: 5px 6px; }
}
@media (max-width: 600px) { .hide-xs { display: none !important; } }

/* ---------------------------------------------------------------- fiyat kataloglari */
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cat-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 12px; background: var(--panel);
  border: 1px solid var(--border); color: inherit; text-decoration: none; position: relative; overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05); transition: box-shadow .15s, transform .15s;
}
.cat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #84cc16; }
.cat-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .1); transform: translateY(-1px); text-decoration: none; }
.cat-card-top { display: flex; gap: 6px; align-items: center; }
.cat-badge { background: #0b1324; color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; letter-spacing: .3px; }
.cat-card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.cat-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.empty-state { text-align: center; padding: 36px 16px; }
.empty-state .empty-icon { font-size: 40px; }
.empty-state h3 { margin: 6px 0; }
.cat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.cat-main, .cat-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cat-layout .panel { margin: 0; }
.cover-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cover-slot { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fbfcfe; }
.cover-slot.filled { border-style: solid; border-color: var(--border); background: #fff; }
.cover-slot img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 6px; }
.cover-empty { aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 8px, #f1f5f9 8px, #f1f5f9 16px); border-radius: 6px; }
.cover-cap { min-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick-item { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.pick-item:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pick-item img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pick-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.cat-check { display: flex; gap: 8px; align-items: center; padding: 5px 0; }
.cat-check small { margin-left: auto; }
.share-url { font-size: 12px; }
.diff-box { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 8px 0 12px; max-height: 260px; overflow: auto; }
.diff-row { display: flex; gap: 10px; padding: 3px 0; font-size: 12.5px; border-top: 1px solid #f1f5f9; }
.diff-row b { min-width: 110px; color: var(--accent-dark); }
.diff-row.up span { color: var(--warn); }
.diff-row.down span { color: var(--ok); }
.diff-row.add span { color: var(--accent-dark); }
.diff-row.rem span { color: var(--danger); }
.warn-box { background: var(--warn-soft); color: var(--warn); padding: 8px 10px; border-radius: 8px; margin-bottom: 10px; }
@media (max-width: 1000px) {
  .cat-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cover-slots { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cat-checks { grid-template-columns: 1fr; }
  .cat-editor .page-head h2 { flex-basis: 100%; order: -1; }
  .pick-grid { grid-template-columns: repeat(2, 1fr); }
}
/* katalog: onay kutulari genel .field input genisligini almasin; kapak gorseli makul boyda */
.cat-check input, .cat-editor .check input { width: auto; flex: 0 0 auto; margin: 0; }
.cat-check span { flex: 1 1 auto; }
.cover-slot img, .cover-empty { max-height: 220px; }
.field-label { font-size: 11.5px; font-weight: 600; color: #475569; }

/* katalog: siralanabilir kategori listesi */
.cat-order { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cat-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: #fff; border-top: 1px solid #eef2f7; }
.cat-row:first-child { border-top: none; }
.cat-row.off .cat-check span { color: var(--muted); text-decoration: line-through; }
.cat-row.dragging { opacity: .45; }
.cat-row.drop { box-shadow: inset 0 2px 0 var(--accent); }
.cat-grip { cursor: grab; color: #94a3b8; font-size: 15px; user-select: none; }
.cat-no { flex: 0 0 22px; height: 22px; border-radius: 11px; background: #0b1324; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.cat-row .cat-check { flex: 1 1 auto; min-width: 0; padding: 4px 0; }
.cat-row .cat-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-move { display: flex; gap: 3px; flex: 0 0 auto; }
@media (max-width: 600px) {
  .cat-grip { display: none; } /* telefonda surukleme yerine oklar */
  .cat-move .btn { min-width: 36px; }
}
.cat-row .cat-check small { white-space: nowrap; flex: 0 0 auto; }

/* musteri toplu guncelleme */
.bulk-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; padding: 7px 0; border-top: 1px solid #f1f5f9; }
.bulk-check { padding-top: 7px; font-weight: 600; }
.bulk-input { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 600px) { .bulk-row { grid-template-columns: 1fr; gap: 4px; } .bulk-check { padding-top: 0; } }

/* aranabilir musteri secici */
.cpick { position: relative; min-width: 0; }
.cpick-input { width: 100%; padding-right: 26px !important; }
.cpick-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 5px; }
.cpick-clear:hover { color: var(--danger); }
.cpick-list { max-height: 320px; }
.cpick-title { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpick-meta { font-size: 11px; margin-top: 1px; }
@media (max-width: 600px) {
  .cpick-input { font-size: 16px !important; } /* iOS odakta yakinlastirmasin */
  .cpick-list .ac-item { padding: 9px 10px; }
}
.mini-field.mini-wide { grid-column: span 2; }
@media (max-width: 600px) { .mini-field.mini-wide { grid-column: 1 / -1; } }

/* urun formu: liste fiyati hesaplayici */
.price-calc { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 10px 12px; margin: 2px 0 12px; background: #f8fafc; }
.price-calc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12.5px; }
.price-calc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.price-calc-row .field { margin-bottom: 6px; }
.price-calc-result { min-height: 18px; }
.price-calc-groups { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.inp.flash { box-shadow: 0 0 0 3px rgba(132, 204, 22, .45); border-color: #65a30d; transition: box-shadow .2s; }
@media (max-width: 600px) { .price-calc-row { grid-template-columns: 1fr 1fr; } }

/* katalog: paylasim linki guncel degil uyarisi */
.stale-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between;
  background: var(--warn-soft); color: #78350f; border: 1px solid #fcd34d; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; font-size: 13px; }
.stale-banner[hidden] { display: none; }
.cat-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 600px) { .cat-card-actions .btn { min-height: 36px; } }

/* katalog: diller ve TR/EN paylasim linkleri */
.en-panel { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 6px; }
.en-panel[hidden] { display: none; }
.share-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.share-row .pw-wrap { flex: 1 1 auto; min-width: 0; }
.share-lang { flex: 0 0 30px; height: 24px; border-radius: 6px; background: #0b1324; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* urun formu: Ingilizce alanlar */
.en-fields { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin: 4px 0 12px; background: #fbfcfe; }
.en-fields > summary { cursor: pointer; font-weight: 600; font-size: 12.5px; padding: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-fields[open] > summary { margin-bottom: 8px; }

/* ---------------------------------------------------------------- telefon: teklif satirlari kart gorunumu
   Yalniz <=700px. Masaustu izgara stilleri degismez. Sayfa tek parca kayar
   (ic ice kaydirma alanlari telefonda toplamlari ve satirlari kesiyordu). */
.grid-cards { display: none; }
@media (max-width: 700px) {
  .view.page-full { overflow: auto; display: block; }
  .view.page-full .qe, .view.page-full .qe-body, .view.page-full .qe-grid-wrap { display: block; min-height: 0; }
  .view.page-full .qe-side { max-height: none; overflow: visible; }
  .qe-grid-wrap .grid-toolbar { position: sticky; top: 0; z-index: 5; gap: 6px; padding: 8px 10px; }
  .qe-grid-wrap .grid-toolbar .btn { min-height: 38px; flex: 1 1 auto; }

  .grid-cards { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #f1f5f9; }
  .qcard {
    background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .qcard:active { border-color: var(--accent); background: var(--accent-soft); }
  .qcard.optional { border-style: dashed; opacity: .85; }
  .qcard.empty { border-style: dashed; }
  .qcard.empty .qcard-name { color: var(--muted); font-weight: 400; }
  .qcard-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .qcard-no {
    flex: 0 0 auto; min-width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft);
    color: var(--accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 5px;
  }
  .qcard-code { font-family: var(--mono); font-size: 12px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .qcard-chip { font-size: 10.5px; border: 1px solid var(--border-strong); border-radius: 99px; padding: 1px 7px; color: var(--muted); }
  .qcard-net { margin-left: auto; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .qcard-main { display: flex; gap: 10px; margin-top: 6px; }
  .qcard-img { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; background: #fff; flex: 0 0 auto; }
  .qcard-text { min-width: 0; flex: 1 1 auto; }
  .qcard-name { font-weight: 600; line-height: 1.35; }
  .qcard-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .qcard-calc { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
  .qcard-group { font-weight: 700; color: var(--accent); border-left: 4px solid var(--accent); }
  .qcard-note { font-style: italic; color: var(--muted); white-space: pre-wrap; }
  .qcard-spacer { text-align: center; font-size: 11px; color: var(--muted-2); padding: 4px; border-style: dashed; }

  /* duzenleme paneli: alttan acilan tam genislik sayfa */
  .modal-back:has(.modal.sheet) { padding: 0; place-items: end stretch; }
  .modal.sheet { max-width: 100%; max-height: 94dvh; border-radius: 14px 14px 0 0; }
  .modal.sheet .modal-foot { border-radius: 0; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .modal.sheet .modal-foot .btn { flex: 1 1 0; min-height: 42px; }
  .modal.sheet .modal-close { font-size: 26px; padding: 4px 8px; }
  .qsheet { display: flex; flex-direction: column; gap: 10px; }
  .qsheet .inp { font-size: 16px; min-height: 42px; } /* 16px: iOS odakta yakinlastirmasin */
  .qsheet textarea.inp { min-height: 64px; }
  .qsheet-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .qsheet-field > span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
  .qsheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .qsheet-grid.three { grid-template-columns: 1fr 1fr 1fr; }
  .qsheet-search { background: var(--accent-soft); border-radius: 9px; padding: 8px; }
  .qsheet-results { display: flex; flex-direction: column; margin-top: 6px; max-height: 40vh; overflow: auto; background: #fff; border-radius: 7px; }
  .qsheet-results:empty { display: none; }
  .qsheet-results .ac-item { text-align: left; border: none; border-bottom: 1px solid #f1f5f9; background: #fff; padding: 9px 10px; font: inherit; font-size: 13.5px; }
  .qsheet-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
  .qsheet-check input { width: 20px; height: 20px; }
  .qsheet-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--border); }
  .qsheet-actions .btn { flex: 1 1 auto; min-height: 38px; }
}

/* teklif kenar paneli: katlanir Ingilizce metinler */
.side-en > summary { cursor: pointer; list-style: revert; }
.side-en > summary h4 { margin: 0; }
.qsheet-en > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--accent); padding: 4px 0; }

/* katalog editoru: kategori icindeki urun sirasi */
.cat-urun-btn { flex: 0 0 auto; white-space: nowrap; }
.cat-urun-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.prod-order { background: #f8fafc; border-top: 1px solid #eef2f7; padding: 6px 8px 10px 30px; display: flex; flex-direction: column; gap: 4px; }
.prod-order-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 2px 0 4px; }
.prod-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 7px; }
.prod-row.dragging { opacity: .45; }
.prod-row.drop { box-shadow: inset 0 2px 0 var(--accent); }
.prod-row img, .prod-noimg { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; border-radius: 4px; background: #f1f5f9; }
.prod-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.prod-name b { font-family: var(--mono); font-size: 12px; }
.prod-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .prod-order { padding-left: 8px; } .cat-urun-btn { font-size: 11px; } }

/* firma bilgileri: banka hesaplari */
.bank-box { margin-top: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.bank-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.bank-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 80px minmax(0, 1.8fr) auto; gap: 6px; margin-bottom: 6px; }
.bank-row .mono { font-family: var(--mono); }
/* telefon: 1) banka adi  2) sube | para birimi | sil  3) IBAN (tam satir, kesilmesin) */
@media (max-width: 700px) {
  .bank-row { grid-template-columns: minmax(0, 1fr) 84px 40px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
  .bank-row > :nth-child(1) { grid-column: 1 / -1; }
  .bank-row > :nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  .bank-row > :nth-child(5) { grid-column: 3; grid-row: 2; }
}
