/* ===== Tema değişkenleri ===== */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --ink: #1f2430;
  --ink-text: #ffffff;
  --ok: #16a34a;
  --ok-bg: #ecfdf3;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --err: #dc2626;
  --err-bg: #fef2f2;
  --info-bg: #eff8fb;
  --c1: #0e9fbf;
  --c2: #d6246e;
  --c3: #e3a008;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1218;
  --surface: #171b23;
  --surface-2: #1d222c;
  --border: #2a303c;
  --border-strong: #3a4250;
  --text: #e8ebf0;
  --muted: #98a1b0;
  --ink: #e8ebf0;
  --ink-text: #0f1218;
  --ok-bg: #0f2a1b;
  --warn-bg: #2a2110;
  --err-bg: #2c1416;
  --info-bg: #10232a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.ic { flex: none; display: block; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ===== Üst şerit ve menü ===== */
.stripe {
  height: 3px;
  background: linear-gradient(90deg, var(--c1) 0 25%, var(--c2) 25% 50%, var(--c3) 50% 75%, var(--ink) 75% 100%);
}
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-in {
  max-width: 1680px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: 8px; }
.brand img { height: 34px; width: auto; display: block; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: #fff;
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.mainnav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.nav-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px; border: 0; background: none;
  font: inherit; font-weight: 500; color: var(--text); text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--ink); color: var(--ink-text); font-weight: 600; }
.nav-drop { position: relative; }
.drop-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
}
.drop-menu.right { left: auto; right: 0; }
.nav-drop.open .drop-menu { display: block; }
.nav-say { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; margin-left: auto; }
.nav-item .nav-say { margin-left: 2px; }
.drop-menu a, .drop-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 8px; border: 0; background: none;
  font: inherit; color: var(--text); text-decoration: none; cursor: pointer; text-align: left;
}
.drop-menu a:hover, .drop-menu button:hover { background: var(--surface-2); }
.drop-menu form { margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.mainnav { min-width: 0; }
.branch-switch, .branch-chip {
  display: flex; align-items: center; gap: 6px; padding: 0 4px 0 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); height: 38px;
}
.branch-chip { padding-right: 12px; font-weight: 600; font-size: 14px; }
.branch-switch select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--text); padding: 6px 4px; max-width: 180px; }
.branch-switch select:focus { outline: none; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
[data-theme="dark"] .only-light, :root:not([data-theme="dark"]) .only-dark { display: none; }
.user-btn {
  display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--text); padding: 4px 6px; border-radius: 10px;
}
.user-btn:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700;
}
.user-name { font-weight: 600; white-space: nowrap; }
.nav-toggle {
  display: none; width: 38px; height: 38px; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}

/* ===== Sayfa ===== */
.page { max-width: 1680px; margin: 0 auto; padding: 24px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card + .card, .card + .grid, .grid + .card { margin-top: 16px; }
.grid > .card, .grid > form.card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.grid > * { min-width: 0; }
.stack { display: grid; gap: 16px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.stack > * { min-width: 0; }
.stack > .card { margin-top: 0; }

/* ===== İstatistik kutuları ===== */
.stat {
  position: relative; padding: 18px 20px 18px 24px; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--bar, var(--c1)); }
.stat .stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 28px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }

/* ===== Butonlar ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 14px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink); opacity: .9; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent); opacity: .9; }
.btn-danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn-danger:hover { background: var(--err-bg); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ===== Form ===== */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], input:not([type]),
select, textarea {
  height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 400; width: 100%;
}
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
input[type=color] { height: 42px; width: 64px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .col-2 { grid-column: span 2; }
.form-grid .col-full { grid-column: 1 / -1; }
.form-sep { font-weight: 700; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 4px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 6px; }
.input-group { display: flex; gap: 8px; }
.input-group > * { flex: 1; }
.input-group > .btn { flex: none; }
.search-input { position: relative; }
.search-input .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input input { padding-left: 38px; }
.big-input input { height: 54px; font-size: 18px; border-radius: 12px; }

/* ===== Filtre çubuğu ===== */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.filters > * { min-width: 160px; }
.filters .grow { flex: 1; min-width: 220px; }
.filters label { font-size: 12px; color: var(--muted); }

/* ===== Tablo ===== */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.table th.right, .table td.right { text-align: right; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table input, .table select { height: 36px; }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.row-title { font-weight: 600; }
.thumb { display: grid; place-items: center; flex: none; border-radius: 8px; object-fit: cover; background: #fff; border: 1px solid var(--border); }
.thumb-empty { background: var(--surface-2); color: var(--muted); }
.prod-cell { display: flex; align-items: center; gap: 12px; }
.img-drop {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 220px; margin: 0 auto 12px;
  border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); overflow: hidden; color: var(--muted);
}
.img-drop img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.row-sub { font-size: 12px; color: var(--muted); }

/* ===== Rozet ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge-err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.badge-ink { background: var(--ink); color: var(--ink-text); border-color: transparent; }

/* ===== Uyarılar ===== */
.alert {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; font-size: 14px;
  border: 1px solid transparent;
}
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--info-bg); color: var(--text); border-color: var(--border); }
.alert-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 2px; opacity: .7; }

/* ===== Sayfalama ===== */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; font-size: 14px; }
.pager a { text-decoration: none; font-weight: 600; color: var(--accent); }

/* ===== Boş durum ===== */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state h2 { color: var(--text); margin-bottom: 6px; }
.empty-state .btn { margin-top: 14px; }

/* ===== Kategori ağacı ===== */
.tree-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.tree-row:last-child { border-bottom: 0; }
.tree-row .name { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tree-row .name .count { font-weight: 500; }
.tree-indent { display: inline-block; flex: none; }
.tree-row.passive .name { opacity: .5; }

/* ===== Yetki ızgarası ===== */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.perm-group { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.perm-group h3 { font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.perm-group .check { padding: 4px 0; font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; color: var(--text);
}
.chip.active { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.chip input { display: none; }

/* ===== Hızlı satış ===== */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.pos-top { display: flex; gap: 12px; margin-bottom: 14px; }
.qty-box { display: flex; flex-direction: row; gap: 0; align-items: center; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); height: 54px; flex: none; }
.qty-box span { padding: 0 12px; color: var(--muted); font-weight: 600; font-size: 14px; border-right: 1px solid var(--border); height: 100%; display: grid; place-items: center; }
.qty-box input { border: 0 !important; box-shadow: none !important; width: 70px; height: 52px; text-align: center; font-size: 20px; font-weight: 700; background: transparent; }
.pos-search { flex: 1; }
.pos-search input { height: 54px; font-size: 17px; border-radius: 12px; }
.pos-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pos-tabs .chip { padding: 10px 18px; font-size: 15px; }
.pos-tabs .chip .cat-dot { margin: 0; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pos-card {
  position: relative; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 14px 14px 20px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  cursor: pointer; font: inherit; color: var(--text); box-shadow: var(--shadow); overflow: hidden;
}
.pos-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--bar, var(--c1)); }
.pos-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pos-card:active { transform: scale(.98); }
.pos-card .pc-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.pos-card .pc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pos-card .pc-price { font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.pos-card .pc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pos-card img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #fff; border: 1px solid var(--border); }
.pos-card.serbest { background: var(--surface-2); border-style: dashed; }
.pos-card.serbest::before { background: repeating-linear-gradient(180deg, var(--c1) 0 8px, var(--c2) 8px 16px, var(--c3) 16px 24px, var(--ink) 24px 32px); }
.pos-hints { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.kbd { display: inline-block; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font-size: 11.5px; font-weight: 600; margin-right: 4px; background: var(--surface); color: var(--text); line-height: 18px; }
.cart { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); gap: 8px; }
.cart-cust { margin: 10px 14px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; background: var(--surface-2); }
.cart-cust.selected { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.cart-lines { flex: 1; overflow-y: auto; min-height: 160px; border-top: 1px solid var(--border); }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.cart-empty .ic { margin: 0 auto 10px; opacity: .6; }
.line { padding: 10px 14px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
.line.flash { animation: flash .6s; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 18%, transparent); } to { background: transparent; } }
.line .l-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.line .l-sub { font-size: 12px; color: var(--muted); }
.line .l-total { font-weight: 700; text-align: right; white-space: nowrap; }
.line .l-ctrl { display: flex; align-items: center; gap: 6px; }
.line .l-ctrl button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
.line .l-ctrl input { width: 46px; height: 28px; text-align: center; padding: 0 4px; border-radius: 8px; font-weight: 600; }
.line .l-price { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.line .l-price button { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.line .l-price s { margin-right: 4px; }
.line .warn { color: var(--warn); font-size: 12px; font-weight: 600; }
.cart-foot { border-top: 1px solid var(--border); padding: 12px 18px 16px; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 12px; border-top: 1px dashed var(--border-strong); margin-top: 6px; }
.sum-total .t { font-weight: 700; font-size: 16px; }
.sum-total .v { font-weight: 800; font-size: 34px; letter-spacing: -.02em; }
.cart-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.cart-actions .btn { height: 42px; font-size: 13.5px; padding: 0 8px; }
.print-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--surface); }
.pay-btns { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 8px; }
.pay-btn { height: 74px; border-radius: 12px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 20px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pay-btn small { font-size: 11px; font-weight: 600; opacity: .85; }
.pay-btn.nakit { background: #2f9e6a; }
.pay-btn.kart { background: #1f8fbf; }
.pay-btn.karisik { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font-size: 14px; }
.pay-btn:disabled { opacity: .45; cursor: not-allowed; }
.kasa-kapali { padding: 28px 20px; text-align: center; }

/* ===== Pencere (modal) ===== */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 12, 16, .55); z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; max-height: 90vh; display: flex; flex-direction: column; border: 1px solid var(--border); }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px; overflow-y: auto; display: grid; gap: 12px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.big-amount { font-size: 34px; font-weight: 800; text-align: center; letter-spacing: -.02em; }
.change-box { text-align: center; padding: 12px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); }
.change-box .v { font-size: 30px; font-weight: 800; }
.quick-cash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.var-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.var-btn { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.var-btn:hover { border-color: var(--accent); }
.var-btn strong { display: block; }
.list-pick { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.list-pick > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: center; }
.list-pick > div:last-child { border-bottom: 0; }
.list-pick > div:hover { background: var(--surface-2); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--ink-text);
  padding: 14px 22px; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 220; font-weight: 600; max-width: 92vw; text-align: center;
}
.toast.err { background: var(--err); color: #fff; }
.toast .v { font-size: 26px; font-weight: 800; display: block; }

@media (max-width: 560px) {
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-card { min-height: 100px; padding: 12px 10px 12px 16px; }
  .pos-card .pc-price { font-size: 17px; }
  .pos-hints { display: none; }
}
@media (max-width: 1100px) {
  .pos { grid-template-columns: minmax(0, 1fr); }
  .cart { position: static; max-height: none; }
}

/* ===== Katalog ===== */
.kat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 16px 20px; }
.kat-card {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface);
  display: flex; flex-direction: column; border-top: 4px solid var(--bar);
}
.kat-img { aspect-ratio: 1; background: #fff; display: grid; place-items: center; color: #94a3b8; cursor: zoom-in; border-bottom: 1px solid var(--border); }
.kat-img:not([data-buyuk]) { cursor: default; background: var(--surface-2); }
.kat-img img { width: 100%; height: 100%; object-fit: contain; }
.kat-body { padding: 10px 12px 12px; text-decoration: none; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.kat-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 12, 16, .85); z-index: 200; display: grid; place-items: center;
  padding: 24px; cursor: zoom-out;
}
.lightbox figure { margin: 0; max-width: min(92vw, 820px); text-align: center; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; background: #fff; }
.lightbox figcaption { color: #fff; font-weight: 600; margin-top: 12px; }
img.thumb[data-buyuk] { cursor: zoom-in; }

/* ===== Varyant ve kalem satırları ===== */
.line-table td { padding: 8px 10px; }
.line-table input { height: 38px; }
input.qty-input { width: 90px; text-align: right; }
input.price-input { width: 130px; text-align: right; flex: none; }

/* ===== Arama sonuç kutusu ===== */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 40;
  max-height: 340px; overflow: auto; display: none;
}
.ac-list.show { display: block; }
.ac-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.sel { background: var(--surface-2); }
.ac-item .t { font-weight: 600; }
.ac-item .s { font-size: 12px; color: var(--muted); }

/* ===== Giriş ekranı ===== */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 32px; position: relative; overflow: hidden;
}
.auth-card.wide { max-width: 620px; }
.auth-card .stripe { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card > p { margin: 0 0 20px; }
.auth-card form { display: grid; gap: 14px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand img { max-height: 48px; }

/* ===== Etiket önizleme ===== */
.label-sheet { display: flex; flex-wrap: wrap; gap: 8px; }
.label {
  width: var(--lw, 40mm); height: var(--lh, 30mm); background: #fff; color: #000;
  border: 1px dashed #cbd5e1; padding: 1.5mm 2mm; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; overflow: hidden; font-family: Arial, Helvetica, sans-serif;
}
.label .lname { font-size: 7.5pt; font-weight: 700; line-height: 1.15; text-align: center; max-height: 2.4em; overflow: hidden; width: 100%; }
.label .lvar { font-size: 6.5pt; line-height: 1.1; }
.label svg { width: 100%; flex: 1; min-height: 0; }
.label .lprice { font-size: 9pt; font-weight: 800; line-height: 1; }

@media print {
  .no-print, .topbar, .alert { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  html, body { height: auto; margin: 0; padding: 0; }
  .label-sheet { gap: 0; display: block; }
  .label { border: 0; break-inside: avoid; page-break-inside: avoid; height: calc(var(--lh, 30mm) - 1mm); }
  .label + .label { break-before: page; page-break-before: always; }
}

/* ===== Mobil ===== */
/* Menü sığmazsa (app.js ölçer): önce sıkışık, sonra menü butonu */
.topbar.nav-compact .nav-item { padding: 9px 10px; gap: 6px; }
.topbar.nav-compact .mainnav > .nav-item > .ic:first-child,
.topbar.nav-compact .mainnav > .nav-drop > .nav-item > .ic:first-child { display: none; }
.topbar.nav-collapsed .nav-toggle { display: grid; }
.topbar.nav-collapsed .topbar-in { flex-wrap: wrap; }
.topbar.nav-collapsed .mainnav {
  display: none; order: 10; flex-basis: 100%; flex-direction: column; align-items: stretch;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.topbar.nav-collapsed .mainnav.open { display: flex; }
.topbar.nav-collapsed .nav-item .ic:first-child { display: block !important; }
.topbar.nav-collapsed .nav-drop .drop-menu { position: static; box-shadow: none; border: 0; padding-left: 20px; }
.brand-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) {
  .user-name { display: none; }
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .grid-side > [style*="sticky"] { position: static !important; }
}
@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .topbar-in { flex-wrap: wrap; padding: 10px 16px; }
  .mainnav {
    display: none; order: 10; flex-basis: 100%; flex-direction: column; align-items: stretch;
    padding-top: 8px; border-top: 1px solid var(--border);
  }
  .mainnav.open { display: flex; }
  .nav-drop .drop-menu { position: static; box-shadow: none; border: 0; padding-left: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .page { padding: 16px; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .form-grid .col-2 { grid-column: auto; }
  .branch-switch select { max-width: 120px; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
