/* Kagen — Apple DESIGN.md tabanlı arayüz
   Tek vurgu rengi (Action Blue), parşömen zemin, beyaz yardımcı kartlar (18px), siyah global nav,
   buzlu alt navigasyon, hap biçimli birincil düğmeler, basılınca scale(0.95). */

:root {
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --primary-on-dark: #2997ff;
  --ink: #1d1d1f;
  --ink-80: #333333;
  --ink-48: #7a7a7a;
  --muted-dark: #cccccc;
  --divider: #f0f0f0;
  --hairline: #e0e0e0;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --tile-1: #272729;
  --tile-2: #2a2a2c;
  --tile-3: #252527;
  --black: #000000;
  --chip: rgba(210, 210, 215, 0.64);
  /* Finans anlamı için yalnızca metinde kullanılan iki ton */
  --pos: #1d7d3a;
  --neg: #c4321c;
  --warn: #b25e00;

  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 18px;
  --pill: 9999px;

  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 17px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;

  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, "Segoe UI", sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, "Segoe UI", sans-serif;
  --gnav-h: 44px;
  --subnav-h: 52px;
  --tabbar-h: 64px;
  --maxw: 1440px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--ink);
  background: var(--parchment);
  font-feature-settings: "ss03";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; color: inherit; }
h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.4px; }
h2 { font-size: 28px; line-height: 1.14; letter-spacing: -0.2px; }
h3 { font-size: 21px; line-height: 1.19; letter-spacing: 0.231px; }
h4 { font-size: 17px; line-height: 1.24; letter-spacing: -0.374px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 var(--s-sm); }
small, .caption { font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; }
.fine { font-size: 12px; letter-spacing: -0.12px; line-height: 1.3; }
.muted { color: var(--ink-48); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn { color: var(--warn); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.strong { font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

:focus-visible { outline: 2px solid var(--primary-focus); outline-offset: 2px; }

/* ---------- Global nav (siyah) ---------- */
.gnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--gnav-h);
  background: var(--black);
  color: #fff;
}
.gnav-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 4px; padding: 0 16px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.2px;
  margin-right: 12px; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { height: 22px; width: auto; border-radius: 4px; background: #fff; }
.gnav-links { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.gnav-links::-webkit-scrollbar { display: none; }
.gnav-links a {
  color: rgba(255, 255, 255, 0.8); font-size: 12px; letter-spacing: -0.12px; line-height: 1;
  padding: 8px 10px; border-radius: var(--r-sm); white-space: nowrap;
}
.gnav-links a:hover { color: #fff; text-decoration: none; }
.gnav-links a.active { color: #fff; background: rgba(255, 255, 255, 0.14); }
.gnav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gnav-user {
  background: none; border: 0; color: rgba(255,255,255,0.85); font: inherit; font-size: 12px; cursor: pointer;
  padding: 6px 10px; border-radius: var(--r-sm);
}
.gnav-user:hover { background: rgba(255,255,255,0.12); }
.gnav .gnav-burger { display: none; }
.grid > .card + .card, .row > .card + .card { margin-top: 0; }

/* ---------- Sub nav (buzlu) ---------- */
.subnav {
  position: sticky; top: var(--gnav-h); z-index: 40;
  min-height: var(--subnav-h);
  background: rgba(245, 245, 247, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.subnav-inner {
  max-width: var(--maxw); margin: 0 auto; min-height: var(--subnav-h);
  display: flex; align-items: center; gap: var(--s-sm); padding: 6px 24px;
}
.subnav h1 { font-size: 21px; line-height: 1.19; letter-spacing: 0.231px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subnav .back { font-size: 14px; white-space: nowrap; }
.subnav-actions { margin-left: auto; display: flex; gap: var(--s-xs); align-items: center; flex-wrap: wrap; justify-content: flex-end; }

main { max-width: var(--maxw); margin: 0 auto; padding: var(--s-lg) 24px 96px; }

/* ---------- Butonlar ---------- */
.btn, .btn-ghost, .btn-dark, .btn-pearl, .btn-link, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-text); cursor: pointer; border: 0; text-decoration: none !important;
  transition: transform 0.12s ease, background-color 0.15s ease; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active, .btn-ghost:active, .btn-dark:active, .btn-pearl:active, .btn-danger:active, .icon-btn:active, .seg button:active { transform: scale(0.95); }
.btn {
  background: var(--primary); color: #fff;
  font-size: 17px; letter-spacing: -0.374px; line-height: 1;
  padding: 11px 22px; border-radius: var(--pill); min-height: 40px;
}
.btn-ghost {
  background: transparent; color: var(--primary); border: 1px solid var(--primary);
  font-size: 17px; letter-spacing: -0.374px; line-height: 1;
  padding: 10px 21px; border-radius: var(--pill); min-height: 40px;
}
.btn-sm { font-size: 14px !important; padding: 7px 14px !important; min-height: 32px !important; letter-spacing: -0.224px !important; }
.btn-dark {
  background: var(--ink); color: #fff; font-size: 14px; letter-spacing: -0.224px; line-height: 1.29;
  padding: 8px 15px; border-radius: var(--r-sm);
}
.btn-pearl {
  background: var(--pearl); color: var(--ink-80); font-size: 14px; letter-spacing: -0.224px;
  padding: 8px 14px; border-radius: var(--r-md); border: 3px solid var(--divider);
}
.btn-danger {
  background: transparent; color: var(--neg); border: 1px solid rgba(196, 50, 28, 0.4);
  font-size: 14px; padding: 8px 15px; border-radius: var(--pill);
}
.btn-link { background: none; color: var(--primary); font-size: inherit; padding: 0; }
.btn[disabled], .btn-ghost[disabled] { opacity: 0.45; pointer-events: none; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.plain { background: transparent; }
.icon-btn.plain:hover { background: var(--chip); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Kartlar / karolar ---------- */
.card {
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: var(--s-lg); min-width: 0;
}
.card + .card { margin-top: var(--s-lg); }
.card-head { display: flex; align-items: center; gap: var(--s-sm); margin-bottom: var(--s-md); flex-wrap: wrap; }
.card-head h3 { font-size: 21px; }
.card-head .spacer { flex: 1; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: var(--s-lg) var(--s-lg) 0; }

.tile-dark {
  background: var(--tile-1); color: #fff; border-radius: var(--r-lg); padding: var(--s-xl);
}
.tile-dark .muted { color: var(--muted-dark); }
.tile-dark a { color: var(--primary-on-dark); }

.grid { display: grid; gap: var(--s-lg); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stack > * + * { margin-top: var(--s-lg); }
.row { display: flex; gap: var(--s-sm); align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .label { font-size: 14px; color: var(--ink-48); letter-spacing: -0.224px; }
.stat .value { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.4px; line-height: 1.14; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .sub { font-size: 14px; color: var(--ink-48); }
.tile-dark .stat .label, .tile-dark .stat .sub { color: var(--muted-dark); }
.hero-num { font-family: var(--font-display); font-size: 56px; font-weight: 600; line-height: 1.07; letter-spacing: -0.28px; font-variant-numeric: tabular-nums; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.stat-strip > .stat { background: var(--canvas); padding: 16px 18px; box-shadow: 0 0 0 0.5px var(--hairline); }
.stat-strip > .stat .value { font-size: 22px; }
.stat-strip > .stat.em { background: var(--tile-1); color: #fff; }
.stat-strip > .stat.em .label { color: var(--muted-dark); }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; letter-spacing: -0.224px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--ink-48); font-size: 12px; letter-spacing: -0.12px;
  padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; background: var(--canvas);
  position: sticky; top: 0;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--pearl); }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl tfoot td { font-weight: 600; border-top: 1px solid var(--hairline); border-bottom: 0; background: var(--pearl); }
.tbl tr.deleted td { color: var(--ink-48); text-decoration: line-through; }
.tbl tr.sub td { background: var(--pearl); font-size: 12px; color: var(--ink-48); padding-top: 6px; padding-bottom: 6px; }
.tbl .acts { white-space: nowrap; text-align: right; width: 1%; }
.tbl .acts .icon-btn { width: 30px; height: 30px; }
.tbl .acts .icon-btn svg { width: 15px; height: 15px; }
.tbl .thumb { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; background: var(--parchment); display: block; }
.card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: var(--s-lg); }
.card.flush .tbl th:last-child, .card.flush .tbl td:last-child { padding-right: var(--s-lg); }
.empty { padding: 40px 16px; text-align: center; color: var(--ink-48); font-size: 14px; }

/* Numara dağılımı tablosu */
.sizes-tbl td, .sizes-tbl th { text-align: center; padding: 8px 6px; min-width: 42px; }
.sizes-tbl td:first-child, .sizes-tbl th:first-child { text-align: left; }
.size-input { width: 64px !important; font-size: 15px !important;text-align: center; padding: 6px 4px !important; min-height: 34px !important; }

/* ---------- Mobil liste kartları ---------- */
.list { display: flex; flex-direction: column; }
.li {
  display: flex; gap: var(--s-sm); align-items: center; padding: 14px var(--s-lg); border-bottom: 1px solid var(--divider);
  color: inherit; cursor: pointer; text-decoration: none !important;
}
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--pearl); }
.li .main { flex: 1; min-width: 0; }
.li .title { font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .meta { font-size: 14px; color: var(--ink-48); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .end { text-align: right; flex: none; }

/* ---------- Çipler ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: -0.12px; line-height: 1;
  padding: 5px 10px; border-radius: var(--pill); background: var(--parchment); color: var(--ink-80); white-space: nowrap;
  border: 1px solid var(--hairline);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-48); }
.chip.blue { color: var(--primary); border-color: rgba(0, 102, 204, 0.3); background: rgba(0, 102, 204, 0.06); }
.chip.blue .dot { background: var(--primary); }
.chip.red { color: var(--neg); border-color: rgba(196, 50, 28, 0.3); background: rgba(196, 50, 28, 0.06); }
.chip.red .dot { background: var(--neg); }
.chip.green { color: var(--pos); border-color: rgba(29, 125, 58, 0.3); background: rgba(29, 125, 58, 0.06); }
.chip.green .dot { background: var(--pos); }
.chip.amber { color: var(--warn); border-color: rgba(178, 94, 0, 0.3); background: rgba(178, 94, 0, 0.06); }
.chip.amber .dot { background: var(--warn); }
.chip.dark { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Segment / filtre çipleri */
.seg { display: inline-flex; gap: 4px; background: rgba(0,0,0,0.05); padding: 3px; border-radius: var(--pill); flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; font: inherit; font-size: 14px; letter-spacing: -0.224px; padding: 6px 14px; border-radius: var(--pill);
  color: var(--ink-80); cursor: pointer; white-space: nowrap;
}
.seg button.on { background: var(--canvas); color: var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,0.06); font-weight: 600; }
.tabs { display: flex; gap: 4px; margin-bottom: var(--s-lg); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 8px 16px; border-radius: var(--pill); font-size: 14px; color: var(--ink-80); white-space: nowrap; letter-spacing: -0.224px;
}
.tabs a:hover { text-decoration: none; background: rgba(0,0,0,0.04); }
.tabs a.on { background: var(--ink); color: #fff; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12px; font-weight: 600; color: var(--ink-48); letter-spacing: -0.12px; }
.field .hint { font-size: 12px; color: var(--ink-48); }
input[type=text], input[type=number], input[type=date], input[type=tel], input[type=email], input[type=password], input[type=search], select, textarea, .input {
  font: inherit; font-size: 17px; letter-spacing: -0.374px; color: var(--ink);
  background: var(--canvas); border: 1px solid rgba(0, 0, 0, 0.14); border-radius: var(--r-md);
  padding: 10px 14px; min-height: 44px; width: 100%; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237a7a7a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-focus); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18); }
input[readonly] { background: var(--parchment); }
input.sm, select.sm { font-size: 14px; min-height: 34px; padding: 6px 10px; letter-spacing: -0.224px; }
select.sm { padding-right: 28px; background-position: right 10px center; }
.search {
  border-radius: var(--pill) !important; padding-left: 40px !important; min-width: 200px;
  background: var(--canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a7a7a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center !important;
}
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.form-grid { display: grid; gap: var(--s-md); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3f { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filters { display: flex; gap: var(--s-xs); flex-wrap: wrap; align-items: center; margin-bottom: var(--s-md); }
.filters > input, .filters > select { width: auto; min-width: 140px; }
.filters .search { flex: 1 1 220px; }
.money-input { font-family: var(--font-display); font-size: 28px !important; font-weight: 600; letter-spacing: -0.4px !important; font-variant-numeric: tabular-nums; }
.form-error { color: var(--neg); font-size: 14px; margin-top: var(--s-sm); }

/* Arama + seçim kutusu */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 300; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow: auto;
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.combo-list div { padding: 10px 14px; cursor: pointer; font-size: 15px; border-bottom: 1px solid var(--divider); }
.combo-list div:last-child { border-bottom: 0; }
.combo-list div.on, .combo-list div:hover { background: rgba(0, 102, 204, 0.08); }
.combo-list div small { display: block; color: var(--ink-48); font-size: 12px; }

/* ---------- Modal / sheet ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto;
  animation: fade 0.18s ease;
}
.modal {
  background: var(--canvas); border-radius: var(--r-lg); width: 100%; max-width: 560px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.24); animation: rise 0.22s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; max-height: none;
}
.modal.wide { max-width: 900px; }
.modal.xwide { max-width: 1200px; }
.modal-head { display: flex; align-items: center; gap: var(--s-sm); padding: 18px 24px 0; }
.modal-head h3 { flex: 1; font-size: 21px; }
.modal-body { padding: 18px 24px; }
.modal-foot {
  display: flex; gap: var(--s-xs); justify-content: flex-end; align-items: center; padding: 14px 24px 18px;
  border-top: 1px solid var(--divider); flex-wrap: wrap;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes sheet { from { transform: translateY(100%); } }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: rgba(29, 29, 31, 0.94); color: #fff; padding: 12px 20px; border-radius: var(--pill); font-size: 14px;
  max-width: calc(100% - 32px); animation: rise 0.2s ease; pointer-events: auto;
}
.toast.err { background: var(--neg); }

/* ---------- Mobil tab bar ---------- */
.tabbar { display: none; }
.sheet-menu .menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-grid a, .menu-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: var(--r-lg);
  background: var(--parchment); color: var(--ink); font: inherit; font-size: 13px; border: 0; cursor: pointer; text-align: center; letter-spacing: -0.12px;
}
.menu-grid a:hover { text-decoration: none; }
.menu-grid svg { width: 24px; height: 24px; color: var(--primary); }

/* ---------- Giriş ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art {
  background: var(--tile-1); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 64px;
}
.login-art h1 { font-size: 56px; line-height: 1.07; letter-spacing: -0.28px; }
.login-art p { font-size: 21px; color: var(--muted-dark); max-width: 460px; margin-top: 16px; line-height: 1.38; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--parchment); }
.login-form form { width: 100%; max-width: 360px; }

/* ---------- Ürün kartları ---------- */
.prod-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.prod {
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 16px; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; position: relative;
}
.prod .ph { aspect-ratio: 1 / 1; border-radius: var(--r-sm); background: var(--parchment); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.prod .ph img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(3px 5px 30px rgba(0,0,0,0.22)); }
.prod .ph .none { color: var(--ink-48); font-size: 12px; }
.prod .nm { font-weight: 600; font-size: 17px; line-height: 1.24; }
.prod .cd { font-size: 12px; color: var(--ink-48); }
.prod .sel { position: absolute; top: 24px; left: 24px; }
.prod.selected { border: 2px solid var(--primary-focus); padding: 15px; }
.swatches { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Üretim matrisi ---------- */
.stage { min-width: 120px; }
.bar { height: 6px; background: var(--divider); border-radius: var(--pill); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: var(--pill); }
.bar.done > i { background: var(--pos); }
.stage .nums { font-size: 12px; color: var(--ink-48); }
.stage-cell { cursor: pointer; border-radius: var(--r-sm); padding: 6px; margin: -6px; }
.stage-cell:hover { background: rgba(0, 102, 204, 0.06); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--ink-48); }
.kv dd { margin: 0; }

.timeline { font-size: 14px; }
.timeline .ev { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.timeline .ev:last-child { border-bottom: 0; }
.diff { font-size: 12px; color: var(--ink-80); background: var(--parchment); border-radius: var(--r-sm); padding: 8px 10px; margin-top: 6px; overflow-x: auto; }
.diff b { color: var(--ink); }

.banner { border-radius: var(--r-lg); padding: 14px 18px; background: rgba(0, 102, 204, 0.06); border: 1px solid rgba(0, 102, 204, 0.2); font-size: 14px; margin-bottom: var(--s-lg); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner.red { background: rgba(196, 50, 28, 0.06); border-color: rgba(196, 50, 28, 0.25); }

.loading { padding: 64px; text-align: center; color: var(--ink-48); }
.spin { width: 22px; height: 22px; border: 2px solid var(--hairline); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.sticky-foot {
  position: sticky; bottom: 12px; z-index: 5;
  background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
@media (max-width: 900px) { .sticky-foot { bottom: calc(var(--tabbar-h) + 12px); } }

/* Masaüstü tablo / mobil liste ikilisi */
.only-mobile { display: none; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1068px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-num { font-size: 40px; }
}
@media (max-width: 900px) {
  .gnav-links { display: none; }
  .gnav-user { display: none; }
  .gnav .gnav-burger { display: inline-flex; }
  .subnav-inner { padding: 6px 16px; }
  main { padding: 16px 16px calc(var(--tabbar-h) + 32px); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(245, 245, 247, 0.86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }
  .tabbar a, .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--ink-48); font-size: 10px; letter-spacing: -0.08px; background: none; border: 0; font-family: inherit; cursor: pointer;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--primary); }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar .plus span.c {
    width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -14px;
  }
  .tabbar .plus svg { width: 26px; height: 26px; }
  .only-mobile { display: block; }
  .only-desktop { display: none !important; }
  .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
  .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 40px 24px 32px; min-height: 36vh; }
  .login-art h1 { font-size: 40px; }
  .login-art p { font-size: 17px; }
  .subnav-actions .btn-ghost, .subnav-actions .btn-pearl { display: none; }
  .subnav-actions .keep { display: inline-flex !important; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  .card { padding: 18px; }
  .card.flush > .card-head { padding: 18px 18px 0; }
  .card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: 18px; }
  .card.flush .tbl th:last-child, .card.flush .tbl td:last-child { padding-right: 18px; }
  .li { padding: 12px 18px; }
  .tile-dark { padding: 24px; }
  .hero-num { font-size: 34px; }
  .stat .value { font-size: 22px; }
  .g4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .grid { gap: 16px; }
  .form-grid, .form-grid.g3f { grid-template-columns: minmax(0, 1fr); }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; max-width: none !important; animation: sheet 0.26s cubic-bezier(.2,.8,.2,1); max-height: 94vh; }
  .modal-body { overflow-y: auto; padding: 16px 18px; }
  .modal-head { padding: 16px 18px 0; }
  .modal-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .filters > input, .filters > select { flex: 1 1 140px; min-width: 0; }
  .subnav h1 { font-size: 19px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .prod { padding: 10px; }
  .prod.selected { padding: 9px; }
  .prod .nm { font-size: 15px; }
  .prod .sel { top: 16px; left: 16px; }
}
@media print {
  .gnav, .subnav, .tabbar { display: none !important; }
  body { background: #fff; }
}
