/* AKS Sipariş & Depo — tek stil dosyası.
 * Renkler, boşluklar ve gölgeler :root'ta token olarak tutulur; bileşenler yalnızca token kullanır.
 * Bölümler: tokenlar · temel · yerleşim (yan menü, mobil üst çubuk) · bileşenler · formlar ·
 * sayfalara özel (pano, giriş, siparişler, hazırlama kartı, paketleme).
 */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --border: #e3e8ef;
  --border-strong: #cfd7e2;
  --text: #0f1b2a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  --brand: #0e6b66;
  --brand-strong: #0a5450;
  --brand-ink: #ffffff;
  --brand-soft: #e5f3f1;
  --brand-ring: rgba(14, 107, 102, .22);

  --ok: #15803d;      --ok-soft: #e7f6ed;   --ok-border: #bce4c9;
  --warn: #b45309;    --warn-soft: #fef3e2; --warn-border: #f5d6a3;
  --err: #c2281d;     --err-soft: #fdecea;  --err-border: #f6c5bf;
  --info: #1d4ed8;    --info-soft: #eaf1fe; --info-border: #c8d8fb;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 42, .05);
  --shadow: 0 1px 2px rgba(15, 27, 42, .04), 0 6px 18px -8px rgba(15, 27, 42, .10);
  --shadow-lg: 0 18px 40px -14px rgba(15, 27, 42, .30);

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --sidebar-w: 252px;
}

/* --- Temel --- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { font-family: var(--font-display); color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; font-weight: 700; }
h2 { font-size: 1.05rem; margin: 0 0 .85rem; font-weight: 650; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.icon { flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

/* --- Yerleşim --- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
main, .content { padding: 1.75rem 2rem 3rem; min-width: 0; width: 100%; max-width: 1440px; }

/* Yan menü */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 1rem .75rem;
  overflow-y: auto;
  z-index: 30;
}
.sb-brand { display: flex; align-items: center; justify-content: space-between; padding: .25rem .5rem .9rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(140deg, #14857e, var(--brand-strong)); color: #fff;
  font: 800 1.05rem/1 var(--font-display); letter-spacing: -.02em; box-shadow: 0 6px 14px -6px rgba(14, 107, 102, .7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font: 750 1.02rem/1.1 var(--font-display); letter-spacing: .01em; }
.brand-text small { color: var(--muted); font-size: .76rem; }
.sb-test {
  display: flex; align-items: center; gap: .45rem; margin: 0 .35rem .75rem; padding: .45rem .65rem;
  border-radius: var(--radius-xs); background: var(--warn-soft); color: var(--warn);
  font-size: .76rem; font-weight: 650; border: 1px solid var(--warn-border);
}
.sb-test::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; flex: none; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 1.1rem .75rem .35rem; }
.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .75rem; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .93rem;
  transition: background .12s, color .12s;
}
.nav-item .icon { color: var(--faint); transition: color .12s; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item:hover .icon { color: var(--text-2); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 650; }
.nav-item.active .icon { color: var(--brand); }
.nav-item .badge { margin-left: auto; }
.nav-item.soon { color: var(--faint); cursor: default; }
.nav-item.soon:hover { background: transparent; }
.nav-item.soon small { margin-left: auto; font-size: .66rem; font-weight: 650; border: 1px solid var(--border); border-radius: 999px; padding: .05rem .45rem; }
.sb-user {
  display: flex; align-items: center; gap: .65rem; margin-top: 1rem; padding: .65rem .6rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.sb-user form { margin: 0 0 0 auto; }
.sb-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sb-user-text strong { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text small { color: var(--muted); font-size: .75rem; }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand-strong); font-weight: 750; font-size: .9rem;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-xs);
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.sb-close { display: none; }
.sb-backdrop { display: none; }

/* Mobil / odak modu üst çubuğu */
.mobilebar {
  display: none; position: sticky; top: 0; z-index: 20;
  align-items: center; gap: .6rem; padding: .55rem .85rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.mobilebar .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: .95rem; }
.mobilebar .brand-text small { display: none; }
.mobilebar .badge-test { margin-left: auto; }
.badge-test { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border); border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }

@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .mobilebar { display: flex; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--sidebar-w));
    transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s;
  }
  .sb-close { display: inline-grid; }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  body.nav-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 27, 42, .38); z-index: 25; }
  main, .content { padding: 1.1rem 1rem 3rem; }
}

/* Odak modu (paketleme): menü her genişlikte çekmece, üst çubuk görünür */
.focus .app { grid-template-columns: minmax(0, 1fr); }
.focus .mobilebar { display: flex; }
.focus .sidebar {
  position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--sidebar-w));
  transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s;
}
.focus .sb-close { display: inline-grid; }
.focus.nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
.focus.nav-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 27, 42, .38); z-index: 25; }
.focus main, .focus .content { max-width: 920px; margin: 0 auto; padding: .9rem 1rem 3rem; }

/* Sayfa başlığı */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.page-head .small a, .back-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); text-decoration: none; font-weight: 550; margin-bottom: .35rem; }
.page-head .small a:hover, .back-link:hover { color: var(--brand); }
.page-sub, .page-head > div > .muted { color: var(--muted); margin: .15rem 0 0; }
.eyebrow { color: var(--muted); font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .35rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* --- Bileşenler --- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.15rem 1.25rem; margin-bottom: 1.1rem;
}
.card > h2:first-child { display: flex; align-items: center; gap: .5rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .85rem; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 1.1rem; }
.grid > .card { margin-bottom: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; margin-bottom: 1.1rem; }

/* İstatistik kartları */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: .84rem; font-weight: 550; }
.stat .value { font: 750 1.75rem/1.15 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--muted); font-size: .78rem; margin-top: .1rem; }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--surface-3); color: var(--text-2); }
.tone-brand { background: var(--brand-soft); color: var(--brand); }
.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-err { background: var(--err-soft); color: var(--err); }
.tone-info { background: var(--info-soft); color: var(--info); }
.stat.is-alert { border-color: var(--err-border); background: linear-gradient(0deg, var(--err-soft), var(--surface) 70%); }
.stat.is-alert .value { color: var(--err); }

/* Düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 38px; padding: .45rem .95rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2);
  font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--faint); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 14px -8px rgba(14, 107, 102, .9); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-lg { min-height: 46px; padding: .7rem 1.25rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; box-shadow: none; }
.btn-light:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-white { background: #fff; border-color: #fff; color: var(--brand-strong); }
.btn-white:hover { background: #f0fbf9; border-color: #f0fbf9; color: var(--brand-strong); }

/* Tablolar */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0 !important; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); }
th, td { padding: .7rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
th:first-child, td:first-child { padding-left: 1.1rem; }
th:last-child, td:last-child { padding-right: 1.1rem; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: #fafcfd; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { color: var(--text); font-weight: 600; text-decoration: none; }
td a:hover { color: var(--brand); text-decoration: underline; }
.card > .table-wrap:first-child table, .card.table-wrap table { border-radius: var(--radius); }
.card:not(.table-wrap) > .table-wrap { margin: 0 -1.25rem -1.15rem; border-top: 1px solid var(--border); }
.card:not(.table-wrap) > .table-wrap th:first-child, .card:not(.table-wrap) > .table-wrap td:first-child { padding-left: 1.25rem; }
.row-err td { background: var(--err-soft) !important; }
.row-warn td { background: var(--warn-soft) !important; }
tr.muted td { color: var(--muted); text-decoration: line-through; }

/* Rozetler */
.pill {
  display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .12rem .6rem;
  font-size: .76rem; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.5;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-err { background: var(--err-soft); color: var(--err); }
.pill-brand { background: var(--brand-soft); color: var(--brand-strong); }
.pill-info { background: var(--info-soft); color: var(--info); }
.badge { display: inline-grid; place-items: center; min-width: 1.45rem; height: 1.3rem; padding: 0 .4rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.qty-pos { color: var(--ok); font-weight: 650; }
.qty-neg { color: var(--err); font-weight: 650; }

/* Bildirimler */
.messages { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.messages li {
  display: flex; align-items: flex-start; gap: .6rem; padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: .5rem;
  border: 1px solid var(--info-border); background: var(--info-soft); color: #1e3a8a; font-weight: 550;
}
.messages li::before { content: "i"; display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: currentColor; color: #fff; font: 800 .75rem/1 var(--font); margin-top: .1rem; }
.messages li.success { background: var(--ok-soft); border-color: var(--ok-border); color: #14532d; }
.messages li.success::before { content: "✓"; }
.messages li.error { background: var(--err-soft); border-color: var(--err-border); color: #7f1d1d; }
.messages li.error::before, .messages li.warning::before { content: "!"; }
.messages li.warning { background: var(--warn-soft); border-color: var(--warn-border); color: #78350f; }
.alert {
  display: flex; align-items: flex-start; gap: .6rem; padding: .8rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 1rem;
}
.alert .icon { margin-top: .1rem; }
.alert > div { flex: 1; }
.alert-err { background: var(--err-soft); border-color: var(--err-border); color: #7f1d1d; }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-border); color: #78350f; }
.alert-ok { background: var(--ok-soft); border-color: var(--ok-border); color: #14532d; }

/* Sekmeler (bölümlü düğme) */
.tabs {
  display: flex; gap: .25rem; padding: .3rem; margin-bottom: 1rem; overflow-x: auto;
  background: var(--surface-3); border-radius: 12px; width: fit-content; max-width: 100%;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 9px;
  text-decoration: none; color: var(--muted); font-size: .88rem; font-weight: 600; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.tabs a .muted, .tabs a .count {
  display: inline-grid; place-items: center; min-width: 1.5rem; padding: 0 .4rem; height: 1.3rem; border-radius: 999px;
  background: rgba(15, 27, 42, .06); color: var(--muted); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.tabs a.active .muted, .tabs a.active .count { background: var(--brand-soft); color: var(--brand-strong); }

.pagination { display: flex; gap: .6rem; align-items: center; justify-content: center; margin-top: 1rem; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dd { margin: 0; font-weight: 550; }
.big-number { font: 800 2.4rem/1 var(--font-display); letter-spacing: -.02em; margin-bottom: .6rem; }

.timeline { list-style: none; margin: 0 0 .75rem; padding: 0 0 0 1rem; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: .3rem 0 .3rem .5rem; }
.timeline li::before { content: ""; position: absolute; left: -1.43rem; top: .72rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li:last-child::before { background: var(--brand); }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }

/* --- Formlar --- */
form p, .field { margin: 0 0 1rem; }
label { display: block; font-weight: 600; font-size: .88rem; color: var(--text-2); margin-bottom: .35rem; }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=search], input[type=email], select, textarea {
  width: 100%; max-width: 560px; min-height: 40px; padding: .5rem .75rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; background: var(--surface); color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; vertical-align: middle; accent-color: var(--brand); }
input[type=file] { font: inherit; }
.checkbox-row label { display: inline; font-weight: 550; margin-left: .4rem; }
.helptext, .help { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; font-weight: 400; }
.errorlist { list-style: none; margin: .3rem 0; padding: 0; color: var(--err); font-size: .86rem; font-weight: 550; }
.errorlist.nonfield { background: var(--err-soft); border: 1px solid var(--err-border); border-radius: var(--radius-sm); padding: .7rem .9rem; }
.filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; padding: .9rem 1.1rem; }
.filters input, .filters select { width: auto; min-width: 200px; }
.filters input[type=search] { min-width: 340px; }
.filters .field { margin: 0; }
.filters label { font-size: .78rem; color: var(--muted); }

/* Barkod okutma alanı */
.scan-input { font-size: 1.25rem !important; padding: .75rem .9rem !important; letter-spacing: .03em; font-family: var(--mono) !important; }
.scan-hint { min-height: 1.6rem; font-weight: 600; margin-top: .35rem; }
.scan-hint.ok { color: var(--ok); }
.scan-hint.err { color: var(--err); }

/* --- Pano --- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.6rem 1.75rem; margin-bottom: 1.25rem; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #1a9a90 0%, var(--brand) 45%, #08403d 100%);
  box-shadow: 0 18px 36px -20px rgba(8, 64, 61, .9);
}
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.hero-main { display: flex; align-items: center; gap: 1.25rem; position: relative; z-index: 1; }
.hero-num { font: 800 3.4rem/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-title { font-size: 1.15rem; font-weight: 650; }
.hero-sub { opacity: .82; font-size: .9rem; margin-top: .2rem; }
.hero .actions { position: relative; z-index: 1; }
.hero-late { display: inline-flex; align-items: center; gap: .35rem; margin-top: .5rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: .82rem; font-weight: 650; }
.hero.is-empty { background: linear-gradient(135deg, #15803d, #0f5e2f); }

/* --- Giriş --- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); background: var(--surface); }
.login-side {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 2.5rem 3rem; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, #1a9a90 0%, var(--brand) 40%, #062f2d 100%);
}
.login-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .05); }
.login-side .brand { color: #fff; }
.login-side .brand-text small { color: rgba(255, 255, 255, .7); }
.login-side .brand-mark { background: rgba(255, 255, 255, .16); box-shadow: none; }
.login-pitch h2 { color: #fff; font-size: 2rem; line-height: 1.2; margin: 0 0 .9rem; max-width: 22ch; }
.login-pitch p { opacity: .82; max-width: 44ch; margin: 0; }
.login-channels { display: flex; flex-wrap: wrap; gap: .5rem; position: relative; z-index: 1; }
.login-channels span { padding: .3rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: .82rem; font-weight: 600; }
.login-main { display: grid; place-items: center; padding: 2rem 1.25rem; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 1.7rem; }
.login-card input { max-width: none; min-height: 46px; }
.login-card .btn { margin-top: .5rem; }
@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; }
  .login-side { padding: 1.5rem 1.25rem; gap: 1rem; }
  .login-pitch h2 { font-size: 1.35rem; }
  .login-pitch p, .login-channels { display: none; }
}

/* --- Siparişler --- */
.col-products { min-width: 260px; }
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .col-products { min-width: 200px; }
}

/* Ürün görselleri */
.pimg { display: inline-block; flex: none; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 10px; vertical-align: middle; }
.pimg-sm { width: 40px; height: 40px; border-radius: 8px; }
.pimg-md { width: 64px; height: 64px; }
.pimg-lg { width: 112px; height: 112px; border-radius: 12px; }
.pimg-xl { width: 220px; height: 220px; border-radius: 14px; }
.pimg-empty { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface-3) 6px, var(--surface-3) 7px); }
.with-img { display: flex; align-items: center; gap: .7rem; }
.line-mini { display: flex; align-items: center; gap: .5rem; margin: .2rem 0; }
.qty-multi { display: inline-block; min-width: 1.7rem; padding: 0 .3rem; border-radius: 6px; background: var(--warn); color: #fff; text-align: center; }

/* Hazırlama kartı (sipariş detayı) */
.pack-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; padding-bottom: .85rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.pack-big { font: 800 1.8rem/1 var(--font-display); }
.pick { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.pick:last-child { border-bottom: 0; }
.pick-name { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.pick-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .35rem 0; }
.tag { display: inline-block; padding: .12rem .55rem; border-radius: 7px; font-weight: 800; font-size: .85rem; letter-spacing: .03em; }
.tag-size { background: var(--text); color: #fff; }
.tag-set { background: var(--brand); color: #fff; }
.pick-warn { display: inline-block; margin-top: .35rem; padding: .3rem .6rem; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 650; font-size: .88rem; border: 1px solid var(--warn-border); }
.pick-qty { min-width: 4.6rem; padding: .45rem .6rem; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); text-align: center; line-height: 1; }
.pick-qty span { display: block; font: 800 2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pick-qty small { display: block; margin-top: .25rem; font-size: .66rem; font-weight: 750; color: var(--muted); letter-spacing: .08em; }
.pick-multi .pick-qty { background: var(--warn); border-color: var(--warn); color: #fff; }
.pick-multi .pick-qty small { color: rgba(255, 255, 255, .9); }
.pick-set { margin: -.3rem 0 .5rem; padding: .6rem .9rem; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 12px 12px 0; }
.pick-set-title { font-weight: 700; font-size: .88rem; color: var(--brand-strong); }
.pick-set .pick { padding: .55rem 0; border-color: rgba(14, 107, 102, .15); }
.pick-set .pick-name { font-size: .95rem; }
.pick-set .pick-qty span { font-size: 1.5rem; }
.order-nav { align-items: center; }
@media (max-width: 600px) {
  .pimg-lg { width: 76px; height: 76px; }
  .pimg-xl { width: 160px; height: 160px; }
  .pick { gap: .65rem; }
  .pick-name { font-size: .98rem; }
  .pick-qty { min-width: 3.7rem; }
  .pick-qty span { font-size: 1.6rem; }
}

/* --- Paketleme (terminal) --- */
.pack-top { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pack-top strong { font: 750 1.2rem/1.2 var(--font-display); }
.pack-top a { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); text-decoration: none; font-weight: 600; }
.pack-start { padding: 1.5rem; }
.pack-start h1 { font-size: 1.4rem; display: flex; align-items: center; gap: .55rem; }
.pack-start h1 .icon { color: var(--brand); }
.scan-row { display: flex; gap: .5rem; align-items: stretch; }
.scan-big {
  flex: 1; max-width: none !important; font-size: 1.35rem !important; padding: .85rem 1rem !important; min-height: 58px !important;
  border: 2px solid var(--brand) !important; border-radius: 14px !important; font-family: var(--mono); background: #fbfefe !important;
}
.scan-big:focus { box-shadow: 0 0 0 5px var(--brand-ring) !important; }
.kbd-toggle { min-width: 58px; border-radius: 14px; color: var(--muted); }
.kbd-toggle.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pack-error { margin: .75rem 0 0; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--err); color: #fff; font-size: 1.05rem; font-weight: 700; }
.pack-who { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; margin-bottom: .75rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.pack-who-name { font: 800 1.2rem/1.2 var(--font-display); }
.pack-scan { position: sticky; top: 58px; z-index: 5; }
.pack-banner { margin-top: .7rem; padding: .65rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-weight: 650; min-height: 2.6rem; border: 1px solid var(--border); }
.pack-banner.ok { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok); }
.pack-banner.err { background: var(--err); border-color: var(--err); color: #fff; }
.pack-banner.big { font-size: 1.2rem; font-weight: 800; padding: .9rem 1.1rem; }
.pack-progress { margin-top: .75rem; color: var(--text-2); }
.pack-progress .bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: .35rem; }
.pack-progress .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22a35a, var(--ok)); transition: width .25s; }
.pack-item { padding-left: .6rem; padding-right: .6rem; border-radius: 12px; transition: background .2s; }
.pack-item.is-done { background: var(--ok-soft); }
.pack-item.is-done .pick-qty { background: var(--ok); border-color: var(--ok); color: #fff; }
.pack-item.is-done .pick-qty small { color: rgba(255, 255, 255, .9); }
.flash-ok { animation: flash-ok .6s; }
.flash-err { animation: flash-err .8s; }
@keyframes flash-ok { from { box-shadow: 0 0 0 4px var(--ok); } to { box-shadow: 0 0 0 0 transparent; } }
@keyframes flash-err { from { box-shadow: 0 0 0 4px var(--err); } to { box-shadow: 0 0 0 0 transparent; } }
#pack.is-complete .pack-scan { border: 2px solid var(--ok); box-shadow: 0 0 0 4px var(--ok-soft), var(--shadow); }
.pack-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.pack-actions form { margin: 0; }
@media (max-width: 600px) {
  .scan-big { font-size: 1.1rem !important; padding: .7rem .8rem !important; min-height: 52px !important; }
  .kbd-toggle { min-width: 52px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .stat { padding: .8rem; gap: .65rem; }
  .stat-icon { width: 36px; height: 36px; border-radius: 10px; }
  .stat .value { font-size: 1.4rem; }
  .hero { padding: 1.25rem; }
  .hero-num { font-size: 2.6rem; }
  .hero .actions { width: 100%; }
  .hero .actions .btn { flex: 1 1 0; }
  h1 { font-size: 1.35rem; }
}
@media (max-width: 700px) {
  .filters .field { flex: 1 1 100%; }
  .filters input, .filters select, .filters input[type=search] { width: 100%; min-width: 0; max-width: none; }
}

/* --- Lot ve konum (2026-11-12) --- */
.label, .field > .label { display: block; font-weight: 600; font-size: .9rem; color: var(--text-2); margin-bottom: .35rem; }
.help { margin-top: .25rem; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 12px; flex-wrap: wrap; }
.seg-opt { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-flex; align-items: center; min-height: 40px; padding: .45rem 1.1rem; border-radius: 9px; font-weight: 650; color: var(--muted); }
.seg-opt input:checked + span { background: var(--surface); color: var(--brand-strong); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand-ring); }

.lot-hint { display: flex; align-items: flex-start; gap: .4rem; margin-top: .4rem; padding: .35rem .6rem; border-radius: 8px;
  background: var(--info-soft); border: 1px solid var(--info-border); color: #1e3a8a; font-size: .9rem; width: fit-content; max-width: 100%; }
.lot-hint svg { flex: none; margin-top: .15rem; }
.lot-hint strong { letter-spacing: .02em; }
.lot-hint.lot-split { background: var(--warn-soft); border-color: var(--warn-border); color: #78350f; }

.lot-known { margin: -.4rem 0 1rem; padding: .4rem .65rem; border-radius: 8px; }
.lot-known.ok { background: var(--ok-soft); color: var(--ok); }
.lot-known.new { background: var(--info-soft); color: var(--info); }

.transfer-card .pick { margin-bottom: 1rem; }
.transfer-warn { align-items: flex-start; }
.transfer-warn .warn-line + .warn-line { margin-top: .35rem; }
.lot-choices { display: grid; gap: .5rem; }
.lot-choice { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .75rem; padding: .75rem .9rem; margin: 0;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.lot-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-ring); }
.lot-choice input[type=radio] { width: 22px; height: 22px; accent-color: var(--brand); margin: 0; }
.lot-code { font: 750 1.1rem/1.2 var(--font-display); letter-spacing: .02em; }
.lot-meta { color: var(--muted); font-size: .92rem; }
.lot-new-fields { display: flex; gap: .5rem; flex: 1 1 100%; flex-wrap: wrap; }
.lot-new-fields input { flex: 1 1 140px; min-width: 0; }
.qty-big { font-size: 1.6rem !important; font-weight: 750; max-width: 220px; min-height: 56px; text-align: center; }
.transfer-actions { margin-top: .5rem; }
tr.row-err td { background: var(--err-soft); }
@media (max-width: 640px) {
  .transfer-actions .btn { flex: 1 1 100%; }
  .qty-big { max-width: none; width: 100%; }
}

.btn-sm { min-height: 32px; padding: .3rem .7rem; font-size: .85rem; border-radius: 8px; }
.ship-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.ship-row:first-of-type { border-top: 0; }

/* Eczane siparişleri (Odoo) */
.pharmacy-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; margin-top: .85rem; padding: .7rem .9rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--brand-soft); color: inherit; text-decoration: none; }
.pharmacy-strip:hover { border-color: var(--brand); }
.pharmacy-strip svg:first-child { color: var(--brand); }
.pharmacy-strip svg:last-child { margin-left: auto; color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid textarea, .form-grid input, .line-form select, .line-form input[type=number] { width: 100%; }
.line-form td { vertical-align: top; }
.line-form td:first-child { min-width: 260px; }
.line-form input[type=number] { max-width: 110px; text-align: right; }
.label-ask { max-width: 560px; }
.label-ask .qty-big { max-width: 160px; }
.pack-typed { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; flex-wrap: wrap; }
.pack-typed input { width: 96px; min-height: 44px; font-size: 1.15rem; font-weight: 700; text-align: center; }
.pack-typed .small { color: var(--muted); }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .line-form td:first-child { min-width: 200px; }
}
