/* ========== Rənglər: «Gecə qızılı» (Kassa Uçotu ilə eyni palitra) ==========
   Dəyərlər kassa.alphatime.org-dan (public/css/app.css) — orada kontrast ölçülüb:
   --muted ≥4.6, --warn ≥4.8 (WCAG AA). Rəngli fonda mətn HƏMİŞƏ cüt tokenlə:
   --accent → --accent-fg, --ok → --ok-fg, --err → --err-fg. «color:#fff» YAZMA:
   gecə rejimində fon açılır və ağ mətn itir. İstisna: yan menyu (--side həmişə tünddür).
   Adlar köhnədir (--card, --fg, --line) — 500 sətir CSS-i yenidən adlandırmamaq üçün. */
:root {
  --bg: #f7f3ec; --card: #fffdf9; --head: #faf6ef; --line: #e6ded0; --line-strong: #cfc4b1;
  --fg: #15171d; --muted: #6c665c;
  --accent: #8a6828; --accent-soft: #f7f0e4; --accent-fg: #ffffff;
  --ok: #2f7a55; --ok-bg: #ebf4ee; --ok-fg: #ffffff;
  --warn: #91600f; --warn-bg: #f8eedb;
  --err: #a8382e; --err-bg: #f8e7e4; --err-fg: #ffffff;
  --mix: var(--accent-soft); --mix-fg: var(--accent);
  /* KPI ikon fonları — palitra daxilində (bənövşəyi/göy əvəzinə qızılı/yaşıl/dəniz). */
  --violet-soft: var(--accent-soft); --violet: var(--accent);
  --green-soft: var(--ok-bg); --green: var(--ok);
  --blue-soft: #eef1f5; --blue: #3d5a80;
  --amber-soft: var(--warn-bg); --amber: var(--warn);
  /* Qrafik: dövriyyə qızılı, qazanc yaşıl, kart dəniz mavisi, nisyə kəhrəba. */
  --c-rev: #b08a3e; --c-pro: #2f7a55; --c-card: #3d5a80; --c-credit: #c98a1b;
  --side: #1b1f27; --side-fg: #cfc8bb; --side-on: #ffffff; --side-hover: #262b35; --side-brand: #d8b779;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 12px rgba(16, 24, 40, .06);
  --shadow-lg: 0 8px 28px rgba(16, 24, 40, .12);
  --r: 12px; --r-sm: 8px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  accent-color: var(--accent);
}
/* Gecə: İKİ EYNİ blok — sistem rejimi (seçim «light» deyilsə) və əl ilə seçim.
   Biri dəyişəndə o biri də dəyişməlidir: test/tema.test.js ikisinin eyniliyini yoxlayır. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121419; --card: #1b1f27; --head: #20242d; --line: #2c313b; --line-strong: #3d434f;
    --fg: #e9e3d8; --muted: #a7a196;
    --accent: #d8b779; --accent-soft: #2a2519; --accent-fg: #1a140a;
    --ok: #7fd1a8; --ok-bg: #15291f; --ok-fg: #1a140a;
    --warn: #e9b45c; --warn-bg: #2b2312;
    --err: #ef8a7f; --err-bg: #2c1817; --err-fg: #1a140a;
    --blue-soft: #1a2230; --blue: #9fb7d9;
    --c-rev: #d8b779; --c-pro: #7fd1a8; --c-card: #9fb7d9; --c-credit: #e9b45c;
    --side: #161920; --side-fg: #b9b2a5; --side-on: #ffffff; --side-hover: #20242d; --side-brand: #d8b779;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .25);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
    --bg: #121419; --card: #1b1f27; --head: #20242d; --line: #2c313b; --line-strong: #3d434f;
    --fg: #e9e3d8; --muted: #a7a196;
    --accent: #d8b779; --accent-soft: #2a2519; --accent-fg: #1a140a;
    --ok: #7fd1a8; --ok-bg: #15291f; --ok-fg: #1a140a;
    --warn: #e9b45c; --warn-bg: #2b2312;
    --err: #ef8a7f; --err-bg: #2c1817; --err-fg: #1a140a;
    --blue-soft: #1a2230; --blue: #9fb7d9;
    --c-rev: #d8b779; --c-pro: #7fd1a8; --c-card: #9fb7d9; --c-credit: #e9b45c;
    --side: #161920; --side-fg: #b9b2a5; --side-on: #ffffff; --side-hover: #20242d; --side-brand: #d8b779;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .25);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, .45);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Lora — başlıq şrifti, ÖZ serverimizdən (CSP: yalnız 'self'). Yalnız 600, ~46 KB.
   «ə» (U+0259) və «İ» (U+0130) latin-ext dəstindədir. Lisenziya: fonts/Lora-LICENSE.txt (OFL). */
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/lora-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/lora-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/lora-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ========== Əsas ========== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .8rem; }
h2 { font-size: 1.1rem; line-height: 1.25; margin: 0 0 .5rem; }
/* Yalnız h1/h2 serif (Kassa qaydası): h3 və kiçik etiketlər oxunuş üçün sans qalır. */
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; }
/* İncə, temaya uyğun sürüşmə zolağı. */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.big { width: 44px; height: 44px; color: var(--accent); }

/* ========== Qabıq: sol menyu + məzmun ========== */
body.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.2rem; padding: 20px 14px; background: var(--side); color: var(--side-fg); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--side-brand); text-decoration: none; padding: 0 8px; }
.logo { display: inline-flex; width: 32px; height: 32px; }
.logo svg { width: 100%; height: 100%; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; min-height: 42px; border-radius: 10px; color: var(--side-fg); text-decoration: none; font-weight: 500; white-space: nowrap; }
.menu a:hover { background: var(--side-hover); color: var(--side-on); }
/* Yan menyu iki rejimdə də tünddür — seçili bənd sabit qızılı fonda tünd mətn (kontrast 9+). */
.menu a.on { background: var(--side-brand); color: #1a140a; font-weight: 600; }
.me { margin-top: auto; display: flex; align-items: center; gap: .6rem; padding: .6rem; border-radius: 12px; background: var(--side-hover); min-width: 0; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1a140a; background: var(--side-brand); }
.me .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.me .who b { color: var(--side-on); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { font-size: .78rem; }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.iconbtn:hover { background: rgba(127, 127, 160, .18); }
.me .iconbtn { margin-left: auto; }

main { padding: 28px 32px 40px; min-width: 0; }

@media (max-width: 900px) {
  body.app { grid-template-columns: minmax(0, 1fr); }
  /* Telefonda yapışqan deyil — başlıq ekranın beşdə birini tuturdu. */
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; padding: 10px 16px; }
  /* Sürüşən menyu son bəndi gizlədirdi («Qaimələr» görünmürdü) — sətrə sığdır. */
  .menu { order: 3; flex-direction: row; flex-wrap: wrap; flex-basis: 100%; gap: 4px; }
  .menu a { flex: 1 1 auto; justify-content: center; min-height: 40px; padding: .45rem .6rem; gap: .45rem; }
  .me { margin: 0 0 0 auto; padding: 0; background: none; }
  .me .who { display: none; }
  .avatar { width: 32px; height: 32px; }
  main { padding: 18px 16px 32px; }
}

/* ========== Komponentlər ========== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }

label { font-size: .85rem; color: var(--muted); font-weight: 600; }
input, select, button { font: inherit; color: inherit; }
input:not([type=file]):not([type=checkbox]) { width: 100%; min-width: 0; min-height: 40px; padding: .5rem .65rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--card); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Klaviatura ilə gəzəndə düymə/keçid görünən halqa alsın. */
.btn:focus-visible, .iconbtn:focus-visible, .menu a:focus-visible, a.row:focus-visible, a.act:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:disabled { background: transparent; border-color: transparent; }
input[type=file] { min-height: 40px; padding: .4rem 0; max-width: 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; min-height: 42px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--card); cursor: pointer; font-weight: 600; text-decoration: none; color: var(--fg); transition: transform .06s, filter .15s; }
/* Rəng ANİMASİYA OLUNMUR (Kassa qaydası: yalnız transform/opacity/kölgə): rejim dəyişəndə fon
   keçidi gizli/arxa pəncərədə dayanırdı və düymə gündüz fonunda gecə mətni ilə qalırdı (ölçüldü: 1,26). */
.btn:hover:not(:disabled) { background: var(--head); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
/* Ümumi .btn:hover fonu dəyişir — əsas düymə öz rəngini SAXLASIN (Kassa tələsi: mətn itirdi). */
.btn.primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); filter: brightness(1.12); }
.btn.danger { color: var(--err); border-color: var(--err); }
.btn.block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; }

.flash, .err { display: flex; align-items: flex-start; gap: .55rem; padding: .7rem .9rem; border-radius: var(--r-sm); border: 1px solid currentColor; margin: 0 0 14px; }
.flash .ic, .err .ic { width: 18px; height: 18px; margin-top: 2px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err, .err { background: var(--err-bg); color: var(--err); }
.warn { background: var(--warn-bg); color: var(--warn); padding: .7rem .9rem; border-radius: var(--r-sm); border: 1px solid currentColor; margin-bottom: 14px; }
.warn ul { margin: .3rem 0 0; padding-left: 1.2rem; }

.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.head h1 { margin: 0; }
.search { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-width: 0; }
.search input { flex: 1 1 200px; width: auto; }
.search label { position: absolute; left: -9999px; }

.upload { display: flex; flex-direction: column; gap: .45rem; max-width: 640px; }
.upload button { align-self: flex-start; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .85rem; min-width: 0; box-shadow: var(--shadow); }
/* Kassa stat etiketi: kiçik, böyük hərf, qalın. */
.stats span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.stats b { font-size: 1.15rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats small { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }
.stats .okmark { color: var(--ok); }
.stats .bad { color: var(--err); }

.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; }
.rates .f { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.rates .wide2 { grid-column: span 2; }
@media (max-width: 480px) { .rates .wide2 { grid-column: 1 / -1; } }
fieldset { margin: 0 0 16px; }

/* Cədvəl yalnız öz qabında sürüşür — səhifə yana sürüşmür. */
.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; box-shadow: var(--shadow); }
table.grid { border-collapse: collapse; width: 100%; font-size: .92rem; }
.grid th, .grid td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: var(--head); }
.grid th { background: var(--head); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); white-space: nowrap; position: sticky; top: 0; border-bottom-width: 1.5px; }
.grid .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid .strong { font-weight: 600; }
.grid .neg { color: var(--err); }
.grid .code { white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.grid .img { width: 56px; padding: .35rem; }
.grid .img img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; display: block; border: 1px solid var(--line); }
.grid .empty { text-align: center; color: var(--muted); padding: 1.5rem; }
.grid tr.mixed td:first-child { box-shadow: inset 3px 0 0 var(--mix-fg); }
.lines .namecell { min-width: 240px; }
.lines input.num { width: 6.5rem; text-align: right; }

.muted { color: var(--muted); }
.small { font-size: .8rem; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--head); color: var(--muted); white-space: nowrap; }
.badge.draft { background: var(--warn-bg); color: var(--warn); }
.badge.posted, .badge.new { background: var(--ok-bg); color: var(--ok); }
.badge.mix { background: var(--mix); color: var(--mix-fg); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 16px; }

/* ========== Ana səhifə ========== */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem 1.5rem; margin-bottom: 20px; }
.hero p { margin: 0 0 .2rem; font-size: .9rem; }
.hero h1 { margin: 0; font-size: 1.75rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 600px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { flex-direction: column; gap: .5rem; padding: 12px; }
  .kpi-ic { width: 34px; height: 34px; border-radius: 10px; }
  .kpi-ic .ic { width: 18px; height: 18px; }
  .kpi b { font-size: clamp(.95rem, 4.6vw, 1.15rem); }
  .hero h1 { font-size: 1.45rem; }
}
.kpi { display: flex; align-items: flex-start; gap: .85rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi > div { min-width: 0; }
.kpi-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.kpi.violet .kpi-ic { background: var(--violet-soft); color: var(--violet); }
.kpi.green .kpi-ic { background: var(--green-soft); color: var(--green); }
.kpi-l { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; color: var(--muted); }
/* Rəqəm BÖLÜNMƏZ: overflow-wrap:anywhere «23 596.67» rəqəmini «23 596 / .67» kimi qırırdı. */
.kpi b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.kpi small { display: block; font-size: .78rem; color: var(--muted); }

.split { padding: 16px 18px; }
.split-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .6rem; }
.bar { height: 12px; border-radius: 999px; background: var(--c-pro); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c-rev); border-radius: 999px 0 0 999px; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin-top: .6rem; font-size: .85rem; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; }
.dot.a { background: var(--c-rev); }
.dot.d { background: var(--c-pro); }

.cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.sec { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin: 8px 0 12px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: .75rem; }

.acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.act { display: flex; align-items: center; gap: .8rem; padding: 14px 16px; min-height: 72px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); text-decoration: none; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; min-width: 0; }
a.act:hover { border-color: var(--accent); transform: translateY(-2px); }
.act > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.act small { color: var(--muted); font-size: .8rem; }
.act-ic { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.act .go { color: var(--muted); width: 18px; height: 18px; }
.act.soon { opacity: .6; }
.act.soon .act-ic { background: var(--head); color: var(--muted); }
.pill { font-size: .7rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--head); color: var(--muted); white-space: nowrap; }

.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.row { display: flex; align-items: center; gap: .75rem; padding: 12px 16px; min-height: 60px; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; min-width: 0; }
.row:last-child { border-bottom: 0; }
a.row:hover { background: var(--head); }
.row .grow { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row .grow b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .grow small { color: var(--muted); font-size: .8rem; }
.row-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--head); color: var(--muted); }
.warnrow .row-ic { background: var(--warn-bg); color: var(--warn); }
.row .go { color: var(--muted); width: 18px; height: 18px; }
.row .num { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thumb { width: 36px; height: 36px; flex: none; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }

.empty-state { text-align: center; padding: 36px 20px; }
.empty-state h1, .empty-state h3 { margin: .6rem 0 .3rem; }
.empty-state p { margin: 0 0 1rem; }

/* ========== Giriş səhifəsi ========== */
body.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; /* Kassa Uçotu giriş fonu: tək xətti keçid (kontrast yoxlaması ilk rəngi götürür). */
  color: #fff; background: linear-gradient(160deg, #2e2719 0%, #1a1a1b 45%, #121419 100%); }
.auth-brand-in { position: relative; z-index: 1; max-width: 520px; }
.brand.big { color: var(--side-brand); font-size: 1.35rem; padding: 0; margin-bottom: 56px; }
.brand.big .logo { width: 40px; height: 40px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .25)); }
.auth-brand h1 { font-size: clamp(1.6rem, 2.6vw, 2.35rem); line-height: 1.2; font-weight: 700; margin: 0 0 28px; }
.feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feats li { display: flex; align-items: flex-start; gap: .8rem; color: rgba(255, 255, 255, .86); }
.feats .ic { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: rgba(255, 255, 255, .14); color: #fff; }
.feats b { color: #fff; }
.auth-art { position: absolute; right: -30px; bottom: -20px; width: min(60%, 460px); color: #d8b779; }

.auth-form { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: .45rem; }
.login-card h2 { font-size: 1.7rem; margin: 0; letter-spacing: -.01em; }
.login-card > p.muted { margin: 0 0 1rem; }
.login-card label { margin-top: .5rem; }
.field { position: relative; display: flex; align-items: center; }
.field > .ic { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.field input:not([type=file]) { min-height: 48px; padding-left: 42px; border-radius: 12px; }
.field .peek { position: absolute; right: 5px; color: var(--muted); }
.field:has(.peek) input { padding-right: 48px; }
.field .peek[aria-pressed="true"] { color: var(--accent); }
.login-card .btn.primary { margin-top: 1.1rem; min-height: 50px; border-radius: 12px; font-size: 1rem; }
.auth-foot { margin-top: 18px; }

@media (max-width: 900px) {
  body.auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-brand { padding: 22px 20px 26px; }
  .brand.big { margin-bottom: 16px; }
  .auth-brand h1 { font-size: 1.3rem; margin: 0; }
  .feats, .auth-art { display: none; }
  .auth-form { justify-content: flex-start; padding: 28px 20px 40px; }
}

body.auth-plain main { max-width: 520px; margin: 12vh auto; }

/* ========== HERMAN söz nişanı ========== */
.wm { display: flex; flex-direction: column; line-height: 1.05; }
.wm b { font-weight: 800; letter-spacing: .14em; font-size: 1.05rem; }
/* 11px-dən kiçik olmasın (ölçüldü: .66rem = 10.56px). */
.wm small { font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-top: 3px; }
.brand.big .wm b { font-size: 1.5rem; letter-spacing: .18em; }
.brand.big .wm small { font-size: .74rem; opacity: .75; }

/* 360px-dən dar (köhnə kiçik telefonlar): iki sütunda məbləğ kartdan çıxırdı (ölçüldü, 320px). */
@media (max-width: 359px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi { flex-direction: row; align-items: center; }
}
.kpi.amber .kpi-ic { background: var(--amber-soft); color: var(--amber); }

/* ========== Kassa / yerdəyişmə ========== */
.head h1 .muted { font-weight: 500; font-size: 1rem; }
.head > a { display: inline-flex; align-items: center; gap: .35rem; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .pos { grid-template-columns: minmax(0, 1fr); } }
.pos .card { margin-bottom: 0; }
.pos-find { display: flex; flex-direction: column; gap: .45rem; }
.pos-find .field input { min-height: 48px; padding-left: 42px; font-size: 1.02rem; }
.found { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; margin-top: .3rem; }
.found .hint { margin: .4rem .2rem; }
.hit { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 58px; padding: 8px 10px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.hit:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.hit:disabled { opacity: .5; cursor: not-allowed; }
.hit img, .hit .noimg { width: 42px; height: 42px; flex: none; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.hit .noimg { background: var(--head); }
.hit-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hit-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-t small, .hit-r small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-r { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.hit-r b { white-space: nowrap; }
.hit-r .ok { color: var(--ok); }
.hit-r .bad, small.bad { color: var(--err); }

.cart-h { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cart-h h2 { margin: 0; }
.cart-h .link { min-height: 36px; }
.cart-empty { padding: 1.5rem 0; text-align: center; }
.cart { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; }
.cart li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "t q rm" "t p rm"; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ci-t { grid-area: t; display: flex; flex-direction: column; min-width: 0; }
.ci-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-t small { color: var(--muted); font-size: .78rem; }
.ci-q { grid-area: q; display: flex; align-items: center; gap: 4px; }
/* Seçici qəsdən güclüdür: ümumi input:not():not() qaydası (0,2,1) width:100%
   verirdi, say sahəsi səbət sətrini doldurub mal adını 0 enə sıxırdı. */
.cart .ci-q input.num { width: 4.2rem; text-align: center; }
.ci-q .iconbtn { border: 1px solid var(--line); font-size: 1.1rem; font-weight: 700; }
.ci-p { grid-area: p; display: flex; align-items: center; justify-content: flex-end; gap: .6rem; font-size: .9rem; color: var(--muted); }
.cart .ci-p input.num { width: 5.5rem; text-align: right; min-height: 34px; padding: .25rem .45rem; }
.ci-p b { color: var(--fg); white-space: nowrap; min-width: 5.5rem; text-align: right; }
.cart .rm { grid-area: rm; color: var(--err); font-size: 1.3rem; }
.cart-f { padding-top: .8rem; }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total b { font-size: 1.6rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pay { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; margin-top: 16px; }
.pay .f { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 220px; min-width: 0; }
.seg { display: flex; gap: 6px; border: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.seg legend { font-size: .85rem; color: var(--muted); font-weight: 500; margin-bottom: .3rem; padding: 0; }
.seg label { display: inline-flex; align-items: center; gap: .4rem; min-height: 42px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--fg); font-size: .95rem; background: var(--card); }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg input { accent-color: var(--accent); }
.btn.big { min-height: 50px; padding: 0 1.4rem; font-size: 1.02rem; margin-left: auto; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
input[aria-invalid="true"] { border-color: var(--err) !important; }

.receipt { max-width: 860px; }
.rc-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 12px; }
.rc-h > div { display: flex; flex-direction: column; }
.rc-total { align-items: flex-end; }
.rc-total b { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.tablewrap.flat { box-shadow: none; margin-bottom: 12px; }
.ret { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 8px 0 14px; }
.ret .f { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 240px; min-width: 0; }
.rets h3 { font-size: .95rem; margin: 12px 0 6px; }
.rc-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; max-width: 320px; margin-left: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.rc-sum b { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--err); }
/* «.pos» kassa qabıdır — qazanc rəqəmi ayrıca sinif (toqquşmasın). */
.gain { color: var(--ok); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.filters .f { display: flex; flex-direction: column; gap: .25rem; flex: 0 1 190px; min-width: 0; }
/* Cədvəldəki kiçik rəqəm sahələri (qaytarma sayı və s.). Faylın SONUNDA:
   ümumi input:not():not() qaydası ilə eyni üstünlükdədir, sonra gələn qalib gəlir. */
.grid td input.num { width: 6rem; text-align: right; }
/* Telefonda səbət sətri: ad ÖZ sətrində, altında say və qiymət
   (ölçüldü: 375px-də ad 47px-ə, 320px-də 0px-ə sıxılırdı). */
@media (max-width: 520px) {
  .cart li { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "t t rm" "q p p"; }
  .ci-p { flex-wrap: wrap; }
}

/* ========== Müştərilər / nisyə ========== */
.cust { display: flex; flex-direction: column; gap: .4rem; flex: 1 1 100%; }
.cust[hidden], .newcust[hidden], .chosen[hidden] { display: none; }
.small-found { max-height: 240px; }
.small-found .hit { min-height: 48px; }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; }
.chosen span { display: flex; flex-direction: column; min-width: 0; }
.chosen small { color: var(--muted); font-size: .8rem; }
.cust .link { align-self: flex-start; min-height: 36px; }
.newcust { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.newcust .f { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 200px; min-width: 0; }
.custlink { display: inline-flex; align-items: center; gap: .3rem; margin-top: .3rem; font-weight: 600; text-decoration: none; }
.custlink .ic { width: 16px; height: 16px; }
.avatar.sm { width: 36px; height: 36px; font-size: .9rem; }
.row .num.debt, b.debt { color: var(--err); }
.row .num.zero { color: var(--muted); font-weight: 500; font-size: .85rem; }
.search .chk { position: static; display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; min-height: 40px; }
.newc { display: flex; flex-direction: column; gap: .5rem; }
.newc .f, .editc .f { display: flex; flex-direction: column; gap: .25rem; }
.editc { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; }
.newc button, .editc button { align-self: flex-start; }
.debtcard { display: flex; flex-direction: column; gap: .2rem; }
.debtcard b { font-size: 2rem; font-variant-numeric: tabular-nums; }
.debtcard.has b { color: var(--err); }
.hamt { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.hamt b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hamt small { font-size: .75rem; white-space: nowrap; }
.row-ic.sale { background: var(--err-bg); color: var(--err); }
.row-ic.payment { background: var(--ok-bg); color: var(--ok); }
.breakdown summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.breakdown table { margin-top: .8rem; }
details.card summary { cursor: pointer; font-weight: 600; }

/* Telefonda qəbz: cədvəl yana sürüşürdü, «Qaytar» sahəsi ekrandan kənarda qalırdı.
   Sətir → kart; hər xananın etiketi data-l-dən. */
@media (max-width: 560px) {
  .rcpt { overflow: visible; border: 0; background: none; }
  .rcpt thead { display: none; }
  .rcpt table, .rcpt tbody { display: block; }
  .rcpt tr { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
  .rcpt td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0; border: 0; text-align: right; }
  .rcpt td:first-child { display: block; text-align: left; margin-bottom: 4px; }
  .rcpt td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: .82rem; font-weight: 400; }
  .rc-total { margin-left: auto; }
}
/* Tarixçədə başlıq kəsilməsin — «Ödəniş · Nağd», «Nisyə satış №12» əsas məlumatdır. */
.hist .grow b { white-space: normal; overflow: visible; }
.breakdown .tablewrap { margin-top: .8rem; }
.breakdown table { margin-top: 0; }

/* ========== Əl ilə mədaxil ========== */
.rhead { margin-top: 0; margin-bottom: 16px; }
.newprod { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.newprod[hidden] { display: none; }
.newprod .f { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.newprod .f.wide, .newprod .err, .newprod .btn { grid-column: 1 / -1; }
.pos-find > .link { align-self: flex-start; min-height: 36px; }
.cart li.recrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t rm" "q q" "p p"; }
.recp { flex-wrap: wrap; justify-content: flex-start; gap: 6px 8px; }
.recp b { margin-left: auto; }
.mini { display: flex; flex-direction: column; gap: 2px; font-size: .72rem; color: var(--muted); }
.cart .recp .mini input.num { width: 5.2rem; min-height: 34px; padding: .25rem .45rem; text-align: right; }
/* 320px: sağdakı «anbar 10 · dükan 0» bölünmədiyi üçün mal adı 54px-ə sıxılırdı. */
@media (max-width: 400px) {
  .hit-r { flex: 0 1 auto; max-width: 42%; }
  .hit-r small { white-space: normal; text-align: right; }
}

/* ========== Menyu qrupları + analitika ========== */
.menu { gap: 14px; }
.mgroup { display: flex; flex-direction: column; gap: 2px; }
.mtitle { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--side-fg); opacity: .55; padding: 0 .75rem .2rem; }
@media (max-width: 900px) {
  .menu { gap: 4px; }
  .mgroup { display: contents; }
  .mtitle { display: none; }
}
.kpi.blue .kpi-ic { background: var(--blue-soft); color: var(--blue); }
.kpi.red .kpi-ic { background: var(--err-bg); color: var(--err); }
.chartcard { padding: 16px 18px 10px; }
.chart { display: block; width: 100%; height: 240px; margin-top: 6px; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; }
.chart .b-rev, .dot.b-rev { fill: var(--c-rev); background: var(--c-rev); }
.chart .b-pro, .dot.b-pro { fill: var(--c-pro); background: var(--c-pro); }
.chart g:hover .b-rev { fill: var(--accent); }
@media (max-width: 600px) { .chart { height: 180px; } }
.sbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--head); }
.sbar span { display: block; height: 100%; }
.p-cash, .dot.p-cash { background: var(--c-pro); }
.p-card, .dot.p-card { background: var(--c-card); }
.p-credit, .dot.p-credit { background: var(--c-credit); }
.legend b { color: var(--fg); font-variant-numeric: tabular-nums; }
.rank { width: 22px; flex: none; text-align: center; font-weight: 700; color: var(--muted); }

/* ========== Alət zolağı, mal kartı ========== */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.grid .img .noimg { display: block; width: 44px; height: 44px; border-radius: 8px; background: var(--head); }
.grid.stock a.name { font-weight: 600; text-decoration: none; }
.pimg { display: flex; flex-direction: column; gap: .6rem; }
.pimg > img { width: 100%; max-height: 320px; object-fit: contain; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.noimg.big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; height: 180px; border-radius: 12px; background: var(--head); }
.imgform { display: flex; flex-direction: column; gap: .4rem; }
.imgform button { align-self: flex-start; }
.danger-link { color: var(--err); min-height: 32px; }
.editp { display: flex; flex-direction: column; gap: .55rem; }
.editp .f { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.editp button { align-self: flex-start; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.gainnum { color: var(--ok); }

/* ========== Qaimə qaralaması: bütün sahələr redaktə ========== */
.ratesup { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px 12px; margin: .3rem 0 .4rem; }
.ratesup .f { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.ratesup .key { grid-column: 1 / -1; }
.ratesup .key input { border-color: var(--accent); font-weight: 600; max-width: 220px; }
.lines input.num.xs { width: 4.4rem; }
.lines input.num.sm { width: 5.6rem; }
/* input.codein — ümumi input:not():not() (0,2,1) .lines .codein-dən (0,2,0) güclü idi, kod 55px-ə sıxılırdı. */
.lines input.codein { width: 7.5rem; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.lines input.specin { margin-top: 4px; font-size: .85rem; min-height: 34px; }
.lines td.img { position: relative; }
.imgbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-top: 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--accent); }
.imgbtn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.imgbtn .ic { width: 16px; height: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label.chk.big { display: flex; align-items: center; gap: .55rem; font-size: 1rem; color: var(--fg); min-height: 40px; cursor: pointer; }
label.chk.big input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ========== Kassa: sürətli xana, müştəri yuxarıda, qiymət gizlətmə ========== */
.kassatop { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px 22px; align-items: start; margin-bottom: 16px; }
@media (max-width: 900px) { .kassatop { grid-template-columns: minmax(0, 1fr); } }
.kopts { display: flex; flex-direction: column; gap: 10px; }
.quick { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) minmax(0, 90px) minmax(0, 120px) auto; gap: 10px 12px; align-items: end; margin-bottom: 16px; }
.quick .f { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.quick #qcode { font-family: ui-monospace, Consolas, monospace; font-weight: 600; min-height: 46px; }
.quick #qqty, .quick #qprice { text-align: right; min-height: 46px; }
.qname { display: flex; flex-direction: column; justify-content: center; min-height: 46px; padding: 0 .3rem; min-width: 0; }
.qname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qname small { color: var(--muted); font-size: .8rem; }
.quick .btn { min-height: 46px; }
@media (max-width: 760px) {
  .quick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .quick .qcode, .quick .qname, .quick .btn { grid-column: 1 / -1; }
}
.lastp { color: var(--accent); font-size: .72rem; }
/* Qiymətlər gizli: mətn ●●● ilə əvəzlənir, rəqəm sahələri nöqtə kimi yazılır. */
.hideprices .pr { font-size: 0 !important; }
.hideprices .pr::before { content: '●●●'; font-size: .9rem; letter-spacing: .1em; color: var(--muted); }
.hideprices input[data-price], .hideprices #qprice { -webkit-text-security: disc; }
.limitline { font-size: .82rem; color: var(--muted); }
.presets .btn { min-height: 38px; padding: .4rem .8rem; }
.okd { color: var(--ok); }

/* ========== Gecə/gündüz düyməsi (ui.js .is-dark qoyur) ========== */
.tema .t-sun { display: none; }
.tema.is-dark .t-sun { display: block; }
.tema.is-dark .t-moon { display: none; }
/* Yan menyuda iki düymə yan-yana: yalnız birincisi sağa itələnsin. */
.me .iconbtn + .iconbtn { margin-left: 0; }
.auth-form { position: relative; }
.auth-tema { position: absolute; top: 14px; right: 14px; color: var(--muted); }
/* Telefonda sahə 16px: iOS Safari 16px-dən kiçik sahəyə fokusda səhifəni böyüdür. */
@media (max-width: 900px) {
  input:not([type=file]):not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Dar telefonda 5 sütunlu xülasə cədvəli (Kassa hesabı) sığsın: ölçüldü 375px-də «Yekun» 16px,
   320px-də 71px qabdan kənarda qalırdı və görmək üçün sürüşdürmək lazım idi. */
@media (max-width: 420px) {
  .grid.compact th, .grid.compact td { padding: .45rem .35rem; }
  .grid.compact th { letter-spacing: 0; font-size: .7rem; }
  .grid.compact td { font-size: .84rem; }
}

/* ========== İşçi heyəti (/isciler), parol (/parol) ========== */
/* select indiyədək stilsiz idi — sahə ilə eyni görünsün (Kassa: 1.5px güclü xətt). */
select { width: 100%; min-width: 0; min-height: 40px; padding: .45rem .6rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--card); color: var(--fg); }
select:disabled { opacity: .6; }
.mono { font-family: var(--mono); }
.newstaff { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 14px; align-items: end; margin: .4rem 0 .6rem; }
.newstaff .f, .sform .f, .pwform .f { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.staff { list-style: none; padding: 0; }
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .75rem; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.srow:last-child { border-bottom: 0; }
.srow.off .grow b { color: var(--muted); }
.srow .grow { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; }
.srow .grow b { font-weight: 600; overflow-wrap: anywhere; }
.srow .grow small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.sbadges { display: flex; flex-wrap: wrap; gap: 6px; }
.sedit { flex-basis: 100%; }
.sedit summary { cursor: pointer; font-weight: 600; color: var(--accent); min-height: 32px; display: inline-flex; align-items: center; }
.sform { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; align-items: end; margin: .5rem 0; }
.sacts { display: flex; flex-wrap: wrap; gap: 8px; }
.pwcard { max-width: 460px; }
.pwform { display: flex; flex-direction: column; gap: .7rem; }
.pwform .btn { align-self: flex-start; }
/* Giriş vərəqəsi — işçiyə verilir; çapda yalnız o qalır. */
.creds { border: 1.5px solid var(--accent); }
.creds-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1.2rem; margin: .6rem 0 .8rem; }
.creds-dl dt { color: var(--muted); font-size: .85rem; align-self: center; }
.creds-dl dd { margin: 0; overflow-wrap: anywhere; }
.creds-dl dd.big { font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; }
@media (max-width: 420px) { .creds-dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; } .creds-dl dd { margin-bottom: .4rem; } }
@media print {
  body.app { display: block; background: #fff; color: #000; }
  .side, .no-print, .flash { display: none !important; }
  main { padding: 0; }
  .creds { box-shadow: none; border: 1px solid #000; max-width: 520px; }
  .creds-dl dt { color: #333; }
}
/* Yan menyunun altı: üç düymə (parol, rejim, çıxış) adı «a.»-ya sıxırdı (ölçüldü, 1366px).
   Masaüstündə ad + rol yuxarı sətirdə, düymələr altında sağda. Telefonda (≤900px) ad gizlidir. */
@media (min-width: 901px) {
  .me { flex-wrap: wrap; row-gap: .2rem; }
  .me .who { flex: 1 1 calc(100% - 48px); }
  /* Düymə qrupu ikinci sətirdə sağda: yalnız BİRİNCİ düymə (parol) itələnir. */
  .me .iconbtn { margin-left: 0; }
  .me > a.iconbtn[href="/parol"] { margin-left: auto; }
}
/* Alçaq ekranda (1366×657 noutbuk) yan menyu 111px sığmırdı: yapışqan olduğu üçün alt blok
   (çıxış, parol) ekrandan kənarda qalır və heç vaxt görünmürdü (ölçüldü). Kassa qaydası:
   yalnız menyu siyahısı sürüşür, brend və alt blok həmişə yerində. */
@media (min-width: 901px) {
  .side { overflow: hidden; }
  .side .menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-right: -6px; padding-right: 6px; }
  .side .me { flex: none; }
}
/* Qrafik boşdursa (heç satış yoxdur): boş şkala və yastı xətlər əvəzinə mesaj, qrafik hündürlüyündə. */
.chart-empty { display: grid; place-items: center; height: 240px; margin-top: 6px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); color: var(--muted); font-size: .92rem; text-align: center; padding: 0 16px; }
@media (max-width: 600px) { .chart-empty { height: 180px; } }
/* Boş qrafikdə «dövriyyə / qazanc» işarəsi mənasızdır — gizlə. */
.chartcard:has(.chart-empty) .legend { display: none; }
