/* ============================================================
   Randevu POS — vizual sistem (v3 · PREMIUM)
   İstiqamət: premium şirniyyat evi — dərin şokolad strukturu,
   qızıl vurğu, isti qaymaq səth, zərif animasiyalar.

   Brend: "Randevu" — qızıl monoqram + serif wordmark,
   şirniyyat butikinin nəfis hissini verir.

   Palitra:
     - Dərin şokolad/espresso: yan panel, struktur
     - Qızıl/şampan: brend vurğusu, premium hiss
     - İsti vanil-qaymaq: işçi səth
   Tipografiya:
     - Fraunces: brend wordmark + başlıqlar (nəfis serif)
     - Inter: mətn və UI
     - JetBrains Mono: barkod, rəqəm/qiymət
   ============================================================ */

:root {
  /* səthlər */
  --bg:          #F7F2E9;   /* isti vanil-qaymaq */
  --surface:     #FFFFFF;
  --surface-2:   #FBF6EC;
  --sidebar:     #2B1A10;   /* dərin espresso-şokolad */
  --sidebar-2:   #3D2616;

  /* mətn */
  --ink:         #2A1A10;
  --ink-soft:    #6F5B49;
  --ink-faint:   #A08C76;
  --on-dark:     #F5ECDF;
  --on-dark-soft:#C2A98E;

  /* brend / vurğu — QIZIL */
  --accent:      #C8962C;   /* zəngin qızıl */
  --accent-deep: #A6781C;
  --accent-soft: #F6EAD0;
  --accent-glow: #E4BC5E;   /* parlaq şampan */
  --gold-1:      #E4BC5E;
  --gold-2:      #C8962C;
  --gold-3:      #9C6F18;

  /* status */
  --ok:          #3C8C5A;
  --ok-soft:     #E4F1E8;
  --danger:      #C0492E;
  --danger-soft: #F8E4DE;

  /* xətlər / kölgələr */
  --line:        #ECE0CE;
  --line-strong: #DCCBB2;
  --ring:        rgba(200,150,44,.35);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(43,26,16,.05);
  --shadow:    0 2px 4px rgba(43,26,16,.04), 0 12px 28px -8px rgba(43,26,16,.13);
  --shadow-lg: 0 8px 16px rgba(43,26,16,.06), 0 24px 48px -12px rgba(43,26,16,.20);
  --shadow-gold: 0 6px 20px -6px rgba(200,150,44,.45);

  --sidebar-w: 252px;
  --ease: cubic-bezier(.16,.84,.44,1);
}

* { box-sizing: border-box; }

/* ============================================================
   ANİMASİYALAR — zərif, yumşaq
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(228,188,94,.0); }
  50%     { box-shadow: 0 0 0 4px rgba(228,188,94,.18); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", "Georgia", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0 0 .4em;
  color: var(--ink);
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }

code, .mono {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .92em;
}

/* ============================================================
   LAYOUT — sabit yan panel + işçi sahə
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---- yan panel ---- */
.sidebar {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(228,188,94,.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--on-dark);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px;
  border-right: 1px solid rgba(228,188,94,.12);
  overflow-y: auto;             /* uzun menyu olduqda aşağı sürüşmə */
  overflow-x: hidden;
  scrollbar-width: thin;        /* Firefox */
  scrollbar-color: rgba(228,188,94,.35) transparent;
}
/* Sidebar scroll bar — qızıl-şokolad temasına uyğun (Chrome/Edge) */
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(228,188,94,.28);
  border-radius: 8px;
}
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(228,188,94,.5); }

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 4px 8px 28px;
  animation: fadeIn .6s var(--ease) both;
}
.brand .mark {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--gold-1) 0%, var(--gold-2) 55%, var(--gold-3) 100%);
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 25px;
  color: #2B1A10;
  box-shadow: 0 8px 18px -5px rgba(156,111,24,.7),
              inset 0 1px 0 rgba(255,255,255,.55),
              inset 0 -2px 4px rgba(120,80,10,.4);
  flex-shrink: 0;
  overflow: hidden;
}
/* qızıl üzərində zərif parıltı */
.brand .mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 62%);
  background-size: 250% 100%;
  animation: shimmer 5s ease-in-out infinite;
}
.brand .wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand .wordmark b {
  font-family: "Fraunces", serif;
  font-size: 23px; font-weight: 600; letter-spacing: 0;
  color: #fff;
}
.brand .wordmark span {
  font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold-1); font-weight: 600; margin-top: 5px;
}

.side-label {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--on-dark-soft); font-weight: 600;
  padding: 0 10px; margin: 6px 0 10px;
}

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: var(--r-sm);
  color: var(--on-dark-soft); font-weight: 500; font-size: 14.5px;
  position: relative;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  animation: slideInLeft .4s var(--ease) both;
}
.nav a:nth-child(1) { animation-delay: .05s; }
.nav a:nth-child(2) { animation-delay: .10s; }
.nav a:nth-child(3) { animation-delay: .15s; }
.nav a:nth-child(4) { animation-delay: .20s; }
.nav a:nth-child(5) { animation-delay: .25s; }
.nav a:nth-child(6) { animation-delay: .30s; }
.nav a svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .8; transition: opacity .2s, transform .2s var(--ease); }
.nav a:hover { background: rgba(228,188,94,.09); color: var(--on-dark); transform: translateX(2px); }
.nav a:hover svg { opacity: 1; transform: scale(1.08); }
.nav a.active {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold-3) 100%);
  color: #fff;
  box-shadow: var(--shadow-gold);
}
.nav a.active svg { opacity: 1; }
/* aktiv linkdə incə sol vurğu */
.nav a.active::before {
  content: ""; position: absolute; left: -18px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--gold-1);
}

.sidebar .foot {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid rgba(228,188,94,.12);
  font-size: 12px; color: var(--on-dark-soft);
}
.sidebar .foot .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-right: 7px;
  box-shadow: 0 0 0 0 rgba(60,140,90,.4);
  animation: glowPulse 2.5s ease-in-out infinite;
}

/* istifadəçi qutusu (yan panel altında) */
.userbox {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(228,188,94,.12);
}
.userbox-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.userbox .avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, var(--gold-1), var(--gold-3));
  display: grid; place-items: center; color: #2B1A10;
  font-weight: 700; font-size: 16px; font-family: "Fraunces", serif;
}
.userbox-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.userbox-text b { color: var(--on-dark); font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox-text span { color: var(--gold-1); font-size: 11px; font-weight: 500; }
.logout-btn {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(228,188,94,.18);
  color: var(--on-dark-soft); display: grid; place-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.logout-btn svg { width: 17px; height: 17px; }
.logout-btn:hover { background: rgba(192,73,46,.2); color: #F0A090; border-color: rgba(192,73,46,.4); }

/* ---- işçi sahə ---- */
.main { min-width: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 38px 40px 64px; }

.page-head { margin-bottom: 26px; animation: fadeUp .5s var(--ease) both; }
.page-head .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 700; margin-bottom: 10px;
}
.page-head .eyebrow::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold-1));
}
.page-head h1 { font-size: 36px; }
.page-head .muted { font-size: 15.5px; max-width: 60ch; }
.muted { color: var(--ink-soft); }

/* ============================================================
   KARTLAR
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 24px;
  animation: fadeUp .55s var(--ease) both;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.grid .card:nth-child(2) { animation-delay: .08s; }
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 18px; }

.grid { display: grid; gap: 20px; }
.split { grid-template-columns: 1fr 1.15fr; align-items: start; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }

/* stat zolağı */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 19px 21px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  animation: scaleIn .5s var(--ease) both;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.stat:nth-child(1) { animation-delay: .05s; }
.stat:nth-child(2) { animation-delay: .12s; }
.stat:nth-child(3) { animation-delay: .19s; }
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gold-1);
}
.stat::after {
  content: ""; position: absolute; right: -22px; top: -22px;
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 72%);
  opacity: .7; transition: transform .4s var(--ease);
}
.stat:hover::after { transform: scale(1.25); }
/* incə qızıl üst xətt */
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--gold-1), var(--gold-2), transparent);
  opacity: 0; transition: opacity .3s var(--ease);
}
.stat:hover::before { opacity: 1; }
.stat .label { font-size: 12px; color: var(--ink-soft); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; position: relative; }
.stat .value { font-family: "Fraunces", serif; font-weight: 600;
  font-size: 32px; letter-spacing: -0.01em; margin-top: 6px; position: relative; }
.stat .value small { font-size: 15px; color: var(--ink-soft); font-weight: 500; }

/* ============================================================
   CƏDVƏL
   ============================================================ */
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-soft); font-weight: 700;
  padding: 13px 16px; text-align: left;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums; }
tfoot td { padding: 14px 16px; font-weight: 700; }

/* ============================================================
   FORM
   ============================================================ */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink);
  margin: 16px 0 7px; }
label:first-of-type { margin-top: 0; }

input, select {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--ink-faint); }
input:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}
select { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E5A63' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

/* barkod sahəsi — kassanın ürəyi, böyük və mono */
.scan-input {
  font-family: "JetBrains Mono", monospace !important;
  font-size: 20px !important; letter-spacing: .04em;
  padding: 16px 16px !important; text-align: center;
}

/* ============================================================
   DÜYMƏLƏR
   ============================================================ */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-sm); border: none;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 55%, var(--gold-3) 100%);
  color: #2B1A10;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), filter .2s;
  box-shadow: var(--shadow-gold);
}
/* hover-də işıq süpürməsi */
.btn::before {
  content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn:hover::before { left: 130%; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(156,111,24,.55); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; position: relative; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 26px; font-size: 16px; }
.btn.ghost {
  background: #fff; color: var(--ink); border: 1.5px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn.ghost::before { display: none; }
.btn.ghost:hover { background: var(--surface-2); filter: none; border-color: var(--gold-2); transform: translateY(-1px); }
.btn.icon { padding: 8px; width: 34px; height: 34px; }
.btn.danger { background: linear-gradient(135deg, #D9533F, var(--danger)); color: #fff;
  box-shadow: 0 6px 14px -6px rgba(200,65,47,.5); }

/* ============================================================
   NİŞANLAR / ALERTLƏR
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.tag.ceki { background: var(--accent-soft); color: var(--accent-deep); }
.tag.ceki::before { background: var(--gold-2); }
.tag.eded { background: var(--ok-soft); color: var(--ok); }
.tag.eded::before { background: var(--ok); }

.pill { display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; }
.pill.on  { background: var(--ok-soft); color: var(--ok); }
.pill.off { background: #EEE8E2; color: var(--ink-faint); }

.alert {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 18px; border-radius: var(--r-sm); margin-bottom: 20px;
  font-weight: 500; border: 1px solid transparent;
}
.alert svg { width: 20px; height: 20px; flex-shrink: 0; }
.alert.ok  { background: var(--ok-soft); color: #1E6B41; border-color: #BCE0CC; }
.alert.err { background: var(--danger-soft); color: #9B2C1E; border-color: #F0C5BD; }
.alert { animation: fadeUp .4s var(--ease) both; }

/* səbət cəm zolağı */
.total-bar {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 22px; padding: 20px 22px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(228,188,94,.16) 0%, transparent 50%),
    linear-gradient(135deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  border-radius: var(--r); color: var(--on-dark);
  border: 1px solid rgba(228,188,94,.18);
  box-shadow: var(--shadow);
  animation: scaleIn .4s var(--ease) both;
}
.total-bar .total-label { font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-1); font-weight: 600; }
.total-bar .total-value {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 34px; letter-spacing: -0.01em; color: #fff; margin-top: 2px;
}
.total-bar .total-value small { font-size: 16px; color: var(--gold-1); }

/* boş hal */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.empty svg { width: 46px; height: 46px; color: var(--line-strong); margin-bottom: 14px; }
.empty p { margin: 0; }

/* qiymət matris xanası */
.cell-input {
  width: 84px; text-align: right; padding: 8px 10px !important;
  font-family: "JetBrains Mono", monospace; font-size: 14px;
  border: 1.5px solid transparent; background: var(--surface-2);
}
.cell-input:hover { border-color: var(--line-strong); }

/* segment seçici (çəki / ədəd) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-opt { display: block; margin: 0; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span {
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 15px; border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm); background: #fff; transition: border-color .15s, background .15s;
}
.seg-opt span strong { font-size: 15px; color: var(--ink); }
.seg-opt span small { font-size: 11.5px; color: var(--ink-soft); font-weight: 500; }
.seg-opt:hover span { border-color: var(--accent-glow); }
.seg-opt input:checked + span {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--ring);
}
.seg-opt input:focus-visible + span { box-shadow: 0 0 0 4px var(--ring); }

/* səbətdə miqdar stepper (ədəd məhsul) */
.qty { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.qty form { display: inline-flex; margin: 0; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink);
  font-size: 17px; font-weight: 600; line-height: 1; display: grid; place-items: center;
  font-family: inherit; transition: border-color .12s, background .12s;
}
.qty-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.qty-val {
  min-width: 26px; text-align: center; font-family: "JetBrains Mono", monospace;
  font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums;
}
.qty-unit { font-size: 12px; color: var(--ink-soft); font-weight: 500; }

/* hesabat dövr seçici */
.period { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.period-btn {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  transition: border-color .12s, background .12s, color .12s;
}
.period-btn:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.period-btn.on {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 14px -6px rgba(201,85,26,.5);
}
.period-btn.on:hover { color: #fff; }

/* kilidli mağaza (kassir) */
.locked-store {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1.5px solid var(--line-strong);
  font-weight: 600; color: var(--ink);
}
.locked-store svg { width: 17px; height: 17px; color: var(--gold-2); flex-shrink: 0; }

/* kilidli mağaza (kassir) — son */
/* növbə paneli */
.shift-closed, .shift-open { margin-bottom: 22px; }
.shift-row { display: flex; align-items: center; gap: 16px; }
@media (max-width: 720px) { .shift-row { flex-wrap: wrap; } }
.shift-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft);
}
.shift-icon svg { width: 22px; height: 22px; }
.shift-icon.live {
  background: var(--ok-soft); border-color: #BCE0CC; color: var(--ok);
  animation: glowPulse 2.5s ease-in-out infinite;
}
.shift-open { border-color: #BCE0CC; }
/* modal overlay (növbə bağlama və s.) */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(43,26,16,.5); backdrop-filter: blur(3px);
  place-items: center; padding: 20px;
}
.modal-overlay.show { display: grid; animation: fadeIn .2s var(--ease) both; }
.modal-box {
  width: 380px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 26px;
  animation: scaleIn .25s var(--ease) both;
  /* v212: böyük məzmun (çox sətirli çek detalı və s.) ekrana sığmayanda
     modal İÇİNDƏ skroll açılır — «Bağla» və alt sətirlər itmir; təkər
     arxadakı səhifəni sürüşdürmür. Bütün modal-box istifadəçilərinə aiddir. */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-box h4 { margin: 0 0 18px; font-size: 20px; }

/* növbə paneli — son */
/* istehsal xammal sətirləri */
.xammal-row {
  display: grid; grid-template-columns: 2fr 1fr 90px 1fr 40px; gap: 8px;
  margin-bottom: 8px; align-items: center;
}
.xammal-row input, .xammal-row select { padding: 9px 11px; font-size: 14px; margin: 0; }
@media (max-width: 720px) {
  .xammal-row { grid-template-columns: 1fr 1fr; }
  .xammal-row .btn.icon { grid-column: 2; justify-self: end; }
}

/* canlı maya hesablama zolağı */
.maya-bar {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1.2fr; gap: 14px; align-items: center;
  margin-top: 20px; padding: 18px 20px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
}
@media (max-width: 720px) {
  .maya-bar { grid-template-columns: 1fr; text-align: center; }
  .maya-bar > div:nth-child(2), .maya-bar > div:nth-child(4) { display: none; }
}
.maya-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); font-weight: 600; }
.maya-value { font-family: "Fraunces", serif; font-weight: 600; font-size: 24px;
  letter-spacing: -0.01em; margin-top: 3px; }
.maya-value small { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.maya-value.gold { color: var(--accent-deep); }

/* istehsal — son */
/* istehsalat tarixçə filtri */
.tarixce-filter { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.tarixce-filter > div { min-width: 200px; }
.tarixce-filter select { margin: 0; }

/* klikləniləbilən cədvəl sətri */
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--accent-soft); }

/* istehsalat tarixçə — son */
/* alış sətirləri */
.alis-head, .alis-row {
  display: grid; grid-template-columns: 72px 2fr 1fr 84px 1fr 96px 38px; gap: 8px; align-items: center;
}
/* Yeni dropdown-əsaslı alış sətri (PLU sütunu yoxdur): ad, miqdar, vahid, qiymət, məbləğ, sil */
.alis-head.head-sel, .alis-row-sel {
  display: grid; grid-template-columns: 2.4fr 1fr 90px 1fr 100px 38px; gap: 8px; align-items: center;
}
.alis-row-sel { margin-bottom: 8px; }
.alis-row-sel input, .alis-row-sel select { padding: 9px 11px; font-size: 14px; margin: 0; }
.alis-head {
  padding: 0 4px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-faint); font-weight: 600;
}
.alis-row { margin-bottom: 8px; }
.alis-row input, .alis-row select { padding: 9px 11px; font-size: 14px; margin: 0; }
.alis-mebleg { font-weight: 600; font-size: 14px; padding-right: 6px; }
.plu-cell { text-align: center; }
.plu-badge {
  display: inline-block; padding: 3px 8px; border-radius: 6px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-deep);
}
.plu-badge.yeni { background: var(--ok-soft); color: #1E6B41; }
.yeni-mehsul-box {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 13px 16px; border-radius: var(--r-sm);
  background: #FBF3DF; border: 1px solid var(--gold-1); color: #7A5A12;
  font-size: 14px; animation: fadeUp .25s var(--ease) both;
}
.yeni-mehsul-box svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--gold-2); }
@media (max-width: 760px) {
  .alis-head { display: none; }
  .alis-row { grid-template-columns: 1fr 1fr; }
  .alis-row .plu-cell { grid-column: 2; justify-self: end; }
  .alis-row .alis-mebleg { grid-column: 1; }
  .alis-row .btn.icon { grid-column: 2; justify-self: end; }
  .alis-row-sel { grid-template-columns: 1fr 1fr; }
  .alis-row-sel select:first-child { grid-column: 1 / -1; }
  .alis-row-sel .alis-mebleg { grid-column: 1; align-self: center; }
  .alis-row-sel .btn.icon { grid-column: 2; justify-self: end; }
}

/* alış — son */
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 14px; }
.hint code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--accent-deep); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; flex-direction: row; align-items: center;
    padding: 12px 16px; flex-wrap: wrap;
  }
  .brand { padding: 0; margin-right: auto; }
  .side-label, .sidebar .foot { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; width: 100%; margin-top: 10px; }
  .nav a span.lbl { display: none; }
  .nav a { padding: 9px 12px; }
  .nav a svg { width: 20px; height: 20px; }
  .wrap { padding: 24px 18px 48px; }
  .page-head h1 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===== Məhsullar səhifəsi ===== */

/* Yeni məhsul — resept kartı */
.yeni-mehsul-kart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}
.yeni-mehsul-kart::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-1), var(--gold-3));
}
.ymk-bashlik {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 26px 0;
}
.ymk-bashlik-sol { display: flex; align-items: center; gap: 11px; }
.ymk-bashlik-sol svg { width: 20px; height: 20px; color: var(--accent); }
.ymk-bashlik-sol h3 { margin: 0; font-size: 20px; }
.ymk-qeyd {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-soft);
  padding: 5px 11px; border-radius: 999px;
}

.ymk-form {
  display: grid;
  grid-template-columns: 1.7fr 1.5fr 1.2fr;
  gap: 22px 24px;
  padding: 22px 26px 26px;
  align-items: end;
}
.ymk-sahe { min-width: 0; }
.ymk-sahe label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 9px;
}
.ymk-sahe label em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-faint); font-size: 12px; }
.ymk-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0;
  flex-shrink: 0;
}
.ymk-form input,
.ymk-form select { margin: 0; height: 52px; }
.ymk-seg { gap: 10px; }
.ymk-seg .seg-opt span { height: 52px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; padding: 0 14px; }

.ymk-qrupsuz {
  height: 52px; display: flex; align-items: center;
  padding: 0 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm);
  color: var(--ink-faint); font-size: 13.5px;
}
.ymk-qrupsuz a { color: var(--accent-deep); font-weight: 600; }

.ymk-submit {
  grid-column: 1 / -1;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px;
  border: none; border-radius: var(--r);
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 4px 14px -2px rgba(166,120,28,.45);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.ymk-submit svg { width: 19px; height: 19px; }
.ymk-submit:hover { filter: brightness(1.04); box-shadow: 0 6px 20px -2px rgba(166,120,28,.55); transform: translateY(-1px); }
.ymk-submit:active { transform: translateY(0); box-shadow: 0 3px 10px -2px rgba(166,120,28,.5); }
.ymk-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring), 0 4px 14px -2px rgba(166,120,28,.45); }

@media (max-width: 820px) {
  .ymk-form { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .ymk-bashlik { padding: 18px 20px 0; }
}

/* Axtarış ===== */
.axtaris-bar {
  display: flex;
  gap: 12px;
  padding: 16px 20px 4px;
  align-items: center;
}
.axtaris-input {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.axtaris-input > svg {
  position: absolute;
  left: 14px;
  width: 18px; height: 18px;
  color: var(--ink-faint);
  pointer-events: none;
}
.axtaris-input input {
  width: 100%;
  padding: 11px 40px 11px 42px;
  margin: 0;
}
.axtaris-input #temizleBtn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  border-radius: 6px;
}
.axtaris-input #temizleBtn:hover { color: var(--ink); background: var(--surface-2, rgba(0,0,0,.04)); }
.axtaris-input #temizleBtn svg { width: 16px; height: 16px; }
.axtaris-bar select { width: auto; min-width: 150px; margin: 0; padding: 11px 14px; }

@media (max-width: 620px) {
  .axtaris-bar { flex-direction: column; align-items: stretch; }
  .axtaris-bar select { width: 100%; }
}

/* Alış: üst doldurulmayanda göstərilən kilid bildirişi */
.alis-kilid {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2, rgba(0,0,0,.02));
  color: var(--ink-soft);
  font-size: 14px;
}
.alis-kilid svg { width: 20px; height: 20px; color: var(--ink-faint); flex-shrink: 0; }
.alis-kilid strong { color: var(--ink); }

/* ===== Satış tarixçəsi ===== */
.filtr-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
}
.filtr-qrup label {
  display: block;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 8px;
}
.filtr-qrup select { margin: 0; min-width: 200px; }
.seg-dovr { display: inline-grid; grid-auto-flow: column; gap: 6px; }
.seg-dovr .seg-opt span {
  padding: 9px 16px;
  min-width: auto;
  text-align: center;
}
.seg-dovr .seg-opt span strong { font-size: 13.5px; }

@media (max-width: 720px) {
  .seg-dovr { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
  .filtr-qrup select { width: 100%; }
}

/* Çek detal modalı — satış sətri kartı */
.cek-setir-kart {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface-2, rgba(0,0,0,.015));
}
.cek-setir-bas { margin-bottom: 10px; }
.partiya-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
}
.partiya-head .num { text-align: right; }
.partiya-setir {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.partiya-setir:last-of-type { border-bottom: none; }
.partiya-setir .num { text-align: right; }
.cek-setir-alt {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding-top: 10px;
  font-size: 13.5px;
}
.plu-badge.sm { font-size: 11px; padding: 2px 7px; }

/* Alış mənbəli badge (istehsal partiyasından fərqli) */
.plu-badge.alis {
  background: #E8F0E2;
  color: #4A6B38;
}

/* ===== Mağaza qalıqları ===== */
.qaliq-magaza { margin-bottom: 20px; }
.qaliq-mehsul { cursor: pointer; }
.qaliq-mehsul:hover { background: var(--surface-2, rgba(0,0,0,.02)); }
.qaliq-detal > td { background: var(--surface-2, rgba(0,0,0,.025)); padding: 0; }
.qaliq-detal > td > div { padding: 0 16px; }

.menbe-head {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
  gap: 8px;
  padding: 10px 0 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}
.menbe-head .num { text-align: right; }
.menbe-setir {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.menbe-setir:last-child { border-bottom: none; }
.menbe-setir .num { text-align: right; }

/* ===== Satış: ödəniş üsulu seçicisi ===== */
.odenis-seg {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.odenis-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 8px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
}
.odenis-opt svg { width: 22px; height: 22px; }
.odenis-opt:hover { border-color: var(--accent-glow); color: var(--ink); }
.odenis-opt.secili {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ===== Sex: resept tətbiq paneli ===== */
.resept-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--accent-glow, #E4BC5E);
  border-radius: var(--r-sm);
  background: var(--accent-soft, #FBF3DF);
}
.resept-panel-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
}
.resept-panel-info svg { width: 20px; height: 20px; color: var(--accent-deep); flex-shrink: 0; }

/* Reseptlər: məhsulun artıq resepti var xəbərdarlığı */
.resept-movcud-xeber {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #D9A441;
  border-radius: var(--r-sm);
  background: #FBF0DA;
  font-size: 14px;
  color: var(--ink);
}
.resept-movcud-xeber svg { width: 20px; height: 20px; color: #B07A1E; flex-shrink: 0; }
.resept-movcud-xeber span { flex: 1; }

/* Zay: qalıq rozeti (miqdar label-ında) */
.qaliq-rozet {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft, #FBF3DF);
  font-size: 12px;
  font-weight: 600;
}

/* ===== Partiya/alış həyat dövrü (4 kart) ===== */
.hayat-dovru {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.hd-item {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.hd-label { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.hd-value { font-size: 18px; font-weight: 700; font-family: var(--mono, monospace); }
.hd-value small { font-size: 11px; color: var(--ink-faint); font-weight: 600; }
.hd-satis  { background: #EAF3E8; border-color: #C9E0C2; }
.hd-satis  .hd-value { color: #3F6B33; }
.hd-zay    { background: #FBEAEA; border-color: #EFC9C9; }
.hd-zay    .hd-value { color: #B23B3B; }
.hd-magaza { background: var(--accent-soft, #FBF3DF); border-color: var(--accent-glow, #E4BC5E); }
.hd-magaza .hd-value { color: var(--accent-deep, #9A6B16); }
.hd-anbar  { background: #ECEEF2; border-color: #D2D7DF; }
.hd-anbar  .hd-value { color: #4A5260; }

@media (max-width: 560px) {
  .hayat-dovru { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Həyat dövrü — təkmilləşdirilmiş dizayn ===== */
.hd-item { position: relative; padding: 12px 14px 10px; }
.hd-pct {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  opacity: .75;
}
.hd-satis  .hd-pct { color: #3F6B33; }
.hd-zay    .hd-pct { color: #B23B3B; }
.hd-magaza .hd-pct { color: var(--accent-deep, #9A6B16); }
.hd-anbar  .hd-pct { color: #4A5260; }
.hd-sifir { color: var(--ink-faint, #B7AE9F); }

/* vizual bölgü çubuğu (bir xətdə bütün bölgü) */
.hd-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line, #E8E0D2);
  margin-bottom: 14px;
}
.hd-bar-seg { height: 100%; transition: width .4s var(--ease, ease); }
.hd-bar-seg + .hd-bar-seg { box-shadow: inset 1px 0 0 rgba(255,255,255,.5); }
.hd-bar-satis  { background: #6FA85C; }
.hd-bar-zay    { background: #C9554E; }
.hd-bar-magaza { background: var(--gold-1, #E4BC5E); }
.hd-bar-anbar  { background: #9AA3B0; }

/* modal cədvəl başlıqları və vahid */
.modal-sec-bas {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink, #2B2317);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.modal-vahid {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint, #B7AE9F);
}
.modal-cedvel { margin-bottom: 8px; }
.modal-cedvel thead th {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft, #8A7F6C);
}
.modal-cedvel td { padding-top: 9px; padding-bottom: 9px; }

/* zay səbəb teqi */
.zay-sebeb-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #FBEAEA;
  color: #B23B3B;
  font-size: 12px;
  font-weight: 600;
}

/* ===== Zay hesabatı ===== */
/* dövr filtri seqmenti */
.dovr-seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-sm);
  background: var(--surface-2, #F0E9DB);
  border: 1px solid var(--line, #E8E0D2);
}
.dovr-opt {
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: calc(var(--r-sm) - 4px);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft, #8A7F6C);
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}
.dovr-opt:hover { color: var(--ink, #2B2317); }
.dovr-opt.secili {
  background: var(--card, #FFFDF8);
  color: var(--accent-deep, #9A6B16);
  box-shadow: 0 1px 3px rgba(43,26,16,.08);
}

/* zay hesabatı sətirləri (səbəb / mağaza bölgüsü) */
.zh-list { display: flex; flex-direction: column; gap: 14px; }
.zh-row { }
.zh-row-bas {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 12px;
}
.zh-ad { font-weight: 600; font-size: 14px; color: var(--ink, #2B2317); }
.zh-meta { font-size: 13px; color: var(--ink-soft, #8A7F6C); white-space: nowrap; }
.zh-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line, #E8E0D2);
  overflow: hidden;
}
.zh-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #C9554E, #D87873);
  border-radius: 999px;
  transition: width .4s ease;
}
.zh-bar-fill.magaza {
  background: linear-gradient(90deg, var(--accent, #C8962C), var(--gold-1, #E4BC5E));
}

/* ===== Yığılan menyu qrupu (Qalıqlar) ===== */
.nav-group-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 13px; border-radius: var(--r-sm);
  color: var(--on-dark-soft); font-weight: 500; font-size: 14.5px;
  background: none; border: none; cursor: pointer; text-align: left; font-family: inherit;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-group-head:hover { background: rgba(228,188,94,.09); color: var(--on-dark); }
.nav-group-head svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .8; }
.nav-group-head .nav-caret { margin-left: auto; width: 15px; height: 15px; transition: transform .22s var(--ease); }
.nav-group-head.acig .nav-caret { transform: rotate(90deg); }
.nav-group-head.acig { color: var(--on-dark); }

.nav-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .26s var(--ease), opacity .2s var(--ease);
  opacity: 0;
}
.nav-group-body.acig {
  max-height: 200px;
  opacity: 1;
}

.nav-sub {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px 9px 42px; border-radius: var(--r-sm);
  color: var(--on-dark-soft); font-weight: 500; font-size: 13.5px;
  position: relative; text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.nav-sub::before {
  content: ""; position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: rgba(228,188,94,.4);
}
.nav-sub:hover { background: rgba(228,188,94,.09); color: var(--on-dark); transform: translateX(2px); }
.nav-sub.active { background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold-3) 100%); color: #fff; box-shadow: var(--shadow-gold); }
.nav-sub.active::before { background: #fff; }

/* ============================================================
   SATIŞ v2 — status zolağı + iki panel dizaynı
   (yalnız /Satis səhifəsi; bütün siniflər .pos- ilə namespace-lənib)
   ============================================================ */

/* --- Status zolağı: başlıq əvəzinə kompakt çiplər --- */
.pos-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px; animation: fadeUp .45s var(--ease) both;
}
.pos-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.pos-chip svg { width: 16px; height: 16px; color: var(--gold-2); flex-shrink: 0; }
.pos-chip.soft {
  background: transparent; border-color: transparent; box-shadow: none;
  color: var(--ink-soft); font-weight: 500; padding: 9px 6px;
}
.pos-chip.soft svg { color: var(--ink-faint); }
.pos-chip.soft b { color: var(--ink); font-weight: 600; }

/* mağaza seçimi çip içində — sərhədsiz select */
.pos-chip-select { padding: 4px 8px 4px 16px; }
.pos-chip-select select {
  width: auto; margin: 0; border: none; background-color: transparent;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  padding: 6px 32px 6px 0; cursor: pointer;
}
.pos-chip-select select:focus { box-shadow: none; border: none; }

/* "Kassa hazırdır" — nəbz vuran yaşıl nöqtə */
.pos-hazir {
  margin-left: auto;
  background: var(--ok-soft); border-color: #BCE0CC; color: var(--ok);
}
.pos-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  animation: posPulse 2.2s var(--ease) infinite;
}
@keyframes posPulse {
  0%   { box-shadow: 0 0 0 0 rgba(60,140,90,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(60,140,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(60,140,90,0); }
}
@media (max-width: 720px) { .pos-hazir { margin-left: 0; } }

/* FIFO partiya bildirişi üçün mavi alert variantı */
.alert.info { background: #EEF4FF; border-color: #C7D8F5; color: #1B3A7A; }

/* --- Əsas tor: sol (skan + səbət) · sağ (ödəniş) --- */
.pos-grid {
  display: grid; grid-template-columns: 1.45fr 1fr;
  gap: 20px; align-items: start;
}
.pos-sol { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pos-pay { position: sticky; top: 24px; }
@media (max-width: 980px) {
  .pos-grid { grid-template-columns: 1fr; }
  .pos-pay  { position: static; }
}

/* --- Skan sahəsi --- */
.pos-scan-row { display: flex; gap: 12px; align-items: flex-end; }
.pos-scan-row input { height: 58px; }
.pos-say { width: 96px; flex: 0 0 auto; }
.pos-say input {
  text-align: center; font-size: 18px;
  font-family: "JetBrains Mono", monospace;
}
.pos-say input:disabled { background: #F1ECE1; color: #B3A99A; cursor: not-allowed; }
.pos-barkod-box { flex: 1 1 auto; min-width: 0; }

/* barkod — daimi qızıl halqa: kursorun burada olduğu həmişə görünsün */
.pos-barkod { border-color: var(--accent) !important; box-shadow: 0 0 0 4px var(--ring); }

.pos-add {
  flex: 0 0 auto; width: 58px; height: 58px;
  border: 1.5px solid var(--line-strong); background: #fff;
  border-radius: var(--r-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-3); transition: background .12s, border-color .12s;
}
.pos-add svg { width: 22px; height: 22px; }
.pos-add:hover { background: var(--accent-soft); border-color: var(--accent); }

.pos-scan-hint {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 13px; font-size: 13px; color: var(--ink-soft); line-height: 1.55;
}
.pos-scan-hint svg { width: 15px; height: 15px; color: var(--gold-2); flex-shrink: 0; margin-top: 2px; }

.pos-sinaq { margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); }
.pos-sinaq summary { cursor: pointer; user-select: none; font-weight: 600; color: var(--ink-soft); }
.pos-sinaq p { margin: 8px 0 0; line-height: 2; }
.pos-sinaq code {
  background: var(--surface-2); padding: 2px 7px; border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
}

/* --- Ödəniş paneli --- */
.pos-cem-label {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700;
}
.pos-cem {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 42px; line-height: 1.1; color: var(--ink);
  margin: 4px 0 16px; font-variant-numeric: tabular-nums;
}
.pos-cem small { font-size: 16px; color: var(--ink-soft); font-weight: 500; }
.pos-hr { border: none; border-top: 1px solid var(--line); margin: 0 0 16px; }

.pos-ustu {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--accent-soft); border: 1px solid var(--gold-1);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.pos-ustu .l {
  font-size: 11.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--gold-3);
}
.pos-ustu .v {
  font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 22px; font-weight: 700; color: var(--gold-3);
}

.pos-tamamla { margin-top: 18px; }
.pos-pay-bos {
  text-align: center; color: var(--ink-soft);
  padding: 14px 6px 6px; font-size: 14px; line-height: 1.6;
}
.pos-pay-bos svg {
  width: 34px; height: 34px; color: var(--line-strong);
  display: block; margin: 0 auto 10px;
}

/* ============================================================
   ALIŞ — sürətli yaratma kartı (təchizatçı / məhsul / xammal)
   ============================================================ */
.yeni-inline-kart {
  margin-top: 14px;
  background: var(--accent-soft);
  border: 1.5px dashed var(--gold-2);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  animation: fadeUp .3s var(--ease) both;
}
.yeni-inline-kart .yik-bas {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold-3); margin-bottom: 10px;
}
.yeni-inline-kart .yik-form {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.yeni-inline-kart .yik-form input,
.yeni-inline-kart .yik-form select {
  margin: 0; width: auto; flex: 1 1 190px; background: #fff;
}
.yeni-inline-kart .yik-form select { flex: 0 1 160px; }
.yeni-inline-kart .yik-form .btn { flex: 0 0 auto; }

/* ============================================================
   TƏCHİZATÇILAR — üfüqi forma + axtarışlı siyahı
   ============================================================ */
.tech-form-row {
  display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap;
}
.tech-form-row .tf-sahe { flex: 1 1 210px; min-width: 190px; }
.tech-form-row .tf-sahe.genis { flex: 1.5 1 260px; }
.tech-form-row .tf-sahe label { margin-top: 0; }
.tech-form-row .tf-sahe input { margin: 0; width: 100%; }
.tech-form-row .btn { flex: 0 0 auto; height: 48px; margin-bottom: 1px; }

.tech-head { flex-wrap: wrap; gap: 12px; }
.tech-head-sag { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.tech-axtar { position: relative; }
.tech-axtar svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--ink-faint); pointer-events: none;
}
.tech-axtar input {
  margin: 0; width: 250px; height: 38px;
  padding-left: 36px; font-size: 13.5px;
}
@media (max-width: 720px) {
  .tech-head-sag { margin-left: 0; width: 100%; }
  .tech-axtar { flex: 1; }
  .tech-axtar input { width: 100%; }
}

/* ============================================================
   PAYLAŞILAN: yan panel (drawer) + hərəkət kartları
   (Qaliqlar/XammalQaliq səhifələrində lokal kopyası da var —
   qaydalar eynidir; Techizatcilar bu qlobal versiyanı işlədir)
   ============================================================ */
.ql-drawer-overlay { position:fixed; inset:0; background:rgba(30,22,10,.28); z-index:900; opacity:0; pointer-events:none; transition:opacity .2s; }
.ql-drawer-overlay.open { opacity:1; pointer-events:auto; }
.ql-drawer { position:fixed; top:0; right:0; height:100vh; width:400px; max-width:92vw; background:var(--surface);
    box-shadow:-14px 0 44px rgba(0,0,0,.18); z-index:901; transform:translateX(100%); transition:transform .26s var(--ease);
    display:flex; flex-direction:column; }
.ql-drawer.open { transform:translateX(0); }
.ql-drawer-head { padding:22px 24px 18px; border-bottom:1px solid var(--line); position:relative; }
.ql-drawer-eyebrow { font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--ink-soft); font-weight:600; }
.ql-drawer-title { font-size:22px; font-weight:700; margin:4px 0 2px; color:var(--ink); }
.ql-drawer-sub { font-size:14px; color:var(--ink-soft); }
.ql-drawer-close { position:absolute; top:20px; right:20px; width:34px; height:34px; border-radius:9px;
    border:1px solid var(--line); background:var(--surface); color:var(--ink-soft); cursor:pointer;
    display:flex; align-items:center; justify-content:center; }
.ql-drawer-close:hover { border-color:var(--accent); color:var(--accent-deep); }
.ql-drawer-body { padding:18px 24px; overflow:auto; flex:1; }
.ql-drawer-body h5 { font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-soft); margin:0 0 12px; font-weight:600; }

.menbe-kart { background:var(--surface-2); border:1px solid var(--line); border-radius:11px; padding:12px 14px; margin-bottom:10px; }
.menbe-kart-head { display:flex; justify-content:space-between; align-items:center; }
.menbe-code { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:3px 9px; border-radius:6px; }
.menbe-code.alis { background:#e6ecf5; color:#38537e; }
.menbe-code.istehsal { background:#e3efe0; color:#3d6b34; }
.menbe-code.zay { background:#f8e4de; color:#9b3a2c; }
.menbe-miqdar { font-size:15px; font-weight:600; color:var(--ink); }
.menbe-miqdar.plus { color:#3d6b34; }
.menbe-miqdar.minus { color:#9b3a2c; }
.menbe-detay { font-size:12px; color:var(--ink-soft); margin-top:6px; display:flex; justify-content:space-between; gap:10px; }

.drawer-cem { margin-top:8px; padding:14px 16px; background:#faf6ee; border-radius:11px; display:flex; justify-content:space-between; align-items:center; }
.drawer-cem .lbl { font-size:13px; color:var(--ink-soft); }
.drawer-cem .val { font-size:20px; font-weight:700; color:#6b4f1a; }

/* ============================================================
   TƏCHİZATÇI BORCU — qırmızı borc / yaşıl avans + çıxarış
   ============================================================ */
.borc-pill {
  display:inline-block; padding:4px 11px; border-radius:8px;
  background:#f9e7e3; color:var(--danger);
  font-weight:700; font-variant-numeric:tabular-nums;
}
.avans-pill {
  display:inline-block; padding:4px 11px; border-radius:8px;
  background:#eef4ea; color:#3d6b34;
  font-weight:600; font-variant-numeric:tabular-nums; font-size:13px;
}
.cx-sil {
  width:26px; height:26px; border-radius:7px; border:1px solid var(--line);
  background:var(--surface); color:var(--danger); cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
}
.cx-sil:hover { border-color:var(--danger); background:#fdf1ee; }

/* ============================================================
   TƏCHİZATÇILAR v3 — bir sətirlik borc paneli + panel tabları
   ============================================================ */
.borc-panel {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 18px;
  box-shadow: var(--shadow-sm); animation: fadeUp .4s var(--ease) both;
}
.bp-borc .bp-label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700;
}
.bp-borc .bp-value {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 26px; line-height: 1.15; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bp-borc .bp-value small { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.bp-ayrac { width: 1px; align-self: stretch; background: var(--line); }
.bp-kicik { font-size: 12.5px; color: var(--ink-soft); line-height: 1.8; }
.bp-kicik b { color: var(--ink); font-weight: 600; }
.bp-yeni { margin-left: auto; }
@media (max-width: 640px) {
  .bp-ayrac { display: none; }
  .bp-yeni { margin-left: 0; width: 100%; }
}

/* yan paneldə Ödənişlər / Çıxarış tabları */
.cx-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.cx-tab {
  flex: 1; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.cx-tab:hover { border-color: var(--accent); color: var(--ink); }
.cx-tab.aktiv {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-deep);
}

/* Müştəri bonus balansı — qızılı nişan */
.bonus-pill {
  display: inline-block; padding: 4px 11px; border-radius: 8px;
  background: var(--accent-soft); color: var(--gold-3);
  font-weight: 700; font-variant-numeric: tabular-nums;
}

/* ============================================================
   SATIŞ — klaviatura qısayolu nişanları (F2/F4/F6/F7…)
   ============================================================ */
.kbd {
  display: inline-block; margin-left: 7px; padding: 1px 7px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--surface); color: var(--ink-soft);
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600;
  line-height: 1.6; vertical-align: 1px;
}
.kbd.acik {
  background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.38);
  color: #fff;
}
.pos-qisayol {
  margin: 12px 0 0; font-size: 12px; line-height: 1.9; color: var(--ink-faint);
}
.pos-qisayol b {
  font-family: "JetBrains Mono", monospace; font-weight: 600;
  color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 5px; padding: 0 5px; background: var(--surface);
}

/* Maliyyə — dövr filtri paneldə */
.ml-dovr { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ml-dovr input[type="date"] { margin: 0; width: 150px; height: 40px; font-size: 13.5px; }
.ml-dovr .btn { height: 40px; padding: 0 16px; }
@media (max-width: 900px) { .ml-dovr { margin-left: 0; width: 100%; } }

/* Maliyyə — bölgü sətirləri klik olunan + jurnal cəm zolağı */
.bolgu-klik { cursor: pointer; transition: background .12s; }
.bolgu-klik:hover { background: var(--accent-soft); }
.j-cem {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line-strong);
  background: var(--surface-2); font-size: 13.5px; color: var(--ink-soft);
}
.j-cem b {
  font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 15px; font-weight: 700; color: var(--ink);
}

/* Maliyyə — açılan "Kassa nəzarəti" bölməsi (standart bağlı) */
.kn { margin-top: 10px; }
.kn summary {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 14px; border: 1px dashed var(--line-strong);
  border-radius: 999px; background: var(--surface);
}
.kn summary::-webkit-details-marker { display: none; }
.kn summary:hover { border-color: var(--accent); color: var(--ink); }
.kn summary svg { color: var(--gold-2); flex-shrink: 0; }
.kn[open] summary { border-style: solid; border-color: var(--accent); }
.kn-etiket {
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-soft);
}
.kn-etiket.ok  { background: var(--ok-soft); color: var(--ok); }
.kn-etiket.pis { background: var(--danger-soft); color: var(--danger); }
.kn-govde {
  margin-top: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px 4px; box-shadow: var(--shadow-sm);
  animation: fadeUp .3s var(--ease) both;
}
.kn-govde table { margin: 0 -16px; width: calc(100% + 32px); }

/* Sayım — "sayılmadı" nişanı */
.say-tag {
  display: inline-block; margin-left: 8px; padding: 2px 9px;
  border: 1px dashed var(--line-strong); border-radius: 999px;
  background: var(--surface-2); color: var(--ink-faint);
  font-size: 11px; font-weight: 600;
}

/* ============================================================
   BARKOD ÇAPI — etiketlər yalnız çapda görünür
   ============================================================ */
#capRoot { display: none; }

@media print {
  body.cap-aktiv > *:not(#capRoot) { display: none !important; }
  body.cap-aktiv #capRoot { display: block !important; }

  #capRoot .etiket {
    background: #fff; color: #000; box-sizing: border-box;
    display: flex; flex-direction: column; overflow: hidden;
    font-family: "Inter", Arial, sans-serif;
    page-break-inside: avoid;
  }
  #capRoot .e-mag { font-size: 6.5pt; letter-spacing: .5px; text-align: center; }
  #capRoot .e-ad {
    font-size: 8.5pt; font-weight: 700; text-align: center; line-height: 1.15;
    overflow: hidden; margin: .4mm 0 .6mm;
  }
  #capRoot .e-bar { width: 100%; flex: 1 1 auto; min-height: 0; display: block; }
  #capRoot .e-alt {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 2mm; margin-top: .5mm;
  }
  #capRoot .e-kod { font-size: 7pt; }
  #capRoot .e-qiymet { font-weight: 800; font-size: 11pt; white-space: nowrap; }
  #capRoot .e-qiymet small { font-size: 7pt; font-weight: 600; }

  /* Termal 40×30 */
  .cap-40x30 .etiket { width: 40mm; height: 30mm; padding: 1.5mm 2mm; page-break-after: always; }
  .cap-40x30 .e-bar { height: 9mm; }
  .cap-40x30 .etiket:last-child { page-break-after: auto; }

  /* Termal 30×18 — kiçik etiket: brend sətri çıxır. Ad TAM oxunsun deyə 2 sətrə
     qədər icazə verilir (kiçik şrift), ştrix bir az AŞAĞI (üstdən boşluq) və SAĞDA
     (sol boşluq 2mm) durur, qiymət sətri hökmən etiketin içində qalır. */
  .cap-30x18 .etiket { width: 30mm; height: 18mm; padding: 0.9mm 1mm 0.8mm 2.8mm; page-break-after: always; }
  .cap-30x18 .e-mag { display: none; }
  .cap-30x18 .e-ad {
    font-size: 6pt; line-height: 1.08; margin: 0 0 .4mm;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-clamp: 2;
  }
  .cap-30x18 .e-bar { height: 5.4mm; flex: 0 0 auto; margin-top: .9mm; }
  .cap-30x18 .e-alt { margin-top: .6mm; }
  .cap-30x18 .e-kod { font-size: 5.2pt; }
  .cap-30x18 .e-qiymet { font-size: 8pt; }
  .cap-30x18 .e-qiymet small { font-size: 5pt; }
  .cap-30x18 .etiket:last-child { page-break-after: auto; }

  /* Termal 58×40 */
  .cap-58x40 .etiket { width: 58mm; height: 40mm; padding: 2mm 2.5mm; page-break-after: always; }
  .cap-58x40 .e-bar { height: 13mm; }
  .cap-58x40 .e-ad { font-size: 10pt; }
  .cap-58x40 .e-qiymet { font-size: 13pt; }
  .cap-58x40 .etiket:last-child { page-break-after: auto; }

  /* A4 stiker vərəqi: 3 sütun × 8 sıra (70×36 mm) */
  .cap-a4 { display: grid !important; grid-template-columns: repeat(3, 70mm); }
  .cap-a4 .etiket { width: 70mm; height: 36mm; padding: 2mm 3mm; border: .1mm dotted #bbb; }
  .cap-a4 .e-bar { height: 11mm; }
}

/* Mənfəət bölgüsü — qrup ayırıcı şaquli xətlər (İstehsal | Alış | Yekun) */
.qrup-sol { border-left: 2px solid var(--line-strong); }

/* Hesabatlar qrupu — kateqoriya etiketi + hesabat mərkəzi kartları */
.nav-cat {
    padding: 10px 14px 4px 30px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .38);
}
.hes-kart {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.hes-kart:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(58, 42, 24, .12); }

/* Satış hesabatı — yığcam xülasə, ödəniş bölgüsü, trend, cədvəl scroll
   (.stats sinfi dəyişmir — yalnız .compact variantı) */
.stats.compact { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.stats.compact.ikinci { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.stats.compact .stat { padding: 12px 16px; }
.stats.compact .stat .value { font-size: 22px; margin-top: 4px; }
.stats.compact .stat .value small { font-size: 12px; }
@media (max-width: 900px) {
    .stats.compact, .stats.compact.ikinci { grid-template-columns: repeat(2, 1fr); }
}
.ob-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden;
    background: var(--surface-2); margin-top: 12px; position: relative; }
.ob-nagd { background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); }
.ob-kart { background: var(--ink-faint); opacity: .5; }
.ob-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px;
    font-size: 12.5px; color: var(--ink-soft); flex-wrap: wrap; position: relative; }
.ob-legend svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.ob-legend b { color: var(--ink); }
.ob-legend em { font-style: normal; color: var(--ink-faint); margin-left: 3px; }
.tbar { fill: var(--gold-2); transition: fill .15s; }
.tbar:hover { fill: var(--gold-3); }
.tbar.zirve { fill: var(--accent-deep); }
.tlbl { font-size: 10px; fill: var(--ink-soft); }
.cedvel-scroll { overflow-x: auto; }
.cedvel-scroll table { min-width: 560px; }

/* Borclar icmalı — iki cədvəl yanaşı, dar ekranda alt-alta */
.borc-icmal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .borc-icmal { grid-template-columns: 1fr; } }

/* Dövr müqayisəsi — kart dəyişmə sətri */
.dm-ferq { font-size: 12.5px; font-weight: 700; margin-top: 4px; }

/* ================= ALIŞDA SATIŞ-QİYMƏTİ ZOLAĞI (sətir altı, Nümunə 5) =================
   Solda yerində-redaktə satış qiyməti + "Yadda saxla" (yalnız dəyişəndə görünür),
   sağda canlı mənfəət/marja. Mənfəətdə yaşıl, zərərdə qırmızı fon. */
.alis-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 4px 0 12px; padding: 7px 14px; border-radius: 10px; font-size: 13px;
  background: rgba(46, 125, 50, .07); border: 1px solid rgba(46, 125, 50, .25);
}
.alis-strip.zerer { background: rgba(178, 59, 59, .07); border-color: rgba(178, 59, 59, .3); }
.alis-strip .as-sol { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alis-strip .as-sol input {
  width: 88px; padding: 4px 8px; border: 1px solid var(--line-strong);
  border-radius: 7px; font: inherit; text-align: right; background: #fff;
}
.alis-strip .as-yadda {
  border: none; background: var(--accent-deep); color: #fff; border-radius: 7px;
  padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.alis-strip .as-yadda:disabled { opacity: .6; cursor: default; }
.alis-strip .as-status { font-size: 12px; }
.alis-strip .as-sag b { color: var(--ok); }
.alis-strip.zerer .as-sag b { color: var(--danger); }


/* ============================================================
   v201 — AXTARIŞLI SEÇİM (combobox) ortaq stilləri.
   İlk dəfə Alışda (v194) səhifə-lokal yaranmışdı; Reseptlər də
   istifadə etdiyi üçün buraya köçürüldü (Alışdakı lokal nüsxə
   eyni dəyərlidir — konflikt yaratmır).
   ============================================================ */
.cx { position: relative; min-width: 0; }
.cx-inp { width: 100%; }
.cx-dd {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 80;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto;
    overscroll-behavior: contain;
}
.cx-setir { padding: 8px 12px; cursor: pointer; font-size: 13.5px;
            border-bottom: 1px solid var(--line);
            display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cx-setir:last-child { border-bottom: none; }
.cx-setir.secili { background: var(--accent-soft); }
.cx-setir .cx-ad { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-setir .cx-q { white-space: nowrap; color: var(--ink-soft); font-size: 12.5px; }
.cx-bos { padding: 9px 12px; color: var(--ink-soft); font-size: 13px; }
/* siyahı açıq olanda kartı qonşulardan üstə qaldır (fadeUp stacking — bax v192) */
.card.cx-ust { position: relative; z-index: 70; }

/* ============================================================
   v239 — NATAMAM XANA nişanı: sənəd yazılmayanda problemli
   xana qırmızı çərçivə + yüngül fon alır (50-60 sətirdə gözlə
   tapmaq üçün). Dəyər yazılan kimi nişan özü götürülür.
   ============================================================ */
.xeta-xana {
    border-color: var(--danger) !important;
    background: color-mix(in srgb, var(--danger) 10%, transparent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}
.xeta-setir { background: color-mix(in srgb, var(--danger) 6%, transparent); border-radius: 10px; }

/* ============================================================
   v295 — YUXARI MENYU (topbar)
   Əvvəl sol yan panel idi (.app grid: sidebar + main).
   İndi başlıq yuxarıdadır, məzmun bütün eni tutur — geniş
   cədvəllər (Qalıqlar matrisi, Alış, Hesabatlar) üçün qazancdır.
   ============================================================ */
.app { display: block; }              /* köhnə grid ləğv olunur */
.wrap { max-width: 1440px; }          /* yan panel getdi — məzmun genişləndi */

/* ============================================================
   v315 — TƏBƏQƏ PİLLƏKƏNİ (z-index)
   ------------------------------------------------------------
   PROBLEM: .topbar «z-index: 60» ilə ÖZ TƏBƏQƏ KONTEKSTİNİ
   yaradır (position:sticky + z-index). Ona görə içindəki menyu
   «z-index: 70» olsa da, bütövlükdə 60 səviyyəsində qalırdı.
   Səhifədə isə 70 (.card.cx-ust) və 80 (axtarış siyahısı) var —
   onlar menyunun ÜSTÜNƏ çıxıb onu kəsirdi.

   PİLLƏKƏN — yeni qayda əlavə edəndə buna riayət edin:
     0 –  80  səhifə məzmunu (kartlar, axtarış siyahıları)
     90 – 91  topbar və onun menyusu      ← BURADA
       100    modal örtüyü (topbar-ı da örtməlidir)
     900–901  yan panel (drawer)
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 90;
  background:
    radial-gradient(120% 180% at 20% -60%, rgba(228,188,94,.12) 0%, transparent 60%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--on-dark);
  box-shadow: 0 2px 14px rgba(0,0,0,.18);
}
.topbar-in {
  display: flex; align-items: center; gap: 20px;
  max-width: 1500px; margin: 0 auto; padding: 0 22px;
  min-height: 62px;
}

/* ---- loqo ---- */
.topbar .brand { padding: 0; gap: 11px; flex-shrink: 0; animation: none; }
.topbar .brand .mark { width: 38px; height: 38px; border-radius: 11px; font-size: 20px; }
.topbar .brand .wordmark b { font-size: 18px; }
.topbar .brand .wordmark span { font-size: 8px; letter-spacing: .26em; margin-top: 3px; }

/* ---- menyu zolağı ---- */
.tnav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; flex: 1; min-width: 0; }
.tnav-item { position: relative; }

.tnav-btn {
  display: flex; align-items: center; gap: 8px;
  /* v296: HÜNDÜRLÜK SABİT — «Panel» bəndi <a>, qruplar <button>-dur.
     body-nin line-height: 1.55 dəyəri <a>-ya keçir, <button>-a keçmir
     (brauzer ona «normal» verir) → Panel digərlərindən HÜNDÜR görünürdü.
     Sabit hündürlük + line-height: 1 ikisini eyniləşdirir. */
  height: 38px; line-height: 1;
  padding: 0 12px; border-radius: var(--r-sm);
  color: var(--on-dark-soft); font-weight: 500; font-size: 14px;
  font-family: inherit; background: none; border: 0; cursor: pointer;
  white-space: nowrap; text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.tnav-btn svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .82; }
.tnav-btn .tnav-caret { width: 13px; height: 13px; opacity: .55; margin-left: -2px; }
.tnav-btn:hover { background: rgba(228,188,94,.11); color: var(--on-dark); }
.tnav-btn:hover svg { opacity: 1; }
.tnav-btn.active {
  /* v296: qabarıq qızıl blok yerinə yumşaq vurğu — yuxarı zolaqda
     tünd fonun üstündə qalın gradient çox ağır görünürdü */
  background: rgba(228,188,94,.16);
  color: var(--gold-1);
  box-shadow: inset 0 -2px 0 var(--gold-2);
}
.tnav-btn.active svg { opacity: 1; }

/* ---- açılan siyahı ---- */
.tnav-drop {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 236px; padding: 7px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  /* v315: topbar-ın öz konteksti daxilində sıra — səhifə ilə
     müqayisə .topbar-ın 90-ı ilə aparılır (yuxarıdakı pilləkənə bax) */
  display: none; z-index: 91;
}
/* KÖRPÜ — düymə ilə siyahı arasındakı 8 px boşluqda siçan nə düymənin,
   nə siyahının üstündə olurdu → :hover itir, menyu BAĞLANIRDI.
   Bu görünməz zolaq boşluğu doldurur.

   v315b DÜZƏLİŞİ: körpü əvvəl «.tnav-drop::before» idi — yəni siyahının
   QUTUSUNDAN KƏNARDA (top: -10px). Lakin «.tnav-drop.genis»-də
   «overflow-y: auto» var və o, qutudan kənardakı hər şeyi KƏSİR.
   Nəticədə uzun siyahılarda (Hesabatlar) körpü yox olurdu və siçan
   boşluğa düşən kimi menyu bağlanırdı — yalnız KLİK ilə açıq qalırdı.
   İndi körpü «.tnav-item»-dədir: o, siyahının deyil, BƏNDİN uşağıdır,
   ona görə overflow ondan kəsə bilmir. Yalnız menyu açıq ikən görünür
   ki, bağlı vəziyyətdə heç nəyə mane olmasın. */
.tnav-item::after {
  content: ""; position: absolute;
  left: 0; right: 0; top: 100%; height: 12px;
  display: none;
}
.tnav-item:hover::after,
.tnav-item.acig::after { display: block; }
/* sağ kənara yaxın qruplar — siyahı sağa dayansın, ekrandan çıxmasın */
.tnav-item.sag > .tnav-drop { left: auto; right: 0; }
.tnav-drop.genis { min-width: 290px; max-height: 76vh; overflow-y: auto; }
.tnav-item.acig > .tnav-drop { display: block; }
@media (hover: hover) {
  .tnav-item:hover > .tnav-drop { display: block; }
}
.tnav-drop a {
  display: block; padding: 9px 12px; border-radius: 9px;
  color: var(--ink); font-size: 14px; font-weight: 500;
  transition: background .15s var(--ease);
}
.tnav-drop a:hover { background: var(--surface-2); }
.tnav-drop a.active {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold-3) 100%);
  color: #fff;
}
.tnav-cat {
  font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700;
  padding: 11px 12px 5px; margin-top: 2px;
  border-top: 1px solid var(--line);
}
.tnav-drop > .tnav-cat:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }

/* ---- istifadəçi ---- */
.topbar-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-user .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(145deg, var(--gold-1), var(--gold-3));
  color: #fff; font-weight: 700; font-size: 14px;
}
.topbar-user-text { display: flex; flex-direction: column; line-height: 1.25; }
.topbar-user-text b { font-size: 13px; color: #fff; font-weight: 600; }
.topbar-user-text span { font-size: 11px; color: var(--on-dark-soft); }
.topbar-user form { margin: 0; }
/* v493: ad/avatar keçiddir → Parolu dəyiş */
.topbar-user-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; border-radius: 10px; padding: 2px 6px 2px 2px; }
.topbar-user-link:hover { background: rgba(255,255,255,.08); }

/* ---- burger (dar ekran) ---- */
.tnav-burger {
  display: none; background: none; border: 0; cursor: pointer;
  color: var(--on-dark-soft); padding: 8px; border-radius: var(--r-sm);
}
.tnav-burger svg { width: 22px; height: 22px; }
.tnav-burger:hover { background: rgba(228,188,94,.11); color: var(--on-dark); }

/* v296: MƏRHƏLƏLİ DARALMA — menyu heç vaxt ikinci sətrə düşməsin.
   Sətrə bölünəndə birinci sıradan açılan siyahı ikinci sıranın üstünə
   düşürdü və siçan aşağı gedən kimi menyu bağlanırdı. İndi yer azalanda
   sıra ilə: ikonlar → istifadəçi adı → loqo yazısı gizlənir, ən sonda
   burger açılır. */
@media (max-width: 1560px) {
  .tnav-btn { padding: 0 10px; gap: 6px; }
  .tnav-btn > svg:first-child { display: none; }   /* ikonlar gizlənir, mətn qalır */
}
@media (max-width: 1150px) {
  .topbar-user-text { display: none; }
  .tnav-btn { font-size: 13.5px; padding: 0 8px; }
  .topbar-in { gap: 12px; }
}
@media (max-width: 1040px) {
  .topbar .brand .wordmark { display: none; }
}
@media (max-width: 940px) {
  .tnav-burger { display: block; margin-left: auto; }
  .tnav {
    display: none; order: 3; width: 100%;
    flex-direction: column; align-items: stretch;
    padding: 8px 0 14px; gap: 3px;
  }
  .tnav.acig { display: flex; flex-wrap: wrap; }
  .topbar-in { flex-wrap: wrap; padding: 10px 16px; }
  .tnav-btn > svg:first-child { display: block; }   /* şaquli menyuda ikon qayıdır */
  .tnav-btn { height: 42px; }
  .tnav-item { position: static; }
  .tnav-btn { width: 100%; justify-content: flex-start; }
  .tnav-btn .tnav-caret { margin-left: auto; }
  .tnav-drop {
    position: static; box-shadow: none; margin: 2px 0 6px 14px;
    background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10);
  }
  .tnav-drop a { color: var(--on-dark-soft); }
  .tnav-drop a:hover { background: rgba(228,188,94,.11); color: var(--on-dark); }
  .tnav-cat { border-top-color: rgba(255,255,255,.10); }
  .tnav-item.acig > .tnav-drop { display: block; }
}
/* dar ekranda hover ilə açılmasın — yalnız klik (yuxarıdakı qaydanı ləğv edir) */
@media (max-width: 940px) and (hover: hover) {
  .tnav-item:hover > .tnav-drop { display: none; }
  .tnav-item.acig > .tnav-drop { display: block; }
  /* v315b: mobil/burger rejimdə körpü LAZIM DEYİL — menyu yalnız klik ilə
     açılır, hover yoxdur. Üstəlik burada «.tnav-item { position: static }»
     olduğu üçün mütləq yerləşdirilmiş körpü səhv yerə düşərdi. */
  .tnav-item::after,
  .tnav-item:hover::after,
  .tnav-item.acig::after { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 22px 16px 48px; }
}

/* ============================================================
   v363 — ALIŞ SƏHİFƏSİ: SIX CƏDVƏL GÖRÜNÜŞÜ
   Sifarişçinin istəyi: sətirlər yığcam, çərçivə tünd, sətir sayı
   görünsün (köhnə proqramdakı «2 Satır · 3 Ürün» məntiqi).
   Qərar: tündlük BAŞLIQ və YEKUN zolağındadır, rəqəmlərin yazıldığı
   sətirlər açıq qalır — uzun fakturada oxunaqlıq itməsin.
   Biznes məntiqi, id-lər və hadisə axını DƏYİŞMƏYİB — yalnız görünüş.
   ============================================================ */

/* ---- yuxarı sahələr bir sətirdə (əvvəl ~300px tuturdu) ---- */
.alis-ust { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.alis-ust .ust-el > label {
  display: block; margin: 0 0 4px 2px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-faint);
}
.alis-ust select, .alis-ust input[type="date"] {
  height: 38px; margin: 0; padding: 6px 11px; font-size: 13.5px;
}
.alis-ust .seg { display: flex; gap: 0; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; background: var(--surface); }
.alis-ust .seg-opt span {
  border: 0; border-radius: 0; padding: 8px 15px; background: transparent;
  display: block; box-shadow: none;
}
.alis-ust .seg-opt span strong { font-size: 13.5px; }
.alis-ust .seg-opt span small { display: none; }        /* izah title-dadır */
.alis-ust .seg-opt + .seg-opt span { border-left: 1px solid var(--line); }
.alis-ust .seg-opt input:checked + span {
  background: var(--sidebar); }
.alis-ust .seg-opt input:checked + span strong { color: var(--gold-1); }

/* ---- CƏDVƏL: tünd başlıq + açıq sıx sətirlər + zebra ----
   v407: :is(#setirSahe,#rSetirSahe) — eyni qaydalar REDAKTƏ panelinə də
   şamil olunur (sifarişçi: redaktə yeni alışla EYNİ görünsün). Spesifiklik
   dəyişmir (:is() ən güclü üzvün — id-nin — çəkisini götürür). ---- */
:is(#setirSahe,#rSetirSahe) .alis-head.head-sel {
  grid-template-columns: 38px minmax(0,2.4fr) 96px 78px 106px 112px 36px;
  gap: 0; margin: 0; padding: 0;
  background: var(--sidebar); color: var(--gold-1);
  border-radius: 10px 10px 0 0;
  font-size: 10.5px; letter-spacing: .09em;
}
:is(#setirSahe,#rSetirSahe) .alis-head.head-sel span { padding: 9px 10px; }
:is(#setirSahe,#rSetirSahe) .alis-head.head-sel span.num { text-align: right; }
:is(#setirSahe,#rSetirSahe) .alis-head.head-sel .sira-h { text-align: center; padding: 9px 0; }

:is(#setirListe,#rSetirListe) { border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 10px 10px; background: var(--surface); }
:is(#setirListe,#rSetirListe) > p.muted { padding: 12px 14px; margin: 0 !important; }

:is(#setirSahe,#rSetirSahe) .alis-row-sel {
  grid-template-columns: 38px minmax(0,2.4fr) 96px 78px 106px 112px 36px;
  gap: 0; margin: 0; border-top: 1px solid var(--line);
}
:is(#setirSahe,#rSetirSahe) .alis-row-sel:first-child { border-top: 0; }
:is(#setirSahe,#rSetirSahe) .alis-row-sel.alt { background: #FBF5E9; }
:is(#setirSahe,#rSetirSahe) .alis-row-sel:hover { background: rgba(201,162,39,.07); }

:is(#setirSahe,#rSetirSahe) .alis-row-sel .sira {
  text-align: center; font: 11.5px/1 "JetBrains Mono", Consolas, monospace;
  color: var(--ink-faint);
}
:is(#setirSahe,#rSetirSahe) .alis-row-sel input,
:is(#setirSahe,#rSetirSahe) .alis-row-sel select {
  height: 34px; padding: 5px 10px; font-size: 13.5px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
:is(#setirSahe,#rSetirSahe) .alis-row-sel input:focus,
:is(#setirSahe,#rSetirSahe) .alis-row-sel select:focus {
  background: #F7ECCB; box-shadow: inset 0 0 0 2px var(--gold-2); outline: 0;
}
:is(#setirSahe,#rSetirSahe) .alis-row-sel input[data-sahe="miqdar"],
:is(#setirSahe,#rSetirSahe) .alis-row-sel input[data-sahe="qiymet"],
:is(#setirSahe,#rSetirSahe) .alis-row-sel .alis-mebleg { text-align: right; }
:is(#setirSahe,#rSetirSahe) .alis-row-sel .alis-mebleg { font-weight: 700; padding-right: 10px; }
:is(#setirSahe,#rSetirSahe) .alis-row-sel .btn.icon { border: 0; background: transparent;
  box-shadow: none; width: 30px; height: 30px; justify-self: center; }
:is(#setirSahe,#rSetirSahe) .alis-row-sel .btn.icon:hover { background: rgba(178,59,59,.10); }

/* satış/qalıq zolağı — sətrə yapışıq nazik xətt */
:is(#setirSahe,#rSetirSahe) .alis-strip {
  margin: 0; border: 0; border-top: 1px dashed var(--gold-1);
  border-radius: 0; background: #FCF7EA;
  padding: 5px 12px 6px 46px; font-size: 12.5px;
}
:is(#setirSahe,#rSetirSahe) .alis-strip.zerer { background: rgba(178,59,59,.08); }

/* ---- YEKUN ZOLAĞI: sayğac çipləri ---- */
/* v366: YAPIŞQANLIQ LƏĞV EDİLDİ (sifarişçinin istəyi).
   Səbəb: zolaq ekranla birlikdə sürüşüb altındakı sətirləri örtürdü —
   xüsusən yazılan SON sətri. İndi cədvəlin altında sabit dayanır.
   Yeni sətirlər onsuz da aşağıya əlavə olunur, yəni yazarkən zolaq
   həmişə göz altındadır. Hündürlük də ~100px-dən ~50px-ə endirildi. */
:is(#setirSahe,#rSetirSahe) .total-bar { margin-top: 12px; }
.tb-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tb-chip {
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #EFE4CF;
  white-space: nowrap;
}
.tb-chip b { color: var(--gold-1); font-family: "JetBrains Mono", Consolas, monospace; }
.tb-kbd { font-size: 11.5px; color: rgba(239,228,207,.55); }
.tb-kbd kbd {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px; padding: 1px 6px;
  font: 11px "JetBrains Mono", Consolas, monospace; color: #EFE4CF;
}

@media (max-width: 760px) {
  :is(#setirSahe,#rSetirSahe) .alis-row-sel .sira, :is(#setirSahe,#rSetirSahe) .alis-head.head-sel { display: none; }
  :is(#setirSahe,#rSetirSahe) .alis-row-sel { grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
  :is(#setirSahe,#rSetirSahe) .alis-strip { padding-left: 12px; }
  .alis-ust .ust-el { flex: 1 1 100%; }
}

/* ============================================================
   v364 → v407 — REDAKTƏ PANELİ: artıq yeni alışla EYNİ dizayn
   (bax: v407 bloku faylın sonunda). Burada yalnız yekun zolağı qalıb.
   ============================================================ */
/* v407: köhnə <table> əsaslı redaktə qaydaları (r-cedvel-qab, td .cell-input,
   #rYeniQab .r-yeni, tr.r-strip-tr) silindi — redaktə indi yeni alışın grid
   sətirlərini işlədir; ortaq qaydalar :is(#setirSahe,#rSetirSahe) altındadır. */
#redakteForm .total-bar { margin-top: 12px; }

/* v365: redaktə rejimində səhifə başlığı yığcamdır (kartı yuxarı qaldırır) */
.page-head .btn.ghost { display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================
   v366 — ALIŞ/REDAKTƏ YEKUN ZOLAĞI: yığcam və sabit
   Sifarişçi: «yuxarı qalxıram yuxarı qalxır, aşağı düşürəm aşağı düşür;
   hündürlüyü çox böyükdür». Yapışqanlıq ləğv olundu (yuxarıda), burada
   isə zolaq bir sətrə yığılır: etiket və rəqəm yan-yana, kiçik ölçülər.
   ~100px → ~50px. YALNIZ Alış səhifəsi — .total-bar Reseptlər və
   Transfer səhifələri ilə ortaqdır, ona toxunulmur.
   ============================================================ */
:is(#setirSahe,#rSetirSahe) .total-bar,
#redakteForm .total-bar {
  gap: 12px; padding: 9px 8px 9px 16px; flex-wrap: wrap;
}

/* etiket + rəqəm bir sətirdə */
:is(#setirSahe,#rSetirSahe) .total-bar .tb-blok,
#redakteForm .total-bar .tb-blok {
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
}
/* QEYD: :first-of-type SİNFƏ yox, TEQƏ baxır — .tb-chips birinci div
   olduğu üçün orada işləmirdi. Ona görə ayrıca sinif verilib. */
:is(#setirSahe,#rSetirSahe) .total-bar .tb-esas,
#redakteForm .total-bar .tb-esas { margin-left: auto; }

:is(#setirSahe,#rSetirSahe) .total-bar .total-label,
#redakteForm .total-bar .total-label {
  font-size: 10px; letter-spacing: .1em; white-space: nowrap;
}
:is(#setirSahe,#rSetirSahe) .total-bar .total-value,
#redakteForm .total-bar .total-value {
  font-size: 21px; margin-top: 0; line-height: 1.1; white-space: nowrap;
}
:is(#setirSahe,#rSetirSahe) .total-bar .total-value small,
#redakteForm .total-bar .total-value small { font-size: 12px; }
:is(#setirSahe,#rSetirSahe) .total-bar .total-value.mono,
#redakteForm .total-bar .total-value.mono { font-size: 16px; font-weight: 700; }

/* mənfəət blokunu cəmdən nazik xətlə ayır (id yox, SARĞI blokuna) */
:is(#setirSahe,#rSetirSahe) .total-bar .tb-menfeet,
#redakteForm .total-bar .tb-menfeet {
  border-left: 1px solid rgba(228,188,94,.22); padding-left: 12px;
}

/* düymə yığcam */
:is(#setirSahe,#rSetirSahe) .total-bar .btn.lg,
#redakteForm .total-bar .btn.lg {
  padding: 9px 16px; font-size: 13.5px;
}
:is(#setirSahe,#rSetirSahe) .total-bar .btn.lg svg { width: 16px; height: 16px; }

/* çiplər bir az kiçik */
:is(#setirSahe,#rSetirSahe) .total-bar .tb-chip,
#redakteForm .total-bar .tb-chip { padding: 4px 10px; font-size: 11.5px; }
:is(#setirSahe,#rSetirSahe) .total-bar .tb-kbd { font-size: 11px; }

@media (max-width: 900px) {
  :is(#setirSahe,#rSetirSahe) .total-bar .tb-kbd { display: none; }
  :is(#setirSahe,#rSetirSahe) .total-bar .tb-esas,
  #redakteForm .total-bar .tb-esas { margin-left: 0; }
}

/* ============================================================
   v367 — Mağaza qalıqları: aşağıdakı «Dəyər göstəriciləri» bölməsi
   İş sahəsi (axtarış + matris) yuxarıdadır; yekun rəqəmlər aşağıda
   ayrıca bölmədə toplanıb. Bölmə nazik üst xətlə ayrılır ki, siyahının
   davamı kimi görünməsin.
   ============================================================ */
.qaliq-xulase {
  margin-top: 26px; padding-top: 4px;
  border-top: 1px solid var(--line);
}
.qaliq-xulase .page-head h2 {
  font-family: "Fraunces", serif; font-weight: 600; letter-spacing: -0.01em;
}
.qaliq-xulase .stats { margin-top: 12px; }

/* ============================================================
   v368 — Mağaza qalıqları: iki fərqli axtarış qutusu
   «Məhsul» (combobox, dəqiq seçim) və «Söz üzrə» (adın içində).
   Etiketlər qutuların üstündədir ki, operator hansının nə etdiyini
   bir baxışda ayırsın.
   ============================================================ */
.ql-axt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ql-axt > label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint); white-space: nowrap;
  margin-left: 2px;
}
.ql-axt > label span {
  font-weight: 500; letter-spacing: .02em; text-transform: none;
  color: var(--ink-faint); opacity: .75;
}
.ql-axt > label span::before { content: '· '; }
.ql-axt .tech-axtar { max-width: 250px; }

/* «Söz üzrə» qutusu — combobox DEYİL, ona görə ayrı sinif */
.ql-soz { position: relative; max-width: 230px; }
.ql-soz > svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--gold-2); pointer-events: none;
}
.ql-soz input { width: 100%; margin: 0; padding-left: 33px; }

@media (max-width: 760px) {
  .ql-axt { flex: 1 1 100%; }
  .ql-axt .tech-axtar, .ql-soz { max-width: none; }
}

/* ============================================================
   v371 — Açılan siyahı YUXARI açılanda
   Xana ekranın dibinə düşəndə siyahı aşağıda yer tapmır və ekrandan
   kənarda qalırdı. acilan-qat.js yer çatmayanda bu sinfi əlavə edir
   və siyahı xananın ÜSTÜNDƏ açılır.
   ============================================================ */
.cx-dd.cx-dd-ust {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -14px 34px rgba(43, 33, 26, .18);
}

/* ============================================================
   v373 — Sətir zolağında «1 vahid» mənfəəti
   Sətrin ÜMUMİ mənfəəti (miqdara vurulmuş) əsas rəqəm olaraq qalır;
   1 vahidə düşən pay onun yanında, nazik ayırıcı xəttdən sonra gəlir.
   İki faiz iki fərqli bazadandır — etiketlərdə açıq yazılır:
     «marja»      = (satış − alış) ÷ satış
     «alışa görə» = (satış − alış) ÷ alış
   ============================================================ */
.mf-vahid {
  display: inline-flex; align-items: baseline; gap: 5px;
  margin-left: 10px; padding-left: 10px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
.mf-vahid > b { font-size: 13.5px; }

@media (max-width: 760px) {
  .mf-vahid {
    display: flex; margin-left: 0; padding-left: 0;
    border-left: 0; margin-top: 2px;
  }
}

/* ============================================================
   v375 — YF istehsalı: problemli tərkib xanası
   «Partiyanı qeydə al» basılanda miqdarı/qiyməti 0 olan sətrin
   xanası işıqlanır ki, operator hansı sətri düzəltməli olduğunu
   siyahıda axtarmasın.
   ============================================================ */
input.yf-xeta {
  border-color: var(--danger) !important;
  background: rgba(178, 59, 59, .06);
  box-shadow: 0 0 0 3px rgba(178, 59, 59, .12);
}

/* ============================================================
   v376 — SƏNƏD CƏDVƏLİ (ortaq): Təchizatçıya qaytarma · Müştəri qaytarması
   Alış səhifəsindəki (v363) sıx cədvəlin eyni dili, amma səhifəyə
   bağlanmayan ortaq siniflərlə — sonradan başqa sənəd səhifəsinə də
   tətbiq etmək üçün tək yerdən idarə olunur.
   Sütunlar: №  MAL  MİQDAR  QİYMƏT  MƏBLƏĞ  ✕
   ============================================================ */
.sn-qab { margin-top: 14px; }

.sn-bas, .sn-setir {
  display: grid;
  grid-template-columns: 34px minmax(0, 2.4fr) 104px 110px 124px 36px;
  align-items: center;
}

/* tünd başlıq zolağı */
.sn-bas {
  background: var(--sidebar); color: var(--gold-1);
  border-radius: 10px 10px 0 0;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.sn-bas > span { padding: 9px 10px; white-space: nowrap; }
.sn-bas > span.num { text-align: right; }
.sn-bas > span.sira { text-align: center; padding: 9px 0; }

/* sətirlərin çərçivəsi */
.sn-govde {
  border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 10px 10px; background: var(--surface);
}
.sn-govde > p.muted { padding: 12px 14px; margin: 0 !important; }

.sn-setir { border-top: 1px solid var(--line); position: relative; }
.sn-setir:first-child { border-top: 0; }
.sn-setir.alt { background: #FBF5E9; }
.sn-setir:hover { background: rgba(201, 162, 39, .07); }

.sn-setir > .sn-sira {
  text-align: center; font-size: 11.5px; color: var(--ink-faint);
}
.sn-setir .cx { min-width: 0; }
.sn-setir input.cell-input,
.sn-setir input.cx-inp {
  width: 100%; height: 34px; margin: 0; padding: 5px 10px; font-size: 13.5px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.sn-setir input.cell-input:focus,
.sn-setir input.cx-inp:focus {
  background: #F7ECCB; box-shadow: inset 0 0 0 2px var(--gold-2); outline: 0;
}
.sn-setir input.cell-input { text-align: right; }
.sn-setir .sn-mebleg {
  text-align: right; padding-right: 10px; font-weight: 700; white-space: nowrap;
}
.sn-setir .btn.icon {
  border: 0; background: transparent; box-shadow: none;
  width: 30px; height: 30px; justify-self: center;
}
.sn-setir .btn.icon:hover { background: rgba(178, 59, 59, .10); }

/* sətir-altı məlumat zolağı — sətrə yapışıq nazik xətt */
.sn-strip {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--gold-1); background: #FCF7EA;
  padding: 5px 12px 6px 44px; font-size: 12.5px; line-height: 1.5;
}

/* səhv işarələnməsi (mövcud .xeta-xana / .xeta-setir ilə uyğun) */
.sn-setir.xeta-setir { background: rgba(178, 59, 59, .07); }
.sn-setir input.xeta-xana {
  background: rgba(178, 59, 59, .10);
  box-shadow: inset 0 0 0 2px var(--danger);
}

/* sətir sayğacı çipi (Alışdakı .tb-chip ilə eyni dil, açıq fonda) */
.sn-say {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-soft); white-space: nowrap;
}
.sn-say b { font-size: 13px; color: var(--gold-2); }

@media (max-width: 820px) {
  .sn-bas { display: none; }
  .sn-setir { grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
  .sn-setir > .sn-sira { display: none; }
  .sn-setir .cx { grid-column: 1 / -1; }
  .sn-strip { padding-left: 12px; }
}

/* ============================================================
   v377 — Təchizatçıya qaytarma: yığcam başlıq + qatlanan izah
   Uzun izah mətni ekranın yarısını tuturdu. İndi «ⓘ İzah» altına
   qatlanıb: səhifə iş sahəsi ilə açılır, qaydalar isə itmir.
   Yuxarı sahələr Alışdakı (v363) .alis-ust düzülüşünü işlədir.
   ============================================================ */
.q-bas {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.q-izah { font-size: 13px; }
.q-izah > summary {
  cursor: pointer; list-style: none;
  color: var(--gold-2); font-weight: 600; user-select: none;
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.q-izah > summary::-webkit-details-marker { display: none; }
.q-izah > summary:hover { background: var(--accent-soft); }
.q-izah[open] > summary { background: var(--accent-soft); }
.q-izah > p {
  margin: 10px 0 0; font-size: 13.5px; line-height: 1.6;
  border-left: 3px solid var(--gold-1); padding-left: 12px;
}

/* Növ seqmenti — 48px düymələr əvəzinə yığcam cüt */
.q-seg { display: flex; gap: 0; border-radius: 10px; overflow: hidden; }
.q-seg .btn {
  height: 38px; padding: 0 16px; font-size: 13.5px;
  border-radius: 0; box-shadow: none;
}
.q-seg .btn:first-child { border-radius: 10px 0 0 10px; }
.q-seg .btn:last-child  { border-radius: 0 10px 10px 0; }

/* ============================================================
   v378 — Müştəri qaytarması: yuxarı sahələr Alışdakı düzülüşdə
   .alis-ust ailəsinə iki əlavə:
     (1) mətn xanası (Qeyd) da 38px olsun — v363-də yalnız select və
         tarix xanası əhatə olunmuşdu, ona görə «Qeyd» hündür qalırdı.
         Yalnız #sqForm daxilində — Alış səhifəsinin öz xanalarına dəymir.
     (2) etiketdəki köməkçi izah («satışından çıxılacaq») böyük hərfli
         başlıqdan fərqlənsin. Alışın etiketlərində <span> yoxdur,
         yəni bu qayda oraya təsir etmir.
   ============================================================ */
#sqForm .alis-ust input[type="text"],
#sqForm .alis-ust input:not([type]) {
  height: 38px; margin: 0; padding: 6px 11px; font-size: 13.5px;
}

.alis-ust .ust-el > label span {
  font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .8;
}
.alis-ust .ust-el > label span::before { content: '· '; }

/* ============================================================
   v379 — ALIŞ: bir məhsul = bir sətir, zolaq yalnız işlənəndə
   Sütunlar 7-dən 9-a çıxdı: … MƏBLƏĞ · SATIŞ · MƏNFƏƏT · ✕
   Xammal rejimində son iki sütun gizlənir (satış anlayışı yoxdur).
   ============================================================ */
:is(#setirSahe,#rSetirSahe) .alis-head.head-sel,
:is(#setirSahe,#rSetirSahe) .alis-row-sel {
  /* v450: sütun sırası — № · ad · miqdar · vahid · vahid qiymət · SATIŞ · MƏBLƏĞ · mənfəət · ✕ */
  grid-template-columns: 38px minmax(0,2.2fr) 92px 74px 100px 88px 106px 132px 36px;
}
/* xammal rejimi — köhnə 7 sütunlu düzülüş */
:is(#setirSahe,#rSetirSahe)[data-novu="Xammal"] .alis-head.head-sel,
:is(#setirSahe,#rSetirSahe)[data-novu="Xammal"] .alis-row-sel {
  grid-template-columns: 38px minmax(0,2.4fr) 96px 78px 106px 112px 36px;
}
:is(#setirSahe,#rSetirSahe)[data-novu="Xammal"] .sm-sut { display: none; }

/* yığılı sətirdəki satış / mənfəət */
:is(#setirSahe,#rSetirSahe) .sm-satis, :is(#setirSahe,#rSetirSahe) .sm-menfeet {
  padding: 5px 10px; font-size: 13px; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
:is(#setirSahe,#rSetirSahe) .sm-menfeet .sm-artim { color: var(--ok); font-weight: 700; }
:is(#setirSahe,#rSetirSahe) .sm-menfeet .sm-zerer { color: var(--danger); font-weight: 700; }

/* sətir sarğısı — zebra artıq buradadır (sətir + zolaq birlikdə) */
:is(#setirListe,#rSetirListe) .setir-qab { border-top: 1px solid var(--line); }
:is(#setirListe,#rSetirListe) .setir-qab:first-child { border-top: 0; }
:is(#setirListe,#rSetirListe) .setir-qab.alt { background: #FBF5E9; }
:is(#setirListe,#rSetirListe) .setir-qab:hover { background: rgba(201,162,39,.06); }
:is(#setirListe,#rSetirListe) .setir-qab.zolaq-aktiv {
  background: #FFF8E6; box-shadow: inset 3px 0 0 var(--gold-2);
}
/* sarğı gəldiyi üçün sətrin öz çərçivəsi/zebrası artıqdır */
:is(#setirSahe,#rSetirSahe) .alis-row-sel { border-top: 0; background: transparent; }
:is(#setirSahe,#rSetirSahe) .alis-row-sel:hover { background: transparent; }

/* ZOLAQ — yalnız aktiv sətirdə; sətirləri AŞAĞI İTƏLƏYİR (üzmür) */
:is(#setirListe,#rSetirListe) .alis-strip { display: none; }
:is(#setirListe,#rSetirListe) .setir-qab.zolaq-aktiv .alis-strip { display: flex; }

@media (max-width: 900px) {
  :is(#setirSahe,#rSetirSahe) .alis-head.head-sel { display: none; }
  :is(#setirSahe,#rSetirSahe) .alis-row-sel,
  :is(#setirSahe,#rSetirSahe)[data-novu="Xammal"] .alis-row-sel { grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
  :is(#setirSahe,#rSetirSahe) .sm-sut { display: none; }
}

/* ============================================================
   v380 — Müştəri qaytarması: bir sətir + fokusda açılan zolaq
   Sütun sayı 6-ya çıxdı (QALIQ əlavə olundu) — .sn-6 ilə işarələnir
   ki, v376-nın 5 sütunlu düzülüşü Təchizatçıya qaytarmada pozulmasın.
   ============================================================ */
.sn-bas.sn-6, .sn-setir.sn-6 {
  grid-template-columns: 34px minmax(0,2.2fr) 76px 96px 104px 120px 36px;
}
.sn-setir .sn-qaliq {
  padding: 5px 10px; text-align: right; font-size: 13.5px; white-space: nowrap;
}
.sn-setir .sn-ad {
  padding: 5px 10px; font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ZOLAQ — yalnız işlənən sətirdə; sətirləri aşağı itələyir */
.sn-setir .sn-strip { display: none; }
.sn-setir.zolaq-aktiv .sn-strip { display: flex; }
.sn-setir.zolaq-aktiv {
  background: #FFF8E6; box-shadow: inset 3px 0 0 var(--gold-2);
}

/* redaktə modalında sətirlər arası köhnə boşluq artıqdır */
#mqrSetirler .qr-row { margin-bottom: 0; }
#mqrSetirler > p.muted { padding: 12px 14px; margin: 0 !important; }

@media (max-width: 820px) {
  .sn-bas.sn-6 { display: none; }
  .sn-setir.sn-6 { grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
  .sn-setir.sn-6 > .sn-ad { grid-column: 1 / -1; }
}

/* ============================================================
   v384 — Zay: çoxsətirli cədvəl (7 sütun)
   № · MAL · QALIQ · MİQDAR · MAYA · İTƏN DƏYƏR · ✕
   ============================================================ */
.sn-bas.sn-z, .sn-setir.sn-z {
  grid-template-columns: 34px minmax(0,2.2fr) 76px 96px 92px 110px 36px;
}
.sn-setir .sn-maya {
  padding: 5px 10px; text-align: right; font-size: 13.5px; white-space: nowrap;
}
#zaySahe { margin-top: 14px; }

@media (max-width: 820px) {
  .sn-bas.sn-z { display: none; }
  .sn-setir.sn-z { grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
  .sn-setir.sn-z > .cx { grid-column: 1 / -1; }
}

/* ============================================================
   v390 — Zay redaktə paneli: yaratma formasının eyni dili
   Kiçik modal əvəzinə tam sənəd görünüşü (üst sətir + cədvəl + yekun).
   ============================================================ */
.modal-box.zr-qutu {
  width: min(1000px, 96vw);
  padding: 22px 24px 20px;
}
.zr-qutu .zr-sabit {
  height: 38px; display: flex; align-items: center;
  padding: 0 11px; font-size: 13.5px; font-weight: 600;
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 10px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.zr-qutu .sn-qab { margin-top: 14px; }
.zr-qutu .sn-setir.sn-z { min-height: 38px; }
.zr-qutu .sn-setir .cell-input { background: #FFFDF8; }
.zr-qutu .sn-setir .cell-input:focus { background: #F7ECCB; }
/* redaktədə sətir sabitdir — vurğulanma lazım deyil */
.zr-qutu .sn-setir:hover { background: transparent; }
.zr-qutu .total-bar .btn.lg { padding: 10px 18px; }

@media (max-width: 820px) {
  .modal-box.zr-qutu { padding: 16px; }
}

/* ============================================================
   v397 — «Son qaytarmalar»: süzgəc zolağı + səhifələmə
   Alışdakı «Son alışlar» ilə eyni dil (.alis-ust/.ust-el ailəsi).
   ============================================================ */
.son-suzgec {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: #FCFAF5;
}
.son-suzgec .ust-el > label {
  display: block; margin: 0 0 4px 2px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-faint);
}
.son-suzgec .ust-el > label span {
  font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .8;
}
.son-suzgec .ust-el > label span::before { content: '· '; }
.son-suzgec select,
.son-suzgec input {
  height: 38px; margin: 0; padding: 6px 11px; font-size: 13.5px;
}

.sehifeleme {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 14px 18px; border-top: 1px solid var(--line);
}
/* keçid mövcud deyilsə solğun və basılmaz */
.sehifeleme .sonuk {
  opacity: .4; pointer-events: none;
}

@media (max-width: 760px) {
  .son-suzgec { padding: 12px; gap: 10px; }
  .son-suzgec .ust-el { flex: 1 1 100% !important; }
}

/* ============================================================
   v401 — Toplu satış qiyməti pəncərəsi
   ============================================================ */
.modal-box.qp-qutu { width: min(1040px, 96vw); padding: 20px 22px 16px; }
.qp-bas { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }

.qp-cedvel {
  max-height: min(58vh, 520px); overflow-y: auto;
  border: 1px solid var(--line); border-radius: 12px;
}
.qp-bas-setir, .qp-setir {
  display: grid;
  /* v401b: mənfəət sütunundan marja çıxdı → daraldı, ad daha çox yer aldı */
  grid-template-columns: 34px minmax(200px, 1fr) 84px 84px 84px 104px minmax(150px, 185px);
  gap: 10px; align-items: center; padding: 8px 12px;
}
.qp-bas-setir {
  position: sticky; top: 0; z-index: 2;
  background: var(--sidebar); color: var(--on-dark);
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 12px 12px 0 0;
}
.qp-setir { border-top: 1px solid var(--line); font-size: 13.5px; }
.qp-setir:nth-child(even) { background: #FCFAF5; }
.qp-ad { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-setir .num { text-align: right; }
.qp-inp {
  height: 34px; width: 100%; text-align: right;
  padding: 4px 9px; border: 1px solid var(--gold-2); border-radius: 8px;
  background: #FFFDF8; font-size: 13.5px;
}
.qp-inp:focus { outline: none; background: #F7ECCB; }
.qp-menfeet { font-size: 12.5px; text-align: right; }

.qp-alt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 2px 2px; margin-top: 12px; border-top: 1px solid var(--line);
}
.qp-alt .btn { margin-left: auto; }

@media (max-width: 860px) {
  .qp-bas-setir { display: none; }
  .qp-setir { grid-template-columns: 28px 1fr 92px; row-gap: 4px; }
  .qp-setir .num:nth-child(3), .qp-setir .num:nth-child(4) { display: none; }
  .qp-menfeet { grid-column: 1 / -1; text-align: left; }
}

/* ============================================================
   v402 — Alış sətirlərinin yerini dəyişmə (sürüşdürmə)
   ============================================================ */
/* v403: eyni tutacaq redaktə cədvəlində də (tr.r-setir) */
.alis-row .sira-tut,
tr.r-setir .sira-tut {
  cursor: grab;
  user-select: none;
  position: relative;
  border-radius: 6px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.alis-row .sira-tut:hover,
tr.r-setir .sira-tut:hover {
  background: var(--accent-soft);
  color: var(--gold-2);
}
/* tutacaq olduğu bilinsin — üstünə gələndə nöqtəcikli tutacaq görünür */
.alis-row .sira-tut::before,
tr.r-setir .sira-tut::before {
  content: '⠿';
  position: absolute; left: -13px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--ink-faint); opacity: 0;
  transition: opacity .15s var(--ease);
}
.alis-row:hover .sira-tut::before,
tr.r-setir:hover .sira-tut::before { opacity: .75; }
.alis-row .sira-tut:active,
tr.r-setir .sira-tut:active { cursor: grabbing; }

/* sürüşdürülən sətir solğunlaşır */
.alis-row.sz-gedir,
tr.r-setir.sz-gedir { opacity: .38; }

/* hara düşəcəyini göstərən xətt */
.alis-row.sz-ust,
tr.r-setir.sz-ust td  { box-shadow: inset 0 3px 0 0 var(--gold-2); }
.alis-row.sz-alt,
tr.r-setir.sz-alt td  { box-shadow: inset 0 -3px 0 0 var(--gold-2); }

/* yeni yerinə düşən sətir qısa müddət işıqlanır */
@keyframes szGeldi {
  from { background: #F7ECCB; }
  to   { background: transparent; }
}
.alis-row.sz-geldi,
tr.r-setir.sz-geldi td { animation: szGeldi .7s var(--ease) both; }

@media (max-width: 760px) {
  .alis-row .sira-tut::before, tr.r-setir .sira-tut::before { display: none; }
}

/* ============================================================
   v404 — Tamamlanmamış alış (qaralama) siyahıda
   ============================================================ */
/* v405b: daha yığcam və ciddi görünüş — kart deyil, işarələnmiş sətir.
   Əvvəl doymuş sarı fon və iri nişan sənədlərdən çox reklam kimi görünürdü. */
tr.qaralama-setir > td {
  background: #FDFAF2;                        /* çox açıq — gözü yormur */
  border-top: 1px solid #EADFC4;
  border-bottom: 1px solid #EADFC4;
}
tr.qaralama-setir > td:first-child { box-shadow: inset 3px 0 0 0 var(--gold-2); }
tr.qaralama-setir:hover > td { background: #FBF5E7; }

.qaralama-nisan {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 7px;
  background: transparent; color: #8A6D1F;
  border: 1px solid #DFC98A;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}
tr.qaralama-setir .btn.qaralama-davam {
  padding: 5px 14px; font-size: 12.5px;
}
tr.qaralama-setir .btn.qaralama-sil {
  padding: 5px 12px; font-size: 12.5px; color: var(--ink-faint);
}
tr.qaralama-setir .btn.qaralama-sil:hover { color: var(--danger); }

/* yarımçıq proses bildirişi (confirm əvəzinə) */
.yq-bildiris {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 9999; max-width: min(560px, 92vw);
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-radius: 14px;
  background: var(--sidebar); color: var(--on-dark);
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
  font-size: 14px; line-height: 1.4;
  animation: yqGir .22s var(--ease) both;
}
.yq-bildiris b { color: var(--gold-1); }
.yq-bildiris.gedir { animation: yqCix .25s var(--ease) both; }
@keyframes yqGir { from { opacity: 0; transform: translate(-50%, 14px); }
                   to   { opacity: 1; transform: translate(-50%, 0); } }
@keyframes yqCix { from { opacity: 1; transform: translate(-50%, 0); }
                   to   { opacity: 0; transform: translate(-50%, 14px); } }

/* ============================================================
   v407 — ALIŞIN REDAKTƏSİ: yeni alışla EYNİ dizayn
   Cədvəl artıq <table> deyil — yeni alışdakı grid sətirləri
   (.alis-row-sel / .setir-qab / .alis-strip). Ümumi qaydalar yuxarıda
   :is(#setirSahe,#rSetirSahe) ilə paylaşılır; burada yalnız redaktəyə
   xas incəliklər var.
   ============================================================ */
/* mövcud sətrin adı — yeni alışdakı combobox xanası ilə eyni ölçüdə */
#rSetirSahe .r-ad {
  padding: 5px 10px; font-size: 13.5px; line-height: 34px; height: 34px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
/* vahid — dəyişilmir, sadəcə göstərilir (seçim xanası ilə eyni yerdə) */
#rSetirSahe .r-vahid {
  padding: 5px 10px; font-size: 13.5px; line-height: 24px; white-space: nowrap;
}
/* kilidli qiymət: rəqəm + 🔒 bir xanada */
#rSetirSahe .r-kilid { display: flex; align-items: center; gap: 4px; min-width: 0; }
#rSetirSahe .r-kilid input { flex: 1; min-width: 0; }
#rSetirSahe .r-kilid span { font-size: 12px; flex: 0 0 auto; padding-right: 4px; }
#rSetirSahe .alis-row-sel input:disabled { color: var(--ink-faint); background: transparent; }
/* silinməyə işarələnən sətir */
#rSetirListe .setir-qab.r-silinib .alis-row-sel { opacity: .45; text-decoration: line-through; }
#rSetirListe .setir-qab.r-silinib .alis-strip { display: none !important; }
/* ✕ / ↩ düyməsi */
#rSetirSahe .alis-row-sel .btn.icon { font-size: 15px; line-height: 1; }
/* sil düyməsi yerinə «—» (kilidli sətir) */
#rSetirSahe .r-yox { text-align: center; color: var(--ink-faint); }
/* alış növü / mağaza — redaktədə dəyişilmir, amma yeni alışdakı yerində görünür */
#redakteForm .seg.r-seg-kilid .seg-opt { cursor: default; }
#redakteForm .seg.r-seg-kilid .seg-opt:hover span { border-color: var(--line); }
#redakteForm .seg.r-seg-kilid .seg-opt input:not(:checked) + span { opacity: .55; }
#redakteForm .alis-ust select:disabled { color: var(--ink); background-color: #FBF8F1; opacity: 1; cursor: default; }
/* zolaqda köməkçi məlumat */
#rSetirSahe .alis-strip .r-istifade { margin-left: 14px; }
/* yeni sətir (＋) — mövcudlardan nöqtəli xətlə ayrılır */
#rYeniQab .setir-qab { border-top: 1px dashed var(--line); background: #FFFDF8; }
#rYeniQab .setir-qab .sira { color: var(--gold-2); font-weight: 700; }
@media (max-width: 760px) { #rSetirSahe .r-ad { height: auto; line-height: 1.3; white-space: normal; } }

/* ============================================================
   v408 — Son qaytarmalar: axtarış sistemi
   ============================================================ */
.son-suzgec .son-ax-qab { position: relative; }
.son-suzgec .son-ax-qab input { padding-right: 34px; }
.son-suzgec .son-ax-qab .son-ax-sil { z-index: 2; }
.son-suzgec .son-ax-sil {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--ink-faint); font-size: 12px;
  align-items: center; justify-content: center;
}
.son-suzgec .son-ax-sil:hover { background: rgba(178,59,59,.10); color: var(--danger); }
.son-suzgec .son-ax-hint { font-size: 11.5px; color: var(--danger); margin: 4px 0 0 2px; }
.son-suzgec .cx-inp { height: 38px; }
.son-suzgec .cx-dd .cx-cari { background: var(--accent-soft); }
.son-suzgec .cx-dd .cx-cari .cx-ad { font-weight: 700; }
/* aktiv süzgəc çipləri */
.son-cipler {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 18px; border-bottom: 1px solid var(--line);
  background: #FFFDF8; font-size: 12.5px;
}
.son-cip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; text-decoration: none;
  background: var(--accent-soft); color: var(--accent-deep); font-weight: 600;
  border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.son-cip b { font-weight: 700; opacity: .6; }
.son-cip:hover { border-color: var(--gold-2); }
.son-cip:hover b { opacity: 1; color: var(--danger); }
.son-cip-say { margin-left: auto; }
@media (max-width: 760px) {
  .son-cip-say { margin-left: 0; width: 100%; }
}

/* ============================================================
   v411 — Mağaza hesablaşması: yığcam görünüş
   ============================================================ */
.hs-izah-btn {
  font: 600 12.5px/1 inherit; font-family: inherit; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent-deep); cursor: pointer;
}
.hs-izah-btn:hover { border-color: var(--gold-2); }
.hs-izah {
  display: none; margin-top: 10px; padding: 10px 14px; border-radius: 10px;
  background: #FBF5E9; border: 1px solid var(--line); font-size: 13px; line-height: 1.5; max-width: 900px;
}
.hs-izah.acig { display: block; }
/* kim kimə borcludur — kartlar */
.hs-cutler { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.hs-cut {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); text-decoration: none; color: var(--ink); font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
.hs-cut:hover { border-color: var(--gold-2); background: #FFFDF8; }
.hs-cut.aktiv { border-color: var(--gold-2); background: var(--accent-soft); }
.hs-cut-taraf { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-cut .hs-ox { color: var(--ink-faint); margin: 0 4px; }
.hs-cut-mebleg { font-weight: 700; color: var(--accent-deep); white-space: nowrap; }
.hs-cut-mebleg small { font-weight: 500; color: var(--ink-soft); }
/* hesabat qalıq zolağı */
.hs-qaliq-zolaq {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: #FFFDF8;
}
.hs-qaliq-orta { color: var(--ink-soft); font-size: 13px; text-align: center; }
/* növ nişanları */
.hs-nov {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.hs-nov svg { width: 14px; height: 14px; }
.hs-nov.alindi  { background: var(--ok-soft); color: var(--ok); }
.hs-nov.verildi { background: rgba(178,59,59,.10); color: var(--danger); }
.hs-nov.diger   { background: var(--surface-2); color: var(--ink-soft); }
/* MTR keçidi */
.plu-badge.hs-mtr { text-decoration: none; cursor: pointer; }
.plu-badge.hs-mtr:hover { background: var(--gold-1); color: #fff; }
@media (max-width: 760px) {
  .hs-qaliq-zolaq { flex-direction: column; align-items: flex-start; }
  .hs-qaliq-zolaq > div:last-child { text-align: left !important; }
}

/* ============================================================
   v420 — Sex / İstehsal: yığcam başlıq (statistika bir sırada)
   ============================================================ */
.page-head.sx-bas {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.sx-stat-sira { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-bottom: 4px; }
.sx-stat {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; white-space: nowrap;
}
.sx-stat b { font-size: 14px; color: var(--accent-deep); }
.sx-stat-l { color: var(--ink-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 760px) { .page-head.sx-bas { align-items: flex-start; } }

/* ============================================================
   v422 — Bildiriş zəngi (başlıq)
   ============================================================ */
.bd-zeng { position: relative; margin-right: 6px; flex-shrink: 0; }
.bd-zeng-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: #F3E9D2; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.bd-zeng-btn svg { width: 20px; height: 20px; }
.bd-zeng-btn:hover { background: rgba(255,255,255,.14); }
.bd-zeng-btn.var { color: #FFD97A; border-color: rgba(255,217,122,.45); }
.bd-zeng-btn.titre { animation: bdTitre .9s ease-in-out; }
@keyframes bdTitre { 0%,100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-6deg); } }
.bd-say {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: #E1463C; color: #fff; font: 700 11px/20px var(--font, inherit); text-align: center; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #2A1D0E;
}
.bd-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 380px; max-width: 92vw; z-index: 95;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(30,22,10,.22); overflow: hidden; animation: fadeIn .15s var(--ease) both;
}
.bd-panel-bas { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.bd-panel-bas span { display: flex; gap: 10px; }
.bd-link { background: none; border: 0; padding: 0; color: var(--accent-deep); font-size: 12px; cursor: pointer; text-decoration: none; font-family: inherit; }
.bd-link:hover { text-decoration: underline; }
.bd-siyahi { max-height: 420px; overflow-y: auto; }
.bd-setir { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.bd-setir:last-child { border-bottom: 0; }
.bd-setir:hover { background: #FBF5E9; }
.bd-setir.yeni { background: #FFF8E6; }
.bd-nokta { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 7px; flex-shrink: 0; }
.bd-setir.yeni .bd-nokta { background: #E1463C; }
.bd-metn { font-size: 13px; line-height: 1.35; min-width: 0; }
.bd-metn b { display: block; }
.bd-metn div { color: var(--ink-soft); font-size: 12.5px; }
.bd-metn small { color: var(--ink-faint); font-size: 11px; }
tr.bd-yeni > td { background: #FFF8E6; }
@media (max-width: 760px) { .bd-panel { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; } }

/* v431 — Topdan satış: ödəniş seçimi */
.ts-odenis { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ts-od-sec { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; font-weight: 400; }
.ts-od-sec input { width: auto; margin: 0; }
.ts-od-sec small { color: var(--ink-soft); }

/* v435 — Alışın redaktəsi: məhsul dəyişmə */
#rSetirSahe .r-ad-deyis { cursor: pointer; }
#rSetirSahe .r-ad-deyis:hover { background: var(--accent-soft); border-radius: 8px; }
#rSetirSahe .r-ad-deyis::after { content: " ✎"; color: var(--ink-faint); font-size: 12px; opacity: 0; transition: opacity .15s; }
#rSetirSahe .r-ad-deyis:hover::after { opacity: 1; }
#rSetirListe .setir-qab.r-gizli { display: none; }

/* v436 — Məhsul jurnalı */
.mj-nov { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; cursor: pointer; margin: 0; font-weight: 500; background: var(--surface); }
.mj-nov input { width: auto; margin: 0; }
.mj-nov-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-soft); }
.mj-alis, .mj-istehsal, .mj-ilkin, .mj-mqay { background: var(--ok-soft); color: var(--ok); }
.mj-satis, .mj-topdan, .mj-tqay { background: var(--accent-soft); color: var(--accent-deep); }
.mj-zay { background: rgba(178,59,59,.10); color: var(--danger); }
.mj-transfer, .mj-sayim { background: #EEF0FF; color: #3B4A9F; }

/* ============================================================
   v438 — Müdir ekranı (mobil)
   ============================================================ */
.md-qab { max-width: 560px; margin: 0 auto; padding-bottom: 20px; }
.md-bas { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 12px; }
.md-tarix { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; }
.md-canli { font-size: 12px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.md-nokta { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(63,107,51,.5); animation: mdPuls 2s infinite; }
@keyframes mdPuls { 0% { box-shadow: 0 0 0 0 rgba(63,107,51,.45); } 70% { box-shadow: 0 0 0 8px rgba(63,107,51,0); } 100% { box-shadow: 0 0 0 0 rgba(63,107,51,0); } }
.md-hero {
  border-radius: 20px; padding: 20px 22px; color: #F7EFDD;
  background: linear-gradient(135deg, #2A1D0E 0%, #4A3316 55%, #8A6A1F 100%);
  box-shadow: 0 14px 34px rgba(42,29,14,.28);
}
.md-hero-l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.md-hero-v { font-family: 'Fraunces', serif; font-size: 44px; font-weight: 700; line-height: 1.1; margin: 6px 0 8px; letter-spacing: -.5px; }
.md-hero-v small { font-size: 18px; font-weight: 500; opacity: .85; }
.md-hero-alt { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; opacity: .9; }
.md-hero-alt b { font-weight: 700; }
#mdCem.md-yeni { animation: mdYeni 1.2s ease; }
@keyframes mdYeni { 0% { color: #FFD97A; transform: scale(1.04); } 100% { color: inherit; transform: none; } }
.md-basliq { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; margin: 20px 0 8px; }
.md-kartlar { display: flex; flex-direction: column; gap: 8px; }
.md-kart { display: block; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.md-kart-bas { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.md-novbe { font-size: 11.5px; white-space: nowrap; }
.md-novbe.aciq { color: var(--ok); }
.md-novbe.bagli { color: var(--ink-faint); }
.md-kart-v { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600; margin: 4px 0 6px; }
.md-kart-v small { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.md-kart-v .muted { font-family: inherit; font-size: 13px; font-weight: 400; }
.md-bar { height: 7px; background: var(--accent-soft); border-radius: 5px; overflow: hidden; }
.md-bar > div { height: 100%; background: var(--accent); border-radius: 5px; }
.md-kart-alt { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.md-siqnallar { display: flex; flex-direction: column; gap: 8px; }
.md-siq { display: grid; grid-template-columns: 64px 1fr 18px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.md-siq-v { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; text-align: center; }
.md-siq.warn .md-siq-v { color: #B7791F; }
.md-siq.danger .md-siq-v { color: var(--danger); }
.md-siq.ok .md-siq-v { color: var(--ok); }
.md-siq-b { font-size: 14px; font-weight: 600; }
.md-siq-i { font-size: 12px; color: var(--ink-soft); }
.md-siq-ox { color: var(--ink-faint); font-size: 20px; }
.md-top { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.md-top-setir { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.md-top-setir:last-child { border-bottom: 0; }
.md-top-n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.md-top-ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* v445 — transferdə miqdarsız sətir xəbərdarlığı */
#mtSetirler .mt-setir-xeta { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 12px; animation: mtXeta .5s ease 3; }
@keyframes mtXeta { 50% { background: rgba(178,59,59,.10); } }

/* v449 — redaktədə məhsul combobox-u */
#rSetirSahe .r-cx { min-width: 0; }
#rSetirSahe .r-cx .cx-inp { height: 34px; padding: 5px 10px; font-size: 13.5px; border: 0; background: transparent; margin: 0; width: 100%; border-radius: 8px; }
#rSetirSahe .r-cx .cx-inp:focus { background: var(--accent-soft); outline: 2px solid var(--gold-2); }
#rSetirSahe .r-cx .cx-dd .cx-cari { background: var(--accent-soft); }
#rSetirListe .r-setir.r-mehsul-deyisdi .r-cx .cx-inp { background: #FFF3D6; }

/* v452 — Məhsullar: yığcam yaratma forması */
.ymk-y-bas { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ymk-y-bas h3 { margin: 0; font-size: 17px; }
.ymk-seg2 { display: flex; gap: 6px; }
.ymk-seg2 .seg-opt span { padding: 8px 12px; min-width: 76px; }
.ymk-seg2 .seg-opt small { display: block; font-size: 10.5px; }
.yeni-mehsul-kart { padding: 14px 18px; }

/* v463 — Müştəri qaytarması: bu ay kassir kəsimi */
.mq-kpi-bas { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 10px; padding-top: 22px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.mq-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .mq-kpi-grid { grid-template-columns: 1fr; } }
.mq-kpi-kart .card-head { align-items: flex-start; }
.mq-kpi-kart h3 { margin: 0 0 2px; font-size: 16px; }
.mq-kpi-cem { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.mq-kpi-siyahi { padding: 6px 0; }
.mq-kpi-setir { display: grid; grid-template-columns: 150px 1fr 84px 92px; gap: 12px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--line); }
.mq-kpi-setir:first-child { border-top: 0; }
.mq-kpi-ad { display: flex; flex-direction: column; line-height: 1.2; font-size: 13.5px; min-width: 0; }
.mq-kpi-ad b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mq-kpi-ad .muted { font-size: 11.5px; }
.mq-kpi-bar { height: 8px; background: var(--accent-soft); border-radius: 5px; overflow: hidden; }
.mq-kpi-bar > div { height: 100%; background: var(--accent); border-radius: 5px; }
.mq-kpi-req { text-align: right; font-weight: 700; font-size: 14px; }
.mq-kpi-kpi { text-align: right; font-size: 12px; color: var(--ink-faint); }
.mq-kpi-kpi.var { color: var(--danger); font-weight: 700; }

/* v464 — Məhsul transferi: Alış üslubunda sətir cədvəli + yekun zolağı */
.alis-head.mt-head, .alis-row.mt-row {
  grid-template-columns: 34px minmax(0,2.2fr) 110px 110px 150px 110px 36px;
}
.alis-head.mt-head { padding: 0 8px 6px; }
.alis-head.mt-head .sira { text-align: center; }
.alis-row.mt-row {
  padding: 6px 8px; border-radius: 10px; margin-bottom: 4px; background: var(--surface);
  border: 1px solid transparent; transition: background .12s;
}
.alis-row.mt-row.alt { background: #FBF7EE; }
.alis-row.mt-row:focus-within { border-color: var(--gold-2); background: #FFF8E6; }
.alis-row.mt-row .sira { text-align: center; font-size: 12px; }
.alis-row.mt-row .mt-qiymet { font-size: 13.5px; white-space: nowrap; text-align: right; padding-right: 6px; }
.alis-row.mt-row .mt-mebleg { font-weight: 700; font-size: 14px; text-align: right; padding-right: 6px; }
.alis-row.mt-row > input.cell-input { height: 36px; width: 100%; min-width: 0; box-sizing: border-box; }
.alis-row.mt-row > input.cell-input:first-of-type { text-align: left; font-family: inherit; font-size: 14px; }
.mt-total { margin-top: 16px; padding: 16px 22px; }
.mt-total-sol { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.mt-total-sag { display: flex; align-items: center; gap: 22px; }
.mt-total .total-value { font-size: 30px; }
.mt-total .btn.lg { padding: 12px 26px; }
@media (max-width: 900px) {
  .alis-head.mt-head { display: none; }
  .alis-row.mt-row { grid-template-columns: 30px minmax(0,1fr) 90px 36px; }
  .alis-row.mt-row .mt-qiymet, .alis-row.mt-row .mt-qaliq, .alis-row.mt-row .mt-mebleg { grid-column: 2 / -1; text-align: left; padding: 0; }
}

/* ============================================================
   v467 — İş masası (çərçivəli iş sahəsi)
   ============================================================ */
.im-bas { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 10px; }
.im-bas-sol { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.im-bas-sag { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.im-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.im-seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.im-seg button + button { border-left: 1px solid var(--line); }
.im-seg button.aktiv { background: var(--accent); color: #fff; }
.im-ik { display: grid; width: 18px; height: 14px; gap: 2px; grid-template-columns: 1fr; }
.im-ik i { background: currentColor; opacity: .75; border-radius: 2px; display: block; }
.im-ik2 { grid-template-columns: 1fr 1fr; }
.im-ik3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } .im-ik3 i:first-child { grid-row: 1 / 3; }
.im-ik4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.im-ilk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); margin: 0; font-weight: 500; cursor: pointer; }
.im-ilk input { width: auto; margin: 0; }
.im-qab { display: grid; gap: 8px; height: calc(100vh - 150px); min-height: 480px; }
.im-qab[data-say="1"] { grid-template-columns: 1fr; }
.im-qab[data-say="2"] { grid-template-columns: 1fr 1fr; }
.im-qab[data-say="3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.im-qab[data-say="3"] .im-pane[data-i="0"] { grid-row: 1 / 3; }
.im-qab[data-say="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.im-qab.boyuk { grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
.im-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(30,22,10,.06); }
.im-pane.im-gizli { display: none; }
/* v484: çərçivənin gövdəsi — çərçivələr bir dəfə yaradılır, yalnız gövdənin içi dəyişir */
.im-govde { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
/* v485: masaya atılmamış açıq səhifənin zolağı; tam rejimdə üst sənəd heç vaxt sürüşmür (ikiqat sürüşdürmə zolağı olmasın) */
.im-is-zolaq { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 12px; background: #FFF8E6; border: 1px solid #E4BC5E; border-radius: 12px; font-size: 13.5px; }
.im-is-btns { display: inline-flex; gap: 8px; }
.im-is-btns .btn { padding: 6px 12px; font-size: 13px; }
body.im-tam { overflow: hidden; }
body.im-tam .im-is-zolaq { display: none !important; }
.im-yarimciq { flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: #8A5A00; background: #FFE9A8; border: 1px solid #E4BC5E; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.im-pane.im-boyuk { grid-column: 1 / -1 !important; grid-row: 1 / -1 !important; }
.im-pane-bas { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: linear-gradient(180deg, #F7EFDD, #F1E5CC); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.im-no { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.im-sec { margin: 0; height: 28px; padding: 2px 8px; font-size: 12.5px; max-width: 220px; }
.im-ad { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.im-btns { display: inline-flex; gap: 2px; }
.im-btns button { width: 26px; height: 26px; border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.im-btns button:hover { background: #fff; border-color: var(--line); color: var(--ink); }
.im-pane iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }
.im-bos { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink-soft); font-size: 13.5px; padding: 20px; }
.im-bos-tez { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.im-bos-tez button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.im-bos-tez button:hover { border-color: var(--accent); color: var(--accent-deep); }
/* yığcam (çərçivə içi) rejim — baş menyu və boşluqlar gizlənir */
html.embed .topbar { display: none !important; }
html.embed main.wrap { padding-top: 10px !important; }
html.embed .page-head h1 { font-size: 20px; }
html.embed body { background: var(--bg); }

/* v468 — İş masası: böyüdülmüş çərçivə adi səhifə kimi tam görünür */
body.im-tam .im-bas { display: none; }
body.im-tam .im-qab { height: calc(100vh - 92px); }
body.im-tam .im-pane.im-boyuk { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
body.im-tam .im-pane.im-boyuk .im-pane-bas { display: none; }
body.im-tam main.wrap { padding-top: 6px !important; }
.im-geri { position: fixed; right: 18px; bottom: 18px; z-index: 90; }
.im-geri button {
  border: 1px solid rgba(228,188,94,.5); background: linear-gradient(135deg, #2A1D0E, #4A3316); color: #F7EFDD;
  border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 10px 26px rgba(30,22,10,.35);
}
.im-geri button:hover { filter: brightness(1.12); }

/* v469 — qlobal «İş masasına qayıt» (çərçivə içində gizli) */
.im-geri-global a { display: inline-block; text-decoration: none; border: 1px solid rgba(228,188,94,.5); background: linear-gradient(135deg, #2A1D0E, #4A3316); color: #F7EFDD; border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: 13px; box-shadow: 0 10px 26px rgba(30,22,10,.3); opacity: .85; }
.im-geri-global a:hover { opacity: 1; }
html.embed .im-geri-global { display: none !important; }
@media (max-width: 760px) { .im-geri-global { display: none; } }

/* v473 — İş masası: çərçivə tam açılanda proqram öz menyusu ilə görünür; grid-də «Aç» düyməsi */
.im-ic { position: relative; flex: 1; min-height: 0; display: flex; }
.im-ic iframe { flex: 1; }
.im-ac-btn { position: absolute; right: 10px; bottom: 10px; border: 1px solid rgba(228,188,94,.6); background: linear-gradient(135deg, #2A1D0E, #4A3316); color: #F7EFDD; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; opacity: .85; box-shadow: 0 6px 16px rgba(30,22,10,.3); }
.im-ac-btn:hover { opacity: 1; }
body.im-tam .im-ac-btn { display: none; }
body.im-tam > header.topbar, body.im-tam .topbar { display: none !important; }
body.im-tam main.wrap { padding: 0 !important; max-width: none !important; }
body.im-tam .im-qab { height: 100vh; gap: 0; }
body.im-tam .im-pane.im-boyuk { border-radius: 0; }
body.im-tam .im-geri { bottom: 14px; right: 14px; }
.im-bos { cursor: pointer; }

/* v482 — açıq siyahılı sətir həmişə üstdə (Zay: siyahı yekun zolağının altında qalırdı) */
.sn-setir:has(.cx-dd[style*="block"]), .alis-row:has(.cx-dd[style*="block"]), .r-setir:has(.cx-dd[style*="block"]) { z-index: 90; }
.cx-dd { z-index: 95; }
