:root {
  --bg: #f4f7fb;
  --ink: #11213a;
  --muted: #64748b;
  --line: #dfe7f1;
  --card: #ffffff;
  --side: #12213a;
  --side-on: #173868;
  --side-hover: #1f3657;
  --navy: #11213a;
  --navy-hover: #1f3657;
  --blue: #005ae6;
  --blue-hover: #0048b8;
  --blue-press: #003b99;
  --soft: #edf4fd;
  --soft-hover: #dceafe;
  --disabled: #b7c3cf;
  --accent: #c62828;
  --ok: #087c46;
  --ok-soft: #dff5e8;
  --danger: #c62828;
  --danger-soft: #fce8e9;
  --warn: #a65b00;
  --warn-soft: #fff1d6;
  --ship: #1769d2;
  --ship-soft: #e3f0ff;
  --price: #005ae6;
  --add: #005ae6;
  --info: #edf4fd;
  --info-ink: #173868;
  --gold: #005ae6;
  --shadow: 0 1px 2px rgba(17, 33, 58, .04), 0 8px 24px rgba(17, 33, 58, .06);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-weight: 600; color: var(--ink); }
h2 { margin: 0 0 16px; font-size: 18px; }
h3 { margin: 16px 0 8px; font-size: 15px; }
p { color: var(--muted); line-height: 1.6; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0,90,230,.18), transparent 50%),
    linear-gradient(165deg, #12213a 0%, #173868 55%, #11213a 100%);
}
.login-card {
  width: min(420px, 94vw);
  background: #fff;
  border: 0;
  border-radius: 14px;
  padding: 36px 34px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.login-card .mark {
  width: 42px; height: 42px;
  background: var(--side);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
  letter-spacing: .04em;
  margin-bottom: 18px;
  border-radius: 8px;
  border-bottom: 3px solid var(--gold);
}
.login-card h1 { margin: 0 0 4px; font-size: 24px; }
.login-card p.sub { margin: 0 0 22px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin: 14px 0 6px;
  color: #3d4d63;
  letter-spacing: .04em;
  text-transform: uppercase;
}
input:not([type]),
input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  height: 42px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #005ae6;
  box-shadow: 0 0 0 3px rgba(0, 90, 230, .12);
}
textarea { height: 96px; padding: 10px 12px; }

.btn {
  border: 0; background: var(--blue); color: #fff; border-radius: 8px;
  height: 42px; padding: 0 18px; cursor: pointer; font-weight: 650;
  letter-spacing: .02em;
  transition: background .15s, transform .12s;
}
.btn:hover { background: var(--blue-hover); }
.btn:active { background: var(--blue-press); }
.btn:disabled { background: var(--disabled); cursor: not-allowed; }
.btn.dark { background: var(--navy); }
.btn.dark:hover { background: var(--navy-hover); }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.soft:hover { background: var(--soft-hover); }
.btn.ghost { background: var(--soft); color: var(--ink); border: 1px solid transparent; }
.btn.ghost:hover { background: var(--soft-hover); }
.btn.stop { background: #fff; color: #9b1c2a; border: 1px solid #e3c4c8; }
.btn.stop:hover { background: #fbecee; }
.btn.stop:disabled { background: #f3f5f7; color: #9aa4ad; border-color: var(--line); }
.btn.full { width: 100%; margin-top: 18px; }

.err, .ok, .note { padding: 11px 13px; border-radius: 8px; margin: 0 0 14px; font-size: 13px; }
.err { background: var(--danger-soft); color: #8a1c14; }
.ok { background: var(--ok-soft); color: #14532d; }
.note { background: var(--info); color: var(--info-ink); font-size: 13px; }

.admin-shell { display: flex; min-height: 100vh; }
.side {
  width: 232px;
  background: var(--side);
  color: #c5d0de;
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  height: 100vh;
  overflow: auto;
  flex-shrink: 0;
}
.side .logo {
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  padding: 2px 12px 22px;
  letter-spacing: .02em;
}
.side .logo small {
  display: block;
  color: #8ea0b5;
  font-weight: 400;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.side a {
  display: block;
  padding: 10px 12px;
  color: #c5d0de;
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  border-left: 0;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.side a:hover { color: #fff; background: var(--side-hover); }
.side a.on {
  color: #fff;
  background: var(--side-on);
}
.side a b {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  vertical-align: middle;
}
.side .bottom { margin-top: auto; padding: 16px 12px 8px; color: #8ea0b5; font-size: 12px; }
.side .bottom a { display: inline; padding: 0; color: #fff; border: 0; box-shadow: none; background: none; }
.admin-main { flex: 1; min-width: 0; margin-left: 232px; background: var(--bg); position: relative; z-index: 1; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.admin-top strong { font-size: 16px; font-weight: 650; }
.admin-top span { color: var(--muted); font-size: 13px; }

.page { width: min(1180px, calc(100% - 48px)); margin: 26px auto 56px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 24px; margin-top: 8px; font-weight: 700; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }

.steps { margin: 0; padding: 0 0 0 18px; color: var(--ink); }
.steps li { padding: 7px 0; }

.shop-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 0 28px; height: 62px;
  background: var(--side);
  border-bottom: 0;
  color: #fff;
  box-shadow: 0 8px 24px rgba(16, 35, 61, .18);
}
.shop-bar .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; color: #fff;
  letter-spacing: .04em;
}
.shop-bar .brand::before {
  content: "A";
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--side);
  font-size: 13px;
  font-weight: 800;
  border-radius: 6px;
  border-bottom: 2px solid var(--gold);
}
.shop-bar .brand i { display: none; }
.shop-bar .sp { flex: 1; }
.shop-bar nav { display: flex; align-items: center; gap: 2px; }
.shop-bar a {
  color: #c9d6e6;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  letter-spacing: .02em;
}
.shop-bar a:hover, .shop-bar a.on { color: #fff; background: rgba(255,255,255,.08); }
.shop-bar .who { color: #a9b8ca; font-size: 13px; padding: 0 8px 0 12px; white-space: nowrap; }
.chip {
  display: inline;
  font-size: 12px;
  font-weight: 650;
  margin-left: 8px;
  background: none;
  padding: 0;
  border-radius: 0;
}
.chip.bal-debt { color: #ffb4ae; }
.chip.bal-credit { color: #9de0bc; }
.chip.bal-zero { color: #a9b8ca; }
.badge {
  background: var(--blue); color: #fff; border-radius: 999px;
  padding: 1px 7px; font-size: 11px; margin-left: 6px; font-weight: 700;
}

.filters {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.6fr auto;
  gap: 12px;
  align-items: end;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.pager { display: flex; gap: 4px; margin-top: 16px; }
.pager a {
  min-width: 34px; height: 34px; display: grid; place-items: center;
  background: #fff; border-radius: 8px; border: 1px solid var(--line); font-weight: 650;
}
.pager a.on { background: var(--navy); color: #fff; border-color: var(--navy); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #f8fafc;
}
tr:hover td { background: #f7f9fb; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bal-debt { color: var(--danger); font-weight: 650; }
.bal-credit { color: var(--ok); font-weight: 650; }
.bal-zero { color: var(--muted); font-weight: 650; }
.two-col { display: grid; grid-template-columns: 1fr 1.35fr; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-bal {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.hero-bal b { font-size: 24px; }
.order-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.order-block:last-child { border-bottom: 0; }
.order-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; flex-wrap:wrap; margin-bottom:6px; }
.order-sum { display:flex; gap:14px; align-items:baseline; flex-wrap:wrap; font-size:14px; color:var(--muted); }
.order-sum strong { font-size:20px; color:var(--ink); font-weight:800; }
.order-admin-form {
  display: grid;
  grid-template-columns: 160px 220px 1fr auto;
  gap: 8px;
  align-items: start;
  margin: 10px 0 12px;
}
.order-admin-form textarea { min-height: 34px; margin: 0; }
@media (max-width: 960px) {
  .order-admin-form { grid-template-columns: 1fr; }
}
.muted { color: var(--muted); font-size: 13px; }
.total-row { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; font-size: 16px; font-weight: 700; }
table input { height: 38px; min-width: 160px; }

.catalog .filters { padding: 16px 18px; background: #fff; border: 1px solid var(--line); }
.catalog .cat-panel {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  flex-wrap: wrap;
}
.cat-head strong { font-size: 14px; font-weight: 650; color: #2c3c50; }
.stock-note {
  margin: 14px 16px 0;
  background: var(--info);
  color: var(--info-ink);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 16px;
}
.pcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 14px;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  text-align: left;
  box-shadow: none;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.pcard:hover {
  border-color: #c9d4e2;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.pcard .ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  right: auto;
  z-index: 2;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  transform: none;
  border-radius: 999px;
  letter-spacing: .03em;
}
.pcard .ribbon.out {
  background: var(--danger-soft);
  color: var(--danger);
}
.pcode {
  color: var(--muted);
  font-weight: 650;
  font-size: 12px;
  padding-right: 0;
  letter-spacing: .04em;
  order: 2;
  margin-top: 10px;
}
.pname {
  min-height: 2.8em;
  height: 2.8em;
  font-size: 13px;
  font-weight: 650;
  margin: 4px 0 8px;
  line-height: 1.4;
  color: var(--ink);
  padding-right: 0;
  order: 3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}
.thumb {
  height: 148px;
  background: #f6f8fb center/contain no-repeat;
  cursor: pointer;
  display: block;
  order: 1;
  border-radius: 8px;
  border: 1px solid #eef1f5;
  overflow: hidden;
}
.pprice {
  color: var(--price);
  font-weight: 750;
  font-size: 18px;
  margin: 4px 0 10px;
  order: 4;
  letter-spacing: -.02em;
}
.pcard form { order: 5; margin-top: auto; }
.add {
  border: 0;
  height: 40px;
  width: 100%;
  border-radius: 8px;
  background: var(--add);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  letter-spacing: .02em;
}
.add:hover { background: var(--blue-hover); }
.add:active { background: var(--blue-press); }
.add:disabled { background: var(--disabled); cursor: not-allowed; color: #fff; }
.catalog .pager {
  display: flex;
  gap: 4px;
  margin: 0;
  align-items: center;
}
.catalog .pager a {
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #445;
  font-weight: 650;
}
.catalog .pager a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.catalog .pager a.off { opacity: .4; pointer-events: none; }
.empty { padding: 48px; text-align: center; color: var(--muted); }
.crumb { margin: 0 0 14px; }
.crumb a { color: var(--muted); font-weight: 650; }
.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.detail-photo img, .detail-photo .thumb {
  width: 100%;
  min-height: 280px;
  object-fit: contain;
  background: #f6f8fb;
  border-radius: 8px;
  border: 1px solid #eef1f5;
}
.detail .ribbon {
  display: inline-block;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  transform: none;
}
.detail .ribbon.out { background: var(--danger-soft); color: var(--danger); }
.detail-info .pcode { font-size: 13px; padding-right: 0; order: 0; }
.detail-info h1 { margin: 6px 0 8px; font-size: 22px; line-height: 1.3; }
.detail-info .pprice { font-size: 28px; order: 0; }
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.qty-row input[name=qty] { width: 56px; height: 40px; text-align: center; }
.qty-row button[type=button] {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  border-radius: 8px;
}
.qty-row .add { width: auto; padding: 0 20px; }
.sase-box {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}
.sase-box label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; }
.sase-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sase-row input { flex: 1; min-width: 180px; height: 40px; text-transform: uppercase; }
.sase-row button { height: 40px; padding: 0 16px; }
.sase-msg { margin: 8px 0 0; font-size: 13px; }
.sase-msg.ok { color: var(--ok); }
.sase-msg.bad { color: var(--danger); }
.uma-sase-form { margin-bottom: 12px; }
.uma-sase-field .sase-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.uma-sase-field .sase-row input { flex: 1; min-width: 220px; height: 42px; }
.uma-sase-field .ok, .uma-sase-field .err { margin-top: 8px; }

.sub-line { margin: -4px 0 16px; }
.pull-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr auto;
  gap: 12px;
  align-items: end;
}
.pull-check { padding-bottom: 8px; }
.pull-check label { margin: 0; font-weight: 500; text-transform: none; letter-spacing: 0; }
.pull-meter { margin-top: 16px; }
.pull-bar {
  height: 8px;
  background: #e6ebf0;
  border-radius: 99px;
  overflow: hidden;
}
.pull-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width .2s;
}
.pull-stat { margin-top: 8px; color: var(--muted); font-size: 13px; }
.pull-stat b { color: var(--ink); }

.xml-links { margin: 0; padding-left: 18px; }
.xml-links li { margin: 8px 0; word-break: break-all; }
.xml-links a { color: #1f4e7a; font-weight: 650; }
.xml-links small { color: var(--muted); margin-left: 6px; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .pull-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .grid, .stats, .cat-grid { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .side { width: 210px; }
  .admin-main { margin-left: 210px; }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .admin-shell { display: block; }
  .side { width: 100%; height: auto; position: relative; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .side .logo { padding: 4px 12px 8px; width: 100%; }
  .admin-main { margin-left: 0; }
  .grid, .stats, .filters, .cat-grid { grid-template-columns: 1fr; }
  .shop-bar { overflow-x: auto; padding: 0 14px; }
  .page { width: calc(100% - 24px); }
}

.login-logo {
  display: block;
  height: 72px;
  width: auto;
  margin: 0 auto 16px;
  mix-blend-mode: multiply;
}
.shop-shell { display: flex; min-height: 100vh; background: var(--bg); }
.shop-side {
  width: 240px;
  background: var(--side);
  color: #c5d0de;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}
.shop-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  color: #fff;
  font-weight: 700;
}
.shop-brand img {
  height: 46px;
  width: auto;
  background: #fff;
  border-radius: 10px;
  padding: 4px 6px;
}
.shop-brand small {
  display: block;
  color: #8ea0b5;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.shop-side nav { display: flex; flex-direction: column; gap: 4px; }
.shop-side nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #c9d6e6;
  font-weight: 600;
  font-size: 14px;
}
.shop-side nav a:hover { background: var(--side-hover); color: #fff; }
.shop-side nav a.on { background: var(--side-on); color: #fff; }
.shop-side nav a b {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}
.shop-side nav .ico { flex-shrink: 0; opacity: .92; }
.shop-help {
  margin-top: auto;
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.45;
}
.shop-help span { display: block; color: #8ea0b5; margin-bottom: 4px; }
.shop-help strong { display: block; color: #fff; margin-bottom: 6px; }
.shop-help em { color: #9aabc0; font-style: normal; }
.shop-main { margin-left: 240px; flex: 1; min-width: 0; }
.shop-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.shop-search { flex: 1; display: flex; gap: 8px; }
.shop-search input { height: 42px; border-radius: 999px; padding: 0 16px; }
.shop-search button {
  height: 42px; border: 0; border-radius: 999px;
  background: var(--navy); color: #fff; padding: 0 16px; cursor: pointer; font-weight: 650;
}
.shop-search button:hover { background: var(--navy-hover); }
.shop-icon {
  color: var(--ink); font-weight: 650; font-size: 13px;
  padding: 8px 10px; border-radius: 10px; background: #f3f6f9;
  display: inline-flex; align-items: center; gap: 4px; position: relative;
}
.shop-icon.cart-top { width: 42px; height: 42px; justify-content: center; padding: 0; }
.shop-icon b {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  border-radius: 999px; padding: 1px 6px; font-size: 11px; min-width: 18px; text-align: center;
}
.shop-user { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.shop-user strong { font-size: 13px; }
.shop-user a { color: var(--muted); font-size: 13px; font-weight: 650; }
.shop-main .page { width: min(1280px, calc(100% - 40px)); margin: 20px auto 48px; }
.hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  background: linear-gradient(115deg, #12213a 0%, #173868 70%, #11213a 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 16px;
  overflow: hidden;
}
.hero h1 { color: #fff; font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
.hero p { color: #d5e0ee; margin: 0 0 14px; }
.hero ul { display: flex; gap: 16px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; color: #cfe0ff; font-size: 13px; font-weight: 650; }
.hero ul li { display: flex; align-items: center; gap: 6px; }
.hero ul li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #005ae6; }
.hero img { height: 86px; background: #fff; border-radius: 12px; padding: 8px 10px; }
.catalog .filters { margin-bottom: 14px; }
.cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.pcard .thumb { position: relative; }
.pcard .ribbon { left: 8px; top: 8px; }
.card-buy {
  display: flex; align-items: stretch; gap: 8px; order: 5; margin-top: auto;
  flex-wrap: nowrap; min-width: 0; width: 100%;
}
.qty-box {
  display: flex; align-items: center; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff;
}
.qty-box input[name=qty] {
  width: 34px; height: 34px; text-align: center; padding: 0; border: 0; border-radius: 0;
}
.qty-btn {
  width: 28px; height: 34px; border: 0; background: var(--soft);
  border-radius: 0; cursor: pointer; color: var(--ink);
}
.card-buy .add {
  width: auto; flex: 1 1 auto; min-width: 0; height: 36px;
  font-size: 12px; white-space: nowrap; padding: 0 10px; overflow: hidden; text-overflow: ellipsis;
}
.pcard.is-out { opacity: 1; }
.pcard.is-out .add { background: var(--blue); }
.pcard.is-out .add:disabled { background: var(--disabled); }
.info-card { margin-top: 14px; }
table.kv th { width: 160px; background: transparent; text-transform: none; letter-spacing: 0; font-size: 13px; }
.cart-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.brand-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; box-shadow: var(--shadow);
}
.brand-tile strong { display: block; font-size: 16px; }
.brand-tile span { color: var(--muted); font-size: 13px; }
.page-title { margin: 0 0 16px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.pill { background: var(--soft); color: var(--info-ink); border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 650; }
.pill.st-yeni { background: var(--soft); color: var(--blue); }
.pill.st-hazirlaniyor { background: var(--warn-soft); color: var(--warn); }
.pill.st-kargoda { background: var(--ship-soft); color: var(--ship); }
.pill.st-tamamlandi, .pill.st-cevaplandi { background: var(--ok-soft); color: var(--ok); }
.pill.st-iptal, .pill.st-kapali { background: var(--danger-soft); color: var(--danger); }
.pill.st-acik { background: var(--warn-soft); color: var(--warn); }
.shop-top .chip { background: transparent; padding: 0; font-weight: 700; }
.shop-top .chip.bal-debt { color: var(--danger); }
.shop-top .chip.bal-credit { color: var(--ok); }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.bubble { background: #f4f7fb; border-radius: 12px; padding: 10px 12px; }
.bubble.from-admin { background: #eef6ff; }
.bubble small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.bubble p { margin: 0; color: var(--ink); }
.nlist { display: flex; flex-direction: column; }
.nitem { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.nitem.unread { background: #f7fbff; margin: 0 -12px; padding: 12px; border-radius: 8px; }
.nitem em { color: var(--muted); font-size: 12px; font-style: normal; }
.settings-form .card { margin-bottom: 16px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 8px 0 16px; }
.inline-form select { width: 180px; height: 38px; }
textarea { min-height: 96px; height: auto; }
@media (min-width: 1400px) {
  .cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .shop-side { position: relative; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; }
  .shop-brand { width: 100%; }
  .shop-main { margin-left: 0; }
  .shop-help { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .cat-grid, .brand-grid, .stats-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cat-grid, .brand-grid, .stats-3 { grid-template-columns: 1fr; }
  .shop-top { flex-wrap: wrap; }
  .shop-search { width: 100%; flex: 1 1 100%; }
}

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--soft); color: var(--navy);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-head h1 { margin: 0 0 4px; font-size: 26px; }
.crumb { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.login-split {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.login-left {
  background: linear-gradient(165deg, #0d1b33 0%, #173868 55%, #11213a 100%);
  color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: center;
}
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 28px; }
.login-brand img { height: 42px; background: #fff; border-radius: 8px; padding: 4px; }
.login-brand small { display: block; font-weight: 400; color: #9bb0c9; font-size: 12px; }
.login-left h1 { color: #fff; font-size: 36px; line-height: 1.2; margin: 0 0 12px; }
.login-left p { color: #c5d3e6; }
.login-left ul { list-style: none; padding: 0; margin: 24px 0 0; }
.login-left li { padding: 8px 0; font-weight: 650; }
.login-right { display: grid; place-items: center; padding: 32px; background: #f4f7fb; }
.login-foot { margin-top: 18px; font-size: 13px; text-align: center; }
.wa-login { margin: 10px 0 0; font-weight: 650; color: var(--ink); }
.wa-login a { color: #128c7e; font-size: 16px; }
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(18, 140, 126, .35);
  transition: transform .15s;
}
.wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.wa-float:hover { transform: scale(1.06); color: #fff; }
.cart-layout { display: grid; grid-template-columns: 1.6fr .8fr; gap: 16px; align-items: start; }
.cart-prod { display: flex; gap: 10px; align-items: center; }
.cart-thumb { width: 52px; height: 52px; border-radius: 8px; background: #f4f7fb center/contain no-repeat; border: 1px solid var(--line); flex-shrink: 0; }
.total-row { display: flex; justify-content: space-between; margin: 8px 0; color: var(--muted); }
.total-strong { color: var(--ink); font-weight: 700; font-size: 18px; }
.veh-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.veh-search select { width: 180px; }
.veh-search input { flex: 1; min-width: 220px; }
.veh-hero { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; }
.veh-hero img, .veh-ph {
  width: 100%; height: 160px; object-fit: contain; background: #f4f7fb; border-radius: 12px; border: 1px solid var(--line);
}
.veh-ph { display: grid; place-items: center; color: var(--muted); }
.veh-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; margin: 8px 0 12px; }
.veh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.detail-photo img { width: 100%; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
@media (max-width: 960px) {
  .login-split, .cart-layout, .veh-hero, .veh-grid, .detail, .prod-layout, .od-grid, .od-bottom { grid-template-columns: 1fr; }
}
.btn.full { width: 100%; margin-top: 12px; }
.btn.ghost.danger { color: var(--danger); border-color: #f4c7cb; }
.qty-mini { margin: 0; flex-wrap: nowrap; }
.qty-mini input { width: 48px; height: 36px; text-align: center; padding: 0; }
.qty-mini button { width: 32px; height: 36px; }
.cart-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.cart-table .sase-line td { background: #f8fafc; }
.status-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.status-pills a {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 650;
}
.status-pills a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.prod-layout { display: grid; grid-template-columns: 1fr 1fr 300px; gap: 16px; align-items: start; }
.prod-gallery img { width: 100%; max-height: 420px; object-fit: contain; background: #fff; }
.prod-ph { height: 280px; display: grid; place-items: center; background: #f4f7fb; border-radius: 12px; color: var(--muted); }
.prod-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.prod-thumbs button { width: 56px; height: 56px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.prod-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.prod-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.prod-meta span { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.buy-box .pprice { font-size: 28px; font-weight: 800; color: var(--price); margin: 8px 0 4px; }
.buy-stock { display: inline-block; background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 12px; }
.buy-stock.out { background: var(--danger-soft); color: var(--danger); }
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: -8px 0 16px; }
.tab-bar button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 8px; cursor: pointer; color: var(--muted); font-weight: 650; }
.tab-bar button.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip-list li { background: var(--soft); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.od-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.od-bottom { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; }
.page { width: min(1240px, calc(100% - 48px)); }
.hide-toggle { white-space: nowrap; font-size: 13px; padding: 6px 10px; }
.cart-mask { position: fixed; inset: 0; background: rgba(17,33,58,.25); z-index: 70; }
.cart-drawer {
  position: fixed; top: 0; right: 0; width: min(400px, 94vw); height: 100%;
  background: #fff; z-index: 80; box-shadow: -12px 0 40px rgba(17,33,58,.18);
  display: flex; flex-direction: column; transform: translateX(110%); transition: transform .2s;
}
.cart-drawer.open { transform: none; }
.cart-drawer header, .cart-drawer footer { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-drawer footer { border-bottom: 0; border-top: 1px solid var(--line); margin-top: auto; }
.drawer-items { overflow: auto; padding: 12px 16px; flex: 1; }
.d-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.d-row small { display: block; color: var(--muted); font-size: 12px; }
.list-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn.full { width: 100%; }
.hide-buy .chip { filter: none; }
@media (max-width: 960px) { .grid2 { grid-template-columns: 1fr; } }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-scrim { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(17, 33, 58, .4);
    z-index: 55;
  }
  .shop-shell.nav-open .nav-scrim,
  .admin-shell.nav-open .nav-scrim { display: block; }
  .shop-side, .admin-shell .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 88vw);
    height: 100vh;
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .2s ease;
    z-index: 60;
    overflow: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 18px 14px 16px;
  }
  .shop-shell.nav-open .shop-side,
  .admin-shell.nav-open .side { transform: none; }
  .shop-main, .admin-main { margin-left: 0; }
  .shop-help { display: block; }
  .shop-brand { width: auto; }
  .admin-top { gap: 10px; padding: 12px 14px; }
  .admin-top strong { flex: 1; min-width: 0; }
  .side .logo { width: auto; padding: 2px 12px 18px; }
  .side .bottom { width: 100%; }
}

@media (max-width: 720px) {
  .page, .shop-main .page { width: calc(100% - 20px); margin-top: 12px; }
  .card { padding: 14px; }
  .shop-top { padding: 10px 12px; gap: 8px; }
  .shop-search { flex: 1 1 calc(100% - 54px); min-width: 0; }
  .shop-search input { min-width: 0; }
  .shop-user strong { display: none; }
  .hide-toggle { padding: 8px 10px; }
  .hero { padding: 18px 16px; }
  .hero h1 { font-size: 22px; }
  .hero img { height: 64px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head h1 { font-size: 22px; }
  .login-left { display: none; }
  .login-right { padding: 20px 16px; align-content: start; }
  .login-split { min-height: 100vh; }
  .card:has(table:not(.kv)) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table:not(.kv) { min-width: 560px; }
  table.kv th, table.kv td { display: block; width: auto; }
  table.kv tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.kv th { padding-bottom: 0; background: transparent; }
  table input, .veh-search input, .sase-row input, .uma-sase-field .sase-row input { min-width: 0; width: 100%; }
  .veh-search select, .inline-form select { width: 100%; }
  .inline-form { flex-wrap: wrap; }
  .d-row { grid-template-columns: 1fr auto; }
  .d-row .qty-row { grid-column: 1; }
  .filters, .order-admin-form { grid-template-columns: 1fr; }
  .prod-gallery img { max-height: 280px; }
  .buy-box .pprice { font-size: 24px; }
  .shop-main { padding-bottom: 76px; }
  .qty-btn, .qty-box input[name=qty] { height: 40px; }
}
