:root {
  --bg: #FAF6F2;
  --card: #FFFFFF;
  --ink: #1D1A19;
  --muted: #7A706B;
  --line: #ECE3DC;
  --soft: #F3EBE5;
  --accent: #A9505C;
  --accent-soft: #F6E4E6;
  --ok: #2F7D5B;
  --ok-soft: #E3F1EA;
  --warn: #B26B10;
  --warn-soft: #FBEFD9;
  --danger: #BE3434;
  --danger-soft: #FBE5E5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(29,26,25,.04), 0 6px 24px rgba(29,26,25,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 0px; /* alt navigasyon yok */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --side-w: 256px;
  --side-rail: 76px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.4; }
body { overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.boot { height: 100vh; height: 100dvh; display: grid; place-items: center; }
.boot img { width: 120px; opacity: .25; }

/* ---------- Layout / kabuk (Faz C) ---------- */
h1.page { font-weight: 700; letter-spacing: -.015em; font-size: 26px; margin: 4px 2px 14px; }
h2.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 22px 4px 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 22px; width: auto; display: block; }
.brand small { font-size: 10.5px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; font-weight: 600; padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.6; }
.who { font-size: 12px; color: var(--muted); text-align: right; line-height: 1.2; }
.who b { color: var(--ink); font-weight: 600; display: block; font-size: 13px; }
html.no-scroll, html.no-scroll body { overflow: hidden; }

.shell { min-height: 100vh; min-height: 100dvh; }
.content { margin-left: var(--side-w); min-height: 100vh; min-height: 100dvh; transition: margin-left .2s ease; }
.shell.collapsed .content { margin-left: var(--side-rail); }

/* Sol menü */
.side {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: var(--side-w);
  display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line);
  padding: calc(var(--safe-t) + 14px) 12px calc(var(--safe-b) + 12px) calc(var(--safe-l) + 12px);
  overflow-y: auto; overscroll-behavior: contain; transition: width .2s ease, transform .24s ease;
}
.shell.collapsed .side { width: var(--side-rail); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 4px 12px; }
.side-collapse { flex: none; width: 36px; height: 36px; }
.side-nav { flex: 1; padding-top: 4px; }
.side-group { margin-bottom: 10px; }
.side-group-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 6px; }
.side-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; margin: 2px 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; text-align: left; cursor: pointer; white-space: nowrap;
}
.side-link svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.side-link:hover { background: var(--soft); }
.side-link.on { background: var(--accent-soft); font-weight: 650; }
.side-link.on svg { stroke: var(--accent); color: var(--accent); }
.side-link.danger { color: var(--danger); }
.side-link.danger svg { color: var(--danger); }
.side-link:focus-visible, .back-btn:focus-visible, .menu-btn:focus-visible, .side-collapse:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; min-width: 0; }
.side-user b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { display: block; color: var(--muted); font-size: 12px; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.side-scrim { display: none; }
/* Daraltılmış menü: yalnızca simge */
.shell.collapsed .side .lbl, .shell.collapsed .side .side-group-label { display: none; }
.shell.collapsed .side-head { flex-direction: column; gap: 10px; padding-bottom: 8px; }
.shell.collapsed .side-head .brand img { height: 18px; }
.shell.collapsed .side-link { justify-content: center; padding: 0; }
.shell.collapsed .side-group { border-top: 1px solid var(--line); margin: 6px 4px; padding-top: 6px; }
.shell.collapsed .side-group:first-child { border-top: 0; }
.shell.collapsed .side-user { justify-content: center; padding: 6px 0 10px; }

/* Üst çubuk */
.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 56px;
  padding: calc(var(--safe-t) + 8px) max(16px, var(--safe-r)) 8px max(16px, var(--safe-l));
  background: rgba(250,246,242,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.brand-top { display: none; }
button.menu-btn { display: none; flex: none; width: 44px; height: 44px; } /* .icon-btn'den (display:grid) sonra gelmese de kazanır */
.who { margin-left: auto; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right .who { margin-left: 0; }
.env-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #fff4d6; color: #8a5a00; border: 1px solid #e8c36a; font-size: 11px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.env-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #e0a100; }
.env-pill.live { background: #e6f4ea; color: #1e6b3a; border-color: #9fd3ae; }
.env-pill.live::before { background: #2e9d57; }
@media (max-width: 400px) { .env-pill { padding: 4px 8px; font-size: 10px; letter-spacing: .04em; } }
/* Ortak Geri düğmesi: sol üstte, ok + "Geri"; menü simgesinin yanında ayrı alan, çakışmaz */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-width: 44px; height: 44px; padding: 0 16px 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(29,26,25,.05);
  transition: background .15s, transform .08s;
}
.back-btn[hidden] { display: none; }
.back-btn svg { width: 20px; height: 20px; stroke: var(--accent); flex: none; }
.back-btn:hover { background: var(--soft); }
.back-btn:active { transform: scale(.97); }

main { padding: 16px max(16px, var(--safe-r)) calc(var(--safe-b) + 28px) max(16px, var(--safe-l)); max-width: 1120px; margin: 0 auto; }

/* iPhone (dar ekran): soldan açılan menü; kapalıyken içerik tam genişlikte */
@media (max-width: 767px) {
  .content, .shell.collapsed .content { margin-left: 0; }
  .side, .shell.collapsed .side { width: min(86vw, 320px); transform: translateX(-105%); box-shadow: none; }
  .shell.open .side { transform: none; box-shadow: 8px 0 40px rgba(29,26,25,.25); }
  .shell.collapsed .side .lbl, .shell.collapsed .side .side-group-label { display: initial; }
  .shell.collapsed .side-link { justify-content: flex-start; padding: 0 12px; }
  .shell.collapsed .side-head { flex-direction: row; }
  .shell.collapsed .side-group { border-top: 0; margin: 0 0 10px; padding: 0; }
  .side-collapse { display: none; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(29,26,25,.45); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .shell.open .side-scrim { opacity: 1; pointer-events: auto; }
  button.menu-btn { display: inline-grid; }
  .brand-top { display: flex; margin: 0 auto 0 4px; }
  .brand-top img { height: 20px; }
  .topbar-left { flex: none; }
  .who b { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  h1.page { font-size: 24px; }
}
/* Çok dar telefon: kullanıcı adı gizlenir, Geri/menü için yer kalır */
@media (max-width: 400px) { .who { display: none; } .brand-top { display: none; } .topbar-left { flex: 1; } }
/* Yatay telefon: dikey alan az, çubuk sıkı */
@media (max-height: 480px) and (max-width: 900px) { .topbar { min-height: 48px; padding-top: calc(var(--safe-t) + 4px); padding-bottom: 4px; } .back-btn, .menu-btn { height: 40px; } }
/* Bilgisayar: daha kompakt Geri düğmesi, geniş içerik */
@media (min-width: 1200px) { .back-btn { height: 38px; font-size: 14px; } main { padding-top: 22px; } }
@media (prefers-reduced-motion: reduce) { .side, .content, .side-scrim, .back-btn { transition: none; } }

/* ---------- Components ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { text-align: right; }
.strike { text-decoration: line-through; color: var(--muted); }
.hidden { display: none !important; }
.stack > * + * { margin-top: 10px; }

.btn {
  appearance: none; border: 0; border-radius: 14px; padding: 13px 18px; min-height: 48px;
  font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; white-space: nowrap; text-decoration: none; align-items: center; justify-content: center; gap: 8px;
  background: var(--soft); color: var(--ink); transition: transform .08s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.big { min-height: 64px; font-size: 18px; border-radius: 18px; }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn svg { width: 22px; height: 22px; }
.icon-btn { border: 0; background: var(--soft); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }

label.f { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
label.f > span { display: block; margin: 0 2px 5px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 16px; outline: none;
}
.input:focus { border-color: var(--ink); }
.input.price { text-align: right; font-variant-numeric: tabular-nums; max-width: 130px; }
.input.changed { border-color: var(--accent); background: var(--accent-soft); }
.searchbar { position: relative; margin-bottom: 12px; }
.searchbar .input { padding-left: 42px; }
.searchbar svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; stroke: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.dark { background: var(--ink); color: #fff; }

.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.tap { cursor: pointer; }
.li.tap:active { background: var(--soft); }
.li .t { font-weight: 600; font-size: 15px; }
.li .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; background: var(--soft); font-weight: 600; font-size: 13.5px; }

.stockpill { min-width: 52px; text-align: center; font-weight: 700; font-size: 17px; padding: 6px 10px; border-radius: 12px; background: var(--soft); font-variant-numeric: tabular-nums; }
.stockpill.low { background: var(--warn-soft); color: var(--warn); }
.stockpill.out { background: var(--danger-soft); color: var(--danger); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi.hero { grid-column: 1 / -1; background: var(--ink); color: #fff; }
.kpi.hero .l { color: rgba(255,255,255,.65); }
.kpi.hero .v { font-size: 32px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px) { .kpis.three { gap: 6px; } .kpis.three .kpi { padding: 10px 8px; } .kpis.three .kpi .l { font-size: 10px; letter-spacing: .02em; } .kpis.three .kpi .v { font-size: 15px; } }
.status-pill { white-space: normal; }
details > summary::-webkit-details-marker { display: none; }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bar .track { height: 10px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 6px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 34px 16px; font-size: 14px; }
.empty svg { width: 40px; height: 40px; stroke: var(--line); display: block; margin: 0 auto 10px; }

/* ---------- Satış ekranı ---------- */
.scan-hero { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 12px; }
.manual { display: flex; gap: 8px; margin-bottom: 14px; }
.manual .input { flex: 1; }
.cart-line { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .name { font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 40px; height: 38px; border: 0; background: #fff; font-size: 20px; cursor: pointer; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.totals .r { display: flex; justify-content: space-between; font-size: 14px; color: rgba(255,255,255,.7); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.totals .grand { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.15); }
.totals .grand b { font-size: 30px; font-variant-numeric: tabular-nums; }
.paytoggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.paytoggle .btn { background: #fff; border: 2px solid var(--line); }
.paytoggle .btn.on { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ---------- Alt sayfa (sheet) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(29,26,25,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet {
  width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; background: var(--bg);
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + var(--safe-b)); animation: up .2s ease;
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet .sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.sheet .sh h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; font-size: 20px; }
@media (min-width: 700px) { .backdrop { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.camp-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px; border-radius: 14px; border: 2px solid var(--line); background: #fff; margin-bottom: 10px; cursor: pointer; }
.camp-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.camp-opt .pct { font-size: 20px; font-weight: 800; color: var(--accent); min-width: 62px; }

.checks { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.checks label { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.checks label:last-child { border-bottom: 0; }
.checks input { width: 20px; height: 20px; accent-color: var(--ink); }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 30px; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 9px 6px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }

/* ---------- Barkod okuyucu ---------- */
.scanner { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; display: flex; flex-direction: column; }
.scanner .sh { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 12px) 16px 12px; }
.scanner .sh h3 { margin: 0; font-size: 17px; font-weight: 600; }
.scanner .sh .icon-btn { background: rgba(255,255,255,.14); color: #fff; }
.scanner .cam { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#qr-reader { width: 100%; max-width: 640px; }
#qr-reader video { width: 100% !important; height: auto !important; object-fit: cover; border-radius: 0; }
#qr-reader img[alt="Info icon"], #qr-reader img[alt="Camera based scan"] { display: none !important; }
.scanner .hint { text-align: center; font-size: 14px; color: rgba(255,255,255,.75); padding: 10px 20px; }
.scanner .err { margin: 16px; padding: 14px; border-radius: 12px; background: rgba(190,52,52,.25); font-size: 14px; text-align: center; }
.scanner .manual { padding: 12px 16px calc(var(--safe-b) + 16px); margin: 0; background: #111; }
.scanner .manual .input { background: #222; border-color: #333; color: #fff; }
.scanner .flash { position: absolute; inset: 0; background: rgba(47,125,91,.35); pointer-events: none; opacity: 0; transition: opacity .25s; }
.scanner .flash.on { opacity: 1; }

/* ---------- Bildirim ---------- */
#toasts { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 10px); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 520px; width: 100%; padding: 13px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.2); animation: up .2s ease; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 30px 24px calc(30px + var(--safe-b)); max-width: 420px; margin: 0 auto; }
.login .logo { display: block; width: 150px; height: auto; margin: 0 auto 18px; }
.login .sub { text-align: center; color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 34px; }

.success-check { width: 76px; height: 76px; border-radius: 50%; background: var(--ok-soft); display: grid; place-items: center; margin: 8px auto 12px; }
.success-check svg { width: 40px; height: 40px; stroke: var(--ok); }

/* ---------- Noxx House imzası ---------- */
.noxx { text-align: center; color: var(--muted); font-size: 11.5px; line-height: 1.5; margin: 34px auto 8px; }
.noxx img { width: 64px; height: auto; display: block; margin: 0 auto 8px; opacity: .55; }
.noxx b { color: var(--ink); font-weight: 600; }
.login .noxx { margin-top: 48px; }

/* ===== Faz B: ana ürün/varyant ve toplu aktarım bileşenleri (mevcut tasarım diliyle uyumlu, küçük ek) ===== */
.thumb-empty { display: inline-grid; place-items: center; border-radius: 10px; background: var(--soft); color: var(--muted); flex: none; }
.thumb-empty svg { width: 55%; height: 55%; }
.model-card { border-bottom: 1px solid var(--line); }
.model-card:last-child { border-bottom: 0; }
.model-card .model-head { border-bottom: 0; }
.model-head .chev { color: var(--muted); width: 14px; text-align: center; }
.model-card .variants { background: var(--soft); }
.model-card .variant-line { padding-left: 28px; background: transparent; }
.variant-line { border-bottom: 1px solid var(--line); }
.warn-t { color: var(--warn); }
.imp-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.imp-row.sel { background: var(--ok-soft); }
.imp-chk { padding-top: 4px; }
.imp-chk input { width: 22px; height: 22px; }
.imp-qty { width: 92px; flex: none; text-align: right; }
.imp-qty .input { text-align: center; padding: 10px 6px; font-weight: 700; }
.imp-footer { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); margin-top: 16px; padding: 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); border-radius: 16px; backdrop-filter: blur(6px); }
#impBody { padding-bottom: 96px; }

/* ===== Faz C: satış akışı, müşteri, kampanya ===== */
.cust-card { margin-bottom: 12px; border: 1px solid var(--line); }
.bag-row { margin: 12px 0 0; }
/* Kritik eylem: alt navigasyon yok; "Satışı Tamamla" her zaman erişilebilir (güvenli alan üstünde, yapışkan) */
.sale-bar {
  position: sticky; bottom: calc(var(--safe-b) + 8px); z-index: 15; margin-top: 12px; padding: 10px 12px;
  display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.sale-bar-total { display: flex; flex-direction: column; line-height: 1.15; min-width: 84px; }
.sale-bar-total b { font-size: 20px; }
.sale-bar .btn { flex: 1; min-height: 52px; }
.status-pill { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.pill-ACTIVE { background: var(--ok-soft); color: var(--ok); }
.pill-SCHEDULED { background: var(--warn-soft); color: var(--warn); }
.pill-ENDED, .pill-PASSIVE { background: var(--soft); color: var(--muted); }
.scope-box { max-height: 200px; overflow: auto; margin-bottom: 12px; }
@media (max-width: 400px) { .sale-bar-total b { font-size: 17px; } }

/* Faz H: sunucu sağlığı */
.hgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 8px; }
.hgrid .card { margin: 0; }
.hhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 15px; }
.hbar { height: 12px; border-radius: 6px; background: var(--line, #e7e2dc); overflow: hidden; margin-bottom: 10px; }
.hbar i { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.hkv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; border-top: 1px solid var(--line, #eee); }
.hkv b { text-align: right; word-break: break-word; }

/* Faz K-3: canlı bağlantı uyarısı ve set/düzeltme ekranları */
.live-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #8a4b00; color: #fff; padding: 8px 14px; font-size: 13px; text-align: center; }
.live-bar[hidden] { display: none; }
.set-comp { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line, #eee); }
.set-comp .nm { font-weight: 600; font-size: 14px; }
.badge.set { background: #efe6ff; color: #4b2a8f; }
.corr-box { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.corr-box.err { border-color: var(--danger, #c0392b); }

/* Faz K-4: INO Yetkilisi ayrımı — normal satıştan görsel olarak ayrı, ikincil işlem */
.gift-link { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 6px 10px; border: 1.5px dashed #8a4b00; color: #8a4b00; border-radius: 8px; text-decoration: none; background: transparent; }
.gift-banner { border: 2px solid #8a4b00; background: #fff4e5; color: #4a2a00; border-radius: 10px; padding: 10px 12px; }
.side-link[data-r="gift"] { border: 1px dashed #8a4b00; color: #8a4b00; margin-top: 6px; }
.side-link[data-r="gift"].on { background: #fff4e5; }
@media (prefers-color-scheme: dark) { .gift-banner { background: #3a2a10; color: #ffd9a0; } .gift-link, .side-link[data-r="gift"] { color: #ffb866; border-color: #ffb866; } }
