/* Inter (değişken ağırlık, SIL OFL — fonts/LICENSE.txt): panelin kendi sunucusundan; Google'a bağlantı yok, ilk açılış hızlı */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Satış Yönetimi — lacivert yan menü, beyaz kartlar, mavi ana renk. Mobil öncelikli; açık/koyu tema. */
:root {
  color-scheme: light;
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f6f8fb; --surface-3: #eef2f8; --line: #e6e9f0; --line-2: #d8dde7;
  --text: #0f172a; --text-2: #475569; --muted: #8a94a6;
  --primary: #1f63e9; --primary-2: #1a55cc; --primary-ink: #ffffff; --primary-soft: #e8f0fe; --primary-soft-2: #d6e4fd;
  --nav-bg: #0f1c35; --nav-bg-2: #15264a; --nav-text: #c3cde0; --nav-muted: #7f8db0; --nav-active: #1d3768; --nav-active-text: #ffffff;
  --good: #16a34a; --good-soft: #e8f7ee; --warn: #c2410c; --warn-soft: #fff1e6; --amber: #b45309; --amber-soft: #fef3c7;
  --bad: #dc2626; --bad-soft: #fdecec; --purple: #7c3aed; --purple-soft: #f1eafe; --info: #1f63e9; --info-soft: #e8f0fe;
  /* Kanal renkleri (grafikler; sabit sıra, renk körlüğüne göre doğrulandı) */
  --c-ikas1: #2a78d6; --c-ikas2: #eb6834; --c-trendyol: #1baf7a; --c-hepsiburada: #eda100; --c-pttavm: #e87ba4; --c-n11: #7b3fe4; --c-idefix: #ffc20e; --c-pazarama: #00a2e8;
  --radius: 14px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .04);
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 8px 24px rgb(15 23 42 / .06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --side: 248px; --tabbar: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1220; --surface: #121b2d; --surface-2: #172238; --surface-3: #1c2942; --line: #23314d; --line-2: #2d3d5e;
    --text: #e8edf6; --text-2: #b4c0d6; --muted: #7e8ba5;
    --primary: #4c8bf5; --primary-2: #6aa0f7; --primary-ink: #ffffff; --primary-soft: #16284b; --primary-soft-2: #1d3563;
    --nav-bg: #0a1426; --nav-bg-2: #101d36; --nav-active: #1d3768;
    --good: #4ade80; --good-soft: #12301f; --warn: #fb923c; --warn-soft: #351f10; --amber: #fbbf24; --amber-soft: #33270d;
    --bad: #f87171; --bad-soft: #3a1717; --purple: #a78bfa; --purple-soft: #2a1f4a; --info: #6aa0f7; --info-soft: #16284b;
    --c-ikas1: #3987e5; --c-ikas2: #d95926; --c-trendyol: #199e70; --c-hepsiburada: #c98500; --c-pttavm: #d55181;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3); --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220; --surface: #121b2d; --surface-2: #172238; --surface-3: #1c2942; --line: #23314d; --line-2: #2d3d5e;
  --text: #e8edf6; --text-2: #b4c0d6; --muted: #7e8ba5;
  --primary: #4c8bf5; --primary-2: #6aa0f7; --primary-ink: #ffffff; --primary-soft: #16284b; --primary-soft-2: #1d3563;
  --nav-bg: #0a1426; --nav-bg-2: #101d36; --nav-active: #1d3768;
  --good: #4ade80; --good-soft: #12301f; --warn: #fb923c; --warn-soft: #351f10; --amber: #fbbf24; --amber-soft: #33270d;
  --bad: #f87171; --bad-soft: #3a1717; --purple: #a78bfa; --purple-soft: #2a1f4a; --info: #6aa0f7; --info-soft: #16284b;
  --c-ikas1: #3987e5; --c-ikas2: #d95926; --c-trendyol: #199e70; --c-hepsiburada: #c98500; --c-pttavm: #d55181;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3); --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a.link { color: var(--primary); text-decoration: none; font-weight: 600; }
a.link:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 750; }
h3 { font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .spacer { flex: 1; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.up { color: var(--good); } .down { color: var(--bad); } .flat { color: var(--muted); }

/* ---------- yerleşim ---------- */
.side { display: none; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.page-head { flex: 1; min-width: 0; }
.page-head h1 { font-size: 20px; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.topbar .search { display: none; }
.topbar .top-add { display: none; }
#view { padding: 16px 14px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); max-width: 1440px; margin: 0 auto; outline: none; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; text-decoration: none; color: var(--muted); position: relative; border: 0; background: none; cursor: pointer; }
.tabbar .on { color: var(--primary); font-weight: 700; }
.tabbar .ico { width: 22px; height: 22px; }
.tabbar .dotn { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }

@media (min-width: 1024px) {
  body { display: grid; grid-template-columns: var(--side) 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 18px 14px; background: var(--nav-bg); color: var(--nav-text); }
  .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; padding: 6px 10px 22px; letter-spacing: -.01em; }
  .brand .logo { width: 30px; height: 30px; flex: none; }
  .nav { display: flex; flex-direction: column; gap: 4px; }
  .nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--nav-text); font-weight: 550; font-size: 14.5px; }
  .nav a:hover { background: var(--nav-bg-2); color: #fff; }
  .nav a.on { background: var(--nav-active); color: var(--nav-active-text); }
  .nav .ico { width: 20px; height: 20px; }
  .nav .count { margin-left: auto; background: var(--primary); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 8px; font-weight: 700; }
  .side-foot { margin-top: auto; display: grid; gap: 10px; }
  .side-foot .nav a { padding: 10px 12px; }
  .status-box { border: 1px solid var(--nav-bg-2); background: var(--nav-bg-2); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
  .status-box .led { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgb(34 197 94 / .2); margin-top: 3px; flex: none; }
  .status-box.warn .led { background: #f59e0b; box-shadow: 0 0 0 4px rgb(245 158 11 / .2); }
  .status-box b { color: #fff; font-size: 13.5px; display: block; }
  .status-box span { font-size: 12px; color: var(--nav-muted); }
  .topbar { padding: 18px 28px 14px; background: var(--bg); border-bottom: 0; gap: 14px; }
  .page-head h1 { font-size: 26px; }
  .topbar .search { display: block; width: min(420px, 34vw); }
  .topbar .top-add { display: inline-flex; }
  .tabbar { display: none; }
  #view { padding: 6px 28px 40px; }
}

/* ---------- ikonlar ---------- */
.ico { display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ico-home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.ico-orders { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.ico-box { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='m3 8 9 5 9-5M12 13v8'/%3E%3C/svg%3E"); }
.ico-db { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3'/%3E%3C/svg%3E"); }
.ico-truck { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5h13v11H1zM14 9h4l4 4v3h-8z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2'/%3E%3Ccircle cx='17.5' cy='18.5' r='2'/%3E%3C/svg%3E"); }
.ico-bars { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='12' width='4' height='9' rx='1'/%3E%3Crect x='10' y='7' width='4' height='14' rx='1'/%3E%3Crect x='17' y='3' width='4' height='18' rx='1'/%3E%3C/svg%3E"); }
.ico-pie { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12A9 9 0 1 1 12 3v9z'/%3E%3Cpath d='M15 3.5A9 9 0 0 1 20.5 9H15z'/%3E%3C/svg%3E"); }
.ico-link { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E"); }
.ico-gear { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E"); }
.ico-calc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M8 6h8M8 11h.01M12 11h.01M16 11h.01M8 15h.01M12 15h.01M16 15v3M8 18h4'/%3E%3C/svg%3E"); }
.ico-sync { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 1-15.5 6.2L3 16M3 12a9 9 0 0 1 15.5-6.2L21 8'/%3E%3Cpath d='M21 3v5h-5M3 21v-5h5'/%3E%3C/svg%3E"); }
.ico-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ico-minus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.ico-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.ico-bell { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a1.9 1.9 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
.ico-print { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E"); }
.ico-tag { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4a1 1 0 0 1 1-1h8l9 9-9 9z'/%3E%3Ccircle cx='8' cy='8' r='1.5'/%3E%3C/svg%3E"); }
.ico-split { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='m3 8 9 5 9-5M12 13v8'/%3E%3C/svg%3E"); }
.ico-play { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15a1 1 0 0 0 1.5.9l12-7.5a1 1 0 0 0 0-1.8l-12-7.5A1 1 0 0 0 7 4.5z'/%3E%3C/svg%3E"); }
.ico-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.ico-x { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); }
.ico-chev { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E"); }
.ico-down { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.ico-up { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E"); }
.ico-back { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E"); }
.ico-copy { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
.ico-warn { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.ico-download { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E"); }
.ico-upload { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12'/%3E%3C/svg%3E"); }
.ico-filter { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h18l-7 8.5V19l-4 2v-8.5z'/%3E%3C/svg%3E"); }
.ico-cal { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.ico-grid { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.ico-dots { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E"); }
.ico-user { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='4.5'/%3E%3Cpath d='M3 21c0-4.4 4-7.5 9-7.5s9 3.1 9 7.5z'/%3E%3C/svg%3E"); }
.ico-menu { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E"); }
.ico-bolt { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h6l-1 8 9-12h-6z'/%3E%3C/svg%3E"); }
.ico-key { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='4.5'/%3E%3Cpath d='m10.7 12.3 9.8-9.8M17 6l3 3M14 9l2 2'/%3E%3C/svg%3E"); }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- temel bileşenler ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.card-pad { padding: 16px 18px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 12px; }
.section-title h2 { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; color: var(--text); -webkit-tap-highlight-color: transparent; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 1px 2px rgb(31 99 233 / .3); }
.btn.primary:hover { background: var(--primary-2); }
.btn.outline { border-color: var(--primary-soft-2); color: var(--primary); background: var(--surface); }
.btn.outline:hover { background: var(--primary-soft); }
.btn.soft { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); text-decoration: none; position: relative; flex: none; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn .ico { width: 21px; height: 21px; }
.icon-btn .dot-red { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; border: 0; cursor: pointer; flex: none; }

.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.field > small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); outline: none; }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.big { font-size: 20px; font-weight: 700; min-height: 54px; }
.input-group { position: relative; }
.input-group .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-weight: 700; }
.input-group .input { padding-right: 38px; }
.search { position: relative; flex: 1; min-width: 180px; }
.search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 40px; min-height: 44px; background: var(--surface); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.check input, .cb { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.switch { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--line-2); transition: .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }

/* sekmeler ve seçimler */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; white-space: nowrap; font-weight: 600; color: var(--text-2); }
.tab:hover { background: var(--surface-2); }
.tab.on { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary-soft-2); }
.tab .n { min-width: 26px; padding: 1px 8px; border-radius: 8px; background: var(--surface-3); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.tab.on .n { background: var(--primary); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.seg { display: inline-flex; padding: 4px; background: var(--surface-3); border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-weight: 650; font-size: 13px; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgb(15 23 42 / .1); }
.ch-tabs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab { flex: 1 0 auto; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 650; white-space: nowrap; }
.ch-tab:hover { border-color: var(--line-2); }
.ch-tab.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

/* kanal logoları (harf rozetleri) */
.logo-b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; font-weight: 800; font-size: 13px; flex: none; letter-spacing: -.02em; color: #fff; }
.logo-b.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
.logo-b.ikas { background: #111; } .logo-b.ikas .ico { width: 15px; height: 15px; color: #fff; }
.logo-b.trendyol { background: #f27a1a; }
.logo-b.hepsiburada { background: #ff6000; font-size: 12px; }
.logo-b.pttavm { background: #ffd200; color: #0b4a9c; font-size: 11px; }
.logo-b.sm.pttavm, .logo-b.sm.hepsiburada { font-size: 9.5px; }
.ch-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }

/* durumlar */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.pill.new { background: var(--good-soft); color: var(--good); }
.pill.processing { background: var(--primary-soft); color: var(--primary); }
.pill.shipped { background: var(--purple-soft); color: var(--purple); }
.pill.delivered { background: var(--good-soft); color: var(--good); }
.pill.cancelled, .pill.returned, .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.info { background: var(--primary-soft); color: var(--primary); }
.pill .ico { width: 13px; height: 13px; }
.led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.led.off { background: var(--muted); } .led.err { background: var(--bad); } .led.demo { background: #f59e0b; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); font-size: 13.5px; }
.notice.warn { background: var(--amber-soft); } .notice.bad { background: var(--bad-soft); } .notice.good { background: var(--good-soft); }
.notice .ico { margin-top: 1px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* KPI kartları */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; display: block; min-width: 0; overflow: hidden; box-shadow: var(--shadow-sm); }
.kpi .label { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.kpi .delta { font-size: 13px; font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kpi .spark { position: absolute; right: 14px; top: 30px; width: 44%; max-width: 130px; height: 46px; }
.kpi .kpi-ico { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.kpi .kpi-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 12.5px; text-decoration: none; }
@media (min-width: 900px) { .kpi .value { font-size: 30px; } }
@media (max-width: 899px) { .kpi .spark, .kpi .kpi-ico { display: none; } .kpi .value { font-size: 23px; } .kpi .delta { flex-wrap: wrap; } }

/* kanal kartları */
.ch-cards { display: grid; gap: 10px; grid-auto-flow: column; grid-auto-columns: minmax(200px, 72%); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ch-cards::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .ch-cards { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; } }
@media (min-width: 1200px) { .ch-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; } }
.ch-card { display: flex; align-items: center; gap: 10px; padding: 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; min-width: 0; box-shadow: var(--shadow-sm); }
.ch-card:hover { border-color: var(--line-2); }
.ch-card .meta { flex: 1; min-width: 0; }
.ch-card .nm { display: flex; align-items: center; gap: 8px; font-weight: 750; }
.ch-card .st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--good); }
.ch-card .st.off { color: var(--muted); } .ch-card .st.err { color: var(--bad); } .ch-card .st.demo { color: var(--amber); }
.ch-card .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* tablo */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.t td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; } .t th.r { text-align: right; } .t .c { text-align: center; }
.t tbody tr.sel-row td { background: var(--primary-soft); }
.t tbody tr.sel-row td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: var(--surface-2); }
.t tbody tr.sel-row.click:hover td { background: var(--primary-soft); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t th:first-child, .t td:first-child { padding-left: 16px; } .t th:last-child, .t td:last-child { padding-right: 16px; }
@media (max-width: 1599px) { .col-pkg { display: none; } }
@media (max-width: 1499px) { .col-cust { display: none; } }
.only-narrow { display: none; }
@media (max-width: 1499px) { .only-narrow { display: block; } }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.thumbs { display: flex; align-items: center; gap: 6px; }
.thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3) center/cover; display: grid; place-items: center; font-weight: 700; color: var(--muted); font-size: 12px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.thumb.sm { width: 36px; height: 36px; border-radius: 8px; font-size: 11px; }
.thumb.lg { width: 56px; height: 56px; }
.cust { display: flex; gap: 10px; align-items: center; min-width: 0; }
.cust .ico { color: var(--muted); }

/* toplu işlem çubuğu */
.bulk { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.bulk b { margin-right: 6px; }

/* satır açılımı (sipariş işlemleri) */
.expand { padding: 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.expand-grid { display: grid; gap: 14px; }
@media (min-width: 1100px) { .expand-grid { grid-template-columns: minmax(280px, 0.9fr) repeat(auto-fit, minmax(300px, 1fr)); } }
.ops { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pkg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pkg-card .hd { display: flex; align-items: center; gap: 8px; }
.pkg-card .hd b, .pkg-card .hd .muted, .pkg-card .hd .pill { white-space: nowrap; }
.pkg-card .hd .box { width: 26px; height: 26px; border-radius: 6px; background: #c9935b; display: grid; place-items: center; color: #fff; flex: none; }
.pkg-card .hd .box .ico { width: 16px; height: 16px; }
.pkg-card .line { display: flex; gap: 10px; align-items: center; }
.pkg-card .acts { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.pkg-card .acts .btn { flex: 1; }

/* sipariş adımları */
.stepper { display: flex; align-items: flex-start; margin: 14px 4px 16px; }
.stepper .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: center; }
.stepper .st::before { content: ""; position: absolute; top: 9px; right: 50%; width: 100%; height: 3px; background: var(--line-2); z-index: 0; }
.stepper .st:first-child::before { display: none; }
.stepper .st.done::before, .stepper .st.cur::before { background: var(--primary); }
.stepper .b { width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); position: relative; z-index: 1; display: grid; place-items: center; color: #fff; }
.stepper .st.done .b { background: var(--primary); }
.stepper .st.done .b .ico { width: 12px; height: 12px; }
.stepper .st.cur .b { background: var(--surface); box-shadow: inset 0 0 0 4px var(--primary); }
.stepper .st.cur { color: var(--primary); }
.stepper .st.done { color: var(--text-2); }
.stepper.bad .st.cur .b { box-shadow: inset 0 0 0 4px var(--bad); } .stepper.bad .st.cur { color: var(--bad); }

/* sayfalama */
.pager { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager .pg { min-width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-weight: 650; color: var(--text-2); }
.pager .pg.on { background: var(--primary); color: #fff; }
.pager .pg:hover:not(.on) { background: var(--surface-3); }

/* mobil sipariş kartları */
.m-list { display: grid; gap: 10px; }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); }
.m-card.sel-row { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.m-card .top { display: flex; align-items: center; gap: 10px; }

/* listeler */
.list { display: grid; gap: 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.dist { display: grid; grid-template-columns: minmax(90px, auto) 1fr 52px; gap: 10px 14px; align-items: center; font-size: 13.5px; }
.dist .bar { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.dist .bar span { display: block; height: 100%; border-radius: 6px; }
.mini-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); min-width: 80px; gap: 2px; }
.mini-bar span { display: block; height: 100%; }
.best { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.best .it { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }

/* gösterge düzeni */
.dash-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 1100px) {
  .dash-grid.perf { grid-template-columns: 1.65fr 1fr; }
  .dash-grid.ord { grid-template-columns: 1.65fr 1fr; }
  .dash-grid.bottom { grid-template-columns: 1.1fr 1fr 1fr; }
}
.date-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 14px; }
.date-bar .chip { min-height: 36px; }
.date-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.date-pick input { border: 0; background: transparent; outline: none; font-weight: 600; min-width: 0; width: 124px; }

/* kâr */
.res-big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.res-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.res-box .label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.res-box .v { font-size: 20px; font-weight: 800; margin-top: 2px; }
.gain { background: var(--good-soft); border-radius: 14px; padding: 18px; text-align: center; }
.gain .v { font-size: 38px; font-weight: 800; color: var(--good); letter-spacing: -.02em; }
.calc-field { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.calc-field > span { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.preset { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
input[type=range] { width: 100%; accent-color: var(--primary); }
.two-col { display: grid; gap: 16px; }
@media (min-width: 1000px) { .two-col { grid-template-columns: 1.3fr 1fr; align-items: start; } .two-col .sticky { position: sticky; top: 90px; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv .total { display: contents; } .kv .total dt, .kv .total dd { font-weight: 800; color: var(--text); padding-top: 8px; border-top: 1px solid var(--line); }

/* grafik */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.chart .seg-rect { transition: opacity .1s; }
.chart .col:hover .seg-rect, .chart .col:focus .seg-rect { opacity: .82; }
.chart .col:focus { outline: none; }
.chart .cmp-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 5; stroke-linejoin: round; }
.chart .main-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .main-area { fill: var(--primary); opacity: .09; }
.chart .xhair { stroke: var(--line-2); stroke-width: 1; }
.chart .hit-layer { fill: transparent; cursor: crosshair; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 170px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; }
.tip .h { font-weight: 650; margin-bottom: 6px; color: var(--text-2); }
.tip .r { display: flex; align-items: center; gap: 8px; }
.tip .r b { margin-left: auto; font-variant-numeric: tabular-nums; }
.tip .k { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.tip .k.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 5px) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); }
.legend button, .legend span.it { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; cursor: pointer; color: inherit; font-weight: 550; }
.legend button.off { opacity: .4; }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; }
.legend .ln { width: 16px; height: 2px; background: var(--primary); border-radius: 1px; }
.legend .ln.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.legend .pt { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }

/* ürün/stok satırları */
.stock-ctl { display: flex; align-items: center; gap: 6px; }
.stock-ctl .val { min-width: 48px; text-align: center; font-weight: 800; font-size: 17px; cursor: pointer; border-radius: 8px; padding: 2px 6px; }
.stock-ctl .val:hover { background: var(--surface-3); }
.stock-ctl .val.low { color: var(--amber); } .stock-ctl .val.neg { color: var(--bad); }
.round { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.round:hover { background: var(--surface-3); }
.ch-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.ch-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 2px 7px 2px 3px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.ch-dot.err { background: var(--bad-soft); color: var(--bad); }
.ch-dot.wait { background: var(--amber-soft); color: var(--amber); }

/* entegrasyon kartları */
.integ { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.integ .card { display: flex; flex-direction: column; gap: 12px; }
.integ .hd { display: flex; align-items: center; gap: 12px; }
.integ .src { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--muted); }
.integ .src.panel { background: var(--primary-soft); color: var(--primary); }
details.adv summary { cursor: pointer; color: var(--primary); font-weight: 650; font-size: 13px; list-style: none; }
details.adv summary::-webkit-details-marker { display: none; }

/* ---------- alt pencere ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgb(15 23 42 / .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-height: 94dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); animation: up .2s ease-out; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); border-radius: 20px 20px 0 0; }
.sheet-head h2 { flex: 1; min-width: 0; }
.sheet-body { overflow-y: auto; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
@media (min-width: 760px) {
  .sheet-bg { align-items: center; padding: 24px; }
  .sheet { max-width: 760px; max-height: 90dvh; border-radius: 18px; }
  .sheet.wide { max-width: 1060px; }
  .sheet.narrow { max-width: 470px; }
  .sheet-foot { border-radius: 0 0 18px 18px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
.menu { position: absolute; z-index: 40; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; font-weight: 550; text-decoration: none; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }

#toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--tabbar) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
#toast .t-msg { padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--surface); box-shadow: var(--shadow); font-weight: 600; animation: up .2s; pointer-events: auto; }
#toast .t-msg.err { background: var(--bad); color: #fff; }
@media (min-width: 1024px) { #toast { bottom: 24px; } }

/* giriş */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: var(--nav-bg); grid-column: 1 / -1; }
.login .card { width: min(100%, 400px); padding: 30px; } /* eski giriş kartı (aşağıdaki .login-card kullanılır) */

/* ---------- yazdırma (kargo etiketi) ---------- */
#print { display: none; }
@media print {
  body { background: #fff; display: block; }
  .side, .main, #sheet-root, #toast, .tabbar { display: none !important; }
  #print { display: block; }
}
/* Kendi kargo etiketimiz: barkod alanı geniş ve beyaz kenarlı (okunabilirlik); boyut s-100x150 | s-a5 | s-a4 */
.slabel { width: 100mm; height: 150mm; padding: 4.5mm; box-sizing: border-box; color: #000; background: #fff; font: 10pt/1.3 Arial, Helvetica, sans-serif; display: flex; flex-direction: column; gap: 2mm; page-break-after: always; overflow: hidden; }
.slabel.s-a5 { width: 148mm; height: 210mm; padding: 8mm; font-size: 10.5pt; gap: 3mm; }
.slabel.s-a4 { width: 210mm; height: 297mm; padding: 12mm; font-size: 11pt; gap: 4mm; }
.slabel .lb-hd { display: flex; align-items: center; justify-content: space-between; gap: 3mm; padding-bottom: 2mm; border-bottom: 0.4mm solid #000; }
.slabel .lb-logo { max-height: 11mm; max-width: 48mm; object-fit: contain; }
.slabel.s-a5 .lb-logo, .slabel.s-a4 .lb-logo { max-height: 15mm; max-width: 70mm; }
.slabel .lb-mark { font: 900 14pt/1 Arial, Helvetica, sans-serif; letter-spacing: -0.3mm; border: 0.6mm solid #000; border-radius: 2mm; padding: 1.2mm 2.5mm; white-space: nowrap; }
.slabel .lb-mark.ikas { text-transform: lowercase; } .slabel .lb-mark.pttavm { letter-spacing: 0; }
.slabel .lb-cargo { display: flex; align-items: center; justify-content: space-between; gap: 2mm; }
.slabel .lb-cargo b { display: block; font-size: 15pt; font-weight: 900; line-height: 1.1; }
.slabel .lb-agr { display: inline-block; margin-top: 1mm; font-size: 8.5pt; font-weight: 700; border: 0.35mm solid #000; border-radius: 1mm; padding: 0.4mm 1.5mm; }
.slabel .lb-pkg { font-size: 18pt; font-weight: 900; border: 0.7mm solid #000; padding: 0 2mm; line-height: 1.15; }
.slabel .lb-main { display: flex; flex-direction: column; gap: 2mm; }
.slabel .lb-bar { text-align: center; padding: 1.5mm 3mm; border-top: 0.5mm solid #000; border-bottom: 0.5mm solid #000; }
.slabel .lb-bar svg { display: block; width: 100%; height: 24mm; }
.slabel .lb-bar .code { font: 700 12pt/1.25 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.6mm; margin-top: 0.8mm; }
.slabel .lb-bar .warn { font-size: 7pt; }
.slabel .lb-info { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3mm; }
.slabel .lb-info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.6mm 2mm; font-size: 8.5pt; align-content: start; }
.slabel .lb-info dt { color: #000; opacity: .75; } .slabel .lb-info dd { margin: 0; word-break: break-word; }
.slabel .lb-to { border-left: 0.4mm solid #000; padding-left: 2.5mm; }
.slabel .lb-to .lbl { font-size: 7.5pt; font-weight: 700; letter-spacing: .3mm; }
.slabel .lb-to .nm { font-size: 13pt; font-weight: 900; line-height: 1.15; }
.slabel .lb-to .ph { font-size: 10pt; font-weight: 700; }
.slabel .lb-to .ad { font-size: 9pt; }
.slabel .lb-to .ct { font-size: 12pt; font-weight: 900; }
.slabel .lb-items { width: 100%; border-collapse: collapse; font-size: 8.5pt; flex: 0 1 auto; }
.slabel .lb-items th { text-align: left; font-size: 7.5pt; border-bottom: 0.4mm solid #000; padding: 0.5mm 0; }
.slabel .lb-items td { border-bottom: 0.2mm solid #999; padding: 1mm 0; vertical-align: top; }
.slabel .lb-items .q { width: 8mm; font-weight: 900; font-size: 10pt; }
.slabel .lb-items .n { font-weight: 700; }
.slabel .lb-items .v { display: inline-block; margin: 0.4mm 1.5mm 0 0; padding: 0 1.2mm; border: 0.3mm solid #000; border-radius: 1mm; font-weight: 700; font-size: 8pt; }
.slabel .lb-items .s { font-size: 7pt; opacity: .8; }
.slabel .lb-items .p { text-align: right; white-space: nowrap; width: 18mm; }
.slabel .lb-from { font-size: 7.5pt; border-top: 0.3mm solid #000; padding-top: 1.2mm; margin-top: auto; }
/* A5 / A4: örnek düzen — solda bilgiler, sağda barkod */
.slabel.s-a5 .lb-main, .slabel.s-a4 .lb-main { flex-direction: row-reverse; align-items: flex-start; gap: 6mm; }
.slabel.s-a5 .lb-bar, .slabel.s-a4 .lb-bar { flex: 0 0 48%; border: 0; padding: 0; }
.slabel.s-a5 .lb-info, .slabel.s-a4 .lb-info { flex: 1; grid-template-columns: 1fr; }
.slabel.s-a5 .lb-to, .slabel.s-a4 .lb-to { border-left: 0; padding-left: 0; border-top: 0.3mm solid #000; padding-top: 2mm; }
.slabel.s-a5 .lb-bar svg, .slabel.s-a4 .lb-bar svg { height: 26mm; }
.slabel.s-a5 .lb-items, .slabel.s-a4 .lb-items { flex: 0 0 auto; font-size: 10pt; }

/* ---------- 3. aşama: logo, gruplu menü, hızlı işler, çekmece ---------- */
.brand-card { display: block; background: #fff; border-radius: 12px; padding: 10px 12px; margin: 0 2px 6px; }
.brand-card img { display: block; width: 100%; height: 44px; object-fit: contain; }
.brand-title { color: var(--nav-muted); font-size: 12px; font-weight: 600; padding: 0 10px 14px; text-align: center; min-height: 6px; }
.nav-sec { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--nav-muted); text-transform: uppercase; padding: 14px 12px 4px; }
.side .nav { overflow-y: auto; scrollbar-width: none; }
.side .nav::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .nav a { padding: 9px 12px; font-size: 14px; } .nav { gap: 2px; } }
.nav .count.warn { background: #f59e0b; }
.m-logo { display: none; }
@media (max-width: 1023px) { .m-logo { display: block; height: 30px; width: auto; max-width: 90px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px 6px; } }
.tasks { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 700px) { .tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .tasks { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-width: 0; box-shadow: var(--shadow-sm); }
.task:hover { border-color: var(--primary-soft-2); box-shadow: var(--shadow); }
.task .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.task .ic .ico { width: 20px; height: 20px; }
.task b { font-size: 22px; font-weight: 800; display: block; line-height: 1.1; }
.task span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.task.blue .ic { background: var(--primary-soft); color: var(--primary); }
.task.orange .ic { background: var(--warn-soft); color: var(--warn); }
.task.purple .ic { background: var(--purple-soft); color: var(--purple); }
.task.red .ic { background: var(--bad-soft); color: var(--bad); }
.task.green .ic { background: var(--good-soft); color: var(--good); }
.task.zero { opacity: .65; }
/* sağdan açılan çekmece (masaüstü sipariş detayı) */
@media (min-width: 1100px) {
  .sheet-bg.drawer-bg { justify-content: flex-end; align-items: stretch; padding: 0; }
  .sheet.drawer { max-width: 980px; width: 72vw; max-height: 100dvh; height: 100dvh; border-radius: 18px 0 0 18px; animation: slideL .2s ease-out; }
  .sheet.drawer .sheet-head { border-radius: 18px 0 0 0; }
}
@keyframes slideL { from { transform: translateX(40px); opacity: .6; } }
.var-tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); margin-left: 6px; white-space: nowrap; }
.grp-row td { background: var(--surface-2); font-weight: 700; font-size: 13px; color: var(--text-2); }
.score { display: inline-grid; place-items: center; min-width: 42px; height: 26px; border-radius: 8px; font-weight: 800; font-size: 12.5px; }
.score.hi { background: var(--good-soft); color: var(--good); } .score.mid { background: var(--amber-soft); color: var(--amber); } .score.lo { background: var(--surface-3); color: var(--muted); }
.cand { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.cand + .cand { margin-top: 6px; }
.input.rule-sel { min-height: 36px; font-size: 13px; padding: 4px 8px; width: auto; flex: 0 0 auto; }
.prog { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.prog span { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.login .logo-big { display: block; width: 100%; max-height: 90px; object-fit: contain; margin-bottom: 4px; }
button.plain { background: none; border: 0; padding: 2px; cursor: pointer; font: inherit; color: inherit; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 8px; }
button.plain:hover { background: var(--surface-2); }
.sync-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sync-grid > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.sync-grid span, .sync-grid b { display: block; }
.sync-grid b { font-size: 14px; margin-top: 2px; }
@media (max-width: 520px) { .sync-grid { grid-template-columns: 1fr 1fr; } }
details.card > summary { cursor: pointer; list-style: none; }
.hello { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.hello h2 { font-size: 22px; font-weight: 800; margin: 0 0 2px; }
#view { animation: viewIn .18s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { #view, .sheet.drawer { animation: none; } }
.ch-tab .badge-n { background: var(--warn); color: #fff; border-radius: 9px; font-size: 11.5px; font-weight: 800; padding: 1px 7px; }
.m-card { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.m-card > * { min-width: 0; }

.link-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); min-width: 0; flex-wrap: wrap; }
.link-row:last-child { border-bottom: 0; }
@media (max-width: 600px) { .link-row > div[style*="flex:1"] { flex-basis: calc(100% - 60px); } }
@media print { .slabel.img { padding: 0; display: flex; align-items: center; justify-content: center; } .slabel.img img { width: 100%; height: 100%; object-fit: contain; } }
.late { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 8px 2px 3px; border-radius: 999px; white-space: nowrap; }
.late b { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; }
.late.warn { background: var(--amber-soft); color: var(--amber); } .late.warn b { background: var(--amber); }
.late.bad { background: var(--bad-soft); color: var(--bad); } .late.bad b { background: var(--bad); }
.ext { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: var(--purple); background: var(--purple-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.lbl-st { display: flex; flex-wrap: wrap; gap: 6px; }
.lbl-st span { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.lbl-st span.on { background: var(--good-soft); color: var(--good); }
.lbl-st span.cur { background: var(--info-soft); color: var(--info); }
.pkg-card .err { font-size: 12.5px; color: var(--bad); background: var(--bad-soft); border-radius: 8px; padding: 8px 10px; }
.pkg-card .cargo-row { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.timeline { display: grid; gap: 8px; }
.timeline .ev { display: flex; gap: 10px; font-size: 13px; }
.timeline .ev .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--primary); flex: none; }
.timeline .ev.channel .dot { background: var(--purple); }
.tab.warn-tab { color: var(--bad); }
.late-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--bad); color: #fff; display: inline-grid; place-items: center; font-size: 11px; }
.icon-btn.sm { width: 34px; height: 34px; }
.m-only { display: none; }
@media (max-width: 899px) {
  .m-only { display: inline-flex; }
  #view:not(.show-filters) .filters-more { display: none !important; }
  .show-filters .filters-more { display: flex !important; width: 100%; gap: 8px; flex-wrap: wrap; }
  .show-filters .filters-more > * { flex: 1 1 100%; }
}
/* Analizler: dönem kartları, haftalık çubuklar, iller */
.day-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.day-card { border: 1px solid var(--line); border-top: 4px solid var(--primary-soft-2); border-radius: 14px; padding: 14px; background: var(--surface); }
.day-card.cur { border-top-color: var(--primary); }
.day-card h3 { font-size: 18px; margin: 0; }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mini-grid > div { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.mini-grid span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-grid b { font-size: 13px; white-space: nowrap; }
.mini-grid b.down { color: var(--bad); }
.hbar { display: flex; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.hbar span { display: block; height: 100%; }
.city-list { display: grid; gap: 2px; padding: 0 16px 12px; }
.city { display: grid; grid-template-columns: 22px minmax(70px, 120px) 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.city .rk { color: var(--muted); font-weight: 700; text-align: right; }
@media (max-width: 600px) { .city { grid-template-columns: 22px 1fr auto; } .city .hbar, .city .small { display: none; } }
a.tab { text-decoration: none; }
.card-head { flex-wrap: wrap; row-gap: 8px; }
.rank { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 8px; font-weight: 800; font-size: 12.5px; background: var(--amber-soft); color: var(--amber); }
.rank.one { background: var(--good-soft); color: var(--good); }
.diag { display: grid; gap: 8px; }
.diag-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.diag-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; color: #fff; }
.diag-ic.good { background: var(--good); } .diag-ic.bad { background: var(--bad); } .diag-ic.amber { background: var(--amber); }
.ico-chat { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M9 10h6M9 14h4'/%3E%3C/svg%3E"); }
.qcard .qtext { font-size: 15px; font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.qcard .qans { background: var(--good-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.qcard textarea { min-height: 84px; }
.qcard .cnt { font-size: 11.5px; color: var(--muted); }
.qcard .cnt.bad { color: var(--bad); }

/* Ürünler: ana ürün (varyant grubu) satırı ve varyantlar */
.brand-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; margin-right: 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); vertical-align: 1px; }
.prod-t .grp-head { cursor: pointer; }
.prod-t .grp-head:hover td { background: var(--surface-2); }
.prod-t .grp-head.on td { background: var(--primary-soft); border-bottom-color: transparent; }
.grp-chev { transition: transform .15s; opacity: .6; flex: 0 0 auto; }
.grp-head.on .grp-chev, .m-card.grp.on .grp-chev { transform: rotate(180deg); }
.prod-t .var-row td { background: color-mix(in srgb, var(--primary-soft) 35%, transparent); }
.prod-t .var-row td:first-child { padding-left: 46px; position: relative; }
.prod-t .var-row td:first-child::before { content: ''; position: absolute; left: 26px; top: 0; bottom: 0; border-left: 2px solid var(--primary-soft); }
.m-card.grp .m-vars { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.m-card.grp .m-var { display: flex; align-items: center; gap: 10px; }
.num.low { color: var(--amber); }
.desc-view { font-size: 13.5px; line-height: 1.55; color: var(--text-2); max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--surface-2); }
.desc-view img { max-width: 100%; height: auto; } .desc-view table { border-collapse: collapse; } .desc-view td, .desc-view th { border: 1px solid var(--line); padding: 4px 6px; }

/* Sayfa geçişi: üst yükleme çubuğu ve iskelet */
#topload { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .2s; background: linear-gradient(90deg, transparent, var(--primary), transparent); background-size: 40% 100%; background-repeat: no-repeat; }
#topload.on { opacity: 1; animation: topload 1s linear infinite; }
@keyframes topload { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.skel-page { display: flex; flex-direction: column; gap: 14px; }
.skel-row { display: flex; gap: 12px; }
.skel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.skel { display: block; height: 14px; width: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
.skel-row .skel { height: 38px; border-radius: 10px; }
.skel.w20 { width: 20%; } .skel.w30 { width: 30%; } .skel.w40 { width: 40%; } .skel.w50 { width: 50%; } .skel.w60 { width: 60%; } .skel.w70 { width: 70%; } .skel.w80 { width: 80%; } .skel.w90 { width: 90%; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel, #topload.on { animation: none; } }
.code-box { margin: 0; max-height: 280px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- telefon uyumu ---------- */
/* Hiçbir öğe sayfayı yana taşırmasın: taşma olursa mobil tarayıcı sayfayı küçültür ve her şey küçük görünür */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video, canvas { max-width: 100%; }
.pkg-card .hd { flex-wrap: wrap; row-gap: 6px; }
.pkg-card .hd .pill { max-width: 100%; white-space: normal; text-align: left; }
.card-head { min-width: 0; }
.fin-step { display: grid; grid-template-columns: 190px 1fr 120px 48px; align-items: center; gap: 10px; }
.fin-step .amt { text-align: right; white-space: nowrap; font-weight: 700; }
@media (max-width: 1023px) {
  .page-head h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-head .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 640px) {
  .stack > .card, .card { min-width: 0; }
  .kpi .value { font-size: 20px; }
  .ch-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ch-tabs::-webkit-scrollbar { display: none; }
  .ch-tab { flex: 0 0 auto; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab { flex: 0 0 auto; }
  .chips { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr !important; }
  .fin-step { grid-template-columns: 1fr auto; row-gap: 4px; }
  .fin-step .bar { grid-column: 1 / -1; order: 3; }
  .fin-step .pct { display: none; }
  .t td, .t th { padding-left: 10px; padding-right: 10px; }
  .t td.num, .t td .num { white-space: nowrap; }
  .search { min-width: 0 !important; flex: 1 1 100%; }
  .sheet .form-grid { grid-template-columns: 1fr !important; }
  .row.wrap > .btn { flex: 0 0 auto; }
}

/* ======================================================================
   Telefon tasarımı (v2): kompakt üst çubuk, alt menü, simge ızgaralı menü, alttan açılan işlem listeleri,
   kart listeler, tam ekran sipariş, yeni giriş ekranı. Masaüstü görünümü değişmez.
   ====================================================================== */
.ico-eye { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.m-show { display: none; }
.fab { display: none; }

/* giriş (tüm ekranlar) */
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px;
  background: radial-gradient(1100px 560px at 50% -12%, #23417a 0%, var(--nav-bg) 62%); grid-column: 1 / -1; }
.login-hero { text-align: center; }
.login-logo { display: inline-block; background: #fff; border-radius: 18px; padding: 14px 22px; box-shadow: 0 12px 34px rgb(0 0 0 / .28); }
.login-logo img { display: block; height: 54px; max-width: 240px; object-fit: contain; }
.login-sub { color: var(--nav-text); font-size: 13px; margin-top: 12px; font-weight: 550; }
.login-card { width: min(100%, 400px); background: var(--surface); border-radius: 20px; padding: 24px 22px; box-shadow: 0 24px 60px rgb(0 0 0 / .32); }
.login-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.login-card .input { min-height: 48px; font-size: 16px; border-radius: 12px; }
.login-card .btn.lg { min-height: 50px; border-radius: 12px; font-size: 16px; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 50px; }
.pw .icon-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pw .icon-btn.on { color: var(--primary); }
.login-err { color: var(--bad); font-size: 13.5px; font-weight: 650; }
.login-err:empty { display: none; }
.link-btn { display: block; width: 100%; background: none; border: 0; padding: 6px; color: var(--primary); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.login-foot { color: var(--nav-muted); font-size: 12px; }
@media (max-width: 520px) {
  .login { justify-content: flex-end; gap: 0; padding: 0; }
  .login-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(32px + env(safe-area-inset-top)) 16px 28px; }
  .login-card { width: 100%; border-radius: 26px 26px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgb(0 0 0 / .25); }
  .login-foot { display: none; }
}

/* alttan açılan işlem listesi (telefonda popMenu) */
.menu-bg { position: fixed; inset: 0; z-index: 60; background: rgb(15 23 42 / .45); display: flex; align-items: flex-end; animation: fade .15s; }
.menu.as-sheet { position: static; width: 100%; max-height: 82dvh; overflow-y: auto; border-radius: 20px 20px 0 0; border: 0; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.menu.as-sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 2px auto 6px; }
.menu.as-sheet button, .menu.as-sheet a { min-height: 50px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.menu.as-sheet .ico { width: 20px; height: 20px; color: var(--text-2); }
.menu-title { padding: 6px 14px 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* menü (telefon) */
.sheet.menu-sheet .sheet-body { padding: 4px 14px calc(24px + env(safe-area-inset-bottom)); }
.mm-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 10px 0 12px; border-radius: 16px; background: var(--nav-bg); color: #fff; }
.mm-head img { width: 64px; height: 42px; flex: none; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px 6px; }
.mm-head b { display: block; font-size: 15px; }
.mm-head span { display: block; font-size: 12.5px; color: var(--nav-text); }
.mm-search .input { min-height: 44px; }
.mm-sec h4 { margin: 18px 4px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mm-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 12px 6px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; text-align: center; -webkit-tap-highlight-color: transparent; }
.mm-tile:active { transform: scale(.97); }
.mm-tile.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.mm-ic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.mm-ic .ico { width: 22px; height: 22px; }
.mm-tile.blue .mm-ic { background: var(--primary-soft); color: var(--primary); }
.mm-tile.purple .mm-ic { background: var(--purple-soft); color: var(--purple); }
.mm-tile.green .mm-ic { background: var(--good-soft); color: var(--good); }
.mm-tile.gray .mm-ic { background: var(--surface-3); color: var(--text-2); }
.mm-t { font-size: 12.5px; font-weight: 650; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.mm-n { position: absolute; top: -6px; right: -9px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; box-shadow: 0 0 0 2px var(--surface); }
.mm-n.warn { background: #f59e0b; }
.mm-list { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.mm-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); background: none; font-weight: 600; text-align: left; cursor: pointer; }
.mm-list button:last-child { border-bottom: 0; }
.mm-list .ico { color: var(--text-2); }
.mm-list .danger, .mm-list .danger .ico { color: var(--bad); }
.find-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 760px) { .sheet.menu-sheet { max-width: 560px; } }

/* sipariş kartı (telefon) */
.oc { gap: 8px; padding: 12px 14px; border-radius: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.oc:active { background: var(--surface-2); }
.oc-top { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; }
.oc-total { font-size: 15px; white-space: nowrap; }
.oc-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--text-2); }
.oc-meta .muted { margin-left: auto; flex: none; font-size: 12px; }
.oc-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.oc-name { font-weight: 600; font-size: 13.5px; }
.oc-foot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.oc-foot > .row { min-width: 0; }
.oc-foot .btn { flex: none; }

/* ---------- telefon ve tablet (yan menü yok) ---------- */
@media (max-width: 1023px) {
  .m-show { display: inline-grid; }
  .m-hide { display: none !important; }
  .m-logo { display: none !important; }
  .topbar { gap: 2px; min-height: 56px; padding: 6px 6px 6px 16px; padding-top: max(6px, env(safe-area-inset-top)); }
  .page-head h1 { font-size: 18px; font-weight: 800; }
  .page-head .sub { font-size: 12px; }
  .topbar .icon-btn, .topbar .avatar { width: 40px; height: 40px; }
  .topbar .avatar { width: 34px; height: 34px; font-size: 13px; margin: 0 4px 0 2px; }
  /* alt menü: bulanık zemin, etkin sekmede simge arkasında hap */
  .tabbar { height: calc(62px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -6px 24px rgb(15 23 42 / .06); }
  .tabbar a, .tabbar button { gap: 3px; font-size: 10.5px; font-weight: 600; isolation: isolate; -webkit-tap-highlight-color: transparent; }
  .tabbar a.on::before { content: ""; position: absolute; top: 7px; left: 50%; width: 58px; height: 30px; transform: translateX(-50%); border-radius: 15px; background: var(--primary-soft); z-index: -1; }
  .tabbar a.on span { font-weight: 750; }
  .tabbar .ico { width: 22px; height: 22px; margin-top: 4px; }
  .tabbar .dotn { top: 3px; left: calc(50% + 8px); box-shadow: 0 0 0 2px var(--surface); }
  .tabbar :focus { outline: none; }
  @media (hover: none) { .icon-btn:hover, .btn.ghost:hover { background: transparent; } }
  #toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- telefon ---------- */
@media (max-width: 899px) {
  body { font-size: 14px; }
  /* iOS: 16 px altındaki giriş kutusuna dokununca sayfa büyür; tüm kutular 16 px */
  .input, select.input, textarea.input, .date-pick input, .date-pick select { font-size: 16px; }
  #view { padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }
  .stack > * + * { margin-top: 12px; }
  .card { padding: 14px; border-radius: 16px; }
  .card-pad { padding: 12px 14px; }
  .card-head { margin-bottom: 10px; }
  h2 { font-size: 16px; }
  /* liste kartlarının dışındaki çerçeve kalkar (iç içe kutu görünümü olmaz) */
  .card.flush:has(.m-list) { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .card.flush:has(.m-list) > .m-list { padding: 0 !important; }
  .m-list { gap: 8px; }
  .m-card { border-radius: 16px; padding: 12px 14px; }
  .pager { padding: 10px 2px; border-top: 0; gap: 4px; }
  .pager > span.muted:nth-of-type(2), .pager > select { display: none; }
  .bulk { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 12; margin-bottom: 8px; border: 1px solid var(--primary-soft-2); border-radius: 14px; box-shadow: var(--shadow); }
  /* sekmeler: kayan haplar */
  .tabs { gap: 6px; padding: 0; background: transparent; border: 0; border-radius: 0; }
  .tab { flex: 0 0 auto; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
  .tab.on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: none; }
  .tab .n { min-width: 20px; padding: 0 6px; font-size: 11.5px; }
  .tab.on .n { background: rgb(255 255 255 / .25); }
  .tab.warn-tab.on { background: var(--bad); border-color: var(--bad); color: #fff; }
  .ch-tabs { gap: 6px; }
  .ch-tab { flex: 0 0 auto; min-height: 38px; padding: 0 12px 0 6px; gap: 8px; border-radius: 999px; font-size: 13.5px; }
  .ch-tab .logo-b { width: 26px; height: 26px; border-radius: 50%; font-size: 10.5px; }
  .chip { min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; }
  .pill { padding: 3px 9px; font-size: 11.5px; }
  /* sayfa düğmeleri ⋯ menüsünde, "ekle" yüzen düğmede */
  .page-actions > .btn { display: none !important; }
  .page-actions > .spacer { display: none; }
  .fab { position: fixed; z-index: 25; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px 0 16px;
    border: 0; border-radius: 25px; background: var(--primary); color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 8px 22px rgb(31 99 233 / .38); cursor: pointer; }
  .fab .ico { width: 20px; height: 20px; }
  /* bilgi kutuları kısa */
  .notice { padding: 10px 12px; font-size: 13px; border-radius: 14px; flex-wrap: wrap; }
  .notice > div { flex: 1 1 0; min-width: 0; }

  /* genel bakış */
  .hello { margin-bottom: 10px; }
  .hello h2 { font-size: 19px; }
  /* bekleyen işler: 3 sütun, dikey kutucuk */
  .tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .task { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 14px; }
  .task .ic { width: 30px; height: 30px; border-radius: 9px; }
  .task .ic .ico { width: 17px; height: 17px; }
  .task b { font-size: 19px; }
  .task span { font-size: 11.5px; line-height: 1.25; }
  /* beşli özet kutuları: yana kayan şerit */
  .kpis.five { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding-inline: 12px; margin: 0 -12px; padding: 0 12px; }
  .kpis.five::-webkit-scrollbar { display: none; }
  .kpis.five > .kpi { flex: 0 0 42%; scroll-snap-align: start; }
  /* arama kutusu ve Filtreler düğmesi aynı satırda */
  .row.wrap > .search:has(+ .m-only) { flex: 1 1 0 !important; }
  .date-bar { justify-content: flex-start; gap: 6px; margin-bottom: 12px; }
  .date-bar .chip { min-height: 32px; }
  .date-pick { width: 100%; min-height: 40px; }
  .date-pick input { flex: 1; width: auto; }
  .kpis { gap: 8px; }
  .kpi { padding: 12px 14px; border-radius: 16px; }
  .kpi .label { font-size: 12.5px; }
  .kpi .value { font-size: 20px; margin-top: 4px; }
  .kpi .delta { font-size: 12px; }
  .ch-card { padding: 12px; border-radius: 14px; }
  /* açılır pencereler: tam ekran (sipariş, ürün formu, menü), diğerleri alttan */
  .sheet { max-height: calc(100dvh - 24px); border-radius: 20px 20px 0 0; }
  .sheet.wide, .sheet.drawer, .sheet.menu-sheet { height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .sheet.wide .sheet-head, .sheet.drawer .sheet-head, .sheet.menu-sheet .sheet-head { border-radius: 0; padding-top: max(10px, env(safe-area-inset-top)); }
  .sheet-head { padding: 10px 8px 10px 16px; min-height: 56px; }
  .sheet-head h2 { font-size: 16px; }
  .sheet-body { padding: 14px 12px calc(20px + env(safe-area-inset-bottom)); }
  .sheet-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn { flex: 1; min-height: 46px; }
  .sheet-foot .spacer { display: none; }
  .two-col { gap: 12px; }
  .li { gap: 10px; }
  table.t { font-size: 13.5px; }
}

/* ---------- personel ve firmalar ---------- */
.u-av { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-weight: 800; font-size: 13.5px; }
.u-av.adm { background: var(--primary-soft); color: var(--primary); }
.u-av.off { opacity: .45; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pc { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 650; background: var(--good-soft); color: var(--good); white-space: nowrap; }
.pc.view { background: var(--surface-3); color: var(--text-2); }
.pc .ico { width: 12px; height: 12px; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.role-pick label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface); }
.role-pick label:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.role-pick input { margin-top: 3px; accent-color: var(--primary); }
.role-pick b { display: block; } .role-pick small { color: var(--muted); font-size: 12px; }
.chips.wrap-chips { flex-wrap: wrap; }
.perm-grid { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.perm-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.perm-row:last-child { border-bottom: 0; }
.perm-row > div:first-child { flex: 1; }
.perm-row .seg { flex: none; }
.perm-row .seg button.on[data-v="full"] { color: var(--good); }
.perm-row .seg button.on[data-v="view"] { color: var(--primary); }
.fm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-grid > div { min-width: 0; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.fm-grid > div > span:first-child { display: block; font-size: 11px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.fm-usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-usage > div { background: var(--surface-2); border-radius: 10px; padding: 10px; min-width: 0; }
.fm-usage b { display: block; font-size: 17px; } .fm-usage span { font-size: 12px; color: var(--muted); }
.value.low, .low { color: var(--amber); }
@media (max-width: 899px) { .perm-row { flex-wrap: wrap; } .perm-row .seg { width: 100%; } .perm-row .seg button { flex: 1; } .fm-grid { grid-template-columns: 1fr 1fr; } .fm-grid > div:last-child { grid-column: 1 / -1; } }
/* kanal ürünleri */
.cp-head h2 { font-size: 18px; }
a.pill { text-decoration: none; }
.cp-mode .seg button { padding: 7px 14px; }
.cp-card .thumb.lg { width: 56px; height: 56px; }
@media (max-width: 899px) { .cp-mode { width: 100%; } .cp-mode .seg { display: flex; } .cp-mode .seg button { flex: 1; } }
.cp-sug { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.cp-sug .score { flex: none; }

/* ---------- masaüstü tasarım iyileştirmeleri (v3) ---------- */
.logo-b { position: relative; }
.logo-b .lb-no { position: absolute; right: -5px; bottom: -4px; min-width: 13px; height: 13px; padding: 0 2px; border-radius: 4px; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); font-size: 9px; font-weight: 800; line-height: 11px; text-align: center; }
/* sekmeler masaüstünde de içerik kadar (aralarında dev boşluk olmaz) */
.tabs { display: flex; flex-wrap: nowrap; }
.tab { flex: 0 0 auto; }
/* araç çubuğu kartı */
.toolbar-card { padding: 12px; display: grid; gap: 10px; }
.toolbar-card .page-actions { gap: 8px; }
.search.grow { flex: 1 1 320px; }
.sort-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text-2); }
.sort-pick select { border: 0; background: transparent; outline: none; font-weight: 600; color: var(--text); min-height: 38px; max-width: 190px; }
.fchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.fchip:hover { border-color: var(--line-2); }
.fchip.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.fchip .n { min-width: 20px; padding: 0 6px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 700; text-align: center; }
.fchip.on .n { background: rgb(255 255 255 / .2); color: inherit; }
/* özet kartları (ürünler) */
.pstats { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pstat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; font: inherit; color: inherit; min-width: 0; }
button.pstat { cursor: pointer; } button.pstat:hover { border-color: var(--primary-soft-2); }
.pstat.warn { border-color: color-mix(in srgb, var(--amber) 35%, var(--line)); }
.pstat .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.pstat .ic.blue { background: var(--primary-soft); color: var(--primary); } .pstat .ic.green { background: var(--good-soft); color: var(--good); }
.pstat .ic.purple { background: var(--purple-soft); color: var(--purple); } .pstat .ic.red { background: var(--bad-soft); color: var(--bad); } .pstat .ic.amber { background: var(--amber-soft); color: var(--amber); }
.pstat b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.pstat span { display: block; font-size: 12px; color: var(--muted); font-weight: 550; line-height: 1.3; }
@media (max-width: 1280px) { .pstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .pstats { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; } .pstats::-webkit-scrollbar { display: none; } .pstat { flex: 0 0 72%; } }
/* ürün tablosu */
.prod-t td { padding-top: 10px; padding-bottom: 10px; }
.prod-t .cbcol { width: 44px; }
.prod-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pname { font-weight: 650; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 12px; color: var(--muted); }
.codes { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.codes span { font: 500 11.5px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.codes .miss, .miss { color: var(--amber); font-weight: 650; }
.chstack { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: help; }
.chstack .logos { display: inline-flex; gap: 4px; }
.chstack .more { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); font-size: 10.5px; font-weight: 800; }
.mpill { display: inline-block; padding: 2px 8px; border-radius: 7px; font-weight: 750; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mpill.good { background: var(--good-soft); color: var(--good); } .mpill.amber { background: var(--amber-soft); color: var(--amber); } .mpill.bad { background: var(--bad-soft); color: var(--bad); }
.stk { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; font: inherit; color: inherit; cursor: pointer; }
button.stk:hover { border-color: var(--line-2); background: var(--surface-2); }
.stk .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.stk.low .dot { background: var(--amber); } .stk.neg .dot { background: var(--bad); }
.stk.low b { color: var(--amber); } .stk.neg b { color: var(--bad); }
.stk b { font-size: 15px; }
.prod-t tr.grp-head td { background: var(--surface); }
.prod-t tr.grp-head.on td { background: var(--primary-soft); }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 48px 16px; text-align: center; color: var(--muted); }
.empty-state .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.empty-state .ic .ico { width: 26px; height: 26px; }
.empty-state b { color: var(--text); font-size: 15px; }
.empty-state span { max-width: 420px; font-size: 13.5px; }
/* Ürünler sayfasında üst çubuktaki "Ürün Ekle" tekrar etmesin */
body[data-route="urunler"] .topbar .top-add { display: none; }
/* stoklar */
.sstats { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sstat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; font: inherit; color: inherit; text-align: left; min-width: 0; }
.sstat:hover { border-color: var(--line-2); }
.sstat.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.sstat .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.sstat.blue .ic { background: var(--primary-soft); color: var(--primary); } .sstat.red .ic { background: var(--bad-soft); color: var(--bad); }
.sstat.amber .ic { background: var(--amber-soft); color: var(--amber); } .sstat.green .ic { background: var(--good-soft); color: var(--good); }
.sstat b { display: block; font-size: 21px; font-weight: 800; }
.sstat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sstat.red b { color: var(--bad); }
.sync-strip { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--text); font-size: 13px; }
.sync-strip .ico { color: var(--amber); }
.sync-strip span { flex: 1; min-width: 0; }
.stock-t td { padding-top: 9px; padding-bottom: 9px; }
.stock-t th.c .logo-b { margin: 0 auto; }
.chc { display: inline-flex; flex-direction: column; align-items: center; min-width: 40px; padding: 3px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; font: 600 13.5px/1.3 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2); cursor: pointer; }
.chc:hover { background: var(--surface-2); border-color: var(--line); }
.chc.none { color: var(--line-2); cursor: default; }
.chc.zero { color: var(--bad); }
.chc.wait { background: var(--amber-soft); color: var(--amber); flex-direction: row; gap: 4px; }
.chc.err { background: var(--bad-soft); color: var(--bad); flex-direction: row; gap: 4px; }
.chc .ico { width: 13px; height: 13px; }
.chc .rule { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.runway { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.runway .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; max-width: 110px; }
.runway .bar span { display: block; height: 100%; border-radius: 3px; }
.runway.good .bar span { background: var(--good); } .runway.amber .bar span { background: #f59e0b; } .runway.bad .bar span { background: var(--bad); }
.runway b { font-size: 12.5px; white-space: nowrap; } .runway.bad b { color: var(--bad); }
.stock-ctl .stk { padding: 3px 8px; }
@media (max-width: 1280px) { .sstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .sstats { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; } .sstats::-webkit-scrollbar { display: none; } .sstat { flex: 0 0 44%; } .sync-strip { flex-wrap: wrap; } }
/* üst çubuktaki "Ürün Ekle" yalnız Genel Bakış'ta (diğer sayfalarda kendi ana düğmeleri var; kafa karıştırmasın) */
body:not([data-route=""]) .topbar .top-add { display: none; }
/* yan menü daha derli toplu: tüm bölümler kaydırmadan sığsın */
@media (min-width: 1024px) {
  .brand-card { padding: 8px 10px; margin-bottom: 4px; }
  .brand-card img { height: 34px; }
  .brand-title { padding-bottom: 8px; }
  .nav a { padding: 7px 12px; font-size: 13.5px; }
  .nav-sec { padding: 10px 12px 3px; }
  .side { padding: 14px 12px; }
  .status-box { padding: 10px 12px; }
}

/* uzun bilgi kutusu "Devamı" bağlantısı (tüm ekranlar) */
.notice:has(> .more-link) { flex-wrap: wrap; }
.notice > div { min-width: 0; }
.more-link { flex-basis: 100%; padding: 0 0 0 28px; border: 0; background: none; color: var(--primary); font-weight: 700; font-size: 12.5px; text-align: left; cursor: pointer; }
.notice > div { flex: 1 1 0; }
@media (max-width: 899px) {
  .toolbar-card { padding: 0; background: transparent; border: 0; box-shadow: none; }
  .toolbar-card .page-actions { flex-wrap: wrap; }
  .toolbar-card .search { flex: 1 1 100% !important; }
  .toolbar-card .sort-pick { flex: 1 1 0; min-width: 0; min-height: 40px; }
  .toolbar-card .sort-pick select { width: 100%; max-width: none; font-size: 14px; }
  .toolbar-card .sort-pick .ico { display: none; }
}

/* ---------- yan menü: daralt / genişlet ---------- */
.side-toggle, .brand-mini, .d-only { display: none; }
@media (min-width: 1024px) {
  .d-only { display: inline-grid; }
  .side { position: sticky; z-index: 25; }
  .side-toggle { display: grid; place-items: center; position: absolute; top: 22px; right: -13px; z-index: 5; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--nav-bg-2);
    background: var(--surface); color: var(--text-2); box-shadow: var(--shadow); cursor: pointer; padding: 0; }
  .side-toggle .ico { width: 14px; height: 14px; transition: transform .2s; }
  .side-toggle:hover { color: var(--primary); }
  body { transition: grid-template-columns .2s ease; }
  body.nav-mini { grid-template-columns: 72px 1fr; }
  body.nav-mini .side { padding: 14px 10px; }
  body.nav-mini .side-toggle .ico { transform: rotate(180deg); }
  body.nav-mini .brand-card { padding: 6px; display: grid; place-items: center; }
  body.nav-mini .brand-card [data-logo] { display: none; }
  body.nav-mini .brand-mini { display: block; width: 30px; height: 30px; }
  body.nav-mini .brand-title { display: none; }
  body.nav-mini .nav a { justify-content: center; padding: 10px 0; position: relative; }
  body.nav-mini .nav a > span:not(.count) { display: none; }
  body.nav-mini .nav .count { position: absolute; top: 3px; right: 5px; margin: 0; padding: 0 5px; font-size: 10px; min-width: 16px; line-height: 16px; text-align: center; }
  body.nav-mini .nav-sec { font-size: 0; padding: 8px 0 4px; }
  body.nav-mini .nav-sec::before { content: ""; display: block; height: 1px; margin: 0 10px; background: var(--nav-bg-2); }
  body.nav-mini .status-box { justify-content: center; padding: 10px 0; }
  body.nav-mini .status-box > div { display: none; }
  body.nav-mini .status-box .led { margin: 0; }
}
/* varyant düzenleyici */
@media (min-width: 760px) { .sheet.xwide { max-width: min(1320px, 96vw); } }
.vapply { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; }
.vapply select.input, .vapply .input { width: auto; min-height: 38px; }
.vapply [data-v] { width: 150px; }
.vt td { padding: 6px 6px; vertical-align: middle; }
.vt th { padding: 10px 6px; }
.vt .vin { min-height: 36px; padding: 6px 8px; font-size: 13.5px; }
.vt .vin.num { width: 96px; text-align: right; }
.vt .vin.code { width: 140px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.vt .vin.chg, .vt .cb.chg, [data-shared].chg { border-color: var(--amber); background: var(--amber-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 25%, transparent); }
.vt .ro { display: inline-block; min-width: 70px; text-align: right; font-weight: 700; }
.vt .stick { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.vt thead .stick { z-index: 2; }
.brand-card .brand-mini { display: none; }
@media (min-width: 1024px) { body.nav-mini .brand-card .brand-mini { display: block; } }
.vt td.chp .vin { background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.vt td.chp .vin.chg { background: var(--amber-soft); }
