/* =========================================================================
   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: 46px;
  --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; gap: 13px; align-items: center; 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-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: 8px; padding-right: 10px; flex: 0 0 auto; }
.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: 14.5px; font-weight: 500; color: #334155; letter-spacing: -.2px; }
.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: 6px 11px; border-radius: var(--radius);
  color: #334155; font-size: 13px; 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: 30px; height: 30px; 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;
}

/* ---------------------------------------------------------------- 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; }
  .nav-menu { position: static; display: block; box-shadow: none; border: none; border-left: 2px solid var(--accent-soft); margin-left: 12px; padding: 0; }
  .nav-sub { padding: 9px 12px; }
  .rate-chip { font-size: 10.5px; padding: 2px 8px; gap: 6px; }
  .brand-name { display: none; }

  .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-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; }
}
